google-ar / arcore-ios-sdk

ARCore SDK for iOS

Home Page:https://developers.google.com/ar/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Can't add ARCore as a pod dependency

rbadoux opened this issue · comments

I'm looking to create a framework (we'll call it SomeFrawework here) which has ARCore as a dependency, and distribute it via Cocoapods.
I only use the GeoSpatial module of ARCore it this developement.

When I work on the framework on its own, I have no issues adding ARCore in its podfile, adding "import ARCore" and making all of its feature work as expected.

Since I want to distribute it via Cocoapods, I have created the podspec of SomeFramework, a sample app and added "pod SomeFramework" in its podfile.

At this point, SomeFramework does not build anymore because "No such module: ARCore".
ARCore is recognized in the sample app, but not in my framework anymore.

Capture d’écran 2023-11-02 à 14 12 57

The podspec in my framework is

Capture d’écran 2023-11-02 à 14 16 58

The podfile in my sample is

Capture d’écran 2023-11-02 à 14 15 26

What I tried to do to fix it :

  • Adding import ARCore in the sample app

  • Adding/Removing the spec.static_framework = true in my podspec.

  • I used use_modular_headers! in my podfile instead of use_frameworks !

  • The only way I can make the sample app compile is to import ARCore as modules, like below.

Capture d’écran 2023-11-02 à 14 12 38

But then the framework on its own does not compile anymore. (pod lib lint)

Capture d’écran 2023-11-02 à 14 14 26

I've seen related issues like #55 and #43 but it's not quite the same as mine since I want to distribute my framework as a pod, and need a podspec to do so.

I feel like there's some link missing between the .xcframework of ARCore and my framework, but I can't seem to find the right way to do it. And it's always the same issue 'No such module'

Any help would be much appreciated and let me know if I can provide more information for you to help me on this !

@sammcd @devbridie @jankleinert @fredsa Is there still support on issues of this repo ?
Thank you in advance