Skip to content

Commit e62d8c0

Browse files
committed
Added a build script and an initial Podspec for 0.1.0
1 parent 494a9b5 commit e62d8c0

File tree

2 files changed

+86
-0
lines changed

2 files changed

+86
-0
lines changed

FirebaseUI.podspec

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
Pod::Spec.new do |s|
2+
s.name = "FirebaseUI"
3+
s.version = "0.1.0"
4+
s.summary = "UI binding libraries for Firebase."
5+
s.homepage = "https://github.com/firebase/FirebaseUI-iOS"
6+
s.license = { :type => 'MIT', :file => 'LICENSE' }
7+
s.author = { "Firebase" => "[email protected]" }
8+
s.source = { :git => "https://github.com/firebase/FirebaseUI-iOS.git", :tag => 'v0.1.0' }
9+
s.source_files = "FirebaseUI/**/*.{h,m}"
10+
s.dependency 'Firebase', '~> 2.2'
11+
s.platform = :ios
12+
s.ios.deployment_target = '7.0'
13+
s.ios.framework = 'UIKit'
14+
s.xcconfig = { 'FRAMEWORK_SEARCH_PATHS' => '"$(PODS_ROOT)/Firebase"'}
15+
s.requires_arc = true
16+
end

build.sh

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
#!/bin/bash
2+
3+
set -e # Exit sub shell if anything erro
4+
DIR="$(cd "$(dirname "$0")"; pwd)"
5+
OUTPUT_DIR="${DIR}/target/"
6+
XCODE_PROJECT="${DIR}/FirebaseUI.xcodeproj"
7+
XCODEBUILD=xcodebuild
8+
9+
echo "===> Cleaning target directory"
10+
rm -rf $OUTPUT_DIR
11+
12+
echo "===> Building iOS binary"
13+
${XCODEBUILD} \
14+
-project ${XCODE_PROJECT} \
15+
-target FirebaseUI \
16+
-configuration Release \
17+
-sdk iphoneos \
18+
BUILD_DIR=${OUTPUT_DIR}/Products \
19+
OBJROOT=${OUTPUT_DIR}/Intermediates \
20+
BUILD_ROOT=${OUTPUT_DIR} \
21+
SYMROOT=${OUTPUT_DIR} \
22+
IPHONEOS_DEPLOYMENT_TARGET=7.0 \
23+
ONLY_ACTIVE_ARCH=NO \
24+
ARCHS="armv7 armv7s arm64" \
25+
build
26+
27+
echo "===> Building simulator binary"
28+
${XCODEBUILD} \
29+
-project ${XCODE_PROJECT} \
30+
-target FirebaseUI \
31+
-configuration Release \
32+
-sdk iphonesimulator \
33+
BUILD_DIR=${OUTPUT_DIR}/Products \
34+
OBJROOT=${OUTPUT_DIR}/Intermediates \
35+
BUILD_ROOT=${OUTPUT_DIR} \
36+
SYMROOT=${OUTPUT_DIR} \
37+
IPHONEOS_DEPLOYMENT_TARGET=7.0 \
38+
ONLY_ACTIVE_ARCH=NO \
39+
ARCHS="i386 x86_64" \
40+
build
41+
42+
echo "===> Using simulator binary as base project for headers and directory structure"
43+
cp -a ${OUTPUT_DIR}/Products/Release-iphonesimulator ${OUTPUT_DIR}/Products/Release-combined
44+
45+
echo -n "===> Combining all binaries into one ..."
46+
lipo \
47+
-create \
48+
${OUTPUT_DIR}/Products/Release-iphoneos/libFirebaseUI.a \
49+
${OUTPUT_DIR}/Products/Release-iphonesimulator/libFirebaseUI.a \
50+
-output ${OUTPUT_DIR}/Products/Release-combined/FirebaseUI.framework/Versions/A/FirebaseUI
51+
echo " done."
52+
53+
echo -n "===> Checking how the final binary looks ..."
54+
EXPECTEDCOUNT=6
55+
ARCHCOUNT=$(file ${OUTPUT_DIR}/Products/Release-combined/FirebaseUI.framework/Versions/A/FirebaseUI | wc -l)
56+
if [[ $ARCHCOUNT -ne $EXPECTEDCOUNT ]]; then
57+
echo " bad."
58+
file ${OUTPUT_DIR}/Products/Release-combined/FirebaseUI.framework/Versions/A/FirebaseUI
59+
echo "===> The architecture count ($ARCHCOUNT) looks wrong. It should be $EXPECTEDCOUNT.";
60+
exit 1
61+
else
62+
echo " good."
63+
fi
64+
65+
echo "===> Creating zip of final framework"
66+
pushd ${OUTPUT_DIR}/Products/Release-combined
67+
zip -ry ../../FirebaseUI.framework.zip FirebaseUI.framework
68+
popd
69+
70+
ls -l target/FirebaseUI.framework.zip

0 commit comments

Comments
 (0)