skip to Main Content

came here after 16 hrs of searching online as a last resort.

Quick Background

In our company we have a remote machine "M1" from Mac Stadium that we use for CI/CD – Github actions, this machine was running on macOS Monterey and Xcode 13.

Recently we got an email from Apple requiring us to have SDK 16.1 as base SDK for any new builds starting April 1st.

Issue

After updating to Xcode 14.2 and macOS Ventura, our project has a bunch of errors.

Includes:

unsupported Swift architecture

could not build module 'CoreDataPersistence'

Build Errors remaining

Solutions I tried

  • Cleaned Xcode project, and deleted what’s inside DerivedData folder.

  • Deintegrated pods and running pod install again.

  • Marking project and target’s Build Active Architecture Only to NO

  • Adding arm64 to Excluded Architecture

  • Building each individual Pod Target Scheme (builds successfully)

  • Pod Update

  • Reinstalling Xcode.

  • Updated to Xcode 14.3

Non of those worked, and it’s worth mentioning that we didn’t have those errors with Xcode 13 or even our personal MacBooks which are macOS Venture and Xcode 14.2. (Works normally on our machines but not the remote one).

I checked the project settings/build settings and they match our personal Xcode, which doesn’t make any sense to me why it’s not building on the remote machine.

Any thoughts or other solutions to try?

Here is a picture of our targets minus the main project target (security reasons):

enter image description here

UPDATE: May 2nd, 2023

I was able to get the project running by updating cocoapods to the recent version 1.12.1 (supports Xcode 14.3) and changing my target device in Xcode to my real device.

So far this seems to work and get me going, but I’m still unable to run the project on simulators. Tried downloading different simulators but same issue.

2

Answers


  1. Check all targets (even pod’s targes) that they have "Standard Architectures"

    Also we use post install script in podfile to fix deployment target in dependencies:

    post_install do |installer|
      installer.pods_project.frameworks_group["iOS"]["MobileCoreServices.framework"]&.remove_from_project
      installer.pods_project.targets.each do |target|
        target.build_configurations.each do |config|
          if Gem::Version.new(deployment_target) > Gem::Version.new(config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'])
            config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = deployment_target
          end
        end
      end
    end
    

    If dependency’s deployment target will be too low, standard archs for it will be arm7 and arm64, or even arm6.
    But we don’t need arm6/7 already. I don’t know why cocoapods doesn’t do it by default.

    Login or Signup to reply.
  2. Don’t exclude any architecture from Build Settings.

    I had a very similar issue with Xcode 14.3 on macOS 13.3.1.

    The solution for me was this – open Xcode > Go to the "Product" menu in the menu bar and select Destination > Destination Architectures > Show Rosetta Destinations.
    Then you will see Rosetta in parenthesis next to the simulator name. Run it. That’s all.

    Here is the original source of this information – Link

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search