AppsFlyerSDK / AppsFlyerFramework

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

Xcode 12 beta5 SwiftUI Preview Fail with Compiler Error due to AppsFlyer #122

Closed xiao99xiao closed 3 years ago

xiao99xiao commented 3 years ago

Report

SDK Version

5.4.4

What did you do?

  1. Create a iOS project with Catalyst enabled
  2. pod install AppsFlyer
  3. Add a WidgetKit target
  4. Open the WidgetKit target file, and try to enable SwiftUI Preview.

What did you expect to happen?

SwiftUI Preview renders without problem.

What happened instead?

Xcode error: Failed to build the scheme XXXXX Details: In [project path]/ios/Pods/AppsFlyerFramework/iOS/AppsFlyerLib.framework/AppsFlyerLib(AppsFlyerHTTPClient.o), building for iOS Simulator, but linking in object file built for iOS, file '[project path]/ios/Pods/AppsFlyerFramework/iOS/AppsFlyerLib.framework/AppsFlyerLib' for architecture arm64

Please provide any other relevant information.

I'm aware of the closed issue https://github.com/AppsFlyerSDK/AppsFlyerFramework/issues/121 However, the proposed solution which basically means Enable ONLY_ACTIVE_ARCH for Release build configuration is not acceptable for Release. People will eventually find the settings products invalid app archive (Maybe it's because no one is using Xcode 12 beta to submit apps at the moment)

So, this is either a Xcode 12 beta bug, or some new things added for XCFramework in Xcode 12 with SwiftUI Preview.

Also, If there is any library that doesn't support macCatalyst in the project, then the error will keep showing up. So it's strange the AppsFlyerLib caused the error too.

I suggest we keep this issue open and see if AppsFlyerLib and Apple would fix it.

tsheaff commented 3 years ago

We are seeing this same issue on Xcode 12 Beta 6, on v6.0.2 of the SDK.

We have tried adding the following to the Podfile:

post_install do |installer|
    installer.pods_project.targets.each do |target|
        if target.name == 'AppsFlyerFramework'
            target.build_configurations.each do |config|
                config.build_settings['EXCLUDED_ARCHS'] = 'arm64'
            end
        end
    end
end

But this did not fix the issue

This means we're not able to build for iOS 14 at all right now. Any advice @af-fess ?

andr-ggn commented 3 years ago

Can you provide an example project, where you reproduced an issue?

Nowadays, there is a lot of noise around Apple and iOS14. We would appreciate your patients and support.

kmt901 commented 3 years ago

Hi @andr-ggn, I work with @tsheaff, we were able to get the project to build by adding arm64 as an excluded architecture in our Build Settings for the main target in the project. Unfortunately that's not a long term solution as this would prevent the app from working on certain devices. Will there be an upcoming release to address this issue?

Fabezi commented 3 years ago

Upvoting. We are able to get our build to build as described above but this does cause quite a bit of headache throughout our modular project structure. Hoping and appreciate if can get a release addressing this issue soonish if at all possible.

xiao99xiao commented 3 years ago

Update: I can confirm the original issue I posted, is fixed in latest released Xcode 12.

csykes commented 3 years ago

@xiao99xiao which version of the AppsFlyer SDK are you using?

I'm on 5.4.4 and still seeing it using Xcode 12.0 (12A7209).

xiao99xiao commented 3 years ago

@csykes I'm using latest 6.0.3 on Xcode 12.0.1.