skip to Main Content

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..

4

Answers


  1. Chosen as BEST ANSWER

    Problem solved when I changed it to IOS Deployment Target 12.0

    • Build Active Architecture Only selected as yes.

  2. 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.

    Login or Signup to reply.
  3. 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
    
    Login or Signup to reply.
  4. In my case i use this solution and it’s worked for me.

    Add this given below code into your podfile at the bottom and run "pod install" command. And Good to go.

    At this point ‘12.0’ You can change accordingly. Based upon your project. For exmp: ‘11.0’ or ‘10.0’ like this. It should be match with the platform: ios, ‘12.0’ this line in your podfile at the Second position.

    In my case

    Exmp: platform: ios, ‘12.0’ so config.build_settings[‘IPHONEOS_DEPLOYMENT_TARGET’] = ‘12.0’. So 12.0 matched in both.

    post_install do |installer|
      installer.pods_project.targets.each do |target|
        target.build_configurations.each do |config|
        # some older pods don't support some architectures, anything over iOS 11 resolves that
          config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '12.0'
        end
      end
    end
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search