iOS CocoaPods No Such Module 100.10

7373
8
Jump to solution
03-03-2021 07:46 AM
RobertKoch1
New Contributor II

We are upgrading our min iOS version for our app to iOS 12.1, and in doing such, also updating all of our dependencies. We were previously running the ArcGIS iOS runtime SDK version 100.7.1 through CocoaPods with no issue. After updating to SDK version 100.10 however, we are now receiving the following warning at build time:

[CP] Unable to find matching .xcframework slice in '<path to project>/Pods/ArcGIS-Runtime-SDK-iOS/ArcGIS.xcframework ArcGIS framework ios-arm64 ios-x86_64-simulator' for the current build architectures (arm64 x86_64).

As well as, and more importantly, a compiler error

No such module 'ArcGIS'

It is worth noting this only happens when building the project with a run destination of a simulator. It does not happen if building to a device or archiving.

Unfortunately, this is not a viable solution because the application uses CI/CD processes that run unit tests on simulators as well as build and deploy the application.

I have tried most normal steps when this issue occurs. I've also added the pods scheme as a run destination to try and build the pods, but when doing that, I receive the following error:

Unable to load contents of file list: '/Target Support Files/ArcGIS-Runtime-SDK-iOS/ArcGIS-Runtime-SDK-iOS-xcframeworks-input-files.xcfilelist'

Unable to load contents of file list: '/Target Support Files/ArcGIS-Runtime-SDK-iOS/ArcGIS-Runtime-SDK-iOS-xcframeworks-output-files.xcfilelist'

 Is there a known issue with the current implementation of the ArcGIS SDK when added through CocoaPods? 

Can anyone help me out with this?

Thanks,

Rob

0 Kudos
1 Solution

Accepted Solutions
RobertKoch1
New Contributor II

I was actually able to resolve this. @MarkDostal you were close, but the post_install script just needed to be changed ever so slightly.

Instead of changing the EXCLUDED_ARCHS for each target, I was able to change it for each config.

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

Doing this applies the EXCLUDED_ARCHS properly in the build settings and allows the project to be built for simulators. 

View solution in original post

8 Replies
DiveshGoyal
Esri Regular Contributor

I don’t think we’ve seen this before. Are you on an intel based Mac, or the new apple silicon one? What version of Xcode are you using?

0 Kudos
RobertKoch1
New Contributor II

I'm currently using a MacBook Pro (16-inch, 2019) with a 2.3 GHz 8-Core Intel Core i9 and 32 GB of 2667 MHz DDR4. 

Xcode is Version 12.4 (12D4e)

CocoaPods version 1.10.1

0 Kudos
DiveshGoyal
Esri Regular Contributor

I'm using the same version of xcode and cocoapods but can't reproduce your issue. I can integrate version 100.10 into my project just fine with cocopaods.
Can you create a standalone project that demonstrates the issue and attach it here? we can then investigate more.

We do not currently support Macs with Apple Silicon yet. Hopefully that'll be added in our next release.
So the warning you're seeing about "Unable to find matching .xcframework slice ..." is technically accurate. But I don't expect that from building and running your app on intel mac simulators, or physical ios devices.

By any chance are you trying to build your own pod that has a dependency on the arcgis pod? If so, that might be where things are going wrong

0 Kudos
RobertKoch1
New Contributor II

I was able to create a new project and reproduce the issue. I think it's tied to the build configurations. My project does not have the default `Debug` and `Release` configurations. It, instead, has `Dev`, `QA`, `Staging`, and `Prod` configurations.

Attached you will find a zip file with the project in it. I deleted the `Pods/` directory to reduce the size, so you'll need to run a pod install after you unzip the project.

Let me know if you need anything else or have other questions.

0 Kudos
MarkDostal
Esri Contributor

I am able to reproduce your issue with the sample you sent, so thanks for that.  Unfortunately, I have not yet been unable to resolve the problem in that sample.

Creating a new project and using Cocoapods to consume the Runtime SDK does not cause the issue to appear.  If I set the project targets' "Build Active Architecture Only" flag to "false" I received the same error you did.  If I then set the "Excluded Architectures" setting to:

Screen Shot 2021-03-05 at 5.06.16 PM.png

the problem goes away.

I tried doing the same in your sample, but no luck.  I also added the following line to the "podfile":

"config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = "arm64"

but no luck with that either.

I'm convinced that the problem lies with the "arm64" simulator build, as the Runtime SDK does NOT currently include that slice.  I will continue to look for a solution, but wanted to keep you updated in case you had any ideas.

Mark

0 Kudos
RobertKoch1
New Contributor II

I think the issue still lies in the fact that the sample project I sent does not have the default `Debug` and `Release` configurations in it.

It appears that a lot is tied to the those configurations. I think because of this, everything attempts to use the `Release` configuration, which most likely targets the `arm64` platform instead of the `x86_64` platform.

0 Kudos
RobertKoch1
New Contributor II

I was actually able to resolve this. @MarkDostal you were close, but the post_install script just needed to be changed ever so slightly.

Instead of changing the EXCLUDED_ARCHS for each target, I was able to change it for each config.

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

Doing this applies the EXCLUDED_ARCHS properly in the build settings and allows the project to be built for simulators. 

MarkDostal
Esri Contributor

@RobertKoch1 Excellent!  I'm glad you got it sorted.  Please reach out if there's anything else you need.

 

-Mark

0 Kudos