On Android, I use native.showPopup(“social”,options), and the social network/SMS/Mail selector pops up as normal. The URL to be shared is passed in options.
Built-in IOS apps seem to have a similar social network selector popup, but this selector seems unavailable in unavailable to third-party apps, either for all frameworks or just the Corona framework.
Currently I handle this by allowing only Facebook on IOS, which is a compromise that I would like removed.
Here’s the code I use:
shareFacebook=function(msg,picfname,picdir,url2)local serviceName = "facebook" local isAvailable = true --default for IOS, do not ask if \_MODEL=="Android" then isAvailable=native.canShowPopup( "social", serviceName ) end if ( isAvailable ) then local listener = {} function listener:popup( event ) dprint( "name: " .. event.name ) dprint( "type: " .. event.type ) dprint( "action: " .. tostring( event.action ) ) dprint( "limitReached: " .. tostring( event.limitReached ) ) end native.showPopup( "social", { service = serviceName, listener = listener, url = url2 }) else native.showAlert( "Kan inte skicka " .. serviceName .. "-meddelande!", "Om du har Facebookappen, kontrollera att du är inloggad under Inställningar \> Facebook \> Konto för att kunna dela.", { "OK" } ) end end
Question: I could make a pop-up selector for the networks Corona supports, but is there a way to trigger the IOS selector?