SwiftyJSON
SwiftyJSON copied to clipboard
Apple Silicon M1 Could not find module 'SwiftyJSON' for target 'x86_64-apple-ios-simulator'
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
Having the same problem.
- SwiftyJSON: 5.0.0
- Xcode Version: 12.4
- Swift Version: Xcode default
- Carthage 0.37.0
same.
- SwiftyJSON: 5.0.0
- Xcode Version: 12.4
- Swift Version: Xcode default
- pod --version 1.10.1
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.
Podfile setting does not work.
SwiftyJSON: 4.3.0 Xcode Version: 13.2.1 Swift Version: Xcode default pod --version 1.11.2