Skip to content

pathsense/pathsense-samples-iOS

Repository files navigation

Pathsense Samples for iOS

A collection of sample applications demonstrating how to use the Pathsense iOS SDK. For more information, take a look at the documentation or connect with us on our website or developer portal.

You can see the additional information for each sample in their respective README files.

Enabling PSLocation in Your App

  1. Obtain a Pathsense SDK Client ID and API Key from here. Click “GET STARTED” and enter your email address.

  2. Make sure you are using the latest version of Xcode (10.0+) and targeting iOS 9.0 or higher.

  3. Add the PSLocation.framework to your Xcode project (This framework needs to be added to the Embedded Binaries as well).

Screenshot1

  1. Under the Build Phases tab in your Target, click the + button on the top left and then select New Run Script Phase. Then setup the build phase as follows. Make sure this phase is below the Embed Frameworks phase:

Screenshot2

Using Objective-C

  1. In your AppDelegate add the following code to your application:didFinishLaunchingWithOptions:

    - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
    {
    	[PSLocation setApiKey:@"your api key here" andClientID:@"your client ID"];
    	return YES;
    }
  2. Make sure to include PSLocation framework headers in your AppDelegate.h file:

    #import <PSLocation/PSLocation.h>

Using Swift

  1. In your AppDelegate add the following code to your application(_:didFinishLaunchingWithOptions:)

    func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool
    {
        PSLocation.setApiKey("your api key here", andClientID: "your client ID")
        return true
    }
  2. Make sure to include PSLocation framework in your AppDelegate file:

    import PSLocation

About

Sample for use with the PathSense iOS Framework

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published