Classes
The following classes are available globally.
-
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 moreDeclaration
Swift
public class BluetoothCollector : DeviceCollector, @unchecked Sendable
-
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 moreDeclaration
Swift
public class BrowserCollector : DeviceCollector, @unchecked Sendable
-
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 moreDeclaration
Swift
public class DeviceProfileCollector : DeviceCollector, @unchecked Sendable
-
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 moreDeclaration
Swift
public class HardwareCollector : DeviceCollector, @unchecked Sendable
-
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
Declaration
Swift
public class LocationCollector : NSObject, DeviceCollector, @unchecked Sendable
-
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 moreDeclaration
Swift
public class NetworkCollector : DeviceCollector, @unchecked Sendable
-
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 moreDeclaration
Swift
public class PlatformCollector : DeviceCollector, @unchecked Sendable
-
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 moreDeclaration
Swift
public class TelephonyCollector : DeviceCollector, @unchecked Sendable
-
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
Declaration
Swift
@objc public class DeviceProfile : NSObject
-
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
- Server configures what data to collect (metadata, location)
- Callback receives configuration via
initValuecalls - Client calls
collect()with optional customization - 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
Declaration
Swift
public class DeviceProfileCallback : AbstractCallback, ObservableObject, @unchecked Sendable
-
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 moreDeclaration
Swift
public final class DeviceProfileConfig : @unchecked Sendable
-
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:
NSLocationWhenInUseUsageDescriptionfor basic location accessNSLocationAlwaysAndWhenInUseUsageDescriptionfor background location access
Declaration
Swift
public class LocationManager : NSObject, ObservableObject, @unchecked Sendableextension LocationManager: @preconcurrency CLLocationManagerDelegate
View on GitHub
Classes Reference