Open maps with lat,long and link based iOS swift
Problem: I want a common function that i can handle one location object with lat,long and address.That address can have a link that copied from other apps like google maps,Apple maps and whatsapp. Also want save option that will save the location into my app local database. How to achieve all the above us. Solution: func openMaps ( lat : Double , long : Double , address : String = "" , isSave : Bool = true ) { let addressURL = URL ( string : address. trimStr ?? "" ) if let topview = UIApplication . topViewControlle r () { if (lat != 0 && long != 0) { let actionSheet = UIAlertController ( title : "" , message : "" , preferredStyle : . actionSheet ) if ...