Everything works before..
But now that i'm using the new using GoogleSignIn.framework
to avoid rejection from apple..
How can i convert GIDAuthentication
to GTMFetcherAuthorizationProtocol
/GTMOAuth2Authentication
to be able to use the GPPNativeShareBuilder
?
Update
Sorry for the late update, I successfully created GTMFetcherAuthorizationProtocol
/GTMOAuth2Authentication
Using something similar to the answer below by: @Andr3a88 i tried his answer and it is working..
But still, I cannot use GPPNativeShareBuilder
for sharing without authenticating using GPPSignIn
, here is the error log:
[xxx/0x111533310] [lvl=3] -[GPPNativeShareBuilderImpl open] User must be signed in to use the native sharebox.
The alternative solution that we did was using the GPPSignIn
and creating a custom alertview that informs the user that:
"He is about the leave the application" and asks for the users confirmation..
But too bad we cannot submit the app just soon, we've have decided to continue the development then go back to this if our solution wont work and worst possible option is removing G+ sharing...
If you have a solution that allows GPPNativeShareBuilder
to work with GIDSignIn
, your help will be very appreciated..
Update 2
Adding custom alertview that asks for users confirmation that he's about to leave the application did the work and approved by apple. Cheers! :)
Try in this way:
Add to your AppDelegate (or wherever you want) the following property
Then inside didSignInForUser call setAuthorizerForSignIn, this method is used to create GTMOAuth2Authentication object which will then be used for G+ api calls
Now when you make the G+ api call sets the GTMOAuth2Authentication object created during the login