Closed praveencastelino closed 7 years ago
I haven't looked at macOS extensions, but my guess is it will be something like iOS extensions, where you might need to use share groups to allow the extension and App both to use the same info.
yup..that's true. That's how we are sharing the data between extension and mac app.
Since the SDK uses NSUserDefaults to store the data and the user default is not accessible between extension and App, the condition in the SDK fails.
Closing this issue as this SDK is deprecated...We are using now GTMAppAuth
I have a Mac app and extension. The app does the login and internally the google SDK saves the information in user defaults.
The api call API authorizeFromKeychainForName: return NO in extension due to the information stored in user defaults is not accessible in the extension.
// before accessing the keychain, check preferences to verify that we've // previously saved a token to the keychain (so we don't needlessly raise // a keychain access permission dialog) NSString *prefKey = [self prefsKeyForName:keychainItemName]; NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; BOOL flag = [defaults boolForKey:prefKey]; if (!flag) { return NO; }
Since the app and extensions have their own set of UserDefaults, the above code fails.