native.showPopup Activity popup iOS causing App Crash

@vlads @Scott_Harrison

I am using iOS Activity plugin for share in my App.
it works fine with most of the Applications but App crashes when I select some specific Apps like : Notes.

I know “Notes” is not useful for Share but it’s in the list when we open Activity popup.
So I just expect that my App or Game should not crash after any application selected in the Activity popup, it can have proper callback same as other Apps like : Email , Facebook, FB Messenger etc

Here is my code:

> local itemsToShare={
>       { type="image", value={ filename=filenameOfShareImage, baseDir=system.DocumentsDirectory } },
>       { type="string", value=deviceShareText },
>       { type="url", value=deviceShareURLlink},
>     }
>     local options={ items=itemsToShare, listener=popupListener,
>       excludedActivities = {"UIActivityTypePrint","UIActivityTypeCopyToPasteboard",
>         "UIActivityTypeAssignToContact","UIActivityTypeSaveToCameraRoll",
>         "UIActivityTypeAddToReadingList","UIActivityTypeAirDrop"}
>     }
>     native.showPopup( "activity", options ) 

– I am using Solar2D 2021.3661
– I am testing on iPad 9(iPad OS 15)
Please let me know if you want more info.

1 Like

@vlads @Scott_Harrison I’m experiencing this same problem, but Skype, KaKao talk, and many other apps literally crash.

Can you modify the plugin so that we can define a set of apps that appear while ignore other apps that we don’t define? In this way, we can be sure only to include apps that work like Facebook, SMS text, etc

3 Likes

@troylyndon iOS does not really have an strait forward way of doing this, from what I have researched people recommend just a lot of activity excluding, will try to add a few more options to exclude to the plugin and allow for custom activity, like the Notes and Skype app, to be excluded.

@BK_PANARA I have to been able to reproduce on my iPhone 12 running ios 15.1.1, will try on my iPad when I get home using the attached demo
https://drive.google.com/file/d/18GG-ZElSKkMJ8HJHo736-0TgKDadb-SF/view?usp=sharing

Just an update you can already exclude custom activities(in already in docs btw) like the Notes app with

excludedActivities = {"com.apple.mobilenotes.SharingExtension"}

@Scott_Harrison great! How can we find the precise syntax to exclude for all the apps we want to exclude? In other words, where did you find “com.apple.mobilenotes.SharingExtension”?

I found it on stackoverflow, you are likely going to have to do research and find extension names.

I do encourage someone to send me a sample project. I tried the sample linked above on my iPad running 15.0.1 and work perfectly with notes

Hi @Scott_Harrison ,
I have tried your attached demo on my iPad running iPad OS 15.0.2 and found crash with notes and google Drive.
You need to cancel the share and then you will see crash.
Steps to Duplicate :

  1. click Share button
  2. Choose Google Drive
  3. google drive popup will open , click “Cancel”
  4. Now close activity popup by clicking on screen out side activity popup
    and you will see App crashes.
    Please let me know if you can’t duplicate it , I will upload video.

And I found how activity name for google drive to exclude from the list:

> excludedActivities = {"com.google.Drive.ShareExtension"}

1 Like

This should be fixed now please rebuild

I Just update my iPad to iPad OS 15.1.
Then I test the demo you attached , Now it’s not opening Activity popup.
Here is log :
iPad9_15.1_activitypoup_bug.txt (4.4 KB)

Sorry about that should be fixed on iPad

@Scott_Harrison,
Yes, iPad Activity popup is working now.
"com.apple.mobilenotes.SharingExtension" is working and I can exclude Notes App from the list.
BUT google Drive share extension is not working.

excludedActivities = {"com.google.Drive.ShareExtension"}
This was working before when I post the above message , and I can successfully exclude google Drive from the list.
BUT Now same code is not excluding Google Drive App and I check many other App exlclude like :
"com.skype.SkypeForiPad.sharingextension" & "com.iwilab.KakaoTalk.Share" which is not working,

Can you please confirm what’s update with your last changes to that plugin ?

Thank you :slight_smile:

@vlads @Scott_Harrison It is really a shame that we have no way to reliably share without receiving varying callbacks, or no callbacks at all, or crashes, depending upon the app. This really needs some time and attention, IMHO.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.