Troubleshooting

Last updated 11 days ago

Requirements

  • iOS 9.0 and above

  • Requires iPhone with GPS, and motion coprocessor (iPhone 5s and above)

  • Swift 4.1

  • Tested on Xcode 9

  • Xcode 10 support with legacy build system

  • SDK doesn't work on simulator; it requires actual device to test it

Dependencies

The SDK includes following dependencies using pod. Latest version of these libraries will be automatically included as transitive dependencies.

Name

Description

Quick

For testing

Nimble

For testing

Expecta

For testing

OCMock

For testing

Following libraries are added manually.

Name

Description

BoltsSwift

For promise framework

CocoaLumberjack

For logging

FMDB

For database related operations

Reachability

For networking reachability

Common errors

Error: No such module 'HyperTrackCore'

It may happen if, after installing the SDK through cocoapods, you open .xcodeproj. Resolution: Make sure you open .xcworkspace instead of the .xcodeproj in Xcode.

Error: type 'HyperTrackCore' has no member 'functionName'

It may happen because the method is not supported in the SDK version that you are using. Resolution: Check the changelog to see if this method is added in a version greater than your current SDK version. If it is, do a pod update from the terminal.

Debugging

Error Codes

SDK methods may return CoreError object with errorCode property of type enum. ErrorType enum has following values.

public enum ErrorType: Int {
case badRequest = 400
case authorizationFailed = 401
case forbidden = 403
case internalServerError = 500
case urlErrorUnknown = -998
case urlErrorCancelled = -999
case urlErrorBadURL = -1000
case urlErrorTimedOut = -1001
case urlErrorUnsupportedURL = -1002
case urlErrorCannotFindHost = -1003
case urlErrorCannotConnectToHost = -1004
case urlErrorNetworkConnectionLost = -1005
case urlErrorNotConnectedToInternet = -1009
case parsingError = 98765
case locationPermissionsDenied
case activityPermissionsDenied
case serviceAlreadyRunning
case serviceAlreadyStopped
case networkDisconnected
case databaseReadFailed
case databaseWriteFailed
case sensorToDataMappingFailed
case deviceIdBlank
case emptyResult
case unknownService
case sdkNotInitialized
case unknown
}

Logging

SDK writes logs during its lifecycle. Retrieve the logs using the below SDK method.

HyperTrackCore.retrieveLogs(zipped: true, completionHandler: { (data) in
})

‚Äč