I have a React Native application that did compile absolutely fine.
After installing react-native-sentry and automatically linking via react-native link, I am faced with this problem:
Showing Recent Issues
Argument list too long: recursive header expansion failed at /Users/dan/Sites/app/node_modules/react-native-intercom/iOS/../../../ios/Pods/React/node_modules/exit-hook.
This error occurred after I ran pod install
Podfile
# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'
target 'app' do
# Uncomment the next line if you're using Swift or would like to use dynamic frameworks
# use_frameworks!
# Pods for app
pod 'AppCenterReactNativeShared', '~> 1.4.0'
pod 'SentryReactNative', :path => '../node_modules/react-native-sentry'
platform :ios, '9.0'
target 'appTests' do
inherit! :search_paths
# Pods for testing
end
end
target 'app-tvOS' do
# Uncomment the next line if you're using Swift or would like to use dynamic frameworks
# use_frameworks!
# Pods for app-tvOS
target 'app-tvOSTests' do
inherit! :search_paths
# Pods for testing
end
end
I've not modified the RNIntercom project at all, this problem always occurs after I try to install a new library via cocoa.
I ran into a similar issue and had to go in and remove a few header search paths, as described here:
https://facebook.github.io/react-native/docs/0.60/troubleshooting#argument-list-too-long-recursive-header-expansion-failed
Argument list too long: recursive header expansion failed
In the
project's build settings, User Search Header Paths and Header Search
Paths are two configs that specify where Xcode should look for #import
header files specified in the code. For Pods, CocoaPods uses a default
array of specific folders to look in. Verify that this particular
config is not overwritten, and that none of the folders configured are
too large. If one of the folders is a large folder, Xcode will attempt
to recursively search the entire directory and throw above error at
some point.
To revert the User Search Header Paths and Header Search Paths build
settings to their defaults set by CocoaPods - select the entry in the
Build Settings panel, and hit delete. It will remove the custom
override and return to the CocoaPod defaults.
Related
I am modularising a large iOS app lets say, MyAppWithDatabase into two modules (i.e. projects). So I will have one main project MyApp as a host and a linked MyDataPlatform as a framework under same workspace MyApp.xcworkspace. When SQLCipher pod was integrated for target MyAppWithDatabase it worked fine, but as all of the database related codes are being moved into MyDataPlatform framework in refactoring, I want to integrate SQLCipher pod only for the framework to keep internal encryption mechanism abstract from host app. Now, when I have integrated for framework it started producing below build error.
Implicit declaration of function ‘sqlite3_key’ is invalid in C99
Note that this issue is being produced from one statement of MyApps source code as a warning but Xcode build treating it as error,
sqlite3_key(_db, [password UTF8String], (int)password.length);
I have the above line still remaining in MyApp because it takes time to move database related codes gradually into MyDataPlatform and I assume the SQLCipher headers are still supposed to be available in host app as the related framework in linked.
I have gone through many proposed solutions on the Internet but none of them worked for my case. I doubt most of the solutions are about integrating SQLCipher for host app only. What should I do when I get the error for framework in my case?
Below is the structure of my pod file (after refactored),
# Uncomment this line to define a global platform for your project
platform :ios, '9.0'
workspace 'MyApp.xcworkspace'
target 'MyApp' do
# Uncomment this line if you're using Swift or would like to use dynamic frameworks
use_frameworks!
pod 'Google/Analytics'
pod 'GoogleMaps'
# ...
target 'MyAppTests' do
inherit! :search_paths
end
end
target 'MyDataPlatform' do
project 'MyDataPlatform/MyDataPlatform.xcodeproj'
pod 'SQLCipher', '~>3.4.2'
#https://discuss.zetetic.net/t/ios-11-xcode-issue-implicit-declaration-of-function-sqlite3-key-is-invalid-in-c99/2198/53
post_install do | installer |
print "SQLCipher: link Pods/Headers/sqlite3.h"
system "mkdir -p Pods/Headers/Private && ln -s ../../SQLCipher/sqlite3.h Pods/Headers/Private"
end
end
Previously SQLCipher was integrated under MyAppWithDatabase i.e.
# Uncomment this line to define a global platform for your project
platform :ios, '9.0'
target 'MyAppWithDatabase' do
# Uncomment this line if you're using Swift or would like to use dynamic frameworks
use_frameworks!
pod 'Google/Analytics'
pod 'GoogleMaps'
pod 'SQLCipher', '~>3.4.2'
# ...
target 'MyAppWithDatabaseTests' do
inherit! :search_paths
end
end
My problem was solved after defining SQLITE_HAS_CODEC in application's,
MyApp -> Build Settings -> Other C Flags
Another solution also works after adding SQLITE_HAS_CODEC=1 in application's,
MyApp -> Build Settings -> Preprocessor Macros
My problem was caused by SPACEs in my project's pathname. The sqlite 'make' script that should generate the sqlite3.c at compilation time seems to trip when there are SPACEs in the sqlcipher library's pathname. I temporarily removed the SPACEs from the pathname and compilation worked.
Alright, Ive seen this problem in a lot of places but I cant find a clear solution - they all seem to be pretty convoluted. I am trying to add pods to a Message Extension. I get this error when doing the following and running pod install - this happens as soon as opening and trying to run the workspace:
# Uncomment this line to define a global platform for your project
# platform :ios, '9.0'
target 'LaunchPack' do
# Comment this line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
# Pods for LaunchPack
pod 'lottie-ios'
end
target 'MessagesExtension' do
# Comment this line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
# Pods for MessagesExtension
pod 'lottie-ios'
end
Here I pod to both targets and per solutions like https://www.bountysource.com/issues/35748866-missing-embed-pods-build-phase-for-messages-extension-target I have manually added the library (Lottie) to the Link Binaries with Libraries section of BOTH targets:
The link above describes "The issue can be fixed by ensuring that the framework is weakly linked and manually adding a "Run Script" build phase for the -frameworks.sh script"
however I don't understand what they mean by that. Where I can I link the framework other than where I have already?
How can I add pods to my MessageExtension?
I have faced the same issue when adding pods for multiple targets what I did was uninstalled and deleted all the pods file first. Then create multiple targets and after that add the pod file and installed it and works fine for me.
using Xcode 8.
iOS 10
Objective-C
Pod file consist :- pod 'XMPPFramework'
i want to integrate XMPPFramework in my project.
installed pods.
after installing pods when i open xWorkspace. these errors comes.
podfile :-
Uncomment the next line to define a global platform for your project
platform :ios, ‘8.0’
target 'Roj' do
# Uncomment the next line if you're using Swift or would like to use dynamic frameworks
# use_frameworks!
# Pods for Roj
pod 'XMPPFramework'
target 'RojTests' do
inherit! :search_paths
# Pods for testing
end
target 'RojUITests' do
inherit! :search_paths
# Pods for testing
end
end
these are the errors which comes in my project see this image
Try this solution in Build settings ;
You can resolve this issue by implementing following changes.
1) Change the following flags in you Project's Build Settings.
2) Rename your module.modulemap files. Name them anything except module and then change the path of this renamed file in your Xcode.
Clean it, Build it, it will resolve the issue.
P.S - Other compilation issues will get resolved automatically.
This may help:
Go to Build Settings
Search for Compile Source As
Set it to Objective-C++
See this issue: https://github.com/react-native-community/react-native-google-signin/issues/361#issuecomment-379013147
I added pods to an existing workspace and now I have 2 of the same project in my workspace (Both projects ending in IOS). If I delete either one, I lose all references to the project.
Here is what the project tree looks like and the pods file. Anyone have any insight?
This is how the podfile should be
# Uncomment this line to define a global platform for your project
# platform :ios, '9.0'
target 'Demo8' do
# Comment this line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
pod 'FBSDKCoreKit', '~> 4.16'
end
This is no requirement to specify workspace externally until there is any requirements.
I have an app that consists of many modules which are linked using cocoapods. The linked modules are detected at runtime. Now I want to be able to add and remove modules from the buildserver. What I need to do now is remove or add dependencies to the Podfile before installing.
I think it would be very nice if I could write the depencies in a separate file per target and include those in the Podfile. That way I don't need to modify the Podfile when building. I'm looking for something like the #include preprocessor directive in C but I learned that the include and require functions in ruby work much different. My best success so far was to try loadbut it fails with Invalid 'Podfile' file: undefined method 'pod' for main:Object..
Is there any possibility to include a file?
Not sure if this is supported or not, but it does work if you create a function in your module file which is called from the main Podfile.
Podfile:
platform :ios, '9.0'
use_frameworks!
load 'ModulePods.rb'
abstract_target 'CommonPods' do
module_pods
pod 'SAMKeychain'
target 'Target' do
pod 'RealmSwift
end
end
ModulePods.rb:
def module_pods
pod 'ReachabilitySwift', '4.1.0'
end