Install Simple Log Service (SLS) SDK for iOS before you use the SDK to call SLS operations.
Prerequisites
-
Simple Log Service is activated. Activate Simple Log Service.
-
An iOS development environment is set up. For more information, see Apple Developer.
Procedure
-
Create an iOS project.
-
In the project folder, create a Podfile and add the following dependency import configuration.
# You must import the following master repositories: source 'https://github.com/CocoaPods/Specs.git' source 'https://github.com/aliyun-sls/Specs.git' # If you want to use a repository available in the Chinese mainland, you must import the following repository: source 'https://gitee.com/aliyun-sls/Specs.git' pod 'AliyunLogProducer', '~> 4.3.17'For more information about versions, see Release notes of Alibaba Cloud Simple Log Service SDK for iOS on GitHub.
-
In the project folder, run the following command to import the dependencies:
pod install --repo-updateAfter the SDK is installed, you can call SLS SDK operations in the project.
References
In addition to its native SDK, SLS also supports the common Alibaba Cloud SDKs. For more information, see Simple Log Service_SDK Center_Alibaba Cloud OpenAPI Explorer.
-
For more information about sample code, see Alibaba Cloud Simple Log Service SDK for iOS on GitHub.