lujiajing1126 / AliyunLogObjc

Aliyun Sls Log SDK for iOS
MIT License
22 stars 12 forks source link

这个sdk如何使用 #4

Closed Kyoooooo closed 7 years ago

Kyoooooo commented 7 years ago

求sdk下载地址,我下了你的这个demo,导入到了我的工程,但是头文件找不到啊,希望能尽快得到您的回复

lujiajing1126 commented 7 years ago
#import <AliyunLogObjc/AliyunLogObjc.h>

这个头文件找不到吗?

Kyoooooo commented 7 years ago

对 就是这个头文件找不到

Kyoooooo commented 7 years ago

a0f943f8-1a85-465a-9968-f00866c3e87c 我导入工程的就是这些了

lujiajing1126 commented 7 years ago

额,你需要把这个项目导入,然后link Framework and Library

是这样操作的吗

Kyoooooo commented 7 years ago

能说的详细一点吗,详细的操作步骤,为啥不支持CocoaPod了

Kyoooooo commented 7 years ago

大神还在吗,想问一下LogGroup *logGroup = [[LogGroup alloc] initWithTopic: @"" andSource:@""];这里的topic和source应该填什么,稍微试了一下一直提示错误:未能读取数据,因为它的格式不正确。

lujiajing1126 commented 7 years ago

topic是区别你的日志的种类,source是区别发送日志方的

Kyoooooo commented 7 years ago

一直提示错误:未能读取数据,因为它的格式不正确。如何解决呢

Kyoooooo commented 7 years ago

LogClient client = [[LogClient alloc] initWithApp: kAliyunEndPoint accessKeyID:kAliyunAccessKey accessKeySecret:kAliyunSecretKey projectName:kAliyunbucketName]; LogGroup logGroup = [[LogGroup alloc] initWithTopic: @"meterReading" andSource:@"ios"]; Log log1 = [[Log alloc] init]; [log1 PutContent: @"Value" withKey: @"Key"]; [logGroup PutLog:log1]; [client PostLog:logGroup logStoreName: @"meterReadingParams" call:^(NSURLResponse _Nullable response,NSError* _Nullable error) { if (error) { YWLog(@"%@",error); } }];

lujiajing1126 commented 7 years ago

你这个代码能跑起来吗。log1logGroup不该都是指针吗