adjust / adobe_air_sdk

This is the Adobe AIR SDK of
http://adjust.com
Other
24 stars 12 forks source link

Immediately crash on devices older than iOS 14 #56

Closed paq closed 3 years ago

paq commented 3 years ago

Hi,

When including the newest ANE (version 4.22.0), it crashes my app on startup.

Could you please how to support older than iOS 14 devices?

Logs give me this:

Exception Type:  EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note:  EXC_CORPSE_NOTIFY
Termination Description: DYLD, Library not loaded: /System/Library/Frameworks/AppTrackingTransparency.framework/AppTrackingTransparency | Referenced from: /var/containers/Bundle/Application/C163EF57-97E3-4E46-89BA-753ADD9FBF1F/XXXX.app/XXXX | Reason: image not found
Triggered by Thread:  0

Build Environment

AIR 33.1.1.345 macOS Catalina 10.15.7 Xcode12.3

uerceg commented 3 years ago

Hi @paq

What is the iOS version of the device you are running your app with when you see this crash? Does the crash happen with device running iOS 14 as well? Is there a way to get the entire crash log from the device? You csn find your device's crash logs from Xcode when you have it attached to your Mac.

paq commented 3 years ago

@uerceg

Thank you for your reply.

I tested on iPhone6 (OS 12.5).

Does the crash happen with device running iOS 14 as well?

No. I tested on another device (iPad iOS14) not occurs.

Incident Identifier: AC4A8FC5-C551-46F5-8FE0-E1DEB6ECCB57
CrashReporter Key:   7198be4891f22469d8207a9adfc26ce3f481f92c
Hardware Model:      iPhone7,2
Process:             MASKED [1200]
Path:                /private/var/containers/Bundle/Application/C163EF57-97E3-4E46-89BA-753ADD9FBF1F/MASKED.app/MASKED
Identifier:          air.MASKED
Version:             0.1.0 (0.1.0)
Code Type:           ARM-64 (Native)
Role:                Foreground
Parent Process:      launchd [1]
Coalition:           air.MASKED [665]

Date/Time:           2021-01-04 18:30:23.9184 +0900
Launch Time:         2021-01-04 18:30:23.8684 +0900
OS Version:          iPhone OS 12.5 (16H20)
Baseband Version:    7.80.04
Report Version:      104

Exception Type:  EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note:  EXC_CORPSE_NOTIFY
Termination Description: DYLD, Library not loaded: /System/Library/Frameworks/AppTrackingTransparency.framework/AppTrackingTransparency | Referenced from: /var/containers/Bundle/Application/C163EF57-97E3-4E46-89BA-753ADD9FBF1F/MASKED.app/MASKED | Reason: image not found
Triggered by Thread:  0

Thread 0 Crashed:
0   dyld                            0x0000000101c36418 0x101bf4000 + 271384
1   dyld                            0x0000000101c35a58 0x101bf4000 + 268888
2   dyld                            0x0000000101c35a88 0x101bf4000 + 268936
3   dyld                            0x0000000101bf88f8 0x101bf4000 + 18680
4   dyld                            0x0000000101bfb6e4 0x101bf4000 + 30436
5   dyld                            0x0000000101bf5044 0x101bf4000 + 4164

Thread 0 crashed with ARM Thread State (64-bit):
    x0: 0x0000000000000006   x1: 0x0000000000000001   x2: 0x000000016ec0a970   x3: 0x00000000000000db
    x4: 0x000000016ec0a570   x5: 0x0000000000000000   x6: 0x0000000000000000   x7: 0x0000000000000390
    x8: 0x0000000000000020   x9: 0x0000000000000009  x10: 0x58585858582d4c4c  x11: 0x20200a32696e696d
   x12: 0x20200a32696e696d  x13: 0x203a6e6f73616552  x14: 0x6f6e206567616d69  x15: 0x00646e756f662074
   x16: 0x0000000000000209  x17: 0x0000000000000010  x18: 0x0000000000000000  x19: 0x0000000000000000
   x20: 0x000000016ec0a570  x21: 0x00000000000000db  x22: 0x000000016ec0a970  x23: 0x0000000000000001
   x24: 0x0000000000000006  x25: 0x000000000000002f  x26: 0x0000000101c4f5e0  x27: 0x0000000101c4f000
   x28: 0x0000000101c4fa00   fp: 0x000000016ec0a540   lr: 0x0000000101c35a58
    sp: 0x000000016ec0a500   pc: 0x0000000101c36418 cpsr: 0x00000000

Binary Images:
0x1011f4000 - 0x101a7ffff MASKED arm64  <749bd95c27cd31f380a8088feb924a4f> /var/containers/Bundle/Application/C163EF57-97E3-4E46-89BA-753ADD9FBF1F/MASKED.app/MASKED
0x101bf4000 - 0x101c4bfff dyld arm64  <c08f675c016c30b8a87de35aef8f6b20> /usr/lib/dyld

EOF
paq commented 3 years ago

Perhaps changing platformoptions_ios.xml as below may solve the problem. (but I have not tested.) https://github.com/adjust/adobe_air_sdk/blob/613ddbe7187b005ec257c05c38ba7681fc81d809/src/platformoptions_ios.xml#L9

-        <option>-framework AppTrackingTransparency</option>
+        <option>-weak_framework AppTrackingTransparency</option>
uerceg commented 3 years ago

Very nice catch! And sounds like pretty good guess. I will generate ANE with that option and attach it in here ASAP for you to try.

uerceg commented 3 years ago

@paq Thanks for your patience.

Here's unofficial patch update we plan to release if this ends up fixing your problem. If you can give it a shot and let us know if it did fix it, it would be great.

Looking forward to hearing back from you.

paq commented 3 years ago

@uerceg

I replaced it with a newer version and built it, and it now works fine on my iOS 12 and iOS 14 devices.

Thank you for your prompt work!

uerceg commented 3 years ago

\o/ Thank you for reporting this. We'll release an official update in a jiffy. Cheers!

uerceg commented 3 years ago

🚀 For the record, update is live: https://github.com/adjust/adobe_air_sdk/releases/tag/v4.22.1

Thank you one more time for reporting this.

Cheers!

mhdbitar-bit commented 2 years ago

I got the same error on version 4.30

dyld: Library not loaded: /System/Library/Frameworks/AppTrackingTransparency.framework/AppTrackingTransparency