全部产品
Search
文档中心

Simple Log Service:Instal Simple Log Service SDK untuk iOS

更新时间:Nov 09, 2025

Sebelum menggunakan Simple Log Service SDK untuk iOS dalam memanggil operasi Simple Log Service, Anda harus menginstal SDK tersebut. Panduan ini menjelaskan langkah-langkah instalasi Simple Log Service SDK untuk iOS.

Prasyarat

Instal SDK

  1. Buat proyek iOS.

  2. Di folder proyek, buat Podfile dan masukkan perintah untuk mengimpor dependensi Simple Log Service SDK untuk iOS ke dalam file tersebut.

    # Jangan abaikan repositori utama.
    source 'https://github.com/CocoaPods/Specs.git'
    source 'https://github.com/aliyun-sls/Specs.git'
    # Repositori untuk daratan Tiongkok diperlukan.
    source 'https://gitee.com/aliyun-sls/Specs.git'
    
    pod 'AliyunLogProducer', '~> 4.3.17'

    Untuk informasi lebih lanjut tentang versi, lihat Catatan rilis Alibaba Cloud Simple Log Service SDK untuk iOS di GitHub.

  3. Di folder proyek, jalankan perintah berikut untuk mengimpor dependensi:

    pod install --repo-update

    Setelah Simple Log Service SDK untuk iOS diinstal, Anda dapat memanggil operasi yang dienkapsulasi dalam SDK di proyek.

Referensi

Apa yang harus dilakukan selanjutnya

Mulai menggunakan Simple Log Service SDK untuk iOS.