forked from touren/twitter-kit-ios
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add build script to build TwitterKit.zip
- Loading branch information
Showing
1 changed file
with
31 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
#!/bin/bash | ||
|
||
## Build TwitterKit.framework - x86_64 | ||
xcodebuild \ | ||
-project TwitterKit/TwitterKit.xcodeproj \ | ||
-scheme TwitterKit -configuration Debug \ | ||
-sdk "iphonesimulator13.0" \ | ||
HEADER_SEARCH_PATHS="$(pwd)/TwitterCore/iphonesimulator/Headers $(pwd)/TwitterCore/iphonesimulator/PrivateHeaders" \ | ||
CONFIGURATION_BUILD_DIR=./iphonesimulator \ | ||
clean build | ||
|
||
## Build TwitterKit.framework - armv7, arm64 | ||
xcodebuild \ | ||
-project TwitterKit/TwitterKit.xcodeproj \ | ||
-scheme TwitterKit -configuration Debug \ | ||
-sdk "iphoneos13.0" \ | ||
HEADER_SEARCH_PATHS="$(pwd)/TwitterCore/iphoneos/Headers $(pwd)/TwitterCore/iphoneos/PrivateHeaders" \ | ||
CONFIGURATION_BUILD_DIR=./iphoneos \ | ||
clean build | ||
|
||
## Merge into one TwitterKit.framework with x86_64, armv7, arm64 | ||
rm -rf iOS | ||
mkdir -p iOS | ||
cp -r TwitterKit/iphoneos/TwitterKit.framework/ iOS/TwitterKit.framework | ||
lipo -create -output iOS/TwitterKit.framework/TwitterKit TwitterKit/iphoneos/TwitterKit.framework/TwitterKit TwitterKit/iphonesimulator/TwitterKit.framework/TwitterKit | ||
lipo -archs iOS/TwitterKit.framework/TwitterKit | ||
|
||
## Zip them into TwitterKit.zip | ||
rm TwitterKit.zip | ||
zip -r TwitterKit.zip iOS/* | ||
rm -rf iOS |