4

We've decided to use SPM for our new internal frameworks. Our app has many dependencies (for the moment) on some CocoaPods. So, I figured adding SPM would be easy enough.

I created a local Swift Package and linked it against the project. All good, until I import the new Package into a Swift file

Once I do that and try build on the iOS simulator, I am faced with the following compiler error:

could not find module 'CoreKit' for target 'x86_64-apple-ios-simulator';

I am able to build to a device, no problem. Just not the simulator.

We faced a similar issue for Pods; which resulted us adding the following in our Podfile

 installer_representation.pods_project.targets.each do |target|
    target.build_configurations.each do |config|
      config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = "arm64"
    end
  end

We had to do this, since we use M1 Machines.

I have tried the following:

  • Removing arm64 from the Excluded Architectures
  • Setting Build Active Archives only to YES/NO
  • Adding x86_64 to Architectures
  • Removing the config for arm64 from the Podfile

Open to any suggestions on how we can resolve this.

Thanks

Robert J. Clegg
  • 7,231
  • 9
  • 47
  • 99
  • Neither package manager supports working with the other. I recommend choosing one. – Paul Beusterien Mar 31 '22 at 01:02
  • @PaulBeusterien, that’s incorrect. They can and do work in the same project. They have nothing to do with each other. I know of another project where they have both working together. – Robert J. Clegg Mar 31 '22 at 03:59
  • To be clear, it's possible to make work when requested dependencies and sub-dependencies are non-intersecting sets - but as soon as there is a common shared dependency, integrating will be painful. – Paul Beusterien Apr 01 '22 at 01:17
  • Seeing the same issue in our project, Googles ARCore still doesn't have SPM support, so we can't remove cocoapods. @RobertJ.Clegg did you make any progress since march on this? (also created an issue https://github.com/CocoaPods/CocoaPods/issues/11416 ) – Bersaelor Jun 17 '22 at 08:32
  • 2
    @Bersaelor - Could not find a solution. Had to give up and stick with Cocopods, unfortunately. – Robert J. Clegg Jun 22 '22 at 15:29

0 Answers0