microsoft/project-rome

Could not login using iOS example project

Opened this issue · 1 comments

I have run example project from SDKSample. The code in the class IdentityViewController in the block never executes:

_platformManager.accountsPromise.then(^{
// ... code
});

So after success authentication to Microsoft account, _transitionToMainViewController method does not execute.

I've the same problem.
To correct that, on the func - (AnyPromise*)signInMsaAsync {
You need to remove the return on MCDConnectedDevicesPlatform: 468:

    MSAAccount* msaAccount = [[MSAAccount alloc] initWithClientId:CLIENT_ID scopeOverrides:@{}];
    
    return [AnyPromise promiseWithAdapterBlock:^(PMKAdapter _Nonnull adapter) {
        [msaAccount signInWithCompletionCallback:adapter];
    }].then(^{
        Account* account = [[Account alloc] initWithMSAAccount:msaAccount platform:self.platform apnsManager:self.apnsManager];
        account.state = AccountRegistrationStateInAppCacheOnly;
        [self.accounts addObject:account];
        [account prepareAccountAsync:self];
    }).then(^{
        [self accountListChanged];
    });
}

https://github.com/Microsoft/project-rome/issues/76 will fix that