Balaso-Software / app-tracking-transparency-for-unity

Later this year Apple will require your apps/games to request user's authorization in order to obtain the Identifier for Advertising (IDFA), used to optimize and maximize your Ads revenue
16 stars 1 forks source link

Xcode build failed. this is a Bug? #1

Closed araimple closed 4 years ago

araimple commented 4 years ago

Log

ld: warning: arm64 function not 4-byte aligned: _unwind_tester from /Users/xxxxxxxxxx/build/6/Libraries/libiPhone-lib.a(unwind_test_arm64.o)
Undefined symbols for architecture arm64:
  "_OBJC_CLASS_$_ATTrackingManager", referenced from:
      objc-class-ref in libAppTrackingTransparency.a(AppTrackingTransparency.o)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
manelizzard commented 4 years ago

Hello @araimple,

Let me ask you some basic questions while trying to identify the issue:

Thank you!

araimple commented 4 years ago

@manelizzard Thank you reply.

Q. Which version of the plugin are you using, 1.0 or 1.1? A. using 1.0

Q. Are you building with XCode 11 or 12? A. Version 12.0 beta 3 (12A8169g)

I Can't build.

manelizzard commented 4 years ago

Thanks for your answers @araimple. Currently the latest version of the plugin is 1.1. Could you please try to update it? We added the fat library for all architectures.

Also, can you please verify you have AppTrackingTransparency and AdSupport frameworks in your XCode project? You might have not there if you used the plugin with Unity Editor version lower than 2019.3

xcode
araimple commented 4 years ago

@manelizzard Sorry for the late response. Thank you for your solution.

After adding these frameworks, xcode can work. but, I found a new error. when I create archive, xcode emit error log.

ld: warning: arm64 function not 4-byte aligned: _unwind_tester from /Users/xxxxxxx/build/3/Libraries/libiPhone-lib.a(unwind_test_arm64.o) ld: bitcode bundle could not be generated because '/Users/xxxxxx/build/3/Libraries/Balaso Software/Plugins/iOS/libAppTrackingTransparency.a(AppTrackingTransparency.o)' was built without full bitcode. All object files and libraries for bitcode must be generated from Xcode Archive or Install build for architecture arm64

Frameworks and Info.plist are correct. I'm using unity 2019.3. Where is the mistake?

manelizzard commented 4 years ago

Thanks for your answer @araimple.

Please, would you update the Assets/Balaso Software/Plugins/iOS/libAppTrackingTransparency asset with the one available in the ZIP file attached?

libAppTrackingTransparency.a.zip

Then, build iOS project again from Unity and you should be able to archive the XCode project.

Please, notice Apple won't allow you to push builds to production until XCode 12 gets out of Beta. You will be able to push to production as soon as XCode 12 gets of out beta.

manelizzard commented 4 years ago

The library inside the plugin has been updated