Skip to content

Commit 21550b6

Browse files
authored
Add iOS Location as part of SDK repo (#481)
* Move Location to SDK workspace * Add Location Static targets * Build Location frameworks * Fix spm * Update travis to build location and SPM
1 parent bba8b53 commit 21550b6

File tree

13 files changed

+2437
-99
lines changed

13 files changed

+2437
-99
lines changed

.travis.yml

Lines changed: 20 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,18 @@ before_install:
1414
- gem install cocoapods # Since Travis is not always on latest version
1515
- pod install
1616

17-
before_script:
18-
>-
19-
if [ -z "$TRAVIS_TAG" ]
20-
then
21-
echo "No tag, so not triggering Location"
22-
else
23-
./Tools/triggerLocation.sh
24-
fi
25-
2617
before_deploy:
2718
- ./Tools/verifyTag.sh
28-
- ./Tools/build.sh
19+
- >
20+
if grep -q "/$TRAVIS_TAG/" Package.swift; then
21+
echo "Duplicate build from SPM update"
22+
exit 1
23+
fi
24+
- >
25+
if ! [ "$BUILD_ONCE" ]; then
26+
export BUILD_ONCE=1;
27+
./Tools/build.sh;
28+
fi
2929
3030
after_deploy:
3131
>-
@@ -45,8 +45,17 @@ deploy:
4545
skip_cleanup: true
4646
api_key: $GITHUB_TOKEN
4747
file:
48-
- Release/Leanplum.framework.zip
48+
- Leanplum.framework.zip
49+
- LeanplumLocation.framework.zip
4950
- Release/dynamic/Leanplum.xcframework.zip
5051
draft: true
5152
on:
5253
tags: true
54+
- provider: script
55+
skip_cleanup: true
56+
script:
57+
>-
58+
git restore --staged .; git add Package.swift; git commit -m 'update spm';
59+
git tag -f `cat sdk-version.txt`; git push -f origin `cat sdk-version.txt`;
60+
on:
61+
tags: true

Leanplum.xcworkspace/contents.xcworkspacedata

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

LeanplumSDKApp/LeanplumSDKApp.xcodeproj/project.pbxproj

Lines changed: 28 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@
1313
075AACF226847BF3007CA1BD /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 075AACF026847BF3007CA1BD /* Main.storyboard */; };
1414
075AACF426847BF4007CA1BD /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 075AACF326847BF4007CA1BD /* Assets.xcassets */; };
1515
075AACF726847BF4007CA1BD /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 075AACF526847BF4007CA1BD /* LaunchScreen.storyboard */; };
16-
075AAFB526849A74007CA1BD /* Leanplum.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 075AAFB426849A74007CA1BD /* Leanplum.framework */; };
17-
075AB09426849EBC007CA1BD /* Leanplum.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 075AB09326849EBC007CA1BD /* Leanplum.framework */; };
1816
075AB0962684A1A4007CA1BD /* Leanplum-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 075AB0952684A1A4007CA1BD /* Leanplum-Info.plist */; };
1917
075AB10B2684AAD9007CA1BD /* LPJSONTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 075AB0DD2684AAD8007CA1BD /* LPJSONTest.m */; };
2018
075AB10D2684AAD9007CA1BD /* LPAppIconManagerTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 075AB0DF2684AAD8007CA1BD /* LPAppIconManagerTest.m */; };
@@ -122,13 +120,16 @@
122120
07828DB4268B4A630029A339 /* local_caps_day_response.json in Resources */ = {isa = PBXBuildFile; fileRef = 07828DAA268B4A5E0029A339 /* local_caps_day_response.json */; };
123121
07828DB5268B4A630029A339 /* local_caps_session_response.json in Resources */ = {isa = PBXBuildFile; fileRef = 07828DAB268B4A5E0029A339 /* local_caps_session_response.json */; };
124122
07828DB7268B4AA00029A339 /* LPLocalCapsTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 07828DB6268B4AA00029A339 /* LPLocalCapsTest.m */; };
123+
6A2FE16027958D6000E4A8FE /* GeofencingTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 6A2FE15F27958D6000E4A8FE /* GeofencingTest.m */; };
125124
6A39C48F27283EE8000D5320 /* NotificationsProxyTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6A39C48E27283EE8000D5320 /* NotificationsProxyTest.swift */; };
126125
6A54E9CD273B156600DE0E61 /* NotificationsManagerTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6A54E9CC273B156600DE0E61 /* NotificationsManagerTest.swift */; };
127-
6A54E9D3273D814100DE0E61 /* Leanplum.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6A54E9D2273D814100DE0E61 /* Leanplum.framework */; };
128-
6A54E9D4273D814100DE0E61 /* Leanplum.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 6A54E9D2273D814100DE0E61 /* Leanplum.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
129126
6A9D0A9627342BA300466133 /* NotificationsProxyiOS9Test.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6A9D0A9527342BA300466133 /* NotificationsProxyiOS9Test.swift */; };
130127
6A9D0A9827342EE300466133 /* NotificationsManagerMock.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6A9D0A9727342EE300466133 /* NotificationsManagerMock.swift */; };
131128
6A9D0A9A273430A700466133 /* NotificationTestHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6A9D0A99273430A700466133 /* NotificationTestHelper.swift */; };
129+
6AEAEE5A2795B68700680F84 /* Leanplum.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6AEAEE592795B68700680F84 /* Leanplum.framework */; };
130+
6AEAEE5B2795B68700680F84 /* Leanplum.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 6AEAEE592795B68700680F84 /* Leanplum.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
131+
6AEAEE622795B72A00680F84 /* LeanplumLocationAndBeacons.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6AEAEE612795B72A00680F84 /* LeanplumLocationAndBeacons.framework */; };
132+
6AEAEE632795B73B00680F84 /* LeanplumLocationAndBeacons.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6AEAEE612795B72A00680F84 /* LeanplumLocationAndBeacons.framework */; };
132133
779F1FAA8AA2F3872AC876B2 /* Pods_LeanplumSDKTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E3C9DA445D159EC6FF97D42D /* Pods_LeanplumSDKTests.framework */; };
133134
C9D064B1275DFB4B00A7A5F9 /* LeanplumNotificationsManagerUtilsTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = C9D064B0275DFB4B00A7A5F9 /* LeanplumNotificationsManagerUtilsTest.swift */; };
134135
C9D503672754C9DC0034C5B3 /* PushNotificationSettingsTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = C9D503662754C9DC0034C5B3 /* PushNotificationSettingsTest.swift */; };
@@ -151,7 +152,7 @@
151152
dstPath = "";
152153
dstSubfolderSpec = 10;
153154
files = (
154-
6A54E9D4273D814100DE0E61 /* Leanplum.framework in Embed Frameworks */,
155+
6AEAEE5B2795B68700680F84 /* Leanplum.framework in Embed Frameworks */,
155156
);
156157
name = "Embed Frameworks";
157158
runOnlyForDeploymentPostprocessing = 0;
@@ -167,10 +168,8 @@
167168
075AACF326847BF4007CA1BD /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
168169
075AACF626847BF4007CA1BD /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
169170
075AACF826847BF4007CA1BD /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
170-
075AAFB426849A74007CA1BD /* Leanplum.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = Leanplum.framework; sourceTree = BUILT_PRODUCTS_DIR; };
171171
075AAFBC26849AC1007CA1BD /* LeanplumSDKTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = LeanplumSDKTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
172172
075AAFC026849AC1007CA1BD /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
173-
075AB09326849EBC007CA1BD /* Leanplum.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = Leanplum.framework; sourceTree = BUILT_PRODUCTS_DIR; };
174173
075AB0952684A1A4007CA1BD /* Leanplum-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist; name = "Leanplum-Info.plist"; path = "LeanplumSDKTests/Supporting Files/Leanplum-Info.plist"; sourceTree = SOURCE_ROOT; };
175174
075AB0DD2684AAD8007CA1BD /* LPJSONTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LPJSONTest.m; sourceTree = "<group>"; };
176175
075AB0DF2684AAD8007CA1BD /* LPAppIconManagerTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LPAppIconManagerTest.m; sourceTree = "<group>"; };
@@ -252,13 +251,15 @@
252251
07828DAD268B4A5E0029A339 /* local_caps_response.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = local_caps_response.json; sourceTree = "<group>"; };
253252
07828DB6268B4AA00029A339 /* LPLocalCapsTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LPLocalCapsTest.m; sourceTree = "<group>"; };
254253
4747227FD8352F14AF070969 /* Pods-LeanplumSDKTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-LeanplumSDKTests.debug.xcconfig"; path = "Target Support Files/Pods-LeanplumSDKTests/Pods-LeanplumSDKTests.debug.xcconfig"; sourceTree = "<group>"; };
254+
6A2FE15F27958D6000E4A8FE /* GeofencingTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeofencingTest.m; sourceTree = "<group>"; };
255255
6A39C48D27283EE7000D5320 /* LeanplumSDKTests-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "LeanplumSDKTests-Bridging-Header.h"; sourceTree = "<group>"; };
256256
6A39C48E27283EE8000D5320 /* NotificationsProxyTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NotificationsProxyTest.swift; sourceTree = "<group>"; };
257257
6A54E9CC273B156600DE0E61 /* NotificationsManagerTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NotificationsManagerTest.swift; sourceTree = "<group>"; };
258-
6A54E9D2273D814100DE0E61 /* Leanplum.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = Leanplum.framework; sourceTree = BUILT_PRODUCTS_DIR; };
259258
6A9D0A9527342BA300466133 /* NotificationsProxyiOS9Test.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NotificationsProxyiOS9Test.swift; sourceTree = "<group>"; };
260259
6A9D0A9727342EE300466133 /* NotificationsManagerMock.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NotificationsManagerMock.swift; sourceTree = "<group>"; };
261260
6A9D0A99273430A700466133 /* NotificationTestHelper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NotificationTestHelper.swift; sourceTree = "<group>"; };
261+
6AEAEE592795B68700680F84 /* Leanplum.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = Leanplum.framework; sourceTree = BUILT_PRODUCTS_DIR; };
262+
6AEAEE612795B72A00680F84 /* LeanplumLocationAndBeacons.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = LeanplumLocationAndBeacons.framework; sourceTree = BUILT_PRODUCTS_DIR; };
262263
B6B7D6D71F9664181C09E727 /* Pods-LeanplumSDKTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-LeanplumSDKTests.release.xcconfig"; path = "Target Support Files/Pods-LeanplumSDKTests/Pods-LeanplumSDKTests.release.xcconfig"; sourceTree = "<group>"; };
263264
C9D064B0275DFB4B00A7A5F9 /* LeanplumNotificationsManagerUtilsTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LeanplumNotificationsManagerUtilsTest.swift; sourceTree = "<group>"; };
264265
C9D503662754C9DC0034C5B3 /* PushNotificationSettingsTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PushNotificationSettingsTest.swift; sourceTree = "<group>"; };
@@ -270,17 +271,17 @@
270271
isa = PBXFrameworksBuildPhase;
271272
buildActionMask = 2147483647;
272273
files = (
273-
6A54E9D3273D814100DE0E61 /* Leanplum.framework in Frameworks */,
274-
075AAFB526849A74007CA1BD /* Leanplum.framework in Frameworks */,
274+
6AEAEE622795B72A00680F84 /* LeanplumLocationAndBeacons.framework in Frameworks */,
275+
6AEAEE5A2795B68700680F84 /* Leanplum.framework in Frameworks */,
275276
);
276277
runOnlyForDeploymentPostprocessing = 0;
277278
};
278279
075AAFB926849AC1007CA1BD /* Frameworks */ = {
279280
isa = PBXFrameworksBuildPhase;
280281
buildActionMask = 2147483647;
281282
files = (
282-
075AB09426849EBC007CA1BD /* Leanplum.framework in Frameworks */,
283283
779F1FAA8AA2F3872AC876B2 /* Pods_LeanplumSDKTests.framework in Frameworks */,
284+
6AEAEE632795B73B00680F84 /* LeanplumLocationAndBeacons.framework in Frameworks */,
284285
);
285286
runOnlyForDeploymentPostprocessing = 0;
286287
};
@@ -331,9 +332,8 @@
331332
075AAFB326849A74007CA1BD /* Frameworks */ = {
332333
isa = PBXGroup;
333334
children = (
334-
6A54E9D2273D814100DE0E61 /* Leanplum.framework */,
335-
075AB09326849EBC007CA1BD /* Leanplum.framework */,
336-
075AAFB426849A74007CA1BD /* Leanplum.framework */,
335+
6AEAEE612795B72A00680F84 /* LeanplumLocationAndBeacons.framework */,
336+
6AEAEE592795B68700680F84 /* Leanplum.framework */,
337337
E3C9DA445D159EC6FF97D42D /* Pods_LeanplumSDKTests.framework */,
338338
);
339339
name = Frameworks;
@@ -370,6 +370,7 @@
370370
075AAFC726849AE9007CA1BD /* Classes */ = {
371371
isa = PBXGroup;
372372
children = (
373+
6A2FE1822795994000E4A8FE /* LocationAndBeacons */,
373374
075AB0E82684AAD9007CA1BD /* ExceptionsTest.m */,
374375
075AB0EF2684AAD9007CA1BD /* LeanplumTest.m */,
375376
075AB0F42684AAD9007CA1BD /* LPActionContextTest.m */,
@@ -516,6 +517,14 @@
516517
path = TestData;
517518
sourceTree = "<group>";
518519
};
520+
6A2FE1822795994000E4A8FE /* LocationAndBeacons */ = {
521+
isa = PBXGroup;
522+
children = (
523+
6A2FE15F27958D6000E4A8FE /* GeofencingTest.m */,
524+
);
525+
path = LocationAndBeacons;
526+
sourceTree = "<group>";
527+
};
519528
E0CB0FD8F4E44175F7CB3EEF /* Pods */ = {
520529
isa = PBXGroup;
521530
children = (
@@ -578,6 +587,7 @@
578587
TargetAttributes = {
579588
075AACE626847BF3007CA1BD = {
580589
CreatedOnToolsVersion = 12.5.1;
590+
LastSwiftMigration = 1310;
581591
};
582592
075AAFBB26849AC1007CA1BD = {
583593
CreatedOnToolsVersion = 12.5.1;
@@ -773,6 +783,7 @@
773783
075AB11F2684AAD9007CA1BD /* LPNetworkOperationTest.m in Sources */,
774784
075AB1292684AAD9007CA1BD /* LPRequestSender+Categories.m in Sources */,
775785
075AB1252684AAD9007CA1BD /* LPNetworkEngine+Category.m in Sources */,
786+
6A2FE16027958D6000E4A8FE /* GeofencingTest.m in Sources */,
776787
075AB10F2684AAD9007CA1BD /* LPEventCallbackManagerTest.m in Sources */,
777788
075AB1162684AAD9007CA1BD /* ExceptionsTest.m in Sources */,
778789
075AB12C2684AAD9007CA1BD /* LeanplumHelper.m in Sources */,
@@ -950,6 +961,7 @@
950961
buildSettings = {
951962
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
952963
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
964+
CLANG_ENABLE_MODULES = YES;
953965
CODE_SIGN_IDENTITY = "Apple Development";
954966
CODE_SIGN_STYLE = Automatic;
955967
DEVELOPMENT_TEAM = 4XLWYATZ5P;
@@ -962,6 +974,7 @@
962974
PRODUCT_BUNDLE_IDENTIFIER = com.leanplum.LeanplumSDKApp;
963975
PRODUCT_NAME = "$(TARGET_NAME)";
964976
PROVISIONING_PROFILE_SPECIFIER = "";
977+
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
965978
SWIFT_VERSION = 5.0;
966979
TARGETED_DEVICE_FAMILY = "1,2";
967980
};
@@ -972,6 +985,7 @@
972985
buildSettings = {
973986
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
974987
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
988+
CLANG_ENABLE_MODULES = YES;
975989
CODE_SIGN_IDENTITY = "Apple Development";
976990
CODE_SIGN_STYLE = Automatic;
977991
DEVELOPMENT_TEAM = 4XLWYATZ5P;

0 commit comments

Comments
 (0)