地毯鋪設
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
使用 Carthage 安裝
Maps SDK for iOS 可與 Carthage 搭配使用,這是一款簡單的去中心化 Swift 和 Objective-C Cocoa 專案依附元件管理工具。
- 安裝 Carthage。方法有很多種,具體步驟請參閱 Carthage README 檔案。
- 如果您還沒有 Xcode 專案,請立即建立專案,並儲存至本機電腦。如果您是 iOS 開發新手:
- 建立新專案。
- 選取「iOS」>「應用程式」範本。
- 在專案選項畫面上:
- 輸入專案名稱。
- 記錄「Bundle ID」欄位的值。您可以使用該值限制下方的 API 金鑰。
- 將專案的「Interface」設為「Storyboard」。
- 將「Language」(語言) 設為「Swift」或「Objective-C」。
- 在專案目錄中建立名為
Cartfile
的檔案。這個檔案定義了專案的依附元件。
- 編輯
Cartfile
,並新增依附元件及其versions:
binary "https://dl.google.com/geosdk/GoogleMaps.json" == 6.2.1
請務必定期執行 carthage outdated
,以便偵測是否有較新版本,確保保持最新版本。如有需要,請升級至最新版本。
- 儲存
Cartfile
。
- 在終端機視窗中,前往包含
Cartfile
的目錄:
cd <path-to-project>
- 執行
carthage update
指令。這樣會安裝 Cartfile
中指定的 API 及其所有依附元件。
- 在 Finder 的專案目錄中,前往
Carthage/Build/iOS
底下的已下載的架構檔案。
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2023-12-08 (世界標準時間)。
[{
"type": "thumb-down",
"id": "missingTheInformationINeed",
"label":"缺少我需要的資訊"
},{
"type": "thumb-down",
"id": "tooComplicatedTooManySteps",
"label":"過於複雜/步驟過多"
},{
"type": "thumb-down",
"id": "outOfDate",
"label":"過時"
},{
"type": "thumb-down",
"id": "translationIssue",
"label":"翻譯問題"
},{
"type": "thumb-down",
"id": "samplesCodeIssue",
"label":"示例/程式碼問題"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"其他"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"容易理解"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"確實解決了我的問題"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"其他"
}]