After updating xcode to version 9.1, I can't compile my projects, always have the same error Command /bin/sh failed with exit code 1. I tried to create empty project, install all pods I need, and the result is the same. Here is my podfile
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'
use_frameworks!
target 'xcode9.1' do
pod 'RMStore'
pod 'GoogleMaps'
pod 'RMMapper'
pod 'FacebookCore'
pod 'FacebookLogin'
pod 'FacebookShare'
pod 'VK-ios-sdk'
pod 'TwitterKit'
pod 'GoogleSignIn'
pod 'Flurry-iOS-SDK/FlurrySDK'
pod 'TWSReleaseNotesView'
pod 'GoogleAnalytics'
pod 'GoogleTagManager','~> 3.15.0'
pod 'SBJson'
pod 'Fabric'
pod 'Crashlytics'
pod 'APOfflineReverseGeocoding'
pod 'AFNetworking'
pod 'Realm'
end
This problem repeats in all my projects, can anybody explain me how to fix it?
Here is the screen of full error
The solution is very simple. In your pods target, Build settings, I changed valid architectures list. Also Build architectures only flag change to No can resolve the problem.
Related
Is there a way to force a sub dependency version for a Pod dependency? I have this Pod dependency;
Podfile
...
pod 'Folly', :podspec => '../node_modules/react-native/third-party-podspecs/Folly.podspec'
It has a subdependncy on boost-for-react-native without specifying a version which results in 1.57.0 being installed.
Podfile.lock
...
- Folly (2016.09.26.00):
- boost-for-react-native
I need version 1.63.0. If I specify that in the parent Podfile I still end up with 1.57.0.
Podfile
...
pod 'boost-for-react-native', '~> 1.63.0'
I believe I need to specify it on the Folly file itself.
I am hitting a brick wall at the moment trying to get my app to build in VS AppCenter. It's a react-native project, with some dependencies brought in via cocoapods.
Everything builds locally fine (clean clone on clean vm)
In the CI Environment in AppCenter though I get the following errors:
ld: warning: directory not found for option '-L/Users/vsts/Library/Developer/Xcode/DerivedData/projectname-adroxiklvgljuicvfqowylcdxjrt/Build/Intermediates.noindex/ArchiveIntermediates/unisafe/BuildProductsPath/Release-iphoneos/BVLinearGradient'
ld: library not found for -lGoogle-Maps-iOS-Utils
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Archive Failed
I get the first warning a number of times for each pod.
Here is my Podfile
# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'
project './projectname.xcproj'
target 'projectname' do
# Uncomment the next line if you're using Swift or would like to use dynamic frameworks
# use_frameworks!
# Pods for projectname
pod 'AppCenter/Push', '~> 1.10.0'
pod 'AppCenter/Crashes', '~> 1.10.0'
pod 'AppCenter/Analytics', '~> 1.10.0'
pod 'AppCenterReactNativeShared'
rn_path = '../node_modules/react-native'
rn_maps_path = '../node_modules/react-native-maps'
pod 'yoga', path: "#{rn_path}/ReactCommon/yoga/yoga.podspec"
pod 'React', path: rn_path, subspecs: [
'ART',
'Core',
'RCTActionSheet',
'RCTAnimation',
'RCTGeolocation',
'RCTImage',
'RCTLinkingIOS',
'RCTNetwork',
'RCTSettings',
'RCTText',
'RCTVibration',
'RCTWebSocket',
]
pod 'react-native-maps', path: rn_maps_path
pod 'react-native-google-maps', path: rn_maps_path # Remove this line if you don't want to support Google Maps on iOS
pod 'GoogleMaps' # Remove this line if you don't want to support Google Maps on iOS
pod 'Google-Maps-iOS-Utils' # Remove this line if you don't want to support GoogleMaps on iOS
pod 'BVLinearGradient', :path => '../node_modules/react-native-linear-gradient'
pod 'react-native-background-timer', :path => '../node_modules/react-native-background-timer'
pod 'ReactNativePermissions', :path => '../node_modules/react-native-permissions'
pod 'lottie-ios', :path => '../node_modules/lottie-ios'
pod 'lottie-react-native', :path => '../node_modules/lottie-react-native'
pod 'TouchID', :path => '../node_modules/react-native-touch-id'
pod 'RNVectorIcons', :path => '../node_modules/react-native-vector-icons'
platform :ios, '11.0'
# target 'projectnameTests' do
# inherit! :search_paths
# # Pods for testing
# end
end
post_install do |installer|
installer.pods_project.targets.each do |target|
if target.name == 'react-native-google-maps'
target.build_configurations.each do |config|
config.build_settings['CLANG_ENABLE_MODULES'] = 'No'
end
end
if target.name == "React"
target.remove_from_project
end
end
end
In my library search paths i have:
$(inherited)
$(BUILD_DIR)/${CONFIGURATION}$(EFFECTIVE_PLATFORM_NAME)
"${PODS_ROOT}"
Any ideas would be greatly appreciated. Thanks.
Not a perfect solution...but resolved this by removing and re-adding everything under 'Linked Frameworks and Libraries' in XCode build settings.
I'll close this, but if anyone else has this issue, reply here or PM - happy to help.
I have followed the cocoapods instructions faithfully: Podfile is:
# Uncomment the next line to define a global platform for your project
# platform :ios '9.0'
target 'SquareTesting' do
# Comment the next line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
# Pods for SquareTesting
pod 'Firebase/Core'
pod 'Firebase/Auth'
pod 'Firestore', :podspec => 'https://storage.googleapis.com/firebase-preview-drop/ios/firestore/0.7.0/Firestore.podspec.json'
pod 'SquarePointOfSaleSDK'
end
I performed pod update and pod install --repo-update also, and the message: Using SquarePointOfSaleSDK (3.3.1) appeared in the verbiage.
The "SquarePointOfSaleSDK" pod appears in the list of installed pods in the file navigator.
Any suggestions would be much appreciated!
After struggling one whole day, I gave up and use
#import <SquarePointOfSaleSDK.h>
instead of
#import SquarePointOfSaleSDK;
It works, however I want to know what is the best way to fix this issue.
I have setup my library cocoa pod setup and set it on git now i am trying to install it with pod but it gives me following error
Unable to find a specification for ‘pod name’
any one have any idea about this error and why pod not install.
Check in your Podfile for the target, target should be same to your project name
Sample
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '9.0'
target "Project name" do //check here "Project name" should be same to your project name
pod 'GoogleMaps'
end
Looks like you have problems setting up your Specs,Likely same issue to https://github.com/CocoaPods/CocoaPods/issues/6444
The solution is as follows, enter the following command in the terminal:
rm -rf ~/.cocoapods
pod setup
After successful execution, pod install or pod update
I am add AdMob to my app in Xcode 8.2 using Objective-C, and I get the following error when I try to build and run:
ld: library not found for -lGTMOAuth2
clang: error: linker command failed with exit code 1
error screen
Cocoapods was used to load the necessary libraries in the app as follows:
platform :ios, '10.0'
pod 'Firebase'
target 'Prept' do
pod 'Firebase/Core'
pod 'Firebase/AdMob'
pod 'Firebase/Analytics'
pod 'Firebase/AppIndexing'
pod 'Firebase/Auth'
pod 'Firebase/Crash'
pod 'Firebase/Database'
pod 'Firebase/DynamicLinks'
pod 'Firebase/Invites'
pod 'Firebase/Messaging'
pod 'Firebase/RemoteConfig'
pod 'Firebase/Storage'
end
Where am I missing the error?