Hi,
I’m trying to create an app on iOS that composes a text / SMS message for personal use.
I’ve run the ComposeEmailSMS sample code in the simulator on both Windows 7 and a Hachintosh (OS X Mavericks), but I keep getting the ‘SMS not supported/setup on this device’ message box and ‘Mail not supported/setup on this device’ message box.
However when I build ComposeEmailSMS and run in Xcode, the e-mail works but not the SMS.
So I used a simple bit of code below:
if ( native.canShowPopup( “sms” ) ) then
local options = {
to = { “1234567890”, “9876543210” },
body = “I scored over 9000!!! Can you do better?”
}
local result = native.showPopup( “sms”, options )
print( “SMS IS supported/setup on this device” )
native.showAlert( “Great!”, "SMS is supported/setup on this device. Result is "…tostring(result), { “OK” } )
else
print( “SMS Not supported/setup on this device” )
native.showAlert( “Alert!”, “SMS not supported/setup on this device.”, { “OK” } )
end
Again this doesn’t work in either the Windows or Mac simulators. In the Xcode iOS simulator, I get the message ‘SMS is supported/setup on this device. Result is false’. This must mean that SMS messaging can be invoked in the Xcode iOS simulator, so the problem must be with the line of code:
local result = native.showPopup( “sms”, options )
I’ve also tried:
native.showPopup( “sms” )
but this doesn’t invoke SMS messaging either.
I haven’t purchased a developer licence from Apple yet as I want to make sure that I can get this working before paying out $99 to test on a real iPhone.
If anyone had any suggestions how to fix this problem, that’d be great.
Thanks