Skip to content

Commit fb66274

Browse files
benmartenEnuviel
authored andcommitted
build(build.sh): fix buildscript
1 parent 0e7490f commit fb66274

File tree

3 files changed

+34
-30
lines changed

3 files changed

+34
-30
lines changed

Example/Leanplum-SDK.xcodeproj/project.pbxproj

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
objects = {
88

99
/* Begin PBXBuildFile section */
10-
023AD62018D26E4D7B906F56 /* libPods-Leanplum-SDK_Example.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A528472EB95B5050BE664390 /* libPods-Leanplum-SDK_Example.a */; };
10+
54BC995C354D98C2090B0509 /* libPods-Leanplum-tvOS-SDK_Example.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 8C19A3414A20DDBDA72ED71D /* libPods-Leanplum-tvOS-SDK_Example.a */; };
1111
6003F58E195388D20070C39A /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F58D195388D20070C39A /* Foundation.framework */; };
1212
6003F590195388D20070C39A /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F58F195388D20070C39A /* CoreGraphics.framework */; };
1313
6003F592195388D20070C39A /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F591195388D20070C39A /* UIKit.framework */; };
@@ -21,12 +21,12 @@
2121
6003F5B2195388D20070C39A /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F591195388D20070C39A /* UIKit.framework */; };
2222
6003F5BA195388D20070C39A /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 6003F5B8195388D20070C39A /* InfoPlist.strings */; };
2323
873B8AEB1B1F5CCA007FD442 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 873B8AEA1B1F5CCA007FD442 /* Main.storyboard */; };
24-
AEB95A90C8EF7920EB439ACA /* libPods-Leanplum-tvOS-SDK_Example.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A5FC397E4B653E5CE9DC3267 /* libPods-Leanplum-tvOS-SDK_Example.a */; };
2524
B5CCCA2D1D74B64D005ADEE1 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = B5CCCA2C1D74B64D005ADEE1 /* main.m */; };
2625
B5CCCA301D74B64D005ADEE1 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = B5CCCA2F1D74B64D005ADEE1 /* AppDelegate.m */; };
2726
B5CCCA331D74B64D005ADEE1 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = B5CCCA321D74B64D005ADEE1 /* ViewController.m */; };
2827
B5CCCA361D74B64D005ADEE1 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = B5CCCA341D74B64D005ADEE1 /* Main.storyboard */; };
2928
B5CCCA381D74B64D005ADEE1 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = B5CCCA371D74B64D005ADEE1 /* Assets.xcassets */; };
29+
D79223862565003C52D8C1BD /* libPods-Leanplum-SDK_Example.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6B5512CA4EF720C80A7B79F2 /* libPods-Leanplum-SDK_Example.a */; };
3030
/* End PBXBuildFile section */
3131

3232
/* Begin PBXContainerItemProxy section */
@@ -60,15 +60,15 @@
6060
6003F5B7195388D20070C39A /* Tests-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "Tests-Info.plist"; sourceTree = "<group>"; };
6161
6003F5B9195388D20070C39A /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
6262
606FC2411953D9B200FFA9A0 /* Tests-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Tests-Prefix.pch"; sourceTree = "<group>"; };
63+
6B5512CA4EF720C80A7B79F2 /* libPods-Leanplum-SDK_Example.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Leanplum-SDK_Example.a"; sourceTree = BUILT_PRODUCTS_DIR; };
6364
73B565AA61D6B6A4E92607C4 /* Pods-Leanplum-SDK_Tests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Leanplum-SDK_Tests.release.xcconfig"; path = "Pods/Target Support Files/Pods-Leanplum-SDK_Tests/Pods-Leanplum-SDK_Tests.release.xcconfig"; sourceTree = "<group>"; };
6465
742DDA885B7E0DC4FD74AD80 /* Leanplum-SDK.podspec */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = "Leanplum-SDK.podspec"; path = "../Leanplum-SDK.podspec"; sourceTree = "<group>"; };
6566
74C2EA3F2D53CAE77A03BFFA /* Pods-Leanplum-tvOS-SDK_Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Leanplum-tvOS-SDK_Example.release.xcconfig"; path = "Pods/Target Support Files/Pods-Leanplum-tvOS-SDK_Example/Pods-Leanplum-tvOS-SDK_Example.release.xcconfig"; sourceTree = "<group>"; };
6667
7849230A3D5C6DE5929ED1C8 /* Pods_Leanplum_SDK_Tests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Leanplum_SDK_Tests.framework; sourceTree = BUILT_PRODUCTS_DIR; };
6768
84A3C33C701600A874B8C63F /* README.md */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = net.daringfireball.markdown; name = README.md; path = ../README.md; sourceTree = "<group>"; };
6869
873B8AEA1B1F5CCA007FD442 /* Main.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = Main.storyboard; sourceTree = "<group>"; };
69-
A528472EB95B5050BE664390 /* libPods-Leanplum-SDK_Example.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Leanplum-SDK_Example.a"; sourceTree = BUILT_PRODUCTS_DIR; };
70+
8C19A3414A20DDBDA72ED71D /* libPods-Leanplum-tvOS-SDK_Example.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Leanplum-tvOS-SDK_Example.a"; sourceTree = BUILT_PRODUCTS_DIR; };
7071
A54ACCFCB36AE8C874708A7F /* libPods-Leanplum-SDK_Example-Leanplum-SDK_Tests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Leanplum-SDK_Example-Leanplum-SDK_Tests.a"; sourceTree = BUILT_PRODUCTS_DIR; };
71-
A5FC397E4B653E5CE9DC3267 /* libPods-Leanplum-tvOS-SDK_Example.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Leanplum-tvOS-SDK_Example.a"; sourceTree = BUILT_PRODUCTS_DIR; };
7272
B5CCCA291D74B64D005ADEE1 /* Leanplum-tvOS-SDK_Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Leanplum-tvOS-SDK_Example.app"; sourceTree = BUILT_PRODUCTS_DIR; };
7373
B5CCCA2C1D74B64D005ADEE1 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
7474
B5CCCA2E1D74B64D005ADEE1 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; };
@@ -91,7 +91,7 @@
9191
6003F590195388D20070C39A /* CoreGraphics.framework in Frameworks */,
9292
6003F592195388D20070C39A /* UIKit.framework in Frameworks */,
9393
6003F58E195388D20070C39A /* Foundation.framework in Frameworks */,
94-
023AD62018D26E4D7B906F56 /* libPods-Leanplum-SDK_Example.a in Frameworks */,
94+
D79223862565003C52D8C1BD /* libPods-Leanplum-SDK_Example.a in Frameworks */,
9595
);
9696
runOnlyForDeploymentPostprocessing = 0;
9797
};
@@ -109,7 +109,7 @@
109109
isa = PBXFrameworksBuildPhase;
110110
buildActionMask = 2147483647;
111111
files = (
112-
AEB95A90C8EF7920EB439ACA /* libPods-Leanplum-tvOS-SDK_Example.a in Frameworks */,
112+
54BC995C354D98C2090B0509 /* libPods-Leanplum-tvOS-SDK_Example.a in Frameworks */,
113113
);
114114
runOnlyForDeploymentPostprocessing = 0;
115115
};
@@ -148,8 +148,8 @@
148148
6003F5AF195388D20070C39A /* XCTest.framework */,
149149
7849230A3D5C6DE5929ED1C8 /* Pods_Leanplum_SDK_Tests.framework */,
150150
A54ACCFCB36AE8C874708A7F /* libPods-Leanplum-SDK_Example-Leanplum-SDK_Tests.a */,
151-
A528472EB95B5050BE664390 /* libPods-Leanplum-SDK_Example.a */,
152-
A5FC397E4B653E5CE9DC3267 /* libPods-Leanplum-tvOS-SDK_Example.a */,
151+
6B5512CA4EF720C80A7B79F2 /* libPods-Leanplum-SDK_Example.a */,
152+
8C19A3414A20DDBDA72ED71D /* libPods-Leanplum-tvOS-SDK_Example.a */,
153153
);
154154
name = Frameworks;
155155
sourceTree = "<group>";

Example/Podfile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
if ! ENV['LP_STATIC']
2+
use_frameworks!
3+
end
4+
15
target 'Leanplum-SDK_Example' do
26
platform :ios, '6.0'
37

build.sh

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -131,34 +131,34 @@ build_ios() {
131131
echo "Starting build for Leanplum-SDK (iOS)"
132132

133133
run "Building Leanplum-SDK (device/armv7) target ..." \
134-
xcodebuild -configuration "${CONFIGURATION}" -target "Leanplum-iOS-SDK-source-iOS" -sdk "${DEVICE_SDK}" \
134+
xcodebuild -configuration "${CONFIGURATION}" -target "Leanplum-iOS-SDK-source" -sdk "${DEVICE_SDK}" \
135135
"$ACTION" ARCHS='armv7' RUN_CLANG_STATIC_ANALYZER=NO BUILD_DIR="${BUILD_DIR}${ARMV7_DIR}" \
136136
BUILD_ROOT="${BUILD_ROOT}" OTHER_CFLAGS="-fembed-bitcode"
137137
run "Building Leanplum-SDK (device/armv7s) target ..." \
138-
xcodebuild -configuration "${CONFIGURATION}" -target "Leanplum-iOS-SDK-source-iOS" -sdk "${DEVICE_SDK}" \
138+
xcodebuild -configuration "${CONFIGURATION}" -target "Leanplum-iOS-SDK-source" -sdk "${DEVICE_SDK}" \
139139
"$ACTION" ARCHS='armv7s' RUN_CLANG_STATIC_ANALYZER=NO BUILD_DIR="${BUILD_DIR}${ARMV7S_DIR}" \
140140
BUILD_ROOT="${BUILD_ROOT}" OTHER_CFLAGS="-fembed-bitcode"
141141
run "Building Leanplum-SDK (device/arm64) target ..." \
142-
xcodebuild -configuration "${CONFIGURATION}" -target "Leanplum-iOS-SDK-source-iOS" -sdk "${DEVICE_SDK}" \
142+
xcodebuild -configuration "${CONFIGURATION}" -target "Leanplum-iOS-SDK-source" -sdk "${DEVICE_SDK}" \
143143
"$ACTION" ARCHS='arm64' RUN_CLANG_STATIC_ANALYZER=NO BUILD_DIR="${BUILD_DIR}${ARM64_DIR}" \
144144
BUILD_ROOT="${BUILD_ROOT}" OTHER_CFLAGS="-fembed-bitcode"
145145
run "Building Leanplum-SDK (simulator/i386) target ..." \
146-
xcodebuild -configuration "${CONFIGURATION}" -target "Leanplum-iOS-SDK-source-iOS" -sdk "${SIM_SDK}" \
146+
xcodebuild -configuration "${CONFIGURATION}" -target "Leanplum-iOS-SDK-source" -sdk "${SIM_SDK}" \
147147
"$ACTION" ARCHS='i386' VALID_ARCHS='i386' RUN_CLANG_STATIC_ANALYZER=NO \
148148
BUILD_DIR="${BUILD_DIR}${X86_DIR}" BUILD_ROOT="${BUILD_ROOT}" OTHER_CFLAGS="-fembed-bitcode"
149149
run "Building Leanplum-SDK (simulator/x86_64) target ..." \
150-
xcodebuild -configuration "${CONFIGURATION}" -target "Leanplum-iOS-SDK-source-iOS" -sdk "${SIM_SDK}" \
150+
xcodebuild -configuration "${CONFIGURATION}" -target "Leanplum-iOS-SDK-source" -sdk "${SIM_SDK}" \
151151
"$ACTION" ARCHS='x86_64' VALID_ARCHS='x86_64' RUN_CLANG_STATIC_ANALYZER=NO \
152152
BUILD_DIR="${BUILD_DIR}${X8664_DIR}" BUILD_ROOT="${BUILD_ROOT}" OTHER_CFLAGS="-fembed-bitcode"
153153

154154
mkdir "${RELEASE_DIR}/Leanplum.framework/"
155155
run "Combining builds to universal fat library ..." \
156156
lipo -create -output "${RELEASE_DIR}/Leanplum.framework/Leanplum" \
157-
"${CURRENTCONFIG_ARMV7_DEVICE_DIR}/Leanplum-iOS-SDK-source-iOS/libLeanplum-iOS-SDK-source-iOS.a" \
158-
"${CURRENTCONFIG_ARMV7S_DEVICE_DIR}/Leanplum-iOS-SDK-source-iOS/libLeanplum-iOS-SDK-source-iOS.a" \
159-
"${CURRENTCONFIG_ARM64_DEVICE_DIR}/Leanplum-iOS-SDK-source-iOS/libLeanplum-iOS-SDK-source-iOS.a" \
160-
"${CURRENTCONFIG_X86_DEVICE_DIR}/Leanplum-iOS-SDK-source-iOS/libLeanplum-iOS-SDK-source-iOS.a" \
161-
"${CURRENTCONFIG_X8664_SIMULATOR_DIR}/Leanplum-iOS-SDK-source-iOS/libLeanplum-iOS-SDK-source-iOS.a"
157+
"${CURRENTCONFIG_ARMV7_DEVICE_DIR}/Leanplum-iOS-SDK-source/libLeanplum-iOS-SDK-source.a" \
158+
"${CURRENTCONFIG_ARMV7S_DEVICE_DIR}/Leanplum-iOS-SDK-source/libLeanplum-iOS-SDK-source.a" \
159+
"${CURRENTCONFIG_ARM64_DEVICE_DIR}/Leanplum-iOS-SDK-source/libLeanplum-iOS-SDK-source.a" \
160+
"${CURRENTCONFIG_X86_DEVICE_DIR}/Leanplum-iOS-SDK-source/libLeanplum-iOS-SDK-source.a" \
161+
"${CURRENTCONFIG_X8664_SIMULATOR_DIR}/Leanplum-iOS-SDK-source/libLeanplum-iOS-SDK-source.a"
162162

163163
# Create .framework package.
164164
mkdir -p "${RELEASE_DIR}/Leanplum.framework"
@@ -195,36 +195,36 @@ build_ios_dylib() {
195195
echo "Starting build for Leanplum-SDK (iOS)"
196196

197197
run "Building Leanplum-SDK (device/armv7) target ..." \
198-
xcodebuild -configuration "${CONFIGURATION}" -target "Leanplum-iOS-SDK-source-iOS" -sdk "${DEVICE_SDK}" \
198+
xcodebuild -configuration "${CONFIGURATION}" -target "Leanplum-iOS-SDK-source" -sdk "${DEVICE_SDK}" \
199199
"$ACTION" ARCHS='armv7' RUN_CLANG_STATIC_ANALYZER=NO BUILD_DIR="${BUILD_DIR}${ARMV7_DIR}" \
200200
BUILD_ROOT="${BUILD_ROOT}" OTHER_CFLAGS="-fembed-bitcode"
201201
run "Building Leanplum-SDK (device/armv7s) target ..." \
202-
xcodebuild -configuration "${CONFIGURATION}" -target "Leanplum-iOS-SDK-source-iOS" -sdk "${DEVICE_SDK}" \
202+
xcodebuild -configuration "${CONFIGURATION}" -target "Leanplum-iOS-SDK-source" -sdk "${DEVICE_SDK}" \
203203
"$ACTION" ARCHS='armv7s' RUN_CLANG_STATIC_ANALYZER=NO BUILD_DIR="${BUILD_DIR}${ARMV7S_DIR}" \
204204
BUILD_ROOT="${BUILD_ROOT}" OTHER_CFLAGS="-fembed-bitcode"
205205
run "Building Leanplum-SDK (device/arm64) target ..." \
206-
xcodebuild -configuration "${CONFIGURATION}" -target "Leanplum-iOS-SDK-source-iOS" -sdk "${DEVICE_SDK}" \
206+
xcodebuild -configuration "${CONFIGURATION}" -target "Leanplum-iOS-SDK-source" -sdk "${DEVICE_SDK}" \
207207
"$ACTION" ARCHS='arm64' RUN_CLANG_STATIC_ANALYZER=NO BUILD_DIR="${BUILD_DIR}${ARM64_DIR}" \
208208
BUILD_ROOT="${BUILD_ROOT}" OTHER_CFLAGS="-fembed-bitcode"
209209
run "Building Leanplum-SDK (simulator/i386) target ..." \
210-
xcodebuild -configuration "${CONFIGURATION}" -target "Leanplum-iOS-SDK-source-iOS" -sdk "${SIM_SDK}" \
210+
xcodebuild -configuration "${CONFIGURATION}" -target "Leanplum-iOS-SDK-source" -sdk "${SIM_SDK}" \
211211
"$ACTION" ARCHS='i386' VALID_ARCHS='i386' RUN_CLANG_STATIC_ANALYZER=NO \
212212
BUILD_DIR="${BUILD_DIR}${X86_DIR}" BUILD_ROOT="${BUILD_ROOT}" OTHER_CFLAGS="-fembed-bitcode"
213213
run "Building Leanplum-SDK (simulator/x86_64) target ..." \
214-
xcodebuild -configuration "${CONFIGURATION}" -target "Leanplum-iOS-SDK-source-iOS" -sdk "${SIM_SDK}" \
214+
xcodebuild -configuration "${CONFIGURATION}" -target "Leanplum-iOS-SDK-source" -sdk "${SIM_SDK}" \
215215
"$ACTION" ARCHS='x86_64' VALID_ARCHS='x86_64' RUN_CLANG_STATIC_ANALYZER=NO \
216216
BUILD_DIR="${BUILD_DIR}${X8664_DIR}" BUILD_ROOT="${BUILD_ROOT}" OTHER_CFLAGS="-fembed-bitcode"
217217

218218
run "Combining builds to universal fat library ..." \
219219
lipo -create -output "${RELEASE_DIR}/Leanplum" \
220-
"${CURRENTCONFIG_ARMV7_DEVICE_DIR}/Leanplum-iOS-SDK-source-iOS/Leanplum.framework/Leanplum" \
221-
"${CURRENTCONFIG_ARMV7S_DEVICE_DIR}/Leanplum-iOS-SDK-source-iOS/Leanplum.framework/Leanplum" \
222-
"${CURRENTCONFIG_ARM64_DEVICE_DIR}/Leanplum-iOS-SDK-source-iOS/Leanplum.framework/Leanplum" \
223-
"${CURRENTCONFIG_X86_DEVICE_DIR}/Leanplum-iOS-SDK-source-iOS/Leanplum.framework/Leanplum" \
224-
"${CURRENTCONFIG_X8664_SIMULATOR_DIR}/Leanplum-iOS-SDK-source-iOS/Leanplum.framework/Leanplum"
220+
"${CURRENTCONFIG_ARMV7_DEVICE_DIR}/Leanplum-iOS-SDK-source/Leanplum.framework/Leanplum" \
221+
"${CURRENTCONFIG_ARMV7S_DEVICE_DIR}/Leanplum-iOS-SDK-source/Leanplum.framework/Leanplum" \
222+
"${CURRENTCONFIG_ARM64_DEVICE_DIR}/Leanplum-iOS-SDK-source/Leanplum.framework/Leanplum" \
223+
"${CURRENTCONFIG_X86_DEVICE_DIR}/Leanplum-iOS-SDK-source/Leanplum.framework/Leanplum" \
224+
"${CURRENTCONFIG_X8664_SIMULATOR_DIR}/Leanplum-iOS-SDK-source/Leanplum.framework/Leanplum"
225225

226226
# Copy generated framework
227-
cp -r "${BUILD_DIR}$ARMV7_DIR/$CONFIGURATION-iphoneos/Leanplum-iOS-SDK-source-iOS/Leanplum.framework/" \
227+
cp -r "${BUILD_DIR}$ARMV7_DIR/$CONFIGURATION-iphoneos/Leanplum-iOS-SDK-source/Leanplum.framework/" \
228228
"${RELEASE_DIR}/Leanplum.framework"
229229
rm -f "${RELEASE_DIR}/Leanplum.framework/Leanplum"
230230
mv "${RELEASE_DIR}/Leanplum" "${RELEASE_DIR}/Leanplum.framework/"
@@ -244,7 +244,7 @@ build_ios_dylib() {
244244
rm -rf "${RELEASE_DIR}/Leanplum.framework/_CodeSignature"
245245
# Update modulemap with correct import, since umbrella header is not generated by cocoapods with
246246
# a custom module_name set.
247-
sed -i "" -e "s/Leanplum-iOS-SDK-source-iOS-umbrella.h/Leanplum.h/g" \
247+
sed -i "" -e "s/Leanplum-iOS-SDK-source-umbrella.h/Leanplum.h/g" \
248248
"${RELEASE_DIR}/Leanplum.framework/modules/module.modulemap"
249249

250250
printf "%s\n" "Successfully built Leanplum-SDK (iOS) Framework.\n"

0 commit comments

Comments
 (0)