ChartsOrg / Charts

Beautiful charts for iOS/tvOS/OSX! The Apple side of the crossplatform MPAndroidChart.
Apache License 2.0
27.54k stars 5.99k forks source link

Charts Not Built for arm64, armv7 targets in Xcode 12 beta 6 #4468

Open sandesh-gauss opened 4 years ago

sandesh-gauss commented 4 years ago

Hi @danielgindi ,

I am having issues building the Charts framework with the Xcode 12 Beta 6 using Swift PM. Getting the following error,

Could not find module 'Charts' for target 'arm64-apple-ios-simulator'; found: x86_64-apple-ios-simulator, x86_64

Works fine with Xcode 12 initial beta. Please let me know if there's a quck fix for the time being.

quifago commented 4 years ago

If you were using Carthage, you can use the script they mention in their Issues page: https://github.com/Carthage/Carthage/issues/3019

It worked for me.

bobek-balinek commented 4 years ago

I have had the same issue when bundling Charts through Swift Package Manager. My workaround for Debug configuration:

The last one was set as a user-defined variable, no idea why and how it's worked ¯_(ツ)_/¯

quifago commented 4 years ago

@bobek-balinek by any chance, have you tried to checkout the v4.0.0 branch? When I tried it few weeks ago it was not working, not sure if your workaround could fix it too. And that's the version of Charts that we're using in our app.

sandesh-gauss commented 4 years ago

I have had the same issue when bundling Charts through Swift Package Manager. My workaround for Debug configuration:

  • Build Active Architectures Only (ONLY_ACTIVE_ARCH): YES
  • Valid Architectures (VALID_ARCHS): arm64 arm64e armv7 armv7s i386 x86_64

The last one was set as a user-defined variable, no idea why and how it's worked ¯(ツ)

@bobek-balinek Yes, thank you fo your comment. I am using Swift Package Manager as well. I tried that before, but the thing is the iOS app I am using has some Camera APIs that only work with arm64 arm64e armv7 armv7s. This is definitely a great workaround if adding those i386 x86_64 doesn't break other code in your app. I think the solution is as simple as re-compiling the Charts framework with the arm64 and above architectures.