google-ar / arcore-ios-sdk

ARCore SDK for iOS
https://developers.google.com/ar/
Apache License 2.0
283 stars 84 forks source link

Can't add ARCore as a pod dependency #93

Open rbadoux opened 1 year ago

rbadoux commented 1 year ago

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 :

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 https://github.com/google-ar/arcore-ios-sdk/issues/55 and https://github.com/google-ar/arcore-ios-sdk/issues/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 !

rbadoux commented 1 year ago

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