First of all, I am aware of questions similar to this one but none of them refers to my problem. I am using Xcode 7 beta 6 and cocoapods.
This is my Podfile:
platform :ios, '8.0'
use_frameworks!
target 'Alfred' do
pod 'PaymentKit', :git => 'https://github.com/stripe/PaymentKit.git'
pod 'SDWebImage', '~>3.7'
pod 'Parse'
pod 'FBSDKCoreKit'
pod 'FBSDKLoginKit'
pod 'ParseFacebookUtilsV4'
pod 'Fabric'
pod 'Crashlytics'
end
When compiling for the simulator, all works fine, but when compiling for a real device (iPhone 6 with iOS 9 beta) I got the following error code:
'/Users/username/projectpath/Pods/ParseFacebookUtilsV4/libParseFacebookUtilsV4Lib.a(PFFacebookUtils.o)' does not contain bitcode. You must rebuild it with bitcode enabled (Xcode setting ENABLE_BITCODE), obtain an updated library from the vendor, or disable bitcode for this target for architecture arm64
I have alredy enabled the flag ENABLE_BITCODE and it still shows the same error. Also I tried cleaning and rebuilding the project again.
You actually need to DISABLE bitcode for those libraries that do not support bitcode yet.
The error is saying please link your static lib that has been compiled for bitcode. Since you probably don't own the cocoapods libs you need to just disable bitcode support for those libraries in your project.
If you want the quick and dirty, just disable bitcode for your target (seen below). But you can more granularly pick and choose to disable bitcode for the libraries giving you trouble as well (more responsible choice).
Related
Having a react-native project, which won't build on target "Staging" since I've setup cocoapods and using xcworkspace file since then (needed for firebase integration of react-native-firebase). When trying to build for taget "staging", I'll get this error:
ld: library not found for -lPods-[app]
clang: error: linker command failed with exit code 1 (use -v to see invocation)
It works on debug, and (well at least it doesn't throw an error) when I archive the project.
I've having a "staging" target because of code-push. Using react-native at version 0.48.4 and Xcode 9 (created it following this guide, but before using cocoapods)
My podfile:
platform :ios, '9.0'
target 'xx' do
#use_frameworks!
# Pods
pod 'Firebase/Core'
pod 'Firebase/Analytics'
pod 'Firebase/Database'
pod 'Firebase/Messaging'
pod 'Firebase/Auth'
pod 'Firebase/Storage'
end
Tried with and without use_frameworks!, cleaning project, deleted DerivedData, deintegrating and reintegrating pods.
What could cause this? (Please tell me if you need more information)
What worked for me:
Deintegrated all pods using pod deintegrate (using enter link description here)
pod install
Removed [Project name] > Frameworks > Pods_[Project name].framework (which was red, but there are actually more files being red)
Build succeeded
Was doing this with the help of this post. Thanks also to Maurice for trying to help me.
I had this issue. In my case it was a react-native app added Firebase Analytics. As of July 2018, all apps must be built with iOS 11 per Apple: developer.apple.com/ios/submit/
Once I went to my General tab and scrolled down to Deployment Info / Deployment Target and changed it from 10.x which is what I was targeting, to 11.x - the app built/archived and I was able to submit.
Set your PODS_CONFIGURATION_BUILD_DIR of "staging" as "release" ${PODS_BUILD_DIR}/Release$(EFFECTIVE_PLATFORM_NAME).
Check the Frameworks folder and remove red files.
check whether the SEARCH_PATHS is correct at Pods-XXXX.debug.xcconfig or Pods-XXXX.release.xcconfig
LIBRARY_SEARCH_PATHS = $(inherited) "$(PODS_ROOT)/path/to/your folder"
I know there are many related questions about "framework not found FirebaseAnalytics". I have spent time on these related questions and tried the solutions suggested by others but in vain. So I have to ask again there and hope anyone can help me.
My problem is that i'm able to use Firebase SDK(IOS) installing by CocoaPods since Xcode 7. However once I upgraded to Xcode 8.1, I cannot compile my project anymore. It keeps showing the error:
ld: framework not found FirebaseAnalytics clang: error: linker command
failed with exit code 1 (use -v to see invocation)
Only when I remove the firebase in the pods can I build the project successfully. Also, it comes to my nightmare that i'm unable to install google analytic SDK because the same error message comes again.I think it is because google now combines the firebase in their SDK.
Here is what I tried from the results I found from other posts in Stack-overflow.
Open the workspace rather than xcode project
Adding $(inherited) in framework search path
Remove the CocoaPods project from xcode and re-install again
Update the Xcode's CocoaPods project
Adding use use_frameworks!, this will create error of #import"XXX" and #import not found
Delete red framework in Linker Binary with Libraries
My Xcode version is Version 8.1
Here is my pod setting:
platform :ios, '8.1'
def testing_pods
pod 'AFNetworking', '~> 3.0'
pod 'AWSMobileAnalytics', '~> 2.4.1'
pod 'AWSSNS', '~> 2.4.1'
pod 'Google/Analytics'
pod 'Firebase/Core'
end
target 'project' do
testing_pods
target 'project_test' do
inherit! :search_paths
end
end
target 'project_Dev' do
testing_pods
end
Hope someone can help me otherwise I have to migrate this old project to a new one.
SOLUTION
ok so while the suggested answer helped to find a solution, this required some work. So I will describe my recipy if that helps.
My compilation problem was probably due to a mismatch between frameworks versions. While some frameworks were injected manually, some others were added using pods. This might have caused the problem and my project wasn't compiling for all simulators.
To overcome this, I deleted all residual frameworks and added them back using pods. However, this was not plug and play. Im using xcode 6.3.x (working with Swift 1) and there were semantic issues while using updated pods.
here is my working recipy:
# Uncomment this line to define a global platform for your project
platform :ios, '8.0'
# Uncomment this line if you're using Swift
use_frameworks!
pod 'GoogleMaps'
pod 'Parse', '1.9.1'
pod 'ParseUI'
pod 'ParseFacebookUtilsV4', '~> 1.9'
pod 'ParseTwitterUtils', '~> 1.9'
pod 'FBSDKCoreKit'
pod 'FBSDKLoginKit'
full project is now compiling for all simulators.
QUESTION
I was working on an app which was building for all simulators until I added pods in order to integrate Google Maps SDK. Using this framwork, in addition to Parse SDK, required to add Facebook SDK and some libs. this was the starting point of my problem as there was a conflict with the -ObjC flag
Since then, my project is building fine for most simulator, except for iphone 4S, iphone 5 and some ipads. The returned error is the following:
Library compilation and build architectures are really new so I was wondering if this was only a simulator issue or if my problem would persist when building .api ? I would need to ensure everything would work as expected on devices going from iphone 4S to 6+
my valid architecture are the following: arm64 armv7 armv7s
Could someone guide me toward the understanding of what's happening?
I would be really happy to provide any additional information you may require to help me. Thanks you!
The Parse framework that you include in the project is built for 64 bit MacOSX.
I suggest you add Parse pods to your Podfile
pod 'Parse'
pod 'ParseUI'
pod 'ParseCrashReporting'
enter image description herewhen I am installing pod file for latest parse sdk by using the below syntax in podfile:
pod 'Parse'
pod 'Facebook-iOS-SDK'
pod 'ParseFacebookUtils'
pod 'ParseFacebookUtils'
pod 'ParseFacebookUtilsV4'
Getting error like ld: library not found for -lPods
Please help me.
Your podfile should have platform same as set in your Project target->General-> Deployment Info.
Like if deployment info is set to be 9.0, then add the line to your podfile.
platform :ios, '9.0'
This problem could happen in the latest React Native 0.63, which I had just experienced. RN 0.63 required iOS 10 or higher. The solution is just platform :ios in Podfile to 10 or higher.
I was running into this same issue, make sure that every Deployment Target in your project is at least 8.1 for every Project and Target.
This includes Pods > Build Settings > iOS Deployment Target, all Targets there, and your main Project and Targets.
System information: Xcode 7.0.1 w/ iOS 9
The issue i am having is: After adding the GoogleMaps pod (1.10.3) to my podfile, the application builds in Xcode for the iOS Simulator, but not for a device.
The error that occurring is as follows:
ld: '/Users/<username>/Projects/Arsenal/LitterBug/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/GoogleMaps(GMSCachedTile.o)' does not contain bitcode. You must rebuild it with bitcode enabled (Xcode setting ENABLE_BITCODE), obtain an updated library from the vendor, or disable bitcode for this target. for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Every post I have found mentions setting the ENABLE_BITCODE flag to 'No' for the pod target in the Pods project. That would be a viable option, if only to allow development to continue until Google updates the SDK, if the GoogleMaps target was being created in the Pods project.
My current podfile looks like:
source 'https://github.com/CocoaPods/Specs.git'
use_frameworks!
target 'AppName' do
pod "Parse"
pod "SwiftOverlays"
pod "FBSDKCoreKit"
pod "GoogleMaps"
pod "FBSDKLoginKit"
pod "FBSDKShareKit"
end
target 'AppNameTests' do
end
When i run pod install --verbose or pod update --verbose, the 'install targets' phase appears to NOT install the GoogleMaps target in the Pods project. This is indeed confirmed by viewing the project in the workspace.
There IS a target created along-side the other pod targets called 'Pods-appname'. I've tried disabling bitcode for this target, but it did not fix the issue.
If anyone else has experienced this issue, please let me know. The original error i received is currently being tracked as an issue and can be viewed here: GoogleMaps issue 8219
The current workaround requires a GoogleMaps target existing in the Pods project in the workspace.
I solved this problem by Setup Enable Bitcode = NO in Build Settings.
Project>Build Settings>All>Build Options>Enable Bitcode = NO
Just select Pods in PROJECT and set Use Legacy Swift Language Version to YES.