Supporting iOS modal share action sheet (AirDrop, Print, Add to Home Screen, Add Bookmark, Add to Reading List, etc.)

@playthisstudios. No it doesn’t work because Instagram needs to be implementeted with the UIDocumentInteractionController not the UIActivityController that the activity plugin implements, but it is possible to ad Instagram to the UIActivityController as a custom activity, but I guess CL decided not to do that. You can use this enterprise plugin https://github.com/jcbnlsn/CoronaSharePluginit has Instagram and it work’s on ipad.

Thanks ojnab!

Rob, any chance your guys will add instagram support as ojnab described through a custom activity? And have been able to test the CL plugin on iPad to confirm that issue?

David

I’ve not seen the code, so I don’t know what’s possible with instagram.  But we will eventually have to address the iPad issue.  I’ll check and see where we are with it. 

Rob

@playthisstudios

And btw someone in this thread figured out a way to use instagram without plugins:

http://forums.coronalabs.com/topic/54267-here-is-how-to-share-a-picture-image-with-instagram-with-corona-sdk-without-enterprise/

Folks: <swati.bajaj> reports in another thread that iOS sharing does not work with WeChat. WeChat has half a billion users*, with about 100 million outside of China. Here’s the discussion: http://forums.coronalabs.com/topic/53668-social-network-plugin/#entry286692

As far as I can tell from multiple forum threads, iOS sharing does not work with Instagram or WeChat or on iPads at all, and Android sharing does not work with Facebook. A timeframe to fix all of these would be useful.

* Source on the 500M userbase: Reuters: http://www.reuters.com/article/2015/02/17/china-autos-apps-idUSL4N0VR0KE20150217

Any eta on the iPad fix? We can’t use this until it works across platforms correctly.

Regarding Instagram, WeChat and others:

The activity functionality built into iOS — and the functionality of our Activity plugin — is partially based on what the recipient app provides (i.e. Instagram). If you open up Apple’s “Activity” panel, i.e. by opening the “Share” dialog from within Apple’s own “Photos” app and you click “More…”, you’ll notice that certain apps appear in the menu, while others do not. Instagram does not. 

Instagram and other apps can choose to implement the iOS 8 sharing extension if they want.  There is a way for an app to force these, but it requires native code that can’t be easily implemented in a generic way through our plugin.

In summary, if you need to add other services according to your desires, you can accomplish it via Corona Enterprise. Here is an article which discusses the process:
http://www.codingexplorer.com/add-sharing-to-your-app-via-uiactivityviewcontroller/

The UIAcitivtyViewController plugin has been updated to support iPads.  The documentation may be a few more hours before it updates, but you can use the media.selectPhoto() docs for the basics.   Here is some code that I’ve been using:

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; native.showPopup( popupName, &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; { &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; items = itemsByDataType, &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -- excludedActivities = { "UIActivityTypeCopyToPasteboard", }, &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; listener = listener, &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; origin = button.contentBounds, &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; permittedArrowDirections={ "up", "down" } &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; })

where button is the object that I want the sharing panel to originate from.

Rob

Great stuff Rob! I’ll try that right away - that was just a plugin update, right? No need to get a new daily build?

Thx

David

Thanks, Rob! It’s good to know iPad support has been added.

how exactly (step by step) do I use this plug in. It just crashes anytime I download the zip file and run it on the simulator

You can’t run it in the Corona Simulator this is an enterprise plugin.

You need to open the SharePlugin/ios/App.xcodeproj file in Xcode and build the example from there.

Thank you guys for adding this plugin! One question though, how do I put a subject in the email section? When I add strings its only adding it to the body.

You can’t.

Hi all,

on my iPad with iOS the plugin still crashes. Console says:

<Error>: *** Terminating app due to uncaught exception ‘NSGenericException’, reason: ‘-[UIPopoverController dealloc] reached while popover is still visible.’

Any ideas?

Thanks

Peter

Please read:

https://coronalabs.com/blog/2015/03/17/tutorial-utilizing-the-activity-popup-plugin-ios/

Rob

Hi Rob

I took the code from https://github.com/coronalabs/plugins-sample-native-popup-activity

declared local button on top of the code and replaced

        native.showPopup( popupName,
        {
            items = itemsToShare,
            – excludedActivities = { “UIActivityTypeCopyToPasteboard”, },
            listener = listener,
        })

with

        native.showPopup( popupName,

        {
            items = itemsToShare,
            – excludedActivities = { “UIActivityTypeCopyToPasteboard”, },
            listener = listener,
            origin = button.contentBounds,
            permittedArrowDirections={ “up”, “down” }            
        })

I build with the daily build 2015.2603 - put it on device ( iPad Air with iOS 7.1.2 )

and the popup shows up for a blink of a second and then it crashes. In xcode console window:

Terminating app due to uncaught exception ‘NSGenericException’, reason: ‘-[UIPopoverController dealloc] reached while popover is still visible.’

Is iOS 7.1.2 the problem ?

Thanks

Peter

Hi Rob

I did an Upgrade to iOS 8.2 and now all works well.

Confusing.

Regards

Peter

So how do I do the opposite of this, and let someone send data into my Corona app? How do I register my Corona app to show up in someone else’s share sheet in iOS?

Our plugin only supports what iOS does out of the box. While the controller we are using will support other apps, you would need to use Corona Enterprise and build your own version that handles the specifics of your app.

Rob