Mobile-Telematics/telematicsSDK-demoapp-flutter-

Module 'RaxelPulse' was created for incompatible target

quanghuy-comply opened this issue · 2 comments

I am running Xcode on M1 under Rosetta by following this article: https://docs.damoov.com/docs/ios-sdk-for-m1-processors but the same error happen on my M1 mac. I am using the example project.

I also use the first answer in https://stackoverflow.com/questions/63607158/xcode-12-building-for-ios-simulator-but-linking-in-an-object-file-built-for-io/63955114#63955114.

So far I can't run the project on M1 macs, please help.

Hey,
I think we are talking about two errors. Please find a guide on how to fix it.

Unable to load standard library for target 'arm64-apple-ios10.0'

please add to the end of your project Podfile the following code:

post_install do |installer|
  installer.pods_project.targets.each do |target|
    flutter_additional_ios_build_settings(target)
    target.build_configurations.each do |config|
        config.build_settings['ENABLE_BITCODE'] = 'YES'
        config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = "arm64"
    end
  end
end

Examples

And the second error (it may be not relevant after fixing the error above)
Module compiled with Swift 5.5.2 cannot be imported by the Swift 5.6 compiler

open Xcode through Rosetta - Right click on Xcode in applications folder -> Get Info -> set Open with Rosetta to true.
Make sure that Excluded Architecture is empty -> image (5)

more about this case

Thanks, I get a few more issues in other packages with that solution, but the final fix for me looks like this

post_install do |installer|
  installer.pods_project.targets.each do |target|
    flutter_additional_ios_build_settings(target)
    target.build_configurations.each do |config|
        config.build_settings['ENABLE_BITCODE'] = 'YES'
        config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = "arm64 i386"
    end
  end
end