Embedding a framework within a framework (iOS 8+)
Found the answer. Here's how it's done:
- Navigate to Target > Build Phases
- Click the small "+" icon and select "New Run Script Build Phase"
Paste the following:
cd $BUILT_PRODUCTS_DIR
mkdir $PROJECT_NAME.framework/Frameworks &>/dev/null
for framework in *.framework; do
if [ $framework != $PROJECT_NAME.framework ]; then
cp -r $framework $PROJECT_NAME.framework/Frameworks/ &>/dev/null
fi
done
Embed framework in framework
Yes; it's possible (at least with OSX Frameworks, so I assume with iOS Frameworks too).
Read the Apple Documentation about Umbrella Frameworks:
The Umbrella Framework Bundle
Physically, umbrella frameworks have a
similar structure to standard frameworks. One significant difference
is the addition of aFrameworks
directory to contain the subframeworks
that make up the umbrella framework.
Embedded Frameworks iOS 8
Used a ticket to speak with Apple
"Hi Rob,
Thank you for contacting Apple Developer Technical Support (DTS). I am currently investigating your issue. To answer your question, I need to consult with some folks in iTunes Connect. Unfortunately this can take some time as they are very busy.
In the meantime, I will point out that it is only supported to use an embedded framework on iOS 8. The only question is whether you could use dlopen() to conditionally load the embedded framework on iOS 8, and not load the embedded framework on earlier versions of iOS.
I will let you know what I hear from iTunes Connect about this question.
Luke Rattei
DTS Engineer"
"Hi Rob,
Embedded frameworks are only supported on iOS 8 and above. Unfortunately you will not be able to use an embedded framework on iOS 7.
While it might be possible to run apps with embedded frameworks on iOS 7 during development, you will not be able to submit such apps to the App Store. You will see an error message that the MinimumOSVersion of your embedded framework must be at least 8.0.
Luke Rattei
DTS Engineer"
Add framework to Embed Frameworks Build Phase in XCode iOS 8 project using CocoaPods
I was able to solve this problem by using the the latest beta of CocoaPods.
The fix to the embedded framework problem is listed in this bug report.
Hopefully the beta will soon be released.
Related Topics
How to Animate Uitableviewcell Height Using Auto-Layout
Swift 3: How to Add Watermark on Video? Avvideocompositioncoreanimationtool iOS 10 Issue
How to Dynamically Format a Number to Have Commas in a Uitextfield Entry
Is There Any Limitation to Distribution of Apps in iOS Enterprise Program
Pop the Current View Using Segues/Storyboard on iOS 5
Are There Any Analogues of [Nsstring Stringwithformat:] for Nsattributedstring
What Is the Impact of the "Requires Full Screen" Option in Xcode for an Iphone-Only App
Container View Getting Pushed Down as If It Had a Uinavigationbar
How Should a Swift + Objective-C Project Be Setup for Unit Testing
Where to Place a .Txt File and Read from It in a iOS Project
Wait for Swift Animation to Complete Before Executing Code
Swift: Equivalent Objective-C Runtime Class
How to Use Reusable Cells in Uitableview for iOS
How to Draw Inside the Black Edges in iOS Sdk with Opengl Es
Uidatepicker Bug? Uicontroleventvaluechanged After Hitting Minimum Internal