Is there any alternative to add Tealium library without using -all_load linker flag in iOS

Rookie Contributor
We use multiple 3rd party libraries in our app and as we don't own the source code for them it is hard to control what is included in them. Due to this we end up with duplicate symbol issues when we use "-all_load" option in other linker flags. Tealium documentation states that we should add -all_load to compile the app. Is there any other alternative. We've been able to build to simulator without this flag but when we generate IPA for deploying to devices using xCode 5.1 we get some errors in our libraries that compile without adding Tealium library. We tried using -force_load option get the same issues. The same workspace compiles fine in both Simulator and for Device in xCode 5.0.2. Same code fails to compile for device when using xCode 5.1. I'm wondering what is the right way to add Tealium library without including -all_load option? From the documentation it appears to increase the app size as well which we want to avoid if possible.
4 REPLIES 4

Is there any alternative to add Tealium library without using -all_load linker flag in iOS

Employee Emeritus
Hey Anil, What version of the library are you working with? The iOS 3.1c (Compact) version does not require the "-all_load" option. And to clarify, you're getting errors when you compile your project on 5.1 without our Libraries? I'm not sure if we can be much help in that case. If you meant to say that the project does not compile onto a device with 5.1 with our libraries, then are you deploying for iOS 5.0+? If so, there is a known bug with XCode 5.1 that will misidentify a public API as a private API and will prevent a releasable build. The only solution that bug is target iOS 6.0+, use a prior version of XCode, or wait for Apple to release the next version of XCode.

Is there any alternative to add Tealium library without using -all_load linker flag in iOS

Rookie Contributor
We are using 3.1 version. We only support iOS6.0 or greater. We can compile the project without tealium libraries in Both xCode 5.0.2 and xCode 5.1 for both Simulator and iOS Device. We add tealium libraries then build fails for iOS Device in xCode 5.1. It runs and builds fine for iOS Simulators. Same workspace and project files compile and run fine on device with xCode 5.0.2. Errors do not indicate any symbols from Tealium SDK rather some other 3rd party static library we use in our app. Error: Reference to symbol (which has not been assigned an address) cstring in '_speex_bits_read_whole_bytes' from /Users/XXXXXXX/xcode_build_output/Build/Products/Test-iphoneos/libXXXXXXXX.a(bits.o) for architecture armv7). We remove tealium libraries and project compiles fine and deploys fine on device using xCode 5.1.

Is there any alternative to add Tealium library without using -all_load linker flag in iOS

Employee Emeritus
Do the other libraries have exception tracking / handling? On iOS only one library or the application itself can handle exception tracking. If so, add the "TLDisableExceptionHandling" option to options argument of our "initSharedInstance:profile:target:options:" init method. If that does not work, I recommend trying the 3.1c Compact library to determine if it may be the autotracking system that's conflicting with one of your other libraries.

Is there any alternative to add Tealium library without using -all_load linker flag in iOS

Rookie Contributor
Thanks Jason for your help. It appears that this a bug with xCode 5.1. We built the same workspace with xCode 5.1.1 and no issues.