Connecting to Apple’s native apps isn’t so hard, here is how to call Apple’s native Maps, Message, Mail + Phone Call from with in a FileMaker Go / iOS SDK app.
This actually uses a URL scheme from Apple, sounds complicated, right? Wrong. Hopefully I’ve showed it isn’t that hard.
In FileMaker, all these functions use the same script step, Open URL.
In the examples below, I’ve bolded the field/variable that I have used for the script step.
With maps, there is a few things you can do, I am going to point out a destination and location.
Destination – This parses the address as a destination, and iOS uses your current location to determine a route, pretty cool.
“maps:/?daddr=” & Clients::CurrentResidentialAddress
Location – This parses the address as a location.
“maps:/?address=” & Clients::CurrentResidentialAddress
Messaging is quite limited, all you can do is parse a number to message, no message text itself.
“sms:” & Clients::PhoneMobile
Calling is quite simple, all you need is the phone number really. What I’ve done is thrown in a Show Custom Dialog to mimic iOS, where the user is prompted to call or cancel prior before preforming the Open URL script step with the below info.
“tel:” & Clients::PhoneMobile
Email has a few options, but here are the 2 I have used.
The basic, create a draft to the clients email address.
“mailto:” & Clients::Email
The more complex, lets throw in a few additional pieces.
“mailto:” & Clients::Email & “?cc=” & Clients::EmailCc & “&subject=” & $Subject & “”&body=” & $Body
There you have it, and the kicker? You get a really nice native transition from your FM Go / iOS SDK app to Apple’s apps, and on the top left hand corner of the screen it’ll say “< Your App Name”, which will return the user to your app – a really nice touch I think.