Navigation SDK for iOS 代码示例
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
GitHub 上的 Navigation SDK for iOS 示例代码库包含一个演示如何使用该 SDK 的示例应用。您可以导入并构建应用、添加 API 密钥、查看演示版,并以提供的示例代码为基础开发您的应用。该代码库包含两个版本的示例应用:
- Swift:
googlemaps-samples/maps-sdk-for-ios-samples
- Objective-C:
googlemaps-samples/maps-sdk-for-ios-samples
如需详细了解如何运行示例应用,请参阅试用演示。
Navigation SDK for iOS Codelab
如需了解如何通过构建简单的 iOS 应用来使用 Navigation SDK,请参阅
Navigation SDK for iOS Codelab。
此 Codelab 提供了有关如何使用 Swift 实现 SDK 的分步指南。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-08-31。
[null,null,["最后更新时间 (UTC):2025-08-31。"],[[["\u003cp\u003eThe Navigation SDK for iOS provides a sample app with demo code in both Swift and Objective-C to help developers get started.\u003c/p\u003e\n"],["\u003cp\u003eDevelopers can easily import, build, and run the sample app by adding their API key and viewing the provided demo.\u003c/p\u003e\n"],["\u003cp\u003eThe sample code serves as a starting point for developers to build their own navigation apps, with further guidance available in the \u003ca href=\"/maps/documentation/navigation/ios-sdk/try-demo\"\u003eTry the demo\u003c/a\u003e section.\u003c/p\u003e\n"],["\u003cp\u003eA step-by-step Swift implementation guide is offered through the \u003ca href=\"https://codelabs.developers.google.com/codelabs/maps-platform/navigation-sdk-101-ios\"\u003eNavigation SDK for iOS Codelab\u003c/a\u003e, ideal for learning the SDK's usage.\u003c/p\u003e\n"]]],["The Navigation SDK for iOS samples repository on GitHub offers a sample app in both Swift and Objective-C. Users can build the app, integrate their API key, and view a demo. The provided code serves as a foundation for custom app development. Additionally, a Navigation SDK for iOS Codelab guides users through building a basic iOS app using Swift with a step-by-step approach. Further details about running sample apps are available in the \"Try the demo\" section.\n"],null,["# Navigation SDK for iOS code samples\n\nThe Navigation SDK for iOS [samples repository on\nGitHub](https://github.com/googlemaps-samples/maps-sdk-for-ios-samples)\nincludes a sample app that demonstrates the use of the SDK. You can import and\nbuild the app, add your API key, view the demo, and use the sample code supplied\nas a starting point for your app. The repository contains two version of the\nsample app:\n\n- **Swift** : `googlemaps-samples/maps-sdk-for-ios-samples`\n- **Objective-C** : `googlemaps-samples/maps-sdk-for-ios-samples`\n\nFor more information about running the sample apps, see [Try the\ndemo](/maps/documentation/navigation/ios-sdk/try-demo).\n\nNavigation SDK for iOS Codelab\n------------------------------\n\nTo learn how to use the Navigation SDK by building a simple iOS app, see the [Navigation SDK for iOS\nCodelab](https://codelabs.developers.google.com/codelabs/maps-platform/navigation-sdk-101-ios).\nThe Codelab provides a step-by-step guide for implementing the SDK using Swift."]]