Skip to content

Releases: predict-legacy/PredictIO-iOS

Release 5.6.0

28 Sep 14:07
Compare
Choose a tag to compare
  • Updates to support Xcode 10

Release 5.5.0

24 May 07:36
Compare
Choose a tag to compare
  • Adds full compatibility when used from Objective C
  • Improvements to battery and data usages

Steps to Update

To update you will need to modify where you call start() on the SDK, as the status parameter of the callback is no longer an Optional value.

  1. Remove ? from each of the case statements
  2. Change case nil to case .success to handle the success case

Release 5.4.2

16 Apr 12:31
Compare
Choose a tag to compare
  • Update for Xcode 9.3 / Swift 4.1
  • Update RxSwift dependency
  • Remove dependence on UIBackgroundMode in low power
  • Enhancements to high power mode settings

Release 5.3.6

16 Apr 09:06
Compare
Choose a tag to compare
  • Update RxSwift dependency
  • Remove dependence on UIBackgroundMode in low power
  • Enhancements to high power mode settings

Release 5.3.5

05 Mar 10:18
Compare
Choose a tag to compare
  • Performance improvements to speed up SDK launch time
  • Enhancements making battery usage even lower

Includes other great feature of the 5.3 release: https://github.com/predict-io/PredictIO-iOS/releases/tag/5.3.0

Release 5.3.0

26 Feb 11:44
Compare
Choose a tag to compare
  • New! Callbacks can be bound to receive events generated by the SDK
  • New! Power level can be chosen when launch SDK, lowPower & highPower
    • High power is typically faster at detecting events but consumes slightly more battery

High Power & Low Power

The predict.io SDK comes in two power levels which cater to different requirements of battery consumption and latency of events being detected.

NOTE: Power level won't take effect properly until a fresh app relaunch, it's not a setting which should be toggled at runtime.

High Power

  • 5% typical battery usage in 24 hour period
  • Events detected within a few minutes
  • Mode of Transport detection (coming soon in future beta)
  • Intention detection (coming soon in future beta)
PredictIO.start(apiKey: apiKey, powerLevel: .highPower) {
  error in
  // Handled as above
}

Low Power

  • Less than 1% typical battery usage in 24 hour period
  • Events detected with up to 30 min delay
  • No Mode of Transport detection
  • Intention detection (coming soon in future beta)

NOTE: Low power is the default if no value is set for the powerLevel parameter.

PredictIO.start(apiKey: apiKey, powerLevel: .lowPower)

Events

The predict.io SDK can give you callbacks for the events which are detected for you to integrate with your own app's functionality.

PredictIO.notify(on: .any) {
  (event: PredictIOTripEvent) in
  // Do something with event 
}
PredictIO.notify(on: .departure) {
    event in
    // Do something when user has left a location
}
PredictIO.notify(on: .arrival) {
    event in
    // Do something when user has arrived at a location
}

PredictIOTripEvent

A PredictIOTripEvent is the event you will receive that describes attributes of the event which was detected, namely; the location, timestamp and type of the event from the following:

  • .arrival
  • .departure
  • .enroute (High Power only)
  • .still (High Power only)
public class PredictIOTripEvent: CustomStringConvertible {
  public let type: PredictIOTripEventType
  public let coordinate: CLLocationCoordinate2D
  public let timestamp: Date
}

Release 5.2.4

19 Jan 15:09
Compare
Choose a tag to compare
  • Improved logging to SDK startup process
  • Enhanced and more efficient location capture
  • Fix issue where timestamps wouldn't be converted to Gregorian calendar format
  • Fix issue stopping Example apps from building correctly

Release 5.2.2

19 Dec 19:55
Compare
Choose a tag to compare
  • Adds custom parameters & webhooks support

Have events generated by the SDK forwarded on to your own API also.

PredictIO.setWebhookURL("https://api.yourapp.com/webhook")

Additionally, you can add custom data, to the payload if you need some additional data, such as an ID or transaction number, so that you can reconcile data on your side. For example:

PredictIO.setCustomParameter(key: "transaction", value: [
  "id": 1233445,
  "user_id": 99887765,
  "status": "paid",
] as Any)

Release 5.2.0

12 Dec 17:23
Compare
Choose a tag to compare
  • Improvements to syncing events
  • More efficient internal data handling
  • Less CPU & battery usage

Required Changes

The PredictIOError enum has been modified to differently handle how various location permission errors can be represented.

PredictIOError.locationPermission(CLAuthorizationStatus) has been simplified into four new enum types:

.locationPermissionNotDetermined
.locationPermissionRestricted
.locationPermissionWhenInUse
.locationPermissionDenied

The integration example has been updated in the README.md.

Release 5.1.5

30 Nov 21:18
Compare
Choose a tag to compare
  • Improvements to internal event database