I use RestKit as a library that handle all my request. So I use base authorization and keep my token in user default.
Here is a good example how to get data from app NSUserDefault and use it in my share extension.
So I made this:
NSUserDefaults *userDefaults = [[NSUserDefaults alloc] initWithSuiteName:@"group.com.myapp"];
NSString *token = [userDefaults objectForKey:@"kUserToken"];
But token is nil
But when I check the same in app it return for me a string.
Also I noticed that I have this error (not sure if it causes error with user defaults):
Add the “App Groups” entitlement to your App ID