Coder Social home page Coder Social logo

pathsense-samples-ios's Introduction

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

pathsense-samples-ios's People

Contributors

pablobaxter avatar paulschmitt avatar pdschmitt avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

pathsense-samples-ios's Issues

Shell Script Invocation Error Group

This is the error message

/Users/Guodada/Library/Developer/Xcode/DerivedData/Test-fzeizrhmizoqabfahizcpwarwtny/Build/Intermediates/Test.build/Debug-iphoneos/Test.build/Script-C77E49CC1E9B8B7E006674CE.sh: line 2: bash/Users/Guodada/Library/Developer/Xcode/DerivedData/Test-fzeizrhmizoqabfahizcpwarwtny/Build/Products/Debug-iphoneos/Test.app/Frameworks/PSLocation.framework/strip-frameworks.sh: No such file or directory

this is the build phase config
2017-04-10 6 55 04

Where is the problem?

More Battery Consumption

I'm running your SDK on my mobile. I see battery consumption is more.
What are the properties need to use less battery consumption?

Below is my sample code:

locationManager = PSLocationManager.init()
locationManager?.maximumLatency = 180
locationManager?.setDelegate(self)
locationManager?.allowsBackgroundLocationUpdates = true
locationManager?.pausesLocationUpdatesWhenDeviceIsStationary = true
locationManager?.desiredAccuracy = kCLLocationAccuracyBest
locationManager?.startUpdatingLocation()

what is the purpose of method startMonitoringAmbientLocationChanges ?

I have read the document, it said that "Start monitoring ambient location changes. The behavior of this service is not affected by the desiredAccuracy or distanceFilter properties. Locations will be delivered through the same delegate callback as the standard location service. You can expect to recieve sparce location data intermittenly."

And when I invoke the startMonitoringAmbientLocationChanges ,as it said, the delegate method "locationmanager:didUpdateLocations" doesn't called anytime.

So when I want draw the path from coordinates, it doesn't invoke the delegate method,and I can't get the coordinate, and I can't draw the line. The system method "startUpdatingLocation" is works better than this.

If I want monitor the user's track and draw the polyline on the map, Which method can I use?

Undefined symbols for architecture arm64: When Build on Device

I have success config the PSLocation.framwork on yesterday, but today when I integration the framework to a new project, it arise some error:

2017-04-14 5 30 00

my first project can build success both on simulator and iPhone,
but now the other projects only can build success on simulator,

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.