configcat / swift-sdk

ConfigCat SDK for Swift. ConfigCat is a hosted feature flag service: https://configcat.com. Manage feature toggles across frontend, backend, mobile, desktop apps. Alternative to LaunchDarkly. Management app + feature flag SDKs.
https://configcat.com/docs/sdk-reference/ios
Other
25 stars 12 forks source link

Apple M1 arm64-simulator support #15

Closed Arlindo-g closed 3 years ago

Arlindo-g commented 3 years ago

Describe the bug

Run app on simulator with ConfigCat pod and building fails. Missing architecture arm64-simulator

To reproduce

Using the latest version of Xcode (12.5.1) on most recent's Apple MacBook Pro (processor Apple M1), install ConfigCat (7.2.0) install using Cocoapods (1.11.0)

  1. Attempt to Build
  2. Observe error: Framework not found ConfigCat

Expected behavior

Builds successfully with no errors or warnings

SDK version

ConfigCat (7.2.0)

Platform

MacBook Pro (13-inch, M1, 2020) macOS Big Sur 11.5.2 (20G95)

Arlindo-g commented 3 years ago

Probably just have to use an xcframework as the vender framework and specify that in the podspec.

z4kn4fein commented 3 years ago

Hi @Arlindo-g , thank you for reaching out!

What you reported seems a bit odd to me as we do not distribute pre-compiled binaries to specific architecture types. In my understanding (please, correct me if I'm wrong), conversion to xcframework would make sense only if we'd produce pre-built frameworks, but we package only our source files, and the dependant project does the compilation with its own settings.

I tried our iOS sample on an M1 machine (Big Sur 11.5.2, Xcode 12.5) that uses Cocoapods, and it started without issues. I did the same with another sample app that uses SPM and it worked too.

Are you sure it's not something with your Xcode project settings? If so, can you give me a sample project that has this issue and I can use for further investigation?

Thanks in advance!

Arlindo-g commented 3 years ago

You are totally correct. Sorry for adding a pointless issue. It happened to be some false positive situation where with another Pod, but I didn't clear out any derived data before updating it.

Thanks for the quick response!