Skip to content

Fails to build for simulator running an Apple Silicon-based Mac #104

@SwiftArtery

Description

@SwiftArtery

Installing TinyConstraints using SPM on an M1 Pro MacBook Pro, Xcode 13.4 - building for any iOS simulator will fail. It works fine on an Intel-based Mac.

Error:

Could not find module 'TinyConstraints' for target 'x86_64-apple-ios-simulator'; found: arm64-apple-ios-simulator, at: /Users/will/Library/Developer/Xcode/DerivedData/<APP>/Build/Products/Debug-iphonesimulator/TinyConstraints.swiftmodule

I used to use CocoaPods and having the following in my Podfile worked for TinyConstraints and other pods:

post_install do |installer|
  installer.pods_project.build_configurations.each do |config|
    config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = "arm64"
  end
end

I have tried modifying Universal-Target-Base.xcconfig to add

EXCLUDED_ARCHS[sdk=iphonesimulator*] = arm64

and/or removing the VALID_ARCHS settings, but to no avail.

With SPM the only fix I've found is to run Xcode in Rosetta, which really isn't ideal.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions