TPDMapsApp 1.1.2

TPDMapsApp 1.1.2

测试测试过
语言编程语言 Obj-CObjective C
许可证 MIT
发布最新发布2017年3月

Mark Ferlatte 维护。



  • 作者:
  • Mark Ferlatte

为 iOS 设备外部地图应用程序提供一个接口。

构建状态

CircleCI

用法

#import <TPDMapsApp/TPDMapsApp.h>

...

NSArray *installedApps = [TPDMapsApp installedMapsApps];

TPDMapsApp *app = [installedApps firstObject];

NSLog(%"Using map app: %@", app.name);

BOOL opened = app.openWithQuery(@"Philz Coffee");
if (! opened) {
    // Something went wrong...
}

opened = app.openForDirectionsWithStart:@"1 Stockton St, San Francisco, CA"
                            destination:@"3101 24th St, San Francisco, CA"
                             travelMode:TPDMapsAppTravelModeTransit];

if (! opened) {
    // Something went wrong...
}

安装

使用 CocoaPods。

$ edit Podfile
pod 'TPDMapsApp', '~> 1.1.0'

$ pod install

$ open App.xcworkspace

然后您需要更新应用程序的 Info.plist,如下所述:

<key>LSApplicationQueriesSchemes</key>
<array>
    <string>comgooglemaps</string>
    <string>waze</string>
</array>

许可证

TPDMapsApp 在 MIT 许可证下可用。有关更多信息,请参阅 LICENSE 文件。