the setup
i have an iOS App MY-App
which uses my own framework MY-Framework
. Both are written in swift
. The app only handles user authentification and passes an access token to MY-Framework
. MY-Framework
then handles the entire screenflow and business logic. The goal is to distribute the MY-Framework
to customers to use it in their apps.
for a while i was using cocoapods to add GoogleMaps
to F
. everything worked fine.
my project structure is:
MY-App/
+- Develop.xcworkspace
\- MY-App.xcodeproj
MY-Framework/
+- MY-Framework.workspace
+- MY-Framework.xcodeproj
\- Pods/
\- Pods.xcodeproj
my Podfile
was a simple
source 'https://github.com/CocoaPods/Specs.git'
target 'MY-Framework' do
pod 'GooglePlaces'
pod 'GoogleMaps'
end
now i was to enhance my app with some animation and were to use Lottie-ios
for it
i updated my Podfile
as follows
source 'https://github.com/CocoaPods/Specs.git'
target 'MY-Framework' do
pod 'GooglePlaces'
pod 'GoogleMaps'
pod 'lottie-ios'
end
i was then not able to import Lottie
in my code. solution was to include
use_frameworks!
in the Podfile
So far so good, but when building i got linker errors with lottie
.
My solution was to explicitly add the Lottie.framework
from the Pods
project to my frameworks linked frameworks
list. Screenshot from my Develop.xcworkspace
open.
now i was able to compile the app and link it successfully, but at the runtime the app crashes with the usual
dyld: Library not loaded: @rpath/Lottie.framework/Lottie
Referenced from: .../Debug-iphonesimulator/Framework.framework/Framework
Reason: image not found
at this i am stuck. what i dont understand is why only lottie
has this problem, i had no hoops to jump to use GoogleMaps
.
My Question
how do i use the lottie-ios
cocoalpod in such a way that it is completely contained in MY-Framework
, so when i share it to a customer they can just drop it into their App and not worry about any dependencies?
Basically the way it works at the moment with just GoogleMaps
from framework added via cocoapods not avaliable at runime of host app
No comments:
Post a Comment