SwiftyJSON icon indicating copy to clipboard operation
SwiftyJSON copied to clipboard

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

Open Exey opened this issue 4 years ago • 4 comments

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

Exey avatar Feb 25 '21 12:02 Exey

Having the same problem.

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

adudenamedruby avatar Mar 04 '21 21:03 adudenamedruby

same.

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

vvard3n avatar Mar 21 '21 07:03 vvard3n

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.

aronbudinszky avatar Mar 25 '21 11:03 aronbudinszky

Podfile setting does not work.

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

12HuYang avatar Mar 01 '22 17:03 12HuYang