Skip to content

Commit f92c197

Browse files
authored
Support SPM (Swift Package Manager) (#108)
* SPM support * Update KeenClientTD dependency to 3.9.0 * SDK user will need to add update_framework! to Podfile * No longer support standalone Framework
1 parent 8eb5320 commit f92c197

22 files changed

+180
-27
lines changed

.circleci/config.yml

+24
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,22 @@ commands:
8787
simulator: <<parameters.simulator>>
8888
- store_results
8989

90+
build_spm:
91+
description: "Build library as a Swift Package Manager"
92+
parameters:
93+
os:
94+
type: "string"
95+
default: "15.5"
96+
simulator:
97+
type: "string"
98+
default: "iPhone 13"
99+
steps:
100+
- checkout
101+
- auxiliary_setup
102+
- run:
103+
name: SPM build
104+
command: ./scripts/ci_spm_build 'platform=iOS Simulator,name=<<parameters.simulator>>,OS=<<parameters.os>>' logs/xcbuild_spm_ios_<<parameters.os>>.log
105+
- store_results
90106

91107
jobs:
92108
test_ios16:
@@ -129,6 +145,13 @@ jobs:
129145
os: "12.4"
130146
simulator: "iPhone X"
131147

148+
build_spm_ios15:
149+
macos:
150+
xcode: "13.4.1"
151+
steps:
152+
- build_spm:
153+
os: "15.5"
154+
simulator: "iPhone 13"
132155

133156
workflows:
134157
version: 2
@@ -139,3 +162,4 @@ workflows:
139162
- test_ios14
140163
- test_ios13
141164
- test_ios12
165+
- build_spm_ios15

.gitignore

+5
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,8 @@ TreasureDataExample/Podfile.lock
77
TreasureDataExampleSwift/Podfile.lock
88
build
99
Output
10+
11+
.build/
12+
13+
# Logs directory for CI scriptss
14+
logs/

Package.resolved

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"object": {
3+
"pins": [
4+
{
5+
"package": "KeenClientTD",
6+
"repositoryURL": "[email protected]:nacho4d/KeenClient-iOS.git",
7+
"state": {
8+
"branch": null,
9+
"revision": "0bb8f3f7c4ea03487f12bb1a11ec1021e3c10593",
10+
"version": "13.3.1"
11+
}
12+
}
13+
]
14+
},
15+
"version": 1
16+
}

Package.swift

+51
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
// swift-tools-version:5.1
2+
3+
import PackageDescription
4+
5+
let package = Package(
6+
name: "TreasureData-iOS-SDK",
7+
platforms: [
8+
.iOS(.v12),
9+
.tvOS(.v9)
10+
],
11+
products: [
12+
.library(
13+
name: "TreasureData-iOS-SDK",
14+
targets: ["TreasureData_iOS_SDK"]),
15+
],
16+
dependencies: [
17+
.package(url: "[email protected]:treasure-data/KeenClient-iOS.git", .exact("3.9.0"))
18+
],
19+
targets: [
20+
.target(
21+
name: "TreasureData_iOS_SDK",
22+
dependencies: [
23+
"KeenClientTD"
24+
],
25+
path: ".",
26+
exclude: [
27+
"TreasureData.xcodeproj/",
28+
"Podfile",
29+
"Podfile.lock",
30+
"Gemfile",
31+
"Rakefile",
32+
"scripts/",
33+
"TestHost/",
34+
"TreasureData-iOS-SDK.podspec",
35+
"TreasureDataExample/",
36+
"TreasureDataExampleSwift/",
37+
"TreasureDataTests/"
38+
],
39+
sources: [
40+
"TreasureData/",
41+
"TreasureDataInternal/",
42+
],
43+
publicHeadersPath: "TreasureData",
44+
cxxSettings: [
45+
.headerSearchPath("TreasureData"),
46+
.headerSearchPath("TreasureDataInternal"),
47+
]
48+
),
49+
],
50+
cxxLanguageStandard: .cxx1z
51+
)

Podfile

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
platform :ios, '7.0'
1+
platform :ios, '12.0'
2+
use_frameworks!
23

34
target 'TreasureData' do
4-
pod 'KeenClientTD', '= 3.3.0'
5+
pod 'KeenClientTD', '= 3.9.0'
56
end
67

78
target 'TreasureDataTests' do

Podfile.lock

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,6 @@ SPEC REPOS:
1313
SPEC CHECKSUMS:
1414
KeenClientTD: 0e0399a8e5030890ace84644cea0bd39463c3ad4
1515

16-
PODFILE CHECKSUM: 1f896df3bc3ce253b645f6fffc7b165c2819c6b7
16+
PODFILE CHECKSUM: 091a6cd77a6be77b4e4e4841fdf03fcf11300360
1717

18-
COCOAPODS: 1.9.3
18+
COCOAPODS: 1.11.3

TreasureData-iOS-SDK.podspec

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ Pod::Spec.new do |s|
99
s.platforms = { :ios => "7.0", :tvos => "9.0" }
1010
s.homepage = "https://github.com/treasure-data/td-ios-sdk"
1111
s.source = { :git => "https://github.com/treasure-data/td-ios-sdk.git", :tag => s.version.to_s }
12-
s.source_files = 'TreasureData'
12+
s.source_files = ['TreasureData', "TreasureDataInternal"]
1313
s.library = 'z'
1414
s.frameworks = 'Security', 'StoreKit'
1515
s.public_header_files = ["TreasureData/TreasureData.h", "TreasureData/TDClient.h", "TreasureData/TDRequestOptionsKey.h"]
16-
s.dependency "KeenClientTD", '= 3.3.0'
16+
s.dependency "KeenClientTD", '= 3.9.0'
1717
s.requires_arc = true
1818
end

TreasureData.xcodeproj/project.pbxproj

+46-19
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
objects = {
88

99
/* Begin PBXBuildFile section */
10+
183E38A18F0332AA400DC7CF /* Pods_TreasureDataTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 84D7672182E6BD476D808297 /* Pods_TreasureDataTests.framework */; };
1011
1950CB9871EC3D104BCD112A /* TDIAPObserver.m in Sources */ = {isa = PBXBuildFile; fileRef = 1950CA957CA6115F3C3DD018 /* TDIAPObserver.m */; };
11-
1F68EE6328E24A445D660A51 /* libPods-TreasureDataTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = E0DB92B1F49BBC30A854EB53 /* libPods-TreasureDataTests.a */; };
1212
2053A39C2047F37F0089A959 /* TDUtils.m in Sources */ = {isa = PBXBuildFile; fileRef = 2053A39B2047F37F0089A959 /* TDUtils.m */; };
1313
6B351A76194ABF0F001CBAAD /* Deflate.m in Sources */ = {isa = PBXBuildFile; fileRef = 6B351A75194ABF0F001CBAAD /* Deflate.m */; };
1414
6B738092192A09160097D56E /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6B738091192A09160097D56E /* Foundation.framework */; };
@@ -27,6 +27,7 @@
2727
6BF8C92F1A3E972C005B1804 /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6BF8C92E1A3E972C005B1804 /* Security.framework */; };
2828
6BF8C9311A3E977B005B1804 /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 6BF8C9301A3E977B005B1804 /* libz.dylib */; };
2929
6BF8C9341A3E9B76005B1804 /* TDClient.m in Sources */ = {isa = PBXBuildFile; fileRef = 6BF8C9331A3E9B76005B1804 /* TDClient.m */; };
30+
8E890072371B20F33AB2F9D1 /* Pods_TreasureData.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0DE64F5324C482BACF0070F9 /* Pods_TreasureData.framework */; };
3031
DF1DA0DA251DE468006EE00F /* TDRequestOptionsKey.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = DF259EBC22A5034A00697319 /* TDRequestOptionsKey.h */; };
3132
DF9D4DC6230FBC4200682E41 /* AdSupport.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DF9D4DC5230FBC4200682E41 /* AdSupport.framework */; };
3233
E52CB7F521FDD78A00062EBA /* TDAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = E52CB7F421FDD78A00062EBA /* TDAPI.swift */; };
@@ -36,7 +37,6 @@
3637
E5A84B5B21FEA35700BC699D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = E5A84B5A21FEA35700BC699D /* Assets.xcassets */; };
3738
E5A84B5E21FEA35700BC699D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = E5A84B5C21FEA35700BC699D /* LaunchScreen.storyboard */; };
3839
E5AD3AF22219A4E8001392BA /* IntegrationTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = E5AD3AF12219A4E8001392BA /* IntegrationTests.swift */; };
39-
EF5A04E746876D639D752AE1 /* libPods-TreasureData.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 11FADA7F69E6E148978C0F7C /* libPods-TreasureData.a */; };
4040
/* End PBXBuildFile section */
4141

4242
/* Begin PBXContainerItemProxy section */
@@ -72,7 +72,7 @@
7272
/* End PBXCopyFilesBuildPhase section */
7373

7474
/* Begin PBXFileReference section */
75-
11FADA7F69E6E148978C0F7C /* libPods-TreasureData.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-TreasureData.a"; sourceTree = BUILT_PRODUCTS_DIR; };
75+
0DE64F5324C482BACF0070F9 /* Pods_TreasureData.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_TreasureData.framework; sourceTree = BUILT_PRODUCTS_DIR; };
7676
1950C4C633D1BEA93C441EFC /* TDIAPObserver.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TDIAPObserver.h; sourceTree = "<group>"; };
7777
1950CA957CA6115F3C3DD018 /* TDIAPObserver.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TDIAPObserver.m; sourceTree = "<group>"; };
7878
19CFD6BDE2E7D4AC4F0869FF /* Pods-TreasureDataTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-TreasureDataTests.release.xcconfig"; path = "Pods/Target Support Files/Pods-TreasureDataTests/Pods-TreasureDataTests.release.xcconfig"; sourceTree = "<group>"; };
@@ -108,6 +108,7 @@
108108
6BF8C9321A3E9B76005B1804 /* TDClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TDClient.h; sourceTree = "<group>"; };
109109
6BF8C9331A3E9B76005B1804 /* TDClient.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TDClient.m; sourceTree = "<group>"; };
110110
7AAAA06E102D8C6F76B84CC0 /* Pods-TreasureData-TreasureDataTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-TreasureData-TreasureDataTests.release.xcconfig"; path = "Pods/Target Support Files/Pods-TreasureData-TreasureDataTests/Pods-TreasureData-TreasureDataTests.release.xcconfig"; sourceTree = "<group>"; };
111+
84D7672182E6BD476D808297 /* Pods_TreasureDataTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_TreasureDataTests.framework; sourceTree = BUILT_PRODUCTS_DIR; };
111112
8E147DCC7983A7FC2558B0A8 /* Pods-TreasureData.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-TreasureData.debug.xcconfig"; path = "Pods/Target Support Files/Pods-TreasureData/Pods-TreasureData.debug.xcconfig"; sourceTree = "<group>"; };
112113
9F0EF4E7CEE8DA4E298326B9 /* Pods-TreasureData.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-TreasureData.release.xcconfig"; path = "Pods/Target Support Files/Pods-TreasureData/Pods-TreasureData.release.xcconfig"; sourceTree = "<group>"; };
113114
C672A66407ACBC0B49C815A4 /* Pods-TreasureDataTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-TreasureDataTests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-TreasureDataTests/Pods-TreasureDataTests.debug.xcconfig"; sourceTree = "<group>"; };
@@ -116,7 +117,6 @@
116117
DF259EBC22A5034A00697319 /* TDRequestOptionsKey.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TDRequestOptionsKey.h; sourceTree = "<group>"; };
117118
DF259EBD22A5138800697319 /* NSString+Helpers.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "NSString+Helpers.h"; sourceTree = "<group>"; };
118119
DF9D4DC5230FBC4200682E41 /* AdSupport.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AdSupport.framework; path = System/Library/Frameworks/AdSupport.framework; sourceTree = SDKROOT; };
119-
E0DB92B1F49BBC30A854EB53 /* libPods-TreasureDataTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-TreasureDataTests.a"; sourceTree = BUILT_PRODUCTS_DIR; };
120120
E52CB7F121FDD6D300062EBA /* TreasureDataTests-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "TreasureDataTests-Bridging-Header.h"; sourceTree = "<group>"; };
121121
E52CB7F421FDD78A00062EBA /* TDAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TDAPI.swift; sourceTree = "<group>"; };
122122
E5701BA5225755C5000FB17F /* TDClientInternal.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TDClientInternal.h; sourceTree = "<group>"; };
@@ -136,7 +136,7 @@
136136
buildActionMask = 2147483647;
137137
files = (
138138
6B738092192A09160097D56E /* Foundation.framework in Frameworks */,
139-
EF5A04E746876D639D752AE1 /* libPods-TreasureData.a in Frameworks */,
139+
8E890072371B20F33AB2F9D1 /* Pods_TreasureData.framework in Frameworks */,
140140
);
141141
runOnlyForDeploymentPostprocessing = 0;
142142
};
@@ -151,7 +151,7 @@
151151
6B7380A0192A09160097D56E /* XCTest.framework in Frameworks */,
152152
6B7380A3192A09160097D56E /* UIKit.framework in Frameworks */,
153153
6B7380A1192A09160097D56E /* Foundation.framework in Frameworks */,
154-
1F68EE6328E24A445D660A51 /* libPods-TreasureDataTests.a in Frameworks */,
154+
183E38A18F0332AA400DC7CF /* Pods_TreasureDataTests.framework in Frameworks */,
155155
);
156156
runOnlyForDeploymentPostprocessing = 0;
157157
};
@@ -166,10 +166,29 @@
166166
/* End PBXFrameworksBuildPhase section */
167167

168168
/* Begin PBXGroup section */
169+
4F99812D269844A000471FD4 /* TreasureDataInternal */ = {
170+
isa = PBXGroup;
171+
children = (
172+
6B351A74194ABF0F001CBAAD /* Deflate.h */,
173+
6B351A75194ABF0F001CBAAD /* Deflate.m */,
174+
DF259EBD22A5138800697319 /* NSString+Helpers.h */,
175+
E5701BA5225755C5000FB17F /* TDClientInternal.h */,
176+
2053A39D2047F38B0089A959 /* TDUtils.h */,
177+
2053A39B2047F37F0089A959 /* TDUtils.m */,
178+
201053E9204858F8009C7EFA /* Constants.h */,
179+
6BB5A9D21D1A86CD0006A534 /* Session.h */,
180+
6BB5A9D31D1A86EE0006A534 /* Session.m */,
181+
1950C4C633D1BEA93C441EFC /* TDIAPObserver.h */,
182+
1950CA957CA6115F3C3DD018 /* TDIAPObserver.m */,
183+
);
184+
path = TreasureDataInternal;
185+
sourceTree = "<group>";
186+
};
169187
6B738085192A09160097D56E = {
170188
isa = PBXGroup;
171189
children = (
172190
6B738093192A09160097D56E /* TreasureData */,
191+
4F99812D269844A000471FD4 /* TreasureDataInternal */,
173192
6B7380A7192A09160097D56E /* TreasureDataTests */,
174193
E5A84B5221FEA35300BC699D /* TestHost */,
175194
6B738090192A09160097D56E /* Frameworks */,
@@ -199,31 +218,20 @@
199218
6B738091192A09160097D56E /* Foundation.framework */,
200219
6B73809F192A09160097D56E /* XCTest.framework */,
201220
6B7380A2192A09160097D56E /* UIKit.framework */,
202-
11FADA7F69E6E148978C0F7C /* libPods-TreasureData.a */,
203-
E0DB92B1F49BBC30A854EB53 /* libPods-TreasureDataTests.a */,
221+
0DE64F5324C482BACF0070F9 /* Pods_TreasureData.framework */,
222+
84D7672182E6BD476D808297 /* Pods_TreasureDataTests.framework */,
204223
);
205224
name = Frameworks;
206225
sourceTree = "<group>";
207226
};
208227
6B738093192A09160097D56E /* TreasureData */ = {
209228
isa = PBXGroup;
210229
children = (
211-
6B351A74194ABF0F001CBAAD /* Deflate.h */,
212-
6B351A75194ABF0F001CBAAD /* Deflate.m */,
213230
DF259EBC22A5034A00697319 /* TDRequestOptionsKey.h */,
214231
6B738096192A09160097D56E /* TreasureData.h */,
215232
6B738098192A09160097D56E /* TreasureData.m */,
216-
DF259EBD22A5138800697319 /* NSString+Helpers.h */,
217-
E5701BA5225755C5000FB17F /* TDClientInternal.h */,
218233
6BF8C9321A3E9B76005B1804 /* TDClient.h */,
219234
6BF8C9331A3E9B76005B1804 /* TDClient.m */,
220-
2053A39D2047F38B0089A959 /* TDUtils.h */,
221-
2053A39B2047F37F0089A959 /* TDUtils.m */,
222-
201053E9204858F8009C7EFA /* Constants.h */,
223-
6BB5A9D21D1A86CD0006A534 /* Session.h */,
224-
6BB5A9D31D1A86EE0006A534 /* Session.m */,
225-
1950C4C633D1BEA93C441EFC /* TDIAPObserver.h */,
226-
1950CA957CA6115F3C3DD018 /* TDIAPObserver.m */,
227235
6B738094192A09160097D56E /* Supporting Files */,
228236
);
229237
path = TreasureData;
@@ -329,6 +337,7 @@
329337
6B73809A192A09160097D56E /* Sources */,
330338
6B73809B192A09160097D56E /* Frameworks */,
331339
6B73809C192A09160097D56E /* Resources */,
340+
CF074E1CAB0F673E2F651431 /* [CP] Embed Pods Frameworks */,
332341
);
333342
buildRules = (
334343
);
@@ -458,6 +467,24 @@
458467
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
459468
showEnvVarsInLog = 0;
460469
};
470+
CF074E1CAB0F673E2F651431 /* [CP] Embed Pods Frameworks */ = {
471+
isa = PBXShellScriptBuildPhase;
472+
buildActionMask = 2147483647;
473+
files = (
474+
);
475+
inputPaths = (
476+
"${PODS_ROOT}/Target Support Files/Pods-TreasureDataTests/Pods-TreasureDataTests-frameworks.sh",
477+
"${BUILT_PRODUCTS_DIR}/KeenClientTD/KeenClientTD.framework",
478+
);
479+
name = "[CP] Embed Pods Frameworks";
480+
outputPaths = (
481+
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/KeenClientTD.framework",
482+
);
483+
runOnlyForDeploymentPostprocessing = 0;
484+
shellPath = /bin/sh;
485+
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-TreasureDataTests/Pods-TreasureDataTests-frameworks.sh\"\n";
486+
showEnvVarsInLog = 0;
487+
};
461488
/* End PBXShellScriptBuildPhase section */
462489

463490
/* Begin PBXSourcesBuildPhase section */

TreasureData/TDClient.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
//
88

99
#import <Foundation/Foundation.h>
10-
#import "KeenClientTD/KeenClient.h"
10+
@import KeenClientTD;
1111

1212
/**
1313
* The internal client using for sending requests. Most of the exposed properties could be configured via the container `TreasureData` instance. You probably need this only to tuning the retry parameters.

TreasureDataExample/Podfile

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
use_frameworks!
2+
13
target 'TreasureDataExample' do
24
pod 'TreasureData-iOS-SDK', :path => '..'
35
end
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

TreasureData/TDUtils.h TreasureDataInternal/TDUtils.h

+2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
// Copyright © 2018 Treasure Data. All rights reserved.
77
//
88

9+
#import <Foundation/Foundation.h>
10+
911
static NSString *const TDEventClassKey = @"__td_event_class";
1012
static NSString *const TDEventClassCustom = @"custom";
1113
static NSString *const TDEventClassAppLifecycle = @"app_lifecycle";

TreasureData/TDUtils.m TreasureDataInternal/TDUtils.m

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
#import "TDUtils.h"
1010
#import "Constants.h"
11-
#import "KeenClientTD/KeenClient.h"
11+
@import KeenClientTD;
1212

1313
@implementation TDUtils
1414

scripts/ci_spm_build

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#!/usr/bin/env bash
2+
3+
set -o pipefail
4+
5+
DESTINATION="$1"
6+
LOG_FILE="$2"
7+
8+
cd "$(dirname "$(dirname "${BASH_SOURCE[0]}")")"
9+
10+
# Remove xcode project and workspace so when xcodebuild is invoqued the default SPM package scheme is findable.
11+
rm -rf TreasureData.xcodeproj
12+
rm -rf TreasureData.xcworkspace
13+
xcodebuild -list -json
14+
15+
# For now only build.
16+
xcodebuild \
17+
-scheme "TreasureData-iOS-SDK" \
18+
-destination "$DESTINATION" \
19+
build \
20+
| tee "$LOG_FILE" \
21+
| xcpretty
22+
23+
xcodebuild_status=$?
24+
25+
exit $xcodebuild_status

0 commit comments

Comments
 (0)