Create an iOS Universal Framework
Steven Shen
13314

Very handy. Thanks a lot for this.

But I want to point something out.

Currently, the build script you provided only works properly if you have a workspace — in other words, the build script is currently specifically for projects that use CocoaPods. If you don’t have a workspace, you can’t use this script.

So if you want to build your framework and you don’t have a workspace (or didn’t use CocoaPods), there’s thankfully an easy fix.

In the only two lines under the comment block that says “Build Frameworks” (currently starting on line 19 in the script provided above), change everything from:

xcodebuild -workspace ${PROJECT_NAME}.xcworkspace

To:

xcodebuild -project ${PROJECT_NAME}.xcodeproj

You need to make that change on lines 22 and 24, and your project will later properly build frameworks for you.

One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.