Classes

The following classes are available globally.

BluetoothCollector

  • Collector for Bluetooth Low Energy (BLE) capability information.

    This collector determines whether the device supports Bluetooth Low Energy by checking the CoreBluetooth framework’s central manager state. It provides information about BLE support without requiring location permissions.

    See more

    Declaration

    Swift

    public class BluetoothCollector : DeviceCollector, @unchecked Sendable

BrowserCollector

  • Collector for browser user agent information.

    This collector retrieves the user agent string from the device’s WebKit engine, which provides information about the browser, device, and system version that web applications would see when making requests.

    See more

    Declaration

    Swift

    public class BrowserCollector : DeviceCollector, @unchecked Sendable

DeviceProfileCollector

  • Main collector that orchestrates comprehensive device profile collection.

    This collector serves as the root coordinator for gathering all device profile information based on a specified configuration. It manages the collection process, handles conditional data gathering, and combines results into a unified profile.

    See more

    Declaration

    Swift

    public class DeviceProfileCollector : DeviceCollector, @unchecked Sendable

HardwareCollector

  • Collector for device hardware specifications and capabilities.

    This collector gathers comprehensive hardware information including manufacturer, memory specifications, CPU details, display properties, and camera capabilities.

    See more

    Declaration

    Swift

    public class HardwareCollector : DeviceCollector, @unchecked Sendable

LocationCollector

  • Collector for device geographic location information.

    This collector attempts to determine the device’s current location using the LocationManager system. It handles authorization requests and provides location data when available and permitted.

    Privacy Considerations

    Requires

    Requires location permissions from the user
    • Respects user privacy settings and restrictions

    Usage Requirements

    • App must include location usage descriptions in Info.plist
    • User must grant location permissions
    • Location services must be enabled on device
    See more

    Declaration

    Swift

    public class LocationCollector : NSObject, DeviceCollector, @unchecked Sendable

NetworkCollector

  • Collector for device network connectivity information.

    This collector determines the current network connectivity status using the modern Network framework available in iOS 13+. It provides a snapshot of connectivity at collection time.

    See more

    Declaration

    Swift

    public class NetworkCollector : DeviceCollector, @unchecked Sendable

PlatformCollector

  • Collector for device platform and system information.

    This collector gathers comprehensive information about the iOS platform, device model, system version, localization settings, and security status.

    See more

    Declaration

    Swift

    public class PlatformCollector : DeviceCollector, @unchecked Sendable

TelephonyCollector

  • Collector for cellular network and carrier information.

    This collector gathers information about the device’s cellular capabilities including carrier name and network country information from available cellular service providers.

    See more

    Declaration

    Swift

    public class TelephonyCollector : DeviceCollector, @unchecked Sendable

DeviceProfile

  • Main entry point for the DeviceProfile SDK.

    This class provides the primary interface for integrating device profile collection capabilities into Ping Identity journey flows. It handles registration of callback types and provides the foundation for device fingerprinting and profiling functionality.

    Integration

    Call registerCallbacks() during application startup to enable device profile collection in authentication journeys.

    Usage Example

    // In AppDelegate or SceneDelegate
    Task { await DeviceProfile.registerCallbacks() }
    

    Architecture

    The DeviceProfile system consists of several key components:

    • Collectors: Gather specific types of device information
    • Callback: Handles server communication and configuration
    • Config: Controls what data is collected and how
    • Results: Structured data containing device profile information
    See more

    Declaration

    Swift

    @objc
    public class DeviceProfile : NSObject

DeviceProfileCallback

  • A callback implementation for collecting and processing device profile information.

    This callback is used within the Ping Identity journey framework to gather device metadata and location information based on server configuration. It extends AbstractCallback for modern Swift callback handling and provides a streamlined interface for device profiling.

    Usage in Journey Flow

    1. Server configures what data to collect (metadata, location)
    2. Callback receives configuration via initValue calls
    3. Client calls collect() with optional customization
    4. Device profile data is submitted back to server

    Privacy Considerations

    • Location collection requires user permission
    • Metadata collection is configurable per server policy
    • All data collection respects system privacy settings
    See more

    Declaration

    Swift

    public class DeviceProfileCallback : AbstractCallback, ObservableObject, @unchecked Sendable

DeviceProfileConfig

  • Configuration object for customizing device profile collection.

    This class allows fine-grained control over what data is collected and how the collection process behaves. It provides defaults that can be overridden based on application needs.

    See more

    Declaration

    Swift

    public final class DeviceProfileConfig : @unchecked Sendable

LocationManager

  • LocationManager is responsible for requesting authorization, managing, and collecting device location information.

    This class provides a modern, async/await interface for location services built on top of CoreLocation. It handles authorization requests, caching, error handling, and provides both throwing and non-throwing interfaces for different use cases.

    Features

    • Async/Await Interface: Modern Swift concurrency support
    • Automatic Authorization: Handles permission requests transparently
    • Location Caching: Reduces battery usage with intelligent caching
    • Error Handling: Comprehensive error reporting and recovery
    • Privacy Compliance: Respects system privacy settings and user choices

    Usage Example

    do {
        let location = try await LocationManager.shared.requestLocation()
        print("Current location: \(location?.coordinate)")
    } catch {
        print("Location failed: \(error)")
    }
    

    Privacy Requirements

    Your app’s Info.plist must include appropriate usage descriptions:

    • NSLocationWhenInUseUsageDescription for basic location access
    • NSLocationAlwaysAndWhenInUseUsageDescription for background location access
    See more

    Declaration

    Swift

    public class LocationManager : NSObject, ObservableObject, @unchecked Sendable
    extension LocationManager: @preconcurrency CLLocationManagerDelegate