Latest 1.1.7
Homepage https://github.com/lujiajing1126/AliyunLogObjc
License MIT
Platforms ios 8.0, requires ARC
Dependencies Protobuf
Authors

AliyunLogObjc

Aliyun Sls Log SDK written in Objective-C

This is an UNOFFICIAL SDK for Aliyun SLS, if you have questions you can just propose an issue.

这是非官方SDK,如有问题,请移步 Issues,但请务必不要滥用 Issues,提问之前,请先 阅读常见问题部分 或 搜索是否有相关的问题

Install

Carthage

github "lujiajing1126/AliyunLogObjc"

Cocoapods

pod 'AliyunSlsObjc', '~> 1.1.7'

Example

#import <AliyunLogObjc/AliyunLogObjc.h>
// Use JSON
// AliSLSProtobufSerializer - Protobuf serializer is available now
LogClient *client = [[LogClient alloc] initWithApp: @"endpoint" accessKeyID:@"" accessKeySecret:@"" projectName:@"" serializeType: AliSLSJSONSerializer];
LogGroup *logGroup = [[LogGroup alloc] initWithTopic: @"" andSource:@""];
Log *log1 = [[Log alloc] init];
[log1 PutContent: @"Value" withKey: @"Key"];
[logGroup PutLog:log1];
[client PostLog:logGroup logStoreName: @"" call:^(NSURLResponse* _Nullable response,NSError* _Nullable error) {
    if (error != nil) {
    }
}];

常见问题

  • 由于最新版本引入了SLSprotobuf协议,编译如果找不到相应的协议文件,
    请参考 Issue #17

Acknownledge

https://github.com/aliyun/aliyun-log-ios-sdk

https://github.com/bilby91/HMACSigner

https://github.com/nicklockwood/GZIP

https://github.com/siuying/NSData-MD5

Latest podspec

{
    "name": "AliyunSlsObjc",
    "version": "1.1.7",
    "summary": "Aliyun Sls Log SDK for iOS",
    "description": "For the official Aliyun Sls SDK is written in Swift 2.3, it's improper for objc app to be packaged with the large Swift Core Lib and Swift Foundation Lib, about 30 Mb.nnThis SDK is mostly interpreted from the official one, but the quality of code has been improved compared with the unreasonable style in the original one.",
    "homepage": "https://github.com/lujiajing1126/AliyunLogObjc",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "lujiajing1126": "[email protected]"
    },
    "source": {
        "git": "https://github.com/lujiajing1126/AliyunLogObjc.git",
        "tag": "1.1.7"
    },
    "platforms": {
        "ios": "8.0"
    },
    "module_name": "AliyunLogObjc",
    "header_dir": "AliyunLogObjc",
    "pod_target_xcconfig": {
        "GCC_PREPROCESSOR_DEFINITIONS": "$(inherited) GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS=1"
    },
    "source_files": "AliyunLogObjc/**/*.{h,m}",
    "exclude_files": "AliyunLogObjc/**/*.pbobjc.{h,m}",
    "requires_arc": true,
    "prepare_command": "protoc -I "./AliyunLogObjc" --objc_out="./AliyunLogObjc/serde" "./AliyunLogObjc/sls.proto"",
    "dependencies": {
        "Protobuf": [
            "~> 3.6.1"
        ]
    },
    "subspecs": [
        {
            "name": "no-arc",
            "source_files": "AliyunLogObjc/**/*.pbobjc.{h,m}",
            "requires_arc": false
        }
    ]
}

Pin It on Pinterest

Share This