Created
August 9, 2024 23:11
Revisions
-
itjustcrashed created this gist
Aug 9, 2024 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,34 @@ <!--- Paste into ~/Library/Developer/Xcode/UserData/CodeSnippets ---> <!--- Created by @wannafedor4 aka @itjustcrashed ---> <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>IDECodeSnippetCompletionPrefix</key> <string>maps_url</string> <key>IDECodeSnippetCompletionScopes</key> <array> <string>CodeBlock</string> </array> <key>IDECodeSnippetContents</key> <string>let mapsURL = URL(string: "maps://?saddr=&daddr=<#latitude#>,<#longitude#>") if UIApplication.shared.canOpenURL(mapsURL!) { UIApplication.shared.open(mapsURL!) } else { <#Handle nonexistant Maps#> }</string> <key>IDECodeSnippetIdentifier</key> <string>353EE9E1-EB3B-431E-B706-F5E71C9BF9B3</string> <key>IDECodeSnippetLanguage</key> <string>Xcode.SourceCodeLanguage.Swift</string> <key>IDECodeSnippetSummary</key> <string>Check if Apple Maps is installed, and launch it with specified coordinates.</string> <key>IDECodeSnippetTitle</key> <string>Open in Maps</string> <key>IDECodeSnippetUserSnippet</key> <true/> <key>IDECodeSnippetVersion</key> <integer>2</integer> </dict> </plist>