krzysztofzablocki / Inject

Hot Reloading for Swift applications!
MIT License
2.14k stars 114 forks source link

Could not find module for target 'x86_64-apple-ios-simulator' #42

Closed VitaliiDeveloper closed 2 years ago

VitaliiDeveloper commented 2 years ago

Hi all✌️ When I have SPM + Pods on mac m1 you get error: Could not find module for target 'x86_64-apple-ios-simulator' Then I setted VALID_ARCHS = "arm64, x86_64" and got errors for Inject lib.

Maybe somebody had the same issue and knows how to fix.

Here Pods settings:

post_install do |installer|
  installer.pods_project.build_configurations.each do |config|
    config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = "arm64"
  end
  installer.pods_project.targets.each do |target|
    puts target.name
    target.build_configurations.each do |config|
      config.build_settings.delete 'IPHONEOS_DEPLOYMENT_TARGET'
    end
  end
end
VitaliiDeveloper commented 2 years ago

The issue is in SPM because you can not Exclude arm64 for it... and only one way to use it it's run under Rosseta as I found.

markst commented 2 years ago

This issue is usually the case when SPM's include a XCFramework which doesn't include the appropriate architecture slice.

However this repo does not use a XCFramework. @VitaliiDeveloper are you sure the error is due to this package?