Giter VIP home page Giter VIP logo

maas-localpoint-ios-sdk's Introduction

Localpoint SDK for iOS

Version 2.6.3.1

This is Phunware's iOS SDK for Location Marketing, a location- and notification-based system. Visit http://maas.phunware.com/ for more details and to sign up.

Documentation

Requirements

  • iOS 6.0 or greater
  • Xcode 5 or greater

Installation

Phunware recommends using CocoaPods to integrate the framework. Simply add pod 'PWLocalpoint' to your podfile.

Alternatively, you can follow the next steps:

  1. Add Localpoint.framework to your Xcode project.

  2. In your build settings, verify that the Framework Search Paths has an entry for pointing to the Localpoing.framework folder. For example: $(PROJECT_DIR)/Vendor/Phunware/Localpoint.

  3. The following iOS frameworks are required:

CoreLocation.framework
CoreGraphics.framework
libsqlite3.lib

Set Up

Add the following key/value to you app Info.plist file:

  • Required background modes:
    • App registers for location updates This value will allow the app to keep users informed of their location, even while it is running in the background.
    • App downloads content from the network This value will allow the app to regularly download and processes small amounts of content from the network. The addition of this value is only required for 2.4.0+ versions of our SDK.
  • LPServer : The environment you will be working on. This value can be sandbox for testing and api for production.
  • LPAppID : The application ID matching the server choice.
  • LPBrand : Your brand name.
  • NSLocationAlwaysUsageDescription: The message you want to display on the prompted alert when the user grants the app permission to use the location service.

Documentation

Localpoint documentation is included in the the repository's Documents folder as both HTML and as a .docset. You can also find the latest documentation here: http://phunware.github.io/maas-localpoint-ios-sdk/

Integration

Localpoint SDK is always running in background. There are no UI elements included in the SDK.

Start Localpoint service

// Include the Localpoint header file
#import <Localpoint/Localpoint.h>

// Get Localpoint instance
LPLocalpointService *lpService = [LPLocalpointService instance];

// Start it
[lpService start];

// That's it!

Subscribe location events callback

Localpoint provides a ILPLocationListener protocol. You can create a listener that implements the protocol's methods and register your listener with the Localpoint SDK's location provider.

LPLocationListener *locationListener = [[LPLocationListener alloc] init];

// Register your location listener
[[lpService getLocationProvider] addListener:locationListener];

Subscribe message events callback

Localpoint provides a ILPMessageListener protocol. You can create a listener that implements the protocol's methods and register your listener with the Localpoint SDK's message provider.

LPMessageListener *messageListener = [[LPMessageListener alloc] init];

// Register your message listener
[[lpService getMessageProvider] addListener:messageListener];

Custom local notification callback

Localpoint provides a ILPLocalNotificationListener protocol. You can create a listener that implements the protocol's methods and set the listener in the LPLocalpointService instance.

LPLocalNotificationListener *localNotificationListener = [[LPLocalNotificationListener alloc] init];

// Register your local notification listener
[lpService setLocalNotificationListener:localNotificationListener];

Stop Localpoint service

// Stop Localpoint service
[lpService stop];

maas-localpoint-ios-sdk's People

Contributors

peterwangxw avatar illyabusigin avatar cchung-phunware avatar ejatphunware avatar amendez-phunware avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.