Vatsal Manot Vatsal Manot - 1 year ago 80
iOS Question

Embedding a framework within a framework (iOS 8+)

iOS applications built with Xcode 6 or higher allow embedding dynamic iOS frameworks within them. I am building a shared framework and would like to embed a sub-framework. (This is possible, as demonstrated by CocoaPods).

Answer Source

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:

    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
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download