Yahoo objective-C SDK crashes in iOS 7

Hi Guys,

I am trying to fetch yahoo mail contacts in my app. I have successfully done it. In simulator everything is working fine. When I run the code on iOS6 device, I am getting the contacts of logged in user. But when I tried to run it on iOS7 it crashes. I am using Yahoo Objective - C SDK downloaded from http://github.com/yahoo/yos-social-objc . I have debug the code and found out that that in iOS7 the code is not getting any token.

- (void)sendUserToAuthorizationWithCallbackUrl:(NSString *)callbackUrl
    // create a new YOSAuthRequest used to fetch OAuth tokens.
    YOSAuthRequest *tokenAuthRequest = [YOSAuthRequest requestWi<thSession:self>];

    // fetch a new request token from oauth.
    YOSRequestToken *newRequestToken = [tokenAuthRequest fetchRequestTokenWithCa<llbackUrl:callbackUrl>];

    // if it looks like we have a valid request token
    **if(newRequestToken && newRequestToken.key && newRequestToken.secret) {
        // store the request token for later use
        [self setReq<uestToken:newRequestToken>];
        [self saveSession];

        // create an authorization URL for the request token
        NSURL *authorizationUrl = [tokenAuthRequest authUrlForReq<uestToken:requestToken>];

        //NSLog(@"authorizationUrl: %@",[authorizationUrl absoluteString]);

        // open safari with the auth url.
        [[UIApplication sharedApplication] <openURL:authorizationUrl>];
        // open the standard browser with the auth url.
        [[NSWorkspace sharedWorkspace] <openURL:authorizationUrl>];

    }** else {
        // NSLog(@"error fetching request token. check your consumer key and secret.");

In the above code app do net enter in IF condition in iOS7. It goes there in iOS6.

I have no idea how to overcome this problem. I am thinking that the SDK is not compatible to iOS7. If this is the case then please update the SDK for iOS7. If not then please give me a solution.

0 Replies

Recent Posts

in Contacts