Swiftpack.co - Package - OneSignal/OneSignal-iOS-SDK
Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.

OneSignal iOS SDK

CocoaPods Carthage compatible SwiftPM Compatible Build Status


OneSignal is a free push notification service for mobile apps. This plugin makes it easy to integrate your native iOS app with OneSignal.

iOS Notification

Installation

See OneSignal's iOS Native SDK Setup Guide for documentation.

API

See OneSignal's iOS Native SDK API page for a list of all available methods.

Change Log

See this repository's release tags for a complete change log of every released version.

Support

Please visit this repository's Github issue tracker for feature requests and bug reports related specifically to the SDK. For account issues and support please contact OneSignal support from the OneSignal.com dashboard.

Supports:

  • Swift and Objective-C Projects
  • Supports iOS 9 to iOS 14

Github

link
Stars: 361

Releases

3.1.0 Release - 2021-01-04T18:00:45

Added Support for IAM Carousel Per Page Impressions

  • The SDK will now send page impressions for individual IAM Carousel pages. #735

Fixes a bug where IAMs would be shown past their stop time.

  • Cached IAMs could be shown past their stop time. The SDK now checks if an IAM is past its stop time before it is displayed. #841

3.0.1 Release - 2020-12-17T22:39:41

Added Apple Silicon Simulator support to the OneSignal XCFramework

Fixes an edge case where setExternalUserId wouldn't update to the server

  • If a user force quit the app then re-opened within 30 seconds external user ids would not update. #835

Major Release 3.0.0 - 2020-12-08T23:54:58

⚠️ This is a major release which contains breaking API changes.

See the full list of changes along with step-by-step guides to upgrade. https://documentation.onesignal.com/docs/mobile-2020-api-migration-guide

3.0.0 Beta 5 - 2020-12-05T00:54:22

Major Release 3.0.0 Beta 5 🛠️

⚠️ This is a major beta release which contains breaking API changes. See the full list of changes along with step-by-step guides to upgrade. https://documentation.onesignal.com/docs/mobile-2020-api-migration-guide

❓ Please provide feedback and bug reports with the beta version included in the title to this repo's issue tracker. https://github.com/OneSignal/OneSignal-iOS-SDK/issues

Always sending external id authentication token #824

  • In this release we send the external id authentication hash in all players and on session calls

Direct Outcomes fix #823

  • This release fixes an issue that caused direct outcomes to not function properly

2.16.1 Release - 2020-12-02T23:54:01

Always sending external id authentication token

  • In this release we send the external id authentication hash in all players and on session calls

3.0.0 Beta 4 - 2020-11-23T21:37:32

Major Release 3.0.0 Beta 4 🛠️

⚠️ This is a major beta release which contains breaking API changes. See the full list of changes along with step-by-step guides to upgrade. https://documentation.onesignal.com/docs/mobile-2020-api-migration-guide

❓ Please provide feedback and bug reports with the beta version included in the title to this repo's issue tracker. https://github.com/OneSignal/OneSignal-iOS-SDK/issues

Changes from 3.0.0 beta 4

  • Authenticated External User ID
  • Updating various public APIs such as removing setAppSettings and renaming OSSession
  • Fixing an issue with badge counts not being cleared
  • Fixing an issue with IAM push permission prompts not bringing the user to the settings app.

2.16.0 Release - 2020-11-21T02:13:25

Removing IDFA Usage and Adding Authenticated External User ID Funcationality

  • IDFA was causing issues with uploading apps to the app store and was not being used. It has been removed from the SDK
  • Authenticated External User ID functionality has been added to secure external user ids

3.0.0 Beta 3 - 2020-10-28T22:12:54

Major Release 3.0.0 Beta 3 🛠️

⚠️ This is a major beta release which contains breaking API changes. See the full list of changes along with step-by-step guides to upgrade. https://documentation.onesignal.com/docs/mobile-2020-api-migration-guide

❓ Please provide feedback and bug reports with the beta version included in the title to this repo's issue tracker. https://github.com/OneSignal/OneSignal-iOS-SDK/issues

Changes from 3.0.0 beta 2

  • App Clip Support
  • Fixing IAM previews from not being displayed

2.15.4 Release - 2020-10-20T18:09:27

Fixes In-App Message redisplaying scenario

  • Fixes issue where In-App Message would not redisplay if triggers where meet after backgrounding than foregrounding the app
    • PR #745

3.0.0 Beta 2 - 2020-10-06T00:57:29

Major Release 3.0.0 Beta 2 🛠️

⚠️ This is a major beta release which contains breaking API changes. See the full list of changes along with step-by-step guides to upgrade. https://documentation.onesignal.com/docs/mobile-2020-api-migration-guide

❓ Please provide feedback and bug reports with the beta version included in the title to this repo's issue tracker. https://github.com/OneSignal/OneSignal-iOS-SDK/issues

Changes from 3.0.0 beta1

This beta adds a json representation of the OSNotification class

3.0.0 Beta1 - 2020-09-25T02:13:52

Major Release 3.0.0 Beta1🛠️

⚠️ This is a major beta release which contains breaking API changes. See the full list of changes along with step-by-step guides to upgrade. https://documentation.onesignal.com/docs/mobile-2020-api-migration-guide

❓ Please provide feedback and bug reports with the beta version included in the title to this repo's issue tracker. https://github.com/OneSignal/OneSignal-iOS-SDK/issues

2.15.3 Release - 2020-08-26T02:15:40

Fixed migration from another provider race condition

  • Fixed issue where device could register without waiting for Apple to give the SDK a pushToken.
    • In the migration scenario this means there was a new player is created instead of using the existing imported record that could have tags or other data on it.
    • PR #728

2.15.2 Release - 2020-08-13T20:29:05

Scene Lifecycle Detection Improvements and Various Bug Fixes

  • Lifecycle delegates not being called for Scene based apps Fix PR
    • Instead of swizzling all of the UIApplicationDelegate lifecycle methods OneSignal now observers the UIApplication lifecycle NSNotificationCenter notifications, and will listen for the corresponding UIScene lifecycle notifications if applicable.
  • Notifications received while app is in the foreground but inactive being automatically opened Fix PR
  • Webviews not being cleared properly when there are multiple in a row Fix PR #606
  • Always updating notification types regardless of push token Fix PR
  • Doing a migration from the NSE when receiving a notification after the app is installed but not launched Fix PR

2.15.1 Release - 2020-08-05T19:51:36

Fixing Swift Package Manager

  • This release fixes the Swift Package Manager build. The SwiftPM setup guide can be found here.

2.15.0 Release - 2020-08-04T21:57:46

Added Swift Package Manager support and an XCFramework version of the OneSignal SDK

  • With Swift Package Manager support, the OneSignalSDK can be added to projects directly from Xcode #179. The SwiftPM setup guide can be found here

  • An XCFramework version of the SDK has been added to support Mac Catalyst for Swift Apps #636! Setup instructions can be found here

2.14.3 Release - 2020-06-30T19:41:01

OSDevice class added, Fixed registerForRemoteNotifications, Fix IAM deadlock, Match Android OSInAppMessageAction

  • OSDevice class added for easy access to device attributes
    • i.e. userId, pushToken, emailUserId, email, etc.
  • registerForRemoteNotifications called from main thread
  • Fix IAM deadlock
    • Fix deadlock on launch for duration based IAM triggers
  • Match Android OSInAppMessageAction
    • OSInAppMessageAction now has a jsonRepresentation method and one source of truth, #1012

2.14.2 Release - 2020-06-11T03:08:45

Fixed IAM Direct Outcome Detection

  • Fixed issue where IAM could be counted as Direct when it should not. PR #688

2.14.1 Release - 2020-06-06T02:17:51

Fixed OSIndirectNotification error on SDK upgrade & switch to UIAlertController

  • Fixed app start crash related to OSIndirectNotification rename in 2.14.0. Fixes issue #680
  • Switched to AlertControllers from AlertViews for SwiftUI compatibility. PR #683

2.14.0 Release - 2020-05-30T00:56:30

Permission Prompt Improvements, File Type Detection Improvements, External User Id Fix, IAM Outcome Tracking

  • Permission Prompt Improvements (Push and Location)
    • Detects when permission not added on preview IAMs
    • Add settings prompt when after the user has denied first prompt
  • File Type Detection Improvements
    • Improved source of truth for push notification attachment file type detection. PR #670
  • External User Id Fix
    • Setting external user id sometimes got stuck in a state where dashboard had old or no external user id set, but the SDK log informed it had already been set
  • IAM Outcome Tracking
    • SDK now tracks Push Notifications and In-App Messages in regard to outcomes

2.13.1 Release - 2020-04-02T22:53:30

OneSignal Header Needed Updating, In-App Messaging Supports SwiftUI UIScene

  • iOS Native 2.13.0 Framework Needed Updated OneSignal.h
  • In-App Messaging Supports SwiftUI UIScene class
    • Issue #649

2.13.0 Release - 2020-03-24T05:04:25

In-App Messaging Improvements, Added External User Id Update Callback, API URL Changed, Minor Bug Fixes

  • In-App Messaging Improvements: Redisplaying with a limit and delay, Adding and removing tags, sending outcomes, and permission prompts
    • Redisplay params now expected (has defaults) in parser
    • Adding and removing tags w/ element click
    • Sending outcomes w/ element click
    • Showing permission prompts for location and push w/ element click
  • Set and remove external user id now have completion callback
    • Callback for completion added to verify the status of the set or remove of an external user id (push & email)
  • Changed internal API call from onesignal.com to api.onesignal.com
    • Fixes blocked in Egypt issues #855, #919

2.12.6 Release - 2020-01-31T23:20:37

Minor Bug Fixes

  • Moved some init code before initDone check so it runs these things every time init is called
    • Wrapper SDKs call init twice, so when initDone was added it harmed some wrapper SDKs

2.12.5 Release - 2020-01-17T00:23:29

Minor Bug Fixes

  • Cold Start Subscription Fix #596

    • Needed better differentiation between TO and FROM states of OneSignalCommonDefines keys when saving and getting
  • Wrapper(s) Second Init Not Pulling iOS Params Fix #593

    • iOS remote params couldn't be pulled and caused SDK to use the default values assigned
  • SetLocationShared Changes #533

    • Now setLocationShared:false clears last location in the SDK
    • Extra VERBOSE logging added to track the state location checks for better insight
  • Notification Action Buttons Not Displaying Fix #430

    • Forced a refresh on the internal list of list categories so that the action buttons will be added to the notification as well
  • IAM Pause Check Change

    • IAMs accumulate in the queue, but prevent the SDK from showing any IAMs from the queue until in app messaging is enabled again

2.12.4 Release - 2020-01-16T01:50:04

Crash From Null Param & Minor Bug Fixes

  • Crash From Null Param #590
    • NSMutableArray addObject method called with a null NSString param caused a crash
    • These notifications appearing with null/empty ids are most likely not OneSignal notifications, but handling was implemented to ignore these now and also clean any existing cached ones

2.12.3 Release - 2019-12-13T01:51:05

Confirmed Deliveries upgrade, i386 simulator, Carthage fixes

  • Fixed Carthage build issue
  • Fixed missing i386 for 32 bit iOS simulators
  • Fixed Confirmed Deliveries not sending for those updating from an older SDK.

2.12.2 Release - 2019-12-04T23:19:47

Minor fixes

  • jsonRepresentation in OSOutcomeEvent needed a minor check to prevent crashing

2.12.1 Release - 2019-12-03T22:16:40

Received Receipts

2.12.0 Release - 2019-11-21T03:49:50

Outcome Events, Catalyst Support, & Fixed In-App Message Crash

  • New Outcomes feature
    • Incorporates outcomes to the focus request for Session Duration tracking on the dashboard
    • Includes 3 new public methods sendOutcome, sendUniqueOutcome, and sendOutcomeWithValue
    • The concept of a session type now exists in the SDK, DIRECT, INDIRECT, UNATTRIBUTED
  • Catalyst support now lets you build iPad apps with our SDK on Mac #534
    • Must add x86_64h architecture to your targets
      • Under "Valid Architectures" AND "Architectures"
  • Fixes In-App Message crash on dismissing #542 & #555

2.11.2 Release - 2019-10-01T23:34:48

In-App Message iOS Preview crash fix

  • Fixes In-App Message preview crash fix note in issue #542
  • Bitcode Version - Xcode 10.1

2.11.1 Release - 2019-09-27T00:53:39

Fixed In-App Message Crash, setLocationShared(), and mikechoch Warnings

  • Fixed the mikechoch warnings showing up in apps #525
    • Warnings caused by GENERATE_MASTER_OBJECT_FILE being set to YES in release 2.10.2
    • Changed the DEPLOYMENT_POSTPROCESSING flag to YES to fix the warnings
  • In-App Message causing iOS app to crash because of constraint conflicts #536
    • Constraint conflict was occurring when sending previews with specific scenarios
    • Fixed by removing all constraints on OSInAppMessageView before setup of an incoming In-App Message
  • setLocationShared was being set false but location still being sent to player record #533
    • Fixed by adding a check into the locationManager callback to return early when location shared is false