Skip to content

Commit

Permalink
Add build script to build TwitterKit.zip
Browse files Browse the repository at this point in the history
  • Loading branch information
touren committed Oct 1, 2019
1 parent 91e829e commit 05f8c53
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions build.sh
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

0 comments on commit 05f8c53

Please sign in to comment.