全部產品
Search
文件中心

Simple Log Service:安裝iOS SDK

更新時間:Aug 21, 2025

使用iOS SDK進行Log Service各類操作前,您需要安裝iOS SDK。本文介紹iOS SDK的安裝方法。

前提條件

安裝SDK

  1. 建立iOS專案。

  2. 在專案檔夾中,建立Podfile檔案,並輸入匯入Log ServiceiOS SDK依賴包的命令。

    # 請勿遺漏Master倉庫。
    source 'https://github.com/CocoaPods/Specs.git'
    source 'https://github.com/aliyun-sls/Specs.git'
    # 中國內地倉庫,必須添加
    source 'https://gitee.com/aliyun-sls/Specs.git'
    
    pod 'AliyunLogProducer', '~> 4.3.17'

    更多版本資訊,請參見Aliyun Log iOS SDK Release on GitHub

  3. 在專案檔夾下,執行以下命令匯入依賴包。

    pod install --repo-update

    安裝成功後,您就可以在專案中調用Log ServiceiOS SDK的介面。

相關文檔

後續步驟

iOS SDK快速入門