AppsFlyerSDK / AppsFlyerFramework

AppsFlyer Apple SDK
https://support.appsflyer.com/hc/en-us/articles/207032066-AppsFlyer-SDK-Integration-iOS
Other
164 stars 89 forks source link

[SPM][Xcode 12.5] Unable to build for release #171

Closed victorBaro closed 3 years ago

victorBaro commented 3 years ago

Report

SDK Version

6.2.6

What did you do?

Add Appsflyer as SPM dependency

What did you expect to happen?

Our app builds&run in debug mode but not in release configuration

What happened instead?

App does not compile in release mode. It is possible to archive it, but when I try to build&run I get the following error:

missing required architecture arm64 in file /Users/victorbaro/Library/Developer/Xcode/DerivedData/Universe-hhtnbyfmvrffwmetinppdcipdpzy/Build/Products/Release-iphonesimulator/PackageFrameworks/AppsFlyerLib.framework/AppsFlyerLib (2 slices)
Undefined symbols for architecture arm64:
  "_OBJC_CLASS_$_AppsFlyerLib", referenced from:
      objc-class-ref in UniverseAnalytics.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Please provide any other relevant information.

It is weird that I can build&run for the simulator in debug mode but not in release mode. Also weird that it allows me to archive in release mode. I haven't tried to submit a new App Store release yet.

mathaeus commented 3 years ago

Hi @victorBaro, have you already tried with the latest version that was released yesterday? It seems like there are some changes that could potentially fix your error. Not really sure though https://github.com/AppsFlyerSDK/AppsFlyerFramework/compare/6.2.6...6.3.0

I, for myself, face a similar yet different issue with code signing for release builds only, that unfortunately still persists 😞. Are you using a Watch target by any chance? Because we are and the problems seems to lie there. Although we don't even link AppsFlyer to the Watch target...

andr-ggn commented 3 years ago

@victorBaro SPM works in 6.3.0 @mathaeus From your screenshot I see that XCode tries to copy our static framework into Watch bundle. This is not correct behaviour.

andr-ggn commented 3 years ago

@mathaeus Try to use this https://github.com/AppsFlyerSDK/AppsFlyerFramework/issues/157#issuecomment-810248321 But change folder to .../Watch/...

mathaeus commented 3 years ago

Thanks for the tipp @andr-ggn.

In the meantime I was able to confirm that the issue does NOT happen with Xcode 12.5, so it really seems to be a bug in 12.4. For now I'm stuck on 12.4 though, so I will try out that workaround, and get back to you, thanks!

mathaeus commented 3 years ago

So, since creating a RELEASE build in Xcode 12.5 with AppsFlyerLib 6.3.0 succeeds, I would suggest closing this issue :)