Restez organisé à l'aide des collections
Enregistrez et classez les contenus selon vos préférences.
Développeurs de l'Espace économique européen (EEE)
Le SDK Places Swift pour iOS fournit une version Swift du SDK Places pour iOS. Le SDK Places Swift pour iOS offre les mêmes fonctionnalités que le SDK Places pour iOS, avec de nombreux avantages supplémentaires grâce à son implémentation directe en Swift. Ces avantages exploitent les qualités uniques de Swift et favorisent donc l'écriture d'un code Swift plus idiomatique.
Voici les principales fonctionnalités du SDK Places pour Swift :
Migrer du SDK Places pour iOS vers le SDK Places Swift pour iOS
Le code du SDK Places Swift pour iOS fonctionne en parallèle des anciennes implémentations. Vous pouvez donc effectuer votre migration de manière progressive.
Sauf indication contraire, le contenu de cette page est régi par une licence Creative Commons Attribution 4.0, et les échantillons de code sont régis par une licence Apache 2.0. Pour en savoir plus, consultez les Règles du site Google Developers. Java est une marque déposée d'Oracle et/ou de ses sociétés affiliées.
Dernière mise à jour le 2025/08/31 (UTC).
[null,null,["Dernière mise à jour le 2025/08/31 (UTC)."],[[["\u003cp\u003ePlaces Swift SDK for iOS (Preview) offers a Swift-native experience with benefits like value types, default parameters, optionals, concurrency support, and improved type safety, built upon the existing Places SDK for iOS.\u003c/p\u003e\n"],["\u003cp\u003eIt's currently in preview mode and exclusively available for new Places SDK for iOS APIs, including Place Autocomplete, Details, Photos, Text Search, and Nearby Search.\u003c/p\u003e\n"],["\u003cp\u003eMigration from the existing Places SDK for iOS can be done incrementally as the new Swift SDK works alongside older implementations.\u003c/p\u003e\n"],["\u003cp\u003eThe GitHub URL for Places Swift SDK for iOS (Preview) has been updated to \u003ca href=\"https://github.com/googlemaps/ios-places-sdk\"\u003ehttps://github.com/googlemaps/ios-places-sdk\u003c/a\u003e, replacing the previous URL.\u003c/p\u003e\n"]]],[],null,["# Places Swift SDK for iOS\n\n\u003cbr /\u003e\n\n**European Economic Area (EEA) developers** If your billing address is in the European Economic Area, effective on 8 July 2025, the [Google Maps Platform EEA Terms of Service](https://cloud.google.com/terms/maps-platform/eea) will apply to your use of the Services. Functionality varies by region. [Learn more](/maps/comms/eea/faq).\n\nPlaces Swift SDK for iOS provides a Swift-first version of the\nPlaces SDK for iOS SDK. Places Swift SDK for iOS\noffers all the same capabilities that users are familiar with from the\nPlaces SDK for iOS, with many added benefits gained from\nbeing implemented directly in Swift. These benefits make use of Swift's unique\nqualities, and therefore promote writing more idiomatic Swift code.\n\nKey features of the Places Swift SDK include:\n\n- Extensive use of [value\n types](https://www.swift.org/documentation/articles/value-and-reference-types.html), [default parameter\n values](https://docs.swift.org/swift-book/documentation/the-swift-programming-language/functions/#Default-Parameter-Values), and [optionals](https://developer.apple.com/documentation/swift/optional)\n- Support for Swift concurrency.\n- Improved type-safety.\n\nPlaces Swift SDK for iOS is available exclusively in the\nPlaces SDK for iOS (New) APIs, which are comprised of the\nfollowing products:\n\n- [Place Autocomplete (New)](/maps/documentation/places/ios-sdk/place-autocomplete)\n- [Place Details (New)](/maps/documentation/places/ios-sdk/details-place)\n- [Places UI Kit](/maps/documentation/places/ios-sdk/places-ui-kit-overview)\n- [Place Photos (New)](/maps/documentation/places/ios-sdk/place-photos)\n- [Text Search (New)](/maps/documentation/places/ios-sdk/text-search)\n- [Nearby Search (New)](/maps/documentation/places/ios-sdk/nearby-search)\n\nMigrate from the Places SDK for iOS to the Places Swift SDK for iOS\n-------------------------------------------------------------------\n\nPlaces Swift SDK for iOS code works alongside older implementations,\nso your migration can be done incrementally.\n\nFor more information, and to learn how to migrate to the new SDK, [review the\nmigration guide](/maps/documentation/places/ios-sdk/migrate-places-sdk).\n| **Note:** The URL to access Places Swift SDK for iOS has changed. It is now \u003chttps://github.com/googlemaps/ios-places-sdk\u003e. If you have been using the previous URL (https://github.com/googlemaps/ios-places-swift-sdk), remove that GitHub URL from your Xcode package dependencies and enter the updated one.\n|\n|\n| If you try to add `GooglePlacesSwift` from a deprecated repository, you will see\n| the following error message: `Failed to resolve dependencies Dependencies could\n| not be resolved because no versions of 'ios-places-swift-sdk' match the\n| requirement 0.2.0 and root depends on 'ios-places-swift-sdk' 0.2.0.`\n|\n|\n| See [the installation page](/maps/documentation/places/ios-sdk/config) for more\n| information.\n\nNext steps\n----------\n\n- Learn [how to enable the Places SDK for iOS](/maps/documentation/places/ios-sdk/config#googleplacesswift) and start using Places Swift SDK for iOS.\n- Review the [Places Swift SDK for iOS API\n Reference](/maps/documentation/places/ios-sdk/reference/swift/Classes).\n- See the [release notes for Places Swift SDK for iOS](/maps/documentation/places/ios-sdk/places-swift-release-notes)"]]