Xcode 12.5, building for iOS-armv7 but attempting to link with file built for iOS-arm64 problem

Viewed 4030

I'm trying to build an IOS project on Xcode 12.5. There is no problem when the real device is connected or when I try to build with the simulator. But I get this error when Any IOS Device is selected. Any IOS Device is selected to archive my project and I get an error message while archiving. I have changed the'Build Active Arch. Only' and 'Excluded Architecture' settings many times, but the problem has not been resolved.

error image

please help me with this problem..

3 Answers

Problem solved when I changed it to IOS Deployment Target 12.0

  • Build Active Architecture Only selected as yes.

Looking at this screenshot - enter image description here

The issue is Undefined symbols for architecture armv7.

Can you go to Build Settings of your

  1. project
  2. app target
  3. all of the pod targets if you use pods

search for armv7 and delete it if it exists?

After this, do a Product > Clean Build Folder & now try running/building the app.

I had the same error in my project. I use Xcode 13.3.1. So I updated my Podfile with next way(was added excluded arch and deployment target):

$iOSVersion = '13.1'
platform :ios, $iOSVersion
use_frameworks!

def general_pods
  pod 'Some_pods_here'
end

target 'Some_target1' do
  general_pods
  pod 'Some_pod_here'
end

target 'Some_target2' do
  general_pods
  pod 'some_pod_here'
end

post_install do |installer|
  installer.pods_project.targets.each do |target|
    target.build_configurations.each do |config|
      config.build_settings["ONLY_ACTIVE_ARCH"] = "YES"
      config.build_settings["EXCLUDED_ARCHS[sdk=*]"] = "armv7"
      config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = $iOSVersion
    end
  end

installer.pods_project.targets.each do |target|
  target.build_configurations.each do |config|
    if Gem::Version.new($iOSVersion) > Gem::Version.new(config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'])
      config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = $iOSVersion
    end
   end
 end
end
Related