From bd539e932f42c6973e325a6189af2c8af6f79c1f Mon Sep 17 00:00:00 2001 From: Pushkar Sharma Date: Fri, 27 Mar 2026 16:11:23 -0700 Subject: [PATCH 1/2] Migrate from Cocoapods to the NavSDK Swift Package. --- .../project.pbxproj | 94 ++++++------------- GoogleNavigation/Podfile | 8 -- README.md | 6 +- 3 files changed, 30 insertions(+), 78 deletions(-) delete mode 100755 GoogleNavigation/Podfile diff --git a/GoogleNavigation/GoogleNavSwiftXCFrameworkDemos.xcodeproj/project.pbxproj b/GoogleNavigation/GoogleNavSwiftXCFrameworkDemos.xcodeproj/project.pbxproj index 106c4d6..4b7f6d8 100644 --- a/GoogleNavigation/GoogleNavSwiftXCFrameworkDemos.xcodeproj/project.pbxproj +++ b/GoogleNavigation/GoogleNavSwiftXCFrameworkDemos.xcodeproj/project.pbxproj @@ -3,7 +3,7 @@ archiveVersion = 1; classes = { }; - objectVersion = 46; + objectVersion = 54; objects = { /* Begin PBXBuildFile section */ @@ -16,9 +16,9 @@ 49D133D6F625195FC8521780 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5CE5E48DA228BB59860ACE23 /* UIKit.framework */; }; 4EEE3524457DE349E3DD37F0 /* Samples.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1617FDDABDC70DD453461D77 /* Samples.swift */; }; 54A7283DE1892D3D78736CAF /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 77538FBE427713CB816C755A /* AppDelegate.swift */; }; - 5A21420C97BBC6E893196CDB /* libPods-GoogleNavSwiftXCFrameworkDemos.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 24548A46F9E842A5C09A36CB /* libPods-GoogleNavSwiftXCFrameworkDemos.a */; }; 5A294265D3EFC4B371C9EDE4 /* NavigationSessionViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 297A8A512BD957DC1626C57C /* NavigationSessionViewController.swift */; }; 629711051AE66BD0F8D5D108 /* sdkdemos_icon@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 821EB50DDBB1FEB45F54B146 /* sdkdemos_icon@2x.png */; }; + 681102D32F774402009813F4 /* GoogleNavigation in Frameworks */ = {isa = PBXBuildFile; productRef = 681102D22F774402009813F4 /* GoogleNavigation */; }; 6BD4DBC8C93ACDF7F882B8AD /* CarPlayApplicationSceneInformationController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3BA6BDD380853B13035AE4B7 /* CarPlayApplicationSceneInformationController.swift */; }; 745E78FEA809A2965D74B2CD /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = A78AA50DA7CCEEDA35CD2E59 /* SceneDelegate.swift */; }; 7A474626032F5671D1FC58C2 /* BasicNavigationViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9B46CD816554630041C1D32E /* BasicNavigationViewController.swift */; }; @@ -38,12 +38,10 @@ 0B0037238B773A4A26F4B5DE /* DataBackViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DataBackViewController.swift; sourceTree = ""; }; 1617FDDABDC70DD453461D77 /* Samples.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Samples.swift; sourceTree = ""; }; 17C85CE7271EB1D14BFD7782 /* sdkdemos_icon-72@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "sdkdemos_icon-72@2x.png"; sourceTree = ""; }; - 24548A46F9E842A5C09A36CB /* libPods-GoogleNavSwiftXCFrameworkDemos.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-GoogleNavSwiftXCFrameworkDemos.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 297A8A512BD957DC1626C57C /* NavigationSessionViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NavigationSessionViewController.swift; sourceTree = ""; }; 2D56C0322BA0AE65C91FC3E1 /* SampleListViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SampleListViewController.swift; sourceTree = ""; }; 3BA6BDD380853B13035AE4B7 /* CarPlayApplicationSceneInformationController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CarPlayApplicationSceneInformationController.swift; sourceTree = ""; }; 4819E459253950DAE6A0D537 /* StopoverViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StopoverViewController.swift; sourceTree = ""; }; - 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 = ""; }; 5CE5E48DA228BB59860ACE23 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; 69E1261DEA6032884F8DBF79 /* NavigationUIOptionsViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NavigationUIOptionsViewController.swift; sourceTree = ""; }; 6BE955240EDADAE394FFC0CA /* NavDemoSwitch.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NavDemoSwitch.swift; sourceTree = ""; }; @@ -68,7 +66,7 @@ buildActionMask = 2147483647; files = ( 49D133D6F625195FC8521780 /* UIKit.framework in Frameworks */, - 5A21420C97BBC6E893196CDB /* libPods-GoogleNavSwiftXCFrameworkDemos.a in Frameworks */, + 681102D32F774402009813F4 /* GoogleNavigation in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -89,7 +87,6 @@ A881143985DFC468E50E55CD /* Source */, 7E8BB36B8A95BCCD0943D0C8 /* Frameworks */, 77AB0A863C92B414E22C212E /* Products */, - 7B843019290B4C4950654280 /* Pods */, ); sourceTree = ""; }; @@ -128,20 +125,10 @@ name = Products; sourceTree = ""; }; - 7B843019290B4C4950654280 /* Pods */ = { - isa = PBXGroup; - children = ( - 4FE059D982007E9FBCD283F5 /* Pods-GoogleNavSwiftXCFrameworkDemos.default.xcconfig */, - ); - name = Pods; - path = Pods; - sourceTree = ""; - }; 7E8BB36B8A95BCCD0943D0C8 /* Frameworks */ = { isa = PBXGroup; children = ( 5CE5E48DA228BB59860ACE23 /* UIKit.framework */, - 24548A46F9E842A5C09A36CB /* libPods-GoogleNavSwiftXCFrameworkDemos.a */, ); name = Frameworks; sourceTree = ""; @@ -163,14 +150,14 @@ A881143985DFC468E50E55CD /* Source */ = { isa = PBXGroup; children = ( - C7507AD6121FCBA13885B9A8 /* Images */, + C7507AD6121FCBA13885B9A8 /* Resources/Images */, 8A23E6011C6A2E32B082EA0B /* Swift */, ); name = Source; path = GoogleNavSwiftXCFrameworkDemos; sourceTree = ""; }; - C7507AD6121FCBA13885B9A8 /* Images */ = { + C7507AD6121FCBA13885B9A8 /* Resources/Images */ = { isa = PBXGroup; children = ( F707B406E5F6163D4F9A91B4 /* sdkdemos_icon-72.png */, @@ -188,11 +175,9 @@ isa = PBXNativeTarget; buildConfigurationList = B74174651F6063BC55B20C23 /* Build configuration list for PBXNativeTarget "GoogleNavSwiftXCFrameworkDemos" */; buildPhases = ( - 80BD9AB368CF71C9C7FEB462 /* [CP] Check Pods Manifest.lock */, A615EB11588E44CCF0E6D13B /* Resources */, 4CD2D071AD5D684951B4F799 /* Sources */, 8A1AA5E42F3D67C5755252E5 /* Frameworks */, - EA5F5EBCC244573573AACE47 /* [CP] Copy Pods Resources */, ); buildRules = ( ); @@ -219,6 +204,9 @@ Base, ); mainGroup = 1BF4C93FD285F583BD375BD4; + packageReferences = ( + 681102D12F774402009813F4 /* XCRemoteSwiftPackageReference "ios-navigation-sdk" */, + ); productRefGroup = 77AB0A863C92B414E22C212E /* Products */; projectDirPath = ""; projectRoot = ""; @@ -242,51 +230,6 @@ }; /* End PBXResourcesBuildPhase section */ -/* Begin PBXShellScriptBuildPhase section */ - 80BD9AB368CF71C9C7FEB462 /* [CP] Check Pods Manifest.lock */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - ); - inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", - ); - name = "[CP] Check Pods Manifest.lock"; - outputFileListPaths = ( - ); - outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-GoogleNavSwiftXCFrameworkDemos-checkManifestLockResult.txt", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - 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"; - showEnvVarsInLog = 0; - }; - EA5F5EBCC244573573AACE47 /* [CP] Copy Pods Resources */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-GoogleNavSwiftXCFrameworkDemos/Pods-GoogleNavSwiftXCFrameworkDemos-resources.sh", - "${PODS_CONFIGURATION_BUILD_DIR}/GoogleMaps/GoogleMapsResources.bundle", - "${PODS_CONFIGURATION_BUILD_DIR}/GoogleNavigation/GoogleNavigationResources.bundle", - ); - name = "[CP] Copy Pods Resources"; - outputPaths = ( - "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/GoogleMapsResources.bundle", - "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/GoogleNavigationResources.bundle", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-GoogleNavSwiftXCFrameworkDemos/Pods-GoogleNavSwiftXCFrameworkDemos-resources.sh\"\n"; - showEnvVarsInLog = 0; - }; -/* End PBXShellScriptBuildPhase section */ - /* Begin PBXSourcesBuildPhase section */ 4CD2D071AD5D684951B4F799 /* Sources */ = { isa = PBXSourcesBuildPhase; @@ -318,12 +261,12 @@ /* Begin XCBuildConfiguration section */ 7AB2FEFD1D26E09B00EEEAEE /* Default */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 4FE059D982007E9FBCD283F5 /* Pods-GoogleNavSwiftXCFrameworkDemos.default.xcconfig */; buildSettings = { "ARCHS[sdk=iphonesimulator*]" = x86_64; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_OBJC_ARC = YES; CODE_SIGN_IDENTITY = "iPhone Developer"; + DEVELOPMENT_TEAM = V6JUB3D3PN; INFOPLIST_FILE = ./GoogleNavSwiftXCFrameworkDemos/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 15.0; LIBRARY_SEARCH_PATHS = ( @@ -368,6 +311,25 @@ defaultConfigurationName = Default; }; /* End XCConfigurationList section */ + +/* Begin XCRemoteSwiftPackageReference section */ + 681102D12F774402009813F4 /* XCRemoteSwiftPackageReference "ios-navigation-sdk" */ = { + isa = XCRemoteSwiftPackageReference; + repositoryURL = "https://github.com/googlemaps/ios-navigation-sdk"; + requirement = { + kind = upToNextMajorVersion; + minimumVersion = 10.10.0; + }; + }; +/* End XCRemoteSwiftPackageReference section */ + +/* Begin XCSwiftPackageProductDependency section */ + 681102D22F774402009813F4 /* GoogleNavigation */ = { + isa = XCSwiftPackageProductDependency; + package = 681102D12F774402009813F4 /* XCRemoteSwiftPackageReference "ios-navigation-sdk" */; + productName = GoogleNavigation; + }; +/* End XCSwiftPackageProductDependency section */ }; rootObject = 499F56441D31C984A692DB05 /* Project object */; } diff --git a/GoogleNavigation/Podfile b/GoogleNavigation/Podfile deleted file mode 100755 index 47f2daa..0000000 --- a/GoogleNavigation/Podfile +++ /dev/null @@ -1,8 +0,0 @@ -source 'https://cdn.cocoapods.org/' - -platform :ios, '15.0' - -target 'GoogleNavSwiftXCFrameworkDemos' do - project 'GoogleNavSwiftXCFrameworkDemos' - pod 'GoogleNavigation', '= 9.2.0' -end diff --git a/README.md b/README.md index 68f1fa6..4df25ec 100644 --- a/README.md +++ b/README.md @@ -11,13 +11,11 @@ audience. You'll also need Xcode 15.0 or later. If you're new to the API, please ## Installation -The `GoogleNavigation` folder contains the Swift sample code that is downloaded -when you run `pod try GoogleNavigation`. To use this project: +The `GoogleNavigation` folder contains the Swift sample code. To use this project: ``` $ cd GoogleNavigation -$ pod install -$ open GoogleNavSwiftXCFrameworkDemos.xcworkspace +$ open GoogleNavSwiftXCFrameworkDemos.xcodeproj ``` You will need to add an API Key to `GoogleNavigation/GoogleNavSwiftXCFrameworkDemos/Swift/SDKDemoAPIKey.swift`. Please see the From f1c682859280470d6cdcf701b8eebf18229d12ea Mon Sep 17 00:00:00 2001 From: Pushkar Sharma Date: Tue, 31 Mar 2026 11:47:36 -0700 Subject: [PATCH 2/2] Update CI build workflow --- .github/workflows/build.yml | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7352d0e..0fbfd72 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -33,21 +33,13 @@ jobs: - name: Checkout repository uses: actions/checkout@v4 - - name: Install CocoaPods - run: | - sudo gem install cocoapods - - - name: Run pod install - run: | - pod install --project-directory=GoogleNavigation/ - - name: Build project run: | echo "Replacing #error for API key" sed -i .prev '/#error/'d GoogleNavigation/GoogleNavSwiftXCFrameworkDemos/Swift/SDKDemoAPIKey.swift echo "Building" - xcodebuild -workspace GoogleNavigation/GoogleNavSwiftXCFrameworkDemos.xcworkspace \ + xcodebuild -project GoogleNavigation/GoogleNavSwiftXCFrameworkDemos.xcodeproj \ -scheme GoogleNavSwiftXCFrameworkDemos \ -destination 'platform=iOS Simulator,OS=17.4,name=iPhone 15' build | xcpretty