You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Share Extension - [PFUser currentUser] is nil #565
I've tested the previously working Share Extension (using Parse platform) after I migrated to Parse-server. The main/container app is working fine with queries and is still configured as follows: [Parse enableDataSharingWithApplicationGroupIdentifier:AppGroupId]; [Parse initializeWithConfiguration:[ParseClientConfiguration configurationWithBlock..
So on my share extension I'm still using the same initialization as well except [Parse setApplicationId.. which is changed to Parse initializeWithConfiguration,
[Parse enableDataSharingWithApplicationGroupIdentifier:AppGroupId containingApplication:AppGroupId]; [Parse enableLocalDatastore];
before I set the Parse initializeWithConfiguration...
On the share extension, the [PFUser currentUser] is always nil..
Kindly advise if there are some tweaks need to be done.. Thanks in advance..
Hey @seecahkhing, initializeWithConfiguration: changes everything 😛
Now to enable data sharing - you would need to do something like this:
[Parse initializeWithConfiguration:[ParseClientConfiguration configurationWithBlock:^(id<ParseMutableClientConfiguration> configuration) {
configuration.applicationId = ...;
configuration.clientKey = ...;
configuration.localDatastoreEnabled = YES;
configuration.applicationGroupIdentifier = AppGroupId;
configuration.containingApplicationBundleIdentifier = AppGroupId; // This goes only in extension
}];
Which means that any configuration applied directly via Parse class if you use initializeWithConfiguration: is ignored and is superseded by the configuration provided in an object.
Hope this helps, feel free to reopen this issue if it doesn't.
Reacted by Steven, Brian Trzupek, ananfang and thibauddavid
Activity
nlutsenko commentedon Feb 22, 2016
Hey @seecahkhing,
initializeWithConfiguration:changes everything 😛Now to enable data sharing - you would need to do something like this:
Which means that any configuration applied directly via
Parseclass if you useinitializeWithConfiguration:is ignored and is superseded by the configuration provided in an object.Hope this helps, feel free to reopen this issue if it doesn't.
kingsoft-dev commentedon Mar 27, 2017
@nlutsenko
Can you please explain how to import parse library to share extension?