user-44651
user-44651

Reputation: 4124

Cocoapods EXCLUDED_ARCHS flag not being set during build

I am trying to build my project but kept getting 'No Module Found' when deploying to the simulator but not to an actual device. After digging around, I found I should add the arm64 to the Excluded Archtiectures section of the building settings for all my targets.

I used this SO question as a reference, however the arm64 is not being set.

Anyone see what I have done wrong?

post_install do |installer|

    installer.pods_project.targets.each do |target|
        target.build_configurations.each do |config|
            config.build_settings["ONLY_ACTIVE_ARCH"] = "YES"
            config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = "arm64"
        end
    end

end

Upvotes: 2

Views: 6998

Answers (1)

Paul Beusterien
Paul Beusterien

Reputation: 29582

You're likely using a binary pod that does not support the M1 Mac simulator. The option you're setting is excluding the M1 for the whole build to enable the project to build for devices and Intel simulators.

Contact the pod provider to ask them to add M1 support.

Upvotes: 4

Related Questions