标签:style blog http java color get
AVSO Cloud是解决云端数据存储,消息推送,用户行为统计分析和社会化组件以及后端部署的一站化提供商,支持iOS、安卓、JavaScript平台。
因为是一站式服务,AVOS Cloud比其他的平台有不少优势。
第二章、快速使用
AVOS Cloud的集成很方便,官方的介绍请看这里。
以下是iOS端的代码:
1 AVObject *gameScore = [AVObject objectWithClassName:@"GameScore"]; 2 [gameScore setObject:[NSNumber numberWithInt:1337] forKey:@"score"]; 3 [gameScore setObject:@"Steve" forKey:@"playerName"]; 4 [gameScore setObject:[NSNumber numberWithBool:NO] forKey:@"cheatMode"]; 5 [gameScore save];
1 // Send a notification to all devices subscribed to the "Giants" channel. 2 AVPush *push = [[AVPush alloc] init]; 3 [push setChannel:@"Giants"]; 4 [push setMessage:@"The Giants just scored!"]; 5 [push sendPushInBackground];
1 - (void)viewWillAppear:(BOOL)animated 2 { 3 [super viewWillAppear:animated]; 4 [AVAnalytics beginLogPageView:@"PageOne"]; 5 } 6 7 8 - (void)viewWillDisappear:(BOOL)animated { 9 [super viewWillDisappear:animated]; 10 [AVAnalytics endLogPageView:@"PageOne"]; 11 }
1 [AVOSCloudSNS setupPlatform:AVOSCloudSNSSinaWeibo withAppKey:@"Weibo APP ID" andAppSecret:@"Weibo APP KEY" andRedirectURI:nil]; 2 3 [AVOSCloudSNS loginWithCallback:^(id object, NSError *error) { 4 // Your code here 5 } toPlatform:AVOSCloudSNSSinaWeibo];
SVOS Cloud提供的服务使用起来明显要比其他的平台要好很多,对于像我这样的iOS开发者对服务端懂的不多,用它的服务还是能省很多事的。
AVOS Cloud的使用 学习笔记(一),布布扣,bubuko.com
标签:style blog http java color get
原文地址:http://www.cnblogs.com/lizhengfeng/p/3796869.html