Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Apple Silicon M1 Could not find module 'SwiftyJSON' for target 'x86_64-apple-ios-simulator' #1095

Open
Exey opened this issue Feb 25, 2021 · 4 comments

Comments

@Exey
Copy link

Exey commented Feb 25, 2021

What did you do?

Compile on m1

What did you expect to happen?

Compiled

What actually happened instead?

APIModels/RecipeCooking.swift:10:8: Could not find module 'SwiftyJSON' for target 'x86_64-apple-ios-simulator'; found: arm64, arm64-apple-ios-simulator

Environment

List the software versions you're using:

  • SwiftyJSON: 5.0.0
  • Xcode Version: 12.4
  • Swift Version: Xcode default
  • Swift Package Manager 5.3.0
@adudenamedruby
Copy link

Having the same problem.

  • SwiftyJSON: 5.0.0
  • Xcode Version: 12.4
  • Swift Version: Xcode default
  • Carthage 0.37.0

@vvard3n
Copy link

vvard3n commented Mar 21, 2021

same.

  • SwiftyJSON: 5.0.0
  • Xcode Version: 12.4
  • Swift Version: Xcode default
  • pod --version 1.10.1

@aronbudinszky
Copy link

A workaround for Cocoapods is setting your project build settings Only Active Architecture to No and to add this at the end of your Podfile:

post_install do |installer|
    installer.pods_project.targets.each do |target|
        target.build_configurations.each do |config|
            # Needed for building for simulator on M1 Macs
            config.build_settings['ONLY_ACTIVE_ARCH'] = 'NO'
        end
    end
end

Haven't yet found a solution for SPM yet.

@12HuYang
Copy link

12HuYang commented Mar 1, 2022

Podfile setting does not work.

SwiftyJSON: 4.3.0
Xcode Version: 13.2.1
Swift Version: Xcode default
pod --version 1.11.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants