{"id":18753357,"url":"https://github.com/pingidentity/pingone-mobile-sdk-ios","last_synced_at":"2026-04-26T17:00:36.501Z","repository":{"id":37773006,"uuid":"229798414","full_name":"pingidentity/pingone-mobile-sdk-ios","owner":"pingidentity","description":null,"archived":false,"fork":false,"pushed_at":"2026-03-02T08:05:27.000Z","size":50722,"stargazers_count":9,"open_issues_count":2,"forks_count":14,"subscribers_count":8,"default_branch":"main","last_synced_at":"2026-04-21T07:30:10.666Z","etag":null,"topics":["pingone"],"latest_commit_sha":null,"homepage":"","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pingidentity.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE_SDK.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2019-12-23T17:47:33.000Z","updated_at":"2026-03-01T15:46:29.000Z","dependencies_parsed_at":"2025-02-03T13:30:54.436Z","dependency_job_id":"9d8f5aaf-463d-4ce7-88e0-5cf69bd63399","html_url":"https://github.com/pingidentity/pingone-mobile-sdk-ios","commit_stats":null,"previous_names":[],"tags_count":22,"template":false,"template_full_name":null,"purl":"pkg:github/pingidentity/pingone-mobile-sdk-ios","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pingidentity%2Fpingone-mobile-sdk-ios","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pingidentity%2Fpingone-mobile-sdk-ios/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pingidentity%2Fpingone-mobile-sdk-ios/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pingidentity%2Fpingone-mobile-sdk-ios/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pingidentity","download_url":"https://codeload.github.com/pingidentity/pingone-mobile-sdk-ios/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pingidentity%2Fpingone-mobile-sdk-ios/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32305039,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-26T09:34:17.070Z","status":"ssl_error","status_checked_at":"2026-04-26T09:34:00.993Z","response_time":129,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["pingone"],"created_at":"2024-11-07T17:25:29.247Z","updated_at":"2026-04-26T17:00:36.491Z","avatar_url":"https://github.com/pingidentity.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PingOne MFA Mobile SDK\n\n## Overview\n\nPingOne MFA Mobile SDK is a set of components and services targeted at enabling organizations to include multifactor authentication (MFA) into native applications.\nThis solution leverages Ping Identity’s expertise in MFA technology, as a component that can be embedded easily and quickly into a new or existing application. \n\nRelease notes can be found [here](./release-notes.md).\n\n### Documentation\n\nReference documentation is available for PingOne MFA Mobile SDK, describing its capabilities, features, installation and setup, integration with mobile apps, deployment and more: \n\n* [Introduction to PingOne MFA](https://docs.pingidentity.com/pingone/strong_authentication_mfa/p1_intro_to_strong_authentication.html)\n* [PingOne MFA Mobile SDK Overview](https://apidocs.pingidentity.com/pingone/native-sdks/v1/api/#pingone-mfa-sdk-for-ios)\n* [PingOne MFA Mobile SDK API Documentation](https://pingidentity.github.io/pingone-mobile-sdk-ios/documentation/pingonesdk)\n* [PingOne MFA Mobile SDK Sample App](https://github.com/pingidentity/pingone-sample-app-ios)\n* [PingOne MFA SDK Ready-For-Use Authenticator App](https://github.com/pingidentity/pingone-authenticator-sample-app-ios)\n\n### Content\n\n1. [Prerequisites for using Apple Push Notifications Service](#prerequisites)\n2. [Configure the SDK](#configure)\n3. [Set up iOS push messaging in the PingOne admin console](#set_up_push)\n4. [Compatibility](#compatibility)\n5. [Installation](#installation)\n    1. [Installing with the Swift Package Manager](#installation_package)\n    2. [Manual download from the Ping Identity Assets](#installation_manual)\n6. [Register device token on PingOne server](#register_device)\n7. [Handling Push Notifications](#handle_push)\n8. [Working with push messages in iOS](#work_with_push)\n9. [Test Push Notifications](#test_push)\n10. [Localization](#localization)\n11. [Kechain sharing](#kechain_sharing)\n\n\n\u003ca name=\"prerequisites\"\u003e\u003c/a\u003e\n#### 1. Prerequisites for using Apple Push Notifications Service\n\nPrepare the iOS push messaging mandatory data from Apple Developer portal:\n\n* Key ID\n* Team ID\n* Token .p8 file\n* Bundle ID\n\nSee [Establishing a Token-Based Connection to APNs](https://developer.apple.com/documentation/usernotifications/setting_up_a_remote_notification_server/establishing_a_token-based_connection_to_apns).\n\n\u003ca name=\"configure\"\u003e\u003c/a\u003e\n#### 2. Configure the SDK\n\nYou must configure the SDK at least once before using it. Configure the SDK using `PingOne.configure()`, which sets the PingOne geography that the SDK will use as the \"trust issuer\". Note that you only specify one geography for the `configure` method, but this makes it possible to pair the device in multiple geographies (NA, EU etc).\n\n```swift\n/// Initializes the PingOne SDK for a specific geo.\n    ///\n    /// - Parameter geo: The selected enum value.\n    /// Possible values are: `NorthAmerica`, `Europe`, `Canada`, `Australia` and `Singapore`.\n    ///\n    /// \u003e Warning: If this method is not called, the SDK will throw an error.\n    ///\n    /// - Returns: NSError in case of an error.\n    @objc public static func configure(geo: PingOneGeo, completionHandler: @escaping (_ error: NSError?) -\u003e Void)\n```\n\nSelect the desired geo from the PingOneGeo enum:\n\n```swift\n/// Public enum that describes the geographical servers available for PingOne SDK.\n@objc public enum PingOneGeo: NSInteger, Codable {\n    /// North America\n    case NorthAmerica\n    /// Europe\n    case Europe\n    /// Australia\n    case Australia\n    /// Canada\n    case Canada\n   /// Singapore\n    case Singapore\n}\n```\n\n##### Warning\n\nOnce the device is configured for a specific geography, `configure(PingOneGeo)` cannot be used to select a new geography. If you must change the geography for purposes such as testing, \nyou must reset the device by calling `removePingOneLocalData()`, which also clears all SDK memory in the mobile cache.\n\nPingOne server supports multi-region, therefore any geography can be used as the trust issuer, not necessarily the one the device is paired to.\n\n\n\u003ca name=\"set_up_push\"\u003e\u003c/a\u003e\n#### 3. Set up iOS push messaging in the PingOne admin console\n\nTo define your PingOne SDK-based application in the PingOne admin console (**Applications \u003e Applications \u003e {NATIVE application} \u003e Edit \u003e Mobile**), you will need to upload your .p8 token and provide the Key ID, Team ID, and Bundle ID. See [Editing an application](https://docs.pingidentity.com/pingone/applications/p1_edit_application_native.html) - Native in the PingOne administration guide.\n\nBeginning with iOS 15, users can define focus modes. In a defined focus mode, all notifications are blocked except those from apps that you choose to allow or notifications that are defined as \"time-sensitive\".\n\nIf you want notifications from the app that you are developing with the PingOne Mobile SDK to be defined as \"time-sensitive\", follow these steps:\n\n* In the Xcode project, select your target -\u003e tap the `Signing \u0026 Capabilities` tab -\u003e add the `Time Sensitive Notifications` capability.\n* Make sure to update your app Identifier in the Apple developer account to support `Time Sensitive Notifications`.\n* After the identifier is updated, you need to update the app provision profiles as well. \n\nFor more information, see the Apple documentation on [managing identifiers](https://developer.apple.com/help/account/manage-identifiers/enable-app-capabilities) and [adding capabilities to your app](https://developer.apple.com/documentation/xcode/adding-capabilities-to-your-app).\n\n\u003ca name=\"compatibility\"\u003e\u003c/a\u003e\n#### 4. Compatibility\n\n**Note:** PingOne SDK supports the following software versions:\n\n* Xcode 14 and above.\n* iOS 15.0 and above.\n\n\u003ca name=\"installation\"\u003e\u003c/a\u003e\n#### 5. Installation\n\nYou can use either of the following methods to add the PingOne SDK component to your existing project:\n\n* Install with the Swift Package Manager\n* Install from the Ping Identity Assets\n\n\u003ca name=\"installation_package\"\u003e\u003c/a\u003e\n##### 5.1 Installing with the Swift Package Manager\n\n1. Select File → Add Packages… in Xcode’s menu bar.\n2. Search for the PingOne SDK using the repo's URL: `https://github.com/pingidentity/pingone-mobile-sdk-ios.git`\n3. Set the Dependency Rule to `Branch` with value `main`, and make sure that `Add to Project` is set to your project.\n4. Select Add Package.\n5. Verify that the package was downloaded in your project.\n\n\u003ca name=\"installation_manual\"\u003e\u003c/a\u003e\n##### 5.2 Manual download from the Ping Identity Assets\n\n1. Download the latest version [2.3.0](https://assets.pingone.com/pingonemobile/ios-sdk/release/PingOneSDK.xcframework.2.3.0.zip).\n2. Unzip the PingOneSDK.xcframework zipped file and drag it into your project.\n3. In your **Project Navigator**, click on your target, and drag **PingOneSDK.xcframework** to **Frameworks, Libraries, and Embedded Content**.\n4. Check the **Copy items if needed** checkbox.\n\n    ![](./img/p1_i_xc11-SDKintegrateIntoIDE.png)\n\n5. Integrate the PingOneSDK component into your code:\n\t* Import the framework into your application initialization code:\u003cbr\u003e`import PingOneSDK`\n\n\u003ca name=\"register_device\"\u003e\u003c/a\u003e\n#### 6. Register device token on PingOne server\n\nIn order to receive push notifications from PingOne SDK, use the following code in your `didRegisterForRemoteNotificationsWithDeviceToken` call, passing the deviceToken as is:\n\n```swift\n@objc public static func setDeviceToken(token deviceToken: Data, type: APNSDeviceTokenType, completionHandler: @escaping (_ error: [NSError]?) -\u003e Void)\n```\n\n\u003ca name=\"handle_push\"\u003e\u003c/a\u003e\n#### 7. Handling Push Notifications\n\nPingOne SDK will only handle push notifications which were issued by the PingOne SDK server. For other push notifications, `NSError` with the code `10002, unrecognizedRemoteNotification` will be returned.\n\nThe `APNSDeviceTokenType` should be set like this:\n\n```swift\nvar deviceTokenType : PingOne.APNSDeviceTokenType = .production\n#if DEBUG\ndeviceTokenType = .sandbox\n#endif\n```\n\nInside the following AppDelegate method:\n\n```swift\noptional func application(_ application: UIApplication,\ndidReceiveRemoteNotification userInfo: [AnyHashable : Any],\nfetchCompletionHandler completionHandler: @escaping (UIBackgroundFetchResult) -\u003e Void)\n```\n\nCall:\n\n```swift\n@objc public static func processRemoteNotification(_ userInfo: [AnyHashable : Any], completionHandler: @escaping (_ notificationObject: NotificationObject?, _ error: NSError?) -\u003e Void)\n```\nand pass it the `userInfo` as is.\n\n\u003ca name=\"work_with_push\"\u003e\u003c/a\u003e\n#### 8. Working with push messages in iOS\n\nThis section details the steps needed in order to work with push messages in iOS:\n\n* Enable **Push Notifications**: Go to your Project Navigator’s **capabilities** tab. Select **Push Notifications \u003e Enable**.\n* Enable **Remote Notifications**: Go to your Project Navigator’s **capabilities** tab. Turn on **Background Modes \u003e Remote notifications**.\n* Enable **Push Notifications** in your **Apple Developer Account \u003e Certificates, Identifiers \u0026 Profiles \u003e Identifiers \u003e Capabilities \u003e Push Notifications \u003e Enable**.\n* Enter your app’s **Deployment Details** settings in your **Apple Developer Account \u003e Certificates, Identifiers \u0026 Profiles \u003e Identifiers \u003e Your App ID.** These details are now mandatory prerequisites for Apple to register your device for push notifications.\n\n##### Push Notification Setup\n\nWhen the app starts, `UIApplication.shared.registerForRemoteNotifications()` is called to retrieve an APNS push token from the OS. After obtaining the token, it must be set in the PingOne SDK using `setDeviceToken()` before pairing, as this step stores the token locally for push notification authentication.\n\nIf pairing is done before calling `setDeviceToken()`, you can still update the token on the server by calling `setDeviceToken()` afterward, which will enable push notifications.\n\n##### Controlling Push Notifications\n\n1. **`setDeviceToken()`** — Must be called at least once with a valid token to enable push notifications.\n2. **`allowPushNotifications()`** — Optional, used to disable push notifications.\n\n- If `setDeviceToken()` is called and is not `allowPushNotifications(false)`, then `device.pushEnabled` in PingOne server is set to `true`.\n- If `allowPushNotifications(false)` is called or `setDeviceToken()` is not called, `device.pushEnabled` is set to `false`.\n\nThe only way to toggle `device.pushEnabled` is by calling `setDeviceToken()` or `allowPushNotifications()`.\n\n##### Push Notification Configuration Results\n\nThe table below outlines the results of different configurations for push notifications based on the app's notification settings and background refresh settings:\n\n| Notification Setting for App | Background Refresh for App | Push will be sent during auth | \"PUSH ENABLED\" |\n|------------------------------|----------------------------|-------------------------------|----------------|\n| **TRUE**                     | TRUE                       | TRUE                          | TRUE           |\n| **FALSE**                    | TRUE                       | TRUE                          | TRUE           |\n| **TRUE**                     | FALSE                      | TRUE                          | TRUE           |\n| **FALSE**                    | FALSE                      | FALSE                         | TRUE           |\n\n###### Explanation:\n\n- **Notification Setting for App**: Indicates whether notifications are enabled for the app.\n- **Background Refresh for App**: Indicates whether background refresh is enabled, allowing the app to update content in the background.\n- **Push will be sent during auth**: Shows whether a push notification will be sent during authentication based on the combination of notification and background refresh settings.\n- **\"PUSH ENABLED\"**: Indicates whether push notifications are globally enabled for the app.\n\n###### Points to note:\n\n- Push notifications during authentication (`Push will be sent during auth`) are dependent on both the notification setting and the background refresh setting.\n  - If either setting is `TRUE`, push notifications can still be sent during authentication except when both settings are `FALSE`.\n- The `\"PUSH ENABLED\"` status remains `TRUE` regardless of individual settings, indicating that the capability to receive pushes is not directly tied to these specific settings but may depend on broader system configurations or other conditions.\n\n\n\u003ca name=\"test_push\"\u003e\u003c/a\u003e\n#### 9. Test Push Notifications\n\nFor paired devices, it is possible to test push notification functionality using the `testRemoteNotification` method:\n\n```swift\n/// Run push notification test\n///\n/// This method tests the push notification flow for a specified paired geo.\n///\n/// - Parameter geo: The selected geo, represented by an enum value.\n/// Valid options include: `NorthAmerica`, `Europe`, `Canada`, and `Australia`.\n///\n/// - Returns: An array of `NotificationTest` objects. In case of an error, an `NSError` object is returned.\n@objc public static func testRemoteNotification(_ geo: PingOneGeo, completionHandler: @escaping (_ results: [NotificationTest]?, _ status: NotificationTest.TestResult, _ error: NSError?) -\u003e Void)\n```\n\nThis method returns a status from the `TestResult` enum, summarizing the test result:\n\n```swift\n/// Test passed successfully.\ncase pass\n/// Test failed, push notification will not show.\ncase fail\n/// Test failed but possibly push notification will show with some limitation.\ncase warning\n```\n\nThe SDK runs the following tests, which are returned in the results array as NotificationTest objects with different test types:\nFor each `NotificationTest`, developers can access the following information to understand the test content and results:\n\n```swift    \n/// Public enum that describes the notification of all tests name, description, and results Info.\n@objc public enum TestType: NSInteger {\n    case tokenType\n    case allowNotification\n    case token\n    case notificationsSetting\n    case backgroundSetting\n    case connectivity\n    case categories\n    case testPush\n    case setPushPayloadToSDK\n}\n\n/// The name of the test.\n@objc public var name\n/// The description of the test.\n@objc public var testDescription\n/// The test result represented by `TestResult`.\n@objc public var testResult\n/// In case the test didn't pass, information that explains the failure reason and how to overcome it.\n@objc public var resultsInfo\n```\n\nSee the PingOne MFA Mobile SDK Sample App [repository](https://github.com/pingidentity/pingone-sample-app-ios) for sample code on how to utilize the testRemoteNotification method for debugging push notifications.\n\n\u003ca name=\"localization\"\u003e\u003c/a\u003e\n#### 10. Localization\n\nThe following keys are returned by the PingOne SDK Remote Notification, with suggested localization:\n\n```swift\n\"notification.confirm\"  = \"Approve\";\n\"notification.deny\"     = \"Deny\";\n\"notification.message\"  = \"You have a new authentication request.\";\n\"notification.title\"    = \"New Authentication\";\n```\n\n**Note:** An example of these keys is provided in the sample app, in the `Localizable.strings` file.\n\n\u003ca name=\"kechain_sharing\"\u003e\u003c/a\u003e\n#### 11. Keychain sharing\n\n**Note:** This step is required only if your app uses Keychain Sharing.\nMake sure that the first item on your Keychain Groups is `YOUR_BUNDLE_ID` (your private keychain group). This requirement will ensure that the SDK keychain values are private, and are not shared between apps​:\n\n![](./img/p1_i_SDKkeychainSharing.png)\n\n## Disclaimer\n\nTHE SAMPLE CODE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SAMPLE CODE OR THE USE OR OTHER DEALINGS IN\nTHE SAMPLE CODE.  FURTHERMORE, THIS SAMPLE CODE IS NOT COMMERCIALLY SUPPORTED BY PING IDENTITY BUT QUESTIONS MAY BE ADDRESSED TO PING'S SUPPORT CENTER OR MAY BE OTHERWISE ADDRESSED IN THE RELATED DOCUMENTATION.\n\nAny questions or issues should go to the support center, or may be discussed in the [Ping Identity developer communities](https://support.pingidentity.com/s/topic/0TO1W000000atTxWAI/pingone-mfa).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpingidentity%2Fpingone-mobile-sdk-ios","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpingidentity%2Fpingone-mobile-sdk-ios","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpingidentity%2Fpingone-mobile-sdk-ios/lists"}