CocoaPods trunk is moving to be read-only. Read more on the blog, there are 9 months to go.

TJJupiterSDK 2.0.0

TJJupiterSDK 2.0.0

Maintained by tjlabs-dev.



  • By
  • tjlabs-dev

TJJupiterSDK

Version 2.0.0

Version License Platform

TJJupiterSDK is an iOS SDK that provides Jupiter-based indoor service features such as service lifecycle management, positioning result delivery, navigation destination updates, routing requests, and mocking mode support.

TJJupiterSDK is an iOS SDK that provides Jupiter-based indoor positioning and navigation services.

It delivers real-time indoor location results, navigation routing, and movement tracking using BLE signals and sensor fusion.


✨ Features

  • 📍 Indoor positioning (BLE + Sensor fusion)
  • 🚶 Pedestrian / 🚗 Vehicle mode support
  • 🧭 Navigation routing (start / destination / waypoint)
  • 🔄 Real-time positioning result stream
  • 🏢 Indoor / Outdoor state detection

📦 Requirements

  • iOS 15.0+
  • Swift 5.0+
  • Info.plist
    • Privacy - Motion Usage Description
    • Privacy - Bluetooth Peripheral Usage Description
    • Privacy - Bluetooth Always Usage Description
    • Privacy - Location When In Usage Description
    • Required device capabilities
      • item : Accelerometer
      • item : Gyroscope
      • item : Magnetometer
      • item : Bluetooth Low Energy
    • Required background modes
      • App communicates using CoreBluetooth
      • App registers for location updates

🚀 Installation

CocoaPods

pod 'TJJupiterSDK'

🏁 Guide

1. Import

import TJJupiterSDK

2. Authentication

TJJupiterAuth.shared.auth(
    accessKey: "YOUR_ACCESS_KEY",
    secretAccessKey: "YOUR_SECRET_ACCESS_KEY"
) { code, success in
    print("Auth:", success)
}

3. Initialize Service

let manager = JupiterServiceManager(id: "USER_ID")
manager.delegate = self

4. Start Service

manager.startService(
    region: JupiterRegion.KOREA.rawValue,
    sectorId: 123,
    mode: .MODE_AUTO,
    debugOption: false
)

5. Stop Service

manager.stopService { success, message in
    print("Stopped:", success)
}

📡 Delegate

extension ViewController: JupiterServiceManagerDelegate {

    func onJupiterSuccess(_ isSuccess: Bool, _ code: JupiterErrorCode?) {}

    func onJupiterReport(_ code: JupiterServiceCode, _ msg: String) {}

    func onJupiterResult(_ result: JupiterResult) {}

    func isJupiterInOutStateChanged(_ state: InOutState) {}

    func isUserGuidanceOut() {}

    func isNavigationRouteChanged(_ routes: [(String, String, Int, Float, Float)]) {}

    func isNavigationRouteFailed() {}

    func isWaypointChanged(_ waypoints: [[Double]]) {}
}

📚 Position Result

JupiterResult

public struct JupiterResult: Codable {
    public var mobile_time: Int
    public var index: Int
    public var building_name: String
    public var level_name: String
    public var jupiter_pos: Position
    public var navi_pos: Position?
    public var llh: LLH?
    public var velocity: Float
    public var is_vehicle: Bool
    public var is_indoor: Bool
    public var validity_flag: Int
}

Position

public struct Position {
    public var x: Float
    public var y: Float
    public var heading: Float
}

LLH

public struct LLH {
    public var lat: Double
    public var lon: Double
    public var heading: Double
}

📚 Core Enums

JupiterRegion

public enum JupiterRegion: String {
    case KOREA
    case US_EAST
    case CANADA
}

UserMode

public enum UserMode: String {
    case MODE_PEDESTRIAN = "PDR"
    case MODE_VEHICLE = "DR"
    case MODE_AUTO = "AUTO"
}

InOutState

public enum InOutState: Int {
    case OUT_TO_IN = 0
    case INDOOR = 1
    case IN_TO_OUT = 2
    case OUTDOOR = 3
    case UNKNOWN = -1
}

JupiterErrorCode

public enum JupiterErrorCode: Int {
    case INVALID_ID
    case INVALID_MODE
    case NETWORK_DISCONNECT
    case DUPLICATED_SERVICE
    case LOGIN_FAIL
    case GENERATOR_FAIL
    case CALC_INIT_FAIL
}

JupiterServiceCode

public enum JupiterServiceCode: Int {
    case SERVICE_FAIL
    case SERVICE_SUCCESS
    case BECOME_BACKGROUND
    case BECOME_FOREGROUND
    case BLUETOOTH_UNAVAILABLE
    case BLUETOOTH_OFF
    case BLUETOOTH_SCAN_STOP
    case NETWORK_DISCONNECT
}

🦿 Mocking Mode

  • Since Jupiter performs positioning based on TJLABS' BLE beacons, it cannot receive indoor location data outside of the actual service area.
  • If you use the mocking mode below, you can receive a randomly defined JupiterResult even outside the service area.
manager.setMockingMode()

📌 Example

final class ViewController: UIViewController, JupiterServiceManagerDelegate {

    private var manager: JupiterServiceManager?

    override func viewDidLoad() {
        super.viewDidLoad()

        TJJupiterAuth.shared.auth(
            accessKey: "KEY",
            secretAccessKey: "SECRET"
        ) { [weak self] _, success in

            guard success else { return }

            let manager = JupiterServiceManager(id: "USER_ID")
            manager.delegate = self

            manager.startService(
                region: JupiterRegion.KOREA.rawValue,
                sectorId: 123,
                mode: .MODE_AUTO,
                debugOption: false
            )

            self?.manager = manager
        }
    }
}

📄 License

TJJupiterSDK is proprietary software provided by TJLabs under a separate commercial license agreement. Redistribution is not permitted except as agreed in writing.