native.showPopup() doesnt' workd anymore on iOS 11

Hi all,

i have the following code in my app to open a window allowing to the player to share a comm on FB :

 native.showPopup( "social", { service = "facebook", -- The service key is ignored on Android. message = "I love this app!", listener = listener, image = { { filename = "Icon-xxxhdpi.png", baseDir = system.ResourceDirectory }, }, url = { "http://www.mywebsite.com", } })

It work like a charm on iOS 10 with last daily build 2017.3145, on an iPhone 6 :

Same code, on an iphone 7 on iOS 11 with same daily build 2017.3145, doesn’t work anymore … (it used to work on this iPhone 7 with previous iOS10) :

Is it a bug that has to be fixed, or is there something i can do ?

thanks for help :slight_smile:

same pb with last daily build Corona 2017.3155

This was answered on the CDN slack channel this morning.

That particular popup is no longer supported in iOS 11. You must use the “activity” popup for social sharing on iOS. Apple no longer supports direct sharing to individual social networks.

Rob

I am using native.showPopup in separate functions for emailing a .jpg image file and a .csv file, but the attachment for a .csv file in iOS11 is not working.  See code example below.

On  the Windows simulator, the .jpg files and .csv files get created and can see them in the sandbox.

On my Android device. the email window popups up and successfully attaches and emails a .jpg file or .csv file depending on the function.

Now on Mac/iPhone…

On the Mac simulator, the .jpg files and .csv files get created and can see them in the sandbox after executing both functions.

On the iPhone when using the function for the .jpg , the email app pops up and successfully attaches and emails the .jpg file.

On the iPhone when using the function for the .csv, the email app pops up but does NOT attach the .csv file.

Rob, you mention above the popup is longer supported in iOS11.  Do you mean not supported for ONLY “social” since it still appears to be working for “mail” and attaching .jpg files (but not .csv files)? 

And if it is still supported in iOS11 for “mail”, is anyone else experiencing issues with attaching non-image files in iOS11?

local options =

{

to = “”,

subject = “Standings File”,

body = “See attached standings file.”,

attachment = { baseDir=system.DocumentsDirectory, filename=“standings.csv”, type=“text/csv” }

}

native.showPopup( “mail”, options )

AND

local options =

{

to = “”,

subject = “Standings Pic”,

body = “See attached standings pic.”,

attachment = { baseDir=system.DocumentsDirectory, filename=“standings.jpg”, type=“image/jpeg” }

}

native.showPopup( “mail”, options )

–Updated March 24, 2018

Just a follow-up to the above…I am not exactly sure what the solution was since I tried many things, but I think the thing causing my issue with .csv attachments in iOS11 is that I was not closing the file prior to using native.showPopup.   I was previously writing data to a file upon a push of a button and then performing the showPopup right after writing to the file was finished.  Then I changed my code to close the file using io.close(file) prior to showPopup, and it then worked.  It worked on Android without closing file first, so just must be an iOS matter.

native.showPopup() does many different things. “mail” and “sms” should work on iOS.  This same API was once used to provide a twitter and a facebook popup, but Apple eventually went to the “activity” style popup to handle social media. So “twitter” and “facebook” should no longer be used, but “mail” and “sms” certainly can.

I don’t know why it’s not attaching the CSV file. Maybe try changing the MIME type to text/plain.

Rob

Hi,

I also have an issue with the quickLook setting in native.showPopup() when trying to view a pdf file.

On iPhone 8 my app opens the pdf with iBooks but I get a blank screen where I can only read the name of the file and the text “pdf document” below. Sharing the file from iBooks (i.e. to Whatsapp) I can open and view it in the new destination.

No error message in my app.

I used this code:

local quickLookOptions = { files = { { filename="Manuale.pdf", baseDir=system.ResourceDirectory }, }, startIndex = 1 } OpenPdf = native.showPopup( "quickLook", quickLookOptions)

I really can’t find what’s happening on this iPhone (ios 11), because the same code works fine on an older iPad (ios 9.3).

Thank you for any help

Can you put together a small demo app that I could try and run on my iOS11 device?  Put the project (main.lua, build.settings, config.lua, pdf file) in a .zip file and put it on dropbox or Google Drive and share the link here?

Thanks

Rob

Hi Rob,

this is link of the zip file with the essential demo app:

https://drive.google.com/open?id=1f_q_oKxZsYNC5CvS3mRdq2fWnLnO24IH

Thanks

I found this thread in apple discussions forum about the same problem as mine:

https://discussions.apple.com/thread/8111535

It sounds like an iOS 11.2 issue. I doubt there is anything we can do about it until Apple fixes this.

Rob

Hi Rob,

So did your ios11 device show the same result with my demo? Just to know…

Thanks

Yes, I got the same results.

Rob

same pb with last daily build Corona 2017.3155

This was answered on the CDN slack channel this morning.

That particular popup is no longer supported in iOS 11. You must use the “activity” popup for social sharing on iOS. Apple no longer supports direct sharing to individual social networks.

Rob

I am using native.showPopup in separate functions for emailing a .jpg image file and a .csv file, but the attachment for a .csv file in iOS11 is not working.  See code example below.

On  the Windows simulator, the .jpg files and .csv files get created and can see them in the sandbox.

On my Android device. the email window popups up and successfully attaches and emails a .jpg file or .csv file depending on the function.

Now on Mac/iPhone…

On the Mac simulator, the .jpg files and .csv files get created and can see them in the sandbox after executing both functions.

On the iPhone when using the function for the .jpg , the email app pops up and successfully attaches and emails the .jpg file.

On the iPhone when using the function for the .csv, the email app pops up but does NOT attach the .csv file.

Rob, you mention above the popup is longer supported in iOS11.  Do you mean not supported for ONLY “social” since it still appears to be working for “mail” and attaching .jpg files (but not .csv files)? 

And if it is still supported in iOS11 for “mail”, is anyone else experiencing issues with attaching non-image files in iOS11?

local options =

{

to = “”,

subject = “Standings File”,

body = “See attached standings file.”,

attachment = { baseDir=system.DocumentsDirectory, filename=“standings.csv”, type=“text/csv” }

}

native.showPopup( “mail”, options )

AND

local options =

{

to = “”,

subject = “Standings Pic”,

body = “See attached standings pic.”,

attachment = { baseDir=system.DocumentsDirectory, filename=“standings.jpg”, type=“image/jpeg” }

}

native.showPopup( “mail”, options )

–Updated March 24, 2018

Just a follow-up to the above…I am not exactly sure what the solution was since I tried many things, but I think the thing causing my issue with .csv attachments in iOS11 is that I was not closing the file prior to using native.showPopup.   I was previously writing data to a file upon a push of a button and then performing the showPopup right after writing to the file was finished.  Then I changed my code to close the file using io.close(file) prior to showPopup, and it then worked.  It worked on Android without closing file first, so just must be an iOS matter.

native.showPopup() does many different things. “mail” and “sms” should work on iOS.  This same API was once used to provide a twitter and a facebook popup, but Apple eventually went to the “activity” style popup to handle social media. So “twitter” and “facebook” should no longer be used, but “mail” and “sms” certainly can.

I don’t know why it’s not attaching the CSV file. Maybe try changing the MIME type to text/plain.

Rob

Hi,

I also have an issue with the quickLook setting in native.showPopup() when trying to view a pdf file.

On iPhone 8 my app opens the pdf with iBooks but I get a blank screen where I can only read the name of the file and the text “pdf document” below. Sharing the file from iBooks (i.e. to Whatsapp) I can open and view it in the new destination.

No error message in my app.

I used this code:

local quickLookOptions = { files = { { filename="Manuale.pdf", baseDir=system.ResourceDirectory }, }, startIndex = 1 } OpenPdf = native.showPopup( "quickLook", quickLookOptions)

I really can’t find what’s happening on this iPhone (ios 11), because the same code works fine on an older iPad (ios 9.3).

Thank you for any help

Can you put together a small demo app that I could try and run on my iOS11 device?  Put the project (main.lua, build.settings, config.lua, pdf file) in a .zip file and put it on dropbox or Google Drive and share the link here?

Thanks

Rob

Hi Rob,

this is link of the zip file with the essential demo app:

https://drive.google.com/open?id=1f_q_oKxZsYNC5CvS3mRdq2fWnLnO24IH

Thanks

I found this thread in apple discussions forum about the same problem as mine:

https://discussions.apple.com/thread/8111535