App Resume occurs with plugins still open on iOS

I want to know how long a player takes to share the game with their friends, so I save the time first, then open the deviceShare plugin, and then calculate the time taken when app resume is triggered. The problem on iOS, is that this occurs very quickly, even while the deviceShare options are open and available to the gamer, still. In other words, the gamer has not finished sharing. But my app comes back after a brief moment and remains running in background. Is there a way that I can:

  1. cause my app to remain suspended until the share is finished (as it works on Android)? or
  2. receive some callback from the deviceShare to know when it has been closed?

FYI, this is the same issue that occurs when I use Ad plugins. The game resumes before the ad is finished (on iOS). Not all Ad SDKs provide a finished callback, but this is resolved by those that do.

Which “deviceShare” plugin are you using? Are you using the Social Popup plugin?

Yes, I’m using the normal social popup plugin. I call it the device share, because it’s not specific to any social media platform. It will allow you to send a share via SMS, too. But yes, I should have said that at the start.

Weird. May be this is the hint to all that ANRs we’ve been getting… Thanks!

I’ve only observed this on iOS - I updated the topic to reflect this

I wistfully remember when we could use that Social Popup plugin to share to Facebook complete with link, image AND text. Now, all I can share is a link. No text or image. I don’t think it’s a fault. Simply a restriction imposed by Facebook some years ago. :frowning:

We’re now doing some tests to better understand what can and can’t be done with the social plugin on iOS and Android, expect to report results here and ask for help to make improvements.

1 Like

I am trying to wrap my head around the problem,
So when you call
native.showPopup(“social”)
you are using system/app events (“applicationSuspend” and “applicationResume”) to track start and stop for the popup?
And this is working for iOS and not Android?

@Scott_Harrison, Bhavin brought to my attention the right doc for the social plugin: https://docs.coronalabs.com/plugin/CoronaProvider_native_popup_activity/showPopup.html

So it appears the answer may be in a callback, we’ll investigate. The issue is still that the app resume occurs quickly on iOS, even with the social options on screen. A perfect solution would be to have a setting that will not resume until after the social action is taken.

1 Like

The docs here: https://docs.coronalabs.com/plugin/CoronaProvider_native_popup_activity/showPopup.html

mention:
“string” String value which will be converted to a NSString.

“url” String value which will be converted to a NSURL.

“image” Table in the form of { baseDir=, filename= } which specifies the image file to post. This will be converted to a UIImage.

Only a link can be shared to Facebook. I’d be interested to know if anyone knows how to share text and and image to Facebook that actually works on the latest iOS. Thanks! :slight_smile:

Below is an image from the quiz Pictoword. That’s quite an impressive share panel. I’d settle for just Facebook right now. :slight_smile:

Text is a big no no on Facebook

You should, look at the Facebook Plugin for images.

1 Like

Thanks Scott_Harrison - I’ll take a look. :slight_smile: