Skydrive集成在iPhone App中

时间:2013-05-03 04:58:13

标签: iphone ios onedrive

我正在开发一个我已经集成了天空驱动框架的应用程序。但是当我尝试登录我的应用程序崩溃时。

这是我的代码

(IBAction)signInMethod:(id)sender { self.liveClient =
[[LiveConnectClient alloc] initWithClientId:APP_CLIENT_ID 
                                                     delegate:self 
                                                    userState:@"initialize"]; }

- (void)authCompleted:(LiveConnectSessionStatus) status 
          session:(LiveConnectSession *) session 
        userState:(id) userState { if ([userState isEqual:@"initialize"]) {
    NSLog(@"initialized");
    [self.liveClient login:self 
                    scopes:[NSArray arrayWithObjects:@"wl.signin", nil] 
                  delegate:self 
                 userState:@"signin"];

} if ([userState isEqual:@"signin"]) {
    if (session != nil)
    {
        NSLog(@"signed in");      
    }
     } }

- (void)authFailed:(NSError *) error 
     userState:(id)userState { NSLog(@"%@",[NSString stringWithFormat:@"Error: %@", [error localizedDescription]]); //   
[self.infoLabel setText:[NSString stringWithFormat:@"Error: %@",
[error localizedDescription]]]; }

修改

现在我可以登录了。我收到错误是因为我没有正确地集成框架。

0 个答案:

没有答案