iosswiftcore-locationmessageui

"Send my current position" message programmatically ios


I'm looking for a technical solution to give my app users an emergency button that would automatically send to a saved phone number the current GPS position.

The idea is to reproduce the function "Send my current position" available in the Message App.

I'm developing in Swift language. Would someone have any idea to do so ?

Thanks a lot in advance.

EDIT :

What I'm trying to do, is to send by message the current user location on a Maps app fashion. I know how to retrieve a CLLocation but I can't only send by text latitude and longitude. I would like to send the user position on a Map in the Message App just like "Send my current position" does.


Solution

  • you send a link

    comgooglemaps://?center=40.765819,-73.975866&zoom=14&views=traffic

    https://developers.google.com/maps/documentation/ios-sdk/urlscheme