PROJECT=FooKit
mkdir $PROJECT
cd $PROJECT
swift package init --type library
swift package generate-xcodeproj
open $PROJECT.xcodeproj
- File -> New -> Target
- Select CrossPlatform -> Aggregate
- Name ${PROJECT}Universal
- Select Logit -> TARGETS -> ${PROJECT}Universal -> BuildPhases
- Press "+" and add Run Script
- Paste
build_framework.sh
- Switch Build target to ${PROJECT}Universal
- Build and the built framework will be created at project root directory
PROJECT=BarKit
mkdir $PROJECT
cd $PROJECT
swift package init --type library
swift package generate-xcodeproj
mkdir vendor
open $PROJECT.xcodeproj
Put all frameworks that you use into $PROJECT/vendor
- Create
${PROJECT}Universal
as same as previous project - Select $PROJECT -> PROJECT -> $PROJECT -> Build Settings -> Framework Search Paths
- Add
$(SRCROOT)/vendor
- Select $PROJECT -> TARGETS -> $PROJECT -> Linked Frameworks and Libraries
- D&D all frameworks under
$PROJECT/vendor
- Build