skip to Main Content

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.

2

Answers


  1. 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

    Login or Signup to reply.
  2. I’m using SPM for dependency management and ran into issues with my M1 laptop.
    I had Excluded architectures within the top level project build settings set to arm64, which is where I ran into the problem
    excluded architectures

    After I removed that it worked.

    Here’s a screenshot of the Architectures section in the Project build settings, after making the change (ignore dark mode look, I was switching laptops).
    Project build settings

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search