Firebase, Fabric, & Crashlytics with -ObjC linker flag without Cocoapods iOS - ios

Trying to add Firebase Messaging to my iOS app that already has Fabric/Crashlytics and I am trying to add it without Cocoapods.
I followed the readme instructions in the Firebase SDK zip file and once I add the -ObjC linker flag to the target, it causes a duplicate symbol compile error for Fabric/Crashlytics
I then found out to use -force_load and pointed it to the Firebase.h file. This allowed me to compile, but when trying to FIRAPP.configure() it came up with this error:
2016-11-30 14:33:31.862 Parents[243] <Debug> [Firebase/Core][I-COR000001]
Configuring the default app.
2016-11-30 14:33:32.029 Parents[243:24612] +[NSData gtm_dataByGzippingData:error:]:
unrecognized selector sent to class 0x3159a53c
Has anyone ever experienced this before? Please note I am not using Cocoapods for all three.

I actually had the same exact problem. My awesome coworker suggested to update Fabric and Crashlytics to the latest and it worked. Try that!

Related

Setting clientID for GIDSignIn in iOS app crashes

I try to use GIDSignIn in my iOS app (ObjC). But when I do
[GIDSignIn sharedInstance].clientID = GID_SIGN_IN_KEY;
in my app-delegate, I get and error unrecognized selector sent to instance.
I'm using cocoapods to load the framework
pod 'GoogleSignIn'
pod 'GTMAppAuth'
pod 'AppAuth'
I configured the URL-scheme in my info.plist as described in the docs.
I'm building the app for iOS 14.
As suggested in countless posts on the web, I load libz.tbd, SystemConfiguration.framework, StoreKit.framework, AddressBook.framework and I set -ObjC in my other linker flags.
Alas, I'm still getting this error.
Any Ideas?
So, it turns out the Google docs for the Youtube-API are outdated (again).
I had to use dependencies (github) instead of the pod-version of GIDSignIn. Then the signup-process worked.
Uploading a video was another pain in the a** since the docs use an outdated version of the GIDGoogleUser…
I will spare you my rant on Google now…

Getting error: ld: framework not found Fabric for architecture armv7 in App

I have build a iOS framework eg: abc.framework. Now in abc.framework I have added FirebaseDatabase and FirebaseMessaging. The abc.framework compiles and builds properly. However when I add the abc.framework and abc.bundle in my iOS project eg: xyz.project then it is giving error "framework not found Fabric for architecture armv7". I have not added Fabric in abc.framework and not in my xyz.project. However when I remove the Firebase from the abc.framework then the error disappears from xyz.project and the project compiles and run without errors.
If anyone has encountered the same issue then please let me know how should I solve the issue. I have to integrate Firebase in abc.framework and that framework will be added in xyz.project
Nested frameworks are not allowed in IOS , it's only allowed in MacOSX , to create a frameWork it must be of a pure code , fabric is in Firebase , also framework must support all architecture armv7,64 and soon on this configured when you build it, I encountered the same situation posted in Apple forums and find that
If CocoaPods is an option for you, the recent CocoaPods 1.4.0 release has added the static framework podspec option, which enables the definition of static frameworks that allow depending upon other static frameworks like Fabric.

Duplicate symbols for architecture x86_64 using Google Sign-In SDK 4.0.1

I was stuck with this error from the past 2 days. Please Ignore if this question already exists as I don't found any solution I am posting this.
In my project I have integrated google maps sdk that is working fine. Presently i am using o-Auth request for gmail sign in, Now I want to implement Google Sign-In SDK 4.0.1.
My project was building with out errors before copying it. I followed the steps that are given in this link to copy sdk to my app. I was getting this error
ld: 108 duplicate symbols for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I use the following solutions still can't fix it:
Build Options -> Enable Bitcode -> set "No".
Remove -ObjC from Other Linker Flags.
project Target -> Build phases -> compile sources, ckeck no
duplicate files.
Make sure I haven't #imported a .m file.
Deploytarget is 6.0
Checked all solutions but didn't worked me ...Can any one suggest me how to fix this?
I have also faced same issue in implementing Google Sign-In SDK. I have not found any solution to it. But to solve this issue follow these steps.
Either you should use CocoaPods and follow the documentation you will not get these error.
If you are not using CocoaPods, then in that case follow the 'Demo Project' that comes with Google Sign-In SDK. Use all the frameworks that are used in this 'Demo Project' and also add the required libraries as in project.
Don't forget to add linker flag.
Note : I know this is not the solution, but i had to follow the 'Demo Project' to solve this issue.
For me, this error happened because somehow CocoaPods appears to have duplicated a GTMOAuth2ViewControllerTouch.m file, creating a GTMOAuth2ViewControllerTouch 2.m file and including it in the project.
pod update did not resolve. I manually deleted the file and the issue went away. After another pod update, the issue did not reappear.

Integrate AppLovin With swift xcode 6.4

I want to integrate AppLovin With Xcode 6.4 and swift. I am Following the steps which are given in Documentation. I have added Headers and libAppLovinSdk.a Library in my project. Then I have added all the frameworks which are needed and added AppLovin SDK key into info.plist file. Then I have initialized ALSdk.initializeSdk() in Appdelegate.h file and I have added Bridging file in my project. Then I wrote -Objc in "Other Linker Flags"
I am getting this error
ld: 150 duplicate symbols for architecture i386 clang: error: linker
command failed with exit code 1 (use -v to see invocation)
EDIT:
This is the error log.
Based on the linker errors (duplicate symbol _llvm.embedded.module) as well as the fact that you're using an older Xcode version, it may likely be a conflict/mismatch between the target/compiler of your project and the dependency. This isn't inherent to AppLovin, but can happen if the static library you're using is far too new or old for your Xcode version.
One possible occurrence of this is that we started compiling the library with Bitcode support, and I wouldn't be surprised if older versions of LLVM don't play nice with that.
I'd recommend pulling the latest version of libAppLovinSdk.a, and if at all possible, building using Xcode 7+.
Additionally, if you're using some dependency manager like Cocoapods or Carthage, you may have better luck directly (manually) integrating, given that they are maintained by third parties with no involvement from us.
You are initializing SDK at wrong place. At the time of didFinishLaunchingWithOptions: call, application has not been fully prepared. Try initializing it in method:
-(void)applicationDidBecomeActive:(UIApplication *)application
Also include -ObjC flag. It should solve duplicate symbols issue.

Parse API 1.6.4 - cannot build project

I downloaded the new iOS Parse API (1.6.4) and tried to build my project. When I do, I get this error:
Undefined symbols for architecture arm64" "_BFTaskMultipleExceptionsException", referenced from:
___53+[PFObject(Private) deleteAllAsync:withSessionToken:]_block_invoke214 in Parse(PFObject.o)
___65+[PFObject(Private) _deepSaveAsync:withCurrentUser:sessionToken:]_block_invoke311 in Parse(PFObject.o)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Screenshot:
Temporary workaround for Parse 1.6.4 and Facebook SDK 3.23:
Add to your AppDelegate.m or another class following constant after imports and before implementation section:
NSString *const BFTaskMultipleExceptionsException = #"BFMultipleExceptionsException";
#interface IPAppDelegate ()
#end
#implementation IPAppDelegate
It should solve the problem until it'll be solved on Parse/Facebook side.
--
Update: This solution is only for Facebook and Parse SDK versions that listed above and these versions right now are outdated.
New Parse SDK 1.7.4 works correct with new Facebook SDK 4.0 and there shouldn't be such a problem.
I was able to figure out the URL for anyone that needs Parse iOS v1.6.3.
https://parse.com/downloads/ios/parse-library/1.6.3
I can confirm that everything compiles properly using 1.6.3.
Placing
NSString *const BFTaskMultipleExceptionsException = #"BFMultipleExceptionsException";
in the App Delegate as suggested by Sergey Surkov in between the imports and the implementation and then adding libstdc++.6.dylib in build phases worked for me. Please also view https://stackoverflow.com/a/27628797/1036945
I've had the exact same problem using the latest SDKs from Parse (1.7.4) and Facebook (4.2.0). The problem is caused by the Bolts.framework included in both Parse and Facebook SDKs. For some reason the Bolts framework in Parse is always newer than the one included in the Facebook SDK.
After many-many attempts at installing, removing and re-installing these SDKs, using the drag and drop method and via Cocoapods, I finally managed to overcome this issue by undertaking the following steps:
I removed completely any instance of the Parse, Facebook and Bolts frameworks from my project;
I re-added the FBSDKCoreKit framework (and the ShareKit and LoginKit for the needs of my project) following the steps on the Facebook developer page: https://developers.facebook.com/docs/ios/getting-started/
Make sure NOT to copy the items to your project.
I re-added the Parse framework to the project using the drag-and-drop method. I also added the ParseFacebookUtilsV4 framework because I needed it to create users via Facebook Login.
This was the most important step that solved everything: I added the Bolts.framework provided by Parse by dragging it to the project, but making sure NOT to copy it to the project (just like with the FBSDKCoreKit framework, I deselected the "Copy items into destination group's folder." option. If you copy it to the project folder, the project won't build.
These steps finally solved all my problems.
if you are using cocoapods try pod update Bolts
EDIT2: FacebookSDK Update 3.23.2 resolves this issue and includes Bolts 1.1.4: https://developers.facebook.com/resources/facebook-ios-sdk-3.23.2.pkg
EDIT:
Drop -ObjC "Other Linker Flag" from your Build settings.
Bolts.framework is not necessary with Parse if Facebook SDK is integrated.
As of Facebook iOS SDK 3.14 bolts.framework is included. https://developers.facebook.com/docs/ios/upgrading-3.x
Try removing your manual instance of bolts.framework.
Just to put the record straight.
The issue is caused because of a conflict with the Bolts framework between the Facebook SDK Bolts and the Parse bolts framework. A temporary solution to get around this issue is to use Cocoapods for your Facebook SDK dependency which will help while a fix is worked on.
The bug has been acknowledged by Facebook & is being assigned to the appropriate team for fixing.
Please follow https://developers.facebook.com/bugs/383331175179417/ for the updates.
make sure the facebook sdk framework and bolts framework (comes with fb sdk) is imported into your project.
i got similar error ("...is not a dylib" and "Undefined symbols for architecture") because i dragged the whole parse folder ("parse-library-1.7.4-2") into my xcode project, when i should have dragged only the frameworks i needed ("Bolts.framework" and "Parse.framework"). deleted the parse folder, dragged over the two frameworks, then everything works as expected :)
I had the exact same problem. Updating Bolts to 1.1.4 solved it for me (Bolts was 1.1.3 before).
If you use cocoapods, change or add this line to your podfile
pod 'Bolts', '1.1.4'
If not, just download it here : https://github.com/BoltsFramework/Bolts-iOS/releases
Try downloading the latest SDK and replacing all of the Parse frameworks with the latest version.

Resources