4

This error has been stopping me progress with my project for a while now and nothing seems to be working for me.

I have added A pod to my swift project but when I try to import it into my app, I get this error:

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

I've searched far and wide and tried almost all the solutions and still nothing seems to be working.

I'm using the latest Xcode.

is there anything I need to do fix this as this is stopping me from building the app.

drago
  • 807
  • 10
  • 23

1 Answers1

4

I have the same issue on the M1 laptop. Have you tried this solution:

post_install do |installer_representation|
    installer_representation.pods_project.targets.each do |target|
        target.build_configurations.each do |config|
            config.build_settings['ONLY_ACTIVE_ARCH'] = 'NO'
            config.build_settings['BUILD_LIBRARY_FOR_DISTRIBUTION'] = 'YES'
        end
    end
end

Alternatively, you can change default scheme to Release, instead of Debug, by going to the top menu Product -> Scheme -> Edit Scheme, select your Run scheme as Release.

However, better solution would be to simply make sure you're running Xcode using Rosetta. Simple do the Get Info on the Xcode icon, from there in popup window make sure that Open using Rosetta is checked

Jon Doe
  • 83
  • 7