Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iOS Share sheet callback #144

Closed
zanemcca opened this issue May 16, 2016 · 13 comments
Closed

iOS Share sheet callback #144

zanemcca opened this issue May 16, 2016 · 13 comments

Comments

@zanemcca
Copy link

zanemcca commented May 16, 2016

We should have a callback from the share sheet for iOS as well as android. I need to be able to run additional code only after a successful share.

@aaustin
Copy link
Contributor

aaustin commented May 17, 2016

Hey @zanemcca - Just to give you an update, we're adding this feature in now and will submit a PR today or tomorrow. Thanks for the request!

@zanemcca
Copy link
Author

Awesome thanks a lot @aaustin

@renesansz
Copy link
Contributor

Hey @zanemcca ,
Just have submitted PR #145 for the iOS share sheet callback.
Let me know if this resolves the issue. 👍

@rklus16
Copy link

rklus16 commented May 18, 2016

👍

@zanemcca
Copy link
Author

Hey @renesansz ,
Thanks a lot for the quick response. I had a look and it is almost there except we need a corresponding success callback to go along with the dismiss. There is a completed flag that could be used to distinguish between the two.

Could it be possible to call onShareSheetDismissed for completed = False and then call onLinkShareResponse with the activityType passed as the result otherwise?

@zanemcca
Copy link
Author

Or just match the functionality of Android.

I am not really sure why there are so many different callbacks in the first place. Why not just return a promise that is resolved if there is a sharedChannel/activityType and reject it otherwise?
This would also make it match the generateShortUrl syntax.

@renesansz
Copy link
Contributor

@zanemcca ,
I see, I have taken a look with iOS SDK but I'm not sure if its share sheet callbacks are consistent with Android SDK. Sure, I'll try to make some changes and update the PR 👍 .

@renesansz
Copy link
Contributor

@zanemcca , I've made some additional updates in the PR, however, the callbacks aren't complete as the Android (missing: onChannelSelected & onShareSheetLaunched).
Let me know of your thoughts 👌

@zanemcca
Copy link
Author

@renesansz ,
Thanks again for the speedy reply. I took a look and everything seems to be functioning properly.

The last thing that would be great to have is if the format of the response was identical to androids.

{
  sharedLink: 'https://blahblah.com/1234/asdfjknasdkfjn',
  sharedChannel: 'com.google.Gmail.ShareExtension'
}

Having this would make handling the response identical for both platforms and it gives us access to the sharedLink and sharedChannel which are both nice things to save.

Sorry for being picky. I would do it myself but my Objective-C knowledge is basically non-existent.

@renesansz
Copy link
Contributor

@zanemcca ,
Sure, I'll update the response being returned from the callback.
No worries 👌

@renesansz
Copy link
Contributor

renesansz commented May 20, 2016

@zanemcca , Updated PR to return sharedLink & sharedChannel for the callback response.
Let me know if this will satisfy your needs 👍

@zanemcca
Copy link
Author

Thanks a lot @renesansz!
That will definitely be enough to satisfy my needs 👍

@aaustin
Copy link
Contributor

aaustin commented May 20, 2016

Merged and deployed #145

@aaustin aaustin closed this as completed May 20, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants