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'
Related
Its frustrating seeing this error every time i use cocoa-pods. The only thing that works with cocoa-pods is 'Firebase SDK' but when i install any other framework such as JSQMessages or Eureka forms or any other framework i got an error 'No such a module" ... Its not the first time I work with these frameworks I did before and it was working correctly in fact I still got my previous projects installed with JSQMesgs, eurka..etc and its working fine till now. For the new projects it doesn't work/import in xcode anymore it is frustrating that I can't run it with this error ... not sure if its xcode or the cocopods .. I have tried instaling using terminal then uninstall and reinstall again with cocoapods application. I cleaned my build, change deployment target several times, and nothing worked so please if any one could share the same problems faced or advice me on how to avoid them or any alternatives to cocoapods.
deployment target 10.3 my xcode version 8.3.3 swift 3 macOS Sierra 10.12.5
# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'
target 'FinalProject' do
# Comment the next line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
# Pods for FinalProject
pod 'Firebase/Core'
pod 'Firebase'
pod 'FirebaseAuth'
pod 'FirebaseDatabase'
pod 'FirebaseStorage'
pod 'ProgressHUD'
pod 'JSQMessagesViewController'
pod 'Eureka'
pod 'Former'
pod 'SwiftForms'
end
Please help.
Build the project.
The Xcode editor doesn't recognize modules coming from the Pods until after they've been built for the first time.
If that doesn't work for you, please share a screen shot of the issue, or even better, a reproducible example.
I had the same problem trying to work with SwiftyStoreKit.
I finally manage to solve my problem and hope that sharing the solution will help someone.
I tried everything was suggested until I realised that I was loading the pod in the wrong target, (in the pod file itself.)
After I repaired the pod file, run again pod install, and, voila, the xcode recognised the pod.
I seem to have a issue with my project settings, in Xcode 8. The issue is as follows:
When adding a new Pod - lets say, Pod Firebase - the install works, and adds the necessary files to my project. I can then, do #Import Firebase
All is fine, up to this point. However, as soon as I make a reference to the Firebase API example: [FirApp configure]; - all is still fine - autocomplete on Xcode works as expected and no issues. However, when building I then get a compile time issue which states:
Undefined symbols for architecture arm64:
"_OBJC_CLASS_$_FIRAppIndexing", referenced from:
objc-class-ref in AppDelegate.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
The only way I am able to solve this - is by manually adding the _FIRAppIndexing.framework in my projects, Build settings, under Link Libraries with Libraries
To do that, I just drag and drop the frame work from the project navigator to the correct section under link libraries.
This works sometimes; as with other parts of the Firebase SDK, I get runtime crashes.
So, to try get to the root cause, I created a brand new test project, installed the Pods using Pod install - I however did not have to add the framework manually to Libraries - its actually not even listed there.
Everything in the test project worked just fine, at compile and run time.
Which leads me to believe its something in my project settings that's causing this.
Things I have tried
Removed cocoapods completely with pod deintegrate and removed all
other traces of it. Then did a clean build. Then Pod install
Added -objc to linker flag
Podfile
# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'
target 'MyApp' do
# Uncomment the next line if you're using Swift or would like to use dynamic frameworks
use_frameworks!
# Pods for MyApp
pod 'Crashlytics'
pod 'AsyncDisplayKit', '>= 2.0'
pod 'Firebase'
pod 'Firebase/Messaging'
pod 'FBSDKCoreKit'
pod "HockeySDK", :subspecs => ['AllFeaturesLib']
pod 'Fabric'
pod 'FirebaseAppIndexing'
pod 'AFNetworking', '~> 3.0'
pod '1PasswordExtension', '~> 1.8.4'
target 'MyAppTests' do
inherit! :search_paths
# Pods for testing
end
end
GitHub example project
https://github.com/TanderZA/MyApp
I duplicated my current project - and removed all files. Problem still exists. You will see the project won't compile due to linker errors, with references to the Firebase AP.
By manually adding the frameworks to Link Libraries with Libraries, you will see that it should compile. But that is not how it should work. The current project has an issue with infoPlist.strings that I did not solve. But the project is in the state to demonstrate the issue.
I have checked the project, it seems you have messed up with schemes.
Create a new scheme properly then install the pods again and as the project is in Obj-C you don't need to enable frameworks in the podfile.
So comment like # use_frameworks!
Also update the pods using pod update
Then select the new scheme and build the project in it.
Let me know if you are not able to do it.
It is a xcode bug by the way
But try this :
Upgrade to latest version of xcode and Pods
Remove all architectures in your project
Clean your project
Add arcitectures from start.
This should resolve the issue.
Have you tried to use frameworks?
# platform :ios, '10.0'
use_frameworks!
target 'MyApp' do
I am not sure though but I think what you need is pod 'Firebase/Core'. not pod 'Firebase'.
This link have the list of the Firebase framework that can be used.
And, in the video on the top of the page it says something about there is no single pod that can be installed and you need to set each one of them on the podfile depending on the features you want.
My guess they mislead us in some places where they had pod 'Firebase'. I dont think that they meant that it should do the work.
som try the following:
# Pods for MyApp
pod 'Firebase/Core'
pod 'Firebase/Messaging'
.
.
I know that you said that you had it work on another new project.
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.
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).
I am integrating 3rd party libraries into my project using cocoapods. Everything was working smoothly but when i try to integrate facebook ios sdk I encounter a very strange issue, my pods project has the following warning:
If i click on it i get the following dialog:
I checked the Headers in the build phases part of the target "Pods-Facebook-iOS-SDK". Every header file is repeating:
When i try to build my project it fails because it is not able to find "FacebookSDK/FacebookSDK.h".
My last option is to just integrate facebook sdk manually and not use cocoapods for it but I dont want to take that route and for the life of me I cannot understand what I am doing wrong. For refrence following is my pod file:
platform :ios, '7.0'
pod 'DTCoreText'
pod 'UIView+AnimationExtensions'
pod 'EZAudio'
pod 'MZTimerLabel'
pod 'AWSAutoScaling'
pod 'AWSCloudWatch'
pod 'AWSCore'
pod 'AWSDynamoDB'
pod 'AWSEC2'
pod 'AWSElasticLoadBalancing'
pod 'AWSKinesis'
pod 'AWSS3'
pod 'AWSSES'
pod 'AWSSNS'
pod 'AWSSQS'
pod 'AWSSimpleDB'
pod 'Facebook-iOS-SDK'
Following is the information regarding my developement environment:
XCode: 6.1
Architectures: armv7, arm64
Base SDK: iOS 8.1
I was having a similar problem. My project previously had not used Cocoapods and I was now attempting to add the Facebook SDK via Cocapods.
Based on #MingLi's comment, I replaced all instances of #import <FacebookSDK/FacebookSDK.h> with #import <FBSDKCoreKit/FBSDKCoreKit.h> and things started working again.
When I compiled in Xcode, it showed me files that need #import <FBSDKLoginKit/FBSDKLoginKit.h> and #import <FBSDKShareKit/FBSDKShareKit.h>
You will also likely have to go through and adjust things that changed between Facebook SDK 3.x and 4.x. For instance, I had to replace [FBSettings setDefaultAppId:123456789] with [FBSDKSettings appId:123456789] and replace [FBAppEvent activateApp] with [FBSDKAppEvents activateApp].
Xcode is sometimes helpful about finding the needed change, if you compile and then click the red dot (in your code) next to each compile error.
It can take a good bit of work to sort through all of the changes, you may have to recompile many times.
If you are having problems figuring out how to replace specific functions/classes when upgrading from SDK 3.x to 4.x, you can refer to Facebook's Change Log:
https://developers.facebook.com/docs/ios/change-log-4.x
You can also find additional information here:
https://developers.facebook.com/docs/ios/getting-started