Has anybody been able to compile and link Parse and AdMob in One iOS Binary?I get linker errors either from Parse or from AdMob depending on build settings.
Your help is much appreciated.
AdMob requires the -ObjC linker flag :"This flag causes the linker to load every object file in the library that defines an Objective-C class or category".
Parse has removed the Facebook SDK from its framework which generates the linker errors when the project is compiled with the -ObjC flag that AdMob requires.
I don't know of a way around AdMob's dependence on the -ObjC flag. I'm not a linker guru.
The solution Parse recommends is to add the Facebook SDK to your project. I don't know of a workaround to this either if you don't plan to use Facebook.
Parse has a support discussion here: https://www.parse.com/questions/i-dont-want-to-use-facebook-in-my-app
Update: I tried replacing -ObjC linker flag with -forceload of the AdMob library. However, I got the AdMob crash. It's the same one you get with the missing -ObjC linker flag. Any linker experts know how to replace the -ObjC with something that targets only the AdMob library?
Update 2: I needed to revisit this after upgrading to XCode 6, iOS 8, and a new version of adMob. I got it to work by using this -force_load:
-force_load $(SRCROOT)/.../GoogleMobileAdsSdkiOS/libGoogleAdMobAds.a
In my case, I have adMob installed inside of subfolders of my project source. Just substitute ... with your relative path to the adMob SDK.
Looks like following flag solve the problem:
-force_load Libraries/GoogleAdMobAdsSdkiOS-6.8.0/libGoogleAdMobAds.a
Related
I have a problem with xcode build setting.
I'm trying to add Firebase Analytics to my project by using SPM.
For now on, I'm using "-force_load" option for "Other Linker Flags"
because I have to add some external frameworks and libraries in my project.
But when I trying to add Firebase Analytics by SPM, Firebase Docs specifies that
I have to set a "-ObjC" option in "Other Linker Flags".
If I follow that description, I'm facing duplicate symbols error.
What I have done for solving this problem is:
"GCC_NO_COMMON_BLOCKS": "NO",
switch "-force_load" to "-all_load"
just set "-ObjC"
all of those doesn't work for me.
Is there any solution for this situation?
or
Can I use both -ObjC and -force_load options together?
I'm expecting that I don't need to change any code in my external libraries and frameworks,
is this possible?
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.
I'm developing an app, i was using mapKit to handle my maps, but now I'm switching to GoogleMap, but i'm having a lot of issues and i don't know how to fix this...
Framework: GoogleMapsM4B.framework /GoogleMaps.bundle
Flag: -ObjC
Xcode 7
Swift
Any idea?
Thank you!
OK, let me answer this.
I did a few errors with this thing, i was including extras "parse frameworks", and i forgot some parts of the Parse Documentation:
If you're using the -ObjC linker flag required by some third-party
libraries, add these as well:
Accounts.framework
Social.framework
Google Map needs -ObjC flag
The extra frameworks that i was including along with Parse:
ParseFacebookUtils.framework
ParseUI.framework
ParseCrashReporting.framework
Now i removed the extras frameworks and everything is working!
Thanks!
i'm getting the error in the paypal integration.i download the sdk from this link paypal SDK
but i'm getting this linker errors
Add the following frameworks
1)Security.framework
2)libxml2.dylib
3)libz.1.2.5.dylib
1.Add necessary frameworks and
2.goto target->Build Setting in that
2.1.add -lc++ -ObjC to Other Linker Flags.
2.2.set YES in Enable Modules (C and Objective-C).
2.3.set YES in Link Frameworks Automatically.
Finally clean &build your project.
I have an existing iOS app that is using Google Mobile Ads SDK (v 5.0.5, I believe). I need to upgrade it to the latest version for DoubleClick support. However, I'm getting linker errors.
My steps were as follows:
Remove file references for previous SDK from project
Remove previous libGoogleAdMobAds.a linked library
Follow the setup instructions (to the letter, including the required frameworks, including only the specific files, as well as adding the Other Linker Flag)
The specific error is:
Undefined symbols for architecture i386:
"_CGSizeFromGADAdSize", referenced from
or
"_kGADAdSizeBanner", referenced from
What else am I missing?
Maybe you need the -all_load linker flag option too? According to this article it's obsolete for newer ARM7 targets, but perhaps you have an old target?
http://vntin.com/feeds.feedburner.com/blogspot/LTiVe
See under this section: "Support for armv7s"
"If you’re targeting the armv7s architecture, you will not need to add the -all_load linker flag to your projects anymore. "
[Update]
You can try to verify what's in the lib*.a file by using the nm command.
nm -U libGoogleAdMobAds.a | grep kGADAdSizeBanner
Also, clicking on the Log Navigator may provide some additional information. Select the last icon then your last build in the left nav.
[Update 2]
Someone on this site also complained about a linker problem with the new API. Might have to make small changes to your code.
http://www.monkeycoder.co.nz/Community/posts.php?topic=1246
Something has changed in the latest AdMob SDK. I get the same linker error. I can use an older version of the SDK and this all works fine. Anyone know what could have changed with Ad sizes?
EDIT: Found the problem. There were some name changes to constants :)
https://developers.google.com/mobile-ads-sdk/docs/ios/intermediate
Change the GAD_ ad sizes with:
kGADAdSizeBanner.size.width and kGADAdSizeBanner.size.height