libOmnitureAppMeasurement-iPhoneSimulator.a not linking with iOS4 project - ios

I have a Universal Project for iPad and iPhone running iOS 4.0. xCode 4.x
I follow the steps to include the above library into a new project.
I am getting the following error during linking:
We are getting,
“_OBJC_CLASS_$_OMAppMeasurement”
Ld: symbol not found for architecture i386.
I have other static library in the same project and those are working fine. In addition, I also try messing with Other Linker Flag, Header Search Path, Library Search Path. No luck.
Any idea?
EDIT:
Turns out it is a binary issue, instead of using the binary from developer.adobe.com, I was pointed to another binary and that worked OK for xCode 4.x.

The Omniture omappmeasurement libraries are shipped as separate binaries for the separate architectures, so you have to switch between them as you switch between the simulator and devices. You can join the binaries together with lipo:
lipo -create libOmnitureAppMeasurement-iphoneos-armv6.a libOmnitureAppMeasurement-iphonesimulator-i386.a -output libOmnitureAppMeasurement.a
Then add libOmnitureAppMeasurement.a to your project with 'Add Files to "..."...' in the usual way.
NOTE:
If you download them from this forum post you'll find that libOmnitureAppMeasurement-iphoneos-armv6.a contains both armv6 and armv7 code, and libOmnitureAppMeasurement-iphoneos-armv7.a contains armv7 only. Hence using the 'armv6' version above.

I got new libraries from here https://developer.omniture.com/en_US/gallery/app-measurement-for-ios and they work well on simulator and devices.
You will need to create an account to be able to download it.

These libraries are not any more supported by Apple as they use "uniqueIdentifier".

Related

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.

Upgrading Google Mobile Ads iOS SDK from 5.0.5 to 6.4.2 results in linker errors

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

ld: library not found for -lgcc_s.1 when creating AIR iOS package with native extension

I'm trying to create an AIR native extension for iOS, but when try create the package to deploy to my device, I'm getting the following error:
ld: library not found for -lgcc_s.1
Compilation failed while executing : ld64
Its working when I try to create the app for the simulator. I've tried many combinations of adding libgcc_s.1 to my platform.xml file, creating just a package for iOS, creating a fat binary for both the simulator and the phone, etc.
I'm not sure why it needs the libgcc_s.1 package since I'm not referencing it in my extension. I tried adding it manually to the "Link Binary With Libraries" list in xcode, and at that point it won't build, telling me that libgcc_s.1.dylib doesn't exist on my system.
Do other people have this lib on their system? Does anybody know why it's being added if I didn't ask for it?
I finally solved this after days of searching and testing. Remove the -platformsdk option when packaging for device.

iOS conditional link static library

I have a fat static library compiled for armv7 and i386. In my iPhone/iPad project everything works fine, but i can only install my application on armv7 device so iPhone 3gs and up...
There is a way to run my project on armv6 so i can install it on an ipod touch and an old iphone version (also if i disable the use of armv7 library).
I try this:
#ifdef _ARM_ARCH_7
... //include and use of armv7 library
#else
... //not include armv7 library
#endif
but when i compile my project i have link error...
Command /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/clang++ failed with exit code 1
So there is a way to run my app on all kind of device but link a specific library when compiling for armv7???
Thanks for help!
You need to weak-link that library. Open up build settings and find Other Linker Flags. You need to add two entries, the first is "-weak_library", the second is the path of the library file (you may need to hunt through what's being passed to the linker to find what this is).
They need to be in that order as this list is turned into parameters to the linker in the order they're presented.

How to link an Adobe AIR3 Native Extension for iOS against an iOS framework?

I’m working on an app with an AIR3 iOS native extension that uses Accelerate.framework
Followed the first steps mentioned in the tutorials, successfully created an .ane file etc.
When I run the final packaging command (adt -package -target ipa-test ...), I get the following errors:
ld warning: unexpected srelocation type 9
ld warning: unexpected srelocation type 9
... (repeating several times)
Undefined symbols:
"_vDSP_vsdiv", referenced from: ...
"_vDSP_vsmul", referenced from: ...
... several more like this
ld: symbol(s) not found
Compilation failed while executing : ld64
I guess this is because when I created the .a file in xcode, it couldn’t really link it statically to the Accelerate.framework.
I suppose I need to tell adt to link it somehow? Probably in the phase I’m creating the .ane file? Or maybe I should change my extension.xml file?
No idea. Couldn’t really find it...
Please advise.
UPDATE: This seems like a bug on the Adobe side specifically with Accelerate.framework. I'll keep updating here in case other guys stumble upon this one.
Make sure you are using the latest Flex 4.6 SDK. If that doesn't solve it, ensure you have specified the Apple iOS SDK correctly under the Native Extensions tab of your Apple iOS build packaging in your project settings. It should be
/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk
if you installed Xcode into the default folder
I've had this "srelocation" error, because the included libraries (in my case AudioToolBox/ OpenAL) were treated as shared libraries by XCode: They were not included in my library build (even when it's static). I've had to set "Enable Linking With Shared Libraries" under Build Settings to NO, and then the errors have been gone. Maybe this will solve your problem too...

Resources