What is the proper way of distributing a dynamic framework with a dependency on a static framework?
I’m building a closed source dynamic framework. It has a dependency on a 3rd party closed source static framework.
I link the static dependency framework to my framework’s project/target as described in this Apple tech note:
That same Apple tech note mentions:
The app target is responsible for embedding all of the frameworks,
including any frameworks that other frameworks depend on.
So I also give my clients a copy of the framework I depend on. However, further down in the same tech note, Apple (referring to embedding static libraries/frameworks) states:
Since the binary in these situations is a static library, apps cannot
embed it in the app bundle.
…The library should remain in the “Link Binary with Libraries”
That’s fine – so I just have my clients link the static framework dependency instead of embed it and everything works fine.
However, problems arise when my client needs the
-ObjC linker flag for other libraries they use. This linker flag causes my (objective-c) static framework dependency to load all of its classes twice and the client sees duplicate class logs everywhere in their console.
One possible solution here would be to have the client identify the libraries they use which need the
-ObjC linker flag and instead specify the
force_load flag for those libraries. But this solution also causes problems in the case of the client using CocoaPods since CocoaPods will overwrite any changes to their linker flags with
-ObjC again with each
pod install. Are there any other solutions/ideas anyone has to this problem?
P.S. I know the Apple tech note from before also mentions:
Static frameworks are not a supported way of sharing static libraries.
but unfortunately my hands are tied from business constraints at the moment, and I must include this static framework dependency.
- Draw a hole in a rectangle with SpriteKit?
- How to check app is installed or not in phone
- How to get an error description when playback fails on MPMoviePlayerController
- Corner Radius Using UIBezierPath
- Swift regex: does a string match a pattern?
- How to Create layout constraints programmatically
- Taking an iAd across multiple screens
- UITableViewCell without using deprecated method initWithFrame:reuseIdentifier
- iOS AVFoundation: How do I fetch artwork from an mp3 file?
- Xcode, Why are some NSLog entries omitted from the console?
- Overlay not scrolling with UITableView – iOS
- iOS – How to set a UISwitch programmatically
- Undefined symbols for architecture i386 using libsqlite3.dylib with FMDB Xcode 7 ios9
- How to make UITable header stick to the top of the screen when using Storyboards?
- UICollectionView custom line separators