I have seen other posts about this for other versions of iOS, but I’m experiencing problems with iOS 10.2.1 for:
native.showPopup( "mail", options )
Here’s my code simplified. Basically, nothing happens when the button is pressed. Is this a bug or is there something missing here? Thanks.
local widget = require( "widget" ) -- Function to handle button events local function goMail( event ) if ( "ended" == event.phase ) then print( "Button was pressed and released" ) -- Email popup with multiple correspondents and attachments local options = { to = { "john.doe@somewhere.com", "jane.doe@somewhere.com" }, cc = { "john.smith@somewhere.com", "jane.smith@somewhere.com" }, subject = "My High Score", isBodyHtml = true, body = "\<html\>\<body\>I scored over \<b\>9000\</b\>!!! Can you do better?\</body\>\</html\>", } native.showPopup( "mail", options ) end end -- Create the widget local mailButton = widget.newButton( { label = "Mail", fontSize = 64, onRelease = goMail, labelColor = { default={ 1, 1, 1 } }, labelAlign = "center", emboss = false, shape = "roundedRect", width = 200, height = 100, cornerRadius = 13, fillColor = { default={1,0,0}, over={0,1,1} }, strokeColor = { default={1,1,1}, over={1,1,1} }, strokeWidth = 4 } ) mailButton.x = display.contentCenterX mailButton.y = display.contentCenterY
Here are the older posts: