1

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.

Error Log

Mihriban Minaz
  • 3,043
  • 2
  • 32
  • 52
Riddhi Shah
  • 733
  • 4
  • 11
  • 25

2 Answers2

0

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.

NightFury
  • 13,436
  • 6
  • 71
  • 120
0

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.

Community
  • 1
  • 1
mszaro
  • 1,362
  • 1
  • 13
  • 25