Skip to content

Commit 6281908

Browse files
authored
Migrate from Cocoapods to the NavSDK Swift Package. (#2)
* Migrate from Cocoapods to the NavSDK Swift Package. * Update CI build workflow
1 parent e113b67 commit 6281908

4 files changed

Lines changed: 31 additions & 87 deletions

File tree

.github/workflows/build.yml

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -33,21 +33,13 @@ jobs:
3333
- name: Checkout repository
3434
uses: actions/checkout@v4
3535

36-
- name: Install CocoaPods
37-
run: |
38-
sudo gem install cocoapods
39-
40-
- name: Run pod install
41-
run: |
42-
pod install --project-directory=GoogleNavigation/
43-
4436
- name: Build project
4537
run: |
4638
echo "Replacing #error for API key"
4739
sed -i .prev '/#error/'d GoogleNavigation/GoogleNavSwiftXCFrameworkDemos/Swift/SDKDemoAPIKey.swift
4840
4941
echo "Building"
50-
xcodebuild -workspace GoogleNavigation/GoogleNavSwiftXCFrameworkDemos.xcworkspace \
42+
xcodebuild -project GoogleNavigation/GoogleNavSwiftXCFrameworkDemos.xcodeproj \
5143
-scheme GoogleNavSwiftXCFrameworkDemos \
5244
-destination 'platform=iOS Simulator,OS=17.4,name=iPhone 15' build | xcpretty
5345

GoogleNavigation/GoogleNavSwiftXCFrameworkDemos.xcodeproj/project.pbxproj

Lines changed: 28 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
archiveVersion = 1;
44
classes = {
55
};
6-
objectVersion = 46;
6+
objectVersion = 54;
77
objects = {
88

99
/* Begin PBXBuildFile section */
@@ -16,9 +16,9 @@
1616
49D133D6F625195FC8521780 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5CE5E48DA228BB59860ACE23 /* UIKit.framework */; };
1717
4EEE3524457DE349E3DD37F0 /* Samples.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1617FDDABDC70DD453461D77 /* Samples.swift */; };
1818
54A7283DE1892D3D78736CAF /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 77538FBE427713CB816C755A /* AppDelegate.swift */; };
19-
5A21420C97BBC6E893196CDB /* libPods-GoogleNavSwiftXCFrameworkDemos.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 24548A46F9E842A5C09A36CB /* libPods-GoogleNavSwiftXCFrameworkDemos.a */; };
2019
5A294265D3EFC4B371C9EDE4 /* NavigationSessionViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 297A8A512BD957DC1626C57C /* NavigationSessionViewController.swift */; };
2120
629711051AE66BD0F8D5D108 /* sdkdemos_icon@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 821EB50DDBB1FEB45F54B146 /* sdkdemos_icon@2x.png */; };
21+
681102D32F774402009813F4 /* GoogleNavigation in Frameworks */ = {isa = PBXBuildFile; productRef = 681102D22F774402009813F4 /* GoogleNavigation */; };
2222
6BD4DBC8C93ACDF7F882B8AD /* CarPlayApplicationSceneInformationController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3BA6BDD380853B13035AE4B7 /* CarPlayApplicationSceneInformationController.swift */; };
2323
745E78FEA809A2965D74B2CD /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = A78AA50DA7CCEEDA35CD2E59 /* SceneDelegate.swift */; };
2424
7A474626032F5671D1FC58C2 /* BasicNavigationViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9B46CD816554630041C1D32E /* BasicNavigationViewController.swift */; };
@@ -38,12 +38,10 @@
3838
0B0037238B773A4A26F4B5DE /* DataBackViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DataBackViewController.swift; sourceTree = "<group>"; };
3939
1617FDDABDC70DD453461D77 /* Samples.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Samples.swift; sourceTree = "<group>"; };
4040
17C85CE7271EB1D14BFD7782 /* sdkdemos_icon-72@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "sdkdemos_icon-72@2x.png"; sourceTree = "<group>"; };
41-
24548A46F9E842A5C09A36CB /* libPods-GoogleNavSwiftXCFrameworkDemos.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-GoogleNavSwiftXCFrameworkDemos.a"; sourceTree = BUILT_PRODUCTS_DIR; };
4241
297A8A512BD957DC1626C57C /* NavigationSessionViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NavigationSessionViewController.swift; sourceTree = "<group>"; };
4342
2D56C0322BA0AE65C91FC3E1 /* SampleListViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SampleListViewController.swift; sourceTree = "<group>"; };
4443
3BA6BDD380853B13035AE4B7 /* CarPlayApplicationSceneInformationController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CarPlayApplicationSceneInformationController.swift; sourceTree = "<group>"; };
4544
4819E459253950DAE6A0D537 /* StopoverViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StopoverViewController.swift; sourceTree = "<group>"; };
46-
4FE059D982007E9FBCD283F5 /* Pods-GoogleNavSwiftXCFrameworkDemos.default.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-GoogleNavSwiftXCFrameworkDemos.default.xcconfig"; path = "Target Support Files/Pods-GoogleNavSwiftXCFrameworkDemos/Pods-GoogleNavSwiftXCFrameworkDemos.default.xcconfig"; sourceTree = "<group>"; };
4745
5CE5E48DA228BB59860ACE23 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
4846
69E1261DEA6032884F8DBF79 /* NavigationUIOptionsViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NavigationUIOptionsViewController.swift; sourceTree = "<group>"; };
4947
6BE955240EDADAE394FFC0CA /* NavDemoSwitch.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NavDemoSwitch.swift; sourceTree = "<group>"; };
@@ -68,7 +66,7 @@
6866
buildActionMask = 2147483647;
6967
files = (
7068
49D133D6F625195FC8521780 /* UIKit.framework in Frameworks */,
71-
5A21420C97BBC6E893196CDB /* libPods-GoogleNavSwiftXCFrameworkDemos.a in Frameworks */,
69+
681102D32F774402009813F4 /* GoogleNavigation in Frameworks */,
7270
);
7371
runOnlyForDeploymentPostprocessing = 0;
7472
};
@@ -89,7 +87,6 @@
8987
A881143985DFC468E50E55CD /* Source */,
9088
7E8BB36B8A95BCCD0943D0C8 /* Frameworks */,
9189
77AB0A863C92B414E22C212E /* Products */,
92-
7B843019290B4C4950654280 /* Pods */,
9390
);
9491
sourceTree = "<group>";
9592
};
@@ -128,20 +125,10 @@
128125
name = Products;
129126
sourceTree = "<group>";
130127
};
131-
7B843019290B4C4950654280 /* Pods */ = {
132-
isa = PBXGroup;
133-
children = (
134-
4FE059D982007E9FBCD283F5 /* Pods-GoogleNavSwiftXCFrameworkDemos.default.xcconfig */,
135-
);
136-
name = Pods;
137-
path = Pods;
138-
sourceTree = "<group>";
139-
};
140128
7E8BB36B8A95BCCD0943D0C8 /* Frameworks */ = {
141129
isa = PBXGroup;
142130
children = (
143131
5CE5E48DA228BB59860ACE23 /* UIKit.framework */,
144-
24548A46F9E842A5C09A36CB /* libPods-GoogleNavSwiftXCFrameworkDemos.a */,
145132
);
146133
name = Frameworks;
147134
sourceTree = "<group>";
@@ -163,14 +150,14 @@
163150
A881143985DFC468E50E55CD /* Source */ = {
164151
isa = PBXGroup;
165152
children = (
166-
C7507AD6121FCBA13885B9A8 /* Images */,
153+
C7507AD6121FCBA13885B9A8 /* Resources/Images */,
167154
8A23E6011C6A2E32B082EA0B /* Swift */,
168155
);
169156
name = Source;
170157
path = GoogleNavSwiftXCFrameworkDemos;
171158
sourceTree = "<group>";
172159
};
173-
C7507AD6121FCBA13885B9A8 /* Images */ = {
160+
C7507AD6121FCBA13885B9A8 /* Resources/Images */ = {
174161
isa = PBXGroup;
175162
children = (
176163
F707B406E5F6163D4F9A91B4 /* sdkdemos_icon-72.png */,
@@ -188,11 +175,9 @@
188175
isa = PBXNativeTarget;
189176
buildConfigurationList = B74174651F6063BC55B20C23 /* Build configuration list for PBXNativeTarget "GoogleNavSwiftXCFrameworkDemos" */;
190177
buildPhases = (
191-
80BD9AB368CF71C9C7FEB462 /* [CP] Check Pods Manifest.lock */,
192178
A615EB11588E44CCF0E6D13B /* Resources */,
193179
4CD2D071AD5D684951B4F799 /* Sources */,
194180
8A1AA5E42F3D67C5755252E5 /* Frameworks */,
195-
EA5F5EBCC244573573AACE47 /* [CP] Copy Pods Resources */,
196181
);
197182
buildRules = (
198183
);
@@ -219,6 +204,9 @@
219204
Base,
220205
);
221206
mainGroup = 1BF4C93FD285F583BD375BD4;
207+
packageReferences = (
208+
681102D12F774402009813F4 /* XCRemoteSwiftPackageReference "ios-navigation-sdk" */,
209+
);
222210
productRefGroup = 77AB0A863C92B414E22C212E /* Products */;
223211
projectDirPath = "";
224212
projectRoot = "";
@@ -242,51 +230,6 @@
242230
};
243231
/* End PBXResourcesBuildPhase section */
244232

245-
/* Begin PBXShellScriptBuildPhase section */
246-
80BD9AB368CF71C9C7FEB462 /* [CP] Check Pods Manifest.lock */ = {
247-
isa = PBXShellScriptBuildPhase;
248-
buildActionMask = 2147483647;
249-
files = (
250-
);
251-
inputFileListPaths = (
252-
);
253-
inputPaths = (
254-
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
255-
"${PODS_ROOT}/Manifest.lock",
256-
);
257-
name = "[CP] Check Pods Manifest.lock";
258-
outputFileListPaths = (
259-
);
260-
outputPaths = (
261-
"$(DERIVED_FILE_DIR)/Pods-GoogleNavSwiftXCFrameworkDemos-checkManifestLockResult.txt",
262-
);
263-
runOnlyForDeploymentPostprocessing = 0;
264-
shellPath = /bin/sh;
265-
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";
266-
showEnvVarsInLog = 0;
267-
};
268-
EA5F5EBCC244573573AACE47 /* [CP] Copy Pods Resources */ = {
269-
isa = PBXShellScriptBuildPhase;
270-
buildActionMask = 2147483647;
271-
files = (
272-
);
273-
inputPaths = (
274-
"${PODS_ROOT}/Target Support Files/Pods-GoogleNavSwiftXCFrameworkDemos/Pods-GoogleNavSwiftXCFrameworkDemos-resources.sh",
275-
"${PODS_CONFIGURATION_BUILD_DIR}/GoogleMaps/GoogleMapsResources.bundle",
276-
"${PODS_CONFIGURATION_BUILD_DIR}/GoogleNavigation/GoogleNavigationResources.bundle",
277-
);
278-
name = "[CP] Copy Pods Resources";
279-
outputPaths = (
280-
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/GoogleMapsResources.bundle",
281-
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/GoogleNavigationResources.bundle",
282-
);
283-
runOnlyForDeploymentPostprocessing = 0;
284-
shellPath = /bin/sh;
285-
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-GoogleNavSwiftXCFrameworkDemos/Pods-GoogleNavSwiftXCFrameworkDemos-resources.sh\"\n";
286-
showEnvVarsInLog = 0;
287-
};
288-
/* End PBXShellScriptBuildPhase section */
289-
290233
/* Begin PBXSourcesBuildPhase section */
291234
4CD2D071AD5D684951B4F799 /* Sources */ = {
292235
isa = PBXSourcesBuildPhase;
@@ -318,12 +261,12 @@
318261
/* Begin XCBuildConfiguration section */
319262
7AB2FEFD1D26E09B00EEEAEE /* Default */ = {
320263
isa = XCBuildConfiguration;
321-
baseConfigurationReference = 4FE059D982007E9FBCD283F5 /* Pods-GoogleNavSwiftXCFrameworkDemos.default.xcconfig */;
322264
buildSettings = {
323265
"ARCHS[sdk=iphonesimulator*]" = x86_64;
324266
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
325267
CLANG_ENABLE_OBJC_ARC = YES;
326268
CODE_SIGN_IDENTITY = "iPhone Developer";
269+
DEVELOPMENT_TEAM = V6JUB3D3PN;
327270
INFOPLIST_FILE = ./GoogleNavSwiftXCFrameworkDemos/Info.plist;
328271
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
329272
LIBRARY_SEARCH_PATHS = (
@@ -368,6 +311,25 @@
368311
defaultConfigurationName = Default;
369312
};
370313
/* End XCConfigurationList section */
314+
315+
/* Begin XCRemoteSwiftPackageReference section */
316+
681102D12F774402009813F4 /* XCRemoteSwiftPackageReference "ios-navigation-sdk" */ = {
317+
isa = XCRemoteSwiftPackageReference;
318+
repositoryURL = "https://github.com/googlemaps/ios-navigation-sdk";
319+
requirement = {
320+
kind = upToNextMajorVersion;
321+
minimumVersion = 10.10.0;
322+
};
323+
};
324+
/* End XCRemoteSwiftPackageReference section */
325+
326+
/* Begin XCSwiftPackageProductDependency section */
327+
681102D22F774402009813F4 /* GoogleNavigation */ = {
328+
isa = XCSwiftPackageProductDependency;
329+
package = 681102D12F774402009813F4 /* XCRemoteSwiftPackageReference "ios-navigation-sdk" */;
330+
productName = GoogleNavigation;
331+
};
332+
/* End XCSwiftPackageProductDependency section */
371333
};
372334
rootObject = 499F56441D31C984A692DB05 /* Project object */;
373335
}

GoogleNavigation/Podfile

Lines changed: 0 additions & 8 deletions
This file was deleted.

README.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,11 @@ audience. You'll also need Xcode 15.0 or later. If you're new to the API, please
1111

1212
## Installation
1313

14-
The `GoogleNavigation` folder contains the Swift sample code that is downloaded
15-
when you run `pod try GoogleNavigation`. To use this project:
14+
The `GoogleNavigation` folder contains the Swift sample code. To use this project:
1615

1716
```
1817
$ cd GoogleNavigation
19-
$ pod install
20-
$ open GoogleNavSwiftXCFrameworkDemos.xcworkspace
18+
$ open GoogleNavSwiftXCFrameworkDemos.xcodeproj
2119
```
2220

2321
You will need to add an API Key to `GoogleNavigation/GoogleNavSwiftXCFrameworkDemos/Swift/SDKDemoAPIKey.swift`. Please see the

0 commit comments

Comments
 (0)