Closed kkaun closed 2 years ago
So, after some headache and playing with pods/configurations, I somehow managed to successfully launch the whole project with following structure, but only by editing scheme to Run in Release configuration:
platform :ios, '11.0'
workspace 'Common.xcworkspace'
abstract_target 'CommonPods' do
# ... some other common 3rd-party dependencies here ...
target 'TestApp' do
project 'TestApp/TestApp.xcodeproj'
end
target 'Framework' do
pod 'ARCore/AugmentedFaces', '~> 1.30.0'
project 'Framework/Framework.xcodeproj'
end
end
Seems like a bit poor workaround, but at least custom framework has the access to all desired 3rd-party dependencies and remains fully testable as for now. Still have no clue why it normally works only for Release configuration runs on physical device.
It seems like your framework includes parts of ARCore, so those parts are getting duplicated. Note that ARCore is statically linked instead of a dynamic library. You need to somehow exclude the dependencies from your binary when you link it.
In general I would highly recommend using a system like CocoaPods or SPM to distribute your SDK, as that will take care of a lot of details for you and make things easier for developers.
@kkaun Did you manage to package your framework as a pod itself ?
When adding my framework as a pod in a client app, the app can see ARCore but my pod can't. I keep getting 'no such module ARCore' in my framework. When I use 'import ARCoreGeospatial" instead of "import ARCore" it works, but the framework doesn't compile anymore.
Your help would be so appreciated ! Thank you in advance.
Our team is developing partner iOS Swift Framework (SDK) with some 3rd-party dependencies inside.
Framework itself has several 3rd-party dependencies all embedded with CocoaPods, and they're working like a charm either during compile time or while testing on device/simulator, while being embedded inside a simple test "partner" app. No general problems here.
But there is an issue with ARCore embedding via CocoaPods suite similar to https://github.com/google-ar/arcore-ios-sdk/issues/43 .
So we're currently stuck with using common workspace and 2 projects (test app and framework itself) within it, also with CocoaPods base structure on top workspace level:
The Podfile here currently looks like this, inspired by the structure mentioned here https://stackoverflow.com/a/42480097/6405022:
With that said, partner test app builds just fine.
The problem which we're facing happens right after partner app launch and is always supported by crash:
... Lots of similar duplication warnings like below comes here ...
What we already know:
use_frameworks!
in Podfile, as was suggested in comment as a workaround.import Framework
and/or calling its API methods) or not, but:Class N is implemented in both...
warning references to all dependencies, but as far as we go only ARCore usage causes crashes and error in log afterwards.Any help will be much appreciated!