测试已测试 | ✗ |
Lang语言 | Obj-CObjective C |
许可证 | 自定义 |
发布最后发布 | 2016年9月 |
由Illya Busigin、Sam Odom、Shashank Thummalapalli、Shiv Venkatraman、Xiangwei Wang维护。
版本 2.6.3.2
这是Phunware的iOS SDK,用于位置营销,一个基于位置和通知的系统。访问http://maas.phunware.com/获取更多详情和注册信息。
Phunware建议使用CocoaPods来集成框架。只需将pod 'PWLocalpoint'
添加到您的Podfile中。
或者,您可以按以下步骤操作
在您的构建设置中,确认Framework Search Paths
中有一个指向Localpoing.framework文件夹的条目。例如:$(PROJECT_DIR)/Vendor/Phunware/Localpoint
。
以下iOS框架是必需的
CoreLocation.framework
CoreGraphics.framework
libsqlite3.lib
将以下关键/值添加到您的app Info.plist文件中
App registers for location updates
这个值将允许应用在后台运行时向用户告知其位置。App downloads content from the network
这个值将允许应用定期从网络下载并处理小量的内容。添加这个值只为我们的SDK的2.4.0+版本必需。sandbox
进行测试,用api
进行生产。Localpoint文档包括在仓库的Documents文件夹中,同时有HTML和.docset格式。您也可以在这里找到最新文档:http://phunware.github.io/maas-localpoint-ios-sdk/
Localpoint SDK始终在后台运行。SDK中不包含任何UI元素。
// Include the Localpoint header file
#import <Localpoint/Localpoint.h>
// Get Localpoint instance
LPLocalpointService *lpService = [LPLocalpointService instance];
// Start it
[lpService start];
// That's it!
Localpoint提供了一个ILPLocationListener
协议。您可以创建一个实现该协议的监听器,并将您的监听器注册到Localpoint SDK的位置提供程序。
LPLocationListener *locationListener = [[LPLocationListener alloc] init];
// Register your location listener
[[lpService getLocationProvider] addListener:locationListener];
Localpoint提供了一个ILPMessageListener
协议。您可以创建一个实现该协议的监听器,并将您的监听器注册到Localpoint SDK的消息提供程序。
LPMessageListener *messageListener = [[LPMessageListener alloc] init];
// Register your message listener
[[lpService getMessageProvider] addListener:messageListener];
Localpoint提供了一个ILPLocalNotificationListener
协议。您可以创建一个实现该协议的监听器,并在LPLocalpointService
实例中设置该监听器。
LPLocalNotificationListener *localNotificationListener = [[LPLocalNotificationListener alloc] init];
// Register your local notification listener
[lpService setLocalNotificationListener:localNotificationListener];
// Stop Localpoint service
[lpService stop];