swift-sodium icon indicating copy to clipboard operation
swift-sodium copied to clipboard

Unable to run on iOs Simulator with XCode 13

Open Skycoder42 opened this issue 2 years ago • 1 comments

When trying to run a project with swift-sodium on XCode 13, targeting the iOs Simulator, you will get an error message containing

building for iOS Simulator, but linking in object file built for iOS, for architecture arm64

According to https://stackoverflow.com/a/63955114, this is an issue with M1 support and can be fixed by adding the following lines to to the Podspec:

s.pod_target_xcconfig = { 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'arm64' }
s.user_target_xcconfig = { 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'arm64' }

Note: I have no clue about XCode and Pods, this seems to be the problem and helped me fix the issue locally.

Skycoder42 avatar Jan 24 '22 06:01 Skycoder42

When trying to run a project with swift-sodium on XCode 13, targeting the iOs Simulator, you will get an error message containing

building for iOS Simulator, but linking in object file built for iOS, for architecture arm64

According to https://stackoverflow.com/a/63955114, this is an issue with M1 support and can be fixed by adding the following lines to to the Podspec:

s.pod_target_xcconfig = { 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'arm64' }
s.user_target_xcconfig = { 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'arm64' }

Note: I have no clue about XCode and Pods, this seems to be the problem and helped me fix the issue locally.

Thanks. this problem already exists so In Flutter: add this line in pod_install PodFile: installer.pods_project.build_configurations.each do |config| config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = "arm64" end

enayatinfo avatar Aug 04 '23 09:08 enayatinfo