Zadbaj o dobrą organizację dzięki kolekcji
Zapisuj i kategoryzuj treści zgodnie ze swoimi preferencjami.
Zespół Google Maps Platform regularnie aktualizuje pakiety SDK, wprowadzając nowe funkcje, poprawki błędów i ulepszenia wydajności. Na tej stronie znajdziesz wskazówki dotyczące zarządzania zależnościami w pakietach SDK na urządzenia mobilne.
Do której wersji linkować?
W przypadku aplikacji o krytycznym znaczeniu wskaż najnowszą wersję główną (X.*), której używasz, i co roku aktualizuj ją do nowej wersji głównej.
W trakcie publikowania nowych wersji aplikacji w ciągu roku możesz zacząć używać nowszych wersji pakietu Driver SDK na iOS. Nie będzie to wymagać aktualizacji aplikacji, ponieważ nowe wersje dot są wstecznie kompatybilne.
Zalety:
Jeśli wykryjesz problemy z pakietem Driver SDK na iOS, w ciągu 12 miesięcy od opublikowania jego głównej wersji zostaną one rozwiązane w sposób zgodny z wstecz prosty zgodnie z zasadami obsługi mobilnej. Aby skorzystać z poprawek, nie musisz pilnie przechodzić na niezgodną wersję pakietu SDK.
Najnowsze ulepszenia i funkcje są łatwe do wdrożenia, gdy aplikacja jest już skompilowana w najnowszej wersji.
Coroczne cząstkowe aktualizacje najnowszej głównej wersji pakietu SDK mogą wymagać mniej pracy w zakresie dostosowania, przepisania i przetestowania aplikacji niż w przypadku wprowadzania zmian niezgodnych ze starszymi wersjami w ramach kolejnych głównych wersji.
W przypadku aplikacji o mniejszym znaczeniu podaj link do dowolnej wersji z poprawkami. Gdy otrzymasz powiadomienie o wycofaniu tej wersji, będziesz mieć 12 miesięcy na udostępnienie zaktualizowanego kodu aplikacji użytkownikom.
Zalety:
rzadsze prace konserwacyjne,
Nowe wersje aplikacji dłużej będą obsługiwać urządzenia użytkowników z starszymi mobilnymi systemami operacyjnymi (do momentu przejścia na nowszą wersję pakietu SDK).
Właściciele projektów, którzy mają monitorowane adresy e-mail, otrzymują proaktywne powiadomienia o zmianach wpływających na każdy z ich projektów. Bądź na bieżąco z informacjami o najważniejszych aktualizacjach, wycofanych funkcjach i innych zmianach.
Instalacja
Zamiast używać operatora optymistycznego (~>), zawsze podawaj numer wersji w zależnościach, ponieważ może to prowadzić do nieprzewidywalnych i niepowtarzalnych kompilacji. Pakiet Driver SDK na iOS jest zgodny z wersją semantyczną, a nowe wersje główne zawierają zmiany powodujące niezgodność.
CocoaPods
Przykład zależności w pliku Podfile przy użyciu składni Podfile:
source "https://github.com/CocoaPods/Specs.git"
target 'YOUR_APPLICATION_TARGET_NAME_HERE' do
pod 'GoogleRidesharingDriver', '2.0.0'
end
Menedżer pakietów Swift
Pakiet SDK kierowcy można zainstalować za pomocą
menedżera pakietów Swift. Aby dodać pakiet SDK, usuń wszystkie istniejące zależności pakietu SDK kierowcy.
Aby dodać pakiet SDK do nowego lub istniejącego projektu:
Otwórz Xcode project lub workspace i kliknij Plik > Dodaj zależności pakietu.
Aby zainstalować konkretną wersję version, ustaw pole Reguła zależności na jedną z opcji opartych na wersji. W przypadku nowych projektów zalecamy określenie najnowszej wersji, używając opcji „Dokładna wersja”. Gdy skończysz, kliknij „Dodaj pakiet”.
Aby zaktualizować package w istniejącym projekcie:
Aby sprawdzić instalację, otwórz sekcję Zależności pakietu w Nawigatorze projektu i potwierdź pakiet oraz jego wersję.
Konserwacja i uaktualnienia
Aby korzystać z najnowszych ulepszeń, regularnie sprawdzaj, czy są dostępne nowsze wersje, i aktualizuj specyfikacje wersji. Jeśli przechodzisz na nową główną wersję, przeczytaj informacje o wersji, aby poznać zmiany powodujące niezgodność wsteczną i sposób aktualizacji kodu.
Cocoapods
Otwórz terminal i przejdź do katalogu zawierającego plik Podfile:
cd <path-to-project>
Uruchom pod outdated, aby sprawdzić, czy dostępna jest nowsza wersja pakietu Driver SDK na iOS.
Jeśli wykryjemy nowszą wersję pakietu SDK, zaktualizuj pakiet Podfile do tej wersji.
Aby dowiedzieć się, jak ustawić konkretną wersję w Podfile, zapoznaj się z artykułem Określanie wersji podgrup.
Uruchom pod update.
Wprowadź wszelkie zmiany wymagane w związku z aktualizacją. Lista zmian w poszczególnych wersjach znajduje się w informacjach o wersji.
Oczyść i ponownie skompiluj projekt, wybierając kolejno Produkt > Oczyść i Produkt > Kompiluj.
Oprócz pobierania nowych wersji właściciele projektów Google Cloud otrzymują e-maile o zmianach niezgodnych ze starszymi wersjami, które mogą mieć wpływ na ich projekty. Aby otrzymywać proaktywne powiadomienia o zmianach niezgodnych ze starszymi wersjami, przypisz rolę właściciela, używając monitorowanego adresu e-mail w przypadku każdego projektu.
[null,null,["Ostatnia aktualizacja: 2025-08-31 UTC."],[[["\u003cp\u003eGoogle Maps Platform SDKs are regularly updated with new features, bug fixes, and performance enhancements.\u003c/p\u003e\n"],["\u003cp\u003eFor critical apps, link to the latest dot release within your major version and upgrade to the new major version annually to receive ongoing support and benefit from the latest improvements.\u003c/p\u003e\n"],["\u003cp\u003eNon-critical apps can link to any fixed version and will have 12 months to update after receiving a deprecation notice, allowing for less frequent maintenance.\u003c/p\u003e\n"],["\u003cp\u003eAlways specify a version number when declaring SDK dependencies to ensure predictable and repeatable builds, avoiding the use of optimistic operators.\u003c/p\u003e\n"],["\u003cp\u003eStay informed about updates, deprecations, and other changes by monitoring the release notes and proactively checking for newer versions of the SDKs.\u003c/p\u003e\n"]]],["Google Maps Platform SDKs receive updates for features, fixes, and performance. For critical apps, link to the latest dot release (X.\\*) of your major version and upgrade annually, ensuring backward compatibility for 12 months post-release. Non-critical apps can use any fixed version, with 12 months' notice for deprecation. Specify version numbers instead of optimistic operators. Update by checking for new versions, modifying version specifications, and rebuilding the project. Project owners are emailed about breaking changes. Installation is available through CocoaPods and Swift Package Manager.\n"],null,["# Driver SDK for iOS versions\n\nThe Google Maps Platform team regularly updates SDKs with new features, bug fixes, and\nperformance improvements. This page provides guidance on how to manage your dependencies\non mobile SDKs.\n\nWhich version to link to?\n-------------------------\n\n- **For mission-critical apps**, link to the latest dot release of the major\n version that you are using (X.\\*), and upgrade yearly to the new major version.\n\n As you release new versions of your application\n throughout the year, you may start using newer dot versions of the Driver SDK for iOS. This will\n not require updates in your application as new dot versions are backward compatible.\n\n **Benefits:**\n - If you discover issues in the Driver SDK for iOS, fixes will be provided in a backward-compatible way for 12 months after the initial release of the major version, per the [Mobile support\n policy](https://developers.google.com/maps/software-support#sdk-support). You will not need to urgently upgrade to an *incompatible* SDK version to benefit from fixes.\n - The latest improvements and features are easy to adopt when your app is already built on the latest version.\n - Annual incremental updates to the newest major version of the SDK may require less work to adapt, rewrite, and test your application, than having to handle backwards-incompatible changes introduced across multiple major version releases.\n\n \u003cbr /\u003e\n\n- **For non-critical apps**, link to any fixed version. When you receive a deprecation\n notice for that fixed version, you will have 12 months to make your updated app code available to\n your users.\n\n **Benefits:**\n - Less frequent maintenance work.\n - New versions of your app keep supporting users' devices running older mobile operating systems for longer (until you need to upgrade to a new SDK version).\n\n \u003cbr /\u003e\n\nProject Owners with monitored email addresses receive proactive notifications about changes that\nimpact each of their projects. [Stay\ninformed](https://developers.google.com/maps/support#staying_informed) about major updates, deprecations, and other changes.\n\nInstallation\n------------\n\n\u003cbr /\u003e\n\nAlways specify a version number in your dependencies instead of using an\noptimistic operator (`~\u003e`) since that can lead to unpredictable and\nunrepeatable builds. The Driver SDK for iOS adheres to\n[semantic versioning](https://semver.org), and new major version releases\ninclude breaking changes.\n**Note:** Driver SDK for iOS does not support installation using Carthage. \n\n### CocoaPods\n\nAn example Podfile dependency using [Podfile](https://guides.cocoapods.org/using/the-podfile.html#specifying-pod-versions) syntax: \n\n```scdoc\n source \"https://github.com/CocoaPods/Specs.git\"\n\n target 'YOUR_APPLICATION_TARGET_NAME_HERE' do\n pod 'GoogleRidesharingDriver', '2.0.0'\n end\n \n```\n\n### Swift Package Manager\n\n\nThe Driver SDK can be installed via [Swift Package Manager](https://developer.apple.com/documentation/xcode/swift-packages). To add the SDK, ensure you have\nremoved any existing Driver SDK dependencies.\n\n| Important: These instructions assume the use of Xcode 15 or later, but should be similar for previous versions of Xcode.\n\n\u003cbr /\u003e\n\n\nTo add the SDK to a new or existing project, follow these steps:\n\n1. Open your Xcode `project` or `workspace`, then go to **File \\\u003e Add Package Dependencies**.\n2. Enter \u003chttps://github.com/googlemaps/ios-driver-sdk\u003e as the URL, press **Enter** to pull in the package, and click \"Add Package\".\n3. To install a specific `version`, set the **Dependency Rule** field to one of the version-based options. For new projects, we recommend specifying the latest version and using the \"Exact Version\" option. Once complete, click \"Add Package\".\n\nTo update the `package` for an existing project, follow these steps:\n\n1. To verify your installation, go to the **Package Dependencies** section of **Project Navigator** to verify the package and its version.\n\n| **Important:** Sometimes, artifacts cannot be resolved or errors can occur, in this case select \"File \\\u003e Packages \\\u003e Reset Package Cache\".\n\n\u003cbr /\u003e\n\nMaintenance and upgrade\n-----------------------\n\nTo build with the latest improvements, regularly check for newer versions and\nupdate your version specifications. If you are updating to a new major version,\ncheck the\n[release notes](/maps/documentation/mobility/services/resources/relnotes_driver_sdk_ios)\nfor backwards-incompatible changes and how to update your code. \n\n### Cocoapods\n\n1. Open a terminal and go to the directory containing the `Podfile`:\n\n ```text\n cd \u003cpath-to-project\u003e\n ```\n2. Run `pod outdated` to see if a newer version of the Driver SDK for iOS is available.\n3. If a newer version of the SDK is found, update your `Podfile` with this new version. See [Specifying pod versions](https://guides.cocoapods.org/using/the-podfile.html#specifying-pod-versions) to learn how to set a specific version in your `Podfile`.\n4. Run `pod update`.\n5. Make any necessary changes as a result of the upgrade. See the [Release Notes](/maps/documentation/mobility/driver-sdk/on-demand/ios/releases) for a list of the changes in each release.\n6. Clean and rebuild your project by selecting **Product \\\u003e Clean** and then **Product \\\u003e Build**\n\n### Manual installation\n\n\n[Get the link to the latest source files](/maps/documentation/mobility/driver-sdk/on-demand/ios/minimum-requirements#manual-installation)\nat Installing the SDK.\n\nIn addition to polling for newer versions, Google Cloud\n[project\nowners](https://cloud.google.com/iam/docs/understanding-roles#basic-definitions) receive emails about backwards incompatible changes that may affect their projects. To\nget proactive notification about backwards incompatible changes,\n[assign\nthe owner role](https://cloud.google.com/iam/docs/granting-changing-revoking-access) with a monitored email address for each of your projects."]]