GitHub 上的 Places SDK for iOS 示範應用程式,可透過 Places SDK for iOS 示範多項功能,包括地點自動完成和地點相片。此外,這份開發人員指南的每一頁也會提供程式碼片段。匯入及建構應用程式、新增 API 金鑰、查看示範,以及使用隨附的程式碼範例著手建構應用程式。
執行範例應用程式時,畫面上會列出您的裝置可執行哪些範例功能。請選取其中一個選項,
在本機執行完整的範例應用程式
您可以從 GitHub 下載 Places SDK for iOS 範例應用程式封存檔。請按照下列步驟安裝及試用 Places SDK for iOS 範例應用程式。
[[["容易理解","easyToUnderstand","thumb-up"],["確實解決了我的問題","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["缺少我需要的資訊","missingTheInformationINeed","thumb-down"],["過於複雜/步驟過多","tooComplicatedTooManySteps","thumb-down"],["過時","outOfDate","thumb-down"],["翻譯問題","translationIssue","thumb-down"],["示例/程式碼問題","samplesCodeIssue","thumb-down"],["其他","otherDown","thumb-down"]],["上次更新時間:2025-03-27 (世界標準時間)。"],[[["The Places SDK for iOS provides a demo app showcasing features like place autocomplete and place photos, with code snippets and a full sample app for exploration."],["To run the sample app, download the archive, navigate to the GooglePlaces directory, install dependencies using CocoaPods, and open the Xcode workspace."],["Before building, enable the Places SDK for iOS in your Google Cloud project, obtain an API key (restricting it to the app's bundle identifier for security), and add your API key to the `SDKDemoAPIKey` file."],["Build and run the app, granting location access if prompted, to explore the available Places Demos and utilize the provided sample code as a starting point for your own applications."]]],[]]