diff --git a/MIGRATION_GUIDE.md b/MIGRATION_GUIDE.md new file mode 100644 index 000000000..438cb08f5 --- /dev/null +++ b/MIGRATION_GUIDE.md @@ -0,0 +1,785 @@ +

OneSignal iOS SDK v5.0.0 Migration Guide

+ +![OneSignal Omni Channel Banner](https://user-images.githubusercontent.com/11739227/208625336-d28c8d01-a7cf-4f8e-9643-ac8d1948e9ae.png) + +# Intro + +In this release, we are making a significant shift from a device-centered model to a user-centered model. A user-centered model allows for more powerful omni-channel integrations within the OneSignal platform. + +To facilitate this change, the `externalId` approach for identifying users is being replaced by the `login` and `logout` methods. In addition, the SDK now makes use of namespaces such as `User`, `Notifications`, and `InAppMessages` to better separate code. + +The iOS SDK is making the jump from `v3` to `v5`, in order to align across OneSignal’s suite of client SDKs. This guide will walk you through the iOS SDK `5.0.0` changes as a result of this shift. + +# Overview + +Under the user-centered model, the concept of a "player" is being replaced with three new concepts: **users**, **subscriptions**, and **aliases**. + +## Users + +A user is a new concept which is meant to represent your end-user. A user has zero or more subscriptions and can be uniquely identified by one or more aliases. In addition to subscriptions, a user can have **data tags** which allows for user attribution. + +## Subscription + +A subscription refers to the method in which an end-user can receive various communications sent by OneSignal, including push notifications, SMS, and email. In previous versions of the OneSignal platform, each of these channels was referred to as a “player”. A subscription is in fact identical to the legacy “player” concept. Each subscription has a **subscription_id** (previously, player_id) to uniquely identify that communication channel. + +## Aliases + +Aliases are a concept evolved from [external user ids](https://documentation.onesignal.com/docs/external-user-ids) which allows the unique identification of a user within a OneSignal application. Aliases are a key-value pair made up of an **alias label** (the key) and an **alias id** (the value). The **alias label** can be thought of as a consistent keyword across all users, while the **alias id** is a value specific to each user for that particular label. The combined **alias label** and **alias id** provide uniqueness to successfully identify a user. + +OneSignal uses a built-in **alias label** called `external_id` which supports existing use of [external user ids](https://documentation.onesignal.com/docs/external-user-ids). `external_id` is also used as the identification method when a user identifies themselves to the OneSignal SDK via `OneSignal.login`. Multiple aliases can be created for each user to allow for your own application's unique identifier as well as identifiers from other integrated applications. + +# Migration Guide (v3 to v5) + +As mentioned above, the iOS SDK is making the jump from `v3` to `v5`, in order to align across OneSignal’s suite of client SDKs. + +## Requirements +- Minimum deployment target of iOS 11 +- Requires Xcode 14 +- If you are using CocoaPods, please use version `1.11.3+` and Ruby version `2.7.5+`. + + +## SDK Installation + +### Code Import Changes +**Objective-C** + +```objc + // Replace the old import statement + #import + + // With the new import statement + #import +``` +**Swift** +```swift + // Replace the old import statement + import OneSignal + + // With the new import statement + import OneSignalFramework +``` + +### Option 1. Swift Package Manager +- Update the version of the OneSignal-XCFramework your application uses to `5.0.0`. +- The Package Product `OneSignal` has been renamed to `OneSignalFramework`. +- Location functionality has moved to its own Package Product `OneSignalLocation`. If you do not explicitly add this product your app you will not have location functionality. If you include location functionality ensure that your app also depends on the `CoreLocation` framework. +- In App Messaging functionality has moved to its own Package Product `OneSignalInAppMessages`. If you do not explicitly add this product your app you will not have in app messaging functionality. If you include In App Messaging functionality ensure that your app also depends on the `WebKit` framework. +- See [the existing installation instructions](https://documentation.onesignal.com/docs/swift-package-manager-setup). + +### Option 2. CocoaPods +The OneSignal pod has added additional subspecs for improved modularity. If you would like to exclude Location or In App Messaging functionality from your app you can do so by using subspecs: +``` + pod 'OneSignal/OneSignal', '>= 5.0.0', '< 6.0' + # Remove either of the following if the functionality is unwanted + pod 'OneSignal/OneSignalLocation', '>= 5.0.0', '< 6.0' + pod 'OneSignal/OneSignalInAppMessages', '>= 5.0.0', '< 6.0' +``` +If you would like to include all of OneSignal's functionality you are still able to use the default pod +``` +pod 'OneSignal', '>= 5.0.0', '< 6.0' +``` +- Update the version of the OneSignalXCFramework your application uses to `5.0.0`. +- Location functionality has moved to its own subspec `OneSignalLocation`. If you include location functionality ensure that your app also depends on the `CoreLocation` framework. +- In App Messaging functionality has moved to its own subspec `OneSignalInAppMessages`. If you include In App Messaging functionality ensure that your app also depends on the `WebKit` framework. +- See [the existing installation instructions](https://documentation.onesignal.com/docs/ios-sdk-setup#step-3-import-the-onesignal-sdk-into-your-xcode-project). + +# API Changes +## Namespaces + +The SDK has been split into namespaces, and functionality previously in the static `OneSignal` class has been moved to the appropriate namespace. The namespaces and how to access them in code are as follows: + +| **Namespace** | **Access Pattern** | +| ----------------- | ----------------------------- | +| Debug | `OneSignal.Debug` | +| InAppMessages | `OneSignal.InAppMessages` | +| Location | `OneSignal.Location` | +| LiveActivities | `OneSignal.LiveActivities` | +| Notifications | `OneSignal.Notifications` | +| Session | `OneSignal.Session` | +| User | `OneSignal.User` | + +## Initialization + +Initialization of the OneSignal SDK, although similar to previous versions, has changed. The `appId` is now provided as part of initialization and cannot be changed. Previous versions of the OneSignal SDK had an explicit `setAppId` function, which is no longer available. A typical initialization now looks similar to below. + +Navigate to your AppDelegate file and add the OneSignal initialization code to `didFinishLaunchingWithOptions`. + +Replace the following: + +**Objective-C** +```objc + [OneSignal initWithLaunchOptions:launchOptions]; + [OneSignal setAppId:@"YOUR_ONESIGNAL_APP_ID"]; +``` + +**Swift** +```swift + OneSignal.initWithLaunchOptions(launchOptions) + OneSignal.setAppId("YOUR_ONESIGNAL_APP_ID") +``` +To match the new initialization: + +**Objective-C** +```objc + [OneSignal initialize:@"YOUR_ONESIGNAL_APP_ID" withLaunchOptions:launchOptions]; +``` +**Swift** +```swift + OneSignal.initialize("YOUR_ONESIGNAL_APP_ID", withLaunchOptions: launchOptions) +``` +Remove any usages of `setLaunchURLsInApp` as the method and functionality has been removed. + +If your integration is **not** user-centric, there is no additional startup code required. A device-scoped user *(please see definition of “**device-scoped user**” below in Glossary)* is automatically created as part of the push subscription creation, both of which are only accessible from the current device or through the OneSignal dashboard. + +If your integration is user-centric, or you want the ability to identify the user beyond the current device, the `login` method should be called to identify the user: + +**Objective-C** +```objc + [OneSignal login:@"USER_EXTERNAL_ID"]; +``` +**Swift** +```swift + OneSignal.login("USER_EXTERNAL_ID") +``` +The `login` method will associate the device’s push subscription to the user that can be identified via the alias `externalId=USER_EXTERNAL_ID`. If that user doesn’t already exist, it will be created. If the user does already exist, the user will be updated to own the device’s push subscription. Note that the push subscription for the device will always be transferred to the newly logged in user, as that user is the current owner of that push subscription. + +Once (or if) the user is no longer identifiable in your app (i.e. they logged out), the `logout` method should be called: + +**Objective-C** +```objc + [OneSignal logout]; +``` +**Swift** +```swift + OneSignal.logout() +``` +Logging out has the affect of reverting to a device-scoped user, which is the new owner of the device’s push subscription. Note that if the current user is already a device-scoped user at the time `logout` is called, this will result in a no-op and the SDK will continue using the same device-scoped user. Any state that exists on this device-scoped user will be kept. This also means that calling `logout` multiple times will have no effect. + +## Subscriptions + +In previous versions of the SDK, a “player” could have up to one email address and up to one phone number for SMS. In the user-centered model, a user can own the current device’s **Push Subscription** along with the ability to have **zero or more** email subscriptions and **zero or more** SMS subscriptions. Note: If a new user logs in via the `login` method, the previous user will no longer longer own that push subscription. + +### **Push Subscription** +The current device’s push subscription can be retrieved via: + +**Objective-C** +```objc + OneSignal.User.pushSubscription.id; + OneSignal.User.pushSubscription.token; + OneSignal.User.pushSubscription.optedIn; +``` +**Swift** +```swift + OneSignal.User.pushSubscription.id + OneSignal.User.pushSubscription.token + OneSignal.User.pushSubscription.optedIn +``` + +### **Opting In and Out of Push Notifications** + +To receive push notifications on the device, call the push subscription’s `optIn` method. If needed, this method will prompt the user for push notifications permission. + +Note: For greater control over prompting for push notification permission, you may use the `OneSignal.Notifications.requestPermission` method detailed below in the API Reference. + +**Objective-C** +```objc + [OneSignal.User.pushSubscription optIn]; +``` +**Swift** +```swift + OneSignal.User.pushSubscription.optIn() +``` +If at any point you want the user to stop receiving push notifications on the current device (regardless of system-level permission status), you can use the push subscription to opt out: + +**Objective-C** +```objc + [OneSignal.User.pushSubscription optOut]; +``` +**Swift** +```swift + OneSignal.User.pushSubscription.optOut() +``` + +To resume receiving of push notifications (driving the native permission prompt if permissions are not available), you can opt back in with the `optIn` method from above. + +### **Email/SMS Subscriptions** + +Email and/or SMS subscriptions can be added or removed via the following methods. The `remove` methods will result in a no-op if the specified email or SMS number does not exist on the user within the SDK, and no request will be made. + +**Objective-C** +```obj + // Add email subscription + [OneSignal.User addEmail:@"customer@company.com"]; + // Remove previously added email subscription + [OneSignal.User removeEmail:@"customer@company.com"]; + + // Add SMS subscription + [OneSignal.User addSms:@"+15558675309"]; + // Remove previously added SMS subscription + [OneSignal.User removeSms:@"+15558675309"]; +``` + +**Swift** +```swift + // Add email subscription + OneSignal.User.addEmail("customer@company.com") + // Remove previously added email subscription + OneSignal.User.removeEmail("customer@company.com") + + // Add SMS subscription + OneSignal.User.addSms("+15558675309") + // Remove previously added SMS subscription + OneSignal.User.removeSms("+15558675309") +``` + +# API Reference + +Below is a comprehensive reference to the `5.0.0` OneSignal SDK. + +## OneSignal + +The SDK is still accessible via a `OneSignal` static class. It provides access to higher level functionality and is a gateway to each subspace of the SDK. + +| **Swift** | **Objective-C** | **Description** | +| -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `OneSignal.initialize("YOUR_ONESIGNAL_APP_ID", withLaunchOptions: launchOptions)` | `[OneSignal initialize:@"YOUR_ONESIGNAL_APP_ID" withLaunchOptions:launchOptions]` | *Initializes the OneSignal SDK. This should be called during startup of the application.* | +| `OneSignal.login("USER_EXTERNAL_ID")` | `[OneSignal login:@"USER_EXTERNAL_ID"]` | *Login to OneSignal under the user identified by the [externalId] provided. The act of logging a user into the OneSignal SDK will switch the [user] context to that specific user.

- If the [externalId] exists, the user will be retrieved and the context will be set from that user information. If operations have already been performed under a device-scoped user, they ***will not*** be applied to the now logged in user (they will be lost).
- If the [externalId] does not yet exist, the user will be created and the context set from the current local state. If operations have already been performed under a device-scoped user, those operations ***will*** be applied to the newly created user.

***Push Notifications and In App Messaging***
Logging in a new user will automatically transfer the push notification and in app messaging subscription from the current user (if there is one) to the newly logged in user. This is because both push notifications and in- app messages are owned by the device.* | +| `OneSignal.logout()` | `[OneSignal logout]` | *Logout the user previously logged in via [login]. The [user] property now references a new device-scoped user. A device-scoped user has no user identity that can later be retrieved, except through this device as long as the app remains installed and the app data is not cleared. Note that if the current user is already a device-scoped user at the time `logout` is called, this will result in a no-op and the SDK will continue using the same device-scoped user. Any state that exists on this device-scoped user will be kept. This also means that calling `logout` multiple times will have no effect.* | +| `OneSignal.setConsentGiven(true)` | `[OneSignal setConsentGiven:true]` | *Indicates whether privacy consent has been granted. This field is only relevant when the application has opted into data privacy protections. See [setConsentRequired].* | +| `OneSignal.setConsentRequired(true)` | `[OneSignal setConsentRequired:true]` | *Determines whether a user must consent to privacy prior to their user data being sent up to OneSignal. This should be set to `true` prior to the invocation of `initialize` to ensure compliance.* | + + + +## Live Activities + +Live Activities are a type of interactive push notification. Apple introduced them in October 2022 to enable iOS apps to provide real-time updates to their users that are visible from the lock screen and the dynamic island. + +Please refer to OneSignal’s guide on [Live Activities](https://documentation.onesignal.com/docs/live-activities), the [Live Activities Quickstart](https://documentation.onesignal.com/docs/live-activities-quickstart) tutorial, and the [existing SDK reference](https://documentation.onesignal.com/docs/sdk-reference#live-activities) on Live Activities. + + +| **Swift** | **Objective-C** | **Description** | +| -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `OneSignal.LiveActivities.enter("ACTIVITY_ID", withToken: "TOKEN")`

***See below for usage of callbacks***

`enter(activityId: String, withToken token: String, withSuccess successBlock: OSResultSuccessBlock?, withFailure failureBlock: OSFailureBlock? = nil)` | `[OneSignal.LiveActivities enter:@"ACTIVITY_ID" withToken:@"TOKEN"]`

***See below for usage of callbacks***

`(void)enter:(NSString *)activityId withToken:(NSString *)token withSuccess:(OSResultSuccessBlock _Nullable)successBlock withFailure:(OSFailureBlock _Nullable)failureBlock`

|*Entering a Live Activity associates an `activityId` with a live activity temporary push `token` on OneSignal's server. The activityId is then used with the OneSignal REST API to update one or multiple Live Activities at one time.* | +| `OneSignal.LiveActivities.exit("ACTIVITY_ID")`

***See below for usage of callbacks***

`exit(activityId: String, withSuccess successBlock: OSResultSuccessBlock?, withFailure failureBlock: OSFailureBlock? = nil)` | `[OneSignal.LiveActivities exit:@"ACTIVITY_ID"]`

***See below for usage of callbacks***

`(void)exit:(NSString *)activityId withSuccess:(OSResultSuccessBlock _Nullable)successBlock withFailure:(OSFailureBlock _Nullable)failureBlock`

|*Exiting a Live activity deletes the association between a customer defined `activityId` with a Live Activity temporary push `token` on OneSignal's server.* | + +**Objective-C** +```objc + // Enter a Live Activity + [OneSignal.LiveActivities enter:@"ACTIVITY_ID" withToken:@"TOKEN" withSuccess:^(NSDictionary *result) { + NSLog(@"enter success with result: %@", result); + } withFailure:^(NSError *error) { + NSLog(@"enter error: %@", error); + }]; + + // Exit a Live Activity + [OneSignal.LiveActivities exit:@"ACTIVITY_ID" withSuccess:^(NSDictionary *result) { + NSLog(@"exit success with result: %@", result); + } withFailure:^(NSError *error) { + NSLog(@"exit error: %@", error); + // handle failure case + }]; + + // Success Output Example: + /* + { + success = 1 + } + */ +``` +**Swift** +```swift + // Enter a Live Activity + OneSignal.LiveActivities.enter("ACTIVITY_ID", withToken: "TOKEN") { result in + print("enter success with result: \(result ?? [:])") + } withFailure: { error in + print("enter error: \(String(describing: error))") + } + + // Exit a Live Activity + OneSignal.LiveActivities.exit("ACTIVITY_ID") { result in + print("exit success with result: \(result ?? [:])") + } withFailure: { error in + print("exit error: \(String(describing: error))") + // handle failure case + } + + // Success Output Example: + /* + { + success = 1 + } + */ +``` + +## User Namespace + +The User name space is accessible via `OneSignal.User` and provides access to user-scoped functionality. + + +| **Swift** | **Objective-C** | **Description** | +| --------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `OneSignal.User.setLanguage("en")` | `[OneSignal.User setLanguage:@"en"]` | *Set the 2-character language for this user.* | +| `let pushSubscriptionProperty = OneSignal.User.pushSubscription.` | `id pushSubscriptionProperty = OneSignal.User.pushSubscription.` | *The push subscription associated to the current user. Please refer to the Push Subscription Namespace API below for additional details.* | +| `OneSignal.User.addAlias(label: "ALIAS_LABEL", id: "ALIAS_ID")` | `[OneSignal.User addAliasWithLabel:@"ALIAS_LABEL" id:@"ALIAS_ID"]` | *Set an alias for the current user. If this alias label already exists on this user, it will be overwritten with the new alias id.* | +| `OneSignal.User.addAliases(["ALIAS_LABEL_01": "ALIAS_ID_01", "ALIAS_LABEL_02": "ALIAS_ID_02"])` | `[OneSignal.User addAliases:@{@"ALIAS_LABEL_01": @"ALIAS_ID_01", @"ALIAS_LABEL_02": @"ALIAS_ID_02"}]` | *Set aliases for the current user. If any alias already exists, it will be overwritten to the new values.* | +| `OneSignal.User.removeAlias("ALIAS_LABEL")` | `[OneSignal.User removeAlias:@"ALIAS_LABEL"]` | *Remove an alias from the current user.* | +| `OneSignal.User.removeAliases(["ALIAS_LABEL_01", "ALIAS_LABEL_02"])` | `[OneSignal.User removeAliases:@[@"ALIAS_LABEL_01", @"ALIAS_LABEL_02"]]` | *Remove aliases from the current user.* | +| `OneSignal.User.addEmail("customer@company.com")` | `[OneSignal.User addEmail:@"customer@company.com"]` | *Add a new email subscription to the current user.* | +| `OneSignal.User.removeEmail("customer@company.com")` | `[OneSignal.User removeEmail:@"customer@company.com"]` | *Remove an email subscription from the current user. Results in a no-op if the specified email does not exist on the user within the SDK, and no request will be made.* | +| `OneSignal.User.addSms("+15558675309")` | `[OneSignal.User addSms:@"+15558675309"]` | *Add a new SMS subscription to the current user.* | +| `OneSignal.User.removeSms("+15558675309")` | `[OneSignal.User removeSms:@"+15558675309"]` | *Remove an SMS subscription from the current user. Results in a no-op if the specified SMS number does not exist on the user within the SDK, and no request will be made.* | +| `OneSignal.User.addTag(key: "KEY", value: "VALUE")` | `[OneSignal.User addTagWithKey:@"KEY" value:@"VALUE"]` | *Add a tag for the current user. Tags are key:value pairs used as building blocks for targeting specific users and/or personalizing messages. If the tag key already exists, it will be replaced with the value provided here.* | +| `OneSignal.User.addTags(["KEY_01": "VALUE_01", "KEY_02": "VALUE_02"])` | `[OneSignal.User addTags:@{@"KEY_01": @"VALUE_01", @"KEY_02": @"VALUE_02"}]` | *Add multiple tags for the current user. Tags are key:value pairs used as building blocks for targeting specific users and/or personalizing messages. If the tag key already exists, it will be replaced with the value provided here.* | +| `OneSignal.User.removeTag("KEY")` | `[OneSignal.User removeTag:@"KEY"]` | *Remove the data tag with the provided key from the current user.* | +| `OneSignal.User.removeTags(["KEY_01", "KEY_02"])` | `[OneSignal.User removeTags:@[@"KEY_01", @"KEY_02"]]` | *Remove multiple tags with the provided keys from the current user.* | + + + +## Push Subscription Namespace + +The Push Subscription name space is accessible via `OneSignal.User.pushSubscription` and provides access to push subscription-scoped functionality. + + +| **Swift** | **Objective-C** | **Description** | +| ----------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `let id: String? = OneSignal.User.pushSubscription.id` | `NSString* id = OneSignal.User.pushSubscription.id` | *The readonly push subscription ID.* | +| `let token: String? = OneSignal.User.pushSubscription.token` | `NSString* token = OneSignal.User.pushSubscription.token` | *The readonly push token.* | +| `let optedIn: Bool = OneSignal.User.pushSubscription.optedIn` | `BOOL optedIn = OneSignal.User.pushSubscription.optedIn` | *Gets a boolean value indicating whether the current user is opted in to push notifications. This returns `true` when the app has notifications permission and `optOut` is ***not*** called. ***Note:*** Does not take into account the existence of the subscription ID and push token. This boolean may return `true` but push notifications may still not be received by the user.* | +| `OneSignal.User.pushSubscription.optIn()` | `[OneSignal.User.pushSubscription optIn]` | *Call this method to receive push notifications on the device or to resume receiving of push notifications after calling `optOut`. If needed, this method will prompt the user for push notifications permission.* | +| `OneSignal.User.pushSubscription.optOut()` | `[OneSignal.User.pushSubscription optOut]` | *If at any point you want the user to stop receiving push notifications on the current device (regardless of system-level permission status), you can call this method to opt out.* | +| `addObserver(_ observer: OSPushSubscriptionObserver)`

***See below for usage*** | `(void)addObserver:(id _Nonnull)observer`

***See below for usage*** | *The `OSPushSubscriptionObserver.onPushSubscriptionDidChange` method will be fired on the passed-in object when the push subscription changes.* | +| `removeObserver(_ observer: OSPushSubscriptionObserver)`

***See below for usage*** | `(void)removeObserver:(id _Nonnull)observer`

***See below for usage*** | *Remove a push subscription observer that has been previously added.* | + +### Push Subscription Observer + +Any object implementing the `OSPushSubscriptionObserver` protocol can be added as an observer. You can call `removeObserver` to remove any existing listeners. + +**Objective-C** +```objc + // AppDelegate.h + // Add OSPushSubscriptionObserver after UIApplicationDelegate + @interface AppDelegate : UIResponder + @end + + // AppDelegate.m + @implementation AppDelegate + + - (BOOL)application:(UIApplication*)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { + // Add your AppDelegate as an observer + [OneSignal.User.pushSubscription addObserver:self]; + } + + // Add this new method + - (void)onPushSubscriptionDidChangeWithState:(OSPushSubscriptionChangedState*)state { + // prints out all properties + NSLog(@"OSPushSubscriptionChangedState:\n%@", state); + } + @end + + // Remove the observer + [OneSignal.User.pushSubscription removeObserver:self]; +``` +**Swift** +```swift + // AppDelegate.swift + // Add OSPushSubscriptionObserver after UIApplicationDelegate + class AppDelegate: UIResponder, UIApplicationDelegate, OSPushSubscriptionObserver { + + func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { + // Add your AppDelegate as an observer + OneSignal.User.pushSubscription.addObserver(self as OSPushSubscriptionObserver) + } + + // Add this new method + func onPushSubscriptionDidChange(state: OSPushSubscriptionChangedState) { + // prints out all properties + print("OSPushSubscriptionStateChanges: \n\(state)") + } + } + + // Remove the observer + OneSignal.User.pushSubscription.removeObserver(self as OSPushSubscriptionObserver) +``` + +## Session Namespace + +The Session namespace is accessible via `OneSignal.Session` and provides access to session-scoped functionality. + + +| **Swift** | **Objective-C** | **Description** | +| --------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | +| `OneSignal.Session.addOutcome("OUTCOME_NAME")` | `[OneSignal.Session addOutcome:@"OUTCOME_NAME"]` | *Add an outcome with the provided name, captured against the current session.* | +| `OneSignal.Session.addUniqueOutcome("OUTCOME_NAME")` | `[OneSignal.Session addUniqueOutcome:@"OUTCOME_NAME"]` | *Add a unique outcome with the provided name, captured against the current session.* | +| `OneSignal.Session.addOutcome("OUTCOME_NAME", 18.76)` | `[OneSignal.Session addOutcomeWithValue:@"OUTCOME_NAME" value:@18.76]` | *Add an outcome with the provided name and value, captured against the current session.* | + + + +## Notifications Namespace + +The Notifications namespace is accessible via `OneSignal.Notifications` and provides access to notification-scoped functionality. + + +| **Swift** | **Objective-C** | **Description** | +| --------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `let permission: Bool = OneSignal.Notifications.permission` | `BOOL permission = [OneSignal.Notifications permission]` | *Whether this app has push notification permission. Returns `true` if the user has accepted permissions, or if the app has `ephemeral` or `provisional` permission.* | +| `let permissionNative: OSNotificationPermission = OneSignal.Notifications.permissionNative` | `OSNotificationPermission permissionNative = [OneSignal.Notifications permissionNative]` | *Returns the enum for the native permission of the device. It will be one of OSNotificationPermissionNotDetermined, OSNotificationPermissionDenied, OSNotificationPermissionAuthorized, OSNotificationPermissionProvisional, OSNotificationPermissionEphemeral.* | +| `let canRequest: Bool = OneSignal.Notifications.canRequestPermission` | `BOOL canRequest = [OneSignal.Notifications canRequestPermission]` | *Whether attempting to request notification permission will show a prompt. Returns `true` if the device has not been prompted for push notification permission already.* | +| `OneSignal.Notifications.clearAll()` | `[OneSignal.Notifications clearAll]` | *Removes all OneSignal notifications.* | +| `func requestPermission(block: OSUserResponseBlock?, fallbackToSettings: Bool)`

***See below for usage*** | `(void)requestPermission:(OSUserResponseBlock _Nullable )block fallbackToSettings:(BOOL)fallback`

***See below for usage*** | *Prompt the user for permission to receive push notifications. This will display the native system prompt to request push notification permission.* | +| `func registerForProvisionalAuthorization(block: OSUserResponseBlock?)`

***See below for usage*** | `(void)registerForProvisionalAuthorization:(OSUserResponseBlock _Nullable)block`

***See below for usage*** | *Instead of having to prompt the user for permission to send them push notifications, your app can request provisional authorization.* | +| `func addPermissionObserver(observer: OSNotificationPermissionObserver)`

***See below for usage*** | `(void)addPermissionObserver:(NSObject*_Nonnull)observer`

***See below for usage*** | *The `OSNotificationPermissionObserver.onNotificationPermissionDidChange` method will be fired on the passed-in object when a notification permission setting changes. This happens when the user enables or disables notifications for your app from the system settings outside of your app.* | +| `func removePermissionObserver(observer: OSNotificationPermissionObserver)`

***See below for usage*** | `(void)removePermissionObserver:(NSObject*_Nonnull)observer`

***See below for usage*** | *Remove a push permission observer that has been previously added.* | +| `func addForegroundLifecycleListener(listener: OSNotificationLifecycleListener?)`

***See below for usage*** | `addForegroundLifecycleListener:(NSObject *)listener`

***See below for usage*** | *The `OSNotificationLifecycleListener.onWillDisplayNotification` method will be fired on the passed-in object before displaying a notification while the app is in focus. Use this listener to read notification data and decide if the notification ***should*** show or not. Call `event.preventDefault()` to prevent the notification from displaying and call `event.notification.display()` within 25 seconds to display the notification.

***Note:*** this runs ***after*** the [Notification Service Extension](https://documentation.onesignal.com/docs/service-extensions) which can be used to modify the notification before showing it. Remove any added listeners with `removeForegroundLifecycleListener(listener)`* | +| `func addClickListener(listener: OSNotificationClickListener)`

***See below for usage*** | `(void)addClickListener:(NSObject*)listener`

***See below for usage*** | *The `OSNotificationClickListener.onClickNotification` method will be fired on the passed-in object whenever a notification is clicked on by the user. Call `removeClickListener(listener)` to remove.* | + +### Prompt for Push Notification Permission with `requestPermission` + +**Objective-C** +```objc + [OneSignal.Notifications requestPermission:^(BOOL accepted) { + NSLog(@"User accepted notifications: %d", accepted); + }]; + + // If using the fallbackToSettings flag + [OneSignal.Notifications requestPermission:^(BOOL accepted) { + NSLog(@"User accepted notifications: %d", accepted); + } fallbackToSettings:true]; +``` +**Swift** +```swift + OneSignal.Notifications.requestPermission { accepted in + print("User accepted notifications: \(accepted)") + } + + // If using the fallbackToSettings flag + OneSignal.Notifications.requestPermission({ accepted in + print("User accepted notifications: \(accepted)") + }, fallbackToSettings: true) +``` + +### Register for Provisional Authorization + +**Objective-C** +```objc + [OneSignal.Notifications registerForProvisionalAuthorization:^(BOOL accepted) { + // handle authorization + }]; +``` +**Swift** +```swift + OneSignal.Notifications.registerForProvisionalAuthorization({ accepted in + // handle authorization + }) +``` + +### Permission Observer + +Any object implementing the `OSNotificationPermissionObserver` protocol can be added as an observer. You can call `removePermissionObserver` to remove any existing listeners. + +**Objective-C** +```objc + // AppDelegate.h + // Add OSNotificationPermissionObserver after UIApplicationDelegate + @interface AppDelegate : UIResponder + @end + + // AppDelegate.m + @implementation AppDelegate + + - (BOOL)application:(UIApplication*)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { + // Add your AppDelegate as an observer + [OneSignal.Notifications addPermissionObserver:self]; + } + + // Add this new method + - (void)onNotificationPermissionDidChange:(BOOL)permission { + // Example of detecting the curret permission + if (permission) { + NSLog(@"Device has permission to display notifications"); + } else { + NSLog(@"Device does not have permission to display notifications"); + } + } + + // Output: + /* + Device has permission to display notifications + */ + + @end + + // Remove the observer + [OneSignal.Notifications removePermissionObserver:self]; +``` +**Swift** +```swift + // AppDelegate.swift + // Add OSNotificationPermissionObserver after UIApplicationDelegate + class AppDelegate: UIResponder, UIApplicationDelegate, OSNotificationPermissionObserver { + + func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { + // Add your AppDelegate as an observer + OneSignal.Notifications.addPermissionObserver(self as OSNotificationPermissionObserver) + } + + // Add this new method + func onNotificationPermissionDidChange(_ permission: Bool) { + // Example of detecting the curret permission + if permission { + print("Device has permission to display notifications") + } else { + print("Device does not have permission to display notifications") + } + } + } + + // Output: + /* + Device has permission to display notifications + PermissionState: + + */ + + // Remove the observer + OneSignal.Notifications.removePermissionObserver(self as OSNotificationPermissionObserver) +``` + +### Notification Foreground Lifecycle Listener +Any object implementing the `OSNotificationLifecycleListener` protocol can be added as a listener. You can call `removeForegroundLifecycleListener` to remove any existing listeners. + +**Objective-C** +```objc + // AppDelegate.h + // Add OSNotificationLifecycleListener after UIApplicationDelegate + @interface AppDelegate : UIResponder + @end + + // AppDelegate.m + @implementation AppDelegate + + - (BOOL)application:(UIApplication*)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { + // Add your AppDelegate as an observer + [OneSignal.Notifications addForegroundLifecycleListener:self]; + } + + // Add this new method + + - (void)onWillDisplayNotification:(OSNotificationWillDisplayEvent *)event { + NSLog(@"Received Notification - %@", event.notification.notificationId); + if ([event.notification.notificationId isEqualToString:@"silent_notif"]) { + [event preventDefault]; + } + + // If you called preventDefault, you can call display within 25 seconds + [event.notification display]; + } + + @end + + // Remove the observer + [OneSignal.Notifications removeForegroundLifecycleListener:self]; +``` +**Swift** +```swift +class MyNotificationLifecycleListener : NSObject, OSNotificationLifecycleListener { + func onWillDisplay(event: OSNotificationWillDisplayEvent) { + // Example of conditionally displaying a notification + if event.notification.notificationId == "example_silent_notif" { + event.preventDefault() + } + + // If you called preventDefault, you can call display within 25 seconds to display the notification + event.notification.display() + } +} + +// Add your object as a listener +let myListener = MyNotificationLifecycleListener() +OneSignal.Notifications.addForegroundLifecycleListener(myListener) +``` + +### Notification Click Listener +Any object implementing the `OSNotificationClickListener` protocol can be added as a listener. You can call `removeClickListener` to remove any existing listeners. + +**Objective-C** +```objc +// Add this method to object implementing the OSNotificationClickListener protocol +- (void)onClickNotification:(OSNotificationClickEvent * _Nonnull)event { + OSNotification *notification = event.notification; + OSNotificationClickResult *result = event.result; + NSString *actionId = result.actionId; + NSString *url = result.url; + NSLog(@"onClickNotification with event %@", [event jsonRepresentation]); +} + +// Add your object as a listener +[OneSignal.Notifications addClickListener:myListener]; +``` + +**Swift** +```swift +class MyNotificationClickListener : NSObject, OSNotificationClickListener { + func onClick(event: OSNotificationClickEvent) { + let notification: OSNotification = event.notification + let result: OSNotificationClickResult = event.result + let actionId = result.actionId + let url = result.url + } +} + +// Add your object as a listener +let myListener = MyNotificationClickListener() +OneSignal.Notifications.addClickListener(myListener) +``` + +## Location Namespace + +The Location namespace is accessible via `OneSignal.Location` and provide access to location-scoped functionality. + +| **Swift** | **Objective-C** | **Description** | +| ---------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `let isShared: Bool = OneSignal.Location.isShared`

`OneSignal.Location.isShared = true` | `BOOL isShared = [OneSignal.Location isShared]`

`[OneSignal.Location setShared:true]` | *Whether location is currently shared with OneSignal.* | +| `OneSignal.Location.requestPermission()` | `[OneSignal.Location requestPermission]` | *Use this method to manually prompt the user for location permissions. This allows for geotagging so you send notifications to users based on location.* | + + + +## InAppMessages Namespace + +The In App Messages namespace is accessible via `OneSignal.InAppMessages` and provide access to in app messages-scoped functionality. + +| **Swift** | **Objective-C** | **Description** | +| ------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `let paused = OneSignal.InAppMessages.paused`

`OneSignal.InAppMessages.paused = true` | `BOOL paused = [OneSignal.InAppMessages paused]`

`[OneSignal.InAppMessages paused:true]` | *Whether in-app messaging is currently paused. When set to `true`, no IAM will be presented to the user regardless of whether they qualify for them. When set to `false`, any IAMs the user qualifies for will be presented to the user at the appropriate time.* | +| `OneSignal.InAppMessages.addTrigger("KEY", withValue: "VALUE")` | `[OneSignal.InAppMessages addTrigger:@"KEY" withValue:@"VALUE"]` | *Add a string-value trigger for the current user. Triggers are currently explicitly used to determine whether a specific IAM should be displayed to the user. See [Triggers](https://documentation.onesignal.com/docs/iam-triggers).

If the trigger key already exists, it will be replaced with the value provided here. Note that triggers are not persisted to the backend. They only exist on the local device and are applicable to the current user.* | +| `OneSignal.InAppMessages.addTriggers(["KEY_01": "VALUE_01", "KEY_02": "VALUE_02"])` | `[OneSignal.InAppMessages addTriggers:@{@"KEY_01": @"VALUE_01", @"KEY_02": @"VALUE_02"}]` | *Add multiple string-value triggers for the current user. Triggers are currently explicitly used to determine whether a specific IAM should be displayed to the user. See [Triggers](https://documentation.onesignal.com/docs/iam-triggers).

If any trigger key already exists, it will be replaced with the value provided here. Note that triggers are not persisted to the backend. They only exist on the local device and are applicable to the current user.* | +| `OneSignal.InAppMessages.removeTrigger("KEY")` | `[OneSignal.InAppMessages removeTrigger:@"KEY"]` | *Remove the trigger with the provided key from the current user.* | +| `OneSignal.InAppMessages.removeTriggers(["KEY_01", "KEY_02"])` | `[OneSignal.InAppMessages removeTriggers:@[@"KEY_01", @"KEY_02"]]` | *Remove multiple triggers from the current user.* | +| `OneSignal.InAppMessages.clearTriggers()` | `[OneSignal.InAppMessages clearTriggers]` | *Clear all triggers from the current user.* | +| `func addLifecycleListener(listener: OSInAppMessageLifecycleListener?)`

***See below for usage*** | `(void)addLifecycleListener:(NSObject *_Nullable)listener`

***See below for usage*** | *Add an in-app message lifecycle listener. Remove with `removeLifecycleListener`.* | +| `func addClickListener(listener: OSInAppMessageClickListener)`

***See below for usage*** | `(void)addClickListener:(NSObject*_Nonnull)listener`

***See below for usage*** | *The `OSInAppMessageClickListener.onClickInAppMessage` method will be fired on the passed-in object whenever an in-app message is clicked on by the user. Call `removeClickListener(listener)` to remove* | + + + +### In-App Message Lifecycle Listener + +The `OSInAppMessageLifecycleListener` protocol includes 4 optional methods. + +**Objective-C** +```objc + // AppDelegate.h + // Add OSInAppMessageLifecycleListener as an implemented protocol of the class that will handle the In-App Message lifecycle events. + @interface AppDelegate : UIResponder + @end + + // AppDelegate.m + @implementation AppDelegate + + - (BOOL)application:(UIApplication*)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { + // Add your implementing class as the listener. + [OneSignal.InAppMessages addLifecycleListener:self]; + } + + // Add one or more of the following optional lifecycle methods + + - (void)onWillDisplayInAppMessage:(OSInAppMessageWillDisplayEvent *)event { + NSLog(@"OSInAppMessageLifecycleListener: onWillDisplay Message: %@", event.message.messageId); + } + - (void)onDidDisplayInAppMessage:(OSInAppMessageDidDisplayEvent *)event { + NSLog(@"OSInAppMessageLifecycleListener: onDidDisplay Message: %@", event.message.messageId); + } + - (void)onWillDismissInAppMessage:(OSInAppMessageWillDismissEvent *)event { + NSLog(@"OSInAppMessageLifecycleListener: onWillDismiss Message: %@", event.message.messageId); + } + - (void)onDidDismissInAppMessage:(OSInAppMessageDidDismissEvent *)event { + NSLog(@"OSInAppMessageLifecycleListener: onDidDismiss Message: %@", event.message.messageId); + } +``` +**Swift** +```swift + // AppDelegate.swift + // Add OSInAppMessageLifecycleListener as an implemented protocol of the class that will handle the In-App Message lifecycle events. + class AppDelegate: UIResponder, UIApplicationDelegate, OSInAppMessageLifecycleListener { + + func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { + // Add your implementing class as the listener + OneSignal.InAppMessages.addLifecycleListener(self) + } + + // Add one or more of the following optional lifecycle methods + + func onWillDisplay(event: OSInAppMessageWillDisplayEvent) { + print("OSInAppMessageLifecycleListener: onWillDisplay Message: \(event.message.messageId)") + } + func onDidDisplay(event: OSInAppMessageDidDisplayEvent) { + print("OSInAppMessageLifecycleListener: onDidDisplay Message: \(event.message.messageId)") + } + func onWillDismiss(event: OSInAppMessageWillDismissEvent) { + print("OSInAppMessageLifecycleListener: onWillDismiss Message: \(event.message.messageId)") + } + func onDidDisplay(event: OSInAppMessageDidDisplayEvent) { + print("OSInAppMessageLifecycleListener: onDidDismiss Message: \(event.message.messageId)") + } + } +``` + +### In-App Message Click Listener +Any object implementing the `OSInAppMessageClickListener` protocol can be added as a listener. You can call `removeClickListener` to remove any existing listeners. + +**Objective-C** +```objc +// Add this method to object implementing the OSInAppMessageClickListener protocol +- (void)onClickInAppMessage:(OSInAppMessageClickEvent * _Nonnull)event { + NSLog(@"onClickInAppMessage event: %@", [event jsonRepresentation]); + NSString *message = [NSString stringWithFormat:@"In App Message Click Occurred: messageId: %@ actionId: %@ url: %@ urlTarget: %@ closingMessage: %i", + event.message.messageId, + event.result.actionId, + event.result.url, + @(event.result.urlTarget), + event.result.closingMessage]; +} + +// Add your object as a listener +[OneSignal.InAppMessages addClickListener:self]; +``` +**Swift** +```swift +class MyInAppMessageClickListener : NSObject, OSInAppMessageClickListener { + func onClick(event: OSInAppMessageClickEvent) { + let messageId = event.message.messageId + let result: OSInAppMessageClickResult = event.result + let actionId = result.actionId + let url = result.url + let urlTarget: OSInAppMessageActionUrlType = result.urlTarget + let closingMessage = result.closingMessage + } +} + +// Add your object as a listener +let myListener = MyInAppMessageClickListener() +OneSignal.InAppMessages.addClickListener(myListener) +``` + +## Debug Namespace + +The Debug namespace is accessible via `OneSignal.Debug` and provide access to debug-scoped functionality. + +| **Swift** | **Objective-C** | **Description** | +| ------------------------------------------ | ------------------------------------------------ | ---------------------------------------------------------------------------------- | +| `OneSignal.Debug.setLogLevel(.LL_VERBOSE)` | `[OneSignal.Debug setLogLevel:ONE_S_LL_VERBOSE]` | *Sets the log level the OneSignal SDK should be writing to the Xcode log.* | +| `OneSignal.Debug.setAlertLevel(.LL_NONE)` | `[OneSignal.Debug setAlertLevel:ONE_S_LL_NONE]` | *Sets the logging level to show as alert dialogs.* | + + +# Glossary + +**device-scoped user** +> An anonymous user with no aliases that cannot be retrieved except through the current device or OneSignal dashboard. On app install, the OneSignal SDK is initialized with a *device-scoped user*. A *device-scoped user* can be upgraded to an identified user by calling `OneSignal.login("USER_EXTERNAL_ID")` to identify the user by the specified external user ID. + +# Limitations + +- Changing app IDs is not supported. +- Any `User` namespace calls must be invoked **after** initialization. Example: `OneSignal.User.addTag("tag", "2")` +- In the SDK, the user state is only refreshed from the server when a new session is started (cold start or backgrounded for over 30 seconds) or when the user is logged in. This is by design. + +# Known issues +- Identity Verification + - We will be introducing Identity Verification using JWT in a follow up release diff --git a/OneSignal.podspec b/OneSignal.podspec index 70f51507f..053833e30 100755 --- a/OneSignal.podspec +++ b/OneSignal.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "OneSignal" - s.version = "3.12.7" + s.version = "5.0.2" s.summary = "OneSignal push notification library for mobile apps." s.homepage = "https://onesignal.com" s.license = { :type => 'MIT', :file => 'LICENSE' } @@ -9,12 +9,17 @@ Pod::Spec.new do |s| s.source = { :git => "https://github.com/OneSignal/OneSignal-iOS-SDK.git", :tag => s.version.to_s } s.platform = :ios, "11.0" s.requires_arc = true - - s.ios.vendored_frameworks = 'iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignal.xcframework' + s.default_subspec = "OneSignalComplete" + s.subspec 'OneSignalCore' do |ss| ss.vendored_frameworks = 'iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework' end + s.subspec 'OneSignalOSCore' do |ss| + ss.dependency 'OneSignal/OneSignalCore' + ss.vendored_frameworks = 'iOS_SDK/OneSignalSDK/OneSignal_OSCore/OneSignalOSCore.xcframework' + end + s.subspec 'OneSignalOutcomes' do |ss| ss.dependency 'OneSignal/OneSignalCore' ss.vendored_frameworks = 'iOS_SDK/OneSignalSDK/OneSignal_Outcomes/OneSignalOutcomes.xcframework' @@ -25,4 +30,52 @@ Pod::Spec.new do |s| ss.dependency 'OneSignal/OneSignalOutcomes' ss.vendored_frameworks = 'iOS_SDK/OneSignalSDK/OneSignal_Extension/OneSignalExtension.xcframework' end + + s.subspec 'OneSignalNotifications' do |ss| + ss.dependency 'OneSignal/OneSignalCore' + ss.dependency 'OneSignal/OneSignalOutcomes' + ss.dependency 'OneSignal/OneSignalExtension' + ss.vendored_frameworks = 'iOS_SDK/OneSignalSDK/OneSignal_Notifications/OneSignalNotifications.xcframework' + end + + s.subspec 'OneSignalUser' do |ss| + ss.dependency 'OneSignal/OneSignalCore' + ss.dependency 'OneSignal/OneSignalOSCore' + ss.dependency 'OneSignal/OneSignalOutcomes' + ss.dependency 'OneSignal/OneSignalNotifications' + ss.vendored_frameworks = 'iOS_SDK/OneSignalSDK/OneSignal_User/OneSignalUser.xcframework' + end + + s.subspec 'OneSignalLocation' do |ss| + ss.dependency 'OneSignal/OneSignalCore' + ss.dependency 'OneSignal/OneSignalOSCore' + ss.dependency 'OneSignal/OneSignalNotifications' + ss.dependency 'OneSignal/OneSignalUser' + ss.vendored_frameworks = 'iOS_SDK/OneSignalSDK/OneSignal_Location/OneSignalLocation.xcframework' + end + + s.subspec 'OneSignalInAppMessages' do |ss| + ss.dependency 'OneSignal/OneSignalCore' + ss.dependency 'OneSignal/OneSignalOSCore' + ss.dependency 'OneSignal/OneSignalOutcomes' + ss.dependency 'OneSignal/OneSignalNotifications' + ss.dependency 'OneSignal/OneSignalUser' + ss.vendored_frameworks = 'iOS_SDK/OneSignalSDK/OneSignal_InAppMessages/OneSignalInAppMessages.xcframework' + end + + s.subspec 'OneSignal' do |ss| + ss.dependency 'OneSignal/OneSignalCore' + ss.dependency 'OneSignal/OneSignalOSCore' + ss.dependency 'OneSignal/OneSignalOutcomes' + ss.dependency 'OneSignal/OneSignalExtension' + ss.dependency 'OneSignal/OneSignalNotifications' + ss.dependency 'OneSignal/OneSignalUser' + ss.ios.vendored_frameworks = 'iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignalFramework.xcframework' + end + + s.subspec 'OneSignalComplete' do |ss| + ss.dependency 'OneSignal/OneSignal' + ss.dependency 'OneSignal/OneSignalLocation' + ss.dependency 'OneSignal/OneSignalInAppMessages' + end end diff --git a/OneSignalWrapper/dummy.m b/OneSignalFrameworkWrapper/dummy.m similarity index 100% rename from OneSignalWrapper/dummy.m rename to OneSignalFrameworkWrapper/dummy.m diff --git a/OneSignalWrapper/include/dummy.h b/OneSignalFrameworkWrapper/include/dummy.h similarity index 100% rename from OneSignalWrapper/include/dummy.h rename to OneSignalFrameworkWrapper/include/dummy.h diff --git a/OneSignalInAppMessagesWrapper/dummy.m b/OneSignalInAppMessagesWrapper/dummy.m new file mode 100644 index 000000000..e69de29bb diff --git a/OneSignalInAppMessagesWrapper/include/dummy.h b/OneSignalInAppMessagesWrapper/include/dummy.h new file mode 100644 index 000000000..e69de29bb diff --git a/OneSignalLocationWrapper/dummy.m b/OneSignalLocationWrapper/dummy.m new file mode 100644 index 000000000..e69de29bb diff --git a/OneSignalLocationWrapper/include/dummy.h b/OneSignalLocationWrapper/include/dummy.h new file mode 100644 index 000000000..e69de29bb diff --git a/OneSignalNotificationsWrapper/dummy.m b/OneSignalNotificationsWrapper/dummy.m new file mode 100644 index 000000000..e69de29bb diff --git a/OneSignalNotificationsWrapper/include/dummy.h b/OneSignalNotificationsWrapper/include/dummy.h new file mode 100644 index 000000000..e69de29bb diff --git a/OneSignalOSCoreWrapper/dummy.m b/OneSignalOSCoreWrapper/dummy.m new file mode 100644 index 000000000..e69de29bb diff --git a/OneSignalOSCoreWrapper/include/dummy.h b/OneSignalOSCoreWrapper/include/dummy.h new file mode 100644 index 000000000..e69de29bb diff --git a/OneSignalUserWrapper/dummy.m b/OneSignalUserWrapper/dummy.m new file mode 100644 index 000000000..e69de29bb diff --git a/OneSignalUserWrapper/include/dummy.h b/OneSignalUserWrapper/include/dummy.h new file mode 100644 index 000000000..e69de29bb diff --git a/OneSignalXCFramework.podspec b/OneSignalXCFramework.podspec index 564257d65..20fa6e6f4 100644 --- a/OneSignalXCFramework.podspec +++ b/OneSignalXCFramework.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "OneSignalXCFramework" - s.version = "3.12.7" + s.version = "5.0.2" s.summary = "OneSignal push notification library for mobile apps." s.homepage = "https://onesignal.com" s.license = { :type => 'MIT', :file => 'LICENSE' } @@ -9,13 +9,17 @@ Pod::Spec.new do |s| s.source = { :git => "https://github.com/OneSignal/OneSignal-iOS-SDK.git", :tag => s.version.to_s } s.platform = :ios, '11.0' s.requires_arc = true - - s.ios.vendored_frameworks = 'iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignal.xcframework' + s.default_subspec = "OneSignalComplete" s.subspec 'OneSignalCore' do |ss| ss.vendored_frameworks = 'iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework' end + s.subspec 'OneSignalOSCore' do |ss| + ss.dependency 'OneSignalXCFramework/OneSignalCore' + ss.vendored_frameworks = 'iOS_SDK/OneSignalSDK/OneSignal_OSCore/OneSignalOSCore.xcframework' + end + s.subspec 'OneSignalOutcomes' do |ss| ss.dependency 'OneSignalXCFramework/OneSignalCore' ss.vendored_frameworks = 'iOS_SDK/OneSignalSDK/OneSignal_Outcomes/OneSignalOutcomes.xcframework' @@ -26,5 +30,52 @@ Pod::Spec.new do |s| ss.dependency 'OneSignalXCFramework/OneSignalOutcomes' ss.vendored_frameworks = 'iOS_SDK/OneSignalSDK/OneSignal_Extension/OneSignalExtension.xcframework' end - end - \ No newline at end of file + + s.subspec 'OneSignalNotifications' do |ss| + ss.dependency 'OneSignalXCFramework/OneSignalCore' + ss.dependency 'OneSignalXCFramework/OneSignalOutcomes' + ss.dependency 'OneSignalXCFramework/OneSignalExtension' + ss.vendored_frameworks = 'iOS_SDK/OneSignalSDK/OneSignal_Notifications/OneSignalNotifications.xcframework' + end + + s.subspec 'OneSignalUser' do |ss| + ss.dependency 'OneSignalXCFramework/OneSignalCore' + ss.dependency 'OneSignalXCFramework/OneSignalOSCore' + ss.dependency 'OneSignalXCFramework/OneSignalOutcomes' + ss.dependency 'OneSignalXCFramework/OneSignalNotifications' + ss.vendored_frameworks = 'iOS_SDK/OneSignalSDK/OneSignal_User/OneSignalUser.xcframework' + end + + s.subspec 'OneSignalLocation' do |ss| + ss.dependency 'OneSignalXCFramework/OneSignalCore' + ss.dependency 'OneSignalXCFramework/OneSignalOSCore' + ss.dependency 'OneSignalXCFramework/OneSignalNotifications' + ss.dependency 'OneSignalXCFramework/OneSignalUser' + ss.vendored_frameworks = 'iOS_SDK/OneSignalSDK/OneSignal_Location/OneSignalLocation.xcframework' + end + + s.subspec 'OneSignalInAppMessages' do |ss| + ss.dependency 'OneSignalXCFramework/OneSignalCore' + ss.dependency 'OneSignalXCFramework/OneSignalOSCore' + ss.dependency 'OneSignalXCFramework/OneSignalOutcomes' + ss.dependency 'OneSignalXCFramework/OneSignalNotifications' + ss.dependency 'OneSignalXCFramework/OneSignalUser' + ss.vendored_frameworks = 'iOS_SDK/OneSignalSDK/OneSignal_InAppMessages/OneSignalInAppMessages.xcframework' + end + + s.subspec 'OneSignal' do |ss| + ss.dependency 'OneSignalXCFramework/OneSignalCore' + ss.dependency 'OneSignalXCFramework/OneSignalOSCore' + ss.dependency 'OneSignalXCFramework/OneSignalOutcomes' + ss.dependency 'OneSignalXCFramework/OneSignalExtension' + ss.dependency 'OneSignalXCFramework/OneSignalNotifications' + ss.dependency 'OneSignalXCFramework/OneSignalUser' + ss.ios.vendored_frameworks = 'iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignalFramework.xcframework' + end + + s.subspec 'OneSignalComplete' do |ss| + ss.dependency 'OneSignalXCFramework/OneSignal' + ss.dependency 'OneSignalXCFramework/OneSignalLocation' + ss.dependency 'OneSignalXCFramework/OneSignalInAppMessages' + end +end diff --git a/Package.swift b/Package.swift index 81013c418..9dc3e19d6 100644 --- a/Package.swift +++ b/Package.swift @@ -4,25 +4,79 @@ import PackageDescription let package = Package( - name: "OneSignal", + name: "OneSignalFramework", products: [ .library( - name: "OneSignal", - targets: ["OneSignalWrapper"]), + name: "OneSignalFramework", + targets: ["OneSignalFrameworkWrapper"]), + .library( + name: "OneSignalInAppMessages", + targets: ["OneSignalInAppMessagesWrapper"]), + .library( + name: "OneSignalLocation", + targets: ["OneSignalLocationWrapper"]), .library( name: "OneSignalExtension", targets: ["OneSignalExtensionWrapper"]) ], targets: [ .target( - name: "OneSignalWrapper", + name: "OneSignalFrameworkWrapper", + dependencies: [ + "OneSignalFramework", + "OneSignalUser", + "OneSignalNotifications", + "OneSignalExtension", + "OneSignalOutcomes", + "OneSignalOSCore", + "OneSignalCore" + ], + path: "OneSignalFrameworkWrapper" + ), + .target( + name: "OneSignalInAppMessagesWrapper", + dependencies: [ + "OneSignalInAppMessages", + "OneSignalUser", + "OneSignalNotifications", + "OneSignalOutcomes", + "OneSignalOSCore", + "OneSignalCore" + ], + path: "OneSignalInAppMessagesWrapper" + ), + .target( + name: "OneSignalLocationWrapper", + dependencies: [ + "OneSignalLocation", + "OneSignalUser", + "OneSignalNotifications", + "OneSignalOSCore", + "OneSignalCore" + ], + path: "OneSignalLocationWrapper" + ), + .target( + name: "OneSignalUserWrapper", + dependencies: [ + "OneSignalUser", + "OneSignalNotifications", + "OneSignalExtension", + "OneSignalOutcomes", + "OneSignalOSCore", + "OneSignalCore" + ], + path: "OneSignalUserWrapper" + ), + .target( + name: "OneSignalNotificationsWrapper", dependencies: [ - "OneSignal", + "OneSignalNotifications", "OneSignalExtension", "OneSignalOutcomes", "OneSignalCore" ], - path: "OneSignalWrapper" + path: "OneSignalNotificationsWrapper" ), .target( name: "OneSignalExtensionWrapper", @@ -41,25 +95,58 @@ let package = Package( ], path: "OneSignalOutcomesWrapper" ), + .target( + name: "OneSignalOSCoreWrapper", + dependencies: [ + "OneSignalOSCore", + "OneSignalCore" + ], + path: "OneSignalOSCoreWrapper" + ), .binaryTarget( - name: "OneSignal", - url: "https://github.com/OneSignal/OneSignal-iOS-SDK/releases/download/3.12.7/OneSignal.xcframework.zip", - checksum: "26848c739578c43bd401898d0f913eb451856a57549a445ecbe688f1a0426548" + name: "OneSignalFramework", + url: "https://github.com/OneSignal/OneSignal-iOS-SDK/releases/download/5.0.2/OneSignalFramework.xcframework.zip", + checksum: "260bc18c3b29967f1b9f484fa0b3220c2c99f867d210276e25d625b5bc40a1a3" + ), + .binaryTarget( + name: "OneSignalInAppMessages", + url: "https://github.com/OneSignal/OneSignal-iOS-SDK/releases/download/5.0.2/OneSignalInAppMessages.xcframework.zip", + checksum: "2da59762c380ba1251c4b0d665b6823e26e60f06f169459350f11c7c6929c7d1" + ), + .binaryTarget( + name: "OneSignalLocation", + url: "https://github.com/OneSignal/OneSignal-iOS-SDK/releases/download/5.0.2/OneSignalLocation.xcframework.zip", + checksum: "856517d1ef5e81095f8c51ae2b98148e9e813d94f44d008aed379038d56b3fb9" + ), + .binaryTarget( + name: "OneSignalUser", + url: "https://github.com/OneSignal/OneSignal-iOS-SDK/releases/download/5.0.2/OneSignalUser.xcframework.zip", + checksum: "9c3df89f942f9f76905c3a1404d127124b8873905c390e8cc5044c378f05df04" + ), + .binaryTarget( + name: "OneSignalNotifications", + url: "https://github.com/OneSignal/OneSignal-iOS-SDK/releases/download/5.0.2/OneSignalNotifications.xcframework.zip", + checksum: "26065fb2f7915938653e7f4342c6181d60a421d9c53f2d665221354c0106afda" ), .binaryTarget( name: "OneSignalExtension", - url: "https://github.com/OneSignal/OneSignal-iOS-SDK/releases/download/3.12.7/OneSignalExtension.xcframework.zip", - checksum: "38706d80fa648b555f0eefa97b95ed0a96e2614dc98e91fde10827b5d4da413d" + url: "https://github.com/OneSignal/OneSignal-iOS-SDK/releases/download/5.0.2/OneSignalExtension.xcframework.zip", + checksum: "c262a77df89463eab57073e4fe24db178575811d5cb273d85fb9921eb7022e99" ), .binaryTarget( name: "OneSignalOutcomes", - url: "https://github.com/OneSignal/OneSignal-iOS-SDK/releases/download/3.12.7/OneSignalOutcomes.xcframework.zip", - checksum: "f79b274f3c4e8372fbaad1a7c37bdfb1b0feb71721649900e35ab6c391718082" + url: "https://github.com/OneSignal/OneSignal-iOS-SDK/releases/download/5.0.2/OneSignalOutcomes.xcframework.zip", + checksum: "3f27a9d99e8adef5e3124838c44a56084123113b937fd7a0da1565c1c94c9b08" + ), + .binaryTarget( + name: "OneSignalOSCore", + url: "https://github.com/OneSignal/OneSignal-iOS-SDK/releases/download/5.0.2/OneSignalOSCore.xcframework.zip", + checksum: "6855fbf364583bf710cc0f9c6b444809b612290453ca3002fe6667b959175128" ), .binaryTarget( name: "OneSignalCore", - url: "https://github.com/OneSignal/OneSignal-iOS-SDK/releases/download/3.12.7/OneSignalCore.xcframework.zip", - checksum: "1f51ffa939a5bb58b05f9a83be18e20a6d692182822a5a559396f0c567f8bde0" + url: "https://github.com/OneSignal/OneSignal-iOS-SDK/releases/download/5.0.2/OneSignalCore.xcframework.zip", + checksum: "7fc1bb7be5d00dbb68245d657517b947e7363bfa828c00394e184bee6316c436" ) ] ) diff --git a/iOS_SDK/OneSignalDevApp/OneSignalDevApp/AppDelegate.h b/iOS_SDK/OneSignalDevApp/OneSignalDevApp/AppDelegate.h index ed0e76f00..7e651874c 100644 --- a/iOS_SDK/OneSignalDevApp/OneSignalDevApp/AppDelegate.h +++ b/iOS_SDK/OneSignalDevApp/OneSignalDevApp/AppDelegate.h @@ -29,9 +29,9 @@ // This project exisits to make testing OneSignal SDK changes. #import -#import +#import -@interface AppDelegate : UIResponder +@interface AppDelegate : UIResponder @property (strong, nonatomic) UIWindow *window; diff --git a/iOS_SDK/OneSignalDevApp/OneSignalDevApp/AppDelegate.m b/iOS_SDK/OneSignalDevApp/OneSignalDevApp/AppDelegate.m index 7067818d8..8cd7c88ab 100644 --- a/iOS_SDK/OneSignalDevApp/OneSignalDevApp/AppDelegate.m +++ b/iOS_SDK/OneSignalDevApp/OneSignalDevApp/AppDelegate.m @@ -50,53 +50,34 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:( // [FIRApp configure]; NSLog(@"Bundle URL: %@", [[NSBundle mainBundle] bundleURL]); + [OneSignal.Debug setLogLevel:ONE_S_LL_VERBOSE]; + [OneSignal.Debug setAlertLevel:ONE_S_LL_NONE]; - [OneSignal setLogLevel:ONE_S_LL_VERBOSE visualLevel:ONE_S_LL_NONE]; - _notificationDelegate = [OneSignalNotificationCenterDelegate new]; - - id openNotificationHandler = ^(OSNotificationOpenedResult *result) { - NSLog(@"OSNotificationOpenedResult: %@", result.action); - #pragma clang diagnostic push - #pragma clang diagnostic ignored "-Wdeprecated" - UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Notifiation Opened In App Delegate" message:@"Notification Opened In App Delegate" delegate:self cancelButtonTitle:@"Delete" otherButtonTitles:@"Cancel", nil]; - [alert show]; - #pragma clang diagnostic pop - }; - id notificationReceiverBlock = ^(OSNotification *notif, OSNotificationDisplayResponse completion) { - NSLog(@"Will Receive Notification - %@", notif.notificationId); - completion(notif); - }; + [OneSignal initialize:[AppDelegate getOneSignalAppId] withLaunchOptions:launchOptions]; - // Example block for IAM action click handler - id inAppMessagingActionClickBlock = ^(OSInAppMessageAction *action) { - NSString *message = [NSString stringWithFormat:@"Click Action Occurred: %@", [action jsonRepresentation]]; - [OneSignal onesignalLog:ONE_S_LL_DEBUG message:message]; - }; - - // Example setter for IAM action click handler using OneSignal public method - [OneSignal setInAppMessageClickHandler:inAppMessagingActionClickBlock]; + _notificationDelegate = [OneSignalNotificationCenterDelegate new]; // OneSignal Init with app id and lauch options - [OneSignal setLaunchURLsInApp:YES]; [OneSignal setProvidesNotificationSettingsView:NO]; - [OneSignal setAppId:[AppDelegate getOneSignalAppId]]; - [OneSignal initWithLaunchOptions:launchOptions]; - [OneSignal addPermissionObserver:self]; - [OneSignal addSubscriptionObserver:self]; - [OneSignal addEmailSubscriptionObserver:self]; - [OneSignal setInAppMessageLifecycleHandler:self]; - [OneSignal pauseInAppMessages:true]; + + [OneSignal.InAppMessages addLifecycleListener:self]; + [OneSignal.InAppMessages paused:true]; - [OneSignal setNotificationWillShowInForegroundHandler:notificationReceiverBlock]; - [OneSignal setNotificationOpenedHandler:openNotificationHandler]; + [OneSignal.Notifications addForegroundLifecycleListener:self]; + [OneSignal.Notifications addClickListener:self]; + [OneSignal.User.pushSubscription addObserver:self]; + NSLog(@"OneSignal Demo App push subscription observer added"); + + [OneSignal.Notifications addPermissionObserver:self]; + [OneSignal.InAppMessages addClickListener:self]; NSLog(@"UNUserNotificationCenter.delegate: %@", UNUserNotificationCenter.currentNotificationCenter.delegate); return YES; } -#define ONESIGNAL_APP_ID_DEFAULT @"0ba9731b-33bd-43f4-8b59-61172e27447d" -#define ONESIGNAL_APP_ID_KEY_FOR_TESTING @"ONESIGNAL_APP_ID_KEY_FOR_TESTING" +#define ONESIGNAL_APP_ID_DEFAULT @"77e32082-ea27-42e3-a898-c72e141824ef" +#define ONESIGNAL_APP_ID_KEY_FOR_TESTING @"YOUR_APP_ID_HERE" + (NSString*)getOneSignalAppId { NSString* userDefinedAppId = [[NSUserDefaults standardUserDefaults] objectForKey:ONESIGNAL_APP_ID_KEY_FOR_TESTING]; @@ -109,47 +90,54 @@ + (NSString*)getOneSignalAppId { + (void) setOneSignalAppId:(NSString*)onesignalAppId { [[NSUserDefaults standardUserDefaults] setObject:onesignalAppId forKey:ONESIGNAL_APP_ID_KEY_FOR_TESTING]; [[NSUserDefaults standardUserDefaults] synchronize]; - [OneSignal setAppId:onesignalAppId]; + // [OneSignal setAppId:onesignalAppId]; } -- (void) onOSPermissionChanged:(OSPermissionStateChanges*)stateChanges { - NSLog(@"onOSPermissionChanged: %@", stateChanges); +- (void)onNotificationPermissionDidChange:(BOOL)permission { + NSLog(@"Dev App onNotificationPermissionDidChange: %d", permission); } -- (void) onOSSubscriptionChanged:(OSSubscriptionStateChanges*)stateChanges { - NSLog(@"onOSSubscriptionChanged: %@", stateChanges); +- (void)onPushSubscriptionDidChangeWithState:(OSPushSubscriptionChangedState *)state { + NSLog(@"Dev App onPushSubscriptionDidChange: %@", state); ViewController* mainController = (ViewController*) self.window.rootViewController; - mainController.subscriptionSegmentedControl.selectedSegmentIndex = (NSInteger) stateChanges.to.isSubscribed; + mainController.subscriptionSegmentedControl.selectedSegmentIndex = (NSInteger) state.current.optedIn; } -- (void)onOSEmailSubscriptionChanged:(OSEmailSubscriptionStateChanges *)stateChanges { - NSLog(@"onOSEmailSubscriptionChanged: %@", stateChanges); +- (void)onClickNotification:(OSNotificationClickEvent * _Nonnull)event { + NSLog(@"Dev App onClickNotification with event %@", [event jsonRepresentation]); } #pragma mark OSInAppMessageDelegate -- (void)handleMessageAction:(OSInAppMessageAction *)action { - NSLog(@"OSInAppMessageDelegate: handling message action: %@",action); - return; +- (void)onClickInAppMessage:(OSInAppMessageClickEvent * _Nonnull)event { + NSLog(@"Dev App onClickInAppMessage event: %@", [event jsonRepresentation]); +} + +- (void)onWillDisplayNotification:(OSNotificationWillDisplayEvent *)event { + NSLog(@"Dev App OSNotificationWillDisplayEvent with event: %@",event); + [event preventDefault]; + dispatch_after(dispatch_time(DISPATCH_TIME_NOW, 5 * NSEC_PER_SEC), dispatch_get_main_queue(), ^{ + [event.notification display]; + }); } -- (void)onWillDisplayInAppMessage:(OSInAppMessage *)message { - NSLog(@"OSInAppMessageDelegate: onWillDisplay Message: %@",message); +- (void)onWillDisplayInAppMessage:(OSInAppMessageWillDisplayEvent *)event { + NSLog(@"Dev App OSInAppMessageLifecycleListener: onWillDisplay Message: %@",event.message); return; } -- (void)onDidDisplayInAppMessage:(OSInAppMessage *)message { - NSLog(@"OSInAppMessageDelegate: onDidDisplay Message: %@",message); +- (void)onDidDisplayInAppMessage:(OSInAppMessageDidDisplayEvent *)event { + NSLog(@"Dev App OSInAppMessageLifecycleListener: onDidDisplay Message: %@",event.message); return; } -- (void)onWillDismissInAppMessage:(OSInAppMessage *)message { - NSLog(@"OSInAppMessageDelegate: onWillDismiss Message: %@",message); +- (void)onWillDismissInAppMessage:(OSInAppMessageWillDismissEvent *)event { + NSLog(@"Dev App OSInAppMessageLifecycleListener: onWillDismiss Message: %@",event.message); return; } -- (void)onDidDismissInAppMessage:(OSInAppMessage *)message { - NSLog(@"OSInAppMessageDelegate: onDidDismiss Message: %@",message); +- (void)onDidDismissInAppMessage:(OSInAppMessageDidDismissEvent *)event { + NSLog(@"Dev App OSInAppMessageLifecycleListener: onDidDismiss Message: %@",event.message); return; } diff --git a/iOS_SDK/OneSignalDevApp/OneSignalDevApp/Base.lproj/Main.storyboard b/iOS_SDK/OneSignalDevApp/OneSignalDevApp/Base.lproj/Main.storyboard index 64718669d..721f61058 100644 --- a/iOS_SDK/OneSignalDevApp/OneSignalDevApp/Base.lproj/Main.storyboard +++ b/iOS_SDK/OneSignalDevApp/OneSignalDevApp/Base.lproj/Main.storyboard @@ -1,9 +1,9 @@ - + - + @@ -17,47 +17,47 @@ - + - - + + - - + + - - + - - + + @@ -90,7 +90,7 @@ - + @@ -99,7 +99,7 @@ - + @@ -124,7 +124,7 @@ - + @@ -155,7 +155,7 @@ - + @@ -163,7 +163,7 @@ - + @@ -179,102 +179,65 @@ - + - - - - - + + + + + - - + + - - - - + - + - + - - - - - - - - - - - - + @@ -294,34 +257,34 @@ - - + - - + @@ -329,37 +292,69 @@ - + + + + + + + + + + - + - + - + - - - + + - - - + + + + + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + - - - + - - - - - + + + + + - - - - + + + + - - - - + + + - + - - - + + + + + - + + - - + + + + - + - + + - + - + + + - - + + + - + + + + - + + - + + - - + + + + - + - - + + + + - + + - - - - + + + - + - + + + + - - - + - - - - + + + + - + - - - + + + + + - + + - - + + + + + - @@ -547,21 +689,12 @@ - - - - @@ -575,9 +708,14 @@ - + - + + + + + + @@ -585,25 +723,27 @@ - + - + - + + - + + + + - - - + @@ -612,7 +752,7 @@ - + diff --git a/iOS_SDK/OneSignalDevApp/OneSignalDevApp/LiveActivityController.swift b/iOS_SDK/OneSignalDevApp/OneSignalDevApp/LiveActivityController.swift index ec246bc08..3aeb29f19 100644 --- a/iOS_SDK/OneSignalDevApp/OneSignalDevApp/LiveActivityController.swift +++ b/iOS_SDK/OneSignalDevApp/OneSignalDevApp/LiveActivityController.swift @@ -1,10 +1,29 @@ -// -// LiveActivityController.swift -// OneSignalExample -// -// Created by Henry Boswell on 11/9/22. -// Copyright © 2022 OneSignal. All rights reserved. -// +/** + * Modified MIT License + * + * Copyright 2023 OneSignal + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * 1. The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * 2. All copies of substantial portions of the Software may only be used in connection + * with services provided by OneSignal. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ import Foundation import ActivityKit @@ -27,7 +46,7 @@ class LiveActivityController: NSObject { @objc static func createActivity() async -> String? { if #available(iOS 16.1, *) { - counter += 1; + counter += 1 let attributes = OneSignalWidgetAttributes(title: "#" + String(counter) + " OneSignal Dev App Live Activity") let contentState = OneSignalWidgetAttributes.ContentState(message: "Update this message through push or with Activity Kit") do { @@ -39,7 +58,7 @@ class LiveActivityController: NSObject { let myToken = data.map {String(format: "%02x", $0)}.joined() return myToken } - } catch (let error) { + } catch let error { print(error.localizedDescription) return nil } diff --git a/iOS_SDK/OneSignalDevApp/OneSignalDevApp/OneSignalExample-Bridging-Header.h b/iOS_SDK/OneSignalDevApp/OneSignalDevApp/OneSignalExample-Bridging-Header.h index 1b2cb5d6d..093fc35a5 100644 --- a/iOS_SDK/OneSignalDevApp/OneSignalDevApp/OneSignalExample-Bridging-Header.h +++ b/iOS_SDK/OneSignalDevApp/OneSignalDevApp/OneSignalExample-Bridging-Header.h @@ -1,4 +1,32 @@ -// -// Use this file to import your target's public headers that you would like to expose to Swift. -// +/** + * Modified MIT License + * + * Copyright 2022 OneSignal + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * 1. The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * 2. All copies of substantial portions of the Software may only be used in connection + * with services provided by OneSignal. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ +#ifndef OneSignalExample_Bridging_Header_h +#define OneSignalExample_Bridging_Header_h + + +#endif /* OneSignalExample_Bridging_Header_h */ diff --git a/iOS_SDK/OneSignalDevApp/OneSignalDevApp/SwiftTest.swift b/iOS_SDK/OneSignalDevApp/OneSignalDevApp/SwiftTest.swift new file mode 100644 index 000000000..eae4a119f --- /dev/null +++ b/iOS_SDK/OneSignalDevApp/OneSignalDevApp/SwiftTest.swift @@ -0,0 +1,36 @@ +/** + * Modified MIT License + * + * Copyright 2022 OneSignal + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * 1. The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * 2. All copies of substantial portions of the Software may only be used in connection + * with services provided by OneSignal. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +import Foundation +import OneSignalFramework + +class SwiftTest: NSObject { + func testSwiftUserModel() { + let token1 = OneSignal.User.pushSubscription.token + let token = OneSignal.User.pushSubscription.token + } +} diff --git a/iOS_SDK/OneSignalDevApp/OneSignalDevApp/ViewController.h b/iOS_SDK/OneSignalDevApp/OneSignalDevApp/ViewController.h index d4d76ea6f..57476c685 100644 --- a/iOS_SDK/OneSignalDevApp/OneSignalDevApp/ViewController.h +++ b/iOS_SDK/OneSignalDevApp/OneSignalDevApp/ViewController.h @@ -29,26 +29,38 @@ // This project exisits to make testing OneSignal SDK changes. #import -#import +#import -@interface ViewController : UIViewController +@interface ViewController : UIViewController @property (weak, nonatomic) IBOutlet UIActivityIndicatorView *activityIndicatorView; @property (weak, nonatomic) IBOutlet UISegmentedControl *consentSegmentedControl; @property (weak, nonatomic) IBOutlet UITextField *appIdTextField; @property (weak, nonatomic) IBOutlet UIButton *updateAppIdButton; @property (weak, nonatomic) IBOutlet UIButton *sendTagButton; -@property (weak, nonatomic) IBOutlet UIButton *getTagsButton; +@property (weak, nonatomic) IBOutlet UIButton *getInfoButton; @property (weak, nonatomic) IBOutlet UIButton *sendTagsButton; @property (weak, nonatomic) IBOutlet UIButton *promptPushButton; @property (weak, nonatomic) IBOutlet UIButton *promptLocationButton; @property (weak, nonatomic) IBOutlet UISegmentedControl *subscriptionSegmentedControl; @property (weak, nonatomic) IBOutlet UITextField *emailTextField; -@property (weak, nonatomic) IBOutlet UIButton *setEmailButton; -@property (weak, nonatomic) IBOutlet UIButton *logoutEmailButton; +@property (weak, nonatomic) IBOutlet UIButton *addEmailButton; +@property (weak, nonatomic) IBOutlet UIButton *removeEmailButton; + +@property (weak, nonatomic) IBOutlet UITextField *smsTextField; +@property (weak, nonatomic) IBOutlet UIButton *addSmsButton; +@property (weak, nonatomic) IBOutlet UIButton *removeSmsButton; + @property (weak, nonatomic) IBOutlet UITextField *externalUserIdTextField; -@property (weak, nonatomic) IBOutlet UIButton *setExternalUserIdButton; -@property (weak, nonatomic) IBOutlet UIButton *removeExternalUserIdButton; +@property (weak, nonatomic) IBOutlet UIButton *loginExternalUserIdButton; +@property (weak, nonatomic) IBOutlet UIButton *logoutButton; + +@property (weak, nonatomic) IBOutlet UITextField *addAliasLabelTextField; +@property (weak, nonatomic) IBOutlet UITextField *addAliasIdTextField; +@property (weak, nonatomic) IBOutlet UIButton *addAliasButton; +@property (weak, nonatomic) IBOutlet UITextField *removeAliasLabelTextField; +@property (weak, nonatomic) IBOutlet UIButton *removeAliasButton; + @property (weak, nonatomic) IBOutlet UISegmentedControl *locationSharedSegementedControl; @property (weak, nonatomic) IBOutlet UISegmentedControl *inAppMessagingSegmentedControl; @property (weak, nonatomic) IBOutlet UITextField *addTriggerKey; @@ -61,10 +73,11 @@ @property (weak, nonatomic) IBOutlet UITextField *outcomeValueName; @property (weak, nonatomic) IBOutlet UITextField *outcomeValue; @property (weak, nonatomic) IBOutlet UITextField *outcomeUniqueName; -@property (weak, nonatomic) IBOutlet UITextView *result; @property (weak, nonatomic) IBOutlet UITextField *tagKey; @property (weak, nonatomic) IBOutlet UITextField *tagValue; @property (weak, nonatomic) IBOutlet UITextField *activityId; +@property (weak, nonatomic) IBOutlet UITextField *languageTextField; + @end diff --git a/iOS_SDK/OneSignalDevApp/OneSignalDevApp/ViewController.m b/iOS_SDK/OneSignalDevApp/OneSignalDevApp/ViewController.m index 2f2f71e2f..1f186061e 100644 --- a/iOS_SDK/OneSignalDevApp/OneSignalDevApp/ViewController.m +++ b/iOS_SDK/OneSignalDevApp/OneSignalDevApp/ViewController.m @@ -40,13 +40,11 @@ - (void)viewDidLoad { self.activityIndicatorView.hidden = true; - self.consentSegmentedControl.selectedSegmentIndex = (NSInteger) ![OneSignal requiresUserPrivacyConsent]; - - self.subscriptionSegmentedControl.selectedSegmentIndex = (NSInteger) OneSignal.getDeviceState.isSubscribed; + self.subscriptionSegmentedControl.selectedSegmentIndex = (NSInteger) OneSignal.User.pushSubscription.optedIn; - self.locationSharedSegementedControl.selectedSegmentIndex = (NSInteger) OneSignal.isLocationShared; + self.locationSharedSegementedControl.selectedSegmentIndex = (NSInteger) [OneSignal.Location isShared]; - self.inAppMessagingSegmentedControl.selectedSegmentIndex = (NSInteger) ![OneSignal isInAppMessagingPaused]; + self.inAppMessagingSegmentedControl.selectedSegmentIndex = (NSInteger) ![OneSignal.InAppMessages paused]; self.appIdTextField.text = [AppDelegate getOneSignalAppId]; @@ -60,7 +58,8 @@ - (void)changeAnimationState:(BOOL)animating { } - (IBAction)updateAppId:(id)sender { - [AppDelegate setOneSignalAppId:self.appIdTextField.text]; + // [AppDelegate setOneSignalAppId:self.appIdTextField.text]; + NSLog(@"Dev App: Not a feature, can't change app id, no op!"); } - (IBAction)addTriggerAction:(id)sender { @@ -68,7 +67,7 @@ - (IBAction)addTriggerAction:(id)sender { NSString *value = [self.addTriggerValue text]; if (key && value && [key length] && [value length]) { - [OneSignal addTrigger:key withValue:value]; + [OneSignal.InAppMessages addTrigger:key withValue:value]; } } @@ -76,80 +75,78 @@ - (IBAction)removeTriggerAction:(id)sender { NSString *key = [self.removeTriggerKey text]; if (key && [key length]) { - [OneSignal removeTriggerForKey:key]; + [OneSignal.InAppMessages removeTrigger:key]; } } - (IBAction)getTriggersAction:(id)sender { - NSString *key = [self.getTriggerKey text]; + NSLog(@"Getting triggers no longer supported"); +} - if (key && [key length]) { - id value = [OneSignal getTriggerValueForKey:key]; - self.infoLabel.text = [NSString stringWithFormat:@"Key: %@ Value: %@", key, value]; - } +- (IBAction)addEmailButton:(id)sender { + NSString *email = self.emailTextField.text; + NSLog(@"Dev App: add email: %@", email); + [OneSignal.User addEmail:email]; } -- (IBAction)setEmailButton:(id)sender { +- (IBAction)removeEmailButton:(id)sender { NSString *email = self.emailTextField.text; - [OneSignal setEmail:email withSuccess:^{ - NSLog(@"Set email successful with email: %@", email); - } withFailure:^(NSError *error) { - NSLog(@"Set email failed with code: %@ and message: %@", @(error.code), error.description); - }]; + NSLog(@"Dev App: Removing email: %@", email); + [OneSignal.User removeEmail:email]; } -- (IBAction)logoutEmailButton:(id)sender { - [OneSignal logoutEmailWithSuccess:^{ - NSLog(@"Email logout successful"); - } withFailure:^(NSError *error) { - NSLog(@"Error logging out email with code: %@ and message: %@", @(error.code), error.description); - }]; +- (IBAction)addSmsButton:(id)sender { + NSString *sms = self.smsTextField.text; + NSLog(@"Dev App: Add sms: %@", sms); + [OneSignal.User addSms:sms]; +} + +- (IBAction)removeSmsButton:(id)sender { + NSString *sms = self.smsTextField.text; + NSLog(@"Dev App: Removing sms: %@", sms); + [OneSignal.User removeSms:sms]; +} + +- (IBAction)addAliasButton:(UIButton *)sender { + NSString* label = self.addAliasLabelTextField.text; + NSString* id = self.addAliasIdTextField.text; + NSLog(@"Dev App: Add alias with label %@ and ID %@", label, id); + [OneSignal.User addAliasWithLabel:label id:id]; +} + +- (IBAction)removeAliasButton:(UIButton *)sender { + NSString* label = self.removeAliasLabelTextField.text; + NSLog(@"Dev App: Removing alias with label %@", label); + [OneSignal.User removeAlias:label]; } - (IBAction)sendTagButton:(id)sender { if (self.tagKey.text && self.tagKey.text.length && self.tagValue.text && self.tagValue.text.length) { - [OneSignal sendTag:self.tagKey.text - value:self.tagValue.text - onSuccess:^(NSDictionary *result) { - static int successes = 0; - NSLog(@"successes: %d", ++successes); - } - onFailure:^(NSError *error) { - static int failures = 0; - NSLog(@"failures: %d", ++failures); - }]; + NSLog(@"Sending tag with key: %@ value: %@", self.tagKey.text, self.tagValue.text); + [OneSignal.User addTagWithKey:self.tagKey.text value:self.tagValue.text]; } } -- (IBAction)getTagsButton:(id)sender { - [OneSignal getTags:^(NSDictionary *result) { - NSLog(@"Tags: %@", result.description); - }]; +- (IBAction)getInfoButton:(id)sender { + NSLog(@"Dev App: get User and Device information, you need to fill in"); } - (IBAction)sendTagsButton:(id)sender { - [OneSignal sendTag:@"key1" - value:@"value1" - onSuccess:^(NSDictionary *result) { - static int successes = 0; - NSLog(@"successes: %d", ++successes); - } - onFailure:^(NSError *error) { - static int failures = 0; - NSLog(@"failures: %d", ++failures); - }]; + NSLog(@"Sending tags %@", @{@"key1": @"value1", @"key2": @"value2"}); + [OneSignal.User addTags:@{@"key1": @"value1", @"key2": @"value2"}]; } - (IBAction)promptPushAction:(UIButton *)sender { + // This was already commented out pre-5.0.0 // [self promptForNotificationsWithNativeiOS10Code]; - [OneSignal promptForPushNotificationsWithUserResponse:^(BOOL accepted) { - NSLog(@"OneSignal Demo App promptForPushNotificationsWithUserResponse: %d", accepted); + [OneSignal.Notifications requestPermission:^(BOOL accepted) { + NSLog(@"OneSignal Demo App requestPermission: %d", accepted); }]; } - (IBAction)promptLocationAction:(UIButton *)sender { - [OneSignal promptLocation]; + [OneSignal.Location requestPermission]; } - (void)promptForNotificationsWithNativeiOS10Code { @@ -169,41 +166,39 @@ - (void)didReceiveMemoryWarning { - (IBAction)consentSegmentedControlValueChanged:(UISegmentedControl *)sender { NSLog(@"View controller consent granted: %i", (int) sender.selectedSegmentIndex); - [OneSignal consentGranted:(bool) sender.selectedSegmentIndex]; + [OneSignal setConsentGiven:(bool) sender.selectedSegmentIndex]; } - (IBAction)subscriptionSegmentedControlValueChanged:(UISegmentedControl *)sender { NSLog(@"View controller subscription status: %i", (int) sender.selectedSegmentIndex); - [OneSignal disablePush:(bool) !sender.selectedSegmentIndex]; + if (sender.selectedSegmentIndex) { + [OneSignal.User.pushSubscription optIn]; + } else { + [OneSignal.User.pushSubscription optOut]; + } + sender.selectedSegmentIndex = (NSInteger) OneSignal.User.pushSubscription.optedIn; + } - (IBAction)locationSharedSegmentedControlValueChanged:(UISegmentedControl *)sender { NSLog(@"View controller location sharing status: %i", (int) sender.selectedSegmentIndex); - [OneSignal setLocationShared:(bool) sender.selectedSegmentIndex]; + [OneSignal.Location setShared:(bool) sender.selectedSegmentIndex]; } - (IBAction)inAppMessagingSegmentedControlValueChanged:(UISegmentedControl *)sender { NSLog(@"View controller in app messaging paused: %i", (int) !sender.selectedSegmentIndex); - [OneSignal pauseInAppMessages:(bool) !sender.selectedSegmentIndex]; -} - -- (void)handleMessageAction:(NSString *)actionId { - NSLog(@"View controller did get action: %@", actionId); + [OneSignal.InAppMessages paused:(bool) !sender.selectedSegmentIndex]; } -- (IBAction)setExternalUserId:(UIButton *)sender { +- (IBAction)loginExternalUserId:(UIButton *)sender { NSString* externalUserId = self.externalUserIdTextField.text; - [OneSignal setExternalUserId:externalUserId withSuccess:^(NSDictionary *results) { - NSLog(@"External user id update complete with results: %@", results.description); - } withFailure:^(NSError *error) { - }]; + NSLog(@"Dev App: Logging in to external user ID %@", externalUserId); + [OneSignal login:externalUserId]; } -- (IBAction)removeExternalUserId:(UIButton *)sender { - [OneSignal removeExternalUserId:^(NSDictionary *results) { - NSLog(@"External user id update complete with results: %@", results.description); - } withFailure:^(NSError *error) { - }]; +- (IBAction)logout:(UIButton *)sender { + NSLog(@"Dev App: Logout called."); + [OneSignal logout]; } #pragma mark UITextFieldDelegate Methods @@ -213,35 +208,24 @@ -(BOOL)textFieldShouldReturn:(UITextField *)textField { } - (IBAction)sendTestOutcomeEvent:(UIButton *)sender { - [OneSignal sendOutcome:[_outcomeName text] onSuccess:^(OSOutcomeEvent *outcome) { - dispatch_async(dispatch_get_main_queue(), ^{ - _result.text = [NSString stringWithFormat:@"sendTestOutcomeEvent success %@", outcome]; - [self.view endEditing:YES]; - }); - }]; + NSLog(@"adding Outcome: %@", [_outcomeName text]); + [OneSignal.Session addOutcome:[_outcomeName text]]; } + - (IBAction)sendValueOutcomeEvent:(id)sender { if ([_outcomeValue text]) { NSNumberFormatter *formatter = [[NSNumberFormatter alloc] init]; formatter.numberStyle = NSNumberFormatterDecimalStyle; NSNumber *value = [formatter numberFromString:[_outcomeValue text]]; - [OneSignal sendOutcomeWithValue:[_outcomeValueName text] value:value onSuccess:^(OSOutcomeEvent *outcome) { - dispatch_async(dispatch_get_main_queue(), ^{ - _result.text = [NSString stringWithFormat:@"sendValueOutcomeEvent success %@", outcome]; - [self.view endEditing:YES]; - }); - }]; + NSLog(@"adding Outcome with name: %@ value: %@", [_outcomeValueName text], value); + [OneSignal.Session addOutcomeWithValue:[_outcomeValueName text] value:value]; } } - (IBAction)sendUniqueOutcomeEvent:(id)sender { - [OneSignal sendUniqueOutcome:[_outcomeUniqueName text] onSuccess:^(OSOutcomeEvent *outcome) { - dispatch_async(dispatch_get_main_queue(), ^{ - _result.text = [NSString stringWithFormat:@"sendUniqueOutcomeEvent success %@", outcome]; - [self.view endEditing:YES]; - }); - }]; + NSLog(@"adding unique Outcome: %@", [_outcomeUniqueName text]); + [OneSignal.Session addUniqueOutcome:[_outcomeUniqueName text]]; } - (IBAction)startAndEnterLiveActivity:(id)sender { @@ -251,7 +235,7 @@ - (IBAction)startAndEnterLiveActivity:(id)sender { if (activityId && activityId.length) { [LiveActivityController createActivityWithCompletionHandler:^(NSString * token) { if(token){ - [OneSignal enterLiveActivity:activityId withToken:token]; + [OneSignal.LiveActivities enter:activityId withToken:token]; } }]; } @@ -261,9 +245,29 @@ - (IBAction)startAndEnterLiveActivity:(id)sender { } - (IBAction)exitLiveActivity:(id)sender { if (self.activityId.text && self.activityId.text.length) { - [OneSignal exitLiveActivity:self.activityId.text]; + [OneSignal.LiveActivities exit:self.activityId.text]; } - +} + +- (IBAction)setLanguage:(id)sender { + NSLog(@"Dev App: set language called."); + NSString *language = self.languageTextField.text; + [OneSignal.User setLanguage:language]; +} + +- (IBAction)clearAllNotifications:(id)sender { + NSLog(@"Dev App: clear All Notifications called."); + [OneSignal.Notifications clearAll]; +} + +- (IBAction)requireConsent:(id)sender { + NSLog(@"Dev App: setting setConsentRequired to true."); + [OneSignal setConsentRequired:true]; +} + +- (IBAction)dontRequireConsent:(id)sender { + NSLog(@"Dev App: setting setConsentRequired to false."); + [OneSignal setConsentRequired:false]; } @end diff --git a/iOS_SDK/OneSignalDevApp/OneSignalDevAppClip/AppDelegate.h b/iOS_SDK/OneSignalDevApp/OneSignalDevAppClip/AppDelegate.h index 2adcfaa54..c4de49ee4 100644 --- a/iOS_SDK/OneSignalDevApp/OneSignalDevAppClip/AppDelegate.h +++ b/iOS_SDK/OneSignalDevApp/OneSignalDevAppClip/AppDelegate.h @@ -7,9 +7,10 @@ // #import -#import +#import -@interface AppDelegate : UIResponder +// TODO: Add subscription observer +@interface AppDelegate : UIResponder @property (strong, nonatomic) UIWindow *window; diff --git a/iOS_SDK/OneSignalDevApp/OneSignalDevAppClip/AppDelegate.m b/iOS_SDK/OneSignalDevApp/OneSignalDevAppClip/AppDelegate.m index ffcb260bf..915298410 100644 --- a/iOS_SDK/OneSignalDevApp/OneSignalDevAppClip/AppDelegate.m +++ b/iOS_SDK/OneSignalDevApp/OneSignalDevAppClip/AppDelegate.m @@ -51,41 +51,24 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:( NSLog(@"Bundle URL: %@", [[NSBundle mainBundle] bundleURL]); - [OneSignal setLogLevel:ONE_S_LL_VERBOSE visualLevel:ONE_S_LL_NONE]; + [OneSignal.Debug setLogLevel:ONE_S_LL_VERBOSE]; + [OneSignal.Debug setAlertLevel:ONE_S_LL_NONE]; _notificationDelegate = [OneSignalNotificationCenterDelegate new]; - - id openNotificationHandler = ^(OSNotificationOpenedResult *result) { - NSLog(@"OSNotificationOpenedResult: %@", result.action); - }; - id notificationReceiverBlock = ^(OSNotification *notif, OSNotificationDisplayResponse completion) { - NSLog(@"Will Receive Notification - %@", notif.notificationId); - completion(notif); - }; - - // Example block for IAM action click handler - id inAppMessagingActionClickBlock = ^(OSInAppMessageAction *action) { - NSString *message = [NSString stringWithFormat:@"Click Action Occurred: %@", [action jsonRepresentation]]; - [OneSignal onesignalLog:ONE_S_LL_DEBUG message:message]; - }; - - // Example setter for IAM action click handler using OneSignal public method - [OneSignal setInAppMessageClickHandler:inAppMessagingActionClickBlock]; - + // OneSignal Init with app id and lauch options - [OneSignal setLaunchURLsInApp:YES]; [OneSignal setProvidesNotificationSettingsView:NO]; - [OneSignal setAppId:[AppDelegate getOneSignalAppId]]; - [OneSignal initWithLaunchOptions:launchOptions]; + [OneSignal initialize:[AppDelegate getOneSignalAppId] withLaunchOptions:launchOptions]; - [OneSignal addPermissionObserver:self]; - [OneSignal addSubscriptionObserver:self]; - [OneSignal addEmailSubscriptionObserver:self]; +// [OneSignal addPermissionObserver:self]; +// [OneSignal addSubscriptionObserver:self]; +// [OneSignal addEmailSubscriptionObserver:self]; - [OneSignal pauseInAppMessages:false]; + [OneSignal.Notifications requestPermission:^(BOOL accepted) { + NSLog(@"OneSignal Demo App requestPermission: %d", accepted); + }]; + + [OneSignal.InAppMessages paused:false]; - [OneSignal setNotificationWillShowInForegroundHandler:notificationReceiverBlock]; - [OneSignal setNotificationOpenedHandler:openNotificationHandler]; - NSLog(@"UNUserNotificationCenter.delegate: %@", UNUserNotificationCenter.currentNotificationCenter.delegate); return YES; @@ -105,22 +88,19 @@ + (NSString*)getOneSignalAppId { + (void) setOneSignalAppId:(NSString*)onesignalAppId { [[NSUserDefaults standardUserDefaults] setObject:onesignalAppId forKey:ONESIGNAL_APP_ID_KEY_FOR_TESTING]; [[NSUserDefaults standardUserDefaults] synchronize]; - [OneSignal setAppId:onesignalAppId]; -} - -- (void) onOSPermissionChanged:(OSPermissionStateChanges*)stateChanges { - NSLog(@"onOSPermissionChanged: %@", stateChanges); + [OneSignal initialize:onesignalAppId withLaunchOptions:nil]; } -- (void) onOSSubscriptionChanged:(OSSubscriptionStateChanges*)stateChanges { - NSLog(@"onOSSubscriptionChanged: %@", stateChanges); - ViewController* mainController = (ViewController*) self.window.rootViewController; - mainController.subscriptionSegmentedControl.selectedSegmentIndex = (NSInteger) stateChanges.to.isSubscribed; +- (void)onNotificationPermissionDidChange:(BOOL)permission { + NSLog(@"onNotificationPermissionDidChange: %d", permission); } -- (void)onOSEmailSubscriptionChanged:(OSEmailSubscriptionStateChanges *)stateChanges { - NSLog(@"onOSEmailSubscriptionChanged: %@", stateChanges); -} +// TODO: Add push sub observer +//- (void) onOSSubscriptionChanged:(OSSubscriptionStateChanges*)stateChanges { +// NSLog(@"onOSSubscriptionChanged: %@", stateChanges); +// ViewController* mainController = (ViewController*) self.window.rootViewController; +// mainController.subscriptionSegmentedControl.selectedSegmentIndex = (NSInteger) stateChanges.to.isSubscribed; +//} - (void)applicationWillResignActive:(UIApplication *)application { } diff --git a/iOS_SDK/OneSignalDevApp/OneSignalDevAppClip/Base.lproj/Main.storyboard b/iOS_SDK/OneSignalDevApp/OneSignalDevAppClip/Base.lproj/Main.storyboard index 23dc59463..ac9223f99 100644 --- a/iOS_SDK/OneSignalDevApp/OneSignalDevAppClip/Base.lproj/Main.storyboard +++ b/iOS_SDK/OneSignalDevApp/OneSignalDevAppClip/Base.lproj/Main.storyboard @@ -1,7 +1,9 @@ - + + - + + @@ -18,7 +20,7 @@ - + @@ -38,9 +40,9 @@ - + - + @@ -303,12 +305,12 @@ @@ -328,9 +330,9 @@ - + - + diff --git a/iOS_SDK/OneSignalDevApp/OneSignalDevAppClip/ViewController.h b/iOS_SDK/OneSignalDevApp/OneSignalDevAppClip/ViewController.h index d92c56d8a..a1b63b9d7 100644 --- a/iOS_SDK/OneSignalDevApp/OneSignalDevAppClip/ViewController.h +++ b/iOS_SDK/OneSignalDevApp/OneSignalDevAppClip/ViewController.h @@ -29,25 +29,25 @@ // This project exisits to make testing OneSignal SDK changes. #import -#import +#import -@interface ViewController : UIViewController +@interface ViewController : UIViewController @property (weak, nonatomic) IBOutlet UIActivityIndicatorView *activityIndicatorView; @property (weak, nonatomic) IBOutlet UISegmentedControl *consentSegmentedControl; @property (weak, nonatomic) IBOutlet UITextField *appIdTextField; @property (weak, nonatomic) IBOutlet UIButton *updateAppIdButton; -@property (weak, nonatomic) IBOutlet UIButton *getTagsButton; +@property (weak, nonatomic) IBOutlet UIButton *getInfoButton; @property (weak, nonatomic) IBOutlet UIButton *sendTagsButton; @property (weak, nonatomic) IBOutlet UIButton *promptPushButton; @property (weak, nonatomic) IBOutlet UIButton *promptLocationButton; @property (weak, nonatomic) IBOutlet UISegmentedControl *subscriptionSegmentedControl; @property (weak, nonatomic) IBOutlet UITextField *emailTextField; -@property (weak, nonatomic) IBOutlet UIButton *setEmailButton; -@property (weak, nonatomic) IBOutlet UIButton *logoutEmailButton; +@property (weak, nonatomic) IBOutlet UIButton *addEmailButton; +@property (weak, nonatomic) IBOutlet UIButton *removeEmailButton; @property (weak, nonatomic) IBOutlet UITextField *externalUserIdTextField; -@property (weak, nonatomic) IBOutlet UIButton *setExternalUserIdButton; -@property (weak, nonatomic) IBOutlet UIButton *removeExternalUserIdButton; +@property (weak, nonatomic) IBOutlet UIButton *loginExternalUserIdButton; +@property (weak, nonatomic) IBOutlet UIButton *logoutButton; @property (weak, nonatomic) IBOutlet UISegmentedControl *locationSharedSegementedControl; @property (weak, nonatomic) IBOutlet UISegmentedControl *inAppMessagingSegmentedControl; @property (weak, nonatomic) IBOutlet UITextField *addTriggerKey; diff --git a/iOS_SDK/OneSignalDevApp/OneSignalDevAppClip/ViewController.m b/iOS_SDK/OneSignalDevApp/OneSignalDevAppClip/ViewController.m index e0baefb00..b85520261 100644 --- a/iOS_SDK/OneSignalDevApp/OneSignalDevAppClip/ViewController.m +++ b/iOS_SDK/OneSignalDevApp/OneSignalDevAppClip/ViewController.m @@ -39,13 +39,11 @@ - (void)viewDidLoad { self.activityIndicatorView.hidden = true; - self.consentSegmentedControl.selectedSegmentIndex = (NSInteger) ![OneSignal requiresUserPrivacyConsent]; - - self.subscriptionSegmentedControl.selectedSegmentIndex = (NSInteger) OneSignal.getDeviceState.isSubscribed; + // self.subscriptionSegmentedControl.selectedSegmentIndex = (NSInteger) OneSignal.getDeviceState.isSubscribed; - self.locationSharedSegementedControl.selectedSegmentIndex = (NSInteger) OneSignal.isLocationShared; + self.locationSharedSegementedControl.selectedSegmentIndex = (NSInteger) [OneSignal.Location isShared]; - self.inAppMessagingSegmentedControl.selectedSegmentIndex = (NSInteger) ![OneSignal isInAppMessagingPaused]; + self.inAppMessagingSegmentedControl.selectedSegmentIndex = (NSInteger) ![OneSignal.InAppMessages paused]; self.appIdTextField.text = [AppDelegate getOneSignalAppId]; @@ -53,11 +51,6 @@ - (void)viewDidLoad { self.infoLabel.numberOfLines = 0; } -- (void)changeAnimationState:(BOOL)animating { - animating ? [self.activityIndicatorView startAnimating] : [self.activityIndicatorView stopAnimating]; - self.activityIndicatorView.hidden = !animating; -} - - (IBAction)updateAppId:(id)sender { [AppDelegate setOneSignalAppId:self.appIdTextField.text]; } @@ -67,7 +60,7 @@ - (IBAction)addTriggerAction:(id)sender { NSString *value = [self.addTriggerValue text]; if (key && value && [key length] && [value length]) { - [OneSignal addTrigger:key withValue:value]; + [OneSignal.InAppMessages addTrigger:key withValue:value]; } } @@ -75,64 +68,45 @@ - (IBAction)removeTriggerAction:(id)sender { NSString *key = [self.removeTriggerKey text]; if (key && [key length]) { - [OneSignal removeTriggerForKey:key]; + [OneSignal.InAppMessages removeTrigger:key]; } } - (IBAction)getTriggersAction:(id)sender { - NSString *key = [self.getTriggerKey text]; - - if (key && [key length]) { - id value = [OneSignal getTriggerValueForKey:key]; - self.infoLabel.text = [NSString stringWithFormat:@"Key: %@ Value: %@", key, value]; - } + NSLog(@"Getting triggers no longer supported"); } -- (IBAction)setEmailButton:(id)sender { +- (IBAction)addEmailButton:(id)sender { NSString *email = self.emailTextField.text; - [OneSignal setEmail:email withSuccess:^{ - NSLog(@"Set email successful with email: %@", email); - } withFailure:^(NSError *error) { - NSLog(@"Set email failed with code: %@ and message: %@", @(error.code), error.description); - }]; + NSLog(@"Dev App Clip: Adding email: %@", email); + [OneSignal.User addEmail:email]; } -- (IBAction)logoutEmailButton:(id)sender { - [OneSignal logoutEmailWithSuccess:^{ - NSLog(@"Email logout successful"); - } withFailure:^(NSError *error) { - NSLog(@"Error logging out email with code: %@ and message: %@", @(error.code), error.description); - }]; +- (IBAction)removeEmailButton:(id)sender { + NSString *email = self.emailTextField.text; + NSLog(@"Dev App Clip: Removing email: %@", email); + [OneSignal.User removeEmail:email]; } -- (IBAction)getTagsButton:(id)sender { - [OneSignal getTags:^(NSDictionary *result) { - NSLog(@"Tags: %@", result.description); - }]; +- (IBAction)getInfoButton:(id)sender { + NSLog(@"getTags no longer supported"); } - (IBAction)sendTagsButton:(id)sender { - [OneSignal sendTag:@"key1" - value:@"value1" - onSuccess:^(NSDictionary *result) { - static int successes = 0; - NSLog(@"successes: %d", ++successes); - } - onFailure:^(NSError *error) { - static int failures = 0; - NSLog(@"failures: %d", ++failures); - }]; + NSLog(@"Sending tags %@", @{@"key1": @"value1", @"key2": @"value2"}); + [OneSignal.User addTags:@{@"key1": @"value1", @"key2": @"value2"}]; } - (IBAction)promptPushAction:(UIButton *)sender { + // This was already commented out pre-5.0.0 // [self promptForNotificationsWithNativeiOS10Code]; - [OneSignal promptForPushNotificationsWithUserResponse:^(BOOL accepted) { - NSLog(@"OneSignal Demo App promptForPushNotificationsWithUserResponse: %d", accepted); + [OneSignal.Notifications requestPermission:^(BOOL accepted) { + NSLog(@"OneSignal Demo App requestPermission: %d", accepted); }]; } - (IBAction)promptLocationAction:(UIButton *)sender { - [OneSignal promptLocation]; + [OneSignal.Location requestPermission]; } - (void)promptForNotificationsWithNativeiOS10Code { @@ -152,43 +126,32 @@ - (void)didReceiveMemoryWarning { - (IBAction)consentSegmentedControlValueChanged:(UISegmentedControl *)sender { NSLog(@"View controller consent granted: %i", (int) sender.selectedSegmentIndex); - [OneSignal consentGranted:(bool) sender.selectedSegmentIndex]; + [OneSignal setConsentGiven:(bool) sender.selectedSegmentIndex]; } - (IBAction)subscriptionSegmentedControlValueChanged:(UISegmentedControl *)sender { NSLog(@"View controller subscription status: %i", (int) sender.selectedSegmentIndex); - [OneSignal disablePush:(bool) !sender.selectedSegmentIndex]; + // [OneSignal disablePush:(bool) !sender.selectedSegmentIndex]; } - (IBAction)locationSharedSegmentedControlValueChanged:(UISegmentedControl *)sender { NSLog(@"View controller location sharing status: %i", (int) sender.selectedSegmentIndex); - [OneSignal setLocationShared:(bool) sender.selectedSegmentIndex]; + [OneSignal.Location setShared:(bool) sender.selectedSegmentIndex]; } - (IBAction)inAppMessagingSegmentedControlValueChanged:(UISegmentedControl *)sender { NSLog(@"View controller in app messaging paused: %i", (int) !sender.selectedSegmentIndex); - [OneSignal pauseInAppMessages:(bool) !sender.selectedSegmentIndex]; + [OneSignal.InAppMessages paused:(bool) !sender.selectedSegmentIndex]; } -- (void)handleMessageAction:(NSString *)actionId { - NSLog(@"View controller did get action: %@", actionId); +- (IBAction)loginExternalUserId:(UIButton *)sender { + NSLog(@"setExternalUserId is no longer supported. Please use login or addAlias."); + // TODO: Update } -- (IBAction)setExternalUserId:(UIButton *)sender { - NSString* externalUserId = self.externalUserIdTextField.text; - [OneSignal setExternalUserId:externalUserId withSuccess:^(NSDictionary *results) { - NSLog(@"External user id update complete with results: %@", results.description); - } withFailure:^(NSError *error) { - NSLog(@"External user id update failed with error: %@", error); - }]; -} - -- (IBAction)removeExternalUserId:(UIButton *)sender { - [OneSignal removeExternalUserId:^(NSDictionary *results) { - NSLog(@"External user id update complete with results: %@", results.description); - } withFailure:^(NSError *error) { - NSLog(@"External user id update failed with error: %@", error); - }]; +- (IBAction)logout:(UIButton *)sender { + NSLog(@"removeExternalUserId is no longer supported. Please use logout or removeAlias."); + // TODO: Update } #pragma mark UITextFieldDelegate Methods @@ -198,35 +161,24 @@ -(BOOL)textFieldShouldReturn:(UITextField *)textField { } - (IBAction)sendTestOutcomeEvent:(UIButton *)sender { - [OneSignal sendOutcome:[_outcomeName text] onSuccess:^(OSOutcomeEvent *outcome) { - dispatch_async(dispatch_get_main_queue(), ^{ - self->_result.text = [NSString stringWithFormat:@"sendTestOutcomeEvent success %@", outcome]; - [self.view endEditing:YES]; - }); - }]; + NSLog(@"adding Outcome: %@", [_outcomeName text]); + [OneSignal.Session addOutcome:[_outcomeName text]]; } + - (IBAction)sendValueOutcomeEvent:(id)sender { if ([_outcomeValue text]) { NSNumberFormatter *formatter = [[NSNumberFormatter alloc] init]; formatter.numberStyle = NSNumberFormatterDecimalStyle; NSNumber *value = [formatter numberFromString:[_outcomeValue text]]; - [OneSignal sendOutcomeWithValue:[_outcomeValueName text] value:value onSuccess:^(OSOutcomeEvent *outcome) { - dispatch_async(dispatch_get_main_queue(), ^{ - self->_result.text = [NSString stringWithFormat:@"sendValueOutcomeEvent success %@", outcome]; - [self.view endEditing:YES]; - }); - }]; + NSLog(@"adding Outcome with name: %@ value: %@", [_outcomeValueName text], value); + [OneSignal.Session addOutcomeWithValue:[_outcomeValueName text] value:value]; } } - (IBAction)sendUniqueOutcomeEvent:(id)sender { - [OneSignal sendUniqueOutcome:[_outcomeUniqueName text] onSuccess:^(OSOutcomeEvent *outcome) { - dispatch_async(dispatch_get_main_queue(), ^{ - self->_result.text = [NSString stringWithFormat:@"sendUniqueOutcomeEvent success %@", outcome]; - [self.view endEditing:YES]; - }); - }]; + NSLog(@"adding unique Outcome: %@", [_outcomeUniqueName text]); + [OneSignal.Session addUniqueOutcome:[_outcomeUniqueName text]]; } @end diff --git a/iOS_SDK/OneSignalDevApp/OneSignalExample.xcodeproj/project.pbxproj b/iOS_SDK/OneSignalDevApp/OneSignalExample.xcodeproj/project.pbxproj index f938f1ac8..ca7c65682 100644 --- a/iOS_SDK/OneSignalDevApp/OneSignalExample.xcodeproj/project.pbxproj +++ b/iOS_SDK/OneSignalDevApp/OneSignalExample.xcodeproj/project.pbxproj @@ -7,7 +7,8 @@ objects = { /* Begin PBXBuildFile section */ - 03432CDC1EBD426A0071FC48 /* CoreLocation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 03432CDB1EBD426A0071FC48 /* CoreLocation.framework */; }; + 3C448BA429381303002F96BC /* OneSignalNotifications.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3C448BA329381303002F96BC /* OneSignalNotifications.framework */; }; + 3C448BA529381303002F96BC /* OneSignalNotifications.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 3C448BA329381303002F96BC /* OneSignalNotifications.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 4529DECC1FA7EAB800CEAB1D /* UserNotifications.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 91B6EA051E83215000B5CF01 /* UserNotifications.framework */; }; 4529DEFE1FA921DA00CEAB1D /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 4529DEFD1FA921D900CEAB1D /* GoogleService-Info.plist */; }; 458396691FACFBB300D5DB95 /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 4529DEFD1FA921D900CEAB1D /* GoogleService-Info.plist */; }; @@ -25,18 +26,38 @@ 91B6EA071E83215800B5CF01 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9150E7821E73BFB600C5D46A /* UIKit.framework */; }; 91B6EA0A1E834B1700B5CF01 /* sentImage.jpg in Resources */ = {isa = PBXBuildFile; fileRef = 91B6EA091E834B1700B5CF01 /* sentImage.jpg */; }; 91B6EA0C1E834BD800B5CF01 /* sentImage.jpg in Resources */ = {isa = PBXBuildFile; fileRef = 91B6EA091E834B1700B5CF01 /* sentImage.jpg */; }; - 94735148291C4702000D91D3 /* LiveActivityController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 94735147291C4702000D91D3 /* LiveActivityController.swift */; }; - 9473514F291C4ED9000D91D3 /* WidgetKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9473514E291C4ED9000D91D3 /* WidgetKit.framework */; }; - 94735151291C4ED9000D91D3 /* SwiftUI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 94735150291C4ED9000D91D3 /* SwiftUI.framework */; }; - 94735154291C4EDC000D91D3 /* OneSignalWidgetExtensionBundle.swift in Sources */ = {isa = PBXBuildFile; fileRef = 94735153291C4EDC000D91D3 /* OneSignalWidgetExtensionBundle.swift */; }; - 94735156291C4EDC000D91D3 /* OneSignalWidgetExtensionLiveActivity.swift in Sources */ = {isa = PBXBuildFile; fileRef = 94735155291C4EDC000D91D3 /* OneSignalWidgetExtensionLiveActivity.swift */; }; - 9473515B291C4EDC000D91D3 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 9473515A291C4EDC000D91D3 /* Assets.xcassets */; }; - 9473515D291C4EDC000D91D3 /* OneSignalWidgetExtension.intentdefinition in Sources */ = {isa = PBXBuildFile; fileRef = 94735159291C4EDC000D91D3 /* OneSignalWidgetExtension.intentdefinition */; }; - 9473515E291C4EDC000D91D3 /* OneSignalWidgetExtension.intentdefinition in Sources */ = {isa = PBXBuildFile; fileRef = 94735159291C4EDC000D91D3 /* OneSignalWidgetExtension.intentdefinition */; }; - 94735161291C4EDC000D91D3 /* OneSignalWidgetExtensionExtension.appex in Embed App Extensions */ = {isa = PBXBuildFile; fileRef = 9473514D291C4ED9000D91D3 /* OneSignalWidgetExtensionExtension.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; - 94735169291C5A68000D91D3 /* LiveActivityController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 94735147291C4702000D91D3 /* LiveActivityController.swift */; }; + 945C59DE296CF2A00097041D /* WidgetKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 945C59DD296CF2A00097041D /* WidgetKit.framework */; }; + 945C59E0296CF2A00097041D /* SwiftUI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 945C59DF296CF2A00097041D /* SwiftUI.framework */; }; + 945C59E3296CF2A00097041D /* OneSignalWidgetExtensionBundle.swift in Sources */ = {isa = PBXBuildFile; fileRef = 945C59E2296CF2A00097041D /* OneSignalWidgetExtensionBundle.swift */; }; + 945C59E5296CF2A00097041D /* OneSignalWidgetExtensionLiveActivity.swift in Sources */ = {isa = PBXBuildFile; fileRef = 945C59E4296CF2A00097041D /* OneSignalWidgetExtensionLiveActivity.swift */; }; + 945C59E7296CF2A00097041D /* OneSignalWidgetExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 945C59E6296CF2A00097041D /* OneSignalWidgetExtension.swift */; }; + 945C59EA296CF2A10097041D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 945C59E9296CF2A10097041D /* Assets.xcassets */; }; + 945C59EC296CF2A10097041D /* OneSignalWidgetExtension.intentdefinition in Sources */ = {isa = PBXBuildFile; fileRef = 945C59E8296CF2A00097041D /* OneSignalWidgetExtension.intentdefinition */; }; + 945C59ED296CF2A10097041D /* OneSignalWidgetExtension.intentdefinition in Sources */ = {isa = PBXBuildFile; fileRef = 945C59E8296CF2A00097041D /* OneSignalWidgetExtension.intentdefinition */; }; + 945C59F0296CF2A10097041D /* OneSignalWidgetExtensionExtension.appex in Embed App Extensions */ = {isa = PBXBuildFile; fileRef = 945C59DC296CF2A00097041D /* OneSignalWidgetExtensionExtension.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; + 945C59F6296CF30B0097041D /* LiveActivityController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 945C59F5296CF30B0097041D /* LiveActivityController.swift */; }; + 945C59F7296CF3160097041D /* LiveActivityController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 945C59F5296CF30B0097041D /* LiveActivityController.swift */; }; CACBAAB6218A7136000ACAA5 /* WebKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CACBAAB5218A7136000ACAA5 /* WebKit.framework */; }; CACBAAB7218A713C000ACAA5 /* WebKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CACBAAB5218A7136000ACAA5 /* WebKit.framework */; }; + DE12F3F7289B2B7F002F63AA /* OneSignalOSCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DE12F3F6289B2B7F002F63AA /* OneSignalOSCore.framework */; }; + DE12F3F8289B2B7F002F63AA /* OneSignalOSCore.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = DE12F3F6289B2B7F002F63AA /* OneSignalOSCore.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; + DE61E483294810B900CD12F1 /* OneSignalFramework.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DE61E482294810B900CD12F1 /* OneSignalFramework.framework */; }; + DE61E484294810B900CD12F1 /* OneSignalFramework.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = DE61E482294810B900CD12F1 /* OneSignalFramework.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; + DE61E4852948117000CD12F1 /* OneSignalExampleClip.app in Embed App Clips */ = {isa = PBXBuildFile; fileRef = DE68DA5724C7695900FC95A8 /* OneSignalExampleClip.app */; platformFilter = ios; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; + DE61E48A2948117A00CD12F1 /* OneSignalCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DE61E4892948117A00CD12F1 /* OneSignalCore.framework */; }; + DE61E48B2948117A00CD12F1 /* OneSignalCore.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = DE61E4892948117A00CD12F1 /* OneSignalCore.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; + DE61E48E2948117D00CD12F1 /* OneSignalExtension.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DE61E48D2948117D00CD12F1 /* OneSignalExtension.framework */; }; + DE61E48F2948117D00CD12F1 /* OneSignalExtension.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = DE61E48D2948117D00CD12F1 /* OneSignalExtension.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; + DE61E4912948118200CD12F1 /* OneSignalFramework.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DE61E4902948118200CD12F1 /* OneSignalFramework.framework */; }; + DE61E4922948118200CD12F1 /* OneSignalFramework.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = DE61E4902948118200CD12F1 /* OneSignalFramework.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; + DE61E4942948118500CD12F1 /* OneSignalNotifications.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DE61E4932948118500CD12F1 /* OneSignalNotifications.framework */; }; + DE61E4952948118500CD12F1 /* OneSignalNotifications.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = DE61E4932948118500CD12F1 /* OneSignalNotifications.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; + DE61E4972948118900CD12F1 /* OneSignalOSCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DE61E4962948118900CD12F1 /* OneSignalOSCore.framework */; }; + DE61E4982948118900CD12F1 /* OneSignalOSCore.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = DE61E4962948118900CD12F1 /* OneSignalOSCore.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; + DE61E49A2948118C00CD12F1 /* OneSignalOutcomes.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DE61E4992948118C00CD12F1 /* OneSignalOutcomes.framework */; }; + DE61E49B2948118D00CD12F1 /* OneSignalOutcomes.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = DE61E4992948118C00CD12F1 /* OneSignalOutcomes.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; + DE61E49D2948119100CD12F1 /* OneSignalUser.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DE61E49C2948119100CD12F1 /* OneSignalUser.framework */; }; + DE61E49E2948119100CD12F1 /* OneSignalUser.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = DE61E49C2948119100CD12F1 /* OneSignalUser.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; DE68DA5B24C7695900FC95A8 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = DE68DA5A24C7695900FC95A8 /* AppDelegate.m */; }; DE68DA5E24C7695900FC95A8 /* SceneDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = DE68DA5D24C7695900FC95A8 /* SceneDelegate.m */; }; DE68DA6124C7695900FC95A8 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = DE68DA6024C7695900FC95A8 /* ViewController.m */; }; @@ -44,7 +65,6 @@ DE68DA6624C7695A00FC95A8 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = DE68DA6524C7695A00FC95A8 /* Assets.xcassets */; }; DE68DA6924C7695A00FC95A8 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = DE68DA6724C7695A00FC95A8 /* LaunchScreen.storyboard */; }; DE68DA6C24C7695A00FC95A8 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = DE68DA6B24C7695A00FC95A8 /* main.m */; }; - DE68DA7024C7695A00FC95A8 /* OneSignalExampleClip.app in Embed App Clips */ = {isa = PBXBuildFile; fileRef = DE68DA5724C7695900FC95A8 /* OneSignalExampleClip.app */; platformFilter = ios; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; DE68DA7724C769F200FC95A8 /* CoreLocation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 03432CDB1EBD426A0071FC48 /* CoreLocation.framework */; }; DE68DA7824C769F900FC95A8 /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9112E8A61E724EE00022A1CB /* SystemConfiguration.framework */; }; DE68DA7924C76A0300FC95A8 /* UserNotifications.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 91B6EA051E83215000B5CF01 /* UserNotifications.framework */; }; @@ -57,11 +77,15 @@ DE7D18C527038240002D3A5D /* OneSignalOutcomes.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = DE7D18C327038240002D3A5D /* OneSignalOutcomes.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; DE9717752756E6E000FC409E /* OneSignalExtension.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DE7D180C27026BCC002D3A5D /* OneSignalExtension.framework */; }; DE9717762756E6E100FC409E /* OneSignalExtension.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = DE7D180C27026BCC002D3A5D /* OneSignalExtension.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; - DE9717772756E6EF00FC409E /* OneSignal.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DEA22668261E62690092FF58 /* OneSignal.framework */; }; - DE9717782756E6EF00FC409E /* OneSignal.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = DEA22668261E62690092FF58 /* OneSignal.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; DE97177A2756E6FF00FC409E /* OneSignalOutcomes.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DE7D18C327038240002D3A5D /* OneSignalOutcomes.framework */; }; - DEA226F8261F74060092FF58 /* OneSignal.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DEA22668261E62690092FF58 /* OneSignal.framework */; }; - DEA226F9261F74060092FF58 /* OneSignal.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = DEA22668261E62690092FF58 /* OneSignal.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; + DEA4B4502888B01000E9FE12 /* OneSignalUser.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DEA4B44F2888B01000E9FE12 /* OneSignalUser.framework */; }; + DEA4B4512888B01000E9FE12 /* OneSignalUser.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = DEA4B44F2888B01000E9FE12 /* OneSignalUser.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; + DEBAAEBE2A43844700BF2C1C /* CoreLocation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DEBAAEBD2A43844700BF2C1C /* CoreLocation.framework */; }; + DEBAAEC02A43844E00BF2C1C /* OneSignalInAppMessages.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DEBAAEBF2A43844E00BF2C1C /* OneSignalInAppMessages.framework */; }; + DEBAAEC12A43844E00BF2C1C /* OneSignalInAppMessages.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = DEBAAEBF2A43844E00BF2C1C /* OneSignalInAppMessages.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; + DEBAAEC32A43845400BF2C1C /* OneSignalLocation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DEBAAEC22A43845400BF2C1C /* OneSignalLocation.framework */; }; + DEBAAEC42A43845400BF2C1C /* OneSignalLocation.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = DEBAAEC22A43845400BF2C1C /* OneSignalLocation.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; + DEC08AFD2947CE3000C81DA3 /* SwiftTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = DEC08AFC2947CE3000C81DA3 /* SwiftTest.swift */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -72,19 +96,19 @@ remoteGlobalIDString = 9150E7711E73BEDC00C5D46A; remoteInfo = OneSignalNotificationServiceExtension; }; - 9473515F291C4EDC000D91D3 /* PBXContainerItemProxy */ = { + 945C59EE296CF2A10097041D /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 9112E87A1E724C320022A1CB /* Project object */; proxyType = 1; - remoteGlobalIDString = 9473514C291C4ED9000D91D3; + remoteGlobalIDString = 945C59DB296CF2A00097041D; remoteInfo = OneSignalWidgetExtensionExtension; }; - DE68DA6E24C7695A00FC95A8 /* PBXContainerItemProxy */ = { + DE61E4862948117000CD12F1 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 9112E87A1E724C320022A1CB /* Project object */; proxyType = 1; remoteGlobalIDString = DE68DA5624C7695900FC95A8; - remoteInfo = OneSignalDevAppClip; + remoteInfo = OneSignalExampleClip; }; /* End PBXContainerItemProxy section */ @@ -96,29 +120,35 @@ dstSubfolderSpec = 13; files = ( 9150E77A1E73BEDD00C5D46A /* OneSignalNotificationServiceExtension.appex in Embed App Extensions */, - 94735161291C4EDC000D91D3 /* OneSignalWidgetExtensionExtension.appex in Embed App Extensions */, + 945C59F0296CF2A10097041D /* OneSignalWidgetExtensionExtension.appex in Embed App Extensions */, ); name = "Embed App Extensions"; runOnlyForDeploymentPostprocessing = 0; }; - DE68DA7124C7695A00FC95A8 /* Embed App Clips */ = { + DE61E4882948117000CD12F1 /* Embed App Clips */ = { isa = PBXCopyFilesBuildPhase; buildActionMask = 2147483647; dstPath = "$(CONTENTS_FOLDER_PATH)/AppClips"; dstSubfolderSpec = 16; files = ( - DE68DA7024C7695A00FC95A8 /* OneSignalExampleClip.app in Embed App Clips */, + DE61E4852948117000CD12F1 /* OneSignalExampleClip.app in Embed App Clips */, ); name = "Embed App Clips"; runOnlyForDeploymentPostprocessing = 0; }; - DE9717792756E6EF00FC409E /* Embed Frameworks */ = { + DE61E48C2948117A00CD12F1 /* Embed Frameworks */ = { isa = PBXCopyFilesBuildPhase; buildActionMask = 2147483647; dstPath = ""; dstSubfolderSpec = 10; files = ( - DE9717782756E6EF00FC409E /* OneSignal.framework in Embed Frameworks */, + DE61E4952948118500CD12F1 /* OneSignalNotifications.framework in Embed Frameworks */, + DE61E49E2948119100CD12F1 /* OneSignalUser.framework in Embed Frameworks */, + DE61E4922948118200CD12F1 /* OneSignalFramework.framework in Embed Frameworks */, + DE61E48B2948117A00CD12F1 /* OneSignalCore.framework in Embed Frameworks */, + DE61E48F2948117D00CD12F1 /* OneSignalExtension.framework in Embed Frameworks */, + DE61E49B2948118D00CD12F1 /* OneSignalOutcomes.framework in Embed Frameworks */, + DE61E4982948118900CD12F1 /* OneSignalOSCore.framework in Embed Frameworks */, ); name = "Embed Frameworks"; runOnlyForDeploymentPostprocessing = 0; @@ -129,10 +159,15 @@ dstPath = ""; dstSubfolderSpec = 10; files = ( + DEBAAEC12A43844E00BF2C1C /* OneSignalInAppMessages.framework in Embed Frameworks */, DE7D180827026BB5002D3A5D /* OneSignalCore.framework in Embed Frameworks */, + DEBAAEC42A43845400BF2C1C /* OneSignalLocation.framework in Embed Frameworks */, + DE61E484294810B900CD12F1 /* OneSignalFramework.framework in Embed Frameworks */, DE9717762756E6E100FC409E /* OneSignalExtension.framework in Embed Frameworks */, + DE12F3F8289B2B7F002F63AA /* OneSignalOSCore.framework in Embed Frameworks */, DE7D18C527038240002D3A5D /* OneSignalOutcomes.framework in Embed Frameworks */, - DEA226F9261F74060092FF58 /* OneSignal.framework in Embed Frameworks */, + DEA4B4512888B01000E9FE12 /* OneSignalUser.framework in Embed Frameworks */, + 3C448BA529381303002F96BC /* OneSignalNotifications.framework in Embed Frameworks */, ); name = "Embed Frameworks"; runOnlyForDeploymentPostprocessing = 0; @@ -141,6 +176,7 @@ /* Begin PBXFileReference section */ 03432CDB1EBD426A0071FC48 /* CoreLocation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreLocation.framework; path = System/Library/Frameworks/CoreLocation.framework; sourceTree = SDKROOT; }; + 3C448BA329381303002F96BC /* OneSignalNotifications.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = OneSignalNotifications.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 4529DEFD1FA921D900CEAB1D /* GoogleService-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "GoogleService-Info.plist"; sourceTree = ""; }; 454F94F71FAD49F300D74CCF /* OneSignalNotificationServiceExtension.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = OneSignalNotificationServiceExtension.entitlements; sourceTree = ""; }; 9112E8821E724C320022A1CB /* OneSignalExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = OneSignalExample.app; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -164,21 +200,30 @@ 9150E7821E73BFB600C5D46A /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; 91B6EA051E83215000B5CF01 /* UserNotifications.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UserNotifications.framework; path = System/Library/Frameworks/UserNotifications.framework; sourceTree = SDKROOT; }; 91B6EA091E834B1700B5CF01 /* sentImage.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = sentImage.jpg; sourceTree = ""; }; - 94735146291C4701000D91D3 /* OneSignalExample-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "OneSignalExample-Bridging-Header.h"; sourceTree = ""; }; - 94735147291C4702000D91D3 /* LiveActivityController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LiveActivityController.swift; sourceTree = ""; }; - 9473514D291C4ED9000D91D3 /* OneSignalWidgetExtensionExtension.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; includeInIndex = 0; path = OneSignalWidgetExtensionExtension.appex; sourceTree = BUILT_PRODUCTS_DIR; }; - 9473514E291C4ED9000D91D3 /* WidgetKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = WidgetKit.framework; path = System/Library/Frameworks/WidgetKit.framework; sourceTree = SDKROOT; }; - 94735150291C4ED9000D91D3 /* SwiftUI.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SwiftUI.framework; path = System/Library/Frameworks/SwiftUI.framework; sourceTree = SDKROOT; }; - 94735153291C4EDC000D91D3 /* OneSignalWidgetExtensionBundle.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OneSignalWidgetExtensionBundle.swift; sourceTree = ""; }; - 94735155291C4EDC000D91D3 /* OneSignalWidgetExtensionLiveActivity.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OneSignalWidgetExtensionLiveActivity.swift; sourceTree = ""; }; - 94735159291C4EDC000D91D3 /* OneSignalWidgetExtension.intentdefinition */ = {isa = PBXFileReference; lastKnownFileType = file.intentdefinition; path = OneSignalWidgetExtension.intentdefinition; sourceTree = ""; }; - 9473515A291C4EDC000D91D3 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; - 9473515C291C4EDC000D91D3 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 94735162291C4EE3000D91D3 /* OneSignalWidgetExtensionExtension.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = OneSignalWidgetExtensionExtension.entitlements; sourceTree = ""; }; + 945C59DC296CF2A00097041D /* OneSignalWidgetExtensionExtension.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; includeInIndex = 0; path = OneSignalWidgetExtensionExtension.appex; sourceTree = BUILT_PRODUCTS_DIR; }; + 945C59DD296CF2A00097041D /* WidgetKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = WidgetKit.framework; path = System/Library/Frameworks/WidgetKit.framework; sourceTree = SDKROOT; }; + 945C59DF296CF2A00097041D /* SwiftUI.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SwiftUI.framework; path = System/Library/Frameworks/SwiftUI.framework; sourceTree = SDKROOT; }; + 945C59E2296CF2A00097041D /* OneSignalWidgetExtensionBundle.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OneSignalWidgetExtensionBundle.swift; sourceTree = ""; }; + 945C59E4296CF2A00097041D /* OneSignalWidgetExtensionLiveActivity.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OneSignalWidgetExtensionLiveActivity.swift; sourceTree = ""; }; + 945C59E6296CF2A00097041D /* OneSignalWidgetExtension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OneSignalWidgetExtension.swift; sourceTree = ""; }; + 945C59E8296CF2A00097041D /* OneSignalWidgetExtension.intentdefinition */ = {isa = PBXFileReference; lastKnownFileType = file.intentdefinition; path = OneSignalWidgetExtension.intentdefinition; sourceTree = ""; }; + 945C59E9296CF2A10097041D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 945C59EB296CF2A10097041D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 945C59F1296CF2A20097041D /* OneSignalWidgetExtensionExtension.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = OneSignalWidgetExtensionExtension.entitlements; sourceTree = ""; }; + 945C59F5296CF30B0097041D /* LiveActivityController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LiveActivityController.swift; sourceTree = ""; }; CACBAAB5218A7136000ACAA5 /* WebKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = WebKit.framework; path = System/Library/Frameworks/WebKit.framework; sourceTree = SDKROOT; }; + DE12F3F6289B2B7F002F63AA /* OneSignalOSCore.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = OneSignalOSCore.framework; sourceTree = BUILT_PRODUCTS_DIR; }; DE138BFD2523CFA300AB46A3 /* libOneSignal.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; path = libOneSignal.a; sourceTree = BUILT_PRODUCTS_DIR; }; DE138BFF2523CFA700AB46A3 /* libOneSignal.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; path = libOneSignal.a; sourceTree = BUILT_PRODUCTS_DIR; }; DE138C012523CFAD00AB46A3 /* libOneSignal.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; path = libOneSignal.a; sourceTree = BUILT_PRODUCTS_DIR; }; + DE61E482294810B900CD12F1 /* OneSignalFramework.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = OneSignalFramework.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + DE61E4892948117A00CD12F1 /* OneSignalCore.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = OneSignalCore.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + DE61E48D2948117D00CD12F1 /* OneSignalExtension.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = OneSignalExtension.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + DE61E4902948118200CD12F1 /* OneSignalFramework.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = OneSignalFramework.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + DE61E4932948118500CD12F1 /* OneSignalNotifications.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = OneSignalNotifications.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + DE61E4962948118900CD12F1 /* OneSignalOSCore.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = OneSignalOSCore.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + DE61E4992948118C00CD12F1 /* OneSignalOutcomes.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = OneSignalOutcomes.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + DE61E49C2948119100CD12F1 /* OneSignalUser.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = OneSignalUser.framework; sourceTree = BUILT_PRODUCTS_DIR; }; DE68DA5724C7695900FC95A8 /* OneSignalExampleClip.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = OneSignalExampleClip.app; sourceTree = BUILT_PRODUCTS_DIR; }; DE68DA5924C7695900FC95A8 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; DE68DA5A24C7695900FC95A8 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; @@ -200,6 +245,14 @@ DEA22668261E62690092FF58 /* OneSignal.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = OneSignal.framework; sourceTree = BUILT_PRODUCTS_DIR; }; DEA2266A261E62780092FF58 /* OneSignal.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = OneSignal.framework; sourceTree = BUILT_PRODUCTS_DIR; }; DEA2266C261E627D0092FF58 /* OneSignal.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = OneSignal.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + DEA4B44F2888B01000E9FE12 /* OneSignalUser.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = OneSignalUser.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + DEBAAE1F2A4210FE00BF2C1C /* OneSignalLocation.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = OneSignalLocation.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + DEBAAEBA2A4383B200BF2C1C /* OneSignalInAppMessages.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = OneSignalInAppMessages.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + DEBAAEBD2A43844700BF2C1C /* CoreLocation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreLocation.framework; path = Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.3.sdk/System/Library/Frameworks/CoreLocation.framework; sourceTree = DEVELOPER_DIR; }; + DEBAAEBF2A43844E00BF2C1C /* OneSignalInAppMessages.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = OneSignalInAppMessages.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + DEBAAEC22A43845400BF2C1C /* OneSignalLocation.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = OneSignalLocation.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + DEC08AFC2947CE3000C81DA3 /* SwiftTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SwiftTest.swift; sourceTree = ""; }; + DEC08AFE2947CED000C81DA3 /* OneSignalExample-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "OneSignalExample-Bridging-Header.h"; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -208,12 +261,17 @@ buildActionMask = 2147483647; files = ( CACBAAB6218A7136000ACAA5 /* WebKit.framework in Frameworks */, + DEBAAEC32A43845400BF2C1C /* OneSignalLocation.framework in Frameworks */, + DEBAAEBE2A43844700BF2C1C /* CoreLocation.framework in Frameworks */, + DEA4B4502888B01000E9FE12 /* OneSignalUser.framework in Frameworks */, DE7D18C427038240002D3A5D /* OneSignalOutcomes.framework in Frameworks */, - 03432CDC1EBD426A0071FC48 /* CoreLocation.framework in Frameworks */, + DEBAAEC02A43844E00BF2C1C /* OneSignalInAppMessages.framework in Frameworks */, + DE12F3F7289B2B7F002F63AA /* OneSignalOSCore.framework in Frameworks */, 9112E8A71E724EE00022A1CB /* SystemConfiguration.framework in Frameworks */, - DEA226F8261F74060092FF58 /* OneSignal.framework in Frameworks */, DE9717752756E6E000FC409E /* OneSignalExtension.framework in Frameworks */, DE7D180727026BB5002D3A5D /* OneSignalCore.framework in Frameworks */, + DE61E483294810B900CD12F1 /* OneSignalFramework.framework in Frameworks */, + 3C448BA429381303002F96BC /* OneSignalNotifications.framework in Frameworks */, 4529DECC1FA7EAB800CEAB1D /* UserNotifications.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; @@ -232,12 +290,12 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - 9473514A291C4ED9000D91D3 /* Frameworks */ = { + 945C59D9296CF2A00097041D /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 94735151291C4ED9000D91D3 /* SwiftUI.framework in Frameworks */, - 9473514F291C4ED9000D91D3 /* WidgetKit.framework in Frameworks */, + 945C59E0296CF2A00097041D /* SwiftUI.framework in Frameworks */, + 945C59DE296CF2A00097041D /* WidgetKit.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -245,10 +303,16 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + DE61E48A2948117A00CD12F1 /* OneSignalCore.framework in Frameworks */, + DE61E4912948118200CD12F1 /* OneSignalFramework.framework in Frameworks */, + DE61E4972948118900CD12F1 /* OneSignalOSCore.framework in Frameworks */, + DE61E48E2948117D00CD12F1 /* OneSignalExtension.framework in Frameworks */, + DE61E49A2948118C00CD12F1 /* OneSignalOutcomes.framework in Frameworks */, + DE61E49D2948119100CD12F1 /* OneSignalUser.framework in Frameworks */, DE68DA7A24C76A1800FC95A8 /* WebKit.framework in Frameworks */, + DE61E4942948118500CD12F1 /* OneSignalNotifications.framework in Frameworks */, DE68DA7924C76A0300FC95A8 /* UserNotifications.framework in Frameworks */, DE68DA7724C769F200FC95A8 /* CoreLocation.framework in Frameworks */, - DE9717772756E6EF00FC409E /* OneSignal.framework in Frameworks */, DE68DA7824C769F900FC95A8 /* SystemConfiguration.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; @@ -259,12 +323,12 @@ 9112E8791E724C320022A1CB = { isa = PBXGroup; children = ( - 94735162291C4EE3000D91D3 /* OneSignalWidgetExtensionExtension.entitlements */, + 945C59F1296CF2A20097041D /* OneSignalWidgetExtensionExtension.entitlements */, 91B6EA091E834B1700B5CF01 /* sentImage.jpg */, 9112E8841E724C320022A1CB /* OneSignalDevApp */, 9150E7731E73BEDD00C5D46A /* OneSignalNotificationServiceExtension */, DE68DA5824C7695900FC95A8 /* OneSignalDevAppClip */, - 94735152291C4EDC000D91D3 /* OneSignalWidgetExtension */, + 945C59E1296CF2A00097041D /* OneSignalWidgetExtension */, 9112E8831E724C320022A1CB /* Products */, 9112E8A21E724DCA0022A1CB /* Frameworks */, ); @@ -276,7 +340,7 @@ 9112E8821E724C320022A1CB /* OneSignalExample.app */, 9150E7721E73BEDC00C5D46A /* OneSignalNotificationServiceExtension.appex */, DE68DA5724C7695900FC95A8 /* OneSignalExampleClip.app */, - 9473514D291C4ED9000D91D3 /* OneSignalWidgetExtensionExtension.appex */, + 945C59DC296CF2A00097041D /* OneSignalWidgetExtensionExtension.appex */, ); name = Products; sourceTree = ""; @@ -290,13 +354,14 @@ 9112E8891E724C320022A1CB /* AppDelegate.m */, 9112E88B1E724C320022A1CB /* ViewController.h */, 9112E88C1E724C320022A1CB /* ViewController.m */, - 94735147291C4702000D91D3 /* LiveActivityController.swift */, + 945C59F5296CF30B0097041D /* LiveActivityController.swift */, 9112E88E1E724C320022A1CB /* Main.storyboard */, 9112E8911E724C320022A1CB /* Assets.xcassets */, 9112E8931E724C320022A1CB /* LaunchScreen.storyboard */, 9112E8961E724C320022A1CB /* Info.plist */, 9112E8851E724C320022A1CB /* Supporting Files */, - 94735146291C4701000D91D3 /* OneSignalExample-Bridging-Header.h */, + DEC08AFC2947CE3000C81DA3 /* SwiftTest.swift */, + DEC08AFE2947CED000C81DA3 /* OneSignalExample-Bridging-Header.h */, ); path = OneSignalDevApp; sourceTree = ""; @@ -312,6 +377,22 @@ 9112E8A21E724DCA0022A1CB /* Frameworks */ = { isa = PBXGroup; children = ( + DEBAAEC22A43845400BF2C1C /* OneSignalLocation.framework */, + DEBAAEBF2A43844E00BF2C1C /* OneSignalInAppMessages.framework */, + DEBAAEBD2A43844700BF2C1C /* CoreLocation.framework */, + DEBAAEBA2A4383B200BF2C1C /* OneSignalInAppMessages.framework */, + DEBAAE1F2A4210FE00BF2C1C /* OneSignalLocation.framework */, + DE61E49C2948119100CD12F1 /* OneSignalUser.framework */, + DE61E4992948118C00CD12F1 /* OneSignalOutcomes.framework */, + DE61E4962948118900CD12F1 /* OneSignalOSCore.framework */, + DE61E4932948118500CD12F1 /* OneSignalNotifications.framework */, + DE61E4902948118200CD12F1 /* OneSignalFramework.framework */, + DE61E48D2948117D00CD12F1 /* OneSignalExtension.framework */, + DE61E4892948117A00CD12F1 /* OneSignalCore.framework */, + DE61E482294810B900CD12F1 /* OneSignalFramework.framework */, + 3C448BA329381303002F96BC /* OneSignalNotifications.framework */, + DE12F3F6289B2B7F002F63AA /* OneSignalOSCore.framework */, + DEA4B44F2888B01000E9FE12 /* OneSignalUser.framework */, DE7D18C327038240002D3A5D /* OneSignalOutcomes.framework */, DE7D181D27026C02002D3A5D /* OneSignalExtension.framework */, DE7D180C27026BCC002D3A5D /* OneSignalExtension.framework */, @@ -330,8 +411,8 @@ 9150E77F1E73BF5B00C5D46A /* OneSignal.framework */, 9112E8A61E724EE00022A1CB /* SystemConfiguration.framework */, 9112E8A31E724DCB0022A1CB /* libOneSignal.a */, - 9473514E291C4ED9000D91D3 /* WidgetKit.framework */, - 94735150291C4ED9000D91D3 /* SwiftUI.framework */, + 945C59DD296CF2A00097041D /* WidgetKit.framework */, + 945C59DF296CF2A00097041D /* SwiftUI.framework */, ); name = Frameworks; sourceTree = ""; @@ -347,14 +428,15 @@ path = OneSignalNotificationServiceExtension; sourceTree = ""; }; - 94735152291C4EDC000D91D3 /* OneSignalWidgetExtension */ = { + 945C59E1296CF2A00097041D /* OneSignalWidgetExtension */ = { isa = PBXGroup; children = ( - 94735153291C4EDC000D91D3 /* OneSignalWidgetExtensionBundle.swift */, - 94735155291C4EDC000D91D3 /* OneSignalWidgetExtensionLiveActivity.swift */, - 94735159291C4EDC000D91D3 /* OneSignalWidgetExtension.intentdefinition */, - 9473515A291C4EDC000D91D3 /* Assets.xcassets */, - 9473515C291C4EDC000D91D3 /* Info.plist */, + 945C59E2296CF2A00097041D /* OneSignalWidgetExtensionBundle.swift */, + 945C59E4296CF2A00097041D /* OneSignalWidgetExtensionLiveActivity.swift */, + 945C59E6296CF2A00097041D /* OneSignalWidgetExtension.swift */, + 945C59E8296CF2A00097041D /* OneSignalWidgetExtension.intentdefinition */, + 945C59E9296CF2A10097041D /* Assets.xcassets */, + 945C59EB296CF2A10097041D /* Info.plist */, ); path = OneSignalWidgetExtension; sourceTree = ""; @@ -389,15 +471,15 @@ 9112E87F1E724C320022A1CB /* Frameworks */, 9112E8801E724C320022A1CB /* Resources */, 9150E77E1E73BEDD00C5D46A /* Embed App Extensions */, - DE68DA7124C7695A00FC95A8 /* Embed App Clips */, DEA226FA261F74060092FF58 /* Embed Frameworks */, + DE61E4882948117000CD12F1 /* Embed App Clips */, ); buildRules = ( ); dependencies = ( 9150E7791E73BEDD00C5D46A /* PBXTargetDependency */, - DE68DA6F24C7695A00FC95A8 /* PBXTargetDependency */, - 94735160291C4EDC000D91D3 /* PBXTargetDependency */, + DE61E4872948117000CD12F1 /* PBXTargetDependency */, + 945C59EF296CF2A10097041D /* PBXTargetDependency */, ); name = OneSignalExample; packageProductDependencies = ( @@ -425,13 +507,13 @@ productReference = 9150E7721E73BEDC00C5D46A /* OneSignalNotificationServiceExtension.appex */; productType = "com.apple.product-type.app-extension"; }; - 9473514C291C4ED9000D91D3 /* OneSignalWidgetExtensionExtension */ = { + 945C59DB296CF2A00097041D /* OneSignalWidgetExtensionExtension */ = { isa = PBXNativeTarget; - buildConfigurationList = 94735163291C4EED000D91D3 /* Build configuration list for PBXNativeTarget "OneSignalWidgetExtensionExtension" */; + buildConfigurationList = 945C59F4296CF2A20097041D /* Build configuration list for PBXNativeTarget "OneSignalWidgetExtensionExtension" */; buildPhases = ( - 94735149291C4ED9000D91D3 /* Sources */, - 9473514A291C4ED9000D91D3 /* Frameworks */, - 9473514B291C4ED9000D91D3 /* Resources */, + 945C59D8296CF2A00097041D /* Sources */, + 945C59D9296CF2A00097041D /* Frameworks */, + 945C59DA296CF2A00097041D /* Resources */, ); buildRules = ( ); @@ -439,7 +521,7 @@ ); name = OneSignalWidgetExtensionExtension; productName = OneSignalWidgetExtensionExtension; - productReference = 9473514D291C4ED9000D91D3 /* OneSignalWidgetExtensionExtension.appex */; + productReference = 945C59DC296CF2A00097041D /* OneSignalWidgetExtensionExtension.appex */; productType = "com.apple.product-type.app-extension"; }; DE68DA5624C7695900FC95A8 /* OneSignalExampleClip */ = { @@ -449,7 +531,7 @@ DE68DA5324C7695900FC95A8 /* Sources */, DE68DA5424C7695900FC95A8 /* Frameworks */, DE68DA5524C7695900FC95A8 /* Resources */, - DE9717792756E6EF00FC409E /* Embed Frameworks */, + DE61E48C2948117A00CD12F1 /* Embed Frameworks */, ); buildRules = ( ); @@ -475,7 +557,7 @@ 9112E8811E724C320022A1CB = { CreatedOnToolsVersion = 8.2.1; DevelopmentTeam = 99SW8E36CT; - LastSwiftMigration = 1410; + LastSwiftMigration = 1320; ProvisioningStyle = Automatic; SystemCapabilities = { com.apple.ApplicationGroups.iOS = { @@ -499,7 +581,7 @@ }; }; }; - 9473514C291C4ED9000D91D3 = { + 945C59DB296CF2A00097041D = { CreatedOnToolsVersion = 14.1; }; DE68DA5624C7695900FC95A8 = { @@ -526,7 +608,7 @@ 9112E8811E724C320022A1CB /* OneSignalExample */, 9150E7711E73BEDC00C5D46A /* OneSignalNotificationServiceExtension */, DE68DA5624C7695900FC95A8 /* OneSignalExampleClip */, - 9473514C291C4ED9000D91D3 /* OneSignalWidgetExtensionExtension */, + 945C59DB296CF2A00097041D /* OneSignalWidgetExtensionExtension */, ); }; /* End PBXProject section */ @@ -553,11 +635,11 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - 9473514B291C4ED9000D91D3 /* Resources */ = { + 945C59DA296CF2A00097041D /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( - 9473515B291C4EDC000D91D3 /* Assets.xcassets in Resources */, + 945C59EA296CF2A10097041D /* Assets.xcassets in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -578,11 +660,12 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 94735148291C4702000D91D3 /* LiveActivityController.swift in Sources */, 9112E88D1E724C320022A1CB /* ViewController.m in Sources */, 9112E88A1E724C320022A1CB /* AppDelegate.m in Sources */, + 945C59F6296CF30B0097041D /* LiveActivityController.swift in Sources */, 9112E8871E724C320022A1CB /* main.m in Sources */, - 9473515E291C4EDC000D91D3 /* OneSignalWidgetExtension.intentdefinition in Sources */, + DEC08AFD2947CE3000C81DA3 /* SwiftTest.swift in Sources */, + 945C59ED296CF2A10097041D /* OneSignalWidgetExtension.intentdefinition in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -594,14 +677,15 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - 94735149291C4ED9000D91D3 /* Sources */ = { + 945C59D8296CF2A00097041D /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 94735154291C4EDC000D91D3 /* OneSignalWidgetExtensionBundle.swift in Sources */, - 94735156291C4EDC000D91D3 /* OneSignalWidgetExtensionLiveActivity.swift in Sources */, - 94735169291C5A68000D91D3 /* LiveActivityController.swift in Sources */, - 9473515D291C4EDC000D91D3 /* OneSignalWidgetExtension.intentdefinition in Sources */, + 945C59E7296CF2A00097041D /* OneSignalWidgetExtension.swift in Sources */, + 945C59E3296CF2A00097041D /* OneSignalWidgetExtensionBundle.swift in Sources */, + 945C59E5296CF2A00097041D /* OneSignalWidgetExtensionLiveActivity.swift in Sources */, + 945C59F7296CF3160097041D /* LiveActivityController.swift in Sources */, + 945C59EC296CF2A10097041D /* OneSignalWidgetExtension.intentdefinition in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -624,15 +708,16 @@ target = 9150E7711E73BEDC00C5D46A /* OneSignalNotificationServiceExtension */; targetProxy = 9150E7781E73BEDD00C5D46A /* PBXContainerItemProxy */; }; - 94735160291C4EDC000D91D3 /* PBXTargetDependency */ = { + 945C59EF296CF2A10097041D /* PBXTargetDependency */ = { isa = PBXTargetDependency; - target = 9473514C291C4ED9000D91D3 /* OneSignalWidgetExtensionExtension */; - targetProxy = 9473515F291C4EDC000D91D3 /* PBXContainerItemProxy */; + target = 945C59DB296CF2A00097041D /* OneSignalWidgetExtensionExtension */; + targetProxy = 945C59EE296CF2A10097041D /* PBXContainerItemProxy */; }; - DE68DA6F24C7695A00FC95A8 /* PBXTargetDependency */ = { + DE61E4872948117000CD12F1 /* PBXTargetDependency */ = { isa = PBXTargetDependency; + platformFilter = ios; target = DE68DA5624C7695900FC95A8 /* OneSignalExampleClip */; - targetProxy = DE68DA6E24C7695A00FC95A8 /* PBXContainerItemProxy */; + targetProxy = DE61E4862948117000CD12F1 /* PBXContainerItemProxy */; }; /* End PBXTargetDependency section */ @@ -712,7 +797,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 10.2; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; PRODUCT_NAME = OneSignalExample; @@ -755,7 +840,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 10.2; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; MTL_ENABLE_DEBUG_INFO = NO; PRODUCT_NAME = OneSignalExample; SDKROOT = iphoneos; @@ -780,7 +865,7 @@ "$(PROJECT_DIR)", ); INFOPLIST_FILE = OneSignalDevApp/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -812,7 +897,7 @@ "$(PROJECT_DIR)", ); INFOPLIST_FILE = OneSignalDevApp/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -882,7 +967,7 @@ }; name = Release; }; - 94735164291C4EED000D91D3 /* Debug */ = { + 945C59F2296CF2A20097041D /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; @@ -908,7 +993,7 @@ GENERATE_INFOPLIST_FILE = YES; INFOPLIST_FILE = OneSignalWidgetExtension/Info.plist; INFOPLIST_KEY_CFBundleDisplayName = OneSignalWidgetExtension; - INFOPLIST_KEY_NSHumanReadableCopyright = "Copyright © 2022 OneSignal. All rights reserved."; + INFOPLIST_KEY_NSHumanReadableCopyright = "Copyright © 2023 OneSignal. All rights reserved."; IPHONEOS_DEPLOYMENT_TARGET = 16.1; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", @@ -930,7 +1015,7 @@ }; name = Debug; }; - 94735165291C4EED000D91D3 /* Debug 64 bit */ = { + 945C59F3296CF2A20097041D /* Release */ = { isa = XCBuildConfiguration; buildSettings = { ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; @@ -956,55 +1041,7 @@ GENERATE_INFOPLIST_FILE = YES; INFOPLIST_FILE = OneSignalWidgetExtension/Info.plist; INFOPLIST_KEY_CFBundleDisplayName = OneSignalWidgetExtension; - INFOPLIST_KEY_NSHumanReadableCopyright = "Copyright © 2022 OneSignal. All rights reserved."; - IPHONEOS_DEPLOYMENT_TARGET = 16.1; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - "@executable_path/../../Frameworks", - ); - MARKETING_VERSION = 1.0; - MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; - MTL_FAST_MATH = YES; - PRODUCT_BUNDLE_IDENTIFIER = com.onesignal.example.OneSignalWidgetExtension; - PRODUCT_NAME = "$(TARGET_NAME)"; - SKIP_INSTALL = YES; - SUPPORTS_MACCATALYST = YES; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; - SWIFT_EMIT_LOC_STRINGS = YES; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = "Debug 64 bit"; - }; - 94735166291C4EED000D91D3 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; - ASSETCATALOG_COMPILER_WIDGET_BACKGROUND_COLOR_NAME = WidgetBackground; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; - CLANG_ENABLE_OBJC_WEAK = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CODE_SIGN_ENTITLEMENTS = OneSignalWidgetExtensionExtension.entitlements; - CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 1; - DEVELOPMENT_TEAM = 99SW8E36CT; - GCC_C_LANGUAGE_STANDARD = gnu11; - GENERATE_INFOPLIST_FILE = YES; - INFOPLIST_FILE = OneSignalWidgetExtension/Info.plist; - INFOPLIST_KEY_CFBundleDisplayName = OneSignalWidgetExtension; - INFOPLIST_KEY_NSHumanReadableCopyright = "Copyright © 2022 OneSignal. All rights reserved."; + INFOPLIST_KEY_NSHumanReadableCopyright = "Copyright © 2023 OneSignal. All rights reserved."; IPHONEOS_DEPLOYMENT_TARGET = 16.1; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", @@ -1025,53 +1062,6 @@ }; name = Release; }; - 94735167291C4EED000D91D3 /* Release 64 bit */ = { - isa = XCBuildConfiguration; - buildSettings = { - ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; - ASSETCATALOG_COMPILER_WIDGET_BACKGROUND_COLOR_NAME = WidgetBackground; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; - CLANG_ENABLE_OBJC_WEAK = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CODE_SIGN_ENTITLEMENTS = OneSignalWidgetExtensionExtension.entitlements; - CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 1; - DEVELOPMENT_TEAM = 99SW8E36CT; - GCC_C_LANGUAGE_STANDARD = gnu11; - GENERATE_INFOPLIST_FILE = YES; - INFOPLIST_FILE = OneSignalWidgetExtension/Info.plist; - INFOPLIST_KEY_CFBundleDisplayName = OneSignalWidgetExtension; - INFOPLIST_KEY_NSHumanReadableCopyright = "Copyright © 2022 OneSignal. All rights reserved."; - IPHONEOS_DEPLOYMENT_TARGET = 16.1; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - "@executable_path/../../Frameworks", - ); - MARKETING_VERSION = 1.0; - MTL_FAST_MATH = YES; - PRODUCT_BUNDLE_IDENTIFIER = com.onesignal.example.OneSignalWidgetExtension; - PRODUCT_NAME = "$(TARGET_NAME)"; - SKIP_INSTALL = YES; - SUPPORTS_MACCATALYST = YES; - SWIFT_COMPILATION_MODE = wholemodule; - SWIFT_EMIT_LOC_STRINGS = YES; - SWIFT_OPTIMIZATION_LEVEL = "-O"; - SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = "Release 64 bit"; - }; DE68DA7224C7695A00FC95A8 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { @@ -1154,298 +1144,6 @@ }; name = Release; }; - DEDFF33B2901E4BD00D4E275 /* Release 64 bit */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 10.2; - MTL_ENABLE_DEBUG_INFO = NO; - PRODUCT_NAME = OneSignalExample; - SDKROOT = iphoneos; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - }; - name = "Release 64 bit"; - }; - DEDFF33C2901E4BD00D4E275 /* Release 64 bit */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_ENABLE_MODULES = YES; - CODE_SIGN_ENTITLEMENTS = OneSignalDevApp/OneSignalDevApp.entitlements; - CURRENT_PROJECT_VERSION = 1.4.4; - DERIVE_MACCATALYST_PRODUCT_BUNDLE_IDENTIFIER = YES; - DEVELOPMENT_TEAM = 99SW8E36CT; - "DYLIB_INSTALL_NAME_BASE[arch=*]" = "@rpath"; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)", - ); - INFOPLIST_FILE = OneSignalDevApp/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - ); - MARKETING_VERSION = 1.4.4; - OTHER_LDFLAGS = "-ObjC"; - PRODUCT_BUNDLE_IDENTIFIER = com.onesignal.example; - PRODUCT_NAME = OneSignalExample; - SUPPORTS_MACCATALYST = YES; - SWIFT_OBJC_BRIDGING_HEADER = "OneSignalDevApp/OneSignalExample-Bridging-Header.h"; - SWIFT_VERSION = 5.0; - }; - name = "Release 64 bit"; - }; - DEDFF33D2901E4BD00D4E275 /* Release 64 bit */ = { - isa = XCBuildConfiguration; - buildSettings = { - CLANG_WARN_STRICT_PROTOTYPES = NO; - CODE_SIGN_ENTITLEMENTS = OneSignalNotificationServiceExtension/OneSignalNotificationServiceExtension.entitlements; - CURRENT_PROJECT_VERSION = 1.4.4; - DERIVE_MACCATALYST_PRODUCT_BUNDLE_IDENTIFIER = YES; - DEVELOPMENT_TEAM = 99SW8E36CT; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)", - ); - GCC_OPTIMIZATION_LEVEL = 0; - INFOPLIST_FILE = OneSignalNotificationServiceExtension/Info.plist; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - "@executable_path/../../Frameworks", - ); - MARKETING_VERSION = 1.4.4; - OTHER_LDFLAGS = "-ObjC"; - PRODUCT_BUNDLE_IDENTIFIER = com.onesignal.example.OneSignalNotificationServiceExtensionA; - PRODUCT_NAME = "$(TARGET_NAME)"; - SKIP_INSTALL = YES; - SUPPORTS_MACCATALYST = YES; - }; - name = "Release 64 bit"; - }; - DEDFF33E2901E4BD00D4E275 /* Release 64 bit */ = { - isa = XCBuildConfiguration; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; - CLANG_ENABLE_OBJC_WEAK = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CODE_SIGN_ENTITLEMENTS = OneSignalDevAppClip/OneSignalDevAppClip.entitlements; - CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 1.4.4; - DEVELOPMENT_TEAM = 99SW8E36CT; - GCC_C_LANGUAGE_STANDARD = gnu11; - GCC_PREPROCESSOR_DEFINITIONS = OS_APP_CLIP; - INFOPLIST_FILE = OneSignalDevAppClip/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 14.0; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - ); - MARKETING_VERSION = 1.4.4; - MTL_FAST_MATH = YES; - PRODUCT_BUNDLE_IDENTIFIER = com.onesignal.example.Clip; - PRODUCT_NAME = OneSignalExampleClip; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = "Release 64 bit"; - }; - DEFF653E2901DDF900EF7E06 /* Debug 64 bit */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 10.2; - MTL_ENABLE_DEBUG_INFO = YES; - ONLY_ACTIVE_ARCH = YES; - PRODUCT_NAME = OneSignalExample; - SDKROOT = iphoneos; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = "Debug 64 bit"; - }; - DEFF653F2901DDF900EF7E06 /* Debug 64 bit */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_ENABLE_MODULES = YES; - CODE_SIGN_ENTITLEMENTS = OneSignalDevApp/OneSignalDevApp.entitlements; - CURRENT_PROJECT_VERSION = 1.4.4; - DERIVE_MACCATALYST_PRODUCT_BUNDLE_IDENTIFIER = YES; - DEVELOPMENT_TEAM = 99SW8E36CT; - "DYLIB_INSTALL_NAME_BASE[arch=*]" = "@rpath"; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)", - ); - INFOPLIST_FILE = OneSignalDevApp/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - ); - MARKETING_VERSION = 1.4.4; - OTHER_LDFLAGS = "-ObjC"; - PRODUCT_BUNDLE_IDENTIFIER = com.onesignal.example; - PRODUCT_NAME = OneSignalExample; - SUPPORTS_MACCATALYST = YES; - SWIFT_OBJC_BRIDGING_HEADER = "OneSignalDevApp/OneSignalExample-Bridging-Header.h"; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 5.0; - }; - name = "Debug 64 bit"; - }; - DEFF65402901DDF900EF7E06 /* Debug 64 bit */ = { - isa = XCBuildConfiguration; - buildSettings = { - CLANG_WARN_STRICT_PROTOTYPES = NO; - CODE_SIGN_ENTITLEMENTS = OneSignalNotificationServiceExtension/OneSignalNotificationServiceExtension.entitlements; - CURRENT_PROJECT_VERSION = 1.4.4; - DERIVE_MACCATALYST_PRODUCT_BUNDLE_IDENTIFIER = YES; - DEVELOPMENT_TEAM = 99SW8E36CT; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)", - ); - INFOPLIST_FILE = OneSignalNotificationServiceExtension/Info.plist; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - "@executable_path/../../Frameworks", - ); - MARKETING_VERSION = 1.4.4; - OTHER_LDFLAGS = "-ObjC"; - PRODUCT_BUNDLE_IDENTIFIER = com.onesignal.example.OneSignalNotificationServiceExtensionA; - PRODUCT_NAME = "$(TARGET_NAME)"; - SKIP_INSTALL = YES; - SUPPORTS_MACCATALYST = YES; - }; - name = "Debug 64 bit"; - }; - DEFF65412901DDF900EF7E06 /* Debug 64 bit */ = { - isa = XCBuildConfiguration; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; - CLANG_ENABLE_OBJC_WEAK = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CODE_SIGN_ENTITLEMENTS = OneSignalDevAppClip/OneSignalDevAppClip.entitlements; - CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 1.4.4; - DEVELOPMENT_TEAM = 99SW8E36CT; - "DYLIB_INSTALL_NAME_BASE[arch=*]" = "@rpath"; - GCC_C_LANGUAGE_STANDARD = gnu11; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - OS_APP_CLIP, - ); - INFOPLIST_FILE = OneSignalDevAppClip/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 14.0; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - ); - MARKETING_VERSION = 1.4.4; - MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; - MTL_FAST_MATH = YES; - PRODUCT_BUNDLE_IDENTIFIER = com.onesignal.example.Clip; - PRODUCT_NAME = OneSignalExampleClip; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = "Debug 64 bit"; - }; /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ @@ -1453,9 +1151,7 @@ isa = XCConfigurationList; buildConfigurations = ( 9112E8971E724C320022A1CB /* Debug */, - DEFF653E2901DDF900EF7E06 /* Debug 64 bit */, 9112E8981E724C320022A1CB /* Release */, - DEDFF33B2901E4BD00D4E275 /* Release 64 bit */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; @@ -1464,9 +1160,7 @@ isa = XCConfigurationList; buildConfigurations = ( 9112E89A1E724C320022A1CB /* Debug */, - DEFF653F2901DDF900EF7E06 /* Debug 64 bit */, 9112E89B1E724C320022A1CB /* Release */, - DEDFF33C2901E4BD00D4E275 /* Release 64 bit */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; @@ -1475,20 +1169,16 @@ isa = XCConfigurationList; buildConfigurations = ( 9150E77B1E73BEDD00C5D46A /* Debug */, - DEFF65402901DDF900EF7E06 /* Debug 64 bit */, 9150E77C1E73BEDD00C5D46A /* Release */, - DEDFF33D2901E4BD00D4E275 /* Release 64 bit */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 94735163291C4EED000D91D3 /* Build configuration list for PBXNativeTarget "OneSignalWidgetExtensionExtension" */ = { + 945C59F4296CF2A20097041D /* Build configuration list for PBXNativeTarget "OneSignalWidgetExtensionExtension" */ = { isa = XCConfigurationList; buildConfigurations = ( - 94735164291C4EED000D91D3 /* Debug */, - 94735165291C4EED000D91D3 /* Debug 64 bit */, - 94735166291C4EED000D91D3 /* Release */, - 94735167291C4EED000D91D3 /* Release 64 bit */, + 945C59F2296CF2A20097041D /* Debug */, + 945C59F3296CF2A20097041D /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; @@ -1497,9 +1187,7 @@ isa = XCConfigurationList; buildConfigurations = ( DE68DA7224C7695A00FC95A8 /* Debug */, - DEFF65412901DDF900EF7E06 /* Debug 64 bit */, DE68DA7324C7695A00FC95A8 /* Release */, - DEDFF33E2901E4BD00D4E275 /* Release 64 bit */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; diff --git a/iOS_SDK/OneSignalDevApp/OneSignalExample.xcodeproj/xcshareddata/xcschemes/OneSignalExample.xcscheme b/iOS_SDK/OneSignalDevApp/OneSignalExample.xcodeproj/xcshareddata/xcschemes/OneSignalExample.xcscheme index 3ba1b44ae..0cd70f0fa 100644 --- a/iOS_SDK/OneSignalDevApp/OneSignalExample.xcodeproj/xcshareddata/xcschemes/OneSignalExample.xcscheme +++ b/iOS_SDK/OneSignalDevApp/OneSignalExample.xcodeproj/xcshareddata/xcschemes/OneSignalExample.xcscheme @@ -1,7 +1,7 @@ + LastUpgradeVersion = "1410" + version = "1.3"> @@ -20,50 +20,18 @@ ReferencedContainer = "container:OneSignalExample.xcodeproj"> - - - - - - - - + shouldUseLaunchSchemeArgsEnv = "YES"> - - - - - - - - - - - - - - + buildConfiguration = "Debug"> diff --git a/iOS_SDK/OneSignalDevApp/OneSignalWidgetExtension/Assets.xcassets/AppIcon.appiconset/Contents.json b/iOS_SDK/OneSignalDevApp/OneSignalWidgetExtension/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 000000000..13613e3ee --- /dev/null +++ b/iOS_SDK/OneSignalDevApp/OneSignalWidgetExtension/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,13 @@ +{ + "images" : [ + { + "idiom" : "universal", + "platform" : "ios", + "size" : "1024x1024" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/iOS_SDK/OneSignalDevApp/OneSignalWidgetExtension/Info.plist b/iOS_SDK/OneSignalDevApp/OneSignalWidgetExtension/Info.plist index 04f07b5f9..0f118fb75 100644 --- a/iOS_SDK/OneSignalDevApp/OneSignalWidgetExtension/Info.plist +++ b/iOS_SDK/OneSignalDevApp/OneSignalWidgetExtension/Info.plist @@ -2,8 +2,6 @@ - NSSupportsLiveActivities - NSExtension NSExtensionPointIdentifier diff --git a/iOS_SDK/OneSignalDevApp/OneSignalWidgetExtension/OneSignalWidgetExtension.swift b/iOS_SDK/OneSignalDevApp/OneSignalWidgetExtension/OneSignalWidgetExtension.swift new file mode 100644 index 000000000..5da0476d0 --- /dev/null +++ b/iOS_SDK/OneSignalDevApp/OneSignalWidgetExtension/OneSignalWidgetExtension.swift @@ -0,0 +1,88 @@ +/** + * Modified MIT License + * + * Copyright 2023 OneSignal + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * 1. The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * 2. All copies of substantial portions of the Software may only be used in connection + * with services provided by OneSignal. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +import WidgetKit +import SwiftUI +import Intents + +struct Provider: IntentTimelineProvider { + func placeholder(in context: Context) -> SimpleEntry { + SimpleEntry(date: Date(), configuration: ConfigurationIntent()) + } + + func getSnapshot(for configuration: ConfigurationIntent, in context: Context, completion: @escaping (SimpleEntry) -> Void) { + let entry = SimpleEntry(date: Date(), configuration: configuration) + completion(entry) + } + + func getTimeline(for configuration: ConfigurationIntent, in context: Context, completion: @escaping (Timeline) -> Void) { + var entries: [SimpleEntry] = [] + + // Generate a timeline consisting of five entries an hour apart, starting from the current date. + let currentDate = Date() + for hourOffset in 0 ..< 5 { + let entryDate = Calendar.current.date(byAdding: .hour, value: hourOffset, to: currentDate)! + let entry = SimpleEntry(date: entryDate, configuration: configuration) + entries.append(entry) + } + + let timeline = Timeline(entries: entries, policy: .atEnd) + completion(timeline) + } +} + +struct SimpleEntry: TimelineEntry { + let date: Date + let configuration: ConfigurationIntent +} + +struct OneSignalWidgetExtensionEntryView: View { + var entry: Provider.Entry + + var body: some View { + Text(entry.date, style: .time) + } +} + +struct OneSignalWidgetExtension: Widget { + let kind: String = "OneSignalWidgetExtension" + + var body: some WidgetConfiguration { + IntentConfiguration(kind: kind, intent: ConfigurationIntent.self, provider: Provider()) { entry in + OneSignalWidgetExtensionEntryView(entry: entry) + } + .configurationDisplayName("My Widget") + .description("This is an example widget.") + } +} + +struct OneSignalWidgetExtension_Previews: PreviewProvider { + static var previews: some View { + OneSignalWidgetExtensionEntryView(entry: SimpleEntry(date: Date(), configuration: ConfigurationIntent())) + .previewContext(WidgetPreviewContext(family: .systemSmall)) + } +} diff --git a/iOS_SDK/OneSignalDevApp/OneSignalWidgetExtension/OneSignalWidgetExtensionBundle.swift b/iOS_SDK/OneSignalDevApp/OneSignalWidgetExtension/OneSignalWidgetExtensionBundle.swift index 7e77db09c..cbbd78431 100644 --- a/iOS_SDK/OneSignalDevApp/OneSignalWidgetExtension/OneSignalWidgetExtensionBundle.swift +++ b/iOS_SDK/OneSignalDevApp/OneSignalWidgetExtension/OneSignalWidgetExtensionBundle.swift @@ -1,10 +1,29 @@ -// -// OneSignalWidgetExtensionBundle.swift -// OneSignalWidgetExtension -// -// Created by Henry Boswell on 11/9/22. -// Copyright © 2022 OneSignal. All rights reserved. -// +/** + * Modified MIT License + * + * Copyright 2023 OneSignal + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * 1. The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * 2. All copies of substantial portions of the Software may only be used in connection + * with services provided by OneSignal. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ import WidgetKit import SwiftUI diff --git a/iOS_SDK/OneSignalDevApp/OneSignalWidgetExtension/OneSignalWidgetExtensionLiveActivity.swift b/iOS_SDK/OneSignalDevApp/OneSignalWidgetExtension/OneSignalWidgetExtensionLiveActivity.swift index ed313c138..6df671885 100644 --- a/iOS_SDK/OneSignalDevApp/OneSignalWidgetExtension/OneSignalWidgetExtensionLiveActivity.swift +++ b/iOS_SDK/OneSignalDevApp/OneSignalWidgetExtension/OneSignalWidgetExtensionLiveActivity.swift @@ -1,16 +1,34 @@ -// -// OneSignalWidgetExtensionLiveActivity.swift -// OneSignalWidgetExtension -// -// Created by Henry Boswell on 11/9/22. -// Copyright © 2022 OneSignal. All rights reserved. -// +/** + * Modified MIT License + * + * Copyright 2023 OneSignal + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * 1. The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * 2. All copies of substantial portions of the Software may only be used in connection + * with services provided by OneSignal. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ import ActivityKit import WidgetKit import SwiftUI - struct OneSignalWidgetExtensionLiveActivity: Widget { var body: some WidgetConfiguration { ActivityConfiguration(for: OneSignalWidgetAttributes.self) { context in @@ -35,7 +53,7 @@ struct OneSignalWidgetExtensionLiveActivity: Widget { } .activitySystemActionForegroundColor(.black) .activityBackgroundTint(.white) - } dynamicIsland: { context in + } dynamicIsland: { _ in DynamicIsland { // Expanded UI goes here. Compose the expanded UI through // various regions, like leading/trailing/center/bottom diff --git a/iOS_SDK/OneSignalSDK/OneSignal.xcodeproj/project.pbxproj b/iOS_SDK/OneSignalSDK/OneSignal.xcodeproj/project.pbxproj index 8b66fd113..bdaa71f4a 100644 --- a/iOS_SDK/OneSignalSDK/OneSignal.xcodeproj/project.pbxproj +++ b/iOS_SDK/OneSignalSDK/OneSignal.xcodeproj/project.pbxproj @@ -50,12 +50,57 @@ 03CCCC7E2835D8CC004BF794 /* OneSignalUNUserNotificationCenterSwizzlingTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 03CCCC7D2835D8CC004BF794 /* OneSignalUNUserNotificationCenterSwizzlingTest.m */; }; 03CCCC832835D90F004BF794 /* OneSignalUNUserNotificationCenterHelper.m in Sources */ = {isa = PBXBuildFile; fileRef = 03CCCC812835D90F004BF794 /* OneSignalUNUserNotificationCenterHelper.m */; }; 03CCCC852835F291004BF794 /* UIApplicationDelegateSwizzlingTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 03CCCC842835F291004BF794 /* UIApplicationDelegateSwizzlingTests.m */; }; - 03CCCC8D283624F3004BF794 /* SwizzlingForwarder.h in Headers */ = {isa = PBXBuildFile; fileRef = 03CCCC8B283624F3004BF794 /* SwizzlingForwarder.h */; }; - 03CCCC8E283624F3004BF794 /* SwizzlingForwarder.m in Sources */ = {isa = PBXBuildFile; fileRef = 03CCCC8C283624F3004BF794 /* SwizzlingForwarder.m */; }; - 03CCCC8F283624F3004BF794 /* SwizzlingForwarder.m in Sources */ = {isa = PBXBuildFile; fileRef = 03CCCC8C283624F3004BF794 /* SwizzlingForwarder.m */; }; 03E56DD328405F4A006AA1DA /* OneSignalAppDelegateOverrider.m in Sources */ = {isa = PBXBuildFile; fileRef = 03E56DD228405F4A006AA1DA /* OneSignalAppDelegateOverrider.m */; }; 16664C4C25DDB195003B8A14 /* NSTimeZoneOverrider.m in Sources */ = {isa = PBXBuildFile; fileRef = 16664C4B25DDB195003B8A14 /* NSTimeZoneOverrider.m */; }; 37E6B2BB19D9CAF300D0C601 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 37E6B2BA19D9CAF300D0C601 /* UIKit.framework */; settings = {ATTRIBUTES = (Weak, ); }; }; + 3C0EF49E28A1DBCB00E5434B /* OSUserInternalImpl.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3C0EF49D28A1DBCB00E5434B /* OSUserInternalImpl.swift */; }; + 3C115165289A259500565C41 /* OneSignalOSCore.docc in Sources */ = {isa = PBXBuildFile; fileRef = 3C115164289A259500565C41 /* OneSignalOSCore.docc */; }; + 3C115171289A259500565C41 /* OneSignalOSCore.h in Headers */ = {isa = PBXBuildFile; fileRef = 3C115163289A259500565C41 /* OneSignalOSCore.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 3C115185289ADE4F00565C41 /* OSModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3C115184289ADE4F00565C41 /* OSModel.swift */; }; + 3C115187289ADE7700565C41 /* OSModelStoreListener.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3C115186289ADE7700565C41 /* OSModelStoreListener.swift */; }; + 3C115189289ADEA300565C41 /* OSModelStore.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3C115188289ADEA300565C41 /* OSModelStore.swift */; }; + 3C11518B289ADEEB00565C41 /* OSEventProducer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3C11518A289ADEEB00565C41 /* OSEventProducer.swift */; }; + 3C11518D289AF5E800565C41 /* OSModelChangedHandler.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3C11518C289AF5E800565C41 /* OSModelChangedHandler.swift */; }; + 3C11518E289AF83600565C41 /* OneSignalOSCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3C115161289A259500565C41 /* OneSignalOSCore.framework */; }; + 3C11518F289AF83600565C41 /* OneSignalOSCore.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 3C115161289A259500565C41 /* OneSignalOSCore.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; + 3C115197289AF86C00565C41 /* OneSignalOSCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3C115161289A259500565C41 /* OneSignalOSCore.framework */; }; + 3C2C7DC4288E007E0020F9AE /* UserModelSwiftTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3C2C7DC3288E007E0020F9AE /* UserModelSwiftTests.swift */; }; + 3C2C7DC6288E00AA0020F9AE /* UserModelObjcTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 3C2C7DC5288E00AA0020F9AE /* UserModelObjcTests.m */; }; + 3C2C7DC8288F3C020020F9AE /* OSSubscriptionModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3C2C7DC7288F3C020020F9AE /* OSSubscriptionModel.swift */; }; + 3C2D8A5928B4C4E300BE41F6 /* OSDelta.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3C2D8A5828B4C4E300BE41F6 /* OSDelta.swift */; }; + 3C44673E296D099D0039A49E /* OneSignalMobileProvision.m in Sources */ = {isa = PBXBuildFile; fileRef = 912411FD1E73342200E41FD7 /* OneSignalMobileProvision.m */; }; + 3C44673F296D09CC0039A49E /* OneSignalMobileProvision.h in Headers */ = {isa = PBXBuildFile; fileRef = 912411FC1E73342200E41FD7 /* OneSignalMobileProvision.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 3C448B9D2936ADFD002F96BC /* OSBackgroundTaskHandlerImpl.h in Headers */ = {isa = PBXBuildFile; fileRef = 3C448B9B2936ADFD002F96BC /* OSBackgroundTaskHandlerImpl.h */; }; + 3C448B9E2936ADFD002F96BC /* OSBackgroundTaskHandlerImpl.m in Sources */ = {isa = PBXBuildFile; fileRef = 3C448B9C2936ADFD002F96BC /* OSBackgroundTaskHandlerImpl.m */; }; + 3C448B9F2936ADFD002F96BC /* OSBackgroundTaskHandlerImpl.m in Sources */ = {isa = PBXBuildFile; fileRef = 3C448B9C2936ADFD002F96BC /* OSBackgroundTaskHandlerImpl.m */; }; + 3C448BA02936ADFD002F96BC /* OSBackgroundTaskHandlerImpl.m in Sources */ = {isa = PBXBuildFile; fileRef = 3C448B9C2936ADFD002F96BC /* OSBackgroundTaskHandlerImpl.m */; }; + 3C448BA22936B474002F96BC /* OSBackgroundTaskManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3C448BA12936B474002F96BC /* OSBackgroundTaskManager.swift */; }; + 3C47A974292642B100312125 /* OneSignalConfigManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 3C47A972292642B100312125 /* OneSignalConfigManager.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 3C47A975292642B100312125 /* OneSignalConfigManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 3C47A973292642B100312125 /* OneSignalConfigManager.m */; }; + 3C4F9E4428A4466C009F453A /* OSOperationRepo.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3C4F9E4328A4466C009F453A /* OSOperationRepo.swift */; }; + 3C789DBD293C2206004CF83D /* OSFocusInfluenceParam.m in Sources */ = {isa = PBXBuildFile; fileRef = 7A600B432453790700514A53 /* OSFocusInfluenceParam.m */; }; + 3C789DBE293D8EAD004CF83D /* OSFocusInfluenceParam.h in Headers */ = {isa = PBXBuildFile; fileRef = 7A600B41245378ED00514A53 /* OSFocusInfluenceParam.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 3C8E6DF928A6D89E0031E48A /* OSOperationExecutor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3C8E6DF828A6D89E0031E48A /* OSOperationExecutor.swift */; }; + 3C8E6DFF28AB09AE0031E48A /* OSPropertyOperationExecutor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3C8E6DFE28AB09AE0031E48A /* OSPropertyOperationExecutor.swift */; }; + 3C8E6E0128AC0BA10031E48A /* OSIdentityOperationExecutor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3C8E6E0028AC0BA10031E48A /* OSIdentityOperationExecutor.swift */; }; + 3CA6CE0A28E4F19B00CA0585 /* OSUserRequests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3CA6CE0928E4F19B00CA0585 /* OSUserRequests.swift */; }; + 3CCF44BE299B17290021964D /* OneSignalWrapper.h in Headers */ = {isa = PBXBuildFile; fileRef = 3CCF44BC299B17290021964D /* OneSignalWrapper.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 3CCF44BF299B17290021964D /* OneSignalWrapper.m in Sources */ = {isa = PBXBuildFile; fileRef = 3CCF44BD299B17290021964D /* OneSignalWrapper.m */; }; + 3CE5F9E3289D88DC004A156E /* OSModelStoreChangedHandler.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3CE5F9E2289D88DC004A156E /* OSModelStoreChangedHandler.swift */; }; + 3CE795F928DB99B500736BD4 /* OSSubscriptionModelStoreListener.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3CE795F828DB99B500736BD4 /* OSSubscriptionModelStoreListener.swift */; }; + 3CE795FB28DBDCE700736BD4 /* OSSubscriptionOperationExecutor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3CE795FA28DBDCE700736BD4 /* OSSubscriptionOperationExecutor.swift */; }; + 3CE8CC4E2911ADD1000DB0D3 /* OSDeviceUtils.h in Headers */ = {isa = PBXBuildFile; fileRef = 3CE8CC4C2911ADD1000DB0D3 /* OSDeviceUtils.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 3CE8CC4F2911ADD1000DB0D3 /* OSDeviceUtils.m in Sources */ = {isa = PBXBuildFile; fileRef = 3CE8CC4D2911ADD1000DB0D3 /* OSDeviceUtils.m */; }; + 3CE8CC522911AE90000DB0D3 /* OSNetworkingUtils.h in Headers */ = {isa = PBXBuildFile; fileRef = 3CE8CC502911AE90000DB0D3 /* OSNetworkingUtils.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 3CE8CC532911AE90000DB0D3 /* OSNetworkingUtils.m in Sources */ = {isa = PBXBuildFile; fileRef = 3CE8CC512911AE90000DB0D3 /* OSNetworkingUtils.m */; }; + 3CE8CC542911B037000DB0D3 /* OneSignalReachability.m in Sources */ = {isa = PBXBuildFile; fileRef = 912411FF1E73342200E41FD7 /* OneSignalReachability.m */; }; + 3CE8CC562911B1E0000DB0D3 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3CE8CC552911B1E0000DB0D3 /* UIKit.framework */; }; + 3CE8CC582911B2B2000DB0D3 /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3CE8CC572911B2B2000DB0D3 /* SystemConfiguration.framework */; }; + 3CE8CC5B29143F4B000DB0D3 /* NSDateFormatter+OneSignal.m in Sources */ = {isa = PBXBuildFile; fileRef = DE98772A2591655800DE07D5 /* NSDateFormatter+OneSignal.m */; }; + 3CE9227A289FA88B001B1062 /* OSIdentityModelStoreListener.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3CE92279289FA88B001B1062 /* OSIdentityModelStoreListener.swift */; }; + 3CF8629E28A183F900776CA4 /* OSIdentityModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3CF8629D28A183F900776CA4 /* OSIdentityModel.swift */; }; + 3CF862A028A1964F00776CA4 /* OSPropertiesModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3CF8629F28A1964F00776CA4 /* OSPropertiesModel.swift */; }; + 3CF862A228A197D200776CA4 /* OSPropertiesModelStoreListener.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3CF862A128A197D200776CA4 /* OSPropertiesModelStoreListener.swift */; }; 3E464ED71D88ED1F00DCF7E9 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 37E6B2BA19D9CAF300D0C601 /* UIKit.framework */; }; 3E66F5821D90A2C600E45A01 /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3E08E2701D49A5C8002176DE /* SystemConfiguration.framework */; }; 4529DED21FA81EA800CEAB1D /* NSObjectOverrider.m in Sources */ = {isa = PBXBuildFile; fileRef = 4529DED11FA81EA800CEAB1D /* NSObjectOverrider.m */; }; @@ -72,71 +117,20 @@ 5B58E4F8237CE7B4009401E0 /* UIDeviceOverrider.m in Sources */ = {isa = PBXBuildFile; fileRef = 5B58E4F6237CE7B4009401E0 /* UIDeviceOverrider.m */; }; 7A123295235DFE3B002B6CE3 /* OutcomeTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 7A123294235DFE3B002B6CE3 /* OutcomeTests.m */; }; 7A1232A2235E1743002B6CE3 /* OneSignal.m in Sources */ = {isa = PBXBuildFile; fileRef = 912411F11E73342200E41FD7 /* OneSignal.m */; }; - 7A1F2D8F2406EFC5007799A9 /* OSInAppMessageTag.m in Sources */ = {isa = PBXBuildFile; fileRef = 7A1F2D8E2406EFC5007799A9 /* OSInAppMessageTag.m */; }; 7A2E90622460DA1500B3428C /* OutcomeIntegrationV2Tests.m in Sources */ = {isa = PBXBuildFile; fileRef = 7A2E90612460DA1500B3428C /* OutcomeIntegrationV2Tests.m */; }; - 7A42742B25CDCA7800EE75FC /* OSSMSSubscription.h in Headers */ = {isa = PBXBuildFile; fileRef = 7A42742A25CDCA7800EE75FC /* OSSMSSubscription.h */; }; - 7A42744225CDE98E00EE75FC /* OSSMSSubscription.m in Sources */ = {isa = PBXBuildFile; fileRef = 7A42744125CDE98E00EE75FC /* OSSMSSubscription.m */; }; - 7A42744325CDE98E00EE75FC /* OSSMSSubscription.m in Sources */ = {isa = PBXBuildFile; fileRef = 7A42744125CDE98E00EE75FC /* OSSMSSubscription.m */; }; - 7A42744425CDE98E00EE75FC /* OSSMSSubscription.m in Sources */ = {isa = PBXBuildFile; fileRef = 7A42744125CDE98E00EE75FC /* OSSMSSubscription.m */; }; - 7A42745425CDF05500EE75FC /* OSUserStateSMSSynchronizer.h in Headers */ = {isa = PBXBuildFile; fileRef = 7A42745325CDF05500EE75FC /* OSUserStateSMSSynchronizer.h */; }; - 7A42746425CDF06800EE75FC /* OSUserStateSMSSynchronizer.m in Sources */ = {isa = PBXBuildFile; fileRef = 7A42746325CDF06800EE75FC /* OSUserStateSMSSynchronizer.m */; }; - 7A42746525CDF06800EE75FC /* OSUserStateSMSSynchronizer.m in Sources */ = {isa = PBXBuildFile; fileRef = 7A42746325CDF06800EE75FC /* OSUserStateSMSSynchronizer.m */; }; - 7A42746625CDF06800EE75FC /* OSUserStateSMSSynchronizer.m in Sources */ = {isa = PBXBuildFile; fileRef = 7A42746325CDF06800EE75FC /* OSUserStateSMSSynchronizer.m */; }; - 7A42748025D18F2C00EE75FC /* OneSignalSetSMSParameters.h in Headers */ = {isa = PBXBuildFile; fileRef = 7A42747F25D18F2C00EE75FC /* OneSignalSetSMSParameters.h */; }; - 7A42748925D18F4400EE75FC /* OneSignalSetSMSParameters.m in Sources */ = {isa = PBXBuildFile; fileRef = 7A42748825D18F4400EE75FC /* OneSignalSetSMSParameters.m */; }; - 7A42748A25D18F4400EE75FC /* OneSignalSetSMSParameters.m in Sources */ = {isa = PBXBuildFile; fileRef = 7A42748825D18F4400EE75FC /* OneSignalSetSMSParameters.m */; }; - 7A42748B25D18F4400EE75FC /* OneSignalSetSMSParameters.m in Sources */ = {isa = PBXBuildFile; fileRef = 7A42748825D18F4400EE75FC /* OneSignalSetSMSParameters.m */; }; 7A4274A425D1C99600EE75FC /* SMSTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 7A4274A125D1C99600EE75FC /* SMSTests.m */; }; 7A5A818224897693002E07C8 /* MigrationTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 7A5A818124897693002E07C8 /* MigrationTests.m */; }; 7A5A8185248990CD002E07C8 /* OSIndirectNotification.m in Sources */ = {isa = PBXBuildFile; fileRef = 7A5A8184248990CD002E07C8 /* OSIndirectNotification.m */; }; - 7A5E71F325A66DDB00CB5605 /* OSUserStateSynchronizer.h in Headers */ = {isa = PBXBuildFile; fileRef = 7A5E71F225A66DDB00CB5605 /* OSUserStateSynchronizer.h */; }; - 7A5E71FC25A66DEC00CB5605 /* OSUserStateSynchronizer.m in Sources */ = {isa = PBXBuildFile; fileRef = 7A5E71FB25A66DEC00CB5605 /* OSUserStateSynchronizer.m */; }; - 7A5E71FD25A66DEC00CB5605 /* OSUserStateSynchronizer.m in Sources */ = {isa = PBXBuildFile; fileRef = 7A5E71FB25A66DEC00CB5605 /* OSUserStateSynchronizer.m */; }; - 7A5E71FE25A66DEC00CB5605 /* OSUserStateSynchronizer.m in Sources */ = {isa = PBXBuildFile; fileRef = 7A5E71FB25A66DEC00CB5605 /* OSUserStateSynchronizer.m */; }; - 7A5E720725A66E0A00CB5605 /* OSUserStatePushSynchronizer.h in Headers */ = {isa = PBXBuildFile; fileRef = 7A5E720625A66E0A00CB5605 /* OSUserStatePushSynchronizer.h */; }; - 7A5E721025A66E1600CB5605 /* OSUserStatePushSynchronizer.m in Sources */ = {isa = PBXBuildFile; fileRef = 7A5E720F25A66E1600CB5605 /* OSUserStatePushSynchronizer.m */; }; - 7A5E721125A66E1600CB5605 /* OSUserStatePushSynchronizer.m in Sources */ = {isa = PBXBuildFile; fileRef = 7A5E720F25A66E1600CB5605 /* OSUserStatePushSynchronizer.m */; }; - 7A5E721225A66E1600CB5605 /* OSUserStatePushSynchronizer.m in Sources */ = {isa = PBXBuildFile; fileRef = 7A5E720F25A66E1600CB5605 /* OSUserStatePushSynchronizer.m */; }; - 7A5E721B25A66E2900CB5605 /* OSUserStateEmailSynchronizer.h in Headers */ = {isa = PBXBuildFile; fileRef = 7A5E721A25A66E2900CB5605 /* OSUserStateEmailSynchronizer.h */; }; - 7A5E722425A66E3300CB5605 /* OSUserStateEmailSynchronizer.m in Sources */ = {isa = PBXBuildFile; fileRef = 7A5E722325A66E3300CB5605 /* OSUserStateEmailSynchronizer.m */; }; - 7A5E722525A66E3300CB5605 /* OSUserStateEmailSynchronizer.m in Sources */ = {isa = PBXBuildFile; fileRef = 7A5E722325A66E3300CB5605 /* OSUserStateEmailSynchronizer.m */; }; - 7A5E722625A66E3300CB5605 /* OSUserStateEmailSynchronizer.m in Sources */ = {isa = PBXBuildFile; fileRef = 7A5E722325A66E3300CB5605 /* OSUserStateEmailSynchronizer.m */; }; - 7A5E725925A66E9800CB5605 /* OSStateSynchronizer.h in Headers */ = {isa = PBXBuildFile; fileRef = 7A5E725825A66E9800CB5605 /* OSStateSynchronizer.h */; }; - 7A5E726225A66EA400CB5605 /* OSStateSynchronizer.m in Sources */ = {isa = PBXBuildFile; fileRef = 7A5E726125A66EA400CB5605 /* OSStateSynchronizer.m */; }; - 7A5E726325A66EA400CB5605 /* OSStateSynchronizer.m in Sources */ = {isa = PBXBuildFile; fileRef = 7A5E726125A66EA400CB5605 /* OSStateSynchronizer.m */; }; - 7A5E726425A66EA400CB5605 /* OSStateSynchronizer.m in Sources */ = {isa = PBXBuildFile; fileRef = 7A5E726125A66EA400CB5605 /* OSStateSynchronizer.m */; }; - 7A600B42245378ED00514A53 /* OSFocusInfluenceParam.h in Headers */ = {isa = PBXBuildFile; fileRef = 7A600B41245378ED00514A53 /* OSFocusInfluenceParam.h */; }; - 7A600B442453790700514A53 /* OSFocusInfluenceParam.m in Sources */ = {isa = PBXBuildFile; fileRef = 7A600B432453790700514A53 /* OSFocusInfluenceParam.m */; }; - 7A600B452453790700514A53 /* OSFocusInfluenceParam.m in Sources */ = {isa = PBXBuildFile; fileRef = 7A600B432453790700514A53 /* OSFocusInfluenceParam.m */; }; - 7A600B462453790700514A53 /* OSFocusInfluenceParam.m in Sources */ = {isa = PBXBuildFile; fileRef = 7A600B432453790700514A53 /* OSFocusInfluenceParam.m */; }; 7A65D62A246627AD007FF196 /* OSInAppMessageViewOverrider.m in Sources */ = {isa = PBXBuildFile; fileRef = 7A65D629246627AD007FF196 /* OSInAppMessageViewOverrider.m */; }; 7A674F192360D813001F9ACD /* OSBaseFocusTimeProcessor.h in Headers */ = {isa = PBXBuildFile; fileRef = 7A674F182360D813001F9ACD /* OSBaseFocusTimeProcessor.h */; }; 7A674F1B2360D82E001F9ACD /* OSBaseFocusTimeProcessor.m in Sources */ = {isa = PBXBuildFile; fileRef = 7A674F1A2360D82E001F9ACD /* OSBaseFocusTimeProcessor.m */; }; 7A674F1C2360D82E001F9ACD /* OSBaseFocusTimeProcessor.m in Sources */ = {isa = PBXBuildFile; fileRef = 7A674F1A2360D82E001F9ACD /* OSBaseFocusTimeProcessor.m */; }; 7A674F1D2360D82E001F9ACD /* OSBaseFocusTimeProcessor.m in Sources */ = {isa = PBXBuildFile; fileRef = 7A674F1A2360D82E001F9ACD /* OSBaseFocusTimeProcessor.m */; }; - 7A676BE524981CEC003957CC /* OSDeviceState.m in Sources */ = {isa = PBXBuildFile; fileRef = 7A676BE424981CEC003957CC /* OSDeviceState.m */; }; - 7A72EB0E23E252C200B4D50F /* OSInAppMessageDisplayStats.m in Sources */ = {isa = PBXBuildFile; fileRef = 7A72EB0D23E252C200B4D50F /* OSInAppMessageDisplayStats.m */; }; - 7A72EB0F23E252C700B4D50F /* OSInAppMessageDisplayStats.m in Sources */ = {isa = PBXBuildFile; fileRef = 7A72EB0D23E252C200B4D50F /* OSInAppMessageDisplayStats.m */; }; - 7A72EB1023E252C700B4D50F /* OSInAppMessageDisplayStats.m in Sources */ = {isa = PBXBuildFile; fileRef = 7A72EB0D23E252C200B4D50F /* OSInAppMessageDisplayStats.m */; }; - 7A72EB1223E252DD00B4D50F /* OSInAppMessageDisplayStats.h in Headers */ = {isa = PBXBuildFile; fileRef = 7A72EB1123E252D400B4D50F /* OSInAppMessageDisplayStats.h */; }; - 7A880F312404AE7B0081F5E8 /* OSInAppMessagePushPrompt.m in Sources */ = {isa = PBXBuildFile; fileRef = 7A880F302404AE7B0081F5E8 /* OSInAppMessagePushPrompt.m */; }; - 7A880F322404AE7B0081F5E8 /* OSInAppMessagePushPrompt.m in Sources */ = {isa = PBXBuildFile; fileRef = 7A880F302404AE7B0081F5E8 /* OSInAppMessagePushPrompt.m */; }; - 7A880F332404AE7B0081F5E8 /* OSInAppMessagePushPrompt.m in Sources */ = {isa = PBXBuildFile; fileRef = 7A880F302404AE7B0081F5E8 /* OSInAppMessagePushPrompt.m */; }; - 7A93264825A8DD3600BBEC27 /* OSUserState.h in Headers */ = {isa = PBXBuildFile; fileRef = 7A93264725A8DD3600BBEC27 /* OSUserState.h */; }; - 7A93265125A8DD4300BBEC27 /* OSUserState.m in Sources */ = {isa = PBXBuildFile; fileRef = 7A93265025A8DD4300BBEC27 /* OSUserState.m */; }; - 7A93265225A8DD4300BBEC27 /* OSUserState.m in Sources */ = {isa = PBXBuildFile; fileRef = 7A93265025A8DD4300BBEC27 /* OSUserState.m */; }; - 7A93265325A8DD4300BBEC27 /* OSUserState.m in Sources */ = {isa = PBXBuildFile; fileRef = 7A93265025A8DD4300BBEC27 /* OSUserState.m */; }; - 7A93266A25AC985500BBEC27 /* OSLocationState.h in Headers */ = {isa = PBXBuildFile; fileRef = 7A93266925AC985500BBEC27 /* OSLocationState.h */; }; - 7A93267325AC986400BBEC27 /* OSLocationState.m in Sources */ = {isa = PBXBuildFile; fileRef = 7A93267225AC986400BBEC27 /* OSLocationState.m */; }; - 7A93267425AC986400BBEC27 /* OSLocationState.m in Sources */ = {isa = PBXBuildFile; fileRef = 7A93267225AC986400BBEC27 /* OSLocationState.m */; }; - 7A93267525AC986400BBEC27 /* OSLocationState.m in Sources */ = {isa = PBXBuildFile; fileRef = 7A93267225AC986400BBEC27 /* OSLocationState.m */; }; 7A93269325AF4E6700BBEC27 /* OSPendingCallbacks.h in Headers */ = {isa = PBXBuildFile; fileRef = 7A93269225AF4E6700BBEC27 /* OSPendingCallbacks.h */; }; 7A93269C25AF4F0200BBEC27 /* OSPendingCallbacks.m in Sources */ = {isa = PBXBuildFile; fileRef = 7A93269B25AF4F0200BBEC27 /* OSPendingCallbacks.m */; }; 7A93269D25AF4F0200BBEC27 /* OSPendingCallbacks.m in Sources */ = {isa = PBXBuildFile; fileRef = 7A93269B25AF4F0200BBEC27 /* OSPendingCallbacks.m */; }; 7A93269E25AF4F0300BBEC27 /* OSPendingCallbacks.m in Sources */ = {isa = PBXBuildFile; fileRef = 7A93269B25AF4F0200BBEC27 /* OSPendingCallbacks.m */; }; 7A94D8E1249ABF0000E90B40 /* OSUniqueOutcomeNotification.m in Sources */ = {isa = PBXBuildFile; fileRef = 7A94D8E0249ABF0000E90B40 /* OSUniqueOutcomeNotification.m */; }; - 7AA2848A2406FC6400C25D76 /* OSInAppMessageTag.m in Sources */ = {isa = PBXBuildFile; fileRef = 7A1F2D8E2406EFC5007799A9 /* OSInAppMessageTag.m */; }; - 7AA2848B2406FC6500C25D76 /* OSInAppMessageTag.m in Sources */ = {isa = PBXBuildFile; fileRef = 7A1F2D8E2406EFC5007799A9 /* OSInAppMessageTag.m */; }; 7AAA60662485D0310004FADE /* OSMigrationController.h in Headers */ = {isa = PBXBuildFile; fileRef = 7AAA60652485D0090004FADE /* OSMigrationController.h */; }; 7AAA60682485D0420004FADE /* OSMigrationController.m in Sources */ = {isa = PBXBuildFile; fileRef = 7AAA60672485D0420004FADE /* OSMigrationController.m */; }; 7AAA60692485D0420004FADE /* OSMigrationController.m in Sources */ = {isa = PBXBuildFile; fileRef = 7AAA60672485D0420004FADE /* OSMigrationController.m */; }; @@ -145,15 +139,6 @@ 7ABAF9D62457D3FF0074DFA0 /* ChannelTrackersTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 7ABAF9D52457D3FF0074DFA0 /* ChannelTrackersTests.m */; }; 7ABAF9D82457DD620074DFA0 /* SessionManagerTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 7ABAF9D72457DD620074DFA0 /* SessionManagerTests.m */; }; 7ABAF9E324606E940074DFA0 /* OutcomeV2Tests.m in Sources */ = {isa = PBXBuildFile; fileRef = 7ABAF9E224606E940074DFA0 /* OutcomeV2Tests.m */; }; - 7AC0D2182576944F00E29448 /* OneSignalSetExternalIdParameters.m in Sources */ = {isa = PBXBuildFile; fileRef = 7AC0D2172576944F00E29448 /* OneSignalSetExternalIdParameters.m */; }; - 7AC0D2192576944F00E29448 /* OneSignalSetExternalIdParameters.m in Sources */ = {isa = PBXBuildFile; fileRef = 7AC0D2172576944F00E29448 /* OneSignalSetExternalIdParameters.m */; }; - 7AC0D21A2576944F00E29448 /* OneSignalSetExternalIdParameters.m in Sources */ = {isa = PBXBuildFile; fileRef = 7AC0D2172576944F00E29448 /* OneSignalSetExternalIdParameters.m */; }; - 7AC8D3A824993A0E0023EDE8 /* OSDeviceState.m in Sources */ = {isa = PBXBuildFile; fileRef = 7A676BE424981CEC003957CC /* OSDeviceState.m */; }; - 7AC8D3A924993A0F0023EDE8 /* OSDeviceState.m in Sources */ = {isa = PBXBuildFile; fileRef = 7A676BE424981CEC003957CC /* OSDeviceState.m */; }; - 7AD172382416D53B00A78B19 /* OSInAppMessageLocationPrompt.m in Sources */ = {isa = PBXBuildFile; fileRef = 7AD172372416D53B00A78B19 /* OSInAppMessageLocationPrompt.m */; }; - 7AD172392416D53B00A78B19 /* OSInAppMessageLocationPrompt.m in Sources */ = {isa = PBXBuildFile; fileRef = 7AD172372416D53B00A78B19 /* OSInAppMessageLocationPrompt.m */; }; - 7AD1723A2416D53B00A78B19 /* OSInAppMessageLocationPrompt.m in Sources */ = {isa = PBXBuildFile; fileRef = 7AD172372416D53B00A78B19 /* OSInAppMessageLocationPrompt.m */; }; - 7ADE37AD22F2554400263048 /* OneSignalOutcomeEventsController.m in Sources */ = {isa = PBXBuildFile; fileRef = 7ADE379322E8B69C00263048 /* OneSignalOutcomeEventsController.m */; }; 7ADF891C230DB5BD0054E0D6 /* UnitTestAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 4529DEF51FA8460C00CEAB1D /* UnitTestAppDelegate.m */; }; 7AECE59023674A9700537907 /* OSAttributedFocusTimeProcessor.m in Sources */ = {isa = PBXBuildFile; fileRef = 7AECE58F23674A9700537907 /* OSAttributedFocusTimeProcessor.m */; }; 7AECE59123674A9700537907 /* OSAttributedFocusTimeProcessor.m in Sources */ = {isa = PBXBuildFile; fileRef = 7AECE58F23674A9700537907 /* OSAttributedFocusTimeProcessor.m */; }; @@ -167,28 +152,8 @@ 7AECE59E23675F6300537907 /* OSFocusTimeProcessorFactory.m in Sources */ = {isa = PBXBuildFile; fileRef = 7AECE59D23675F6300537907 /* OSFocusTimeProcessorFactory.m */; }; 7AECE59F23675F6300537907 /* OSFocusTimeProcessorFactory.m in Sources */ = {isa = PBXBuildFile; fileRef = 7AECE59D23675F6300537907 /* OSFocusTimeProcessorFactory.m */; }; 7AECE5A023675F6300537907 /* OSFocusTimeProcessorFactory.m in Sources */ = {isa = PBXBuildFile; fileRef = 7AECE59D23675F6300537907 /* OSFocusTimeProcessorFactory.m */; }; - 7AF5174524FDC2AA00B076BC /* OSRemoteParamController.h in Headers */ = {isa = PBXBuildFile; fileRef = 7AF5174424FDC2A100B076BC /* OSRemoteParamController.h */; }; - 7AF5174724FDC2C500B076BC /* OSRemoteParamController.m in Sources */ = {isa = PBXBuildFile; fileRef = 7AF5174624FDC2C500B076BC /* OSRemoteParamController.m */; }; - 7AF5174824FDC2C500B076BC /* OSRemoteParamController.m in Sources */ = {isa = PBXBuildFile; fileRef = 7AF5174624FDC2C500B076BC /* OSRemoteParamController.m */; }; - 7AF5174924FDC2C500B076BC /* OSRemoteParamController.m in Sources */ = {isa = PBXBuildFile; fileRef = 7AF5174624FDC2C500B076BC /* OSRemoteParamController.m */; }; 7AF5174C24FE980400B076BC /* RemoteParamsTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 7AF5174B24FE980400B076BC /* RemoteParamsTests.m */; }; - 7AF8FDBB2332A58900A19245 /* OSSessionManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 7A12EBD523060A6F005C4FA5 /* OSSessionManager.m */; }; - 7AF8FDBD2332A5C200A19245 /* OSIndirectInfluence.m in Sources */ = {isa = PBXBuildFile; fileRef = 7A12EBDC23060B37005C4FA5 /* OSIndirectInfluence.m */; }; - 7AF986372444C41A00C36EAE /* OSChannelTracker.m in Sources */ = {isa = PBXBuildFile; fileRef = 7AF986342444C41A00C36EAE /* OSChannelTracker.m */; }; - 7AF9863D2444C43900C36EAE /* OSInAppMessageTracker.m in Sources */ = {isa = PBXBuildFile; fileRef = 7AF9863A2444C43900C36EAE /* OSInAppMessageTracker.m */; }; - 7AF986452444C47400C36EAE /* OSNotificationTracker.m in Sources */ = {isa = PBXBuildFile; fileRef = 7AF986422444C47400C36EAE /* OSNotificationTracker.m */; }; - 7AF9864B2444C65300C36EAE /* OSTrackerFactory.m in Sources */ = {isa = PBXBuildFile; fileRef = 7AF986482444C65300C36EAE /* OSTrackerFactory.m */; }; 7AF9865324451F3900C36EAE /* OSFocusCallParams.h in Headers */ = {isa = PBXBuildFile; fileRef = 7AFE856E2368DDC50091D6A5 /* OSFocusCallParams.h */; }; - 7AF9865A24452A9600C36EAE /* OSInfluence.m in Sources */ = {isa = PBXBuildFile; fileRef = 7AF9865724452A9600C36EAE /* OSInfluence.m */; }; - 7AF986602447C13C00C36EAE /* OSInfluenceDataRepository.m in Sources */ = {isa = PBXBuildFile; fileRef = 7AF9865D2447C13C00C36EAE /* OSInfluenceDataRepository.m */; }; - 7AF98666244975AD00C36EAE /* OSOutcomeSourceBody.m in Sources */ = {isa = PBXBuildFile; fileRef = 7AF98663244975AD00C36EAE /* OSOutcomeSourceBody.m */; }; - 7AF9866C244975CF00C36EAE /* OSOutcomeSource.m in Sources */ = {isa = PBXBuildFile; fileRef = 7AF98669244975CF00C36EAE /* OSOutcomeSource.m */; }; - 7AF98672244975ED00C36EAE /* OSOutcomeEventParams.m in Sources */ = {isa = PBXBuildFile; fileRef = 7AF9866F244975ED00C36EAE /* OSOutcomeEventParams.m */; }; - 7AF9867C24497A4D00C36EAE /* OSOutcomeEventsRepository.m in Sources */ = {isa = PBXBuildFile; fileRef = 7AF9867924497A4D00C36EAE /* OSOutcomeEventsRepository.m */; }; - 7AF9868224497BE100C36EAE /* OSOutcomeEventsV1Repository.m in Sources */ = {isa = PBXBuildFile; fileRef = 7AF9867F24497BE100C36EAE /* OSOutcomeEventsV1Repository.m */; }; - 7AF98688244A32EF00C36EAE /* OSOutcomeEventsV2Repository.m in Sources */ = {isa = PBXBuildFile; fileRef = 7AF98685244A32EF00C36EAE /* OSOutcomeEventsV2Repository.m */; }; - 7AF9868E244A556F00C36EAE /* OSOutcomeEventsFactory.m in Sources */ = {isa = PBXBuildFile; fileRef = 7AF9868B244A556F00C36EAE /* OSOutcomeEventsFactory.m */; }; - 7AF98694244A567B00C36EAE /* OSOutcomeEventsCache.m in Sources */ = {isa = PBXBuildFile; fileRef = 7AF98691244A567B00C36EAE /* OSOutcomeEventsCache.m */; }; 7AFE856B2368DDB80091D6A5 /* OSFocusCallParams.m in Sources */ = {isa = PBXBuildFile; fileRef = 7AFE856A2368DDB80091D6A5 /* OSFocusCallParams.m */; }; 7AFE856C2368DDB80091D6A5 /* OSFocusCallParams.m in Sources */ = {isa = PBXBuildFile; fileRef = 7AFE856A2368DDB80091D6A5 /* OSFocusCallParams.m */; }; 7AFE856D2368DDB80091D6A5 /* OSFocusCallParams.m in Sources */ = {isa = PBXBuildFile; fileRef = 7AFE856A2368DDB80091D6A5 /* OSFocusCallParams.m */; }; @@ -203,22 +168,6 @@ 9124121E1E73342200E41FD7 /* OneSignalJailbreakDetection.m in Sources */ = {isa = PBXBuildFile; fileRef = 912411F91E73342200E41FD7 /* OneSignalJailbreakDetection.m */; }; 9124121F1E73342200E41FD7 /* OneSignalJailbreakDetection.m in Sources */ = {isa = PBXBuildFile; fileRef = 912411F91E73342200E41FD7 /* OneSignalJailbreakDetection.m */; }; 912412201E73342200E41FD7 /* OneSignalJailbreakDetection.m in Sources */ = {isa = PBXBuildFile; fileRef = 912411F91E73342200E41FD7 /* OneSignalJailbreakDetection.m */; }; - 912412211E73342200E41FD7 /* OneSignalLocation.h in Headers */ = {isa = PBXBuildFile; fileRef = 912411FA1E73342200E41FD7 /* OneSignalLocation.h */; }; - 912412221E73342200E41FD7 /* OneSignalLocation.m in Sources */ = {isa = PBXBuildFile; fileRef = 912411FB1E73342200E41FD7 /* OneSignalLocation.m */; }; - 912412231E73342200E41FD7 /* OneSignalLocation.m in Sources */ = {isa = PBXBuildFile; fileRef = 912411FB1E73342200E41FD7 /* OneSignalLocation.m */; }; - 912412241E73342200E41FD7 /* OneSignalLocation.m in Sources */ = {isa = PBXBuildFile; fileRef = 912411FB1E73342200E41FD7 /* OneSignalLocation.m */; }; - 912412251E73342200E41FD7 /* OneSignalMobileProvision.h in Headers */ = {isa = PBXBuildFile; fileRef = 912411FC1E73342200E41FD7 /* OneSignalMobileProvision.h */; }; - 912412261E73342200E41FD7 /* OneSignalMobileProvision.m in Sources */ = {isa = PBXBuildFile; fileRef = 912411FD1E73342200E41FD7 /* OneSignalMobileProvision.m */; }; - 912412271E73342200E41FD7 /* OneSignalMobileProvision.m in Sources */ = {isa = PBXBuildFile; fileRef = 912411FD1E73342200E41FD7 /* OneSignalMobileProvision.m */; }; - 912412281E73342200E41FD7 /* OneSignalMobileProvision.m in Sources */ = {isa = PBXBuildFile; fileRef = 912411FD1E73342200E41FD7 /* OneSignalMobileProvision.m */; }; - 912412291E73342200E41FD7 /* OneSignalReachability.h in Headers */ = {isa = PBXBuildFile; fileRef = 912411FE1E73342200E41FD7 /* OneSignalReachability.h */; }; - 9124122A1E73342200E41FD7 /* OneSignalReachability.m in Sources */ = {isa = PBXBuildFile; fileRef = 912411FF1E73342200E41FD7 /* OneSignalReachability.m */; }; - 9124122B1E73342200E41FD7 /* OneSignalReachability.m in Sources */ = {isa = PBXBuildFile; fileRef = 912411FF1E73342200E41FD7 /* OneSignalReachability.m */; }; - 9124122C1E73342200E41FD7 /* OneSignalReachability.m in Sources */ = {isa = PBXBuildFile; fileRef = 912411FF1E73342200E41FD7 /* OneSignalReachability.m */; }; - 9124122D1E73342200E41FD7 /* OneSignalSelectorHelpers.h in Headers */ = {isa = PBXBuildFile; fileRef = 912412001E73342200E41FD7 /* OneSignalSelectorHelpers.h */; }; - 9124122E1E73342200E41FD7 /* OneSignalSelectorHelpers.m in Sources */ = {isa = PBXBuildFile; fileRef = 912412011E73342200E41FD7 /* OneSignalSelectorHelpers.m */; }; - 9124122F1E73342200E41FD7 /* OneSignalSelectorHelpers.m in Sources */ = {isa = PBXBuildFile; fileRef = 912412011E73342200E41FD7 /* OneSignalSelectorHelpers.m */; }; - 912412301E73342200E41FD7 /* OneSignalSelectorHelpers.m in Sources */ = {isa = PBXBuildFile; fileRef = 912412011E73342200E41FD7 /* OneSignalSelectorHelpers.m */; }; 912412311E73342200E41FD7 /* OneSignalTracker.h in Headers */ = {isa = PBXBuildFile; fileRef = 912412021E73342200E41FD7 /* OneSignalTracker.h */; }; 912412321E73342200E41FD7 /* OneSignalTracker.m in Sources */ = {isa = PBXBuildFile; fileRef = 912412031E73342200E41FD7 /* OneSignalTracker.m */; }; 912412331E73342200E41FD7 /* OneSignalTracker.m in Sources */ = {isa = PBXBuildFile; fileRef = 912412031E73342200E41FD7 /* OneSignalTracker.m */; }; @@ -227,79 +176,26 @@ 912412361E73342200E41FD7 /* OneSignalTrackIAP.m in Sources */ = {isa = PBXBuildFile; fileRef = 912412051E73342200E41FD7 /* OneSignalTrackIAP.m */; }; 912412371E73342200E41FD7 /* OneSignalTrackIAP.m in Sources */ = {isa = PBXBuildFile; fileRef = 912412051E73342200E41FD7 /* OneSignalTrackIAP.m */; }; 912412381E73342200E41FD7 /* OneSignalTrackIAP.m in Sources */ = {isa = PBXBuildFile; fileRef = 912412051E73342200E41FD7 /* OneSignalTrackIAP.m */; }; - 912412391E73342200E41FD7 /* OneSignalWebView.h in Headers */ = {isa = PBXBuildFile; fileRef = 912412061E73342200E41FD7 /* OneSignalWebView.h */; }; - 9124123A1E73342200E41FD7 /* OneSignalWebView.m in Sources */ = {isa = PBXBuildFile; fileRef = 912412071E73342200E41FD7 /* OneSignalWebView.m */; }; - 9124123B1E73342200E41FD7 /* OneSignalWebView.m in Sources */ = {isa = PBXBuildFile; fileRef = 912412071E73342200E41FD7 /* OneSignalWebView.m */; }; - 9124123C1E73342200E41FD7 /* OneSignalWebView.m in Sources */ = {isa = PBXBuildFile; fileRef = 912412071E73342200E41FD7 /* OneSignalWebView.m */; }; 9124123D1E73342200E41FD7 /* UIApplicationDelegate+OneSignal.h in Headers */ = {isa = PBXBuildFile; fileRef = 912412081E73342200E41FD7 /* UIApplicationDelegate+OneSignal.h */; }; 9124123E1E73342200E41FD7 /* UIApplicationDelegate+OneSignal.m in Sources */ = {isa = PBXBuildFile; fileRef = 912412091E73342200E41FD7 /* UIApplicationDelegate+OneSignal.m */; }; 9124123F1E73342200E41FD7 /* UIApplicationDelegate+OneSignal.m in Sources */ = {isa = PBXBuildFile; fileRef = 912412091E73342200E41FD7 /* UIApplicationDelegate+OneSignal.m */; }; 912412401E73342200E41FD7 /* UIApplicationDelegate+OneSignal.m in Sources */ = {isa = PBXBuildFile; fileRef = 912412091E73342200E41FD7 /* UIApplicationDelegate+OneSignal.m */; }; - 912412411E73342200E41FD7 /* UNUserNotificationCenter+OneSignal.h in Headers */ = {isa = PBXBuildFile; fileRef = 9124120A1E73342200E41FD7 /* UNUserNotificationCenter+OneSignal.h */; }; - 912412421E73342200E41FD7 /* UNUserNotificationCenter+OneSignal.m in Sources */ = {isa = PBXBuildFile; fileRef = 9124120B1E73342200E41FD7 /* UNUserNotificationCenter+OneSignal.m */; }; - 912412431E73342200E41FD7 /* UNUserNotificationCenter+OneSignal.m in Sources */ = {isa = PBXBuildFile; fileRef = 9124120B1E73342200E41FD7 /* UNUserNotificationCenter+OneSignal.m */; }; - 912412441E73342200E41FD7 /* UNUserNotificationCenter+OneSignal.m in Sources */ = {isa = PBXBuildFile; fileRef = 9124120B1E73342200E41FD7 /* UNUserNotificationCenter+OneSignal.m */; }; 912412471E73369600E41FD7 /* OneSignalHelper.m in Sources */ = {isa = PBXBuildFile; fileRef = 912411F51E73342200E41FD7 /* OneSignalHelper.m */; }; 912412481E73369700E41FD7 /* OneSignalHelper.m in Sources */ = {isa = PBXBuildFile; fileRef = 912411F51E73342200E41FD7 /* OneSignalHelper.m */; }; 912412491E73369800E41FD7 /* OneSignalHelper.m in Sources */ = {isa = PBXBuildFile; fileRef = 912411F51E73342200E41FD7 /* OneSignalHelper.m */; }; - 9129C6B71E89E59B009CB6A0 /* OSPermission.h in Headers */ = {isa = PBXBuildFile; fileRef = 9129C6B51E89E59B009CB6A0 /* OSPermission.h */; }; - 9129C6B81E89E59B009CB6A0 /* OSPermission.m in Sources */ = {isa = PBXBuildFile; fileRef = 9129C6B61E89E59B009CB6A0 /* OSPermission.m */; }; - 9129C6B91E89E59B009CB6A0 /* OSPermission.m in Sources */ = {isa = PBXBuildFile; fileRef = 9129C6B61E89E59B009CB6A0 /* OSPermission.m */; }; - 9129C6BA1E89E59B009CB6A0 /* OSPermission.m in Sources */ = {isa = PBXBuildFile; fileRef = 9129C6B61E89E59B009CB6A0 /* OSPermission.m */; }; - 9129C6BD1E89E7AB009CB6A0 /* OSSubscription.h in Headers */ = {isa = PBXBuildFile; fileRef = 9129C6BB1E89E7AB009CB6A0 /* OSSubscription.h */; }; - 9129C6BE1E89E7AB009CB6A0 /* OSSubscription.m in Sources */ = {isa = PBXBuildFile; fileRef = 9129C6BC1E89E7AB009CB6A0 /* OSSubscription.m */; }; - 9129C6BF1E89E7AB009CB6A0 /* OSSubscription.m in Sources */ = {isa = PBXBuildFile; fileRef = 9129C6BC1E89E7AB009CB6A0 /* OSSubscription.m */; }; - 9129C6C01E89E7AB009CB6A0 /* OSSubscription.m in Sources */ = {isa = PBXBuildFile; fileRef = 9129C6BC1E89E7AB009CB6A0 /* OSSubscription.m */; }; 91719A9C1E80839500DBE43C /* UserNotifications.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 911E2CC71E399834003112A4 /* UserNotifications.framework */; }; - 918CB0301E73388E0067130F /* OneSignal.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 912411F01E73342200E41FD7 /* OneSignal.h */; }; - 91B6EA411E85D38F00B5CF01 /* OSObservable.m in Sources */ = {isa = PBXBuildFile; fileRef = 91B6EA401E85D38F00B5CF01 /* OSObservable.m */; }; - 91B6EA421E85D38F00B5CF01 /* OSObservable.m in Sources */ = {isa = PBXBuildFile; fileRef = 91B6EA401E85D38F00B5CF01 /* OSObservable.m */; }; - 91B6EA431E85D38F00B5CF01 /* OSObservable.m in Sources */ = {isa = PBXBuildFile; fileRef = 91B6EA401E85D38F00B5CF01 /* OSObservable.m */; }; - 91B6EA451E86555200B5CF01 /* OSObservable.h in Headers */ = {isa = PBXBuildFile; fileRef = 91B6EA441E85D3D600B5CF01 /* OSObservable.h */; }; + 918CB0301E73388E0067130F /* OneSignalFramework.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 912411F01E73342200E41FD7 /* OneSignalFramework.h */; }; 91C7725E1E7CCE1000D612D0 /* OneSignalInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 91C7725D1E7CCE1000D612D0 /* OneSignalInternal.h */; }; - 91F58D7A1E7C7D3F0017D24D /* OneSignalNotificationSettings.h in Headers */ = {isa = PBXBuildFile; fileRef = 91F58D791E7C7D3F0017D24D /* OneSignalNotificationSettings.h */; }; - 91F58D7D1E7C7F330017D24D /* OneSignalNotificationSettingsIOS10.m in Sources */ = {isa = PBXBuildFile; fileRef = 91F58D7C1E7C7F330017D24D /* OneSignalNotificationSettingsIOS10.m */; }; - 91F58D7F1E7C7F5F0017D24D /* OneSignalNotificationSettingsIOS10.h in Headers */ = {isa = PBXBuildFile; fileRef = 91F58D7E1E7C7F5F0017D24D /* OneSignalNotificationSettingsIOS10.h */; }; - 91F58D811E7C80C30017D24D /* OneSignalNotificationSettingsIOS9.h in Headers */ = {isa = PBXBuildFile; fileRef = 91F58D801E7C80C30017D24D /* OneSignalNotificationSettingsIOS9.h */; }; - 91F58D831E7C80DA0017D24D /* OneSignalNotificationSettingsIOS9.m in Sources */ = {isa = PBXBuildFile; fileRef = 91F58D821E7C80DA0017D24D /* OneSignalNotificationSettingsIOS9.m */; }; - 91F58D841E7C88220017D24D /* OneSignalNotificationSettingsIOS10.m in Sources */ = {isa = PBXBuildFile; fileRef = 91F58D7C1E7C7F330017D24D /* OneSignalNotificationSettingsIOS10.m */; }; - 91F58D851E7C88230017D24D /* OneSignalNotificationSettingsIOS10.m in Sources */ = {isa = PBXBuildFile; fileRef = 91F58D7C1E7C7F330017D24D /* OneSignalNotificationSettingsIOS10.m */; }; - 91F58D861E7C88250017D24D /* OneSignalNotificationSettingsIOS9.m in Sources */ = {isa = PBXBuildFile; fileRef = 91F58D821E7C80DA0017D24D /* OneSignalNotificationSettingsIOS9.m */; }; - 91F58D871E7C88250017D24D /* OneSignalNotificationSettingsIOS9.m in Sources */ = {isa = PBXBuildFile; fileRef = 91F58D821E7C80DA0017D24D /* OneSignalNotificationSettingsIOS9.m */; }; 91F60F7D1E80E4E400706E60 /* UncaughtExceptionHandler.m in Sources */ = {isa = PBXBuildFile; fileRef = 91F60F7C1E80E4E400706E60 /* UncaughtExceptionHandler.m */; }; - 9D1BD9622379F41B00A064F7 /* OSOutcomeEvent.m in Sources */ = {isa = PBXBuildFile; fileRef = 9D1BD95F2379E7C300A064F7 /* OSOutcomeEvent.m */; }; - 9D1BD96A237A28FC00A064F7 /* OSCachedUniqueOutcome.m in Sources */ = {isa = PBXBuildFile; fileRef = 9D1BD967237A28FC00A064F7 /* OSCachedUniqueOutcome.m */; }; - 9D1BD96D237B57CA00A064F7 /* OneSignalCacheCleaner.m in Sources */ = {isa = PBXBuildFile; fileRef = 9D1BD96C237B57CA00A064F7 /* OneSignalCacheCleaner.m */; }; - 9D1BD96E237B57CA00A064F7 /* OneSignalCacheCleaner.m in Sources */ = {isa = PBXBuildFile; fileRef = 9D1BD96C237B57CA00A064F7 /* OneSignalCacheCleaner.m */; }; - 9D1BD96F237B57CA00A064F7 /* OneSignalCacheCleaner.m in Sources */ = {isa = PBXBuildFile; fileRef = 9D1BD96C237B57CA00A064F7 /* OneSignalCacheCleaner.m */; }; - 9D3300F523145AF3000F0A83 /* OneSignalViewHelper.m in Sources */ = {isa = PBXBuildFile; fileRef = 9D3300F223145AF3000F0A83 /* OneSignalViewHelper.m */; }; - 9D3300F623145AF3000F0A83 /* OneSignalViewHelper.m in Sources */ = {isa = PBXBuildFile; fileRef = 9D3300F223145AF3000F0A83 /* OneSignalViewHelper.m */; }; + 944F7ED1296F9F0700AEBA54 /* OneSignalLiveActivityController.h in Headers */ = {isa = PBXBuildFile; fileRef = 944F7ED0296F892400AEBA54 /* OneSignalLiveActivityController.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 944F7ED2296F9F1200AEBA54 /* OneSignalLiveActivityController.m in Sources */ = {isa = PBXBuildFile; fileRef = 944F7ECE296F890900AEBA54 /* OneSignalLiveActivityController.m */; }; 9D3300FA23149DAE000F0A83 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9D3300F923149DAE000F0A83 /* CoreGraphics.framework */; }; 9D348537233C669E00EB81C9 /* CoreLocation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9D348536233C669E00EB81C9 /* CoreLocation.framework */; }; 9D34853A233D2E3600EB81C9 /* OneSignalLocationOverrider.m in Sources */ = {isa = PBXBuildFile; fileRef = 9D348539233D2E3600EB81C9 /* OneSignalLocationOverrider.m */; }; 9D59C2F82321C7720008ECCF /* WebKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CACBAAAB218A662B000ACAA5 /* WebKit.framework */; }; 9D59C2F92321C7780008ECCF /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9D3300F923149DAE000F0A83 /* CoreGraphics.framework */; }; - 9DDFEEF223189C0800EAE0BB /* OneSignalViewHelper.h in Headers */ = {isa = PBXBuildFile; fileRef = 9D3300F423145AF3000F0A83 /* OneSignalViewHelper.h */; }; - 9DDFEEF323189C0E00EAE0BB /* OneSignalViewHelper.m in Sources */ = {isa = PBXBuildFile; fileRef = 9D3300F223145AF3000F0A83 /* OneSignalViewHelper.m */; }; - A63E9E3826742B4100EA273E /* LanguageProviderAppDefined.m in Sources */ = {isa = PBXBuildFile; fileRef = A6B519A92669747B00AED40E /* LanguageProviderAppDefined.m */; }; - A63E9E3926742B4200EA273E /* LanguageProviderAppDefined.m in Sources */ = {isa = PBXBuildFile; fileRef = A6B519A92669747B00AED40E /* LanguageProviderAppDefined.m */; }; - A63E9E3A26742B4600EA273E /* LanguageProviderDevice.m in Sources */ = {isa = PBXBuildFile; fileRef = A6B519AC2669749100AED40E /* LanguageProviderDevice.m */; }; - A63E9E3B26742B4700EA273E /* LanguageProviderDevice.m in Sources */ = {isa = PBXBuildFile; fileRef = A6B519AC2669749100AED40E /* LanguageProviderDevice.m */; }; - A63E9E3C26742B5F00EA273E /* LanguageContext.m in Sources */ = {isa = PBXBuildFile; fileRef = A6B519A52669614A00AED40E /* LanguageContext.m */; }; - A63E9E3D26742B6000EA273E /* LanguageContext.m in Sources */ = {isa = PBXBuildFile; fileRef = A6B519A52669614A00AED40E /* LanguageContext.m */; }; - A63E9E3E26742C1000EA273E /* LanguageContext.h in Headers */ = {isa = PBXBuildFile; fileRef = A6B519A42669614A00AED40E /* LanguageContext.h */; }; - A63E9E3F26742C1400EA273E /* LanguageProvider.h in Headers */ = {isa = PBXBuildFile; fileRef = A6B519A7266964BA00AED40E /* LanguageProvider.h */; }; - A63E9E4026742C1600EA273E /* LanguageProviderAppDefined.h in Headers */ = {isa = PBXBuildFile; fileRef = A6B519A82669747B00AED40E /* LanguageProviderAppDefined.h */; }; - A63E9E4126742C1800EA273E /* LanguageProviderDevice.h in Headers */ = {isa = PBXBuildFile; fileRef = A6B519AB2669749100AED40E /* LanguageProviderDevice.h */; }; A662399326850DDE00D52FD8 /* LanguageTest.m in Sources */ = {isa = PBXBuildFile; fileRef = A662399026850DDE00D52FD8 /* LanguageTest.m */; }; - A66239952686612F00D52FD8 /* OneSignal.h in Headers */ = {isa = PBXBuildFile; fileRef = 912411F01E73342200E41FD7 /* OneSignal.h */; settings = {ATTRIBUTES = (Public, ); }; }; - A6B519A62669614A00AED40E /* LanguageContext.m in Sources */ = {isa = PBXBuildFile; fileRef = A6B519A52669614A00AED40E /* LanguageContext.m */; }; - A6B519AA2669747B00AED40E /* LanguageProviderAppDefined.m in Sources */ = {isa = PBXBuildFile; fileRef = A6B519A92669747B00AED40E /* LanguageProviderAppDefined.m */; }; - A6B519AD2669749100AED40E /* LanguageProviderDevice.m in Sources */ = {isa = PBXBuildFile; fileRef = A6B519AC2669749100AED40E /* LanguageProviderDevice.m */; }; - A6D7093B2694D200007B3347 /* OneSignalSetLanguageParameters.h in Headers */ = {isa = PBXBuildFile; fileRef = A6D709392694D200007B3347 /* OneSignalSetLanguageParameters.h */; }; - A6D7093C2694D200007B3347 /* OneSignalSetLanguageParameters.m in Sources */ = {isa = PBXBuildFile; fileRef = A6D7093A2694D200007B3347 /* OneSignalSetLanguageParameters.m */; }; - A6D7093D26962C95007B3347 /* OneSignalSetLanguageParameters.m in Sources */ = {isa = PBXBuildFile; fileRef = A6D7093A2694D200007B3347 /* OneSignalSetLanguageParameters.m */; }; - A6D7093E26962C96007B3347 /* OneSignalSetLanguageParameters.m in Sources */ = {isa = PBXBuildFile; fileRef = A6D7093A2694D200007B3347 /* OneSignalSetLanguageParameters.m */; }; + A66239952686612F00D52FD8 /* OneSignalFramework.h in Headers */ = {isa = PBXBuildFile; fileRef = 912411F01E73342200E41FD7 /* OneSignalFramework.h */; settings = {ATTRIBUTES = (Public, ); }; }; CA08FC871FE99BB4004C445F /* OneSignalClientOverrider.m in Sources */ = {isa = PBXBuildFile; fileRef = CA08FC831FE99BB4004C445F /* OneSignalClientOverrider.m */; }; CA1A6E6920DC2E31001C41B9 /* OneSignalDialogController.h in Headers */ = {isa = PBXBuildFile; fileRef = CA1A6E6720DC2E31001C41B9 /* OneSignalDialogController.h */; }; CA1A6E6A20DC2E31001C41B9 /* OneSignalDialogController.m in Sources */ = {isa = PBXBuildFile; fileRef = CA1A6E6820DC2E31001C41B9 /* OneSignalDialogController.m */; }; @@ -310,71 +206,23 @@ CA1A6E7120DC2E73001C41B9 /* OneSignalDialogRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = CA1A6E6E20DC2E73001C41B9 /* OneSignalDialogRequest.m */; }; CA1A6E7220DC2E73001C41B9 /* OneSignalDialogRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = CA1A6E6E20DC2E73001C41B9 /* OneSignalDialogRequest.m */; }; CA1A6E7820DC2F04001C41B9 /* OneSignalDialogControllerOverrider.m in Sources */ = {isa = PBXBuildFile; fileRef = CA1A6E7420DC2F04001C41B9 /* OneSignalDialogControllerOverrider.m */; }; - CA36F35821C33A2500300C77 /* OSInAppMessageController.h in Headers */ = {isa = PBXBuildFile; fileRef = CA36F35621C33A2500300C77 /* OSInAppMessageController.h */; }; - CA36F35921C33A2500300C77 /* OSInAppMessageController.m in Sources */ = {isa = PBXBuildFile; fileRef = CA36F35721C33A2500300C77 /* OSInAppMessageController.m */; }; - CA36F35A21C33A2500300C77 /* OSInAppMessageController.m in Sources */ = {isa = PBXBuildFile; fileRef = CA36F35721C33A2500300C77 /* OSInAppMessageController.m */; }; - CA36F35B21C33A2500300C77 /* OSInAppMessageController.m in Sources */ = {isa = PBXBuildFile; fileRef = CA36F35721C33A2500300C77 /* OSInAppMessageController.m */; }; CA42CAC320D99CB90001F2F2 /* ProvisionalAuthorizationTests.m in Sources */ = {isa = PBXBuildFile; fileRef = CA42CAC220D99CB90001F2F2 /* ProvisionalAuthorizationTests.m */; }; - CA4742E4218B8FF30020DC8C /* OSTriggerController.h in Headers */ = {isa = PBXBuildFile; fileRef = CA4742E2218B8FF30020DC8C /* OSTriggerController.h */; }; - CA4742E5218B8FF30020DC8C /* OSTriggerController.m in Sources */ = {isa = PBXBuildFile; fileRef = CA4742E3218B8FF30020DC8C /* OSTriggerController.m */; }; - CA4742E6218B8FF30020DC8C /* OSTriggerController.m in Sources */ = {isa = PBXBuildFile; fileRef = CA4742E3218B8FF30020DC8C /* OSTriggerController.m */; }; - CA4742E7218B8FF30020DC8C /* OSTriggerController.m in Sources */ = {isa = PBXBuildFile; fileRef = CA4742E3218B8FF30020DC8C /* OSTriggerController.m */; }; - CA47439D2190FEA80020DC8C /* OSTrigger.h in Headers */ = {isa = PBXBuildFile; fileRef = CA47439B2190FEA80020DC8C /* OSTrigger.h */; }; - CA47439E2190FEA80020DC8C /* OSTrigger.m in Sources */ = {isa = PBXBuildFile; fileRef = CA47439C2190FEA80020DC8C /* OSTrigger.m */; }; - CA47439F2190FEA80020DC8C /* OSTrigger.m in Sources */ = {isa = PBXBuildFile; fileRef = CA47439C2190FEA80020DC8C /* OSTrigger.m */; }; - CA4743A02190FEA80020DC8C /* OSTrigger.m in Sources */ = {isa = PBXBuildFile; fileRef = CA47439C2190FEA80020DC8C /* OSTrigger.m */; }; CA63AF8420211F7400E340FB /* EmailTests.m in Sources */ = {isa = PBXBuildFile; fileRef = CA63AF8320211F7400E340FB /* EmailTests.m */; }; CA63AF8720211FF800E340FB /* UnitTestCommonMethods.m in Sources */ = {isa = PBXBuildFile; fileRef = CA63AF8620211FF800E340FB /* UnitTestCommonMethods.m */; }; - CA70E3352023D51000019273 /* OneSignalSetEmailParameters.m in Sources */ = {isa = PBXBuildFile; fileRef = CA70E3342023D51000019273 /* OneSignalSetEmailParameters.m */; }; - CA70E3362023D51300019273 /* OneSignalSetEmailParameters.m in Sources */ = {isa = PBXBuildFile; fileRef = CA70E3342023D51000019273 /* OneSignalSetEmailParameters.m */; }; - CA70E3372023D51300019273 /* OneSignalSetEmailParameters.m in Sources */ = {isa = PBXBuildFile; fileRef = CA70E3342023D51000019273 /* OneSignalSetEmailParameters.m */; }; - CA7FC89F21927229002C4FD9 /* OSDynamicTriggerController.h in Headers */ = {isa = PBXBuildFile; fileRef = CA7FC89D21927229002C4FD9 /* OSDynamicTriggerController.h */; }; - CA7FC8A021927229002C4FD9 /* OSDynamicTriggerController.m in Sources */ = {isa = PBXBuildFile; fileRef = CA7FC89E21927229002C4FD9 /* OSDynamicTriggerController.m */; }; - CA7FC8A121927229002C4FD9 /* OSDynamicTriggerController.m in Sources */ = {isa = PBXBuildFile; fileRef = CA7FC89E21927229002C4FD9 /* OSDynamicTriggerController.m */; }; - CA7FC8A221927229002C4FD9 /* OSDynamicTriggerController.m in Sources */ = {isa = PBXBuildFile; fileRef = CA7FC89E21927229002C4FD9 /* OSDynamicTriggerController.m */; }; - CA810FD1202BA97300A60FED /* OSEmailSubscription.m in Sources */ = {isa = PBXBuildFile; fileRef = CA810FD0202BA97300A60FED /* OSEmailSubscription.m */; }; - CA810FD2202BA97600A60FED /* OSEmailSubscription.m in Sources */ = {isa = PBXBuildFile; fileRef = CA810FD0202BA97300A60FED /* OSEmailSubscription.m */; }; - CA810FD3202BA97600A60FED /* OSEmailSubscription.m in Sources */ = {isa = PBXBuildFile; fileRef = CA810FD0202BA97300A60FED /* OSEmailSubscription.m */; }; CA85C15320604AEA003AB529 /* RequestTests.m in Sources */ = {isa = PBXBuildFile; fileRef = CA85C15220604AEA003AB529 /* RequestTests.m */; }; CA8E18FF2193A1A5009DA223 /* NSTimerOverrider.m in Sources */ = {isa = PBXBuildFile; fileRef = CA8E18FB2193A1A5009DA223 /* NSTimerOverrider.m */; }; CA8E19022193C6B0009DA223 /* InAppMessagingIntegrationTests.m in Sources */ = {isa = PBXBuildFile; fileRef = CA8E19012193C6B0009DA223 /* InAppMessagingIntegrationTests.m */; }; CA8E19062193C76D009DA223 /* OSInAppMessagingHelpers.m in Sources */ = {isa = PBXBuildFile; fileRef = CA8E19042193C76D009DA223 /* OSInAppMessagingHelpers.m */; }; - CA8E19072193C76D009DA223 /* OSInAppMessagingHelpers.m in Sources */ = {isa = PBXBuildFile; fileRef = CA8E19042193C76D009DA223 /* OSInAppMessagingHelpers.m */; }; CA8E19082193C76D009DA223 /* OSInAppMessagingHelpers.m in Sources */ = {isa = PBXBuildFile; fileRef = CA8E19042193C76D009DA223 /* OSInAppMessagingHelpers.m */; }; CA8E190B2194FE0B009DA223 /* OSMessagingControllerOverrider.m in Sources */ = {isa = PBXBuildFile; fileRef = CA8E190A2194FE0B009DA223 /* OSMessagingControllerOverrider.m */; }; CAA4ED0120646762005BD59B /* BadgeTests.m in Sources */ = {isa = PBXBuildFile; fileRef = CAA4ED0020646762005BD59B /* BadgeTests.m */; }; CAAE0DFD2195216900A57402 /* OneSignalOverrider.m in Sources */ = {isa = PBXBuildFile; fileRef = CAAE0DFC2195216900A57402 /* OneSignalOverrider.m */; }; - CAB269D921B0B6F000F8A43C /* OSInAppMessageAction.h in Headers */ = {isa = PBXBuildFile; fileRef = CAB269D721B0B6F000F8A43C /* OSInAppMessageAction.h */; }; - CAB269DA21B0B6F000F8A43C /* OSInAppMessageAction.m in Sources */ = {isa = PBXBuildFile; fileRef = CAB269D821B0B6F000F8A43C /* OSInAppMessageAction.m */; }; - CAB269DB21B0B6F000F8A43C /* OSInAppMessageAction.m in Sources */ = {isa = PBXBuildFile; fileRef = CAB269D821B0B6F000F8A43C /* OSInAppMessageAction.m */; }; - CAB269DC21B0B6F000F8A43C /* OSInAppMessageAction.m in Sources */ = {isa = PBXBuildFile; fileRef = CAB269D821B0B6F000F8A43C /* OSInAppMessageAction.m */; }; - CAB269DF21B2038B00F8A43C /* OSInAppMessageBridgeEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = CAB269DD21B2038B00F8A43C /* OSInAppMessageBridgeEvent.h */; }; - CAB269E021B2038B00F8A43C /* OSInAppMessageBridgeEvent.m in Sources */ = {isa = PBXBuildFile; fileRef = CAB269DE21B2038B00F8A43C /* OSInAppMessageBridgeEvent.m */; }; - CAB269E121B2038B00F8A43C /* OSInAppMessageBridgeEvent.m in Sources */ = {isa = PBXBuildFile; fileRef = CAB269DE21B2038B00F8A43C /* OSInAppMessageBridgeEvent.m */; }; - CAB269E221B2038B00F8A43C /* OSInAppMessageBridgeEvent.m in Sources */ = {isa = PBXBuildFile; fileRef = CAB269DE21B2038B00F8A43C /* OSInAppMessageBridgeEvent.m */; }; CAB4112920852E48005A70D1 /* DelayedConsentInitializationParameters.m in Sources */ = {isa = PBXBuildFile; fileRef = CAB4112820852E48005A70D1 /* DelayedConsentInitializationParameters.m */; }; CAB4112A20852E4C005A70D1 /* DelayedConsentInitializationParameters.m in Sources */ = {isa = PBXBuildFile; fileRef = CAB4112820852E48005A70D1 /* DelayedConsentInitializationParameters.m */; }; CAB4112B20852E4C005A70D1 /* DelayedConsentInitializationParameters.m in Sources */ = {isa = PBXBuildFile; fileRef = CAB4112820852E48005A70D1 /* DelayedConsentInitializationParameters.m */; }; - CACBAA96218A6243000ACAA5 /* OSInAppMessageViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = CACBAA8D218A6242000ACAA5 /* OSInAppMessageViewController.h */; }; - CACBAA97218A6243000ACAA5 /* OSMessagingController.m in Sources */ = {isa = PBXBuildFile; fileRef = CACBAA8E218A6242000ACAA5 /* OSMessagingController.m */; }; - CACBAA98218A6243000ACAA5 /* OSMessagingController.m in Sources */ = {isa = PBXBuildFile; fileRef = CACBAA8E218A6242000ACAA5 /* OSMessagingController.m */; }; - CACBAA99218A6243000ACAA5 /* OSMessagingController.m in Sources */ = {isa = PBXBuildFile; fileRef = CACBAA8E218A6242000ACAA5 /* OSMessagingController.m */; }; - CACBAA9B218A6243000ACAA5 /* OSMessagingController.h in Headers */ = {isa = PBXBuildFile; fileRef = CACBAA90218A6242000ACAA5 /* OSMessagingController.h */; }; - CACBAA9C218A6243000ACAA5 /* OSInAppMessageView.h in Headers */ = {isa = PBXBuildFile; fileRef = CACBAA91218A6242000ACAA5 /* OSInAppMessageView.h */; }; - CACBAA9D218A6243000ACAA5 /* OSInAppMessageView.m in Sources */ = {isa = PBXBuildFile; fileRef = CACBAA92218A6242000ACAA5 /* OSInAppMessageView.m */; }; - CACBAA9E218A6243000ACAA5 /* OSInAppMessageView.m in Sources */ = {isa = PBXBuildFile; fileRef = CACBAA92218A6242000ACAA5 /* OSInAppMessageView.m */; }; - CACBAA9F218A6243000ACAA5 /* OSInAppMessageView.m in Sources */ = {isa = PBXBuildFile; fileRef = CACBAA92218A6242000ACAA5 /* OSInAppMessageView.m */; }; - CACBAAA0218A6243000ACAA5 /* OSInAppMessageInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = CACBAA93218A6243000ACAA5 /* OSInAppMessageInternal.h */; }; - CACBAAA1218A6243000ACAA5 /* OSInAppMessageInternal.m in Sources */ = {isa = PBXBuildFile; fileRef = CACBAA94218A6243000ACAA5 /* OSInAppMessageInternal.m */; }; - CACBAAA2218A6243000ACAA5 /* OSInAppMessageInternal.m in Sources */ = {isa = PBXBuildFile; fileRef = CACBAA94218A6243000ACAA5 /* OSInAppMessageInternal.m */; }; - CACBAAA3218A6243000ACAA5 /* OSInAppMessageInternal.m in Sources */ = {isa = PBXBuildFile; fileRef = CACBAA94218A6243000ACAA5 /* OSInAppMessageInternal.m */; }; - CACBAAA4218A6243000ACAA5 /* OSInAppMessageViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = CACBAA95218A6243000ACAA5 /* OSInAppMessageViewController.m */; }; - CACBAAA5218A6243000ACAA5 /* OSInAppMessageViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = CACBAA95218A6243000ACAA5 /* OSInAppMessageViewController.m */; }; - CACBAAA6218A6243000ACAA5 /* OSInAppMessageViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = CACBAA95218A6243000ACAA5 /* OSInAppMessageViewController.m */; }; CACBAAAA218A65AE000ACAA5 /* InAppMessagingTests.m in Sources */ = {isa = PBXBuildFile; fileRef = CACBAAA9218A65AE000ACAA5 /* InAppMessagingTests.m */; }; CACBAAAC218A662B000ACAA5 /* WebKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CACBAAAB218A662B000ACAA5 /* WebKit.framework */; }; CACBAAB4218A7113000ACAA5 /* WebKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CACBAAAB218A662B000ACAA5 /* WebKit.framework */; }; - CAEA1C66202BB3C600FBFE9E /* OSEmailSubscription.h in Headers */ = {isa = PBXBuildFile; fileRef = CA810FCF202BA97300A60FED /* OSEmailSubscription.h */; }; DE16C14424D3724700670EFA /* OneSignalLifecycleObserver.m in Sources */ = {isa = PBXBuildFile; fileRef = DE16C14324D3724700670EFA /* OneSignalLifecycleObserver.m */; }; DE16C14524D3724700670EFA /* OneSignalLifecycleObserver.m in Sources */ = {isa = PBXBuildFile; fileRef = DE16C14324D3724700670EFA /* OneSignalLifecycleObserver.m */; }; DE16C14724D3727200670EFA /* OneSignalLifecycleObserver.h in Headers */ = {isa = PBXBuildFile; fileRef = DE16C14624D3727200670EFA /* OneSignalLifecycleObserver.h */; }; @@ -382,18 +230,23 @@ DE20425E24E21C2C00350E4F /* UIApplication+OneSignal.m in Sources */ = {isa = PBXBuildFile; fileRef = DE20425D24E21C2C00350E4F /* UIApplication+OneSignal.m */; }; DE20425F24E21C2C00350E4F /* UIApplication+OneSignal.m in Sources */ = {isa = PBXBuildFile; fileRef = DE20425D24E21C2C00350E4F /* UIApplication+OneSignal.m */; }; DE20426024E21C2C00350E4F /* UIApplication+OneSignal.m in Sources */ = {isa = PBXBuildFile; fileRef = DE20425D24E21C2C00350E4F /* UIApplication+OneSignal.m */; }; - DE367CC724EEF2BE00165207 /* OSInAppMessagePage.m in Sources */ = {isa = PBXBuildFile; fileRef = DE367CC624EEF2BE00165207 /* OSInAppMessagePage.m */; }; - DE367CC824EEF2BE00165207 /* OSInAppMessagePage.m in Sources */ = {isa = PBXBuildFile; fileRef = DE367CC624EEF2BE00165207 /* OSInAppMessagePage.m */; }; - DE367CC924EEF2BE00165207 /* OSInAppMessagePage.m in Sources */ = {isa = PBXBuildFile; fileRef = DE367CC624EEF2BE00165207 /* OSInAppMessagePage.m */; }; - DE367CCA24EEF2C800165207 /* OSInAppMessagePage.h in Headers */ = {isa = PBXBuildFile; fileRef = DE367CC524EEF2A800165207 /* OSInAppMessagePage.h */; }; - DE3CD2F9270F9A6D00A5BECD /* OSNotification+OneSignal.m in Sources */ = {isa = PBXBuildFile; fileRef = DE3CD2F8270F9A6D00A5BECD /* OSNotification+OneSignal.m */; }; - DE3CD2FA270F9A6D00A5BECD /* OSNotification+OneSignal.m in Sources */ = {isa = PBXBuildFile; fileRef = DE3CD2F8270F9A6D00A5BECD /* OSNotification+OneSignal.m */; }; - DE3CD2FB270F9A6D00A5BECD /* OSNotification+OneSignal.m in Sources */ = {isa = PBXBuildFile; fileRef = DE3CD2F8270F9A6D00A5BECD /* OSNotification+OneSignal.m */; }; - DE3CD2FD270F9A8100A5BECD /* OSNotification+OneSignal.h in Headers */ = {isa = PBXBuildFile; fileRef = DE3CD2FC270F9A8100A5BECD /* OSNotification+OneSignal.h */; }; - DE3CD2FF270FA9F200A5BECD /* OneSignalOutcomes.m in Sources */ = {isa = PBXBuildFile; fileRef = DE3CD2FE270FA9F200A5BECD /* OneSignalOutcomes.m */; }; - DE3CD300270FA9F200A5BECD /* OneSignalOutcomes.m in Sources */ = {isa = PBXBuildFile; fileRef = DE3CD2FE270FA9F200A5BECD /* OneSignalOutcomes.m */; }; + DE2D8F452947D85800844084 /* OneSignalExtension.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DE7D17F927026BA3002D3A5D /* OneSignalExtension.framework */; }; + DE2D8F4A2947D86200844084 /* OneSignalOutcomes.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DE7D188027037F43002D3A5D /* OneSignalOutcomes.framework */; }; + DE3784842888CFF900453A8E /* OneSignalUser.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DE69E19B282ED8060090BB3D /* OneSignalUser.framework */; }; + DE3784852888D00300453A8E /* OneSignalUser.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DE69E19B282ED8060090BB3D /* OneSignalUser.framework */; }; + DE3784862888D00B00453A8E /* OneSignalUser.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = DE69E19B282ED8060090BB3D /* OneSignalUser.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; + DE3CD300270FA9F200A5BECD /* OSOutcomes.m in Sources */ = {isa = PBXBuildFile; fileRef = DE3CD2FE270FA9F200A5BECD /* OSOutcomes.m */; }; + DE51DDE5294262AB0073D5C4 /* OSRemoteParamController.m in Sources */ = {isa = PBXBuildFile; fileRef = DE51DDE3294262AB0073D5C4 /* OSRemoteParamController.m */; }; + DE51DDE6294262AB0073D5C4 /* OSRemoteParamController.h in Headers */ = {isa = PBXBuildFile; fileRef = DE51DDE4294262AB0073D5C4 /* OSRemoteParamController.h */; settings = {ATTRIBUTES = (Public, ); }; }; DE5EFECA24D8DBF70032632D /* OSInAppMessageViewControllerOverrider.m in Sources */ = {isa = PBXBuildFile; fileRef = DE5EFEC924D8DBF70032632D /* OSInAppMessageViewControllerOverrider.m */; }; - DE75B3E028BD432800162A95 /* OneSignalUNUserNotificationCenterOverrider.m in Sources */ = {isa = PBXBuildFile; fileRef = DE75B3DE28BD432700162A95 /* OneSignalUNUserNotificationCenterOverrider.m */; }; + DE69E19F282ED8060090BB3D /* OneSignalUser.docc in Sources */ = {isa = PBXBuildFile; fileRef = DE69E19E282ED8060090BB3D /* OneSignalUser.docc */; }; + DE69E1A0282ED8060090BB3D /* OneSignalUser.h in Headers */ = {isa = PBXBuildFile; fileRef = DE69E19D282ED8060090BB3D /* OneSignalUser.h */; settings = {ATTRIBUTES = (Public, ); }; }; + DE69E1AC282ED87A0090BB3D /* OneSignalUserManagerImpl.swift in Sources */ = {isa = PBXBuildFile; fileRef = DE69E1AA282ED8790090BB3D /* OneSignalUserManagerImpl.swift */; }; + DE69E1B2282ED9430090BB3D /* OneSignalUser.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DE69E19B282ED8060090BB3D /* OneSignalUser.framework */; }; + DE70EB922A5CACF5003166D3 /* OneSignalWebViewManager.m in Sources */ = {isa = PBXBuildFile; fileRef = DEF7847F29146BBE00A1F3A5 /* OneSignalWebViewManager.m */; }; + DE70EB932A5CACF5003166D3 /* OneSignalWebView.m in Sources */ = {isa = PBXBuildFile; fileRef = DEF7847B29146B2700A1F3A5 /* OneSignalWebView.m */; }; + DE70EB942A5CAD70003166D3 /* OneSignalWebView.h in Headers */ = {isa = PBXBuildFile; fileRef = DEF7847C29146B2700A1F3A5 /* OneSignalWebView.h */; }; + DE70EB952A5CAD77003166D3 /* OneSignalWebViewManager.h in Headers */ = {isa = PBXBuildFile; fileRef = DEF7848129146BD100A1F3A5 /* OneSignalWebViewManager.h */; }; DE7D17EA27026B95002D3A5D /* OneSignalCore.docc in Sources */ = {isa = PBXBuildFile; fileRef = DE7D17E927026B95002D3A5D /* OneSignalCore.docc */; }; DE7D17EB27026B95002D3A5D /* OneSignalCore.h in Headers */ = {isa = PBXBuildFile; fileRef = DE7D17E827026B95002D3A5D /* OneSignalCore.h */; settings = {ATTRIBUTES = (Public, ); }; }; DE7D17FD27026BA3002D3A5D /* OneSignalExtension.docc in Sources */ = {isa = PBXBuildFile; fileRef = DE7D17FC27026BA3002D3A5D /* OneSignalExtension.docc */; }; @@ -429,20 +282,15 @@ DE7D184C27028890002D3A5D /* OneSignalExtensionRequests.m in Sources */ = {isa = PBXBuildFile; fileRef = DE7D184B27028890002D3A5D /* OneSignalExtensionRequests.m */; }; DE7D184E270288C6002D3A5D /* OneSignalExtensionRequests.h in Headers */ = {isa = PBXBuildFile; fileRef = DE7D184D270288C6002D3A5D /* OneSignalExtensionRequests.h */; }; DE7D1862270374EE002D3A5D /* OSJSONHandling.h in Headers */ = {isa = PBXBuildFile; fileRef = DE7D185B270374EE002D3A5D /* OSJSONHandling.h */; settings = {ATTRIBUTES = (Public, ); }; }; - DE7D1863270374EE002D3A5D /* OneSignalClient.m in Sources */ = {isa = PBXBuildFile; fileRef = DE7D185C270374EE002D3A5D /* OneSignalClient.m */; }; DE7D1864270374EE002D3A5D /* OneSignalClient.m in Sources */ = {isa = PBXBuildFile; fileRef = DE7D185C270374EE002D3A5D /* OneSignalClient.m */; }; DE7D1868270374EE002D3A5D /* OneSignalRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = DE7D185F270374EE002D3A5D /* OneSignalRequest.h */; settings = {ATTRIBUTES = (Public, ); }; }; DE7D1869270374EE002D3A5D /* OneSignalClient.h in Headers */ = {isa = PBXBuildFile; fileRef = DE7D1860270374EE002D3A5D /* OneSignalClient.h */; settings = {ATTRIBUTES = (Public, ); }; }; - DE7D186A270374EE002D3A5D /* OneSignalRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = DE7D1861270374EE002D3A5D /* OneSignalRequest.m */; }; DE7D186B270374EE002D3A5D /* OneSignalRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = DE7D1861270374EE002D3A5D /* OneSignalRequest.m */; }; DE7D186E2703751B002D3A5D /* OSRequests.h in Headers */ = {isa = PBXBuildFile; fileRef = DE7D186C2703751B002D3A5D /* OSRequests.h */; settings = {ATTRIBUTES = (Public, ); }; }; - DE7D186F2703751B002D3A5D /* OSRequests.m in Sources */ = {isa = PBXBuildFile; fileRef = DE7D186D2703751B002D3A5D /* OSRequests.m */; }; DE7D18702703751B002D3A5D /* OSRequests.m in Sources */ = {isa = PBXBuildFile; fileRef = DE7D186D2703751B002D3A5D /* OSRequests.m */; }; - DE7D1873270375FF002D3A5D /* OSReattemptRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = DE7D1871270375FF002D3A5D /* OSReattemptRequest.m */; }; DE7D1874270375FF002D3A5D /* OSReattemptRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = DE7D1871270375FF002D3A5D /* OSReattemptRequest.m */; }; DE7D1875270375FF002D3A5D /* OSReattemptRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = DE7D1872270375FF002D3A5D /* OSReattemptRequest.h */; }; DE7D187727037A16002D3A5D /* OneSignalCoreHelper.h in Headers */ = {isa = PBXBuildFile; fileRef = DE7D187627037A16002D3A5D /* OneSignalCoreHelper.h */; settings = {ATTRIBUTES = (Public, ); }; }; - DE7D187927037A26002D3A5D /* OneSignalCoreHelper.m in Sources */ = {isa = PBXBuildFile; fileRef = DE7D187827037A26002D3A5D /* OneSignalCoreHelper.m */; }; DE7D187A27037A26002D3A5D /* OneSignalCoreHelper.m in Sources */ = {isa = PBXBuildFile; fileRef = DE7D187827037A26002D3A5D /* OneSignalCoreHelper.m */; }; DE7D188427037F43002D3A5D /* OneSignalOutcomes.docc in Sources */ = {isa = PBXBuildFile; fileRef = DE7D188327037F43002D3A5D /* OneSignalOutcomes.docc */; }; DE7D188527037F43002D3A5D /* OneSignalOutcomes.h in Headers */ = {isa = PBXBuildFile; fileRef = DE7D188227037F43002D3A5D /* OneSignalOutcomes.h */; settings = {ATTRIBUTES = (Public, ); }; }; @@ -487,52 +335,98 @@ DE7D18C1270381A1002D3A5D /* OSOutcomeEventsV2Repository.h in Headers */ = {isa = PBXBuildFile; fileRef = 7AF98683244A32D900C36EAE /* OSOutcomeEventsV2Repository.h */; }; DE7D18C2270381A6002D3A5D /* OSOutcomeEventsV2Repository.m in Sources */ = {isa = PBXBuildFile; fileRef = 7AF98685244A32EF00C36EAE /* OSOutcomeEventsV2Repository.m */; }; DE7D18C627038249002D3A5D /* OneSignalOutcomes.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DE7D188027037F43002D3A5D /* OneSignalOutcomes.framework */; }; - DE7D18CC270385D0002D3A5D /* OSOutcomesRequests.m in Sources */ = {isa = PBXBuildFile; fileRef = DE7D18CB270385D0002D3A5D /* OSOutcomesRequests.m */; }; DE7D18CD270385D0002D3A5D /* OSOutcomesRequests.m in Sources */ = {isa = PBXBuildFile; fileRef = DE7D18CB270385D0002D3A5D /* OSOutcomesRequests.m */; }; DE7D18CF270385E0002D3A5D /* OSOutcomesRequests.h in Headers */ = {isa = PBXBuildFile; fileRef = DE7D18CE270385E0002D3A5D /* OSOutcomesRequests.h */; }; DE7D18D1270389E1002D3A5D /* OSMacros.h in Headers */ = {isa = PBXBuildFile; fileRef = 7AE28B8725B8ADF400529100 /* OSMacros.h */; settings = {ATTRIBUTES = (Public, ); }; }; DE7D18D22703ADE0002D3A5D /* OneSignalOutcomes.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DE7D188027037F43002D3A5D /* OneSignalOutcomes.framework */; }; DE7D18D62703B103002D3A5D /* OSInAppMessageOutcome.m in Sources */ = {isa = PBXBuildFile; fileRef = 7A880F2A23FB45FB0081F5E8 /* OSInAppMessageOutcome.m */; }; DE7D18D72703B111002D3A5D /* OSInAppMessageOutcome.h in Headers */ = {isa = PBXBuildFile; fileRef = 7A880F2923FB45CE0081F5E8 /* OSInAppMessageOutcome.h */; settings = {ATTRIBUTES = (Public, ); }; }; - DE7D18D82703B11B002D3A5D /* OSInAppMessageOutcome.m in Sources */ = {isa = PBXBuildFile; fileRef = 7A880F2A23FB45FB0081F5E8 /* OSInAppMessageOutcome.m */; }; DE7D18DD2703B44B002D3A5D /* OSFocusRequests.h in Headers */ = {isa = PBXBuildFile; fileRef = DE7D18DC2703B44B002D3A5D /* OSFocusRequests.h */; }; DE7D18DF2703B49B002D3A5D /* OSFocusRequests.m in Sources */ = {isa = PBXBuildFile; fileRef = DE7D18DE2703B49B002D3A5D /* OSFocusRequests.m */; }; DE7D18E02703B49B002D3A5D /* OSFocusRequests.m in Sources */ = {isa = PBXBuildFile; fileRef = DE7D18DE2703B49B002D3A5D /* OSFocusRequests.m */; }; DE7D18E12703B49B002D3A5D /* OSFocusRequests.m in Sources */ = {isa = PBXBuildFile; fileRef = DE7D18DE2703B49B002D3A5D /* OSFocusRequests.m */; }; - DE7D18E32703B503002D3A5D /* OSLocationRequests.h in Headers */ = {isa = PBXBuildFile; fileRef = DE7D18E22703B503002D3A5D /* OSLocationRequests.h */; }; - DE7D18E52703B510002D3A5D /* OSLocationRequests.m in Sources */ = {isa = PBXBuildFile; fileRef = DE7D18E42703B510002D3A5D /* OSLocationRequests.m */; }; - DE7D18E62703B510002D3A5D /* OSLocationRequests.m in Sources */ = {isa = PBXBuildFile; fileRef = DE7D18E42703B510002D3A5D /* OSLocationRequests.m */; }; - DE7D18E72703B510002D3A5D /* OSLocationRequests.m in Sources */ = {isa = PBXBuildFile; fileRef = DE7D18E42703B510002D3A5D /* OSLocationRequests.m */; }; - DE7D18EC2703B5AA002D3A5D /* OSInAppMessagingRequests.h in Headers */ = {isa = PBXBuildFile; fileRef = DE7D18EB2703B5AA002D3A5D /* OSInAppMessagingRequests.h */; }; - DE7D18EE2703B5B9002D3A5D /* OSInAppMessagingRequests.m in Sources */ = {isa = PBXBuildFile; fileRef = DE7D18ED2703B5B9002D3A5D /* OSInAppMessagingRequests.m */; }; - DE7D18EF2703B5B9002D3A5D /* OSInAppMessagingRequests.m in Sources */ = {isa = PBXBuildFile; fileRef = DE7D18ED2703B5B9002D3A5D /* OSInAppMessagingRequests.m */; }; - DE7D18F02703B5B9002D3A5D /* OSInAppMessagingRequests.m in Sources */ = {isa = PBXBuildFile; fileRef = DE7D18ED2703B5B9002D3A5D /* OSInAppMessagingRequests.m */; }; DE971752274C48B700FC409E /* OSPrivacyConsentController.m in Sources */ = {isa = PBXBuildFile; fileRef = DE971751274C48B700FC409E /* OSPrivacyConsentController.m */; }; DE971754274C48CF00FC409E /* OSPrivacyConsentController.h in Headers */ = {isa = PBXBuildFile; fileRef = DE971753274C48CF00FC409E /* OSPrivacyConsentController.h */; settings = {ATTRIBUTES = (Public, ); }; }; - DE971755274C4B0C00FC409E /* OSPrivacyConsentController.m in Sources */ = {isa = PBXBuildFile; fileRef = DE971751274C48B700FC409E /* OSPrivacyConsentController.m */; }; DE9717642756BCFB00FC409E /* OneSignalExtension.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DE7D17F927026BA3002D3A5D /* OneSignalExtension.framework */; }; DE9717662756BCFD00FC409E /* OneSignalCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DE7D17E627026B95002D3A5D /* OneSignalCore.framework */; }; - DE98772B2591656200DE07D5 /* NSDateFormatter+OneSignal.m in Sources */ = {isa = PBXBuildFile; fileRef = DE98772A2591655800DE07D5 /* NSDateFormatter+OneSignal.m */; }; - DE9877332591656200DE07D5 /* NSDateFormatter+OneSignal.m in Sources */ = {isa = PBXBuildFile; fileRef = DE98772A2591655800DE07D5 /* NSDateFormatter+OneSignal.m */; }; - DE9877342591656300DE07D5 /* NSDateFormatter+OneSignal.m in Sources */ = {isa = PBXBuildFile; fileRef = DE98772A2591655800DE07D5 /* NSDateFormatter+OneSignal.m */; }; - DE98773C2591656A00DE07D5 /* NSDateFormatter+OneSignal.h in Headers */ = {isa = PBXBuildFile; fileRef = DE9877292591654600DE07D5 /* NSDateFormatter+OneSignal.h */; }; - DE9A5DAA25D1FD6B00FCEC21 /* OSPlayerTags.h in Headers */ = {isa = PBXBuildFile; fileRef = DE9A5DA925D1FD6B00FCEC21 /* OSPlayerTags.h */; }; - DE9A5DB325D1FD8000FCEC21 /* OSPlayerTags.m in Sources */ = {isa = PBXBuildFile; fileRef = DE9A5DB225D1FD8000FCEC21 /* OSPlayerTags.m */; }; - DE9A5DB425D1FD8000FCEC21 /* OSPlayerTags.m in Sources */ = {isa = PBXBuildFile; fileRef = DE9A5DB225D1FD8000FCEC21 /* OSPlayerTags.m */; }; - DE9A5DB525D1FD8000FCEC21 /* OSPlayerTags.m in Sources */ = {isa = PBXBuildFile; fileRef = DE9A5DB225D1FD8000FCEC21 /* OSPlayerTags.m */; }; - DEAD6F98270B829700DE7C67 /* OneSignalLog.m in Sources */ = {isa = PBXBuildFile; fileRef = DE7D183327027A73002D3A5D /* OneSignalLog.m */; }; - DEAD6F99270B829F00DE7C67 /* OneSignalTrackFirebaseAnalytics.m in Sources */ = {isa = PBXBuildFile; fileRef = 4529DF0B1FA932AC00CEAB1D /* OneSignalTrackFirebaseAnalytics.m */; }; - DEAD6F9A270B82A100DE7C67 /* OneSignalUserDefaults.m in Sources */ = {isa = PBXBuildFile; fileRef = 7AD8DDE6234BD3BE00747A8A /* OneSignalUserDefaults.m */; }; - DEAD6F9B270B82A300DE7C67 /* OSNotification.m in Sources */ = {isa = PBXBuildFile; fileRef = 454F94F41FAD2E5A00D74CCF /* OSNotification.m */; }; - DEAD6F9C270B82AA00DE7C67 /* NSString+OneSignal.m in Sources */ = {isa = PBXBuildFile; fileRef = 1AF75EAD1E8567FD0097B315 /* NSString+OneSignal.m */; }; - DEAD6F9D270B82AD00DE7C67 /* NSURL+OneSignal.m in Sources */ = {isa = PBXBuildFile; fileRef = CA36A42B208FDEFB003EFA9A /* NSURL+OneSignal.m */; }; - DEAD6F9E270B83A300DE7C67 /* OneSignalExtension.m in Sources */ = {isa = PBXBuildFile; fileRef = DE7D182227026DD1002D3A5D /* OneSignalExtension.m */; }; - DEAD6F9F270B83A700DE7C67 /* OneSignalNotificationServiceExtensionHandler.m in Sources */ = {isa = PBXBuildFile; fileRef = 454F94F11FAD218000D74CCF /* OneSignalNotificationServiceExtensionHandler.m */; }; - DEAD6FA0270B83AA00DE7C67 /* OneSignalExtensionBadgeHandler.m in Sources */ = {isa = PBXBuildFile; fileRef = CAABF34A205B15780042F8E5 /* OneSignalExtensionBadgeHandler.m */; }; - DEAD6FA1270B83AD00DE7C67 /* OneSignalNotificationCategoryController.m in Sources */ = {isa = PBXBuildFile; fileRef = CAAEA68521ED68A30049CF15 /* OneSignalNotificationCategoryController.m */; }; - DEAD6FA2270B83AF00DE7C67 /* OneSignalAttachmentHandler.m in Sources */ = {isa = PBXBuildFile; fileRef = DE7D183927027CD7002D3A5D /* OneSignalAttachmentHandler.m */; }; - DEAD6FA3270B83B100DE7C67 /* OneSignalReceiveReceiptsController.m in Sources */ = {isa = PBXBuildFile; fileRef = 7A9173A1231971E5007848FA /* OneSignalReceiveReceiptsController.m */; }; - DEAD6FA4270B83B300DE7C67 /* OneSignalExtensionRequests.m in Sources */ = {isa = PBXBuildFile; fileRef = DE7D184B27028890002D3A5D /* OneSignalExtensionRequests.m */; }; + DEA4B44E2888AF8900E9FE12 /* OneSignalUNUserNotificationCenterOverrider.m in Sources */ = {isa = PBXBuildFile; fileRef = DEA4B44C2888AF8900E9FE12 /* OneSignalUNUserNotificationCenterOverrider.m */; }; + DEA4B45A2888BFAB00E9FE12 /* OneSignalCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DE7D17E627026B95002D3A5D /* OneSignalCore.framework */; }; + DEA4B45C2888C1D000E9FE12 /* OneSignalCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DE7D17E627026B95002D3A5D /* OneSignalCore.framework */; }; + DEA4B45D2888C1D000E9FE12 /* OneSignalCore.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = DE7D17E627026B95002D3A5D /* OneSignalCore.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; + DEA4B4622888C4D500E9FE12 /* OneSignalOutcomes.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DE7D188027037F43002D3A5D /* OneSignalOutcomes.framework */; }; + DEA4B4632888C4DC00E9FE12 /* OneSignalOutcomes.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = DE7D188027037F43002D3A5D /* OneSignalOutcomes.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; + DEA4B4642888C4E200E9FE12 /* OneSignalOutcomes.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DE7D188027037F43002D3A5D /* OneSignalOutcomes.framework */; }; + DEA4B4652888C59100E9FE12 /* OneSignalExtension.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DE7D17F927026BA3002D3A5D /* OneSignalExtension.framework */; }; + DEA4B4662888C59E00E9FE12 /* OneSignalExtension.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = DE7D17F927026BA3002D3A5D /* OneSignalExtension.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; + DEA4B4672888C5F200E9FE12 /* OneSignalExtension.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DE7D17F927026BA3002D3A5D /* OneSignalExtension.framework */; }; + DEA98C1928C90EE5000C6856 /* OneSignalCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DE7D17E627026B95002D3A5D /* OneSignalCore.framework */; }; + DEA98C1C28C90EE6000C6856 /* OneSignalOSCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3C115161289A259500565C41 /* OneSignalOSCore.framework */; }; + DEA98C1E28C90EE9000C6856 /* OneSignalCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DE7D17E627026B95002D3A5D /* OneSignalCore.framework */; }; + DEBAADFC2A420A3900BF2C1C /* OneSignalLocationManager.h in Headers */ = {isa = PBXBuildFile; fileRef = DEBAADFB2A420A3900BF2C1C /* OneSignalLocationManager.h */; settings = {ATTRIBUTES = (Public, ); }; }; + DEBAAE042A420C9800BF2C1C /* OneSignalCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DE7D17E627026B95002D3A5D /* OneSignalCore.framework */; }; + DEBAAE0A2A420CA500BF2C1C /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DEBAAE092A420CA500BF2C1C /* UIKit.framework */; }; + DEBAAE0B2A420CC000BF2C1C /* OneSignalUser.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DE69E19B282ED8060090BB3D /* OneSignalUser.framework */; }; + DEBAAE102A420CC900BF2C1C /* OneSignalNotifications.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DEF784292912DEB600A1F3A5 /* OneSignalNotifications.framework */; }; + DEBAAE142A420CCF00BF2C1C /* OneSignalOSCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3C115161289A259500565C41 /* OneSignalOSCore.framework */; }; + DEBAAE192A420D6500BF2C1C /* OneSignalLocationManager.m in Sources */ = {isa = PBXBuildFile; fileRef = DEBAAE182A420D6500BF2C1C /* OneSignalLocationManager.m */; }; + DEBAAE2B2A4211DA00BF2C1C /* OneSignalInAppMessages.h in Headers */ = {isa = PBXBuildFile; fileRef = DEBAAE2A2A4211DA00BF2C1C /* OneSignalInAppMessages.h */; settings = {ATTRIBUTES = (Public, ); }; }; + DEBAAE2E2A4211DA00BF2C1C /* OneSignalInAppMessages.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DEBAAE282A4211D900BF2C1C /* OneSignalInAppMessages.framework */; }; + DEBAAE2F2A4211DA00BF2C1C /* OneSignalInAppMessages.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = DEBAAE282A4211D900BF2C1C /* OneSignalInAppMessages.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; + DEBAAE342A42120D00BF2C1C /* OneSignalCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DE7D17E627026B95002D3A5D /* OneSignalCore.framework */; }; + DEBAAE392A42121100BF2C1C /* OneSignalOSCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3C115161289A259500565C41 /* OneSignalOSCore.framework */; }; + DEBAAE3D2A42121400BF2C1C /* OneSignalNotifications.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DEF784292912DEB600A1F3A5 /* OneSignalNotifications.framework */; }; + DEBAAE412A42121700BF2C1C /* OneSignalUser.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DE69E19B282ED8060090BB3D /* OneSignalUser.framework */; }; + DEBAAE452A42122000BF2C1C /* OneSignalOutcomes.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DE7D188027037F43002D3A5D /* OneSignalOutcomes.framework */; }; + DEBAAE492A42123000BF2C1C /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DEBAAE092A420CA500BF2C1C /* UIKit.framework */; }; + DEBAAE4B2A42123400BF2C1C /* WebKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DEBAAE4A2A42123400BF2C1C /* WebKit.framework */; }; + DEBAAE542A42174A00BF2C1C /* OSInAppMessageViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = DEBAAE502A42174A00BF2C1C /* OSInAppMessageViewController.m */; }; + DEBAAE552A42174A00BF2C1C /* OSInAppMessageView.h in Headers */ = {isa = PBXBuildFile; fileRef = DEBAAE512A42174A00BF2C1C /* OSInAppMessageView.h */; }; + DEBAAE562A42174A00BF2C1C /* OSInAppMessageViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = DEBAAE522A42174A00BF2C1C /* OSInAppMessageViewController.h */; }; + DEBAAE572A42174A00BF2C1C /* OSInAppMessageView.m in Sources */ = {isa = PBXBuildFile; fileRef = DEBAAE532A42174A00BF2C1C /* OSInAppMessageView.m */; }; + DEBAAE602A42175A00BF2C1C /* OSDynamicTriggerController.m in Sources */ = {isa = PBXBuildFile; fileRef = DEBAAE582A42175900BF2C1C /* OSDynamicTriggerController.m */; }; + DEBAAE612A42175A00BF2C1C /* OSMessagingController.h in Headers */ = {isa = PBXBuildFile; fileRef = DEBAAE592A42175900BF2C1C /* OSMessagingController.h */; }; + DEBAAE622A42175A00BF2C1C /* OSInAppMessageController.h in Headers */ = {isa = PBXBuildFile; fileRef = DEBAAE5A2A42175900BF2C1C /* OSInAppMessageController.h */; }; + DEBAAE632A42175A00BF2C1C /* OSInAppMessageController.m in Sources */ = {isa = PBXBuildFile; fileRef = DEBAAE5B2A42175900BF2C1C /* OSInAppMessageController.m */; }; + DEBAAE642A42175A00BF2C1C /* OSTriggerController.h in Headers */ = {isa = PBXBuildFile; fileRef = DEBAAE5C2A42175900BF2C1C /* OSTriggerController.h */; }; + DEBAAE652A42175A00BF2C1C /* OSMessagingController.m in Sources */ = {isa = PBXBuildFile; fileRef = DEBAAE5D2A42175900BF2C1C /* OSMessagingController.m */; }; + DEBAAE662A42175A00BF2C1C /* OSDynamicTriggerController.h in Headers */ = {isa = PBXBuildFile; fileRef = DEBAAE5E2A42175900BF2C1C /* OSDynamicTriggerController.h */; }; + DEBAAE672A42175A00BF2C1C /* OSTriggerController.m in Sources */ = {isa = PBXBuildFile; fileRef = DEBAAE5F2A42175900BF2C1C /* OSTriggerController.m */; }; + DEBAAE7D2A42176800BF2C1C /* OSInAppMessagePage.h in Headers */ = {isa = PBXBuildFile; fileRef = DEBAAE682A42176600BF2C1C /* OSInAppMessagePage.h */; }; + DEBAAE7E2A42176800BF2C1C /* OSInAppMessageDisplayStats.h in Headers */ = {isa = PBXBuildFile; fileRef = DEBAAE692A42176600BF2C1C /* OSInAppMessageDisplayStats.h */; }; + DEBAAE7F2A42176800BF2C1C /* OSInAppMessageTag.m in Sources */ = {isa = PBXBuildFile; fileRef = DEBAAE6A2A42176600BF2C1C /* OSInAppMessageTag.m */; }; + DEBAAE802A42176800BF2C1C /* OSInAppMessageInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = DEBAAE6B2A42176600BF2C1C /* OSInAppMessageInternal.h */; }; + DEBAAE812A42176800BF2C1C /* OSTrigger.m in Sources */ = {isa = PBXBuildFile; fileRef = DEBAAE6C2A42176600BF2C1C /* OSTrigger.m */; }; + DEBAAE822A42176800BF2C1C /* OSInAppMessagePrompt.h in Headers */ = {isa = PBXBuildFile; fileRef = DEBAAE6D2A42176600BF2C1C /* OSInAppMessagePrompt.h */; }; + DEBAAE832A42176800BF2C1C /* OSInAppMessageLocationPrompt.m in Sources */ = {isa = PBXBuildFile; fileRef = DEBAAE6E2A42176600BF2C1C /* OSInAppMessageLocationPrompt.m */; }; + DEBAAE842A42176800BF2C1C /* OSInAppMessageDisplayStats.m in Sources */ = {isa = PBXBuildFile; fileRef = DEBAAE6F2A42176700BF2C1C /* OSInAppMessageDisplayStats.m */; }; + DEBAAE852A42176800BF2C1C /* OSInAppMessageTag.h in Headers */ = {isa = PBXBuildFile; fileRef = DEBAAE702A42176700BF2C1C /* OSInAppMessageTag.h */; }; + DEBAAE862A42176800BF2C1C /* OSTrigger.h in Headers */ = {isa = PBXBuildFile; fileRef = DEBAAE712A42176700BF2C1C /* OSTrigger.h */; }; + DEBAAE872A42176800BF2C1C /* OSInAppMessageBridgeEvent.m in Sources */ = {isa = PBXBuildFile; fileRef = DEBAAE722A42176700BF2C1C /* OSInAppMessageBridgeEvent.m */; }; + DEBAAE882A42176800BF2C1C /* OSInAppMessageClickEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = DEBAAE732A42176700BF2C1C /* OSInAppMessageClickEvent.h */; }; + DEBAAE892A42176800BF2C1C /* OSInAppMessageClickEvent.m in Sources */ = {isa = PBXBuildFile; fileRef = DEBAAE742A42176700BF2C1C /* OSInAppMessageClickEvent.m */; }; + DEBAAE8A2A42176800BF2C1C /* OSInAppMessageInternal.m in Sources */ = {isa = PBXBuildFile; fileRef = DEBAAE752A42176700BF2C1C /* OSInAppMessageInternal.m */; }; + DEBAAE8B2A42176800BF2C1C /* OSInAppMessageClickResult.h in Headers */ = {isa = PBXBuildFile; fileRef = DEBAAE762A42176700BF2C1C /* OSInAppMessageClickResult.h */; }; + DEBAAE8C2A42176800BF2C1C /* OSInAppMessagePushPrompt.m in Sources */ = {isa = PBXBuildFile; fileRef = DEBAAE772A42176700BF2C1C /* OSInAppMessagePushPrompt.m */; }; + DEBAAE8D2A42176800BF2C1C /* OSInAppMessageBridgeEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = DEBAAE782A42176700BF2C1C /* OSInAppMessageBridgeEvent.h */; }; + DEBAAE8E2A42176800BF2C1C /* OSInAppMessageClickResult.m in Sources */ = {isa = PBXBuildFile; fileRef = DEBAAE792A42176700BF2C1C /* OSInAppMessageClickResult.m */; }; + DEBAAE8F2A42176800BF2C1C /* OSInAppMessageLocationPrompt.h in Headers */ = {isa = PBXBuildFile; fileRef = DEBAAE7A2A42176800BF2C1C /* OSInAppMessageLocationPrompt.h */; }; + DEBAAE902A42176800BF2C1C /* OSInAppMessagePage.m in Sources */ = {isa = PBXBuildFile; fileRef = DEBAAE7B2A42176800BF2C1C /* OSInAppMessagePage.m */; }; + DEBAAE912A42176800BF2C1C /* OSInAppMessagePushPrompt.h in Headers */ = {isa = PBXBuildFile; fileRef = DEBAAE7C2A42176800BF2C1C /* OSInAppMessagePushPrompt.h */; }; + DEBAAE942A42177B00BF2C1C /* OSInAppMessagingRequests.h in Headers */ = {isa = PBXBuildFile; fileRef = DEBAAE922A42177B00BF2C1C /* OSInAppMessagingRequests.h */; }; + DEBAAE952A42177B00BF2C1C /* OSInAppMessagingRequests.m in Sources */ = {isa = PBXBuildFile; fileRef = DEBAAE932A42177B00BF2C1C /* OSInAppMessagingRequests.m */; }; + DEBAAE972A42178800BF2C1C /* OSInAppMessagingDefines.h in Headers */ = {isa = PBXBuildFile; fileRef = DEBAAE962A42178800BF2C1C /* OSInAppMessagingDefines.h */; }; + DEBAAE992A42179A00BF2C1C /* OneSignalInAppMessages.m in Sources */ = {isa = PBXBuildFile; fileRef = DEBAAE982A42179A00BF2C1C /* OneSignalInAppMessages.m */; }; + DEBAAE9B2A4222B000BF2C1C /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DEBAAE9A2A4222B000BF2C1C /* CoreGraphics.framework */; }; + DEBAAEB02A435B4D00BF2C1C /* OSLocation.h in Headers */ = {isa = PBXBuildFile; fileRef = DEBAAEAE2A435AC800BF2C1C /* OSLocation.h */; settings = {ATTRIBUTES = (Public, ); }; }; + DEBAAEB12A435B5100BF2C1C /* OSInAppMessages.h in Headers */ = {isa = PBXBuildFile; fileRef = DEBAAEAF2A435AE900BF2C1C /* OSInAppMessages.h */; settings = {ATTRIBUTES = (Public, ); }; }; + DEBAAEB32A436CE800BF2C1C /* OSStubInAppMessages.m in Sources */ = {isa = PBXBuildFile; fileRef = DEBAAEB22A436CE800BF2C1C /* OSStubInAppMessages.m */; }; + DEBAAEB52A436D5D00BF2C1C /* OSStubLocation.m in Sources */ = {isa = PBXBuildFile; fileRef = DEBAAEB42A436D5D00BF2C1C /* OSStubLocation.m */; }; + DEBAAEB82A4381AE00BF2C1C /* OSInAppMessageMigrationController.h in Headers */ = {isa = PBXBuildFile; fileRef = DEBAAEB62A4381AE00BF2C1C /* OSInAppMessageMigrationController.h */; }; + DEBAAEB92A4381AE00BF2C1C /* OSInAppMessageMigrationController.m in Sources */ = {isa = PBXBuildFile; fileRef = DEBAAEB72A4381AE00BF2C1C /* OSInAppMessageMigrationController.m */; }; + DEC08B002947D4E900C81DA3 /* OneSignalSwiftInterface.swift in Sources */ = {isa = PBXBuildFile; fileRef = DEC08AFF2947D4E900C81DA3 /* OneSignalSwiftInterface.swift */; }; + DEC08B012947D4E900C81DA3 /* OneSignalSwiftInterface.swift in Sources */ = {isa = PBXBuildFile; fileRef = DEC08AFF2947D4E900C81DA3 /* OneSignalSwiftInterface.swift */; }; + DEC08B022947D4E900C81DA3 /* OneSignalSwiftInterface.swift in Sources */ = {isa = PBXBuildFile; fileRef = DEC08AFF2947D4E900C81DA3 /* OneSignalSwiftInterface.swift */; }; + DECE6F5B28C90821007058EE /* OneSignalOSCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3C115161289A259500565C41 /* OneSignalOSCore.framework */; }; DEE8198D24E21DF000868CBA /* UIApplication+OneSignal.h in Headers */ = {isa = PBXBuildFile; fileRef = DE20425C24E21C1500350E4F /* UIApplication+OneSignal.h */; }; DEF5CCF52539321A0003E9CC /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = DEF5CCF42539321A0003E9CC /* AppDelegate.m */; }; DEF5CCFB2539321A0003E9CC /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = DEF5CCFA2539321A0003E9CC /* ViewController.m */; }; @@ -543,9 +437,88 @@ DEF5CD4F253934350003E9CC /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 37E6B2BA19D9CAF300D0C601 /* UIKit.framework */; }; DEF5CD502539343C0003E9CC /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3E464ED91D88EE6A00DCF7E9 /* Foundation.framework */; }; DEF5CD52253934410003E9CC /* CoreFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DEF5CD51253934410003E9CC /* CoreFoundation.framework */; }; + DEF7842C2912DEBA00A1F3A5 /* OneSignalNotifications.h in Headers */ = {isa = PBXBuildFile; fileRef = DEF7842B2912DEBA00A1F3A5 /* OneSignalNotifications.h */; settings = {ATTRIBUTES = (Public, ); }; }; + DEF7842F2912DEBA00A1F3A5 /* OneSignalNotifications.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DEF784292912DEB600A1F3A5 /* OneSignalNotifications.framework */; }; + DEF784302912DEBA00A1F3A5 /* OneSignalNotifications.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = DEF784292912DEB600A1F3A5 /* OneSignalNotifications.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; + DEF784382912E15000A1F3A5 /* OneSignalNotifications.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DEF784292912DEB600A1F3A5 /* OneSignalNotifications.framework */; }; + DEF784422912E16F00A1F3A5 /* OneSignalCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DE7D17E627026B95002D3A5D /* OneSignalCore.framework */; }; + DEF784492912E23A00A1F3A5 /* OSNotificationsManager.m in Sources */ = {isa = PBXBuildFile; fileRef = DEF784472912E23A00A1F3A5 /* OSNotificationsManager.m */; }; + DEF7844A2912E23A00A1F3A5 /* OSNotificationsManager.h in Headers */ = {isa = PBXBuildFile; fileRef = DEF784482912E23A00A1F3A5 /* OSNotificationsManager.h */; settings = {ATTRIBUTES = (Public, ); }; }; + DEF784522912E3EB00A1F3A5 /* OneSignalNotificationSettings.h in Headers */ = {isa = PBXBuildFile; fileRef = DEF7844D2912E3EA00A1F3A5 /* OneSignalNotificationSettings.h */; settings = {ATTRIBUTES = (Public, ); }; }; + DEF784552912E3EB00A1F3A5 /* OneSignalNotificationSettings.m in Sources */ = {isa = PBXBuildFile; fileRef = DEF784502912E3EB00A1F3A5 /* OneSignalNotificationSettings.m */; }; + DEF784582912E4BA00A1F3A5 /* OSPermission.h in Headers */ = {isa = PBXBuildFile; fileRef = DEF784562912E4BA00A1F3A5 /* OSPermission.h */; settings = {ATTRIBUTES = (Public, ); }; }; + DEF784592912E4BA00A1F3A5 /* OSPermission.m in Sources */ = {isa = PBXBuildFile; fileRef = DEF784572912E4BA00A1F3A5 /* OSPermission.m */; }; + DEF7845C2912E89200A1F3A5 /* OSObservable.h in Headers */ = {isa = PBXBuildFile; fileRef = DEF7845A2912E89200A1F3A5 /* OSObservable.h */; settings = {ATTRIBUTES = (Public, ); }; }; + DEF7845D2912E89200A1F3A5 /* OSObservable.m in Sources */ = {isa = PBXBuildFile; fileRef = DEF7845B2912E89200A1F3A5 /* OSObservable.m */; }; + DEF7845F2912EA0D00A1F3A5 /* UserNotifications.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DEF7845E2912EA0C00A1F3A5 /* UserNotifications.framework */; }; + DEF784612912F5E100A1F3A5 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DEF784602912F5E000A1F3A5 /* UIKit.framework */; }; + DEF784642912FA5100A1F3A5 /* OSDialogInstanceManager.m in Sources */ = {isa = PBXBuildFile; fileRef = DEF784632912FA5100A1F3A5 /* OSDialogInstanceManager.m */; }; + DEF784652912FB2200A1F3A5 /* OSDialogInstanceManager.h in Headers */ = {isa = PBXBuildFile; fileRef = DEF784622912F79700A1F3A5 /* OSDialogInstanceManager.h */; settings = {ATTRIBUTES = (Public, ); }; }; + DEF7846B2913176800A1F3A5 /* OneSignalNotifications.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DEF784292912DEB600A1F3A5 /* OneSignalNotifications.framework */; }; + DEF7847229132AA700A1F3A5 /* OSNotification+OneSignal.h in Headers */ = {isa = PBXBuildFile; fileRef = DEF7847029132AA700A1F3A5 /* OSNotification+OneSignal.h */; settings = {ATTRIBUTES = (Public, ); }; }; + DEF7847329132AA700A1F3A5 /* OSNotification+OneSignal.m in Sources */ = {isa = PBXBuildFile; fileRef = DEF7847129132AA700A1F3A5 /* OSNotification+OneSignal.m */; }; + DEF784792914667A00A1F3A5 /* NSDateFormatter+OneSignal.h in Headers */ = {isa = PBXBuildFile; fileRef = DE9877292591654600DE07D5 /* NSDateFormatter+OneSignal.h */; settings = {ATTRIBUTES = (Public, ); }; }; + DEF7848429146DA700A1F3A5 /* WebKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DEF7848329146DA700A1F3A5 /* WebKit.framework */; }; + DEF7848A291471DA00A1F3A5 /* UNUserNotificationCenter+OneSignalNotifications.m in Sources */ = {isa = PBXBuildFile; fileRef = DEF78486291471D900A1F3A5 /* UNUserNotificationCenter+OneSignalNotifications.m */; }; + DEF7848B291471DA00A1F3A5 /* UIApplicationDelegate+OneSignalNotifications.h in Headers */ = {isa = PBXBuildFile; fileRef = DEF78487291471DA00A1F3A5 /* UIApplicationDelegate+OneSignalNotifications.h */; }; + DEF7848C291471DA00A1F3A5 /* UNUserNotificationCenter+OneSignalNotifications.h in Headers */ = {isa = PBXBuildFile; fileRef = DEF78488291471DA00A1F3A5 /* UNUserNotificationCenter+OneSignalNotifications.h */; }; + DEF7848D291471DA00A1F3A5 /* UIApplicationDelegate+OneSignalNotifications.m in Sources */ = {isa = PBXBuildFile; fileRef = DEF78489291471DA00A1F3A5 /* UIApplicationDelegate+OneSignalNotifications.m */; }; + DEF78492291479B200A1F3A5 /* OneSignalSelectorHelpers.m in Sources */ = {isa = PBXBuildFile; fileRef = DEF78490291479B200A1F3A5 /* OneSignalSelectorHelpers.m */; }; + DEF78493291479B200A1F3A5 /* OneSignalSelectorHelpers.h in Headers */ = {isa = PBXBuildFile; fileRef = DEF78491291479B200A1F3A5 /* OneSignalSelectorHelpers.h */; settings = {ATTRIBUTES = (Public, ); }; }; + DEF78496291479C100A1F3A5 /* SwizzlingForwarder.h in Headers */ = {isa = PBXBuildFile; fileRef = DEF78494291479C000A1F3A5 /* SwizzlingForwarder.h */; settings = {ATTRIBUTES = (Public, ); }; }; + DEF78497291479C100A1F3A5 /* SwizzlingForwarder.m in Sources */ = {isa = PBXBuildFile; fileRef = DEF78495291479C100A1F3A5 /* SwizzlingForwarder.m */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ + 3C115194289AF85400565C41 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 37747F8B19147D6400558FAD /* Project object */; + proxyType = 1; + remoteGlobalIDString = DE7D17E527026B95002D3A5D; + remoteInfo = OneSignalCore; + }; + 3C115199289AF86C00565C41 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 37747F8B19147D6400558FAD /* Project object */; + proxyType = 1; + remoteGlobalIDString = 3C115160289A259500565C41; + remoteInfo = OneSignalOSCore; + }; + DE12F3F4289B28C4002F63AA /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 37747F8B19147D6400558FAD /* Project object */; + proxyType = 1; + remoteGlobalIDString = 3C115160289A259500565C41; + remoteInfo = OneSignalOSCore; + }; + DE2D8F472947D85800844084 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 37747F8B19147D6400558FAD /* Project object */; + proxyType = 1; + remoteGlobalIDString = DE7D17F827026BA3002D3A5D; + remoteInfo = OneSignalExtension; + }; + DE2D8F4C2947D86200844084 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 37747F8B19147D6400558FAD /* Project object */; + proxyType = 1; + remoteGlobalIDString = DE7D187F27037F43002D3A5D; + remoteInfo = OneSignalOutcomes; + }; + DE69E1AF282ED8F20090BB3D /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 37747F8B19147D6400558FAD /* Project object */; + proxyType = 1; + remoteGlobalIDString = DE7D17E527026B95002D3A5D; + remoteInfo = OneSignalCore; + }; + DE69E1B4282ED9430090BB3D /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 37747F8B19147D6400558FAD /* Project object */; + proxyType = 1; + remoteGlobalIDString = DE69E19A282ED8060090BB3D; + remoteInfo = OneSignalUser; + }; DE7D181127026BE2002D3A5D /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 37747F8B19147D6400558FAD /* Project object */; @@ -588,6 +561,76 @@ remoteGlobalIDString = DE7D187F27037F43002D3A5D; remoteInfo = OneSignalOutcomes; }; + DEBAAE062A420C9800BF2C1C /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 37747F8B19147D6400558FAD /* Project object */; + proxyType = 1; + remoteGlobalIDString = DE7D17E527026B95002D3A5D; + remoteInfo = OneSignalCore; + }; + DEBAAE0D2A420CC100BF2C1C /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 37747F8B19147D6400558FAD /* Project object */; + proxyType = 1; + remoteGlobalIDString = DE69E19A282ED8060090BB3D; + remoteInfo = OneSignalUser; + }; + DEBAAE122A420CCA00BF2C1C /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 37747F8B19147D6400558FAD /* Project object */; + proxyType = 1; + remoteGlobalIDString = DEF784282912DEB600A1F3A5; + remoteInfo = OneSignalNotifications; + }; + DEBAAE162A420CCF00BF2C1C /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 37747F8B19147D6400558FAD /* Project object */; + proxyType = 1; + remoteGlobalIDString = 3C115160289A259500565C41; + remoteInfo = OneSignalOSCore; + }; + DEBAAE2C2A4211DA00BF2C1C /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 37747F8B19147D6400558FAD /* Project object */; + proxyType = 1; + remoteGlobalIDString = DEBAAE272A4211D900BF2C1C; + remoteInfo = OneSignalInAppMessages; + }; + DEBAAE362A42120E00BF2C1C /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 37747F8B19147D6400558FAD /* Project object */; + proxyType = 1; + remoteGlobalIDString = DE7D17E527026B95002D3A5D; + remoteInfo = OneSignalCore; + }; + DEBAAE3B2A42121100BF2C1C /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 37747F8B19147D6400558FAD /* Project object */; + proxyType = 1; + remoteGlobalIDString = 3C115160289A259500565C41; + remoteInfo = OneSignalOSCore; + }; + DEBAAE3F2A42121400BF2C1C /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 37747F8B19147D6400558FAD /* Project object */; + proxyType = 1; + remoteGlobalIDString = DEF784282912DEB600A1F3A5; + remoteInfo = OneSignalNotifications; + }; + DEBAAE432A42121800BF2C1C /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 37747F8B19147D6400558FAD /* Project object */; + proxyType = 1; + remoteGlobalIDString = DE69E19A282ED8060090BB3D; + remoteInfo = OneSignalUser; + }; + DEBAAE472A42122000BF2C1C /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 37747F8B19147D6400558FAD /* Project object */; + proxyType = 1; + remoteGlobalIDString = DE7D187F27037F43002D3A5D; + remoteInfo = OneSignalOutcomes; + }; DEF5CD11253932260003E9CC /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 37747F8B19147D6400558FAD /* Project object */; @@ -595,6 +638,34 @@ remoteGlobalIDString = DEF5CCF02539321A0003E9CC; remoteInfo = UnitTestApp; }; + DEF7842D2912DEBA00A1F3A5 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 37747F8B19147D6400558FAD /* Project object */; + proxyType = 1; + remoteGlobalIDString = DEF784282912DEB600A1F3A5; + remoteInfo = OneSignalNotifications; + }; + DEF7843A2912E15000A1F3A5 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 37747F8B19147D6400558FAD /* Project object */; + proxyType = 1; + remoteGlobalIDString = DEF784282912DEB600A1F3A5; + remoteInfo = OneSignalNotifications; + }; + DEF784442912E16F00A1F3A5 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 37747F8B19147D6400558FAD /* Project object */; + proxyType = 1; + remoteGlobalIDString = DE7D17E527026B95002D3A5D; + remoteInfo = OneSignalCore; + }; + DEF7846D2913176800A1F3A5 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 37747F8B19147D6400558FAD /* Project object */; + proxyType = 1; + remoteGlobalIDString = DEF784282912DEB600A1F3A5; + remoteInfo = OneSignalNotifications; + }; /* End PBXContainerItemProxy section */ /* Begin PBXCopyFilesBuildPhase section */ @@ -604,16 +675,23 @@ dstPath = "include/$(PRODUCT_NAME)"; dstSubfolderSpec = 16; files = ( - 918CB0301E73388E0067130F /* OneSignal.h in CopyFiles */, + 918CB0301E73388E0067130F /* OneSignalFramework.h in CopyFiles */, ); runOnlyForDeploymentPostprocessing = 0; }; - DE7D17F027026B95002D3A5D /* Embed Frameworks */ = { + DEA4B45E2888C1D000E9FE12 /* Embed Frameworks */ = { isa = PBXCopyFilesBuildPhase; buildActionMask = 2147483647; dstPath = ""; dstSubfolderSpec = 10; files = ( + DEF784302912DEBA00A1F3A5 /* OneSignalNotifications.framework in Embed Frameworks */, + DE3784862888D00B00453A8E /* OneSignalUser.framework in Embed Frameworks */, + DEA4B4662888C59E00E9FE12 /* OneSignalExtension.framework in Embed Frameworks */, + DEBAAE2F2A4211DA00BF2C1C /* OneSignalInAppMessages.framework in Embed Frameworks */, + DEA4B4632888C4DC00E9FE12 /* OneSignalOutcomes.framework in Embed Frameworks */, + DEA4B45D2888C1D000E9FE12 /* OneSignalCore.framework in Embed Frameworks */, + 3C11518F289AF83600565C41 /* OneSignalOSCore.framework in Embed Frameworks */, ); name = "Embed Frameworks"; runOnlyForDeploymentPostprocessing = 0; @@ -632,8 +710,6 @@ 03CCCC812835D90F004BF794 /* OneSignalUNUserNotificationCenterHelper.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = OneSignalUNUserNotificationCenterHelper.m; path = UNNotificationCenter/OneSignalUNUserNotificationCenterHelper.m; sourceTree = ""; }; 03CCCC822835D90F004BF794 /* OneSignalUNUserNotificationCenterHelper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OneSignalUNUserNotificationCenterHelper.h; path = UNNotificationCenter/OneSignalUNUserNotificationCenterHelper.h; sourceTree = ""; }; 03CCCC842835F291004BF794 /* UIApplicationDelegateSwizzlingTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = UIApplicationDelegateSwizzlingTests.m; sourceTree = ""; }; - 03CCCC8B283624F3004BF794 /* SwizzlingForwarder.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SwizzlingForwarder.h; sourceTree = ""; }; - 03CCCC8C283624F3004BF794 /* SwizzlingForwarder.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SwizzlingForwarder.m; sourceTree = ""; }; 03E56DD128405F4A006AA1DA /* OneSignalAppDelegateOverrider.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = OneSignalAppDelegateOverrider.h; sourceTree = ""; }; 03E56DD228405F4A006AA1DA /* OneSignalAppDelegateOverrider.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = OneSignalAppDelegateOverrider.m; sourceTree = ""; }; 16664C4B25DDB195003B8A14 /* NSTimeZoneOverrider.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = NSTimeZoneOverrider.m; sourceTree = ""; }; @@ -642,8 +718,47 @@ 1AF75EAD1E8567FD0097B315 /* NSString+OneSignal.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSString+OneSignal.m"; sourceTree = ""; }; 37747F9319147D6500558FAD /* libOneSignal.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libOneSignal.a; sourceTree = BUILT_PRODUCTS_DIR; }; 37E6B2BA19D9CAF300D0C601 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; + 3C0EF49D28A1DBCB00E5434B /* OSUserInternalImpl.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = OSUserInternalImpl.swift; sourceTree = ""; }; + 3C115161289A259500565C41 /* OneSignalOSCore.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = OneSignalOSCore.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 3C115163289A259500565C41 /* OneSignalOSCore.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = OneSignalOSCore.h; sourceTree = ""; }; + 3C115164289A259500565C41 /* OneSignalOSCore.docc */ = {isa = PBXFileReference; lastKnownFileType = folder.documentationcatalog; path = OneSignalOSCore.docc; sourceTree = ""; }; + 3C115184289ADE4F00565C41 /* OSModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OSModel.swift; sourceTree = ""; }; + 3C115186289ADE7700565C41 /* OSModelStoreListener.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OSModelStoreListener.swift; sourceTree = ""; }; + 3C115188289ADEA300565C41 /* OSModelStore.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OSModelStore.swift; sourceTree = ""; }; + 3C11518A289ADEEB00565C41 /* OSEventProducer.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OSEventProducer.swift; sourceTree = ""; }; + 3C11518C289AF5E800565C41 /* OSModelChangedHandler.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OSModelChangedHandler.swift; sourceTree = ""; }; + 3C2C7DC2288E007E0020F9AE /* UnitTests-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "UnitTests-Bridging-Header.h"; sourceTree = ""; }; + 3C2C7DC3288E007E0020F9AE /* UserModelSwiftTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UserModelSwiftTests.swift; sourceTree = ""; }; + 3C2C7DC5288E00AA0020F9AE /* UserModelObjcTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = UserModelObjcTests.m; sourceTree = ""; }; + 3C2C7DC7288F3C020020F9AE /* OSSubscriptionModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OSSubscriptionModel.swift; sourceTree = ""; }; + 3C2D8A5828B4C4E300BE41F6 /* OSDelta.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OSDelta.swift; sourceTree = ""; }; + 3C448B9B2936ADFD002F96BC /* OSBackgroundTaskHandlerImpl.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = OSBackgroundTaskHandlerImpl.h; sourceTree = ""; }; + 3C448B9C2936ADFD002F96BC /* OSBackgroundTaskHandlerImpl.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = OSBackgroundTaskHandlerImpl.m; sourceTree = ""; }; + 3C448BA12936B474002F96BC /* OSBackgroundTaskManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OSBackgroundTaskManager.swift; sourceTree = ""; }; + 3C47A972292642B100312125 /* OneSignalConfigManager.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = OneSignalConfigManager.h; sourceTree = ""; }; + 3C47A973292642B100312125 /* OneSignalConfigManager.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = OneSignalConfigManager.m; sourceTree = ""; }; + 3C4F9E4328A4466C009F453A /* OSOperationRepo.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OSOperationRepo.swift; sourceTree = ""; }; + 3C8E6DF828A6D89E0031E48A /* OSOperationExecutor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OSOperationExecutor.swift; sourceTree = ""; }; + 3C8E6DFE28AB09AE0031E48A /* OSPropertyOperationExecutor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OSPropertyOperationExecutor.swift; sourceTree = ""; }; + 3C8E6E0028AC0BA10031E48A /* OSIdentityOperationExecutor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OSIdentityOperationExecutor.swift; sourceTree = ""; }; + 3CA6CE0928E4F19B00CA0585 /* OSUserRequests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OSUserRequests.swift; sourceTree = ""; }; + 3CCF44BC299B17290021964D /* OneSignalWrapper.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = OneSignalWrapper.h; sourceTree = ""; }; + 3CCF44BD299B17290021964D /* OneSignalWrapper.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = OneSignalWrapper.m; sourceTree = ""; }; + 3CE5F9E2289D88DC004A156E /* OSModelStoreChangedHandler.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OSModelStoreChangedHandler.swift; sourceTree = ""; }; + 3CE795F828DB99B500736BD4 /* OSSubscriptionModelStoreListener.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OSSubscriptionModelStoreListener.swift; sourceTree = ""; }; + 3CE795FA28DBDCE700736BD4 /* OSSubscriptionOperationExecutor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OSSubscriptionOperationExecutor.swift; sourceTree = ""; }; + 3CE8CC4C2911ADD1000DB0D3 /* OSDeviceUtils.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = OSDeviceUtils.h; sourceTree = ""; }; + 3CE8CC4D2911ADD1000DB0D3 /* OSDeviceUtils.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = OSDeviceUtils.m; sourceTree = ""; }; + 3CE8CC502911AE90000DB0D3 /* OSNetworkingUtils.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = OSNetworkingUtils.h; sourceTree = ""; }; + 3CE8CC512911AE90000DB0D3 /* OSNetworkingUtils.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = OSNetworkingUtils.m; sourceTree = ""; }; + 3CE8CC552911B1E0000DB0D3 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk/System/iOSSupport/System/Library/Frameworks/UIKit.framework; sourceTree = DEVELOPER_DIR; }; + 3CE8CC572911B2B2000DB0D3 /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk/System/Library/Frameworks/SystemConfiguration.framework; sourceTree = DEVELOPER_DIR; }; + 3CE92279289FA88B001B1062 /* OSIdentityModelStoreListener.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OSIdentityModelStoreListener.swift; sourceTree = ""; }; + 3CF8629D28A183F900776CA4 /* OSIdentityModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OSIdentityModel.swift; sourceTree = ""; }; + 3CF8629F28A1964F00776CA4 /* OSPropertiesModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OSPropertiesModel.swift; sourceTree = ""; }; + 3CF862A128A197D200776CA4 /* OSPropertiesModelStoreListener.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OSPropertiesModelStoreListener.swift; sourceTree = ""; }; 3E08E2701D49A5C8002176DE /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = System/Library/Frameworks/SystemConfiguration.framework; sourceTree = SDKROOT; }; - 3E2400381D4FFC31008BDE70 /* OneSignal.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = OneSignal.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 3E2400381D4FFC31008BDE70 /* OneSignalFramework.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = OneSignalFramework.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 3E24003B1D4FFC31008BDE70 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 3E464ED91D88EE6A00DCF7E9 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; 4529DED01FA81EA800CEAB1D /* NSObjectOverrider.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = NSObjectOverrider.h; sourceTree = ""; }; @@ -683,47 +798,21 @@ 7A12EBD623060A6F005C4FA5 /* OSSessionManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OSSessionManager.h; sourceTree = ""; }; 7A12EBDB23060B37005C4FA5 /* OSIndirectInfluence.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OSIndirectInfluence.h; sourceTree = ""; }; 7A12EBDC23060B37005C4FA5 /* OSIndirectInfluence.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OSIndirectInfluence.m; sourceTree = ""; }; - 7A1F2D8E2406EFC5007799A9 /* OSInAppMessageTag.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = OSInAppMessageTag.m; sourceTree = ""; }; - 7A1F2D902406EFDA007799A9 /* OSInAppMessageTag.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = OSInAppMessageTag.h; sourceTree = ""; }; 7A2E90612460DA1500B3428C /* OutcomeIntegrationV2Tests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = OutcomeIntegrationV2Tests.m; sourceTree = ""; }; - 7A42742A25CDCA7800EE75FC /* OSSMSSubscription.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = OSSMSSubscription.h; sourceTree = ""; }; - 7A42744125CDE98E00EE75FC /* OSSMSSubscription.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = OSSMSSubscription.m; sourceTree = ""; }; - 7A42745325CDF05500EE75FC /* OSUserStateSMSSynchronizer.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = OSUserStateSMSSynchronizer.h; sourceTree = ""; }; - 7A42746325CDF06800EE75FC /* OSUserStateSMSSynchronizer.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = OSUserStateSMSSynchronizer.m; sourceTree = ""; }; - 7A42747F25D18F2C00EE75FC /* OneSignalSetSMSParameters.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = OneSignalSetSMSParameters.h; sourceTree = ""; }; - 7A42748825D18F4400EE75FC /* OneSignalSetSMSParameters.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = OneSignalSetSMSParameters.m; sourceTree = ""; }; 7A4274A125D1C99600EE75FC /* SMSTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SMSTests.m; sourceTree = ""; }; 7A5A818124897693002E07C8 /* MigrationTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MigrationTests.m; sourceTree = ""; }; 7A5A8184248990CD002E07C8 /* OSIndirectNotification.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = OSIndirectNotification.m; sourceTree = ""; }; 7A5A8186248990DA002E07C8 /* OSIndirectNotification.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = OSIndirectNotification.h; sourceTree = ""; }; - 7A5E71F225A66DDB00CB5605 /* OSUserStateSynchronizer.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = OSUserStateSynchronizer.h; sourceTree = ""; }; - 7A5E71FB25A66DEC00CB5605 /* OSUserStateSynchronizer.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = OSUserStateSynchronizer.m; sourceTree = ""; }; - 7A5E720625A66E0A00CB5605 /* OSUserStatePushSynchronizer.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = OSUserStatePushSynchronizer.h; sourceTree = ""; }; - 7A5E720F25A66E1600CB5605 /* OSUserStatePushSynchronizer.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = OSUserStatePushSynchronizer.m; sourceTree = ""; }; - 7A5E721A25A66E2900CB5605 /* OSUserStateEmailSynchronizer.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = OSUserStateEmailSynchronizer.h; sourceTree = ""; }; - 7A5E722325A66E3300CB5605 /* OSUserStateEmailSynchronizer.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = OSUserStateEmailSynchronizer.m; sourceTree = ""; }; - 7A5E725825A66E9800CB5605 /* OSStateSynchronizer.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = OSStateSynchronizer.h; sourceTree = ""; }; - 7A5E726125A66EA400CB5605 /* OSStateSynchronizer.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = OSStateSynchronizer.m; sourceTree = ""; }; 7A600B41245378ED00514A53 /* OSFocusInfluenceParam.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = OSFocusInfluenceParam.h; sourceTree = ""; }; 7A600B432453790700514A53 /* OSFocusInfluenceParam.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = OSFocusInfluenceParam.m; sourceTree = ""; }; 7A65D628246627AD007FF196 /* OSInAppMessageViewOverrider.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OSInAppMessageViewOverrider.h; sourceTree = ""; }; 7A65D629246627AD007FF196 /* OSInAppMessageViewOverrider.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OSInAppMessageViewOverrider.m; sourceTree = ""; }; 7A674F182360D813001F9ACD /* OSBaseFocusTimeProcessor.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = OSBaseFocusTimeProcessor.h; sourceTree = ""; }; 7A674F1A2360D82E001F9ACD /* OSBaseFocusTimeProcessor.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = OSBaseFocusTimeProcessor.m; sourceTree = ""; }; - 7A676BE424981CEC003957CC /* OSDeviceState.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = OSDeviceState.m; sourceTree = ""; }; - 7A72EB0D23E252C200B4D50F /* OSInAppMessageDisplayStats.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = OSInAppMessageDisplayStats.m; sourceTree = ""; }; - 7A72EB1123E252D400B4D50F /* OSInAppMessageDisplayStats.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = OSInAppMessageDisplayStats.h; sourceTree = ""; }; 7A880F2923FB45CE0081F5E8 /* OSInAppMessageOutcome.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = OSInAppMessageOutcome.h; sourceTree = ""; }; 7A880F2A23FB45FB0081F5E8 /* OSInAppMessageOutcome.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = OSInAppMessageOutcome.m; sourceTree = ""; }; - 7A880F2E2404AD010081F5E8 /* OSInAppMessagePrompt.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = OSInAppMessagePrompt.h; sourceTree = ""; }; - 7A880F2F2404AD920081F5E8 /* OSInAppMessagePushPrompt.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = OSInAppMessagePushPrompt.h; sourceTree = ""; }; - 7A880F302404AE7B0081F5E8 /* OSInAppMessagePushPrompt.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = OSInAppMessagePushPrompt.m; sourceTree = ""; }; 7A9173A1231971E5007848FA /* OneSignalReceiveReceiptsController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = OneSignalReceiveReceiptsController.m; sourceTree = ""; }; 7A9173A3231971F8007848FA /* OneSignalReceiveReceiptsController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = OneSignalReceiveReceiptsController.h; sourceTree = ""; }; - 7A93264725A8DD3600BBEC27 /* OSUserState.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = OSUserState.h; sourceTree = ""; }; - 7A93265025A8DD4300BBEC27 /* OSUserState.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = OSUserState.m; sourceTree = ""; }; - 7A93266925AC985500BBEC27 /* OSLocationState.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = OSLocationState.h; sourceTree = ""; }; - 7A93267225AC986400BBEC27 /* OSLocationState.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = OSLocationState.m; sourceTree = ""; }; 7A93269225AF4E6700BBEC27 /* OSPendingCallbacks.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = OSPendingCallbacks.h; sourceTree = ""; }; 7A93269B25AF4F0200BBEC27 /* OSPendingCallbacks.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = OSPendingCallbacks.m; sourceTree = ""; }; 7A94D8E0249ABF0000E90B40 /* OSUniqueOutcomeNotification.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = OSUniqueOutcomeNotification.m; sourceTree = ""; }; @@ -735,10 +824,6 @@ 7ABAF9D52457D3FF0074DFA0 /* ChannelTrackersTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ChannelTrackersTests.m; sourceTree = ""; }; 7ABAF9D72457DD620074DFA0 /* SessionManagerTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SessionManagerTests.m; sourceTree = ""; }; 7ABAF9E224606E940074DFA0 /* OutcomeV2Tests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = OutcomeV2Tests.m; sourceTree = ""; }; - 7AC0D2162576940100E29448 /* OneSignalSetExternalIdParameters.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = OneSignalSetExternalIdParameters.h; sourceTree = ""; }; - 7AC0D2172576944F00E29448 /* OneSignalSetExternalIdParameters.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = OneSignalSetExternalIdParameters.m; sourceTree = ""; }; - 7AD172362416D52D00A78B19 /* OSInAppMessageLocationPrompt.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = OSInAppMessageLocationPrompt.h; sourceTree = ""; }; - 7AD172372416D53B00A78B19 /* OSInAppMessageLocationPrompt.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = OSInAppMessageLocationPrompt.m; sourceTree = ""; }; 7AD8DDE6234BD3BE00747A8A /* OneSignalUserDefaults.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = OneSignalUserDefaults.m; sourceTree = ""; }; 7AD8DDE8234BD3CF00747A8A /* OneSignalUserDefaults.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = OneSignalUserDefaults.h; sourceTree = ""; }; 7ADE379322E8B69C00263048 /* OneSignalOutcomeEventsController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OneSignalOutcomeEventsController.m; sourceTree = ""; }; @@ -750,8 +835,6 @@ 7AECE59923674ADC00537907 /* OSUnattributedFocusTimeProcessor.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = OSUnattributedFocusTimeProcessor.h; sourceTree = ""; }; 7AECE59B23675F5700537907 /* OSFocusTimeProcessorFactory.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = OSFocusTimeProcessorFactory.h; sourceTree = ""; }; 7AECE59D23675F6300537907 /* OSFocusTimeProcessorFactory.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = OSFocusTimeProcessorFactory.m; sourceTree = ""; }; - 7AF5174424FDC2A100B076BC /* OSRemoteParamController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = OSRemoteParamController.h; sourceTree = ""; }; - 7AF5174624FDC2C500B076BC /* OSRemoteParamController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = OSRemoteParamController.m; sourceTree = ""; }; 7AF5174B24FE980400B076BC /* RemoteParamsTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RemoteParamsTests.m; sourceTree = ""; }; 7AF986342444C41A00C36EAE /* OSChannelTracker.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = OSChannelTracker.m; sourceTree = ""; }; 7AF986382444C42700C36EAE /* OSChannelTracker.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = OSChannelTracker.h; sourceTree = ""; }; @@ -787,67 +870,37 @@ 911E2CBC1E398AB3003112A4 /* UnitTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = UnitTests.m; sourceTree = ""; }; 911E2CBE1E398AB3003112A4 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 911E2CC71E399834003112A4 /* UserNotifications.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UserNotifications.framework; path = System/Library/Frameworks/UserNotifications.framework; sourceTree = SDKROOT; }; - 912411F01E73342200E41FD7 /* OneSignal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OneSignal.h; sourceTree = ""; }; + 912411F01E73342200E41FD7 /* OneSignalFramework.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OneSignalFramework.h; sourceTree = ""; }; 912411F11E73342200E41FD7 /* OneSignal.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OneSignal.m; sourceTree = ""; }; 912411F41E73342200E41FD7 /* OneSignalHelper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OneSignalHelper.h; sourceTree = ""; }; 912411F51E73342200E41FD7 /* OneSignalHelper.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OneSignalHelper.m; sourceTree = ""; }; 912411F81E73342200E41FD7 /* OneSignalJailbreakDetection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OneSignalJailbreakDetection.h; sourceTree = ""; }; 912411F91E73342200E41FD7 /* OneSignalJailbreakDetection.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OneSignalJailbreakDetection.m; sourceTree = ""; }; - 912411FA1E73342200E41FD7 /* OneSignalLocation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OneSignalLocation.h; sourceTree = ""; }; - 912411FB1E73342200E41FD7 /* OneSignalLocation.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OneSignalLocation.m; sourceTree = ""; }; 912411FC1E73342200E41FD7 /* OneSignalMobileProvision.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OneSignalMobileProvision.h; sourceTree = ""; }; 912411FD1E73342200E41FD7 /* OneSignalMobileProvision.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OneSignalMobileProvision.m; sourceTree = ""; }; 912411FE1E73342200E41FD7 /* OneSignalReachability.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OneSignalReachability.h; sourceTree = ""; }; 912411FF1E73342200E41FD7 /* OneSignalReachability.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OneSignalReachability.m; sourceTree = ""; }; - 912412001E73342200E41FD7 /* OneSignalSelectorHelpers.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OneSignalSelectorHelpers.h; sourceTree = ""; }; - 912412011E73342200E41FD7 /* OneSignalSelectorHelpers.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OneSignalSelectorHelpers.m; sourceTree = ""; }; 912412021E73342200E41FD7 /* OneSignalTracker.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OneSignalTracker.h; sourceTree = ""; }; 912412031E73342200E41FD7 /* OneSignalTracker.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OneSignalTracker.m; sourceTree = ""; }; 912412041E73342200E41FD7 /* OneSignalTrackIAP.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OneSignalTrackIAP.h; sourceTree = ""; }; 912412051E73342200E41FD7 /* OneSignalTrackIAP.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OneSignalTrackIAP.m; sourceTree = ""; }; - 912412061E73342200E41FD7 /* OneSignalWebView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OneSignalWebView.h; sourceTree = ""; }; - 912412071E73342200E41FD7 /* OneSignalWebView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OneSignalWebView.m; sourceTree = ""; }; 912412081E73342200E41FD7 /* UIApplicationDelegate+OneSignal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIApplicationDelegate+OneSignal.h"; sourceTree = ""; }; 912412091E73342200E41FD7 /* UIApplicationDelegate+OneSignal.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIApplicationDelegate+OneSignal.m"; sourceTree = ""; }; - 9124120A1E73342200E41FD7 /* UNUserNotificationCenter+OneSignal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UNUserNotificationCenter+OneSignal.h"; sourceTree = ""; }; - 9124120B1E73342200E41FD7 /* UNUserNotificationCenter+OneSignal.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UNUserNotificationCenter+OneSignal.m"; sourceTree = ""; }; - 9129C6B51E89E59B009CB6A0 /* OSPermission.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OSPermission.h; sourceTree = ""; }; - 9129C6B61E89E59B009CB6A0 /* OSPermission.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OSPermission.m; sourceTree = ""; }; - 9129C6BB1E89E7AB009CB6A0 /* OSSubscription.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OSSubscription.h; sourceTree = ""; }; - 9129C6BC1E89E7AB009CB6A0 /* OSSubscription.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OSSubscription.m; sourceTree = ""; }; - 91B6EA401E85D38F00B5CF01 /* OSObservable.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OSObservable.m; sourceTree = ""; }; - 91B6EA441E85D3D600B5CF01 /* OSObservable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OSObservable.h; sourceTree = ""; }; 91C7725D1E7CCE1000D612D0 /* OneSignalInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OneSignalInternal.h; sourceTree = ""; }; - 91F58D791E7C7D3F0017D24D /* OneSignalNotificationSettings.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OneSignalNotificationSettings.h; sourceTree = ""; }; - 91F58D7C1E7C7F330017D24D /* OneSignalNotificationSettingsIOS10.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OneSignalNotificationSettingsIOS10.m; sourceTree = ""; }; - 91F58D7E1E7C7F5F0017D24D /* OneSignalNotificationSettingsIOS10.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OneSignalNotificationSettingsIOS10.h; sourceTree = ""; }; - 91F58D801E7C80C30017D24D /* OneSignalNotificationSettingsIOS9.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OneSignalNotificationSettingsIOS9.h; sourceTree = ""; }; - 91F58D821E7C80DA0017D24D /* OneSignalNotificationSettingsIOS9.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OneSignalNotificationSettingsIOS9.m; sourceTree = ""; }; 91F60F7B1E80E49A00706E60 /* UncaughtExceptionHandler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UncaughtExceptionHandler.h; sourceTree = ""; }; 91F60F7C1E80E4E400706E60 /* UncaughtExceptionHandler.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = UncaughtExceptionHandler.m; sourceTree = ""; }; + 944F7ECE296F890900AEBA54 /* OneSignalLiveActivityController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = OneSignalLiveActivityController.m; sourceTree = ""; }; + 944F7ED0296F892400AEBA54 /* OneSignalLiveActivityController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = OneSignalLiveActivityController.h; sourceTree = ""; }; 9D1BD95D237663BF00A064F7 /* OSInfluenceDataDefines.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = OSInfluenceDataDefines.h; sourceTree = ""; }; 9D1BD95E2379E7A900A064F7 /* OSOutcomeEvent.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = OSOutcomeEvent.h; sourceTree = ""; }; 9D1BD95F2379E7C300A064F7 /* OSOutcomeEvent.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = OSOutcomeEvent.m; sourceTree = ""; }; 9D1BD966237A28EE00A064F7 /* OSCachedUniqueOutcome.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = OSCachedUniqueOutcome.h; sourceTree = ""; }; 9D1BD967237A28FC00A064F7 /* OSCachedUniqueOutcome.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = OSCachedUniqueOutcome.m; sourceTree = ""; }; - 9D1BD96B237B57B400A064F7 /* OneSignalCacheCleaner.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = OneSignalCacheCleaner.h; sourceTree = ""; }; - 9D1BD96C237B57CA00A064F7 /* OneSignalCacheCleaner.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = OneSignalCacheCleaner.m; sourceTree = ""; }; - 9D3300F223145AF3000F0A83 /* OneSignalViewHelper.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OneSignalViewHelper.m; sourceTree = ""; }; - 9D3300F423145AF3000F0A83 /* OneSignalViewHelper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OneSignalViewHelper.h; sourceTree = ""; }; 9D3300F923149DAE000F0A83 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; 9D348536233C669E00EB81C9 /* CoreLocation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreLocation.framework; path = System/Library/Frameworks/CoreLocation.framework; sourceTree = SDKROOT; }; 9D348538233D2DCF00EB81C9 /* OneSignalLocationOverrider.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = OneSignalLocationOverrider.h; sourceTree = ""; }; 9D348539233D2E3600EB81C9 /* OneSignalLocationOverrider.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = OneSignalLocationOverrider.m; sourceTree = ""; }; A662399026850DDE00D52FD8 /* LanguageTest.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = LanguageTest.m; sourceTree = ""; }; - A6B519A42669614A00AED40E /* LanguageContext.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = LanguageContext.h; sourceTree = ""; }; - A6B519A52669614A00AED40E /* LanguageContext.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = LanguageContext.m; sourceTree = ""; }; - A6B519A7266964BA00AED40E /* LanguageProvider.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = LanguageProvider.h; sourceTree = ""; }; - A6B519A82669747B00AED40E /* LanguageProviderAppDefined.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = LanguageProviderAppDefined.h; sourceTree = ""; }; - A6B519A92669747B00AED40E /* LanguageProviderAppDefined.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = LanguageProviderAppDefined.m; sourceTree = ""; }; - A6B519AB2669749100AED40E /* LanguageProviderDevice.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = LanguageProviderDevice.h; sourceTree = ""; }; - A6B519AC2669749100AED40E /* LanguageProviderDevice.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = LanguageProviderDevice.m; sourceTree = ""; }; - A6D709392694D200007B3347 /* OneSignalSetLanguageParameters.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = OneSignalSetLanguageParameters.h; sourceTree = ""; }; - A6D7093A2694D200007B3347 /* OneSignalSetLanguageParameters.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = OneSignalSetLanguageParameters.m; sourceTree = ""; }; CA08FC821FE99BB4004C445F /* OneSignalClientOverrider.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = OneSignalClientOverrider.h; sourceTree = ""; }; CA08FC831FE99BB4004C445F /* OneSignalClientOverrider.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = OneSignalClientOverrider.m; sourceTree = ""; }; CA1A6E6720DC2E31001C41B9 /* OneSignalDialogController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = OneSignalDialogController.h; sourceTree = ""; }; @@ -858,23 +911,11 @@ CA1A6E7420DC2F04001C41B9 /* OneSignalDialogControllerOverrider.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = OneSignalDialogControllerOverrider.m; sourceTree = ""; }; CA36A42A208FDEFB003EFA9A /* NSURL+OneSignal.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "NSURL+OneSignal.h"; sourceTree = ""; }; CA36A42B208FDEFB003EFA9A /* NSURL+OneSignal.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "NSURL+OneSignal.m"; sourceTree = ""; }; - CA36F35621C33A2500300C77 /* OSInAppMessageController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = OSInAppMessageController.h; sourceTree = ""; }; - CA36F35721C33A2500300C77 /* OSInAppMessageController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = OSInAppMessageController.m; sourceTree = ""; }; CA42CAC220D99CB90001F2F2 /* ProvisionalAuthorizationTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ProvisionalAuthorizationTests.m; sourceTree = ""; }; - CA4742E2218B8FF30020DC8C /* OSTriggerController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = OSTriggerController.h; sourceTree = ""; }; - CA4742E3218B8FF30020DC8C /* OSTriggerController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = OSTriggerController.m; sourceTree = ""; }; - CA47439B2190FEA80020DC8C /* OSTrigger.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = OSTrigger.h; sourceTree = ""; }; - CA47439C2190FEA80020DC8C /* OSTrigger.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = OSTrigger.m; sourceTree = ""; }; CA63AF8320211F7400E340FB /* EmailTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = EmailTests.m; sourceTree = ""; }; CA63AF8520211FF800E340FB /* UnitTestCommonMethods.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = UnitTestCommonMethods.h; sourceTree = ""; }; CA63AF8620211FF800E340FB /* UnitTestCommonMethods.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = UnitTestCommonMethods.m; sourceTree = ""; }; - CA70E3332023D51000019273 /* OneSignalSetEmailParameters.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = OneSignalSetEmailParameters.h; sourceTree = ""; }; - CA70E3342023D51000019273 /* OneSignalSetEmailParameters.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = OneSignalSetEmailParameters.m; sourceTree = ""; }; CA70E3382023F24500019273 /* OneSignalCommonDefines.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = OneSignalCommonDefines.h; sourceTree = ""; }; - CA7FC89D21927229002C4FD9 /* OSDynamicTriggerController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = OSDynamicTriggerController.h; sourceTree = ""; }; - CA7FC89E21927229002C4FD9 /* OSDynamicTriggerController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = OSDynamicTriggerController.m; sourceTree = ""; }; - CA810FCF202BA97300A60FED /* OSEmailSubscription.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = OSEmailSubscription.h; sourceTree = ""; }; - CA810FD0202BA97300A60FED /* OSEmailSubscription.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = OSEmailSubscription.m; sourceTree = ""; }; CA85C15220604AEA003AB529 /* RequestTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RequestTests.m; sourceTree = ""; }; CA8E18FA2193A1A5009DA223 /* NSTimerOverrider.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = NSTimerOverrider.h; sourceTree = ""; }; CA8E18FB2193A1A5009DA223 /* NSTimerOverrider.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = NSTimerOverrider.m; sourceTree = ""; }; @@ -890,36 +931,24 @@ CAAE0DFC2195216900A57402 /* OneSignalOverrider.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = OneSignalOverrider.m; sourceTree = ""; }; CAAEA68521ED68A30049CF15 /* OneSignalNotificationCategoryController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OneSignalNotificationCategoryController.m; sourceTree = ""; }; CAAEA68621ED68A40049CF15 /* OneSignalNotificationCategoryController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OneSignalNotificationCategoryController.h; sourceTree = ""; }; - CAB269D721B0B6F000F8A43C /* OSInAppMessageAction.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = OSInAppMessageAction.h; sourceTree = ""; }; - CAB269D821B0B6F000F8A43C /* OSInAppMessageAction.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = OSInAppMessageAction.m; sourceTree = ""; }; - CAB269DD21B2038B00F8A43C /* OSInAppMessageBridgeEvent.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = OSInAppMessageBridgeEvent.h; sourceTree = ""; }; - CAB269DE21B2038B00F8A43C /* OSInAppMessageBridgeEvent.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = OSInAppMessageBridgeEvent.m; sourceTree = ""; }; CAB4112720852E48005A70D1 /* DelayedConsentInitializationParameters.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = DelayedConsentInitializationParameters.h; sourceTree = ""; }; CAB4112820852E48005A70D1 /* DelayedConsentInitializationParameters.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = DelayedConsentInitializationParameters.m; sourceTree = ""; }; - CACBAA8D218A6242000ACAA5 /* OSInAppMessageViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OSInAppMessageViewController.h; sourceTree = ""; }; - CACBAA8E218A6242000ACAA5 /* OSMessagingController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OSMessagingController.m; sourceTree = ""; }; - CACBAA8F218A6242000ACAA5 /* OSInAppMessagingDefines.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OSInAppMessagingDefines.h; sourceTree = ""; }; - CACBAA90218A6242000ACAA5 /* OSMessagingController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OSMessagingController.h; sourceTree = ""; }; - CACBAA91218A6242000ACAA5 /* OSInAppMessageView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OSInAppMessageView.h; sourceTree = ""; }; - CACBAA92218A6242000ACAA5 /* OSInAppMessageView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OSInAppMessageView.m; sourceTree = ""; }; - CACBAA93218A6243000ACAA5 /* OSInAppMessageInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OSInAppMessageInternal.h; sourceTree = ""; }; - CACBAA94218A6243000ACAA5 /* OSInAppMessageInternal.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OSInAppMessageInternal.m; sourceTree = ""; }; - CACBAA95218A6243000ACAA5 /* OSInAppMessageViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OSInAppMessageViewController.m; sourceTree = ""; }; CACBAAA9218A65AE000ACAA5 /* InAppMessagingTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = InAppMessagingTests.m; sourceTree = ""; }; CACBAAAB218A662B000ACAA5 /* WebKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = WebKit.framework; path = System/Library/Frameworks/WebKit.framework; sourceTree = SDKROOT; }; DE16C14324D3724700670EFA /* OneSignalLifecycleObserver.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = OneSignalLifecycleObserver.m; sourceTree = ""; }; DE16C14624D3727200670EFA /* OneSignalLifecycleObserver.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = OneSignalLifecycleObserver.h; sourceTree = ""; }; DE20425C24E21C1500350E4F /* UIApplication+OneSignal.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "UIApplication+OneSignal.h"; sourceTree = ""; }; DE20425D24E21C2C00350E4F /* UIApplication+OneSignal.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "UIApplication+OneSignal.m"; sourceTree = ""; }; - DE367CC524EEF2A800165207 /* OSInAppMessagePage.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = OSInAppMessagePage.h; sourceTree = ""; }; - DE367CC624EEF2BE00165207 /* OSInAppMessagePage.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = OSInAppMessagePage.m; sourceTree = ""; }; - DE3CD2F8270F9A6D00A5BECD /* OSNotification+OneSignal.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "OSNotification+OneSignal.m"; sourceTree = ""; }; - DE3CD2FC270F9A8100A5BECD /* OSNotification+OneSignal.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "OSNotification+OneSignal.h"; sourceTree = ""; }; - DE3CD2FE270FA9F200A5BECD /* OneSignalOutcomes.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = OneSignalOutcomes.m; sourceTree = ""; }; + DE3CD2FE270FA9F200A5BECD /* OSOutcomes.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = OSOutcomes.m; sourceTree = ""; }; + DE51DDE3294262AB0073D5C4 /* OSRemoteParamController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OSRemoteParamController.m; sourceTree = ""; }; + DE51DDE4294262AB0073D5C4 /* OSRemoteParamController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OSRemoteParamController.h; sourceTree = ""; }; DE5EFEC924D8DBF70032632D /* OSInAppMessageViewControllerOverrider.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = OSInAppMessageViewControllerOverrider.m; sourceTree = ""; }; DE5EFECB24D8DC0E0032632D /* OSInAppMessageViewControllerOverrider.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = OSInAppMessageViewControllerOverrider.h; sourceTree = ""; }; - DE75B3DE28BD432700162A95 /* OneSignalUNUserNotificationCenterOverrider.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OneSignalUNUserNotificationCenterOverrider.m; sourceTree = ""; }; - DE75B3DF28BD432800162A95 /* OneSignalUNUserNotificationCenterOverrider.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OneSignalUNUserNotificationCenterOverrider.h; sourceTree = ""; }; + DE69E19B282ED8060090BB3D /* OneSignalUser.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = OneSignalUser.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + DE69E19D282ED8060090BB3D /* OneSignalUser.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = OneSignalUser.h; sourceTree = ""; }; + DE69E19E282ED8060090BB3D /* OneSignalUser.docc */ = {isa = PBXFileReference; lastKnownFileType = folder.documentationcatalog; path = OneSignalUser.docc; sourceTree = ""; }; + DE69E1A9282ED8790090BB3D /* UnitTestApp-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "UnitTestApp-Bridging-Header.h"; sourceTree = ""; }; + DE69E1AA282ED8790090BB3D /* OneSignalUserManagerImpl.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OneSignalUserManagerImpl.swift; sourceTree = ""; }; DE7D17E627026B95002D3A5D /* OneSignalCore.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = OneSignalCore.framework; sourceTree = BUILT_PRODUCTS_DIR; }; DE7D17E827026B95002D3A5D /* OneSignalCore.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = OneSignalCore.h; sourceTree = ""; }; DE7D17E927026B95002D3A5D /* OneSignalCore.docc */ = {isa = PBXFileReference; lastKnownFileType = folder.documentationcatalog; path = OneSignalCore.docc; sourceTree = ""; }; @@ -954,19 +983,71 @@ DE7D18CE270385E0002D3A5D /* OSOutcomesRequests.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = OSOutcomesRequests.h; sourceTree = ""; }; DE7D18DC2703B44B002D3A5D /* OSFocusRequests.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = OSFocusRequests.h; sourceTree = ""; }; DE7D18DE2703B49B002D3A5D /* OSFocusRequests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = OSFocusRequests.m; sourceTree = ""; }; - DE7D18E22703B503002D3A5D /* OSLocationRequests.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = OSLocationRequests.h; sourceTree = ""; }; - DE7D18E42703B510002D3A5D /* OSLocationRequests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = OSLocationRequests.m; sourceTree = ""; }; - DE7D18EB2703B5AA002D3A5D /* OSInAppMessagingRequests.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = OSInAppMessagingRequests.h; sourceTree = ""; }; - DE7D18ED2703B5B9002D3A5D /* OSInAppMessagingRequests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = OSInAppMessagingRequests.m; sourceTree = ""; }; DE971751274C48B700FC409E /* OSPrivacyConsentController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = OSPrivacyConsentController.m; sourceTree = ""; }; DE971753274C48CF00FC409E /* OSPrivacyConsentController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = OSPrivacyConsentController.h; sourceTree = ""; }; DE9877292591654600DE07D5 /* NSDateFormatter+OneSignal.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "NSDateFormatter+OneSignal.h"; sourceTree = ""; }; DE98772A2591655800DE07D5 /* NSDateFormatter+OneSignal.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "NSDateFormatter+OneSignal.m"; sourceTree = ""; }; - DE9A5DA925D1FD6B00FCEC21 /* OSPlayerTags.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = OSPlayerTags.h; sourceTree = ""; }; - DE9A5DB225D1FD8000FCEC21 /* OSPlayerTags.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = OSPlayerTags.m; sourceTree = ""; }; + DEA4B44C2888AF8900E9FE12 /* OneSignalUNUserNotificationCenterOverrider.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OneSignalUNUserNotificationCenterOverrider.m; sourceTree = ""; }; + DEA4B44D2888AF8900E9FE12 /* OneSignalUNUserNotificationCenterOverrider.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OneSignalUNUserNotificationCenterOverrider.h; sourceTree = ""; }; + DEA98C1428C90C74000C6856 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + DEA98C1628C90C87000C6856 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; DEB843A127C0245B00D7E943 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; DEB843A327C0246A00D7E943 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; DEB843A527C0247700D7E943 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + DEBAADF92A420A3700BF2C1C /* OneSignalLocation.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = OneSignalLocation.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + DEBAADFB2A420A3900BF2C1C /* OneSignalLocationManager.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = OneSignalLocationManager.h; sourceTree = ""; }; + DEBAAE022A420B8000BF2C1C /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + DEBAAE092A420CA500BF2C1C /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.3.sdk/System/iOSSupport/System/Library/Frameworks/UIKit.framework; sourceTree = DEVELOPER_DIR; }; + DEBAAE182A420D6500BF2C1C /* OneSignalLocationManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OneSignalLocationManager.m; sourceTree = ""; }; + DEBAAE222A4211C600BF2C1C /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + DEBAAE282A4211D900BF2C1C /* OneSignalInAppMessages.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = OneSignalInAppMessages.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + DEBAAE2A2A4211DA00BF2C1C /* OneSignalInAppMessages.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = OneSignalInAppMessages.h; sourceTree = ""; }; + DEBAAE4A2A42123400BF2C1C /* WebKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = WebKit.framework; path = Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.3.sdk/System/iOSSupport/System/Library/PrivateFrameworks/WebKit.framework; sourceTree = DEVELOPER_DIR; }; + DEBAAE502A42174A00BF2C1C /* OSInAppMessageViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OSInAppMessageViewController.m; sourceTree = ""; }; + DEBAAE512A42174A00BF2C1C /* OSInAppMessageView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OSInAppMessageView.h; sourceTree = ""; }; + DEBAAE522A42174A00BF2C1C /* OSInAppMessageViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OSInAppMessageViewController.h; sourceTree = ""; }; + DEBAAE532A42174A00BF2C1C /* OSInAppMessageView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OSInAppMessageView.m; sourceTree = ""; }; + DEBAAE582A42175900BF2C1C /* OSDynamicTriggerController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OSDynamicTriggerController.m; sourceTree = ""; }; + DEBAAE592A42175900BF2C1C /* OSMessagingController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OSMessagingController.h; sourceTree = ""; }; + DEBAAE5A2A42175900BF2C1C /* OSInAppMessageController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OSInAppMessageController.h; sourceTree = ""; }; + DEBAAE5B2A42175900BF2C1C /* OSInAppMessageController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OSInAppMessageController.m; sourceTree = ""; }; + DEBAAE5C2A42175900BF2C1C /* OSTriggerController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OSTriggerController.h; sourceTree = ""; }; + DEBAAE5D2A42175900BF2C1C /* OSMessagingController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OSMessagingController.m; sourceTree = ""; }; + DEBAAE5E2A42175900BF2C1C /* OSDynamicTriggerController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OSDynamicTriggerController.h; sourceTree = ""; }; + DEBAAE5F2A42175900BF2C1C /* OSTriggerController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OSTriggerController.m; sourceTree = ""; }; + DEBAAE682A42176600BF2C1C /* OSInAppMessagePage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OSInAppMessagePage.h; sourceTree = ""; }; + DEBAAE692A42176600BF2C1C /* OSInAppMessageDisplayStats.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OSInAppMessageDisplayStats.h; sourceTree = ""; }; + DEBAAE6A2A42176600BF2C1C /* OSInAppMessageTag.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OSInAppMessageTag.m; sourceTree = ""; }; + DEBAAE6B2A42176600BF2C1C /* OSInAppMessageInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OSInAppMessageInternal.h; sourceTree = ""; }; + DEBAAE6C2A42176600BF2C1C /* OSTrigger.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OSTrigger.m; sourceTree = ""; }; + DEBAAE6D2A42176600BF2C1C /* OSInAppMessagePrompt.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OSInAppMessagePrompt.h; sourceTree = ""; }; + DEBAAE6E2A42176600BF2C1C /* OSInAppMessageLocationPrompt.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OSInAppMessageLocationPrompt.m; sourceTree = ""; }; + DEBAAE6F2A42176700BF2C1C /* OSInAppMessageDisplayStats.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OSInAppMessageDisplayStats.m; sourceTree = ""; }; + DEBAAE702A42176700BF2C1C /* OSInAppMessageTag.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OSInAppMessageTag.h; sourceTree = ""; }; + DEBAAE712A42176700BF2C1C /* OSTrigger.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OSTrigger.h; sourceTree = ""; }; + DEBAAE722A42176700BF2C1C /* OSInAppMessageBridgeEvent.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OSInAppMessageBridgeEvent.m; sourceTree = ""; }; + DEBAAE732A42176700BF2C1C /* OSInAppMessageClickEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OSInAppMessageClickEvent.h; sourceTree = ""; }; + DEBAAE742A42176700BF2C1C /* OSInAppMessageClickEvent.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OSInAppMessageClickEvent.m; sourceTree = ""; }; + DEBAAE752A42176700BF2C1C /* OSInAppMessageInternal.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OSInAppMessageInternal.m; sourceTree = ""; }; + DEBAAE762A42176700BF2C1C /* OSInAppMessageClickResult.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OSInAppMessageClickResult.h; sourceTree = ""; }; + DEBAAE772A42176700BF2C1C /* OSInAppMessagePushPrompt.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OSInAppMessagePushPrompt.m; sourceTree = ""; }; + DEBAAE782A42176700BF2C1C /* OSInAppMessageBridgeEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OSInAppMessageBridgeEvent.h; sourceTree = ""; }; + DEBAAE792A42176700BF2C1C /* OSInAppMessageClickResult.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OSInAppMessageClickResult.m; sourceTree = ""; }; + DEBAAE7A2A42176800BF2C1C /* OSInAppMessageLocationPrompt.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OSInAppMessageLocationPrompt.h; sourceTree = ""; }; + DEBAAE7B2A42176800BF2C1C /* OSInAppMessagePage.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OSInAppMessagePage.m; sourceTree = ""; }; + DEBAAE7C2A42176800BF2C1C /* OSInAppMessagePushPrompt.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OSInAppMessagePushPrompt.h; sourceTree = ""; }; + DEBAAE922A42177B00BF2C1C /* OSInAppMessagingRequests.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OSInAppMessagingRequests.h; sourceTree = ""; }; + DEBAAE932A42177B00BF2C1C /* OSInAppMessagingRequests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OSInAppMessagingRequests.m; sourceTree = ""; }; + DEBAAE962A42178800BF2C1C /* OSInAppMessagingDefines.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OSInAppMessagingDefines.h; sourceTree = ""; }; + DEBAAE982A42179A00BF2C1C /* OneSignalInAppMessages.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OneSignalInAppMessages.m; sourceTree = ""; }; + DEBAAE9A2A4222B000BF2C1C /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.3.sdk/System/Library/Frameworks/CoreGraphics.framework; sourceTree = DEVELOPER_DIR; }; + DEBAAEAE2A435AC800BF2C1C /* OSLocation.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = OSLocation.h; sourceTree = ""; }; + DEBAAEAF2A435AE900BF2C1C /* OSInAppMessages.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = OSInAppMessages.h; sourceTree = ""; }; + DEBAAEB22A436CE800BF2C1C /* OSStubInAppMessages.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = OSStubInAppMessages.m; sourceTree = ""; }; + DEBAAEB42A436D5D00BF2C1C /* OSStubLocation.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = OSStubLocation.m; sourceTree = ""; }; + DEBAAEB62A4381AE00BF2C1C /* OSInAppMessageMigrationController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = OSInAppMessageMigrationController.h; sourceTree = ""; }; + DEBAAEB72A4381AE00BF2C1C /* OSInAppMessageMigrationController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = OSInAppMessageMigrationController.m; sourceTree = ""; }; + DEC08AFF2947D4E900C81DA3 /* OneSignalSwiftInterface.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OneSignalSwiftInterface.swift; sourceTree = ""; }; DEF5CCF12539321A0003E9CC /* UnitTestApp.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = UnitTestApp.app; sourceTree = BUILT_PRODUCTS_DIR; }; DEF5CCF32539321A0003E9CC /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; DEF5CCF42539321A0003E9CC /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; @@ -979,6 +1060,36 @@ DEF5CD052539321D0003E9CC /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; DEF5CD51253934410003E9CC /* CoreFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreFoundation.framework; path = System/Library/Frameworks/CoreFoundation.framework; sourceTree = SDKROOT; }; DEF5CD6A253935720003E9CC /* UnitTestApp.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = UnitTestApp.entitlements; sourceTree = ""; }; + DEF784292912DEB600A1F3A5 /* OneSignalNotifications.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = OneSignalNotifications.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + DEF7842B2912DEBA00A1F3A5 /* OneSignalNotifications.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = OneSignalNotifications.h; sourceTree = ""; }; + DEF784362912E05100A1F3A5 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + DEF784472912E23A00A1F3A5 /* OSNotificationsManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OSNotificationsManager.m; sourceTree = ""; }; + DEF784482912E23A00A1F3A5 /* OSNotificationsManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OSNotificationsManager.h; sourceTree = ""; }; + DEF7844D2912E3EA00A1F3A5 /* OneSignalNotificationSettings.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OneSignalNotificationSettings.h; sourceTree = ""; }; + DEF784502912E3EB00A1F3A5 /* OneSignalNotificationSettings.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OneSignalNotificationSettings.m; sourceTree = ""; }; + DEF784562912E4BA00A1F3A5 /* OSPermission.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OSPermission.h; sourceTree = ""; }; + DEF784572912E4BA00A1F3A5 /* OSPermission.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OSPermission.m; sourceTree = ""; }; + DEF7845A2912E89200A1F3A5 /* OSObservable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OSObservable.h; sourceTree = ""; }; + DEF7845B2912E89200A1F3A5 /* OSObservable.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OSObservable.m; sourceTree = ""; }; + DEF7845E2912EA0C00A1F3A5 /* UserNotifications.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UserNotifications.framework; path = Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.0.sdk/System/Library/Frameworks/UserNotifications.framework; sourceTree = DEVELOPER_DIR; }; + DEF784602912F5E000A1F3A5 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.0.sdk/System/iOSSupport/System/Library/Frameworks/UIKit.framework; sourceTree = DEVELOPER_DIR; }; + DEF784622912F79700A1F3A5 /* OSDialogInstanceManager.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = OSDialogInstanceManager.h; sourceTree = ""; }; + DEF784632912FA5100A1F3A5 /* OSDialogInstanceManager.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = OSDialogInstanceManager.m; sourceTree = ""; }; + DEF7847029132AA700A1F3A5 /* OSNotification+OneSignal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "OSNotification+OneSignal.h"; sourceTree = ""; }; + DEF7847129132AA700A1F3A5 /* OSNotification+OneSignal.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "OSNotification+OneSignal.m"; sourceTree = ""; }; + DEF7847B29146B2700A1F3A5 /* OneSignalWebView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OneSignalWebView.m; sourceTree = ""; }; + DEF7847C29146B2700A1F3A5 /* OneSignalWebView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OneSignalWebView.h; sourceTree = ""; }; + DEF7847F29146BBE00A1F3A5 /* OneSignalWebViewManager.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = OneSignalWebViewManager.m; sourceTree = ""; }; + DEF7848129146BD100A1F3A5 /* OneSignalWebViewManager.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = OneSignalWebViewManager.h; sourceTree = ""; }; + DEF7848329146DA700A1F3A5 /* WebKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = WebKit.framework; path = Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.0.sdk/System/iOSSupport/System/Library/PrivateFrameworks/WebKit.framework; sourceTree = DEVELOPER_DIR; }; + DEF78486291471D900A1F3A5 /* UNUserNotificationCenter+OneSignalNotifications.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UNUserNotificationCenter+OneSignalNotifications.m"; sourceTree = ""; }; + DEF78487291471DA00A1F3A5 /* UIApplicationDelegate+OneSignalNotifications.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIApplicationDelegate+OneSignalNotifications.h"; sourceTree = ""; }; + DEF78488291471DA00A1F3A5 /* UNUserNotificationCenter+OneSignalNotifications.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UNUserNotificationCenter+OneSignalNotifications.h"; sourceTree = ""; }; + DEF78489291471DA00A1F3A5 /* UIApplicationDelegate+OneSignalNotifications.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIApplicationDelegate+OneSignalNotifications.m"; sourceTree = ""; }; + DEF78490291479B200A1F3A5 /* OneSignalSelectorHelpers.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OneSignalSelectorHelpers.m; sourceTree = ""; }; + DEF78491291479B200A1F3A5 /* OneSignalSelectorHelpers.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OneSignalSelectorHelpers.h; sourceTree = ""; }; + DEF78494291479C000A1F3A5 /* SwizzlingForwarder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SwizzlingForwarder.h; sourceTree = ""; }; + DEF78495291479C100A1F3A5 /* SwizzlingForwarder.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SwizzlingForwarder.m; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -991,17 +1102,28 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + 3C11515E289A259500565C41 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + DEA98C1E28C90EE9000C6856 /* OneSignalCore.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; 3E2400341D4FFC31008BDE70 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( 9D59C2F92321C7780008ECCF /* CoreGraphics.framework in Frameworks */, + DE69E1B2282ED9430090BB3D /* OneSignalUser.framework in Frameworks */, 9D59C2F82321C7720008ECCF /* WebKit.framework in Frameworks */, 3E66F5821D90A2C600E45A01 /* SystemConfiguration.framework in Frameworks */, + 3C115197289AF86C00565C41 /* OneSignalOSCore.framework in Frameworks */, 3E464ED71D88ED1F00DCF7E9 /* UIKit.framework in Frameworks */, DE9717662756BCFD00FC409E /* OneSignalCore.framework in Frameworks */, DE9717642756BCFB00FC409E /* OneSignalExtension.framework in Frameworks */, DE7D18C627038249002D3A5D /* OneSignalOutcomes.framework in Frameworks */, + DEF784382912E15000A1F3A5 /* OneSignalNotifications.framework in Frameworks */, 91719A9C1E80839500DBE43C /* UserNotifications.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; @@ -1010,6 +1132,11 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + DECE6F5B28C90821007058EE /* OneSignalOSCore.framework in Frameworks */, + DE3784842888CFF900453A8E /* OneSignalUser.framework in Frameworks */, + DEA4B4672888C5F200E9FE12 /* OneSignalExtension.framework in Frameworks */, + DEA4B4642888C4E200E9FE12 /* OneSignalOutcomes.framework in Frameworks */, + DEA4B45A2888BFAB00E9FE12 /* OneSignalCore.framework in Frameworks */, 9D348537233C669E00EB81C9 /* CoreLocation.framework in Frameworks */, 9D3300FA23149DAE000F0A83 /* CoreGraphics.framework in Frameworks */, CACBAAAC218A662B000ACAA5 /* WebKit.framework in Frameworks */, @@ -1019,10 +1146,22 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + DE69E198282ED8060090BB3D /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + DEF7846B2913176800A1F3A5 /* OneSignalNotifications.framework in Frameworks */, + DEA98C1C28C90EE6000C6856 /* OneSignalOSCore.framework in Frameworks */, + DEA98C1928C90EE5000C6856 /* OneSignalCore.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; DE7D17E327026B95002D3A5D /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + 3CE8CC582911B2B2000DB0D3 /* SystemConfiguration.framework in Frameworks */, + 3CE8CC562911B1E0000DB0D3 /* UIKit.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -1044,16 +1183,63 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + DEBAADF62A420A3700BF2C1C /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + DEBAAE102A420CC900BF2C1C /* OneSignalNotifications.framework in Frameworks */, + DEBAAE042A420C9800BF2C1C /* OneSignalCore.framework in Frameworks */, + DEBAAE0B2A420CC000BF2C1C /* OneSignalUser.framework in Frameworks */, + DEBAAE0A2A420CA500BF2C1C /* UIKit.framework in Frameworks */, + DEBAAE142A420CCF00BF2C1C /* OneSignalOSCore.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + DEBAAE252A4211D900BF2C1C /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + DEBAAE4B2A42123400BF2C1C /* WebKit.framework in Frameworks */, + DEBAAE3D2A42121400BF2C1C /* OneSignalNotifications.framework in Frameworks */, + DEBAAE492A42123000BF2C1C /* UIKit.framework in Frameworks */, + DEBAAE392A42121100BF2C1C /* OneSignalOSCore.framework in Frameworks */, + DEBAAE9B2A4222B000BF2C1C /* CoreGraphics.framework in Frameworks */, + DEBAAE412A42121700BF2C1C /* OneSignalUser.framework in Frameworks */, + DEBAAE342A42120D00BF2C1C /* OneSignalCore.framework in Frameworks */, + DEBAAE452A42122000BF2C1C /* OneSignalOutcomes.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; DEF5CCEE2539321A0003E9CC /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + 3C11518E289AF83600565C41 /* OneSignalOSCore.framework in Frameworks */, + DE3784852888D00300453A8E /* OneSignalUser.framework in Frameworks */, + DEBAAE2E2A4211DA00BF2C1C /* OneSignalInAppMessages.framework in Frameworks */, + DEA4B4652888C59100E9FE12 /* OneSignalExtension.framework in Frameworks */, + DEF7842F2912DEBA00A1F3A5 /* OneSignalNotifications.framework in Frameworks */, + DEA4B4622888C4D500E9FE12 /* OneSignalOutcomes.framework in Frameworks */, + DEA4B45C2888C1D000E9FE12 /* OneSignalCore.framework in Frameworks */, DEF5CD52253934410003E9CC /* CoreFoundation.framework in Frameworks */, DEF5CD502539343C0003E9CC /* Foundation.framework in Frameworks */, DEF5CD4F253934350003E9CC /* UIKit.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; + DEF784262912DEB600A1F3A5 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + DEF7848429146DA700A1F3A5 /* WebKit.framework in Frameworks */, + DEF7845F2912EA0D00A1F3A5 /* UserNotifications.framework in Frameworks */, + DEF784612912F5E100A1F3A5 /* UIKit.framework in Frameworks */, + DEF784422912E16F00A1F3A5 /* OneSignalCore.framework in Frameworks */, + DE2D8F4A2947D86200844084 /* OneSignalOutcomes.framework in Frameworks */, + DE2D8F452947D85800844084 /* OneSignalExtension.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ @@ -1080,6 +1266,11 @@ 37747F8A19147D6400558FAD = { isa = PBXGroup; children = ( + DEBAAE212A42119100BF2C1C /* OneSignalInAppMessagesFramework */, + DEBAAE012A420B0500BF2C1C /* OneSignalLocationFramework */, + DEF784352912E00900A1F3A5 /* OneSignalNotificationsFramework */, + DEA98C1528C90C87000C6856 /* OneSignalOSCoreFramework */, + DEA98C1328C90C74000C6856 /* OneSignalUserFramework */, DE97175C275597E600FC409E /* OneSignalExtensionFramework */, DE97175B275597DA00FC409E /* OneSignalOutcomesFramework */, DE97175A275597D100FC409E /* OneSignalCoreFramework */, @@ -1089,6 +1280,11 @@ DE7D17E727026B95002D3A5D /* OneSignalCore */, DE7D17FA27026BA3002D3A5D /* OneSignalExtension */, DE7D188127037F43002D3A5D /* OneSignalOutcomes */, + DE69E19C282ED8060090BB3D /* OneSignalUser */, + 3C115162289A259500565C41 /* OneSignalOSCore */, + DEF7842A2912DEBA00A1F3A5 /* OneSignalNotifications */, + DEBAADFA2A420A3900BF2C1C /* OneSignalLocation */, + DEBAAE292A4211DA00BF2C1C /* OneSignalInAppMessages */, 37747F9519147D6500558FAD /* Frameworks */, 3E2400391D4FFC31008BDE70 /* OneSignalFramework */, 37747F9419147D6500558FAD /* Products */, @@ -1099,12 +1295,17 @@ isa = PBXGroup; children = ( 37747F9319147D6500558FAD /* libOneSignal.a */, - 3E2400381D4FFC31008BDE70 /* OneSignal.framework */, + 3E2400381D4FFC31008BDE70 /* OneSignalFramework.framework */, 911E2CBA1E398AB3003112A4 /* UnitTests.xctest */, DEF5CCF12539321A0003E9CC /* UnitTestApp.app */, DE7D17E627026B95002D3A5D /* OneSignalCore.framework */, DE7D17F927026BA3002D3A5D /* OneSignalExtension.framework */, DE7D188027037F43002D3A5D /* OneSignalOutcomes.framework */, + DE69E19B282ED8060090BB3D /* OneSignalUser.framework */, + 3C115161289A259500565C41 /* OneSignalOSCore.framework */, + DEF784292912DEB600A1F3A5 /* OneSignalNotifications.framework */, + DEBAADF92A420A3700BF2C1C /* OneSignalLocation.framework */, + DEBAAE282A4211D900BF2C1C /* OneSignalInAppMessages.framework */, ); name = Products; sourceTree = ""; @@ -1112,6 +1313,14 @@ 37747F9519147D6500558FAD /* Frameworks */ = { isa = PBXGroup; children = ( + DEBAAE9A2A4222B000BF2C1C /* CoreGraphics.framework */, + DEBAAE4A2A42123400BF2C1C /* WebKit.framework */, + DEBAAE092A420CA500BF2C1C /* UIKit.framework */, + DEF7848329146DA700A1F3A5 /* WebKit.framework */, + DEF784602912F5E000A1F3A5 /* UIKit.framework */, + DEF7845E2912EA0C00A1F3A5 /* UserNotifications.framework */, + 3CE8CC572911B2B2000DB0D3 /* SystemConfiguration.framework */, + 3CE8CC552911B1E0000DB0D3 /* UIKit.framework */, DE7D1842270283B9002D3A5D /* UserNotifications.framework */, DEF5CD51253934410003E9CC /* CoreFoundation.framework */, 9D348536233C669E00EB81C9 /* CoreLocation.framework */, @@ -1125,6 +1334,33 @@ name = Frameworks; sourceTree = ""; }; + 3C115162289A259500565C41 /* OneSignalOSCore */ = { + isa = PBXGroup; + children = ( + 3C115178289A272F00565C41 /* Source */, + 3C115164289A259500565C41 /* OneSignalOSCore.docc */, + ); + path = OneSignalOSCore; + sourceTree = ""; + }; + 3C115178289A272F00565C41 /* Source */ = { + isa = PBXGroup; + children = ( + 3C115163289A259500565C41 /* OneSignalOSCore.h */, + 3C115188289ADEA300565C41 /* OSModelStore.swift */, + 3C115186289ADE7700565C41 /* OSModelStoreListener.swift */, + 3C115184289ADE4F00565C41 /* OSModel.swift */, + 3C11518A289ADEEB00565C41 /* OSEventProducer.swift */, + 3C11518C289AF5E800565C41 /* OSModelChangedHandler.swift */, + 3C4F9E4328A4466C009F453A /* OSOperationRepo.swift */, + 3C8E6DF828A6D89E0031E48A /* OSOperationExecutor.swift */, + 3CE5F9E2289D88DC004A156E /* OSModelStoreChangedHandler.swift */, + 3C2D8A5828B4C4E300BE41F6 /* OSDelta.swift */, + 3C448BA12936B474002F96BC /* OSBackgroundTaskManager.swift */, + ); + path = Source; + sourceTree = ""; + }; 3E2400391D4FFC31008BDE70 /* OneSignalFramework */ = { isa = PBXGroup; children = ( @@ -1136,8 +1372,6 @@ 4529DECD1FA81DE000CEAB1D /* Shadows */ = { isa = PBXGroup; children = ( - DE75B3DF28BD432800162A95 /* OneSignalUNUserNotificationCenterOverrider.h */, - DE75B3DE28BD432700162A95 /* OneSignalUNUserNotificationCenterOverrider.m */, 7A65D628246627AD007FF196 /* OSInAppMessageViewOverrider.h */, 7A65D629246627AD007FF196 /* OSInAppMessageViewOverrider.m */, 5B58E4F3237CE7B3009401E0 /* UIDeviceOverrider.h */, @@ -1182,6 +1416,8 @@ 16664C5425DDB2CB003B8A14 /* NSTimeZoneOverrider.h */, 03E56DD128405F4A006AA1DA /* OneSignalAppDelegateOverrider.h */, 03E56DD228405F4A006AA1DA /* OneSignalAppDelegateOverrider.m */, + DEA4B44D2888AF8900E9FE12 /* OneSignalUNUserNotificationCenterOverrider.h */, + DEA4B44C2888AF8900E9FE12 /* OneSignalUNUserNotificationCenterOverrider.m */, ); path = Shadows; sourceTree = ""; @@ -1217,8 +1453,6 @@ 7AECE59D23675F6300537907 /* OSFocusTimeProcessorFactory.m */, 7AFE856E2368DDC50091D6A5 /* OSFocusCallParams.h */, 7AFE856A2368DDB80091D6A5 /* OSFocusCallParams.m */, - 7A600B41245378ED00514A53 /* OSFocusInfluenceParam.h */, - 7A600B432453790700514A53 /* OSFocusInfluenceParam.m */, ); name = OnFocus; sourceTree = ""; @@ -1232,18 +1466,11 @@ name = Migration; sourceTree = ""; }; - 7AF5174A24FDC2D000B076BC /* RemoteParams */ = { - isa = PBXGroup; - children = ( - 7AF5174424FDC2A100B076BC /* OSRemoteParamController.h */, - 7AF5174624FDC2C500B076BC /* OSRemoteParamController.m */, - ); - name = RemoteParams; - sourceTree = ""; - }; 911E2CBB1E398AB3003112A4 /* UnitTests */ = { isa = PBXGroup; children = ( + 3C2C7DC5288E00AA0020F9AE /* UserModelObjcTests.m */, + 3C2C7DC3288E007E0020F9AE /* UserModelSwiftTests.swift */, 03CCCC802835D902004BF794 /* UNNotificationCenter */, 7A5A818324899050002E07C8 /* Models */, 03866CBE2378A5ED0009C1D8 /* Asserts */, @@ -1280,6 +1507,7 @@ 7ABAF9D72457DD620074DFA0 /* SessionManagerTests.m */, 7A5A818124897693002E07C8 /* MigrationTests.m */, A662399026850DDE00D52FD8 /* LanguageTest.m */, + 3C2C7DC2288E007E0020F9AE /* UnitTests-Bridging-Header.h */, ); path = UnitTests; sourceTree = ""; @@ -1288,209 +1516,88 @@ isa = PBXGroup; children = ( DE7D18D92703B3EA002D3A5D /* Requests */, - A63E9E42267A847800EA273E /* Language */, - 7AF5174A24FDC2D000B076BC /* RemoteParams */, 7AAA606B2485D0D70004FADE /* Migration */, 7A674F172360D7DB001F9ACD /* OnFocus */, 454F94F31FAD263300D74CCF /* Model */, - 9129C6B41E89E541009CB6A0 /* State */, - 91F58D7B1E7C7EE30017D24D /* NotificationSettings */, 912412461E73349500E41FD7 /* Categories */, - 912412451E73346700E41FD7 /* UI */, - CACBAA8C218A6226000ACAA5 /* InAppMessaging */, 91C7725D1E7CCE1000D612D0 /* OneSignalInternal.h */, - 912411F01E73342200E41FD7 /* OneSignal.h */, + 912411F01E73342200E41FD7 /* OneSignalFramework.h */, 912411F11E73342200E41FD7 /* OneSignal.m */, DE16C14624D3727200670EFA /* OneSignalLifecycleObserver.h */, DE16C14324D3724700670EFA /* OneSignalLifecycleObserver.m */, CAB4112720852E48005A70D1 /* DelayedConsentInitializationParameters.h */, CAB4112820852E48005A70D1 /* DelayedConsentInitializationParameters.m */, - CA70E3332023D51000019273 /* OneSignalSetEmailParameters.h */, - CA70E3342023D51000019273 /* OneSignalSetEmailParameters.m */, - 7A42747F25D18F2C00EE75FC /* OneSignalSetSMSParameters.h */, - 7A42748825D18F4400EE75FC /* OneSignalSetSMSParameters.m */, - 7AC0D2162576940100E29448 /* OneSignalSetExternalIdParameters.h */, - 7AC0D2172576944F00E29448 /* OneSignalSetExternalIdParameters.m */, - A6D709392694D200007B3347 /* OneSignalSetLanguageParameters.h */, - A6D7093A2694D200007B3347 /* OneSignalSetLanguageParameters.m */, - 9D1BD96B237B57B400A064F7 /* OneSignalCacheCleaner.h */, - 9D1BD96C237B57CA00A064F7 /* OneSignalCacheCleaner.m */, 912411F41E73342200E41FD7 /* OneSignalHelper.h */, 912411F51E73342200E41FD7 /* OneSignalHelper.m */, - 9D3300F423145AF3000F0A83 /* OneSignalViewHelper.h */, - 9D3300F223145AF3000F0A83 /* OneSignalViewHelper.m */, 912411F81E73342200E41FD7 /* OneSignalJailbreakDetection.h */, 912411F91E73342200E41FD7 /* OneSignalJailbreakDetection.m */, - 912411FA1E73342200E41FD7 /* OneSignalLocation.h */, - 912411FB1E73342200E41FD7 /* OneSignalLocation.m */, - 912411FC1E73342200E41FD7 /* OneSignalMobileProvision.h */, - 912411FD1E73342200E41FD7 /* OneSignalMobileProvision.m */, - 912411FE1E73342200E41FD7 /* OneSignalReachability.h */, - 912411FF1E73342200E41FD7 /* OneSignalReachability.m */, + 944F7ED0296F892400AEBA54 /* OneSignalLiveActivityController.h */, + 944F7ECE296F890900AEBA54 /* OneSignalLiveActivityController.m */, 912412021E73342200E41FD7 /* OneSignalTracker.h */, 912412031E73342200E41FD7 /* OneSignalTracker.m */, 912412041E73342200E41FD7 /* OneSignalTrackIAP.h */, 912412051E73342200E41FD7 /* OneSignalTrackIAP.m */, 7A93269225AF4E6700BBEC27 /* OSPendingCallbacks.h */, 7A93269B25AF4F0200BBEC27 /* OSPendingCallbacks.m */, + 3C448B9B2936ADFD002F96BC /* OSBackgroundTaskHandlerImpl.h */, + 3C448B9C2936ADFD002F96BC /* OSBackgroundTaskHandlerImpl.m */, + DEC08AFF2947D4E900C81DA3 /* OneSignalSwiftInterface.swift */, ); path = Source; sourceTree = ""; }; - 912412451E73346700E41FD7 /* UI */ = { - isa = PBXGroup; - children = ( - 912412061E73342200E41FD7 /* OneSignalWebView.h */, - 912412071E73342200E41FD7 /* OneSignalWebView.m */, - ); - name = UI; - sourceTree = ""; - }; 912412461E73349500E41FD7 /* Categories */ = { isa = PBXGroup; children = ( - 912412001E73342200E41FD7 /* OneSignalSelectorHelpers.h */, - 912412011E73342200E41FD7 /* OneSignalSelectorHelpers.m */, 912412081E73342200E41FD7 /* UIApplicationDelegate+OneSignal.h */, 912412091E73342200E41FD7 /* UIApplicationDelegate+OneSignal.m */, - 9124120A1E73342200E41FD7 /* UNUserNotificationCenter+OneSignal.h */, - 9124120B1E73342200E41FD7 /* UNUserNotificationCenter+OneSignal.m */, CA1A6E6720DC2E31001C41B9 /* OneSignalDialogController.h */, CA1A6E6820DC2E31001C41B9 /* OneSignalDialogController.m */, CA1A6E6D20DC2E73001C41B9 /* OneSignalDialogRequest.h */, CA1A6E6E20DC2E73001C41B9 /* OneSignalDialogRequest.m */, DE20425C24E21C1500350E4F /* UIApplication+OneSignal.h */, DE20425D24E21C2C00350E4F /* UIApplication+OneSignal.m */, - DE9877292591654600DE07D5 /* NSDateFormatter+OneSignal.h */, - DE98772A2591655800DE07D5 /* NSDateFormatter+OneSignal.m */, - DE3CD2FC270F9A8100A5BECD /* OSNotification+OneSignal.h */, - DE3CD2F8270F9A6D00A5BECD /* OSNotification+OneSignal.m */, ); name = Categories; sourceTree = ""; }; - 9129C6B41E89E541009CB6A0 /* State */ = { - isa = PBXGroup; - children = ( - 91B6EA441E85D3D600B5CF01 /* OSObservable.h */, - 91B6EA401E85D38F00B5CF01 /* OSObservable.m */, - 9129C6B51E89E59B009CB6A0 /* OSPermission.h */, - 9129C6B61E89E59B009CB6A0 /* OSPermission.m */, - 9129C6BB1E89E7AB009CB6A0 /* OSSubscription.h */, - 9129C6BC1E89E7AB009CB6A0 /* OSSubscription.m */, - CA810FCF202BA97300A60FED /* OSEmailSubscription.h */, - CA810FD0202BA97300A60FED /* OSEmailSubscription.m */, - 7A42742A25CDCA7800EE75FC /* OSSMSSubscription.h */, - 7A42744125CDE98E00EE75FC /* OSSMSSubscription.m */, - 7A676BE424981CEC003957CC /* OSDeviceState.m */, - 7A5E71F225A66DDB00CB5605 /* OSUserStateSynchronizer.h */, - 7A5E71FB25A66DEC00CB5605 /* OSUserStateSynchronizer.m */, - 7A5E720625A66E0A00CB5605 /* OSUserStatePushSynchronizer.h */, - 7A5E720F25A66E1600CB5605 /* OSUserStatePushSynchronizer.m */, - 7A5E721A25A66E2900CB5605 /* OSUserStateEmailSynchronizer.h */, - 7A5E722325A66E3300CB5605 /* OSUserStateEmailSynchronizer.m */, - 7A42745325CDF05500EE75FC /* OSUserStateSMSSynchronizer.h */, - 7A42746325CDF06800EE75FC /* OSUserStateSMSSynchronizer.m */, - 7A5E725825A66E9800CB5605 /* OSStateSynchronizer.h */, - 7A5E726125A66EA400CB5605 /* OSStateSynchronizer.m */, - 7A93264725A8DD3600BBEC27 /* OSUserState.h */, - 7A93265025A8DD4300BBEC27 /* OSUserState.m */, - 7A93266925AC985500BBEC27 /* OSLocationState.h */, - 7A93267225AC986400BBEC27 /* OSLocationState.m */, - DE9A5DA925D1FD6B00FCEC21 /* OSPlayerTags.h */, - DE9A5DB225D1FD8000FCEC21 /* OSPlayerTags.m */, - ); - name = State; - sourceTree = ""; - }; - 91F58D7B1E7C7EE30017D24D /* NotificationSettings */ = { - isa = PBXGroup; - children = ( - 91F58D791E7C7D3F0017D24D /* OneSignalNotificationSettings.h */, - 91F58D7E1E7C7F5F0017D24D /* OneSignalNotificationSettingsIOS10.h */, - 91F58D7C1E7C7F330017D24D /* OneSignalNotificationSettingsIOS10.m */, - 91F58D801E7C80C30017D24D /* OneSignalNotificationSettingsIOS9.h */, - 91F58D821E7C80DA0017D24D /* OneSignalNotificationSettingsIOS9.m */, - ); - name = NotificationSettings; - sourceTree = ""; - }; - A63E9E42267A847800EA273E /* Language */ = { + DE51DDE2294262670073D5C4 /* RemoteParameters */ = { isa = PBXGroup; children = ( - A6B519A42669614A00AED40E /* LanguageContext.h */, - A6B519A52669614A00AED40E /* LanguageContext.m */, - A6B519A7266964BA00AED40E /* LanguageProvider.h */, - A6B519A82669747B00AED40E /* LanguageProviderAppDefined.h */, - A6B519A92669747B00AED40E /* LanguageProviderAppDefined.m */, - A6B519AB2669749100AED40E /* LanguageProviderDevice.h */, - A6B519AC2669749100AED40E /* LanguageProviderDevice.m */, - ); - name = Language; - sourceTree = ""; - }; - CA6B3CB621B5CF2600AA6A65 /* Model */ = { - isa = PBXGroup; - children = ( - CA47439B2190FEA80020DC8C /* OSTrigger.h */, - CA47439C2190FEA80020DC8C /* OSTrigger.m */, - CACBAA93218A6243000ACAA5 /* OSInAppMessageInternal.h */, - CACBAA94218A6243000ACAA5 /* OSInAppMessageInternal.m */, - CAB269D721B0B6F000F8A43C /* OSInAppMessageAction.h */, - CAB269D821B0B6F000F8A43C /* OSInAppMessageAction.m */, - CAB269DD21B2038B00F8A43C /* OSInAppMessageBridgeEvent.h */, - CAB269DE21B2038B00F8A43C /* OSInAppMessageBridgeEvent.m */, - 7A72EB1123E252D400B4D50F /* OSInAppMessageDisplayStats.h */, - 7A72EB0D23E252C200B4D50F /* OSInAppMessageDisplayStats.m */, - 7A1F2D902406EFDA007799A9 /* OSInAppMessageTag.h */, - 7A1F2D8E2406EFC5007799A9 /* OSInAppMessageTag.m */, - 7A880F2E2404AD010081F5E8 /* OSInAppMessagePrompt.h */, - 7A880F2F2404AD920081F5E8 /* OSInAppMessagePushPrompt.h */, - 7A880F302404AE7B0081F5E8 /* OSInAppMessagePushPrompt.m */, - 7AD172362416D52D00A78B19 /* OSInAppMessageLocationPrompt.h */, - 7AD172372416D53B00A78B19 /* OSInAppMessageLocationPrompt.m */, - DE367CC524EEF2A800165207 /* OSInAppMessagePage.h */, - DE367CC624EEF2BE00165207 /* OSInAppMessagePage.m */, + DE51DDE4294262AB0073D5C4 /* OSRemoteParamController.h */, + DE51DDE3294262AB0073D5C4 /* OSRemoteParamController.m */, ); - name = Model; + path = RemoteParameters; sourceTree = ""; }; - CA7FC88F21925253002C4FD9 /* UI */ = { + DE69E19C282ED8060090BB3D /* OneSignalUser */ = { isa = PBXGroup; children = ( - CACBAA8D218A6242000ACAA5 /* OSInAppMessageViewController.h */, - CACBAA95218A6243000ACAA5 /* OSInAppMessageViewController.m */, - CACBAA91218A6242000ACAA5 /* OSInAppMessageView.h */, - CACBAA92218A6242000ACAA5 /* OSInAppMessageView.m */, + DE69E1A8282ED8360090BB3D /* Source */, + DE69E19E282ED8060090BB3D /* OneSignalUser.docc */, ); - name = UI; - sourceTree = ""; - }; - CA7FC89C21926B6B002C4FD9 /* Controller */ = { - isa = PBXGroup; - children = ( - CACBAA90218A6242000ACAA5 /* OSMessagingController.h */, - CACBAA8E218A6242000ACAA5 /* OSMessagingController.m */, - CA7FC89D21927229002C4FD9 /* OSDynamicTriggerController.h */, - CA7FC89E21927229002C4FD9 /* OSDynamicTriggerController.m */, - CA4742E2218B8FF30020DC8C /* OSTriggerController.h */, - CA4742E3218B8FF30020DC8C /* OSTriggerController.m */, - CA36F35621C33A2500300C77 /* OSInAppMessageController.h */, - CA36F35721C33A2500300C77 /* OSInAppMessageController.m */, - ); - name = Controller; + path = OneSignalUser; sourceTree = ""; }; - CACBAA8C218A6226000ACAA5 /* InAppMessaging */ = { + DE69E1A8282ED8360090BB3D /* Source */ = { isa = PBXGroup; children = ( - DE7D18EA2703B596002D3A5D /* Requests */, - CACBAA8F218A6242000ACAA5 /* OSInAppMessagingDefines.h */, - CA7FC88F21925253002C4FD9 /* UI */, - CA7FC89C21926B6B002C4FD9 /* Controller */, - CA6B3CB621B5CF2600AA6A65 /* Model */, + DE69E19D282ED8060090BB3D /* OneSignalUser.h */, + 3C0EF49D28A1DBCB00E5434B /* OSUserInternalImpl.swift */, + DE69E1AA282ED8790090BB3D /* OneSignalUserManagerImpl.swift */, + DE69E1A9282ED8790090BB3D /* UnitTestApp-Bridging-Header.h */, + 3C2C7DC7288F3C020020F9AE /* OSSubscriptionModel.swift */, + 3CE92279289FA88B001B1062 /* OSIdentityModelStoreListener.swift */, + 3CF8629D28A183F900776CA4 /* OSIdentityModel.swift */, + 3CF862A128A197D200776CA4 /* OSPropertiesModelStoreListener.swift */, + 3CF8629F28A1964F00776CA4 /* OSPropertiesModel.swift */, + 3C8E6DFE28AB09AE0031E48A /* OSPropertyOperationExecutor.swift */, + 3C8E6E0028AC0BA10031E48A /* OSIdentityOperationExecutor.swift */, + 3CE795F828DB99B500736BD4 /* OSSubscriptionModelStoreListener.swift */, + 3CE795FA28DBDCE700736BD4 /* OSSubscriptionOperationExecutor.swift */, + 3CA6CE0928E4F19B00CA0585 /* OSUserRequests.swift */, ); - name = InAppMessaging; + path = Source; sourceTree = ""; }; DE7D17E727026B95002D3A5D /* OneSignalCore */ = { @@ -1527,27 +1634,43 @@ DE7D182127026C31002D3A5D /* Source */ = { isa = PBXGroup; children = ( + DE7D17E827026B95002D3A5D /* OneSignalCore.h */, + DEF7848E2914798400A1F3A5 /* Swizzling */, + DEF7845A2912E89200A1F3A5 /* OSObservable.h */, + DEF7845B2912E89200A1F3A5 /* OSObservable.m */, DE7D185A2703746F002D3A5D /* API */, DE7D183C27027F0A002D3A5D /* Categories */, DE7D182C270273B0002D3A5D /* OSNotification.h */, 454F94F41FAD2E5A00D74CCF /* OSNotification.m */, 454F94F61FAD2EC300D74CCF /* OSNotification+Internal.h */, + 3CE8CC4C2911ADD1000DB0D3 /* OSDeviceUtils.h */, + 3C47A972292642B100312125 /* OneSignalConfigManager.h */, + 3C47A973292642B100312125 /* OneSignalConfigManager.m */, + 3CE8CC4D2911ADD1000DB0D3 /* OSDeviceUtils.m */, CA70E3382023F24500019273 /* OneSignalCommonDefines.h */, 7AD8DDE8234BD3CF00747A8A /* OneSignalUserDefaults.h */, 7AD8DDE6234BD3BE00747A8A /* OneSignalUserDefaults.m */, + 912411FC1E73342200E41FD7 /* OneSignalMobileProvision.h */, + 912411FD1E73342200E41FD7 /* OneSignalMobileProvision.m */, 4529DF0A1FA932AC00CEAB1D /* OneSignalTrackFirebaseAnalytics.h */, 4529DF0B1FA932AC00CEAB1D /* OneSignalTrackFirebaseAnalytics.m */, - DE7D17E827026B95002D3A5D /* OneSignalCore.h */, DE7D1831270279D9002D3A5D /* OSNotificationClasses.h */, DE7D183527027AA0002D3A5D /* OneSignalLog.h */, + 3CCF44BC299B17290021964D /* OneSignalWrapper.h */, + 3CCF44BD299B17290021964D /* OneSignalWrapper.m */, DE7D183327027A73002D3A5D /* OneSignalLog.m */, DE7D187627037A16002D3A5D /* OneSignalCoreHelper.h */, DE7D187827037A26002D3A5D /* OneSignalCoreHelper.m */, 7AE28B8725B8ADF400529100 /* OSMacros.h */, DE971751274C48B700FC409E /* OSPrivacyConsentController.m */, DE971753274C48CF00FC409E /* OSPrivacyConsentController.h */, - 03CCCC8B283624F3004BF794 /* SwizzlingForwarder.h */, - 03CCCC8C283624F3004BF794 /* SwizzlingForwarder.m */, + DEF784622912F79700A1F3A5 /* OSDialogInstanceManager.h */, + DEF784632912FA5100A1F3A5 /* OSDialogInstanceManager.m */, + DE51DDE2294262670073D5C4 /* RemoteParameters */, + DEBAAEAE2A435AC800BF2C1C /* OSLocation.h */, + DEBAAEAF2A435AE900BF2C1C /* OSInAppMessages.h */, + DEBAAEB22A436CE800BF2C1C /* OSStubInAppMessages.m */, + DEBAAEB42A436D5D00BF2C1C /* OSStubLocation.m */, ); path = Source; sourceTree = ""; @@ -1555,6 +1678,8 @@ DE7D183C27027F0A002D3A5D /* Categories */ = { isa = PBXGroup; children = ( + DE9877292591654600DE07D5 /* NSDateFormatter+OneSignal.h */, + DE98772A2591655800DE07D5 /* NSDateFormatter+OneSignal.m */, 1AF75EAC1E8567FD0097B315 /* NSString+OneSignal.h */, 1AF75EAD1E8567FD0097B315 /* NSString+OneSignal.m */, CA36A42A208FDEFB003EFA9A /* NSURL+OneSignal.h */, @@ -1575,6 +1700,10 @@ DE7D185F270374EE002D3A5D /* OneSignalRequest.h */, DE7D1861270374EE002D3A5D /* OneSignalRequest.m */, DE7D185B270374EE002D3A5D /* OSJSONHandling.h */, + 912411FE1E73342200E41FD7 /* OneSignalReachability.h */, + 912411FF1E73342200E41FD7 /* OneSignalReachability.m */, + 3CE8CC502911AE90000DB0D3 /* OSNetworkingUtils.h */, + 3CE8CC512911AE90000DB0D3 /* OSNetworkingUtils.m */, ); path = API; sourceTree = ""; @@ -1584,7 +1713,7 @@ children = ( DE7D188D27037F5C002D3A5D /* Source */, DE7D188227037F43002D3A5D /* OneSignalOutcomes.h */, - DE3CD2FE270FA9F200A5BECD /* OneSignalOutcomes.m */, + DE3CD2FE270FA9F200A5BECD /* OSOutcomes.m */, 7A880F2923FB45CE0081F5E8 /* OSInAppMessageOutcome.h */, 7A880F2A23FB45FB0081F5E8 /* OSInAppMessageOutcome.m */, DE7D188327037F43002D3A5D /* OneSignalOutcomes.docc */, @@ -1708,6 +1837,8 @@ 7A12EBDC23060B37005C4FA5 /* OSIndirectInfluence.m */, 7AF9865524452A8C00C36EAE /* OSInfluence.h */, 7AF9865724452A9600C36EAE /* OSInfluence.m */, + 7A600B41245378ED00514A53 /* OSFocusInfluenceParam.h */, + 7A600B432453790700514A53 /* OSFocusInfluenceParam.m */, ); path = model; sourceTree = ""; @@ -1717,17 +1848,6 @@ children = ( DE7D18DC2703B44B002D3A5D /* OSFocusRequests.h */, DE7D18DE2703B49B002D3A5D /* OSFocusRequests.m */, - DE7D18E22703B503002D3A5D /* OSLocationRequests.h */, - DE7D18E42703B510002D3A5D /* OSLocationRequests.m */, - ); - name = Requests; - sourceTree = ""; - }; - DE7D18EA2703B596002D3A5D /* Requests */ = { - isa = PBXGroup; - children = ( - DE7D18EB2703B5AA002D3A5D /* OSInAppMessagingRequests.h */, - DE7D18ED2703B5B9002D3A5D /* OSInAppMessagingRequests.m */, ); name = Requests; sourceTree = ""; @@ -1756,6 +1876,130 @@ path = OneSignalExtensionFramework; sourceTree = ""; }; + DEA98C1328C90C74000C6856 /* OneSignalUserFramework */ = { + isa = PBXGroup; + children = ( + DEA98C1428C90C74000C6856 /* Info.plist */, + ); + path = OneSignalUserFramework; + sourceTree = ""; + }; + DEA98C1528C90C87000C6856 /* OneSignalOSCoreFramework */ = { + isa = PBXGroup; + children = ( + DEA98C1628C90C87000C6856 /* Info.plist */, + ); + path = OneSignalOSCoreFramework; + sourceTree = ""; + }; + DEBAADFA2A420A3900BF2C1C /* OneSignalLocation */ = { + isa = PBXGroup; + children = ( + DEBAADFB2A420A3900BF2C1C /* OneSignalLocationManager.h */, + DEBAAE182A420D6500BF2C1C /* OneSignalLocationManager.m */, + ); + path = OneSignalLocation; + sourceTree = ""; + }; + DEBAAE012A420B0500BF2C1C /* OneSignalLocationFramework */ = { + isa = PBXGroup; + children = ( + DEBAAE022A420B8000BF2C1C /* Info.plist */, + ); + path = OneSignalLocationFramework; + sourceTree = ""; + }; + DEBAAE212A42119100BF2C1C /* OneSignalInAppMessagesFramework */ = { + isa = PBXGroup; + children = ( + DEBAAE222A4211C600BF2C1C /* Info.plist */, + ); + path = OneSignalInAppMessagesFramework; + sourceTree = ""; + }; + DEBAAE292A4211DA00BF2C1C /* OneSignalInAppMessages */ = { + isa = PBXGroup; + children = ( + DEBAAE4F2A4216A100BF2C1C /* Requests */, + DEBAAE4E2A42159000BF2C1C /* Model */, + DEBAAE4D2A42158600BF2C1C /* Controller */, + DEBAAE4C2A42157B00BF2C1C /* UI */, + DEBAAE2A2A4211DA00BF2C1C /* OneSignalInAppMessages.h */, + DEBAAE982A42179A00BF2C1C /* OneSignalInAppMessages.m */, + DEBAAE962A42178800BF2C1C /* OSInAppMessagingDefines.h */, + ); + path = OneSignalInAppMessages; + sourceTree = ""; + }; + DEBAAE4C2A42157B00BF2C1C /* UI */ = { + isa = PBXGroup; + children = ( + DEF7847C29146B2700A1F3A5 /* OneSignalWebView.h */, + DEF7847B29146B2700A1F3A5 /* OneSignalWebView.m */, + DEF7848129146BD100A1F3A5 /* OneSignalWebViewManager.h */, + DEF7847F29146BBE00A1F3A5 /* OneSignalWebViewManager.m */, + DEBAAE512A42174A00BF2C1C /* OSInAppMessageView.h */, + DEBAAE532A42174A00BF2C1C /* OSInAppMessageView.m */, + DEBAAE522A42174A00BF2C1C /* OSInAppMessageViewController.h */, + DEBAAE502A42174A00BF2C1C /* OSInAppMessageViewController.m */, + ); + path = UI; + sourceTree = ""; + }; + DEBAAE4D2A42158600BF2C1C /* Controller */ = { + isa = PBXGroup; + children = ( + DEBAAE5E2A42175900BF2C1C /* OSDynamicTriggerController.h */, + DEBAAE582A42175900BF2C1C /* OSDynamicTriggerController.m */, + DEBAAE5A2A42175900BF2C1C /* OSInAppMessageController.h */, + DEBAAE5B2A42175900BF2C1C /* OSInAppMessageController.m */, + DEBAAE592A42175900BF2C1C /* OSMessagingController.h */, + DEBAAE5D2A42175900BF2C1C /* OSMessagingController.m */, + DEBAAE5C2A42175900BF2C1C /* OSTriggerController.h */, + DEBAAE5F2A42175900BF2C1C /* OSTriggerController.m */, + DEBAAEB62A4381AE00BF2C1C /* OSInAppMessageMigrationController.h */, + DEBAAEB72A4381AE00BF2C1C /* OSInAppMessageMigrationController.m */, + ); + path = Controller; + sourceTree = ""; + }; + DEBAAE4E2A42159000BF2C1C /* Model */ = { + isa = PBXGroup; + children = ( + DEBAAE782A42176700BF2C1C /* OSInAppMessageBridgeEvent.h */, + DEBAAE722A42176700BF2C1C /* OSInAppMessageBridgeEvent.m */, + DEBAAE732A42176700BF2C1C /* OSInAppMessageClickEvent.h */, + DEBAAE742A42176700BF2C1C /* OSInAppMessageClickEvent.m */, + DEBAAE762A42176700BF2C1C /* OSInAppMessageClickResult.h */, + DEBAAE792A42176700BF2C1C /* OSInAppMessageClickResult.m */, + DEBAAE692A42176600BF2C1C /* OSInAppMessageDisplayStats.h */, + DEBAAE6F2A42176700BF2C1C /* OSInAppMessageDisplayStats.m */, + DEBAAE6B2A42176600BF2C1C /* OSInAppMessageInternal.h */, + DEBAAE752A42176700BF2C1C /* OSInAppMessageInternal.m */, + DEBAAE7A2A42176800BF2C1C /* OSInAppMessageLocationPrompt.h */, + DEBAAE6E2A42176600BF2C1C /* OSInAppMessageLocationPrompt.m */, + DEBAAE682A42176600BF2C1C /* OSInAppMessagePage.h */, + DEBAAE7B2A42176800BF2C1C /* OSInAppMessagePage.m */, + DEBAAE6D2A42176600BF2C1C /* OSInAppMessagePrompt.h */, + DEBAAE7C2A42176800BF2C1C /* OSInAppMessagePushPrompt.h */, + DEBAAE772A42176700BF2C1C /* OSInAppMessagePushPrompt.m */, + DEBAAE702A42176700BF2C1C /* OSInAppMessageTag.h */, + DEBAAE6A2A42176600BF2C1C /* OSInAppMessageTag.m */, + DEBAAE712A42176700BF2C1C /* OSTrigger.h */, + DEBAAE6C2A42176600BF2C1C /* OSTrigger.m */, + ); + path = Model; + sourceTree = ""; + }; + DEBAAE4F2A4216A100BF2C1C /* Requests */ = { + isa = PBXGroup; + children = ( + DEBAAE922A42177B00BF2C1C /* OSInAppMessagingRequests.h */, + DEBAAE932A42177B00BF2C1C /* OSInAppMessagingRequests.m */, + ); + path = Requests; + sourceTree = ""; + }; DEF5CCF22539321A0003E9CC /* UnitTestApp */ = { isa = PBXGroup; children = ( @@ -1773,79 +2017,105 @@ path = UnitTestApp; sourceTree = ""; }; -/* End PBXGroup section */ - -/* Begin PBXHeadersBuildPhase section */ - 3E2400351D4FFC31008BDE70 /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - CACBAA96218A6243000ACAA5 /* OSInAppMessageViewController.h in Headers */, - 7AAA60662485D0310004FADE /* OSMigrationController.h in Headers */, - CA47439D2190FEA80020DC8C /* OSTrigger.h in Headers */, - 9DDFEEF223189C0800EAE0BB /* OneSignalViewHelper.h in Headers */, - A63E9E4126742C1800EA273E /* LanguageProviderDevice.h in Headers */, - 7AF5174524FDC2AA00B076BC /* OSRemoteParamController.h in Headers */, - A63E9E3F26742C1400EA273E /* LanguageProvider.h in Headers */, - A66239952686612F00D52FD8 /* OneSignal.h in Headers */, - 7A5E720725A66E0A00CB5605 /* OSUserStatePushSynchronizer.h in Headers */, - 912412211E73342200E41FD7 /* OneSignalLocation.h in Headers */, - 7A93266A25AC985500BBEC27 /* OSLocationState.h in Headers */, - 7A93269325AF4E6700BBEC27 /* OSPendingCallbacks.h in Headers */, - 912412291E73342200E41FD7 /* OneSignalReachability.h in Headers */, - 912412251E73342200E41FD7 /* OneSignalMobileProvision.h in Headers */, - A63E9E3E26742C1000EA273E /* LanguageContext.h in Headers */, - 91F58D7A1E7C7D3F0017D24D /* OneSignalNotificationSettings.h in Headers */, - CA4742E4218B8FF30020DC8C /* OSTriggerController.h in Headers */, - DE7D18EC2703B5AA002D3A5D /* OSInAppMessagingRequests.h in Headers */, - DE16C14724D3727200670EFA /* OneSignalLifecycleObserver.h in Headers */, - 7A42742B25CDCA7800EE75FC /* OSSMSSubscription.h in Headers */, + DEF7842A2912DEBA00A1F3A5 /* OneSignalNotifications */ = { + isa = PBXGroup; + children = ( + DEF7842B2912DEBA00A1F3A5 /* OneSignalNotifications.h */, + DEF78485291471B200A1F3A5 /* Categories */, + DEF7844B2912E35700A1F3A5 /* NotificationSettings */, + DEF784482912E23A00A1F3A5 /* OSNotificationsManager.h */, + DEF784472912E23A00A1F3A5 /* OSNotificationsManager.m */, + DEF784562912E4BA00A1F3A5 /* OSPermission.h */, + DEF784572912E4BA00A1F3A5 /* OSPermission.m */, + DEF7847029132AA700A1F3A5 /* OSNotification+OneSignal.h */, + DEF7847129132AA700A1F3A5 /* OSNotification+OneSignal.m */, + ); + path = OneSignalNotifications; + sourceTree = ""; + }; + DEF784352912E00900A1F3A5 /* OneSignalNotificationsFramework */ = { + isa = PBXGroup; + children = ( + DEF784362912E05100A1F3A5 /* Info.plist */, + ); + path = OneSignalNotificationsFramework; + sourceTree = ""; + }; + DEF7844B2912E35700A1F3A5 /* NotificationSettings */ = { + isa = PBXGroup; + children = ( + DEF7844D2912E3EA00A1F3A5 /* OneSignalNotificationSettings.h */, + DEF784502912E3EB00A1F3A5 /* OneSignalNotificationSettings.m */, + ); + path = NotificationSettings; + sourceTree = ""; + }; + DEF78485291471B200A1F3A5 /* Categories */ = { + isa = PBXGroup; + children = ( + DEF78487291471DA00A1F3A5 /* UIApplicationDelegate+OneSignalNotifications.h */, + DEF78489291471DA00A1F3A5 /* UIApplicationDelegate+OneSignalNotifications.m */, + DEF78488291471DA00A1F3A5 /* UNUserNotificationCenter+OneSignalNotifications.h */, + DEF78486291471D900A1F3A5 /* UNUserNotificationCenter+OneSignalNotifications.m */, + ); + path = Categories; + sourceTree = ""; + }; + DEF7848E2914798400A1F3A5 /* Swizzling */ = { + isa = PBXGroup; + children = ( + DEF78494291479C000A1F3A5 /* SwizzlingForwarder.h */, + DEF78495291479C100A1F3A5 /* SwizzlingForwarder.m */, + DEF78491291479B200A1F3A5 /* OneSignalSelectorHelpers.h */, + DEF78490291479B200A1F3A5 /* OneSignalSelectorHelpers.m */, + ); + path = Swizzling; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXHeadersBuildPhase section */ + 3C11515C289A259500565C41 /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + 3C115171289A259500565C41 /* OneSignalOSCore.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 3E2400351D4FFC31008BDE70 /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + 7AAA60662485D0310004FADE /* OSMigrationController.h in Headers */, + A66239952686612F00D52FD8 /* OneSignalFramework.h in Headers */, + 7A93269325AF4E6700BBEC27 /* OSPendingCallbacks.h in Headers */, + 944F7ED1296F9F0700AEBA54 /* OneSignalLiveActivityController.h in Headers */, + DE16C14724D3727200670EFA /* OneSignalLifecycleObserver.h in Headers */, 7A674F192360D813001F9ACD /* OSBaseFocusTimeProcessor.h in Headers */, - CA36F35821C33A2500300C77 /* OSInAppMessageController.h in Headers */, - 7A600B42245378ED00514A53 /* OSFocusInfluenceParam.h in Headers */, CA1A6E6F20DC2E73001C41B9 /* OneSignalDialogRequest.h in Headers */, - 7A42745425CDF05500EE75FC /* OSUserStateSMSSynchronizer.h in Headers */, - CAEA1C66202BB3C600FBFE9E /* OSEmailSubscription.h in Headers */, - 91F58D811E7C80C30017D24D /* OneSignalNotificationSettingsIOS9.h in Headers */, CA1A6E6920DC2E31001C41B9 /* OneSignalDialogController.h in Headers */, - A6D7093B2694D200007B3347 /* OneSignalSetLanguageParameters.h in Headers */, - 7A5E721B25A66E2900CB5605 /* OSUserStateEmailSynchronizer.h in Headers */, - 912412411E73342200E41FD7 /* UNUserNotificationCenter+OneSignal.h in Headers */, - DE9A5DAA25D1FD6B00FCEC21 /* OSPlayerTags.h in Headers */, - 91B6EA451E86555200B5CF01 /* OSObservable.h in Headers */, - DE367CCA24EEF2C800165207 /* OSInAppMessagePage.h in Headers */, - DE3CD2FD270F9A8100A5BECD /* OSNotification+OneSignal.h in Headers */, - CACBAA9C218A6243000ACAA5 /* OSInAppMessageView.h in Headers */, 912412351E73342200E41FD7 /* OneSignalTrackIAP.h in Headers */, 7AECE59423674AA700537907 /* OSAttributedFocusTimeProcessor.h in Headers */, 912412311E73342200E41FD7 /* OneSignalTracker.h in Headers */, - A63E9E4026742C1600EA273E /* LanguageProviderAppDefined.h in Headers */, - 9124122D1E73342200E41FD7 /* OneSignalSelectorHelpers.h in Headers */, 9124123D1E73342200E41FD7 /* UIApplicationDelegate+OneSignal.h in Headers */, 7AF9865324451F3900C36EAE /* OSFocusCallParams.h in Headers */, DE7D18DD2703B44B002D3A5D /* OSFocusRequests.h in Headers */, - CAB269D921B0B6F000F8A43C /* OSInAppMessageAction.h in Headers */, DEE8198D24E21DF000868CBA /* UIApplication+OneSignal.h in Headers */, - 7A5E71F325A66DDB00CB5605 /* OSUserStateSynchronizer.h in Headers */, 7AECE59C23675F5700537907 /* OSFocusTimeProcessorFactory.h in Headers */, 7AECE59A23674ADC00537907 /* OSUnattributedFocusTimeProcessor.h in Headers */, - 7A42748025D18F2C00EE75FC /* OneSignalSetSMSParameters.h in Headers */, - CACBAA9B218A6243000ACAA5 /* OSMessagingController.h in Headers */, 9124121D1E73342200E41FD7 /* OneSignalJailbreakDetection.h in Headers */, - 7A5E725925A66E9800CB5605 /* OSStateSynchronizer.h in Headers */, - DE7D18E32703B503002D3A5D /* OSLocationRequests.h in Headers */, - 7A93264825A8DD3600BBEC27 /* OSUserState.h in Headers */, - 9129C6B71E89E59B009CB6A0 /* OSPermission.h in Headers */, - 7A72EB1223E252DD00B4D50F /* OSInAppMessageDisplayStats.h in Headers */, + 3C448B9D2936ADFD002F96BC /* OSBackgroundTaskHandlerImpl.h in Headers */, 912412151E73342200E41FD7 /* OneSignalHelper.h in Headers */, - 91F58D7F1E7C7F5F0017D24D /* OneSignalNotificationSettingsIOS10.h in Headers */, - 912412391E73342200E41FD7 /* OneSignalWebView.h in Headers */, - CACBAAA0218A6243000ACAA5 /* OSInAppMessageInternal.h in Headers */, 91C7725E1E7CCE1000D612D0 /* OneSignalInternal.h in Headers */, - CAB269DF21B2038B00F8A43C /* OSInAppMessageBridgeEvent.h in Headers */, - 9129C6BD1E89E7AB009CB6A0 /* OSSubscription.h in Headers */, - CA7FC89F21927229002C4FD9 /* OSDynamicTriggerController.h in Headers */, - DE98773C2591656A00DE07D5 /* NSDateFormatter+OneSignal.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + DE69E196282ED8060090BB3D /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + DE69E1A0282ED8060090BB3D /* OneSignalUser.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -1854,22 +2124,34 @@ buildActionMask = 2147483647; files = ( DE7D1869270374EE002D3A5D /* OneSignalClient.h in Headers */, + DE51DDE6294262AB0073D5C4 /* OSRemoteParamController.h in Headers */, + DEF78496291479C100A1F3A5 /* SwizzlingForwarder.h in Headers */, DE7D1832270279D9002D3A5D /* OSNotificationClasses.h in Headers */, DE7D186E2703751B002D3A5D /* OSRequests.h in Headers */, DE7D18D1270389E1002D3A5D /* OSMacros.h in Headers */, DE7D182927026F8B002D3A5D /* OneSignalUserDefaults.h in Headers */, DE7D187727037A16002D3A5D /* OneSignalCoreHelper.h in Headers */, + DEBAAEB12A435B5100BF2C1C /* OSInAppMessages.h in Headers */, DE7D182F270275FF002D3A5D /* OneSignalTrackFirebaseAnalytics.h in Headers */, - 03CCCC8D283624F3004BF794 /* SwizzlingForwarder.h in Headers */, + DEF7845C2912E89200A1F3A5 /* OSObservable.h in Headers */, DE7D1875270375FF002D3A5D /* OSReattemptRequest.h in Headers */, + DEF784652912FB2200A1F3A5 /* OSDialogInstanceManager.h in Headers */, + DEF78493291479B200A1F3A5 /* OneSignalSelectorHelpers.h in Headers */, DE7D1862270374EE002D3A5D /* OSJSONHandling.h in Headers */, DE7D1868270374EE002D3A5D /* OneSignalRequest.h in Headers */, DE7D183027027973002D3A5D /* OSNotification+Internal.h in Headers */, DE7D183D27027F13002D3A5D /* NSURL+OneSignal.h in Headers */, + DEF784792914667A00A1F3A5 /* NSDateFormatter+OneSignal.h in Headers */, DE7D17EB27026B95002D3A5D /* OneSignalCore.h in Headers */, DE7D182A270271A9002D3A5D /* OneSignalCommonDefines.h in Headers */, + 3CE8CC522911AE90000DB0D3 /* OSNetworkingUtils.h in Headers */, + DEBAAEB02A435B4D00BF2C1C /* OSLocation.h in Headers */, DE971754274C48CF00FC409E /* OSPrivacyConsentController.h in Headers */, + 3CE8CC4E2911ADD1000DB0D3 /* OSDeviceUtils.h in Headers */, + 3C47A974292642B100312125 /* OneSignalConfigManager.h in Headers */, DE7D183627027AA0002D3A5D /* OneSignalLog.h in Headers */, + 3C44673F296D09CC0039A49E /* OneSignalMobileProvision.h in Headers */, + 3CCF44BE299B17290021964D /* OneSignalWrapper.h in Headers */, DE7D182D270273B0002D3A5D /* OSNotification.h in Headers */, DE7D183F27027F62002D3A5D /* NSString+OneSignal.h in Headers */, ); @@ -1911,6 +2193,7 @@ DE7D18B127038164002D3A5D /* OSOutcomeEventsFactory.h in Headers */, DE7D18CF270385E0002D3A5D /* OSOutcomesRequests.h in Headers */, DE7D18C1270381A1002D3A5D /* OSOutcomeEventsV2Repository.h in Headers */, + 3C789DBE293D8EAD004CF83D /* OSFocusInfluenceParam.h in Headers */, DE7D18BD27038190002D3A5D /* OSOutcomeEventParams.h in Headers */, DE7D18AF2703815D002D3A5D /* OSOutcomeEventsRepository.h in Headers */, DE7D189C27038113002D3A5D /* OSInfluenceDataDefines.h in Headers */, @@ -1919,6 +2202,58 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + DEBAADF42A420A3700BF2C1C /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + DEBAADFC2A420A3900BF2C1C /* OneSignalLocationManager.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + DEBAAE232A4211D900BF2C1C /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + DEBAAE802A42176800BF2C1C /* OSInAppMessageInternal.h in Headers */, + DEBAAE942A42177B00BF2C1C /* OSInAppMessagingRequests.h in Headers */, + DEBAAE8F2A42176800BF2C1C /* OSInAppMessageLocationPrompt.h in Headers */, + DEBAAE862A42176800BF2C1C /* OSTrigger.h in Headers */, + DEBAAE552A42174A00BF2C1C /* OSInAppMessageView.h in Headers */, + DEBAAE972A42178800BF2C1C /* OSInAppMessagingDefines.h in Headers */, + DEBAAE822A42176800BF2C1C /* OSInAppMessagePrompt.h in Headers */, + DEBAAE612A42175A00BF2C1C /* OSMessagingController.h in Headers */, + DEBAAE852A42176800BF2C1C /* OSInAppMessageTag.h in Headers */, + DEBAAE622A42175A00BF2C1C /* OSInAppMessageController.h in Headers */, + DEBAAE662A42175A00BF2C1C /* OSDynamicTriggerController.h in Headers */, + DEBAAE642A42175A00BF2C1C /* OSTriggerController.h in Headers */, + DEBAAE562A42174A00BF2C1C /* OSInAppMessageViewController.h in Headers */, + DEBAAEB82A4381AE00BF2C1C /* OSInAppMessageMigrationController.h in Headers */, + DEBAAE7E2A42176800BF2C1C /* OSInAppMessageDisplayStats.h in Headers */, + DEBAAE882A42176800BF2C1C /* OSInAppMessageClickEvent.h in Headers */, + DEBAAE7D2A42176800BF2C1C /* OSInAppMessagePage.h in Headers */, + DE70EB952A5CAD77003166D3 /* OneSignalWebViewManager.h in Headers */, + DEBAAE8B2A42176800BF2C1C /* OSInAppMessageClickResult.h in Headers */, + DEBAAE912A42176800BF2C1C /* OSInAppMessagePushPrompt.h in Headers */, + DE70EB942A5CAD70003166D3 /* OneSignalWebView.h in Headers */, + DEBAAE2B2A4211DA00BF2C1C /* OneSignalInAppMessages.h in Headers */, + DEBAAE8D2A42176800BF2C1C /* OSInAppMessageBridgeEvent.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + DEF784242912DEB600A1F3A5 /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + DEF7842C2912DEBA00A1F3A5 /* OneSignalNotifications.h in Headers */, + DEF784522912E3EB00A1F3A5 /* OneSignalNotificationSettings.h in Headers */, + DEF7848C291471DA00A1F3A5 /* UNUserNotificationCenter+OneSignalNotifications.h in Headers */, + DEF7847229132AA700A1F3A5 /* OSNotification+OneSignal.h in Headers */, + DEF784582912E4BA00A1F3A5 /* OSPermission.h in Headers */, + DEF7848B291471DA00A1F3A5 /* UIApplicationDelegate+OneSignalNotifications.h in Headers */, + DEF7844A2912E23A00A1F3A5 /* OSNotificationsManager.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; /* End PBXHeadersBuildPhase section */ /* Begin PBXNativeTarget section */ @@ -1939,6 +2274,25 @@ productReference = 37747F9319147D6500558FAD /* libOneSignal.a */; productType = "com.apple.product-type.library.static"; }; + 3C115160289A259500565C41 /* OneSignalOSCore */ = { + isa = PBXNativeTarget; + buildConfigurationList = 3C115172289A259500565C41 /* Build configuration list for PBXNativeTarget "OneSignalOSCore" */; + buildPhases = ( + 3C11515C289A259500565C41 /* Headers */, + 3C11515D289A259500565C41 /* Sources */, + 3C11515E289A259500565C41 /* Frameworks */, + 3C11515F289A259500565C41 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 3C115195289AF85400565C41 /* PBXTargetDependency */, + ); + name = OneSignalOSCore; + productName = OneSignalOSCore; + productReference = 3C115161289A259500565C41 /* OneSignalOSCore.framework */; + productType = "com.apple.product-type.framework"; + }; 3E2400371D4FFC31008BDE70 /* OneSignalFramework */ = { isa = PBXNativeTarget; buildConfigurationList = 3E24003F1D4FFC31008BDE70 /* Build configuration list for PBXNativeTarget "OneSignalFramework" */; @@ -1954,10 +2308,13 @@ DE7D181227026BE2002D3A5D /* PBXTargetDependency */, DE7D181727026BE6002D3A5D /* PBXTargetDependency */, DE7D18C927038249002D3A5D /* PBXTargetDependency */, + DE69E1B5282ED9430090BB3D /* PBXTargetDependency */, + 3C11519A289AF86C00565C41 /* PBXTargetDependency */, + DEF7843B2912E15000A1F3A5 /* PBXTargetDependency */, ); name = OneSignalFramework; productName = "OneSignal-Dynamic"; - productReference = 3E2400381D4FFC31008BDE70 /* OneSignal.framework */; + productReference = 3E2400381D4FFC31008BDE70 /* OneSignalFramework.framework */; productType = "com.apple.product-type.framework"; }; 911E2CB91E398AB3003112A4 /* UnitTests */ = { @@ -1978,6 +2335,27 @@ productReference = 911E2CBA1E398AB3003112A4 /* UnitTests.xctest */; productType = "com.apple.product-type.bundle.unit-test"; }; + DE69E19A282ED8060090BB3D /* OneSignalUser */ = { + isa = PBXNativeTarget; + buildConfigurationList = DE69E1A7282ED8070090BB3D /* Build configuration list for PBXNativeTarget "OneSignalUser" */; + buildPhases = ( + DE69E196282ED8060090BB3D /* Headers */, + DE69E197282ED8060090BB3D /* Sources */, + DE69E198282ED8060090BB3D /* Frameworks */, + DE69E199282ED8060090BB3D /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + DE69E1B0282ED8F20090BB3D /* PBXTargetDependency */, + DE12F3F5289B28C4002F63AA /* PBXTargetDependency */, + DEF7846E2913176800A1F3A5 /* PBXTargetDependency */, + ); + name = OneSignalUser; + productName = OneSignalUser; + productReference = DE69E19B282ED8060090BB3D /* OneSignalUser.framework */; + productType = "com.apple.product-type.framework"; + }; DE7D17E527026B95002D3A5D /* OneSignalCore */ = { isa = PBXNativeTarget; buildConfigurationList = DE7D17F327026B95002D3A5D /* Build configuration list for PBXNativeTarget "OneSignalCore" */; @@ -2035,6 +2413,51 @@ productReference = DE7D188027037F43002D3A5D /* OneSignalOutcomes.framework */; productType = "com.apple.product-type.framework"; }; + DEBAADF82A420A3700BF2C1C /* OneSignalLocation */ = { + isa = PBXNativeTarget; + buildConfigurationList = DEBAAE002A420A3A00BF2C1C /* Build configuration list for PBXNativeTarget "OneSignalLocation" */; + buildPhases = ( + DEBAADF42A420A3700BF2C1C /* Headers */, + DEBAADF52A420A3700BF2C1C /* Sources */, + DEBAADF62A420A3700BF2C1C /* Frameworks */, + DEBAADF72A420A3700BF2C1C /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + DEBAAE072A420C9800BF2C1C /* PBXTargetDependency */, + DEBAAE0E2A420CC100BF2C1C /* PBXTargetDependency */, + DEBAAE132A420CCA00BF2C1C /* PBXTargetDependency */, + DEBAAE172A420CCF00BF2C1C /* PBXTargetDependency */, + ); + name = OneSignalLocation; + productName = OneSignalLocation; + productReference = DEBAADF92A420A3700BF2C1C /* OneSignalLocation.framework */; + productType = "com.apple.product-type.framework"; + }; + DEBAAE272A4211D900BF2C1C /* OneSignalInAppMessages */ = { + isa = PBXNativeTarget; + buildConfigurationList = DEBAAE302A4211DA00BF2C1C /* Build configuration list for PBXNativeTarget "OneSignalInAppMessages" */; + buildPhases = ( + DEBAAE232A4211D900BF2C1C /* Headers */, + DEBAAE242A4211D900BF2C1C /* Sources */, + DEBAAE252A4211D900BF2C1C /* Frameworks */, + DEBAAE262A4211D900BF2C1C /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + DEBAAE372A42120E00BF2C1C /* PBXTargetDependency */, + DEBAAE3C2A42121100BF2C1C /* PBXTargetDependency */, + DEBAAE402A42121400BF2C1C /* PBXTargetDependency */, + DEBAAE442A42121800BF2C1C /* PBXTargetDependency */, + DEBAAE482A42122000BF2C1C /* PBXTargetDependency */, + ); + name = OneSignalInAppMessages; + productName = OneSignalInAppMessages; + productReference = DEBAAE282A4211D900BF2C1C /* OneSignalInAppMessages.framework */; + productType = "com.apple.product-type.framework"; + }; DEF5CCF02539321A0003E9CC /* UnitTestApp */ = { isa = PBXNativeTarget; buildConfigurationList = DEF5CD072539321D0003E9CC /* Build configuration list for PBXNativeTarget "UnitTestApp" */; @@ -2042,35 +2465,69 @@ DEF5CCED2539321A0003E9CC /* Sources */, DEF5CCEE2539321A0003E9CC /* Frameworks */, DEF5CCEF2539321A0003E9CC /* Resources */, - DE7D17F027026B95002D3A5D /* Embed Frameworks */, + DEA4B45E2888C1D000E9FE12 /* Embed Frameworks */, ); buildRules = ( ); dependencies = ( + DEF7842E2912DEBA00A1F3A5 /* PBXTargetDependency */, + DEBAAE2D2A4211DA00BF2C1C /* PBXTargetDependency */, ); name = UnitTestApp; productName = UnitTestApp; productReference = DEF5CCF12539321A0003E9CC /* UnitTestApp.app */; productType = "com.apple.product-type.application"; }; + DEF784282912DEB600A1F3A5 /* OneSignalNotifications */ = { + isa = PBXNativeTarget; + buildConfigurationList = DEF784312912DEBD00A1F3A5 /* Build configuration list for PBXNativeTarget "OneSignalNotifications" */; + buildPhases = ( + DEF784242912DEB600A1F3A5 /* Headers */, + DEF784252912DEB600A1F3A5 /* Sources */, + DEF784262912DEB600A1F3A5 /* Frameworks */, + DEF784272912DEB600A1F3A5 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + DEF784452912E16F00A1F3A5 /* PBXTargetDependency */, + DE2D8F482947D85800844084 /* PBXTargetDependency */, + DE2D8F4D2947D86200844084 /* PBXTargetDependency */, + ); + name = OneSignalNotifications; + productName = OneSignalNotifications; + productReference = DEF784292912DEB600A1F3A5 /* OneSignalNotifications.framework */; + productType = "com.apple.product-type.framework"; + }; /* End PBXNativeTarget section */ /* Begin PBXProject section */ 37747F8B19147D6400558FAD /* Project object */ = { isa = PBXProject; attributes = { + LastSwiftUpdateCheck = 1320; LastUpgradeCheck = 0800; ORGANIZATIONNAME = Hiptic; TargetAttributes = { + 37747F9219147D6500558FAD = { + LastSwiftMigration = 1410; + }; + 3C115160289A259500565C41 = { + CreatedOnToolsVersion = 13.2.1; + DevelopmentTeam = 99SW8E36CT; + ProvisioningStyle = Automatic; + }; 3E2400371D4FFC31008BDE70 = { CreatedOnToolsVersion = 8.0; DevelopmentTeam = 99SW8E36CT; DevelopmentTeamName = "Lilomi Inc."; + LastSwiftMigration = 1410; ProvisioningStyle = Automatic; }; 911E2CB91E398AB3003112A4 = { CreatedOnToolsVersion = 8.1; DevelopmentTeam = 99SW8E36CT; + LastSwiftMigration = 1320; ProvisioningStyle = Automatic; TestTargetID = DEF5CCF02539321A0003E9CC; }; @@ -2083,6 +2540,11 @@ DevelopmentTeam = 4ZR3G6ZK9T; ProvisioningStyle = Automatic; }; + DE69E19A282ED8060090BB3D = { + CreatedOnToolsVersion = 13.2.1; + DevelopmentTeam = 99SW8E36CT; + ProvisioningStyle = Automatic; + }; DE7D17E527026B95002D3A5D = { CreatedOnToolsVersion = 13.0; DevelopmentTeam = 99SW8E36CT; @@ -2098,6 +2560,16 @@ DevelopmentTeam = 99SW8E36CT; ProvisioningStyle = Automatic; }; + DEBAADF82A420A3700BF2C1C = { + CreatedOnToolsVersion = 14.3; + DevelopmentTeam = 99SW8E36CT; + ProvisioningStyle = Automatic; + }; + DEBAAE272A4211D900BF2C1C = { + CreatedOnToolsVersion = 14.3; + DevelopmentTeam = 99SW8E36CT; + ProvisioningStyle = Automatic; + }; DEC2EA8E24B7B63800C1FD34 = { DevelopmentTeam = 4ZR3G6ZK9T; ProvisioningStyle = Automatic; @@ -2105,6 +2577,12 @@ DEF5CCF02539321A0003E9CC = { CreatedOnToolsVersion = 12.0.1; DevelopmentTeam = 99SW8E36CT; + LastSwiftMigration = 1320; + ProvisioningStyle = Automatic; + }; + DEF784282912DEB600A1F3A5 = { + CreatedOnToolsVersion = 14.1; + DevelopmentTeam = 99SW8E36CT; ProvisioningStyle = Automatic; }; }; @@ -2132,12 +2610,24 @@ DEF5CCF02539321A0003E9CC /* UnitTestApp */, DE7D17E527026B95002D3A5D /* OneSignalCore */, DE7D17F827026BA3002D3A5D /* OneSignalExtension */, + DE69E19A282ED8060090BB3D /* OneSignalUser */, + 3C115160289A259500565C41 /* OneSignalOSCore */, DE7D187F27037F43002D3A5D /* OneSignalOutcomes */, + DEF784282912DEB600A1F3A5 /* OneSignalNotifications */, + DEBAADF82A420A3700BF2C1C /* OneSignalLocation */, + DEBAAE272A4211D900BF2C1C /* OneSignalInAppMessages */, ); }; /* End PBXProject section */ /* Begin PBXResourcesBuildPhase section */ + 3C11515F289A259500565C41 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; 3E2400361D4FFC31008BDE70 /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; @@ -2152,6 +2642,13 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + DE69E199282ED8060090BB3D /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; DE7D17E427026B95002D3A5D /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; @@ -2173,6 +2670,20 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + DEBAADF72A420A3700BF2C1C /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + DEBAAE262A4211D900BF2C1C /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; DEF5CCEF2539321A0003E9CC /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; @@ -2183,6 +2694,13 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + DEF784272912DEB600A1F3A5 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; /* End PBXResourcesBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */ @@ -2232,157 +2750,75 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - DE98772B2591656200DE07D5 /* NSDateFormatter+OneSignal.m in Sources */, - 7AD172382416D53B00A78B19 /* OSInAppMessageLocationPrompt.m in Sources */, 9124120E1E73342200E41FD7 /* OneSignal.m in Sources */, - DE9A5DB325D1FD8000FCEC21 /* OSPlayerTags.m in Sources */, - CACBAA97218A6243000ACAA5 /* OSMessagingController.m in Sources */, - CA36F35921C33A2500300C77 /* OSInAppMessageController.m in Sources */, - 91F58D831E7C80DA0017D24D /* OneSignalNotificationSettingsIOS9.m in Sources */, - 7A42748925D18F4400EE75FC /* OneSignalSetSMSParameters.m in Sources */, - DE7D18E52703B510002D3A5D /* OSLocationRequests.m in Sources */, - 7A1F2D8F2406EFC5007799A9 /* OSInAppMessageTag.m in Sources */, - 7AF5174724FDC2C500B076BC /* OSRemoteParamController.m in Sources */, - 7A600B442453790700514A53 /* OSFocusInfluenceParam.m in Sources */, - 7A72EB0E23E252C200B4D50F /* OSInAppMessageDisplayStats.m in Sources */, 9124121E1E73342200E41FD7 /* OneSignalJailbreakDetection.m in Sources */, - A6B519A62669614A00AED40E /* LanguageContext.m in Sources */, 912412471E73369600E41FD7 /* OneSignalHelper.m in Sources */, - 7A93267325AC986400BBEC27 /* OSLocationState.m in Sources */, - 7A5E722425A66E3300CB5605 /* OSUserStateEmailSynchronizer.m in Sources */, - 7A880F312404AE7B0081F5E8 /* OSInAppMessagePushPrompt.m in Sources */, - 9124122E1E73342200E41FD7 /* OneSignalSelectorHelpers.m in Sources */, - 9124122A1E73342200E41FD7 /* OneSignalReachability.m in Sources */, - 7A5E71FC25A66DEC00CB5605 /* OSUserStateSynchronizer.m in Sources */, - 91F58D7D1E7C7F330017D24D /* OneSignalNotificationSettingsIOS10.m in Sources */, - 9129C6B81E89E59B009CB6A0 /* OSPermission.m in Sources */, CA8E19062193C76D009DA223 /* OSInAppMessagingHelpers.m in Sources */, 7AAA60682485D0420004FADE /* OSMigrationController.m in Sources */, DE7D18DF2703B49B002D3A5D /* OSFocusRequests.m in Sources */, - 9D1BD96D237B57CA00A064F7 /* OneSignalCacheCleaner.m in Sources */, 7A674F1B2360D82E001F9ACD /* OSBaseFocusTimeProcessor.m in Sources */, - 7A5E721025A66E1600CB5605 /* OSUserStatePushSynchronizer.m in Sources */, - 912412421E73342200E41FD7 /* UNUserNotificationCenter+OneSignal.m in Sources */, DE16C14424D3724700670EFA /* OneSignalLifecycleObserver.m in Sources */, - 9124123A1E73342200E41FD7 /* OneSignalWebView.m in Sources */, - A6B519AA2669747B00AED40E /* LanguageProviderAppDefined.m in Sources */, - 9D3300F523145AF3000F0A83 /* OneSignalViewHelper.m in Sources */, - 7A42746425CDF06800EE75FC /* OSUserStateSMSSynchronizer.m in Sources */, 9124123E1E73342200E41FD7 /* UIApplicationDelegate+OneSignal.m in Sources */, - CA47439E2190FEA80020DC8C /* OSTrigger.m in Sources */, - 912412261E73342200E41FD7 /* OneSignalMobileProvision.m in Sources */, CAB4112920852E48005A70D1 /* DelayedConsentInitializationParameters.m in Sources */, CA1A6E7020DC2E73001C41B9 /* OneSignalDialogRequest.m in Sources */, 912412321E73342200E41FD7 /* OneSignalTracker.m in Sources */, - CA4742E5218B8FF30020DC8C /* OSTriggerController.m in Sources */, - CA70E3352023D51000019273 /* OneSignalSetEmailParameters.m in Sources */, - A6B519AD2669749100AED40E /* LanguageProviderDevice.m in Sources */, - CAB269E021B2038B00F8A43C /* OSInAppMessageBridgeEvent.m in Sources */, - 7A42744225CDE98E00EE75FC /* OSSMSSubscription.m in Sources */, - 7A5E726225A66EA400CB5605 /* OSStateSynchronizer.m in Sources */, - 91B6EA411E85D38F00B5CF01 /* OSObservable.m in Sources */, - DE3CD2F9270F9A6D00A5BECD /* OSNotification+OneSignal.m in Sources */, - DE7D18EE2703B5B9002D3A5D /* OSInAppMessagingRequests.m in Sources */, - DE367CC724EEF2BE00165207 /* OSInAppMessagePage.m in Sources */, - 7A676BE524981CEC003957CC /* OSDeviceState.m in Sources */, 7AFE856B2368DDB80091D6A5 /* OSFocusCallParams.m in Sources */, - CA810FD1202BA97300A60FED /* OSEmailSubscription.m in Sources */, - A6D7093D26962C95007B3347 /* OneSignalSetLanguageParameters.m in Sources */, 7AECE59E23675F6300537907 /* OSFocusTimeProcessorFactory.m in Sources */, - CACBAAA1218A6243000ACAA5 /* OSInAppMessageInternal.m in Sources */, - 912412221E73342200E41FD7 /* OneSignalLocation.m in Sources */, - CACBAAA4218A6243000ACAA5 /* OSInAppMessageViewController.m in Sources */, + DEC08B002947D4E900C81DA3 /* OneSignalSwiftInterface.swift in Sources */, 7A93269C25AF4F0200BBEC27 /* OSPendingCallbacks.m in Sources */, DE20425E24E21C2C00350E4F /* UIApplication+OneSignal.m in Sources */, - CA7FC8A021927229002C4FD9 /* OSDynamicTriggerController.m in Sources */, 7AECE59623674AB700537907 /* OSUnattributedFocusTimeProcessor.m in Sources */, - 7A93265125A8DD4300BBEC27 /* OSUserState.m in Sources */, - 9129C6BE1E89E7AB009CB6A0 /* OSSubscription.m in Sources */, + 3C448B9E2936ADFD002F96BC /* OSBackgroundTaskHandlerImpl.m in Sources */, 7AECE59023674A9700537907 /* OSAttributedFocusTimeProcessor.m in Sources */, 912412361E73342200E41FD7 /* OneSignalTrackIAP.m in Sources */, - CACBAA9D218A6243000ACAA5 /* OSInAppMessageView.m in Sources */, - CAB269DA21B0B6F000F8A43C /* OSInAppMessageAction.m in Sources */, - 7AC0D2182576944F00E29448 /* OneSignalSetExternalIdParameters.m in Sources */, CA1A6E6A20DC2E31001C41B9 /* OneSignalDialogController.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; + 3C11515D289A259500565C41 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 3C4F9E4428A4466C009F453A /* OSOperationRepo.swift in Sources */, + 3C11518B289ADEEB00565C41 /* OSEventProducer.swift in Sources */, + 3C115165289A259500565C41 /* OneSignalOSCore.docc in Sources */, + 3C115189289ADEA300565C41 /* OSModelStore.swift in Sources */, + 3C115185289ADE4F00565C41 /* OSModel.swift in Sources */, + 3C448BA22936B474002F96BC /* OSBackgroundTaskManager.swift in Sources */, + 3C115187289ADE7700565C41 /* OSModelStoreListener.swift in Sources */, + 3CE5F9E3289D88DC004A156E /* OSModelStoreChangedHandler.swift in Sources */, + 3C2D8A5928B4C4E300BE41F6 /* OSDelta.swift in Sources */, + 3C11518D289AF5E800565C41 /* OSModelChangedHandler.swift in Sources */, + 3C8E6DF928A6D89E0031E48A /* OSOperationExecutor.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; 3E2400331D4FFC31008BDE70 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( 9124120F1E73342200E41FD7 /* OneSignal.m in Sources */, - DE9877332591656200DE07D5 /* NSDateFormatter+OneSignal.m in Sources */, - 7AD172392416D53B00A78B19 /* OSInAppMessageLocationPrompt.m in Sources */, - CACBAA98218A6243000ACAA5 /* OSMessagingController.m in Sources */, - DE9A5DB425D1FD8000FCEC21 /* OSPlayerTags.m in Sources */, - CA36F35A21C33A2500300C77 /* OSInAppMessageController.m in Sources */, - 91F58D861E7C88250017D24D /* OneSignalNotificationSettingsIOS9.m in Sources */, - 7A42748A25D18F4400EE75FC /* OneSignalSetSMSParameters.m in Sources */, - DE7D18E62703B510002D3A5D /* OSLocationRequests.m in Sources */, 9124121F1E73342200E41FD7 /* OneSignalJailbreakDetection.m in Sources */, - 7AA2848A2406FC6400C25D76 /* OSInAppMessageTag.m in Sources */, - 7AF5174824FDC2C500B076BC /* OSRemoteParamController.m in Sources */, - 7A600B452453790700514A53 /* OSFocusInfluenceParam.m in Sources */, - 7A72EB0F23E252C700B4D50F /* OSInAppMessageDisplayStats.m in Sources */, 912412481E73369700E41FD7 /* OneSignalHelper.m in Sources */, - 9124122F1E73342200E41FD7 /* OneSignalSelectorHelpers.m in Sources */, - 9124122B1E73342200E41FD7 /* OneSignalReachability.m in Sources */, - 7A880F322404AE7B0081F5E8 /* OSInAppMessagePushPrompt.m in Sources */, - 7A93267425AC986400BBEC27 /* OSLocationState.m in Sources */, - 7A5E722525A66E3300CB5605 /* OSUserStateEmailSynchronizer.m in Sources */, 7AECE59723674AB700537907 /* OSUnattributedFocusTimeProcessor.m in Sources */, - 91F58D841E7C88220017D24D /* OneSignalNotificationSettingsIOS10.m in Sources */, - 7A5E71FD25A66DEC00CB5605 /* OSUserStateSynchronizer.m in Sources */, - CA8E19072193C76D009DA223 /* OSInAppMessagingHelpers.m in Sources */, - 9129C6B91E89E59B009CB6A0 /* OSPermission.m in Sources */, - 9D1BD96E237B57CA00A064F7 /* OneSignalCacheCleaner.m in Sources */, + 944F7ED2296F9F1200AEBA54 /* OneSignalLiveActivityController.m in Sources */, DE7D18E02703B49B002D3A5D /* OSFocusRequests.m in Sources */, 7AAA60692485D0420004FADE /* OSMigrationController.m in Sources */, - 7A5E721125A66E1600CB5605 /* OSUserStatePushSynchronizer.m in Sources */, - 9DDFEEF323189C0E00EAE0BB /* OneSignalViewHelper.m in Sources */, DE16C14524D3724700670EFA /* OneSignalLifecycleObserver.m in Sources */, - 912412431E73342200E41FD7 /* UNUserNotificationCenter+OneSignal.m in Sources */, - CA47439F2190FEA80020DC8C /* OSTrigger.m in Sources */, - 9124123B1E73342200E41FD7 /* OneSignalWebView.m in Sources */, - 7A42746525CDF06800EE75FC /* OSUserStateSMSSynchronizer.m in Sources */, - A63E9E3826742B4100EA273E /* LanguageProviderAppDefined.m in Sources */, CAB4112A20852E4C005A70D1 /* DelayedConsentInitializationParameters.m in Sources */, 9124123F1E73342200E41FD7 /* UIApplicationDelegate+OneSignal.m in Sources */, 7AECE59F23675F6300537907 /* OSFocusTimeProcessorFactory.m in Sources */, - A63E9E3A26742B4600EA273E /* LanguageProviderDevice.m in Sources */, + DEC08B012947D4E900C81DA3 /* OneSignalSwiftInterface.swift in Sources */, CA1A6E7120DC2E73001C41B9 /* OneSignalDialogRequest.m in Sources */, - CA4742E6218B8FF30020DC8C /* OSTriggerController.m in Sources */, - CA70E3362023D51300019273 /* OneSignalSetEmailParameters.m in Sources */, - CAB269E121B2038B00F8A43C /* OSInAppMessageBridgeEvent.m in Sources */, - 7A42744325CDE98E00EE75FC /* OSSMSSubscription.m in Sources */, - 7A5E726325A66EA400CB5605 /* OSStateSynchronizer.m in Sources */, - 912412271E73342200E41FD7 /* OneSignalMobileProvision.m in Sources */, 912412331E73342200E41FD7 /* OneSignalTracker.m in Sources */, - DE367CC824EEF2BE00165207 /* OSInAppMessagePage.m in Sources */, - DE3CD2FA270F9A6D00A5BECD /* OSNotification+OneSignal.m in Sources */, - DE7D18EF2703B5B9002D3A5D /* OSInAppMessagingRequests.m in Sources */, - 91B6EA421E85D38F00B5CF01 /* OSObservable.m in Sources */, - A63E9E3C26742B5F00EA273E /* LanguageContext.m in Sources */, - 7AC8D3A924993A0F0023EDE8 /* OSDeviceState.m in Sources */, - CA810FD2202BA97600A60FED /* OSEmailSubscription.m in Sources */, - CACBAAA2218A6243000ACAA5 /* OSInAppMessageInternal.m in Sources */, 7A674F1C2360D82E001F9ACD /* OSBaseFocusTimeProcessor.m in Sources */, 7AFE856C2368DDB80091D6A5 /* OSFocusCallParams.m in Sources */, - A6D7093C2694D200007B3347 /* OneSignalSetLanguageParameters.m in Sources */, - CACBAAA5218A6243000ACAA5 /* OSInAppMessageViewController.m in Sources */, - CA7FC8A121927229002C4FD9 /* OSDynamicTriggerController.m in Sources */, - 912412231E73342200E41FD7 /* OneSignalLocation.m in Sources */, 7A93269D25AF4F0200BBEC27 /* OSPendingCallbacks.m in Sources */, DE20425F24E21C2C00350E4F /* UIApplication+OneSignal.m in Sources */, - 9129C6BF1E89E7AB009CB6A0 /* OSSubscription.m in Sources */, + 3C448B9F2936ADFD002F96BC /* OSBackgroundTaskHandlerImpl.m in Sources */, 912412371E73342200E41FD7 /* OneSignalTrackIAP.m in Sources */, - 7A93265225A8DD4300BBEC27 /* OSUserState.m in Sources */, 7AECE59123674A9700537907 /* OSAttributedFocusTimeProcessor.m in Sources */, - CACBAA9E218A6243000ACAA5 /* OSInAppMessageView.m in Sources */, - CAB269DB21B0B6F000F8A43C /* OSInAppMessageAction.m in Sources */, CA1A6E6B20DC2E31001C41B9 /* OneSignalDialogController.m in Sources */, - 7AC0D2192576944F00E29448 /* OneSignalSetExternalIdParameters.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -2390,172 +2826,102 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - DE971755274C4B0C00FC409E /* OSPrivacyConsentController.m in Sources */, - DE7D186F2703751B002D3A5D /* OSRequests.m in Sources */, 7A94D8E1249ABF0000E90B40 /* OSUniqueOutcomeNotification.m in Sources */, - 7AF8FDBD2332A5C200A19245 /* OSIndirectInfluence.m in Sources */, - 7AF8FDBB2332A58900A19245 /* OSSessionManager.m in Sources */, - 9D1BD9622379F41B00A064F7 /* OSOutcomeEvent.m in Sources */, 7ABAF9E324606E940074DFA0 /* OutcomeV2Tests.m in Sources */, - DE7D18E72703B510002D3A5D /* OSLocationRequests.m in Sources */, - 9D1BD96F237B57CA00A064F7 /* OneSignalCacheCleaner.m in Sources */, - 7ADE37AD22F2554400263048 /* OneSignalOutcomeEventsController.m in Sources */, - CACBAA99218A6243000ACAA5 /* OSMessagingController.m in Sources */, 91F60F7D1E80E4E400706E60 /* UncaughtExceptionHandler.m in Sources */, - CA4743A02190FEA80020DC8C /* OSTrigger.m in Sources */, 912412201E73342200E41FD7 /* OneSignalJailbreakDetection.m in Sources */, 03E56DD328405F4A006AA1DA /* OneSignalAppDelegateOverrider.m in Sources */, - 7AF9863D2444C43900C36EAE /* OSInAppMessageTracker.m in Sources */, - DE9877342591656300DE07D5 /* NSDateFormatter+OneSignal.m in Sources */, - DEAD6F98270B829700DE7C67 /* OneSignalLog.m in Sources */, + 3C2C7DC4288E007E0020F9AE /* UserModelSwiftTests.swift in Sources */, 7ABAF9D82457DD620074DFA0 /* SessionManagerTests.m in Sources */, CA85C15320604AEA003AB529 /* RequestTests.m in Sources */, 9D34853A233D2E3600EB81C9 /* OneSignalLocationOverrider.m in Sources */, 912412381E73342200E41FD7 /* OneSignalTrackIAP.m in Sources */, - 7AF98672244975ED00C36EAE /* OSOutcomeEventParams.m in Sources */, - 7AF9864B2444C65300C36EAE /* OSTrackerFactory.m in Sources */, - 7AC0D21A2576944F00E29448 /* OneSignalSetExternalIdParameters.m in Sources */, - 7A42746625CDF06800EE75FC /* OSUserStateSMSSynchronizer.m in Sources */, - A63E9E3D26742B6000EA273E /* LanguageContext.m in Sources */, 7ABAF9D22457C3650074DFA0 /* CommonAsserts.m in Sources */, 03217239238278EB004F0E85 /* DelayedSelectors.m in Sources */, CA63AF8720211FF800E340FB /* UnitTestCommonMethods.m in Sources */, 03CCCC7E2835D8CC004BF794 /* OneSignalUNUserNotificationCenterSwizzlingTest.m in Sources */, - DEAD6F9E270B83A300DE7C67 /* OneSignalExtension.m in Sources */, - DE7D1863270374EE002D3A5D /* OneSignalClient.m in Sources */, - DEAD6FA4270B83B300DE7C67 /* OneSignalExtensionRequests.m in Sources */, - CA70E3372023D51300019273 /* OneSignalSetEmailParameters.m in Sources */, 7A5A8185248990CD002E07C8 /* OSIndirectNotification.m in Sources */, 4529DEED1FA83C5D00CEAB1D /* OneSignalHelperOverrider.m in Sources */, - DE7D186A270374EE002D3A5D /* OneSignalRequest.m in Sources */, - 7AF98666244975AD00C36EAE /* OSOutcomeSourceBody.m in Sources */, CA1A6E6C20DC2E31001C41B9 /* OneSignalDialogController.m in Sources */, - 7AF98688244A32EF00C36EAE /* OSOutcomeEventsV2Repository.m in Sources */, 7A65D62A246627AD007FF196 /* OSInAppMessageViewOverrider.m in Sources */, - 7AF986372444C41A00C36EAE /* OSChannelTracker.m in Sources */, - DEAD6F9D270B82AD00DE7C67 /* NSURL+OneSignal.m in Sources */, - CAB269DC21B0B6F000F8A43C /* OSInAppMessageAction.m in Sources */, - 912412301E73342200E41FD7 /* OneSignalSelectorHelpers.m in Sources */, - 91F58D851E7C88230017D24D /* OneSignalNotificationSettingsIOS10.m in Sources */, - 7A5E722625A66E3300CB5605 /* OSUserStateEmailSynchronizer.m in Sources */, DE16C17024D3989A00670EFA /* OneSignalLifecycleObserver.m in Sources */, CAAE0DFD2195216900A57402 /* OneSignalOverrider.m in Sources */, - 912412241E73342200E41FD7 /* OneSignalLocation.m in Sources */, CA8E190B2194FE0B009DA223 /* OSMessagingControllerOverrider.m in Sources */, - DEAD6FA1270B83AD00DE7C67 /* OneSignalNotificationCategoryController.m in Sources */, + 3C448BA02936ADFD002F96BC /* OSBackgroundTaskHandlerImpl.m in Sources */, 7A123295235DFE3B002B6CE3 /* OutcomeTests.m in Sources */, 7A4274A425D1C99600EE75FC /* SMSTests.m in Sources */, - CAB269E221B2038B00F8A43C /* OSInAppMessageBridgeEvent.m in Sources */, - 9D1BD96A237A28FC00A064F7 /* OSCachedUniqueOutcome.m in Sources */, CAA4ED0120646762005BD59B /* BadgeTests.m in Sources */, - DE3CD2FB270F9A6D00A5BECD /* OSNotification+OneSignal.m in Sources */, - 7A5E726425A66EA400CB5605 /* OSStateSynchronizer.m in Sources */, - 7AF9866C244975CF00C36EAE /* OSOutcomeSource.m in Sources */, 912412491E73369800E41FD7 /* OneSignalHelper.m in Sources */, - DE7D187927037A26002D3A5D /* OneSignalCoreHelper.m in Sources */, CA1A6E7820DC2F04001C41B9 /* OneSignalDialogControllerOverrider.m in Sources */, 4529DEE41FA82C6200CEAB1D /* NSURLSessionOverrider.m in Sources */, - DEAD6F99270B829F00DE7C67 /* OneSignalTrackFirebaseAnalytics.m in Sources */, - 7AF9867C24497A4D00C36EAE /* OSOutcomeEventsRepository.m in Sources */, - DEAD6F9B270B82A300DE7C67 /* OSNotification.m in Sources */, 7A1232A2235E1743002B6CE3 /* OneSignal.m in Sources */, 4529DED21FA81EA800CEAB1D /* NSObjectOverrider.m in Sources */, CA42CAC320D99CB90001F2F2 /* ProvisionalAuthorizationTests.m in Sources */, - 7A5E721225A66E1600CB5605 /* OSUserStatePushSynchronizer.m in Sources */, 5B58E4F8237CE7B4009401E0 /* UIDeviceOverrider.m in Sources */, CA8E19022193C6B0009DA223 /* InAppMessagingIntegrationTests.m in Sources */, - 7AA2848B2406FC6500C25D76 /* OSInAppMessageTag.m in Sources */, CAB4112B20852E4C005A70D1 /* DelayedConsentInitializationParameters.m in Sources */, 7AECE59223674A9700537907 /* OSAttributedFocusTimeProcessor.m in Sources */, 912412341E73342200E41FD7 /* OneSignalTracker.m in Sources */, - DEAD6F9A270B82A100DE7C67 /* OneSignalUserDefaults.m in Sources */, - 7AF98694244A567B00C36EAE /* OSOutcomeEventsCache.m in Sources */, 03866CBD2378A33B0009C1D8 /* OutcomeIntegrationTests.m in Sources */, DE20426024E21C2C00350E4F /* UIApplication+OneSignal.m in Sources */, - CA36F35B21C33A2500300C77 /* OSInAppMessageController.m in Sources */, - 9124122C1E73342200E41FD7 /* OneSignalReachability.m in Sources */, - A63E9E3926742B4200EA273E /* LanguageProviderAppDefined.m in Sources */, 03389F691FB548A0006537F0 /* OneSignalTrackFirebaseAnalyticsOverrider.m in Sources */, - CA810FD3202BA97600A60FED /* OSEmailSubscription.m in Sources */, 7ABAF9D62457D3FF0074DFA0 /* ChannelTrackersTests.m in Sources */, - 7AF9865A24452A9600C36EAE /* OSInfluence.m in Sources */, 4529DED51FA823B900CEAB1D /* TestHelperFunctions.m in Sources */, 911E2CBD1E398AB3003112A4 /* UnitTests.m in Sources */, CA63AF8420211F7400E340FB /* EmailTests.m in Sources */, 7A674F1D2360D82E001F9ACD /* OSBaseFocusTimeProcessor.m in Sources */, - 7A42748B25D18F4400EE75FC /* OneSignalSetSMSParameters.m in Sources */, 7A2E90622460DA1500B3428C /* OutcomeIntegrationV2Tests.m in Sources */, - 91B6EA431E85D38F00B5CF01 /* OSObservable.m in Sources */, 4529DEDE1FA828E500CEAB1D /* NSDateOverrider.m in Sources */, CA08FC871FE99BB4004C445F /* OneSignalClientOverrider.m in Sources */, - CACBAAA3218A6243000ACAA5 /* OSInAppMessageInternal.m in Sources */, 7AF5174C24FE980400B076BC /* RemoteParamsTests.m in Sources */, - CACBAAA6218A6243000ACAA5 /* OSInAppMessageViewController.m in Sources */, 912412401E73342200E41FD7 /* UIApplicationDelegate+OneSignal.m in Sources */, CACBAAAA218A65AE000ACAA5 /* InAppMessagingTests.m in Sources */, - 7AF5174924FDC2C500B076BC /* OSRemoteParamController.m in Sources */, 4529DEE71FA82CDC00CEAB1D /* UNUserNotificationCenterOverrider.m in Sources */, + 3C2C7DC6288E00AA0020F9AE /* UserModelObjcTests.m in Sources */, 4529DEDB1FA8284E00CEAB1D /* NSDataOverrider.m in Sources */, - 7AD1723A2416D53B00A78B19 /* OSInAppMessageLocationPrompt.m in Sources */, - CA7FC8A221927229002C4FD9 /* OSDynamicTriggerController.m in Sources */, - DEAD6F9F270B83A700DE7C67 /* OneSignalNotificationServiceExtensionHandler.m in Sources */, - 7A5E71FE25A66DEC00CB5605 /* OSUserStateSynchronizer.m in Sources */, - 9D3300F623145AF3000F0A83 /* OneSignalViewHelper.m in Sources */, - 7AF9868224497BE100C36EAE /* OSOutcomeEventsV1Repository.m in Sources */, A662399326850DDE00D52FD8 /* LanguageTest.m in Sources */, - 7A600B462453790700514A53 /* OSFocusInfluenceParam.m in Sources */, + DEA4B44E2888AF8900E9FE12 /* OneSignalUNUserNotificationCenterOverrider.m in Sources */, 16664C4C25DDB195003B8A14 /* NSTimeZoneOverrider.m in Sources */, - DEAD6FA2270B83AF00DE7C67 /* OneSignalAttachmentHandler.m in Sources */, 4529DEF31FA8440A00CEAB1D /* UIAlertViewOverrider.m in Sources */, - 7A93265325A8DD4300BBEC27 /* OSUserState.m in Sources */, CA8E18FF2193A1A5009DA223 /* NSTimerOverrider.m in Sources */, - 7AF9868E244A556F00C36EAE /* OSOutcomeEventsFactory.m in Sources */, - 7AF986452444C47400C36EAE /* OSNotificationTracker.m in Sources */, - 7A72EB1023E252C700B4D50F /* OSInAppMessageDisplayStats.m in Sources */, 7AAA606A2485D0420004FADE /* OSMigrationController.m in Sources */, - CACBAA9F218A6243000ACAA5 /* OSInAppMessageView.m in Sources */, - CA4742E7218B8FF30020DC8C /* OSTriggerController.m in Sources */, 03CCCC852835F291004BF794 /* UIApplicationDelegateSwizzlingTests.m in Sources */, - DE9A5DB525D1FD8000FCEC21 /* OSPlayerTags.m in Sources */, 4529DEEA1FA8360C00CEAB1D /* UIApplicationOverrider.m in Sources */, - 03CCCC8E283624F3004BF794 /* SwizzlingForwarder.m in Sources */, - 7A42744425CDE98E00EE75FC /* OSSMSSubscription.m in Sources */, - 912412281E73342200E41FD7 /* OneSignalMobileProvision.m in Sources */, + DEC08B022947D4E900C81DA3 /* OneSignalSwiftInterface.swift in Sources */, 7A93269E25AF4F0300BBEC27 /* OSPendingCallbacks.m in Sources */, 7AECE59823674AB700537907 /* OSUnattributedFocusTimeProcessor.m in Sources */, - DEAD6FA0270B83AA00DE7C67 /* OneSignalExtensionBadgeHandler.m in Sources */, 7A5A818224897693002E07C8 /* MigrationTests.m in Sources */, 7AECE5A023675F6300537907 /* OSFocusTimeProcessorFactory.m in Sources */, - DEAD6FA3270B83B100DE7C67 /* OneSignalReceiveReceiptsController.m in Sources */, - 7A93267525AC986400BBEC27 /* OSLocationState.m in Sources */, - DEAD6F9C270B82AA00DE7C67 /* NSString+OneSignal.m in Sources */, - DE7D18F02703B5B9002D3A5D /* OSInAppMessagingRequests.m in Sources */, - DE367CC924EEF2BE00165207 /* OSInAppMessagePage.m in Sources */, - DE7D1873270375FF002D3A5D /* OSReattemptRequest.m in Sources */, - 9129C6C01E89E7AB009CB6A0 /* OSSubscription.m in Sources */, - 7AC8D3A824993A0E0023EDE8 /* OSDeviceState.m in Sources */, - A6D7093E26962C96007B3347 /* OneSignalSetLanguageParameters.m in Sources */, - DE75B3E028BD432800162A95 /* OneSignalUNUserNotificationCenterOverrider.m in Sources */, 7AFE856D2368DDB80091D6A5 /* OSFocusCallParams.m in Sources */, CA8E19082193C76D009DA223 /* OSInAppMessagingHelpers.m in Sources */, 4529DEE11FA82AB300CEAB1D /* NSBundleOverrider.m in Sources */, DE5EFECA24D8DBF70032632D /* OSInAppMessageViewControllerOverrider.m in Sources */, - 7AF986602447C13C00C36EAE /* OSInfluenceDataRepository.m in Sources */, - 912412441E73342200E41FD7 /* UNUserNotificationCenter+OneSignal.m in Sources */, DE7D18E12703B49B002D3A5D /* OSFocusRequests.m in Sources */, 03CCCC832835D90F004BF794 /* OneSignalUNUserNotificationCenterHelper.m in Sources */, 03866CC12378A67B0009C1D8 /* RestClientAsserts.m in Sources */, - DE7D18CC270385D0002D3A5D /* OSOutcomesRequests.m in Sources */, 7ADF891C230DB5BD0054E0D6 /* UnitTestAppDelegate.m in Sources */, - DE7D18D82703B11B002D3A5D /* OSInAppMessageOutcome.m in Sources */, - 9124123C1E73342200E41FD7 /* OneSignalWebView.m in Sources */, 4529DEF01FA8433500CEAB1D /* NSLocaleOverrider.m in Sources */, - A63E9E3B26742B4700EA273E /* LanguageProviderDevice.m in Sources */, - 9129C6BA1E89E59B009CB6A0 /* OSPermission.m in Sources */, - 91F58D871E7C88250017D24D /* OneSignalNotificationSettingsIOS9.m in Sources */, - DE3CD2FF270FA9F200A5BECD /* OneSignalOutcomes.m in Sources */, CA1A6E7220DC2E73001C41B9 /* OneSignalDialogRequest.m in Sources */, - 7A880F332404AE7B0081F5E8 /* OSInAppMessagePushPrompt.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + DE69E197282ED8060090BB3D /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 3CE795F928DB99B500736BD4 /* OSSubscriptionModelStoreListener.swift in Sources */, + DE69E1AC282ED87A0090BB3D /* OneSignalUserManagerImpl.swift in Sources */, + 3CF862A028A1964F00776CA4 /* OSPropertiesModel.swift in Sources */, + 3C8E6E0128AC0BA10031E48A /* OSIdentityOperationExecutor.swift in Sources */, + 3CF862A228A197D200776CA4 /* OSPropertiesModelStoreListener.swift in Sources */, + 3C0EF49E28A1DBCB00E5434B /* OSUserInternalImpl.swift in Sources */, + 3C8E6DFF28AB09AE0031E48A /* OSPropertyOperationExecutor.swift in Sources */, + 3C2C7DC8288F3C020020F9AE /* OSSubscriptionModel.swift in Sources */, + 3CF8629E28A183F900776CA4 /* OSIdentityModel.swift in Sources */, + 3CE795FB28DBDCE700736BD4 /* OSSubscriptionOperationExecutor.swift in Sources */, + 3CE9227A289FA88B001B1062 /* OSIdentityModelStoreListener.swift in Sources */, + DE69E19F282ED8060090BB3D /* OneSignalUser.docc in Sources */, + 3CA6CE0A28E4F19B00CA0585 /* OSUserRequests.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -2563,19 +2929,32 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( + DEBAAEB32A436CE800BF2C1C /* OSStubInAppMessages.m in Sources */, + 3C47A975292642B100312125 /* OneSignalConfigManager.m in Sources */, DE7D1874270375FF002D3A5D /* OSReattemptRequest.m in Sources */, DE7D183427027A73002D3A5D /* OneSignalLog.m in Sources */, - 03CCCC8F283624F3004BF794 /* SwizzlingForwarder.m in Sources */, + DEF784642912FA5100A1F3A5 /* OSDialogInstanceManager.m in Sources */, DE7D183B27027EFC002D3A5D /* NSURL+OneSignal.m in Sources */, DE7D186B270374EE002D3A5D /* OneSignalRequest.m in Sources */, + 3C44673E296D099D0039A49E /* OneSignalMobileProvision.m in Sources */, + 3CCF44BF299B17290021964D /* OneSignalWrapper.m in Sources */, + DEF78492291479B200A1F3A5 /* OneSignalSelectorHelpers.m in Sources */, DE7D182B27027376002D3A5D /* OSNotification.m in Sources */, DE7D187A27037A26002D3A5D /* OneSignalCoreHelper.m in Sources */, + 3CE8CC4F2911ADD1000DB0D3 /* OSDeviceUtils.m in Sources */, DE7D1864270374EE002D3A5D /* OneSignalClient.m in Sources */, + 3CE8CC532911AE90000DB0D3 /* OSNetworkingUtils.m in Sources */, DE7D183E27027F60002D3A5D /* NSString+OneSignal.m in Sources */, + 3CE8CC5B29143F4B000DB0D3 /* NSDateFormatter+OneSignal.m in Sources */, + DEBAAEB52A436D5D00BF2C1C /* OSStubLocation.m in Sources */, + DEF78497291479C100A1F3A5 /* SwizzlingForwarder.m in Sources */, + 3CE8CC542911B037000DB0D3 /* OneSignalReachability.m in Sources */, DE7D17EA27026B95002D3A5D /* OneSignalCore.docc in Sources */, DE7D18702703751B002D3A5D /* OSRequests.m in Sources */, + DEF7845D2912E89200A1F3A5 /* OSObservable.m in Sources */, DE971752274C48B700FC409E /* OSPrivacyConsentController.m in Sources */, DE7D182E270275FA002D3A5D /* OneSignalTrackFirebaseAnalytics.m in Sources */, + DE51DDE5294262AB0073D5C4 /* OSRemoteParamController.m in Sources */, DE7D182827026F86002D3A5D /* OneSignalUserDefaults.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; @@ -2618,13 +2997,50 @@ DE7D18A027038125002D3A5D /* OSInAppMessageTracker.m in Sources */, DE7D18BA27038185002D3A5D /* OSOutcomeSourceBody.m in Sources */, DE7D18A22703812D002D3A5D /* OSNotificationTracker.m in Sources */, - DE3CD300270FA9F200A5BECD /* OneSignalOutcomes.m in Sources */, + DE3CD300270FA9F200A5BECD /* OSOutcomes.m in Sources */, DE7D18B82703817D002D3A5D /* OSCachedUniqueOutcome.m in Sources */, DE7D18BE27038194002D3A5D /* OSOutcomeEventParams.m in Sources */, + 3C789DBD293C2206004CF83D /* OSFocusInfluenceParam.m in Sources */, DE7D18C02703819D002D3A5D /* OSOutcomeEventsV1Repository.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; + DEBAADF52A420A3700BF2C1C /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + DEBAAE192A420D6500BF2C1C /* OneSignalLocationManager.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + DEBAAE242A4211D900BF2C1C /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + DEBAAE672A42175A00BF2C1C /* OSTriggerController.m in Sources */, + DEBAAE7F2A42176800BF2C1C /* OSInAppMessageTag.m in Sources */, + DEBAAEB92A4381AE00BF2C1C /* OSInAppMessageMigrationController.m in Sources */, + DEBAAE632A42175A00BF2C1C /* OSInAppMessageController.m in Sources */, + DEBAAE652A42175A00BF2C1C /* OSMessagingController.m in Sources */, + DEBAAE812A42176800BF2C1C /* OSTrigger.m in Sources */, + DEBAAE832A42176800BF2C1C /* OSInAppMessageLocationPrompt.m in Sources */, + DEBAAE952A42177B00BF2C1C /* OSInAppMessagingRequests.m in Sources */, + DE70EB922A5CACF5003166D3 /* OneSignalWebViewManager.m in Sources */, + DEBAAE992A42179A00BF2C1C /* OneSignalInAppMessages.m in Sources */, + DEBAAE602A42175A00BF2C1C /* OSDynamicTriggerController.m in Sources */, + DEBAAE8A2A42176800BF2C1C /* OSInAppMessageInternal.m in Sources */, + DE70EB932A5CACF5003166D3 /* OneSignalWebView.m in Sources */, + DEBAAE872A42176800BF2C1C /* OSInAppMessageBridgeEvent.m in Sources */, + DEBAAE892A42176800BF2C1C /* OSInAppMessageClickEvent.m in Sources */, + DEBAAE842A42176800BF2C1C /* OSInAppMessageDisplayStats.m in Sources */, + DEBAAE902A42176800BF2C1C /* OSInAppMessagePage.m in Sources */, + DEBAAE542A42174A00BF2C1C /* OSInAppMessageViewController.m in Sources */, + DEBAAE8C2A42176800BF2C1C /* OSInAppMessagePushPrompt.m in Sources */, + DEBAAE8E2A42176800BF2C1C /* OSInAppMessageClickResult.m in Sources */, + DEBAAE572A42174A00BF2C1C /* OSInAppMessageView.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; DEF5CCED2539321A0003E9CC /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; @@ -2635,9 +3051,57 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + DEF784252912DEB600A1F3A5 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + DEF784592912E4BA00A1F3A5 /* OSPermission.m in Sources */, + DEF7847329132AA700A1F3A5 /* OSNotification+OneSignal.m in Sources */, + DEF784492912E23A00A1F3A5 /* OSNotificationsManager.m in Sources */, + DEF7848D291471DA00A1F3A5 /* UIApplicationDelegate+OneSignalNotifications.m in Sources */, + DEF784552912E3EB00A1F3A5 /* OneSignalNotificationSettings.m in Sources */, + DEF7848A291471DA00A1F3A5 /* UNUserNotificationCenter+OneSignalNotifications.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; /* End PBXSourcesBuildPhase section */ /* Begin PBXTargetDependency section */ + 3C115195289AF85400565C41 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = DE7D17E527026B95002D3A5D /* OneSignalCore */; + targetProxy = 3C115194289AF85400565C41 /* PBXContainerItemProxy */; + }; + 3C11519A289AF86C00565C41 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 3C115160289A259500565C41 /* OneSignalOSCore */; + targetProxy = 3C115199289AF86C00565C41 /* PBXContainerItemProxy */; + }; + DE12F3F5289B28C4002F63AA /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 3C115160289A259500565C41 /* OneSignalOSCore */; + targetProxy = DE12F3F4289B28C4002F63AA /* PBXContainerItemProxy */; + }; + DE2D8F482947D85800844084 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = DE7D17F827026BA3002D3A5D /* OneSignalExtension */; + targetProxy = DE2D8F472947D85800844084 /* PBXContainerItemProxy */; + }; + DE2D8F4D2947D86200844084 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = DE7D187F27037F43002D3A5D /* OneSignalOutcomes */; + targetProxy = DE2D8F4C2947D86200844084 /* PBXContainerItemProxy */; + }; + DE69E1B0282ED8F20090BB3D /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = DE7D17E527026B95002D3A5D /* OneSignalCore */; + targetProxy = DE69E1AF282ED8F20090BB3D /* PBXContainerItemProxy */; + }; + DE69E1B5282ED9430090BB3D /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = DE69E19A282ED8060090BB3D /* OneSignalUser */; + targetProxy = DE69E1B4282ED9430090BB3D /* PBXContainerItemProxy */; + }; DE7D181227026BE2002D3A5D /* PBXTargetDependency */ = { isa = PBXTargetDependency; target = DE7D17E527026B95002D3A5D /* OneSignalCore */; @@ -2668,11 +3132,81 @@ target = DE7D187F27037F43002D3A5D /* OneSignalOutcomes */; targetProxy = DE7D18D42703ADE0002D3A5D /* PBXContainerItemProxy */; }; + DEBAAE072A420C9800BF2C1C /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = DE7D17E527026B95002D3A5D /* OneSignalCore */; + targetProxy = DEBAAE062A420C9800BF2C1C /* PBXContainerItemProxy */; + }; + DEBAAE0E2A420CC100BF2C1C /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = DE69E19A282ED8060090BB3D /* OneSignalUser */; + targetProxy = DEBAAE0D2A420CC100BF2C1C /* PBXContainerItemProxy */; + }; + DEBAAE132A420CCA00BF2C1C /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = DEF784282912DEB600A1F3A5 /* OneSignalNotifications */; + targetProxy = DEBAAE122A420CCA00BF2C1C /* PBXContainerItemProxy */; + }; + DEBAAE172A420CCF00BF2C1C /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 3C115160289A259500565C41 /* OneSignalOSCore */; + targetProxy = DEBAAE162A420CCF00BF2C1C /* PBXContainerItemProxy */; + }; + DEBAAE2D2A4211DA00BF2C1C /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = DEBAAE272A4211D900BF2C1C /* OneSignalInAppMessages */; + targetProxy = DEBAAE2C2A4211DA00BF2C1C /* PBXContainerItemProxy */; + }; + DEBAAE372A42120E00BF2C1C /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = DE7D17E527026B95002D3A5D /* OneSignalCore */; + targetProxy = DEBAAE362A42120E00BF2C1C /* PBXContainerItemProxy */; + }; + DEBAAE3C2A42121100BF2C1C /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 3C115160289A259500565C41 /* OneSignalOSCore */; + targetProxy = DEBAAE3B2A42121100BF2C1C /* PBXContainerItemProxy */; + }; + DEBAAE402A42121400BF2C1C /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = DEF784282912DEB600A1F3A5 /* OneSignalNotifications */; + targetProxy = DEBAAE3F2A42121400BF2C1C /* PBXContainerItemProxy */; + }; + DEBAAE442A42121800BF2C1C /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = DE69E19A282ED8060090BB3D /* OneSignalUser */; + targetProxy = DEBAAE432A42121800BF2C1C /* PBXContainerItemProxy */; + }; + DEBAAE482A42122000BF2C1C /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = DE7D187F27037F43002D3A5D /* OneSignalOutcomes */; + targetProxy = DEBAAE472A42122000BF2C1C /* PBXContainerItemProxy */; + }; DEF5CD12253932260003E9CC /* PBXTargetDependency */ = { isa = PBXTargetDependency; target = DEF5CCF02539321A0003E9CC /* UnitTestApp */; targetProxy = DEF5CD11253932260003E9CC /* PBXContainerItemProxy */; }; + DEF7842E2912DEBA00A1F3A5 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = DEF784282912DEB600A1F3A5 /* OneSignalNotifications */; + targetProxy = DEF7842D2912DEBA00A1F3A5 /* PBXContainerItemProxy */; + }; + DEF7843B2912E15000A1F3A5 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = DEF784282912DEB600A1F3A5 /* OneSignalNotifications */; + targetProxy = DEF7843A2912E15000A1F3A5 /* PBXContainerItemProxy */; + }; + DEF784452912E16F00A1F3A5 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = DE7D17E527026B95002D3A5D /* OneSignalCore */; + targetProxy = DEF784442912E16F00A1F3A5 /* PBXContainerItemProxy */; + }; + DEF7846E2913176800A1F3A5 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = DEF784282912DEB600A1F3A5 /* OneSignalNotifications */; + targetProxy = DEF7846D2913176800A1F3A5 /* PBXContainerItemProxy */; + }; /* End PBXTargetDependency section */ /* Begin PBXVariantGroup section */ @@ -2695,28 +3229,145 @@ /* End PBXVariantGroup section */ /* Begin XCBuildConfiguration section */ - CA2951B62167F4120064227A /* Release */ = { + 3C115173289A259500565C41 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - ARCHS = ( - "$(ARCHS_STANDARD)", - armv7s, - x86_64h, - x86_64, - ); - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_MODULES_AUTOLINK = NO; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_UNREACHABLE_CODE = YES; + APPLICATION_EXTENSION_API_ONLY = YES; + BUILD_LIBRARY_FOR_DISTRIBUTION = YES; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++17"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CODE_SIGN_STYLE = Automatic; + COPY_PHASE_STRIP = NO; + CURRENT_PROJECT_VERSION = 1; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + DEFINES_MODULE = YES; + DEVELOPMENT_TEAM = 99SW8E36CT; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + GCC_C_LANGUAGE_STANDARD = gnu11; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = OneSignalOSCoreFramework/Info.plist; + INFOPLIST_KEY_NSHumanReadableCopyright = "Copyright © 2022 Hiptic. All rights reserved."; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MARKETING_VERSION = 1.0; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + OTHER_CFLAGS = ""; + PRODUCT_BUNDLE_IDENTIFIER = com.onesignal.OneSignalOSCore; + PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; + SKIP_INSTALL = YES; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Release; + }; + 3C115174289A259500565C41 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + APPLICATION_EXTENSION_API_ONLY = YES; + BUILD_LIBRARY_FOR_DISTRIBUTION = YES; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++17"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CODE_SIGN_STYLE = Automatic; + COPY_PHASE_STRIP = NO; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DEVELOPMENT_TEAM = 99SW8E36CT; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_DYNAMIC_NO_PIC = NO; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = OneSignalOSCoreFramework/Info.plist; + INFOPLIST_KEY_NSHumanReadableCopyright = "Copyright © 2022 Hiptic. All rights reserved."; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MARKETING_VERSION = 1.0; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + MTL_FAST_MATH = YES; + ONLY_ACTIVE_ARCH = NO; + OTHER_CFLAGS = ""; + PRODUCT_BUNDLE_IDENTIFIER = com.onesignal.OneSignalOSCore; + PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; + SKIP_INSTALL = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Debug; + }; + CA2951B62167F4120064227A /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ARCHS = ( + "$(ARCHS_STANDARD)", + x86_64h, + x86_64, + ); + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_MODULES_AUTOLINK = NO; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; COPY_PHASE_STRIP = YES; DEBUG_INFORMATION_FORMAT = dwarf; @@ -2732,7 +3383,7 @@ GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; GENERATE_MASTER_OBJECT_FILE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; ONLY_ACTIVE_ARCH = NO; OTHER_CFLAGS = ( "-all_load", @@ -2749,27 +3400,26 @@ CLANG_ANALYZER_GCD_PERFORMANCE = YES; CLANG_ANALYZER_SECURITY_FLOATLOOPCOUNTER = YES; CLANG_ENABLE_CODE_COVERAGE = NO; + CLANG_ENABLE_MODULES = YES; DSTROOT = /tmp/OneSignal.dst; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", "$(PROJECT_DIR)", ); IPHONEOS_DEPLOYMENT_TARGET = 9.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; OTHER_CFLAGS = "-fembed-bitcode"; OTHER_LDFLAGS = ""; PRODUCT_NAME = OneSignal; SKIP_INSTALL = YES; + SWIFT_VERSION = 5.0; }; name = Release; }; CA2951B82167F4120064227A /* Release */ = { isa = XCBuildConfiguration; buildSettings = { - ARCHS = ( - "$(ARCHS_STANDARD)", - x86_64h, - x86_64, - ); + BUILD_LIBRARY_FOR_DISTRIBUTION = YES; CLANG_ANALYZER_NONNULL = YES; CLANG_ENABLE_CODE_COVERAGE = NO; CLANG_ENABLE_MODULES = YES; @@ -2792,11 +3442,14 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; MACH_O_TYPE = mh_dylib; MTL_ENABLE_DEBUG_INFO = NO; - OTHER_CFLAGS = "-fembed-bitcode"; + OTHER_CFLAGS = ""; + OTHER_CPLUSPLUSFLAGS = ""; OTHER_LDFLAGS = ""; PRODUCT_BUNDLE_IDENTIFIER = "com.onesignal.OneSignal-Dynamic"; - PRODUCT_NAME = OneSignal; + PRODUCT_MODULE_NAME = OneSignalFramework; + PRODUCT_NAME = OneSignalFramework; SKIP_INSTALL = YES; + SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; @@ -2820,6 +3473,7 @@ ENABLE_TESTABILITY = YES; GCC_OPTIMIZATION_LEVEL = 0; GCC_PREPROCESSOR_DEFINITIONS = OS_TEST; + HEADER_SEARCH_PATHS = $CONFIGURATION_TEMP_DIR/UnitTests.build/DerivedSources; INFOPLIST_FILE = UnitTests/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 10.1; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; @@ -2828,6 +3482,9 @@ OTHER_CFLAGS = "-fembed-bitcode"; PRODUCT_BUNDLE_IDENTIFIER = com.onesignal.UnitTests; PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OBJC_BRIDGING_HEADER = "UnitTests/UnitTests-Bridging-Header.h"; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; TEST_HOST = "$(BUILT_PRODUCTS_DIR)/UnitTestApp.app/UnitTestApp"; }; name = Release; @@ -2864,7 +3521,6 @@ ALWAYS_SEARCH_USER_PATHS = NO; ARCHS = ( "$(ARCHS_STANDARD)", - armv7s, x86_64h, x86_64, ); @@ -2895,7 +3551,7 @@ GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; GENERATE_MASTER_OBJECT_FILE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; ONLY_ACTIVE_ARCH = NO; OTHER_CFLAGS = ( "-all_load", @@ -2912,27 +3568,26 @@ CLANG_ANALYZER_GCD_PERFORMANCE = YES; CLANG_ANALYZER_SECURITY_FLOATLOOPCOUNTER = YES; CLANG_ENABLE_CODE_COVERAGE = NO; + CLANG_ENABLE_MODULES = YES; DSTROOT = /tmp/OneSignal.dst; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", "$(PROJECT_DIR)", ); IPHONEOS_DEPLOYMENT_TARGET = 9.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; OTHER_CFLAGS = "-fembed-bitcode"; OTHER_LDFLAGS = ""; PRODUCT_NAME = OneSignal; SKIP_INSTALL = YES; + SWIFT_VERSION = 5.0; }; name = Debug; }; CA2951C42167FB950064227A /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { - ARCHS = ( - "$(ARCHS_STANDARD)", - x86_64h, - x86_64, - ); + BUILD_LIBRARY_FOR_DISTRIBUTION = YES; CLANG_ANALYZER_NONNULL = YES; CLANG_ENABLE_CODE_COVERAGE = NO; CLANG_ENABLE_MODULES = YES; @@ -2956,11 +3611,14 @@ MACH_O_TYPE = mh_dylib; MTL_ENABLE_DEBUG_INFO = NO; ONLY_ACTIVE_ARCH = NO; - OTHER_CFLAGS = "-fembed-bitcode"; + OTHER_CFLAGS = ""; + OTHER_CPLUSPLUSFLAGS = ""; OTHER_LDFLAGS = ""; PRODUCT_BUNDLE_IDENTIFIER = "com.onesignal.OneSignal-Dynamic"; - PRODUCT_NAME = OneSignal; + PRODUCT_MODULE_NAME = OneSignalFramework; + PRODUCT_NAME = OneSignalFramework; SKIP_INSTALL = YES; + SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; @@ -2984,6 +3642,7 @@ ENABLE_TESTABILITY = YES; GCC_OPTIMIZATION_LEVEL = 0; GCC_PREPROCESSOR_DEFINITIONS = OS_TEST; + HEADER_SEARCH_PATHS = $CONFIGURATION_TEMP_DIR/UnitTests.build/DerivedSources; INFOPLIST_FILE = UnitTests/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 10.1; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; @@ -2992,6 +3651,9 @@ OTHER_CFLAGS = "-fembed-bitcode"; PRODUCT_BUNDLE_IDENTIFIER = com.onesignal.UnitTests; PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OBJC_BRIDGING_HEADER = "UnitTests/UnitTests-Bridging-Header.h"; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; TEST_HOST = "$(BUILT_PRODUCTS_DIR)/UnitTestApp.app/UnitTestApp"; }; name = Debug; @@ -3022,13 +3684,12 @@ }; name = Debug; }; - DE3AA3E72901D2E9009FABA3 /* Debug 64 bit */ = { + DE3D8F3828C15839008C2BBF /* Test */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; ARCHS = ( "$(ARCHS_STANDARD)", - armv7s, x86_64h, x86_64, ); @@ -3059,7 +3720,7 @@ GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; GENERATE_MASTER_OBJECT_FILE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; ONLY_ACTIVE_ARCH = NO; OTHER_CFLAGS = ( "-all_load", @@ -3068,40 +3729,34 @@ SDKROOT = iphoneos; VALIDATE_PRODUCT = YES; }; - name = "Debug 64 bit"; + name = Test; }; - DE3AA3E82901D2E9009FABA3 /* Debug 64 bit */ = { + DE3D8F3928C15839008C2BBF /* Test */ = { isa = XCBuildConfiguration; buildSettings = { - ARCHS = ( - "$(ARCHS_STANDARD)", - x86_64h, - x86_64, - ); CLANG_ANALYZER_GCD_PERFORMANCE = YES; CLANG_ANALYZER_SECURITY_FLOATLOOPCOUNTER = YES; CLANG_ENABLE_CODE_COVERAGE = NO; + CLANG_ENABLE_MODULES = YES; DSTROOT = /tmp/OneSignal.dst; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", "$(PROJECT_DIR)", ); IPHONEOS_DEPLOYMENT_TARGET = 9.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; OTHER_CFLAGS = "-fembed-bitcode"; OTHER_LDFLAGS = ""; PRODUCT_NAME = OneSignal; SKIP_INSTALL = YES; + SWIFT_VERSION = 5.0; }; - name = "Debug 64 bit"; + name = Test; }; - DE3AA3E92901D2E9009FABA3 /* Debug 64 bit */ = { + DE3D8F3A28C15839008C2BBF /* Test */ = { isa = XCBuildConfiguration; buildSettings = { - ARCHS = ( - "$(ARCHS_STANDARD)", - x86_64h, - x86_64, - ); + BUILD_LIBRARY_FOR_DISTRIBUTION = YES; CLANG_ANALYZER_NONNULL = YES; CLANG_ENABLE_CODE_COVERAGE = NO; CLANG_ENABLE_MODULES = YES; @@ -3125,26 +3780,24 @@ MACH_O_TYPE = mh_dylib; MTL_ENABLE_DEBUG_INFO = NO; ONLY_ACTIVE_ARCH = NO; - OTHER_CFLAGS = "-fembed-bitcode"; + OTHER_CFLAGS = ""; + OTHER_CPLUSPLUSFLAGS = ""; OTHER_LDFLAGS = ""; PRODUCT_BUNDLE_IDENTIFIER = "com.onesignal.OneSignal-Dynamic"; - PRODUCT_NAME = OneSignal; + PRODUCT_MODULE_NAME = OneSignalFramework; + PRODUCT_NAME = OneSignalFramework; SKIP_INSTALL = YES; + SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; WARNING_CFLAGS = "-Wno-nullability-completeness"; }; - name = "Debug 64 bit"; + name = Test; }; - DE3AA3EA2901D2E9009FABA3 /* Debug 64 bit */ = { + DE3D8F3B28C15839008C2BBF /* Test */ = { isa = XCBuildConfiguration; buildSettings = { - ARCHS = ( - "$(ARCHS_STANDARD)", - x86_64h, - x86_64, - ); BUNDLE_LOADER = "$(TEST_HOST)"; CLANG_ANALYZER_NONNULL = YES; CLANG_ENABLE_MODULES = YES; @@ -3158,6 +3811,7 @@ ENABLE_TESTABILITY = YES; GCC_OPTIMIZATION_LEVEL = 0; GCC_PREPROCESSOR_DEFINITIONS = OS_TEST; + HEADER_SEARCH_PATHS = $CONFIGURATION_TEMP_DIR/UnitTests.build/DerivedSources; INFOPLIST_FILE = UnitTests/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 10.1; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; @@ -3166,18 +3820,16 @@ OTHER_CFLAGS = "-fembed-bitcode"; PRODUCT_BUNDLE_IDENTIFIER = com.onesignal.UnitTests; PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OBJC_BRIDGING_HEADER = "UnitTests/UnitTests-Bridging-Header.h"; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; TEST_HOST = "$(BUILT_PRODUCTS_DIR)/UnitTestApp.app/UnitTestApp"; }; - name = "Debug 64 bit"; + name = Test; }; - DE3AA3EB2901D2E9009FABA3 /* Debug 64 bit */ = { + DE3D8F3C28C15839008C2BBF /* Test */ = { isa = XCBuildConfiguration; buildSettings = { - ARCHS = ( - "$(ARCHS_STANDARD)", - x86_64h, - x86_64, - ); CODE_SIGN_STYLE = Automatic; DEVELOPMENT_TEAM = 4ZR3G6ZK9T; ONESIGNAL_DESTINATION_PATH = "${SRCROOT}/Framework/Dynamic"; @@ -3186,16 +3838,11 @@ ONESIGNAL_TARGET_NAME = OneSignalFramework; PRODUCT_NAME = "$(TARGET_NAME)"; }; - name = "Debug 64 bit"; + name = Test; }; - DE3AA3EC2901D2E9009FABA3 /* Debug 64 bit */ = { + DE3D8F3D28C15839008C2BBF /* Test */ = { isa = XCBuildConfiguration; buildSettings = { - ARCHS = ( - "$(ARCHS_STANDARD)", - x86_64h, - x86_64, - ); CODE_SIGN_STYLE = Automatic; DEVELOPMENT_TEAM = 4ZR3G6ZK9T; ONESIGNAL_DESTINATION_PATH = "${SRCROOT}/Framework"; @@ -3204,16 +3851,11 @@ ONESIGNAL_TARGET_NAME = OneSignalFramework; PRODUCT_NAME = "$(TARGET_NAME)"; }; - name = "Debug 64 bit"; + name = Test; }; - DE3AA3ED2901D2E9009FABA3 /* Debug 64 bit */ = { + DE3D8F3E28C15839008C2BBF /* Test */ = { isa = XCBuildConfiguration; buildSettings = { - ARCHS = ( - "$(ARCHS_STANDARD)", - x86_64h, - x86_64, - ); CODE_SIGN_STYLE = Automatic; DEVELOPMENT_TEAM = 4ZR3G6ZK9T; ONESIGNAL_DESTINATION_PATH = "${SRCROOT}/Framework"; @@ -3222,9 +3864,9 @@ ONESIGNAL_TARGET_NAME = OneSignalFramework; PRODUCT_NAME = "$(TARGET_NAME)"; }; - name = "Debug 64 bit"; + name = Test; }; - DE3AA3EE2901D2E9009FABA3 /* Debug 64 bit */ = { + DE3D8F3F28C15839008C2BBF /* Test */ = { isa = XCBuildConfiguration; buildSettings = { ARCHS = "$(ARCHS_STANDARD)"; @@ -3256,14 +3898,11 @@ GCC_C_LANGUAGE_STANDARD = gnu11; GCC_DYNAMIC_NO_PIC = NO; GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); + GCC_PREPROCESSOR_DEFINITIONS = OS_TEST; INFOPLIST_FILE = UnitTestApp/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 9.0; "IPHONEOS_DEPLOYMENT_TARGET[sdk=macosx*]" = 13.1; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_FAST_MATH = YES; ONLY_ACTIVE_ARCH = NO; @@ -3271,19 +3910,18 @@ PRODUCT_BUNDLE_IDENTIFIER = com.onesignal.example.UnitTestApp; PRODUCT_NAME = "$(TARGET_NAME)"; SUPPORTS_MACCATALYST = YES; + SWIFT_OBJC_BRIDGING_HEADER = "OneSignalUser/Source/UnitTestApp-Bridging-Header.h"; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; }; - name = "Debug 64 bit"; + name = Test; }; - DE3AA3EF2901D2E9009FABA3 /* Debug 64 bit */ = { + DE3D8F4028C15839008C2BBF /* Test */ = { isa = XCBuildConfiguration; buildSettings = { APPLICATION_EXTENSION_API_ONLY = YES; - ARCHS = ( - "$(ARCHS_STANDARD)", - x86_64h, - x86_64, - ); + BUILD_LIBRARY_FOR_DISTRIBUTION = YES; CLANG_ANALYZER_NONNULL = YES; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; CLANG_CXX_LANGUAGE_STANDARD = "gnu++17"; @@ -3316,10 +3954,7 @@ GCC_C_LANGUAGE_STANDARD = gnu11; GCC_DYNAMIC_NO_PIC = NO; GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); + GCC_PREPROCESSOR_DEFINITIONS = OS_TEST; GENERATE_INFOPLIST_FILE = NO; INFOPLIST_FILE = OneSignalCoreFramework/Info.plist; INFOPLIST_KEY_NSHumanReadableCopyright = "Copyright © 2021 Hiptic. All rights reserved."; @@ -3330,7 +3965,8 @@ MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_FAST_MATH = YES; ONLY_ACTIVE_ARCH = NO; - OTHER_CFLAGS = "-fembed-bitcode"; + OTHER_CFLAGS = ""; + OTHER_CPLUSPLUSFLAGS = ""; PRODUCT_BUNDLE_IDENTIFIER = com.onesignal.OneSignalCore; PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; SKIP_INSTALL = YES; @@ -3340,17 +3976,13 @@ VERSION_INFO_PREFIX = ""; WARNING_CFLAGS = "-Wno-nullability-completeness"; }; - name = "Debug 64 bit"; + name = Test; }; - DE3AA3F02901D2E9009FABA3 /* Debug 64 bit */ = { + DE3D8F4128C15839008C2BBF /* Test */ = { isa = XCBuildConfiguration; buildSettings = { APPLICATION_EXTENSION_API_ONLY = YES; - ARCHS = ( - "$(ARCHS_STANDARD)", - x86_64h, - x86_64, - ); + BUILD_LIBRARY_FOR_DISTRIBUTION = YES; CLANG_ANALYZER_NONNULL = YES; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; CLANG_CXX_LANGUAGE_STANDARD = "gnu++17"; @@ -3381,10 +4013,7 @@ GCC_C_LANGUAGE_STANDARD = gnu11; GCC_DYNAMIC_NO_PIC = NO; GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); + GCC_PREPROCESSOR_DEFINITIONS = OS_TEST; GENERATE_INFOPLIST_FILE = NO; INFOPLIST_FILE = OneSignalExtensionFramework/Info.plist; INFOPLIST_KEY_NSHumanReadableCopyright = "Copyright © 2021 Hiptic. All rights reserved."; @@ -3395,7 +4024,8 @@ MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_FAST_MATH = YES; ONLY_ACTIVE_ARCH = NO; - OTHER_CFLAGS = "-fembed-bitcode"; + OTHER_CFLAGS = ""; + OTHER_CPLUSPLUSFLAGS = ""; PRODUCT_BUNDLE_IDENTIFIER = com.onesignal.OneSignalExtension; PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; SKIP_INSTALL = YES; @@ -3405,17 +4035,13 @@ VERSION_INFO_PREFIX = ""; WARNING_CFLAGS = "-Wno-nullability-completeness"; }; - name = "Debug 64 bit"; + name = Test; }; - DE3AA3F12901D2E9009FABA3 /* Debug 64 bit */ = { + DE3D8F4228C15839008C2BBF /* Test */ = { isa = XCBuildConfiguration; buildSettings = { APPLICATION_EXTENSION_API_ONLY = YES; - ARCHS = ( - "$(ARCHS_STANDARD)", - x86_64h, - x86_64, - ); + BUILD_LIBRARY_FOR_DISTRIBUTION = YES; CLANG_ANALYZER_NONNULL = YES; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; CLANG_CXX_LANGUAGE_STANDARD = "gnu++17"; @@ -3437,6 +4063,7 @@ CODE_SIGN_STYLE = Automatic; COPY_PHASE_STRIP = NO; CURRENT_PROJECT_VERSION = 1; + DEBUG_INFORMATION_FORMAT = dwarf; DEFINES_MODULE = YES; DEVELOPMENT_TEAM = 99SW8E36CT; DYLIB_COMPATIBILITY_VERSION = 1; @@ -3446,10 +4073,7 @@ GCC_C_LANGUAGE_STANDARD = gnu11; GCC_DYNAMIC_NO_PIC = NO; GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); + GCC_PREPROCESSOR_DEFINITIONS = OS_TEST; GENERATE_INFOPLIST_FILE = NO; INFOPLIST_FILE = OneSignalOutcomesFramework/Info.plist; INFOPLIST_KEY_NSHumanReadableCopyright = "Copyright © 2021 Hiptic. All rights reserved."; @@ -3460,7 +4084,7 @@ MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_FAST_MATH = YES; ONLY_ACTIVE_ARCH = NO; - OTHER_CFLAGS = "-fembed-bitcode"; + OTHER_CFLAGS = ""; PRODUCT_BUNDLE_IDENTIFIER = com.onesignal.OneSignalOutcomes; PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; SKIP_INSTALL = YES; @@ -3470,93 +4094,263 @@ VERSION_INFO_PREFIX = ""; WARNING_CFLAGS = "-Wno-nullability-completeness"; }; - name = "Debug 64 bit"; + name = Test; }; - DE7D17F127026B95002D3A5D /* Release */ = { + DE3D8F4328C15839008C2BBF /* Test */ = { isa = XCBuildConfiguration; buildSettings = { - APPLICATION_EXTENSION_API_ONLY = YES; - ARCHS = ( - "$(ARCHS_STANDARD)", - x86_64h, - x86_64, - ); + BUILD_LIBRARY_FOR_DISTRIBUTION = YES; CLANG_ANALYZER_NONNULL = YES; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; CLANG_CXX_LANGUAGE_STANDARD = "gnu++17"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_WEAK = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = NO; CLANG_WARN_COMMA = YES; CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DOCUMENTATION_COMMENTS = NO; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = NO; + CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - "CODE_SIGN_IDENTITY[sdk=macosx*]" = "Apple Development"; CODE_SIGN_STYLE = Automatic; COPY_PHASE_STRIP = NO; CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DEFINES_MODULE = YES; DEVELOPMENT_TEAM = 99SW8E36CT; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; + ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = gnu11; - GENERATE_INFOPLIST_FILE = NO; - INFOPLIST_FILE = OneSignalCoreFramework/Info.plist; - INFOPLIST_KEY_NSHumanReadableCopyright = "Copyright © 2021 Hiptic. All rights reserved."; + GCC_DYNAMIC_NO_PIC = NO; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = OS_TEST; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = OneSignalUserFramework/Info.plist; + INFOPLIST_KEY_NSHumanReadableCopyright = "Copyright © 2022 Hiptic. All rights reserved."; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 11.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; MARKETING_VERSION = 1.0; - MTL_ENABLE_DEBUG_INFO = NO; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_FAST_MATH = YES; ONLY_ACTIVE_ARCH = NO; - OTHER_CFLAGS = "-fembed-bitcode"; - PRODUCT_BUNDLE_IDENTIFIER = com.onesignal.OneSignalCore; + OTHER_CFLAGS = ""; + PRODUCT_BUNDLE_IDENTIFIER = com.onesignal.OneSignalUser; PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; SKIP_INSTALL = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_COMPILATION_MODE = wholemodule; SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; - WARNING_CFLAGS = "-Wno-nullability-completeness"; }; - name = Release; + name = Test; }; - DE7D17F227026B95002D3A5D /* Debug */ = { + DE69E1A5282ED8070090BB3D /* Release */ = { isa = XCBuildConfiguration; buildSettings = { - APPLICATION_EXTENSION_API_ONLY = YES; - ARCHS = ( - "$(ARCHS_STANDARD)", - x86_64h, - x86_64, - ); + BUILD_LIBRARY_FOR_DISTRIBUTION = YES; CLANG_ANALYZER_NONNULL = YES; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; CLANG_CXX_LANGUAGE_STANDARD = "gnu++17"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_WEAK = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = NO; CLANG_WARN_COMMA = YES; CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DOCUMENTATION_COMMENTS = NO; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CODE_SIGN_STYLE = Automatic; + COPY_PHASE_STRIP = NO; + CURRENT_PROJECT_VERSION = 1; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + DEFINES_MODULE = YES; + DEVELOPMENT_TEAM = 99SW8E36CT; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + GCC_C_LANGUAGE_STANDARD = gnu11; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = OneSignalUserFramework/Info.plist; + INFOPLIST_KEY_NSHumanReadableCopyright = "Copyright © 2022 Hiptic. All rights reserved."; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MARKETING_VERSION = 1.0; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + OTHER_CFLAGS = ""; + PRODUCT_BUNDLE_IDENTIFIER = com.onesignal.OneSignalUser; + PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; + SKIP_INSTALL = YES; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Release; + }; + DE69E1A6282ED8070090BB3D /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUILD_LIBRARY_FOR_DISTRIBUTION = YES; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++17"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CODE_SIGN_STYLE = Automatic; + COPY_PHASE_STRIP = NO; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DEVELOPMENT_TEAM = 99SW8E36CT; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_DYNAMIC_NO_PIC = NO; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = OneSignalUserFramework/Info.plist; + INFOPLIST_KEY_NSHumanReadableCopyright = "Copyright © 2022 Hiptic. All rights reserved."; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MARKETING_VERSION = 1.0; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + MTL_FAST_MATH = YES; + ONLY_ACTIVE_ARCH = NO; + OTHER_CFLAGS = ""; + PRODUCT_BUNDLE_IDENTIFIER = com.onesignal.OneSignalUser; + PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; + SKIP_INSTALL = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Debug; + }; + DE7D17F127026B95002D3A5D /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + APPLICATION_EXTENSION_API_ONLY = YES; + BUILD_LIBRARY_FOR_DISTRIBUTION = YES; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++17"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = NO; + CLANG_WARN_COMMA = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DOCUMENTATION_COMMENTS = NO; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = NO; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + "CODE_SIGN_IDENTITY[sdk=macosx*]" = "Apple Development"; + CODE_SIGN_STYLE = Automatic; + COPY_PHASE_STRIP = NO; + CURRENT_PROJECT_VERSION = 1; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + DEFINES_MODULE = YES; + DEVELOPMENT_TEAM = 99SW8E36CT; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + GCC_C_LANGUAGE_STANDARD = gnu11; + GENERATE_INFOPLIST_FILE = NO; + INFOPLIST_FILE = OneSignalCoreFramework/Info.plist; + INFOPLIST_KEY_NSHumanReadableCopyright = "Copyright © 2021 Hiptic. All rights reserved."; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MARKETING_VERSION = 1.0; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + ONLY_ACTIVE_ARCH = NO; + OTHER_CFLAGS = ""; + OTHER_CPLUSPLUSFLAGS = ""; + PRODUCT_BUNDLE_IDENTIFIER = com.onesignal.OneSignalCore; + PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; + SKIP_INSTALL = YES; + SWIFT_EMIT_LOC_STRINGS = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + WARNING_CFLAGS = "-Wno-nullability-completeness"; + }; + name = Release; + }; + DE7D17F227026B95002D3A5D /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + APPLICATION_EXTENSION_API_ONLY = YES; + BUILD_LIBRARY_FOR_DISTRIBUTION = YES; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++17"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = NO; + CLANG_WARN_COMMA = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DOCUMENTATION_COMMENTS = NO; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = NO; CLANG_WARN_SUSPICIOUS_MOVE = YES; @@ -3588,7 +4382,8 @@ MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_FAST_MATH = YES; ONLY_ACTIVE_ARCH = NO; - OTHER_CFLAGS = "-fembed-bitcode"; + OTHER_CFLAGS = ""; + OTHER_CPLUSPLUSFLAGS = ""; PRODUCT_BUNDLE_IDENTIFIER = com.onesignal.OneSignalCore; PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; SKIP_INSTALL = YES; @@ -3604,11 +4399,7 @@ isa = XCBuildConfiguration; buildSettings = { APPLICATION_EXTENSION_API_ONLY = YES; - ARCHS = ( - "$(ARCHS_STANDARD)", - x86_64h, - x86_64, - ); + BUILD_LIBRARY_FOR_DISTRIBUTION = YES; CLANG_ANALYZER_NONNULL = YES; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; CLANG_CXX_LANGUAGE_STANDARD = "gnu++17"; @@ -3647,7 +4438,8 @@ MTL_ENABLE_DEBUG_INFO = NO; MTL_FAST_MATH = YES; ONLY_ACTIVE_ARCH = NO; - OTHER_CFLAGS = "-fembed-bitcode"; + OTHER_CFLAGS = ""; + OTHER_CPLUSPLUSFLAGS = ""; PRODUCT_BUNDLE_IDENTIFIER = com.onesignal.OneSignalExtension; PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; SKIP_INSTALL = YES; @@ -3663,11 +4455,7 @@ isa = XCBuildConfiguration; buildSettings = { APPLICATION_EXTENSION_API_ONLY = YES; - ARCHS = ( - "$(ARCHS_STANDARD)", - x86_64h, - x86_64, - ); + BUILD_LIBRARY_FOR_DISTRIBUTION = YES; CLANG_ANALYZER_NONNULL = YES; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; CLANG_CXX_LANGUAGE_STANDARD = "gnu++17"; @@ -3712,7 +4500,8 @@ MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_FAST_MATH = YES; ONLY_ACTIVE_ARCH = NO; - OTHER_CFLAGS = "-fembed-bitcode"; + OTHER_CFLAGS = ""; + OTHER_CPLUSPLUSFLAGS = ""; PRODUCT_BUNDLE_IDENTIFIER = com.onesignal.OneSignalExtension; PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; SKIP_INSTALL = YES; @@ -3728,11 +4517,7 @@ isa = XCBuildConfiguration; buildSettings = { APPLICATION_EXTENSION_API_ONLY = YES; - ARCHS = ( - "$(ARCHS_STANDARD)", - x86_64h, - x86_64, - ); + BUILD_LIBRARY_FOR_DISTRIBUTION = YES; CLANG_ANALYZER_NONNULL = YES; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; CLANG_CXX_LANGUAGE_STANDARD = "gnu++17"; @@ -3771,7 +4556,7 @@ MTL_ENABLE_DEBUG_INFO = NO; MTL_FAST_MATH = YES; ONLY_ACTIVE_ARCH = NO; - OTHER_CFLAGS = "-fembed-bitcode"; + OTHER_CFLAGS = ""; PRODUCT_BUNDLE_IDENTIFIER = com.onesignal.OneSignalOutcomes; PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; SKIP_INSTALL = YES; @@ -3787,11 +4572,7 @@ isa = XCBuildConfiguration; buildSettings = { APPLICATION_EXTENSION_API_ONLY = YES; - ARCHS = ( - "$(ARCHS_STANDARD)", - x86_64h, - x86_64, - ); + BUILD_LIBRARY_FOR_DISTRIBUTION = YES; CLANG_ANALYZER_NONNULL = YES; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; CLANG_CXX_LANGUAGE_STANDARD = "gnu++17"; @@ -3836,7 +4617,7 @@ MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_FAST_MATH = YES; ONLY_ACTIVE_ARCH = NO; - OTHER_CFLAGS = "-fembed-bitcode"; + OTHER_CFLAGS = ""; PRODUCT_BUNDLE_IDENTIFIER = com.onesignal.OneSignalOutcomes; PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; SKIP_INSTALL = YES; @@ -3848,119 +4629,206 @@ }; name = Debug; }; - DEC2EA9124B7B63800C1FD34 /* Release */ = { + DEBAADFD2A420A3A00BF2C1C /* Release */ = { isa = XCBuildConfiguration; buildSettings = { + BUILD_LIBRARY_FOR_DISTRIBUTION = YES; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; CODE_SIGN_STYLE = Automatic; - DEVELOPMENT_TEAM = 4ZR3G6ZK9T; - ONESIGNAL_DESTINATION_PATH = "${SRCROOT}/Framework"; - ONESIGNAL_MACH_O_TYPE = staticlib; - ONESIGNAL_OUTPUT_NAME = OneSignal; - ONESIGNAL_TARGET_NAME = OneSignalFramework; - PRODUCT_NAME = "$(TARGET_NAME)"; + COPY_PHASE_STRIP = NO; + CURRENT_PROJECT_VERSION = 1; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + DEFINES_MODULE = YES; + DEVELOPMENT_TEAM = 99SW8E36CT; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + ENABLE_MODULE_VERIFIER = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = OneSignalLocationFramework/Info.plist; + INFOPLIST_KEY_NSPrincipalClass = ""; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MARKETING_VERSION = 1.0; + MODULE_VERIFIER_SUPPORTED_LANGUAGES = "objective-c objective-c++"; + MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS = "gnu11 gnu++20"; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + OTHER_CFLAGS = ""; + PRODUCT_BUNDLE_IDENTIFIER = com.onesignal.OneSignalLocation; + PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; + SKIP_INSTALL = YES; + SWIFT_EMIT_LOC_STRINGS = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + WARNING_CFLAGS = "-Wno-nullability-completeness"; }; name = Release; }; - DEC2EA9224B7B63800C1FD34 /* Debug */ = { + DEBAADFE2A420A3A00BF2C1C /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { + BUILD_LIBRARY_FOR_DISTRIBUTION = YES; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; CODE_SIGN_STYLE = Automatic; - DEVELOPMENT_TEAM = 4ZR3G6ZK9T; - ONESIGNAL_DESTINATION_PATH = "${SRCROOT}/Framework"; - ONESIGNAL_MACH_O_TYPE = staticlib; - ONESIGNAL_OUTPUT_NAME = OneSignal; - ONESIGNAL_TARGET_NAME = OneSignalFramework; - PRODUCT_NAME = "$(TARGET_NAME)"; - }; - name = Debug; - }; - DEDFF3302901E47400D4E275 /* Release 64 bit */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - ARCHS = ( - "$(ARCHS_STANDARD)", - armv7s, - x86_64h, - x86_64, + COPY_PHASE_STRIP = NO; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DEVELOPMENT_TEAM = 99SW8E36CT; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + ENABLE_MODULE_VERIFIER = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_DYNAMIC_NO_PIC = NO; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", ); - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_MODULES_AUTOLINK = NO; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - COPY_PHASE_STRIP = YES; - DEBUG_INFORMATION_FORMAT = dwarf; - DEPLOYMENT_POSTPROCESSING = YES; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - GENERATE_MASTER_OBJECT_FILE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = OneSignalLocationFramework/Info.plist; + INFOPLIST_KEY_NSPrincipalClass = ""; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MARKETING_VERSION = 1.0; + MODULE_VERIFIER_SUPPORTED_LANGUAGES = "objective-c objective-c++"; + MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS = "gnu11 gnu++20"; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + MTL_FAST_MATH = YES; ONLY_ACTIVE_ARCH = NO; - OTHER_CFLAGS = ( - "-all_load", - "-fembed-bitcode", - ); - SDKROOT = iphoneos; - VALIDATE_PRODUCT = YES; + OTHER_CFLAGS = ""; + PRODUCT_BUNDLE_IDENTIFIER = com.onesignal.OneSignalLocation; + PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; + SKIP_INSTALL = YES; + SWIFT_EMIT_LOC_STRINGS = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + WARNING_CFLAGS = "-Wno-nullability-completeness"; }; - name = "Release 64 bit"; + name = Debug; }; - DEDFF3312901E47400D4E275 /* Release 64 bit */ = { + DEBAADFF2A420A3A00BF2C1C /* Test */ = { isa = XCBuildConfiguration; buildSettings = { - ARCHS = ( - "$(ARCHS_STANDARD)", - x86_64h, - x86_64, - ); - CLANG_ANALYZER_GCD_PERFORMANCE = YES; - CLANG_ANALYZER_SECURITY_FLOATLOOPCOUNTER = YES; - CLANG_ENABLE_CODE_COVERAGE = NO; - DSTROOT = /tmp/OneSignal.dst; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)", - ); - IPHONEOS_DEPLOYMENT_TARGET = 9.0; - OTHER_CFLAGS = "-fembed-bitcode"; - OTHER_LDFLAGS = ""; - PRODUCT_NAME = OneSignal; + BUILD_LIBRARY_FOR_DISTRIBUTION = YES; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CODE_SIGN_STYLE = Automatic; + COPY_PHASE_STRIP = NO; + CURRENT_PROJECT_VERSION = 1; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + DEFINES_MODULE = YES; + DEVELOPMENT_TEAM = 99SW8E36CT; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + ENABLE_MODULE_VERIFIER = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_PREPROCESSOR_DEFINITIONS = OS_TEST; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = OneSignalLocationFramework/Info.plist; + INFOPLIST_KEY_NSPrincipalClass = ""; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MARKETING_VERSION = 1.0; + MODULE_VERIFIER_SUPPORTED_LANGUAGES = "objective-c objective-c++"; + MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS = "gnu11 gnu++20"; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + OTHER_CFLAGS = ""; + PRODUCT_BUNDLE_IDENTIFIER = com.onesignal.OneSignalLocation; + PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; SKIP_INSTALL = YES; + SWIFT_EMIT_LOC_STRINGS = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + WARNING_CFLAGS = "-Wno-nullability-completeness"; }; - name = "Release 64 bit"; + name = Test; }; - DEDFF3322901E47400D4E275 /* Release 64 bit */ = { + DEBAAE312A4211DA00BF2C1C /* Release */ = { isa = XCBuildConfiguration; buildSettings = { - ARCHS = ( - "$(ARCHS_STANDARD)", - x86_64h, - x86_64, - ); + BUILD_LIBRARY_FOR_DISTRIBUTION = YES; CLANG_ANALYZER_NONNULL = YES; - CLANG_ENABLE_CODE_COVERAGE = NO; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_MODULE_DEBUGGING = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CODE_SIGN_IDENTITY = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CODE_SIGN_STYLE = Automatic; COPY_PHASE_STRIP = NO; CURRENT_PROJECT_VERSION = 1; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; @@ -3969,72 +4837,166 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - GCC_WARN_64_TO_32_BIT_CONVERSION = NO; - INFOPLIST_FILE = OneSignalFramework/Info.plist; + ENABLE_MODULE_VERIFIER = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = OneSignalInAppMessagesFramework/Info.plist; + INFOPLIST_KEY_NSPrincipalClass = ""; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 11.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MACH_O_TYPE = mh_dylib; + MARKETING_VERSION = 1.0; + MODULE_VERIFIER_SUPPORTED_LANGUAGES = "objective-c objective-c++"; + MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS = "gnu11 gnu++20"; MTL_ENABLE_DEBUG_INFO = NO; - OTHER_CFLAGS = "-fembed-bitcode"; - OTHER_LDFLAGS = ""; - PRODUCT_BUNDLE_IDENTIFIER = "com.onesignal.OneSignal-Dynamic"; - PRODUCT_NAME = OneSignal; + MTL_FAST_MATH = YES; + OTHER_CFLAGS = ""; + PRODUCT_BUNDLE_IDENTIFIER = com.onesignal.OneSignalInAppMessages; + PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; SKIP_INSTALL = YES; + SWIFT_EMIT_LOC_STRINGS = YES; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; WARNING_CFLAGS = "-Wno-nullability-completeness"; }; - name = "Release 64 bit"; + name = Release; }; - DEDFF3332901E47400D4E275 /* Release 64 bit */ = { + DEBAAE322A4211DA00BF2C1C /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { - ARCHS = ( - "$(ARCHS_STANDARD)", - x86_64h, - x86_64, + BUILD_LIBRARY_FOR_DISTRIBUTION = YES; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CODE_SIGN_STYLE = Automatic; + COPY_PHASE_STRIP = NO; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DEVELOPMENT_TEAM = 99SW8E36CT; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + ENABLE_MODULE_VERIFIER = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_DYNAMIC_NO_PIC = NO; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", ); - BUNDLE_LOADER = "$(TEST_HOST)"; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = OneSignalInAppMessagesFramework/Info.plist; + INFOPLIST_KEY_NSPrincipalClass = ""; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MARKETING_VERSION = 1.0; + MODULE_VERIFIER_SUPPORTED_LANGUAGES = "objective-c objective-c++"; + MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS = "gnu11 gnu++20"; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + MTL_FAST_MATH = YES; + ONLY_ACTIVE_ARCH = NO; + OTHER_CFLAGS = ""; + PRODUCT_BUNDLE_IDENTIFIER = com.onesignal.OneSignalInAppMessages; + PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; + SKIP_INSTALL = YES; + SWIFT_EMIT_LOC_STRINGS = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + WARNING_CFLAGS = "-Wno-nullability-completeness"; + }; + name = Debug; + }; + DEBAAE332A4211DA00BF2C1C /* Test */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUILD_LIBRARY_FOR_DISTRIBUTION = YES; CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_DOCUMENTATION_COMMENTS = YES; CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_SUSPICIOUS_MOVES = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CODE_SIGN_STYLE = Automatic; COPY_PHASE_STRIP = NO; + CURRENT_PROJECT_VERSION = 1; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + DEFINES_MODULE = YES; DEVELOPMENT_TEAM = 99SW8E36CT; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + ENABLE_MODULE_VERIFIER = YES; ENABLE_TESTABILITY = YES; - GCC_OPTIMIZATION_LEVEL = 0; + GCC_C_LANGUAGE_STANDARD = gnu11; GCC_PREPROCESSOR_DEFINITIONS = OS_TEST; - INFOPLIST_FILE = UnitTests/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 10.1; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = OneSignalInAppMessagesFramework/Info.plist; + INFOPLIST_KEY_NSPrincipalClass = ""; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MACOSX_DEPLOYMENT_TARGET = 10.15; + MARKETING_VERSION = 1.0; + MODULE_VERIFIER_SUPPORTED_LANGUAGES = "objective-c objective-c++"; + MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS = "gnu11 gnu++20"; MTL_ENABLE_DEBUG_INFO = NO; - OTHER_CFLAGS = "-fembed-bitcode"; - PRODUCT_BUNDLE_IDENTIFIER = com.onesignal.UnitTests; - PRODUCT_NAME = "$(TARGET_NAME)"; - TEST_HOST = "$(BUILT_PRODUCTS_DIR)/UnitTestApp.app/UnitTestApp"; + MTL_FAST_MATH = YES; + OTHER_CFLAGS = ""; + PRODUCT_BUNDLE_IDENTIFIER = com.onesignal.OneSignalInAppMessages; + PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; + SKIP_INSTALL = YES; + SWIFT_EMIT_LOC_STRINGS = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + WARNING_CFLAGS = "-Wno-nullability-completeness"; }; - name = "Release 64 bit"; + name = Test; }; - DEDFF3342901E47400D4E275 /* Release 64 bit */ = { + DEC2EA9124B7B63800C1FD34 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { CODE_SIGN_STYLE = Automatic; DEVELOPMENT_TEAM = 4ZR3G6ZK9T; - ONESIGNAL_DESTINATION_PATH = "${SRCROOT}/Framework/Dynamic"; - ONESIGNAL_MACH_O_TYPE = mh_dylib; + ONESIGNAL_DESTINATION_PATH = "${SRCROOT}/Framework"; + ONESIGNAL_MACH_O_TYPE = staticlib; ONESIGNAL_OUTPUT_NAME = OneSignal; ONESIGNAL_TARGET_NAME = OneSignalFramework; PRODUCT_NAME = "$(TARGET_NAME)"; }; - name = "Release 64 bit"; + name = Release; }; - DEDFF3352901E47400D4E275 /* Release 64 bit */ = { + DEC2EA9224B7B63800C1FD34 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { CODE_SIGN_STYLE = Automatic; @@ -4045,22 +5007,24 @@ ONESIGNAL_TARGET_NAME = OneSignalFramework; PRODUCT_NAME = "$(TARGET_NAME)"; }; - name = "Release 64 bit"; + name = Debug; }; - DEDFF3362901E47400D4E275 /* Release 64 bit */ = { + DECE6F5A28C903D7007058EE /* Test */ = { isa = XCBuildConfiguration; buildSettings = { - CODE_SIGN_STYLE = Automatic; - DEVELOPMENT_TEAM = 4ZR3G6ZK9T; - ONESIGNAL_DESTINATION_PATH = "${SRCROOT}/Framework"; - ONESIGNAL_MACH_O_TYPE = staticlib; - ONESIGNAL_OUTPUT_NAME = OneSignal; - ONESIGNAL_TARGET_NAME = OneSignalFramework; - PRODUCT_NAME = "$(TARGET_NAME)"; + APPLICATION_EXTENSION_API_ONLY = YES; + BUILD_LIBRARY_FOR_DISTRIBUTION = YES; + ENABLE_TESTABILITY = YES; + INFOPLIST_FILE = OneSignalOSCoreFramework/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; + OTHER_CFLAGS = ""; + PRODUCT_BUNDLE_IDENTIFIER = com.onesignal.OneSignalOSCore; + PRODUCT_NAME = OneSignalOSCore; + SWIFT_VERSION = 5.0; }; - name = "Release 64 bit"; + name = Test; }; - DEDFF3372901E47400D4E275 /* Release 64 bit */ = { + DEF5CD082539321D0003E9CC /* Release */ = { isa = XCBuildConfiguration; buildSettings = { ARCHS = "$(ARCHS_STANDARD)"; @@ -4090,106 +5054,95 @@ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DEVELOPMENT_TEAM = 99SW8E36CT; GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_PREPROCESSOR_DEFINITIONS = OS_TEST; INFOPLIST_FILE = UnitTestApp/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 9.0; "IPHONEOS_DEPLOYMENT_TARGET[sdk=macosx*]" = 13.1; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; MTL_ENABLE_DEBUG_INFO = NO; MTL_FAST_MATH = YES; OTHER_CFLAGS = "-fembed-bitcode"; PRODUCT_BUNDLE_IDENTIFIER = com.onesignal.example.UnitTestApp; PRODUCT_NAME = "$(TARGET_NAME)"; SUPPORTS_MACCATALYST = YES; + SWIFT_OBJC_BRIDGING_HEADER = "OneSignalUser/Source/UnitTestApp-Bridging-Header.h"; + SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; }; - name = "Release 64 bit"; + name = Release; }; - DEDFF3382901E47400D4E275 /* Release 64 bit */ = { + DEF5CD092539321D0003E9CC /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { - APPLICATION_EXTENSION_API_ONLY = YES; - ARCHS = ( - "$(ARCHS_STANDARD)", - x86_64h, - x86_64, - ); + ARCHS = "$(ARCHS_STANDARD)"; + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; CLANG_ANALYZER_NONNULL = YES; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++17"; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_WEAK = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = NO; CLANG_WARN_COMMA = YES; CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DOCUMENTATION_COMMENTS = NO; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = NO; + CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - "CODE_SIGN_IDENTITY[sdk=macosx*]" = "Apple Development"; + CODE_SIGN_ENTITLEMENTS = UnitTestApp/UnitTestApp.entitlements; CODE_SIGN_STYLE = Automatic; COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - DEFINES_MODULE = YES; DEVELOPMENT_TEAM = 99SW8E36CT; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; + ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = gnu11; - GENERATE_INFOPLIST_FILE = NO; - INFOPLIST_FILE = OneSignalCoreFramework/Info.plist; - INFOPLIST_KEY_NSHumanReadableCopyright = "Copyright © 2021 Hiptic. All rights reserved."; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 11.0; + GCC_DYNAMIC_NO_PIC = NO; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = OS_TEST; + INFOPLIST_FILE = UnitTestApp/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; + "IPHONEOS_DEPLOYMENT_TARGET[sdk=macosx*]" = 13.1; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MARKETING_VERSION = 1.0; - MTL_ENABLE_DEBUG_INFO = NO; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_FAST_MATH = YES; ONLY_ACTIVE_ARCH = NO; OTHER_CFLAGS = "-fembed-bitcode"; - PRODUCT_BUNDLE_IDENTIFIER = com.onesignal.OneSignalCore; - PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; - SKIP_INSTALL = YES; - SWIFT_EMIT_LOC_STRINGS = YES; + PRODUCT_BUNDLE_IDENTIFIER = com.onesignal.example.UnitTestApp; + PRODUCT_NAME = "$(TARGET_NAME)"; + SUPPORTS_MACCATALYST = YES; + SWIFT_OBJC_BRIDGING_HEADER = "OneSignalUser/Source/UnitTestApp-Bridging-Header.h"; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - WARNING_CFLAGS = "-Wno-nullability-completeness"; }; - name = "Release 64 bit"; + name = Debug; }; - DEDFF3392901E47400D4E275 /* Release 64 bit */ = { + DEF784322912DEBD00A1F3A5 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { - APPLICATION_EXTENSION_API_ONLY = YES; - ARCHS = ( - "$(ARCHS_STANDARD)", - x86_64h, - x86_64, - ); + APPLICATION_EXTENSION_API_ONLY = NO; + BUILD_LIBRARY_FOR_DISTRIBUTION = YES; CLANG_ANALYZER_NONNULL = YES; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++17"; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_WEAK = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_COMMA = YES; CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DOCUMENTATION_COMMENTS = NO; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = NO; + CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; CODE_SIGN_STYLE = Automatic; @@ -4202,9 +5155,9 @@ DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; GCC_C_LANGUAGE_STANDARD = gnu11; - GENERATE_INFOPLIST_FILE = NO; - INFOPLIST_FILE = OneSignalExtensionFramework/Info.plist; - INFOPLIST_KEY_NSHumanReadableCopyright = "Copyright © 2021 Hiptic. All rights reserved."; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = OneSignalNotificationsFramework/Info.plist; + INFOPLIST_KEY_NSPrincipalClass = ""; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 11.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; @@ -4212,8 +5165,8 @@ MTL_ENABLE_DEBUG_INFO = NO; MTL_FAST_MATH = YES; ONLY_ACTIVE_ARCH = NO; - OTHER_CFLAGS = "-fembed-bitcode"; - PRODUCT_BUNDLE_IDENTIFIER = com.onesignal.OneSignalExtension; + OTHER_CFLAGS = ""; + PRODUCT_BUNDLE_IDENTIFIER = com.onesignal.OneSignalNotifications; PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; SKIP_INSTALL = YES; SWIFT_EMIT_LOC_STRINGS = YES; @@ -4222,57 +5175,59 @@ VERSION_INFO_PREFIX = ""; WARNING_CFLAGS = "-Wno-nullability-completeness"; }; - name = "Release 64 bit"; + name = Release; }; - DEDFF33A2901E47400D4E275 /* Release 64 bit */ = { + DEF784332912DEBD00A1F3A5 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { - APPLICATION_EXTENSION_API_ONLY = YES; - ARCHS = ( - "$(ARCHS_STANDARD)", - x86_64h, - x86_64, - ); + APPLICATION_EXTENSION_API_ONLY = NO; + BUILD_LIBRARY_FOR_DISTRIBUTION = YES; CLANG_ANALYZER_NONNULL = YES; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++17"; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_WEAK = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_COMMA = YES; CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DOCUMENTATION_COMMENTS = NO; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = NO; + CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; CODE_SIGN_STYLE = Automatic; COPY_PHASE_STRIP = NO; CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DEFINES_MODULE = YES; DEVELOPMENT_TEAM = 99SW8E36CT; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; + ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = gnu11; - GENERATE_INFOPLIST_FILE = NO; - INFOPLIST_FILE = OneSignalOutcomesFramework/Info.plist; - INFOPLIST_KEY_NSHumanReadableCopyright = "Copyright © 2021 Hiptic. All rights reserved."; + GCC_DYNAMIC_NO_PIC = NO; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = OneSignalNotificationsFramework/Info.plist; + INFOPLIST_KEY_NSPrincipalClass = ""; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 11.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; MARKETING_VERSION = 1.0; - MTL_ENABLE_DEBUG_INFO = NO; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_FAST_MATH = YES; ONLY_ACTIVE_ARCH = NO; - OTHER_CFLAGS = "-fembed-bitcode"; - PRODUCT_BUNDLE_IDENTIFIER = com.onesignal.OneSignalOutcomes; + OTHER_CFLAGS = ""; + PRODUCT_BUNDLE_IDENTIFIER = com.onesignal.OneSignalNotifications; PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; SKIP_INSTALL = YES; SWIFT_EMIT_LOC_STRINGS = YES; @@ -4281,61 +5236,16 @@ VERSION_INFO_PREFIX = ""; WARNING_CFLAGS = "-Wno-nullability-completeness"; }; - name = "Release 64 bit"; - }; - DEF5CD082539321D0003E9CC /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ARCHS = "$(ARCHS_STANDARD)"; - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_WEAK = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CODE_SIGN_ENTITLEMENTS = UnitTestApp/UnitTestApp.entitlements; - CODE_SIGN_STYLE = Automatic; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - DEVELOPMENT_TEAM = 99SW8E36CT; - GCC_C_LANGUAGE_STANDARD = gnu11; - INFOPLIST_FILE = UnitTestApp/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; - "IPHONEOS_DEPLOYMENT_TARGET[sdk=macosx*]" = 13.1; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - MTL_ENABLE_DEBUG_INFO = NO; - MTL_FAST_MATH = YES; - OTHER_CFLAGS = "-fembed-bitcode"; - PRODUCT_BUNDLE_IDENTIFIER = com.onesignal.example.UnitTestApp; - PRODUCT_NAME = "$(TARGET_NAME)"; - SUPPORTS_MACCATALYST = YES; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Release; + name = Debug; }; - DEF5CD092539321D0003E9CC /* Debug */ = { + DEF784342912DEBD00A1F3A5 /* Test */ = { isa = XCBuildConfiguration; buildSettings = { - ARCHS = "$(ARCHS_STANDARD)"; - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + APPLICATION_EXTENSION_API_ONLY = NO; + BUILD_LIBRARY_FOR_DISTRIBUTION = YES; CLANG_ANALYZER_NONNULL = YES; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_WEAK = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; @@ -4351,32 +5261,39 @@ CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CODE_SIGN_ENTITLEMENTS = UnitTestApp/UnitTestApp.entitlements; CODE_SIGN_STYLE = Automatic; COPY_PHASE_STRIP = NO; + CURRENT_PROJECT_VERSION = 1; + DEBUG_INFORMATION_FORMAT = dwarf; + DEFINES_MODULE = YES; DEVELOPMENT_TEAM = 99SW8E36CT; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = gnu11; - GCC_DYNAMIC_NO_PIC = NO; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - INFOPLIST_FILE = UnitTestApp/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; - "IPHONEOS_DEPLOYMENT_TARGET[sdk=macosx*]" = 13.1; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + GCC_PREPROCESSOR_DEFINITIONS = OS_TEST; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = OneSignalNotificationsFramework/Info.plist; + INFOPLIST_KEY_NSPrincipalClass = ""; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MARKETING_VERSION = 1.0; + MTL_ENABLE_DEBUG_INFO = NO; MTL_FAST_MATH = YES; ONLY_ACTIVE_ARCH = NO; - OTHER_CFLAGS = "-fembed-bitcode"; - PRODUCT_BUNDLE_IDENTIFIER = com.onesignal.example.UnitTestApp; - PRODUCT_NAME = "$(TARGET_NAME)"; - SUPPORTS_MACCATALYST = YES; + OTHER_CFLAGS = ""; + PRODUCT_BUNDLE_IDENTIFIER = com.onesignal.OneSignalNotifications; + PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; + SKIP_INSTALL = YES; + SWIFT_EMIT_LOC_STRINGS = YES; TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + WARNING_CFLAGS = "-Wno-nullability-completeness"; }; - name = Debug; + name = Test; }; /* End XCBuildConfiguration section */ @@ -4385,9 +5302,8 @@ isa = XCConfigurationList; buildConfigurations = ( CA2951B62167F4120064227A /* Release */, - DEDFF3302901E47400D4E275 /* Release 64 bit */, CA2951C22167FB950064227A /* Debug */, - DE3AA3E72901D2E9009FABA3 /* Debug 64 bit */, + DE3D8F3828C15839008C2BBF /* Test */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; @@ -4396,9 +5312,18 @@ isa = XCConfigurationList; buildConfigurations = ( CA2951B72167F4120064227A /* Release */, - DEDFF3312901E47400D4E275 /* Release 64 bit */, CA2951C32167FB950064227A /* Debug */, - DE3AA3E82901D2E9009FABA3 /* Debug 64 bit */, + DE3D8F3928C15839008C2BBF /* Test */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 3C115172289A259500565C41 /* Build configuration list for PBXNativeTarget "OneSignalOSCore" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 3C115173289A259500565C41 /* Release */, + 3C115174289A259500565C41 /* Debug */, + DECE6F5A28C903D7007058EE /* Test */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; @@ -4407,9 +5332,8 @@ isa = XCConfigurationList; buildConfigurations = ( CA2951B82167F4120064227A /* Release */, - DEDFF3322901E47400D4E275 /* Release 64 bit */, CA2951C42167FB950064227A /* Debug */, - DE3AA3E92901D2E9009FABA3 /* Debug 64 bit */, + DE3D8F3A28C15839008C2BBF /* Test */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; @@ -4418,9 +5342,8 @@ isa = XCConfigurationList; buildConfigurations = ( CA2951B92167F4120064227A /* Release */, - DEDFF3332901E47400D4E275 /* Release 64 bit */, CA2951C52167FB950064227A /* Debug */, - DE3AA3EA2901D2E9009FABA3 /* Debug 64 bit */, + DE3D8F3B28C15839008C2BBF /* Test */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; @@ -4429,9 +5352,8 @@ isa = XCConfigurationList; buildConfigurations = ( CA2951C12167F9860064227A /* Release */, - DEDFF3352901E47400D4E275 /* Release 64 bit */, CA2951C72167FB950064227A /* Debug */, - DE3AA3EC2901D2E9009FABA3 /* Debug 64 bit */, + DE3D8F3D28C15839008C2BBF /* Test */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; @@ -4440,9 +5362,18 @@ isa = XCConfigurationList; buildConfigurations = ( CA2951BA2167F4120064227A /* Release */, - DEDFF3342901E47400D4E275 /* Release 64 bit */, CA2951C62167FB950064227A /* Debug */, - DE3AA3EB2901D2E9009FABA3 /* Debug 64 bit */, + DE3D8F3C28C15839008C2BBF /* Test */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + DE69E1A7282ED8070090BB3D /* Build configuration list for PBXNativeTarget "OneSignalUser" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + DE69E1A5282ED8070090BB3D /* Release */, + DE69E1A6282ED8070090BB3D /* Debug */, + DE3D8F4328C15839008C2BBF /* Test */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; @@ -4451,9 +5382,8 @@ isa = XCConfigurationList; buildConfigurations = ( DE7D17F127026B95002D3A5D /* Release */, - DEDFF3382901E47400D4E275 /* Release 64 bit */, DE7D17F227026B95002D3A5D /* Debug */, - DE3AA3EF2901D2E9009FABA3 /* Debug 64 bit */, + DE3D8F4028C15839008C2BBF /* Test */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; @@ -4462,9 +5392,8 @@ isa = XCConfigurationList; buildConfigurations = ( DE7D180427026BA3002D3A5D /* Release */, - DEDFF3392901E47400D4E275 /* Release 64 bit */, DE7D180527026BA3002D3A5D /* Debug */, - DE3AA3F02901D2E9009FABA3 /* Debug 64 bit */, + DE3D8F4128C15839008C2BBF /* Test */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; @@ -4473,9 +5402,28 @@ isa = XCConfigurationList; buildConfigurations = ( DE7D188B27037F43002D3A5D /* Release */, - DEDFF33A2901E47400D4E275 /* Release 64 bit */, DE7D188C27037F43002D3A5D /* Debug */, - DE3AA3F12901D2E9009FABA3 /* Debug 64 bit */, + DE3D8F4228C15839008C2BBF /* Test */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + DEBAAE002A420A3A00BF2C1C /* Build configuration list for PBXNativeTarget "OneSignalLocation" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + DEBAADFD2A420A3A00BF2C1C /* Release */, + DEBAADFE2A420A3A00BF2C1C /* Debug */, + DEBAADFF2A420A3A00BF2C1C /* Test */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + DEBAAE302A4211DA00BF2C1C /* Build configuration list for PBXNativeTarget "OneSignalInAppMessages" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + DEBAAE312A4211DA00BF2C1C /* Release */, + DEBAAE322A4211DA00BF2C1C /* Debug */, + DEBAAE332A4211DA00BF2C1C /* Test */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; @@ -4484,9 +5432,8 @@ isa = XCConfigurationList; buildConfigurations = ( DEC2EA9124B7B63800C1FD34 /* Release */, - DEDFF3362901E47400D4E275 /* Release 64 bit */, DEC2EA9224B7B63800C1FD34 /* Debug */, - DE3AA3ED2901D2E9009FABA3 /* Debug 64 bit */, + DE3D8F3E28C15839008C2BBF /* Test */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; @@ -4495,9 +5442,18 @@ isa = XCConfigurationList; buildConfigurations = ( DEF5CD082539321D0003E9CC /* Release */, - DEDFF3372901E47400D4E275 /* Release 64 bit */, DEF5CD092539321D0003E9CC /* Debug */, - DE3AA3EE2901D2E9009FABA3 /* Debug 64 bit */, + DE3D8F3F28C15839008C2BBF /* Test */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + DEF784312912DEBD00A1F3A5 /* Build configuration list for PBXNativeTarget "OneSignalNotifications" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + DEF784322912DEBD00A1F3A5 /* Release */, + DEF784332912DEBD00A1F3A5 /* Debug */, + DEF784342912DEBD00A1F3A5 /* Test */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; diff --git a/iOS_SDK/OneSignalSDK/OneSignal.xcodeproj/xcshareddata/xcschemes/OneSignalFramework.xcscheme b/iOS_SDK/OneSignalSDK/OneSignal.xcodeproj/xcshareddata/xcschemes/OneSignalFramework.xcscheme index 4cc7abb0a..8193029a8 100644 --- a/iOS_SDK/OneSignalSDK/OneSignal.xcodeproj/xcshareddata/xcschemes/OneSignalFramework.xcscheme +++ b/iOS_SDK/OneSignalSDK/OneSignal.xcodeproj/xcshareddata/xcschemes/OneSignalFramework.xcscheme @@ -15,7 +15,7 @@ @@ -44,7 +44,7 @@ @@ -60,7 +60,7 @@ diff --git a/iOS_SDK/OneSignalSDK/OneSignal.xcodeproj/xcshareddata/xcschemes/OneSignalNotifications.xcscheme b/iOS_SDK/OneSignalSDK/OneSignal.xcodeproj/xcshareddata/xcschemes/OneSignalNotifications.xcscheme new file mode 100644 index 000000000..ae89bf25b --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignal.xcodeproj/xcshareddata/xcschemes/OneSignalNotifications.xcscheme @@ -0,0 +1,67 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/iOS_SDK/OneSignalSDK/OneSignal.xcodeproj/xcshareddata/xcschemes/UnitTestApp.xcscheme b/iOS_SDK/OneSignalSDK/OneSignal.xcodeproj/xcshareddata/xcschemes/UnitTestApp.xcscheme index 066287e0e..d56906b8f 100644 --- a/iOS_SDK/OneSignalSDK/OneSignal.xcodeproj/xcshareddata/xcschemes/UnitTestApp.xcscheme +++ b/iOS_SDK/OneSignalSDK/OneSignal.xcodeproj/xcshareddata/xcschemes/UnitTestApp.xcscheme @@ -23,10 +23,63 @@ + shouldUseLaunchSchemeArgsEnv = "YES" + codeCoverageEnabled = "YES" + onlyGenerateCoverageForSpecifiedTargets = "YES"> + + + + + + + + + + + + + + + + @@ -41,7 +94,7 @@ + buildConfiguration = "Debug"> @@ -39,7 +39,7 @@ -#import "OSNotification.h" +#import @protocol OSJSONDecodable + (instancetype _Nullable)instanceWithData:(NSData * _Nonnull)data; diff --git a/iOS_SDK/OneSignalSDK/OneSignalCore/Source/API/OSNetworkingUtils.h b/iOS_SDK/OneSignalSDK/OneSignalCore/Source/API/OSNetworkingUtils.h new file mode 100644 index 000000000..795f87be5 --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignalCore/Source/API/OSNetworkingUtils.h @@ -0,0 +1,47 @@ +/* + Modified MIT License + + Copyright 2022 OneSignal + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + 1. The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + 2. All copies of substantial portions of the Software may only be used in connection + with services provided by OneSignal. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + */ + +#import + +// NS_ASSUME_NONNULL_BEGIN + +typedef NS_ENUM(NSInteger, OSResponseStatusType) { + OSResponseStatusInvalid = 0, + OSResponseStatusRetryable, + OSResponseStatusUnauthorized, + OSResponseStatusMissing, + OSResponseStatusConflict +}; + +@interface OSNetworkingUtils : NSObject + ++ (NSNumber*)getNetType; ++ (OSResponseStatusType)getResponseStatusType:(NSInteger)statusCode; + +@end + +// NS_ASSUME_NONNULL_END diff --git a/iOS_SDK/OneSignalSDK/OneSignalCore/Source/API/OSNetworkingUtils.m b/iOS_SDK/OneSignalSDK/OneSignalCore/Source/API/OSNetworkingUtils.m new file mode 100644 index 000000000..68d9384dd --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignalCore/Source/API/OSNetworkingUtils.m @@ -0,0 +1,55 @@ +/* + Modified MIT License + + Copyright 2022 OneSignal + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + 1. The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + 2. All copies of substantial portions of the Software may only be used in connection + with services provided by OneSignal. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + */ + +#import "OSNetworkingUtils.h" +#import "OneSignalReachability.h" + +@implementation OSNetworkingUtils + ++ (NSNumber *)getNetType { + OneSignalReachability* reachability = [OneSignalReachability reachabilityForInternetConnection]; + NetworkStatus status = [reachability currentReachabilityStatus]; + if (status == ReachableViaWiFi) + return @0; + return @1; +} + ++ (OSResponseStatusType)getResponseStatusType:(NSInteger)statusCode { + if (statusCode == 400 || statusCode == 402) { + return OSResponseStatusInvalid; + } else if (statusCode == 401 || statusCode == 403) { + return OSResponseStatusUnauthorized; + } else if (statusCode == 404 || statusCode == 410) { + return OSResponseStatusMissing; + } else if (statusCode == 409) { + return OSResponseStatusConflict; + } else { + return OSResponseStatusRetryable; + } +} + +@end diff --git a/iOS_SDK/OneSignalSDK/OneSignalCore/Source/API/OSRequests.h b/iOS_SDK/OneSignalSDK/OneSignalCore/Source/API/OSRequests.h index 43bf0348b..03e3a02a6 100644 --- a/iOS_SDK/OneSignalSDK/OneSignalCore/Source/API/OSRequests.h +++ b/iOS_SDK/OneSignalSDK/OneSignalCore/Source/API/OSRequests.h @@ -26,17 +26,13 @@ */ #import -#import "OneSignalRequest.h" +#import #ifndef OneSignalRequests_h #define OneSignalRequests_h NS_ASSUME_NONNULL_BEGIN -@interface OSRequestGetTags : OneSignalRequest -+ (instancetype)withUserId:(NSString *)userId appId:(NSString *)appId; -@end - @interface OSRequestGetIosParams : OneSignalRequest + (instancetype)withUserId:(NSString *)userId appId:(NSString *)appId; @end @@ -45,110 +41,26 @@ NS_ASSUME_NONNULL_BEGIN + (instancetype)withAppId:(NSString *)appId withJson:(NSMutableDictionary *)json; @end -@interface OSRequestUpdateNotificationTypes : OneSignalRequest -+ (instancetype)withUserId:(NSString *)userId appId:(NSString *)appId notificationTypes:(NSNumber *)notificationTypes; -@end - -@interface OSRequestSendPurchases : OneSignalRequest -+ (instancetype)withUserId:(NSString *)userId externalIdAuthToken:(NSString * _Nullable)externalIdAuthToken appId:(NSString *)appId withPurchases:(NSArray *)purchases; -+ (instancetype)withUserId:(NSString *)userId emailAuthToken:(NSString *)emailAuthToken appId:(NSString *)appId withPurchases:(NSArray *)purchases; -@end - @interface OSRequestSubmitNotificationOpened : OneSignalRequest + (instancetype)withUserId:(NSString *)userId appId:(NSString *)appId wasOpened:(BOOL)opened messageId:(NSString *)messageId withDeviceType:(NSNumber *)deviceType; @end -@interface OSRequestSyncHashedEmail : OneSignalRequest -+ (instancetype)withUserId:(NSString *)userId appId:(NSString *)appId email:(NSString *)email networkType:(NSNumber *)netType; -@end - NS_ASSUME_NONNULL_END -@interface OSRequestUpdateDeviceToken : OneSignalRequest -// Push channel update device token -+ (instancetype _Nonnull)withUserId:(NSString * _Nonnull)userId appId:(NSString * _Nonnull)appId deviceToken:(NSString * _Nullable)identifier notificationTypes:(NSNumber * _Nullable)notificationTypes externalIdAuthToken:(NSString * _Nullable)externalIdAuthToken; - -// Email channel update device token -+ (instancetype _Nonnull)withUserId:(NSString * _Nonnull)userId appId:(NSString * _Nonnull)appId deviceToken:(NSString * _Nullable)identifier withParentId:(NSString * _Nullable)parentId emailAuthToken:(NSString * _Nullable)emailAuthHash email:(NSString * _Nullable)email externalIdAuthToken:(NSString * _Nullable)externalIdAuthToken; - -// SMS channel update device token -+ (instancetype _Nonnull)withUserId:(NSString * _Nonnull)userId appId:(NSString * _Nonnull)appId deviceToken:(NSString * _Nullable)identifier smsAuthToken:(NSString * _Nullable)smsAuthToken externalIdAuthToken:(NSString * _Nullable)externalIdAuthToken; -@end - -@interface OSRequestRegisterUser : OneSignalRequest -+ (instancetype _Nonnull)withData:(NSDictionary * _Nonnull)registrationData userId:(NSString * _Nullable)userId; -@end - -@interface OSRequestCreateDevice : OneSignalRequest -+ (instancetype _Nonnull)withAppId:(NSString * _Nonnull)appId withDeviceType:(NSNumber * _Nonnull)deviceType withEmail:(NSString * _Nullable)email withPlayerId:(NSString * _Nullable)playerId withEmailAuthHash:(NSString * _Nullable)emailAuthHash withExternalUserId:(NSString * _Nullable)externalUserId withExternalIdAuthToken:(NSString * _Nullable)externalIdAuthToken; - -+ (instancetype _Nonnull)withAppId:(NSString * _Nonnull)appId withDeviceType:(NSNumber * _Nonnull)deviceType withSMSNumber:(NSString * _Nullable)smsNumber withPlayerId:(NSString * _Nullable)playerId withSMSAuthHash:(NSString * _Nullable)smsAuthHash withExternalUserId:(NSString * _Nullable)externalUserId withExternalIdAuthToken:(NSString * _Nullable)externalIdAuthToken; -@end - -@interface OSRequestLogoutEmail : OneSignalRequest -+ (instancetype _Nonnull)withAppId:(NSString * _Nonnull)appId emailPlayerId:(NSString * _Nonnull)emailPlayerId devicePlayerId:(NSString * _Nonnull)devicePlayerId emailAuthHash:(NSString * _Nullable)emailAuthHash; -@end - -@interface OSRequestLogoutSMS : OneSignalRequest -+ (instancetype _Nonnull)withAppId:(NSString * _Nonnull)appId smsPlayerId:(NSString * _Nonnull)smsPlayerId smsAuthHash:(NSString * _Nullable)smsAuthHash devicePlayerId:(NSString * _Nonnull)devicePlayerId; -@end - -@interface OSRequestSendTagsToServer : OneSignalRequest -+ (instancetype _Nonnull)withUserId:(NSString * _Nonnull)userId appId:(NSString * _Nonnull)appId tags:(NSDictionary * _Nonnull)tags networkType:(NSNumber * _Nonnull)netType withEmailAuthHashToken:(NSString * _Nullable)emailAuthToken withExternalIdAuthHashToken:(NSString * _Nullable)externalIdAuthToken; - -+ (instancetype _Nonnull)withUserId:(NSString * _Nonnull)userId appId:(NSString * _Nonnull)appId tags:(NSDictionary * _Nonnull)tags networkType:(NSNumber * _Nonnull)netType withSMSAuthHashToken:(NSString * _Nullable)smsAuthToken withExternalIdAuthHashToken:(NSString * _Nullable)externalIdAuthToken; -@end - -@interface OSRequestUpdateLanguage : OneSignalRequest -+ (instancetype _Nonnull)withUserId:(NSString * _Nonnull)userId - appId:(NSString * _Nonnull)appId - language:(NSString * _Nonnull)language - emailAuthToken:(NSString * _Nullable)emailAuthHash - externalIdAuthToken:(NSString * _Nullable)externalIdAuthToken; - -+ (instancetype _Nonnull)withUserId:(NSString * _Nonnull)userId - appId:(NSString * _Nonnull)appId - language:(NSString * _Nonnull)language - smsAuthToken:(NSString * _Nullable)smsAuthToken - externalIdAuthToken:(NSString * _Nullable)externalIdAuthToken; -@end - -@interface OSRequestBadgeCount : OneSignalRequest -+ (instancetype _Nonnull)withUserId:(NSString * _Nonnull)userId - appId:(NSString * _Nonnull)appId - badgeCount:(NSNumber * _Nonnull)badgeCount - emailAuthToken:(NSString * _Nullable)emailAuthHash - externalIdAuthToken:(NSString * _Nullable)externalIdAuthToken; - -+ (instancetype _Nonnull)withUserId:(NSString * _Nonnull)userId - appId:(NSString * _Nonnull)appId - badgeCount:(NSNumber * _Nonnull)badgeCount - smsAuthToken:(NSString * _Nullable)smsAuthToken - externalIdAuthToken:(NSString * _Nullable)externalIdAuthToken; -@end - -@interface OSRequestUpdateExternalUserId : OneSignalRequest -+ (instancetype _Nonnull)withUserId:(NSString * _Nullable)externalId withUserIdHashToken:(NSString * _Nullable)hashToken withOneSignalUserId:(NSString * _Nonnull)userId appId:(NSString * _Nonnull)appId; - -+ (instancetype _Nonnull)withUserId:(NSString * _Nullable)externalId withUserIdHashToken:(NSString * _Nullable)hashToken withOneSignalUserId:(NSString * _Nonnull)userId withEmailHashToken:(NSString * _Nullable)emailHashToken appId:(NSString * _Nonnull)appId; - -+ (instancetype _Nonnull)withUserId:(NSString * _Nullable)externalId withUserIdHashToken:(NSString * _Nullable)hashToken withOneSignalUserId:(NSString * _Nonnull)userId withSMSHashToken:(NSString * _Nullable)smsHashToken appId:(NSString * _Nonnull)appId; -@end - @interface OSRequestTrackV1 : OneSignalRequest + (instancetype _Nonnull)trackUsageData:(NSString * _Nonnull)osUsageData appId:(NSString * _Nonnull)appId; @end @interface OSRequestLiveActivityEnter: OneSignalRequest -+ (instancetype _Nonnull)withUserId:(NSString * _Nonnull)userId ++ (instancetype _Nonnull)withSubscriptionId:(NSString * _Nonnull)subscriptionId appId:(NSString * _Nonnull)appId activityId:(NSString * _Nonnull)activityId token:(NSString * _Nonnull)token; @end @interface OSRequestLiveActivityExit: OneSignalRequest -+ (instancetype _Nonnull)withUserId:(NSString * _Nonnull)userId ++ (instancetype _Nonnull)withSubscriptionId:(NSString * _Nonnull)subscriptionId appId:(NSString * _Nonnull)appId activityId:(NSString * _Nonnull)activityId; @end diff --git a/iOS_SDK/OneSignalSDK/OneSignalCore/Source/API/OSRequests.m b/iOS_SDK/OneSignalSDK/OneSignalCore/Source/API/OSRequests.m index b313ee367..3112dd2ac 100644 --- a/iOS_SDK/OneSignalSDK/OneSignalCore/Source/API/OSRequests.m +++ b/iOS_SDK/OneSignalSDK/OneSignalCore/Source/API/OSRequests.m @@ -39,18 +39,6 @@ #import // SUBCLASSES - These subclasses each represent an individual request -@implementation OSRequestGetTags -+ (instancetype)withUserId:(NSString *)userId appId:(NSString *)appId { - let request = [OSRequestGetTags new]; - - request.parameters = @{@"app_id" : appId}; - request.method = GET; - request.path = [NSString stringWithFormat:@"players/%@", userId]; - request.disableLocalCaching = true; - - return request; -} -@end /* NOTE: The OSRequestGetIosParams request will not return a Cache-Control header @@ -74,39 +62,6 @@ + (instancetype)withUserId:(NSString *)userId appId:(NSString *)appId { } @end -@implementation OSRequestSendTagsToServer -+ (instancetype _Nonnull)withUserId:(NSString * _Nonnull)userId appId:(NSString * _Nonnull)appId tags:(NSDictionary * _Nonnull)tags networkType:(NSNumber * _Nonnull)netType withEmailAuthHashToken:(NSString * _Nullable)emailAuthToken withExternalIdAuthHashToken:(NSString * _Nullable)externalIdAuthToken { - return [self withUserId:userId appId:appId tags:tags networkType:netType withAuthHashToken:emailAuthToken withAuthTokenKey:@"email_auth_hash" withExternalIdAuthHashToken:externalIdAuthToken]; -} - -+ (instancetype)withUserId:(NSString *)userId appId:(NSString *)appId tags:(NSDictionary *)tags networkType:(NSNumber *)netType withSMSAuthHashToken:(NSString *)smsAuthToken withExternalIdAuthHashToken:(NSString *)externalIdAuthToken { - return [self withUserId:userId appId:appId tags:tags networkType:netType withAuthHashToken:smsAuthToken withAuthTokenKey:@"sms_auth_hash" withExternalIdAuthHashToken:externalIdAuthToken]; -} - -+ (instancetype)withUserId:(NSString *)userId appId:(NSString *)appId tags:(NSDictionary *)tags networkType:(NSNumber *)netType withAuthHashToken:(NSString *)authToken withAuthTokenKey:(NSString *)authTokenKey withExternalIdAuthHashToken:(NSString *)externalIdAuthToken { - let request = [OSRequestSendTagsToServer new]; - - let params = [NSMutableDictionary new]; - params[@"app_id"] = appId; - params[@"tags"] = tags; - params[@"net_type"] = netType; - - if (authToken && authToken.length > 0) - params[authTokenKey] = authToken; - - if (externalIdAuthToken && externalIdAuthToken.length > 0) - params[@"external_user_id_auth_hash"] = externalIdAuthToken; - - request.parameters = params; - request.method = PUT; - request.path = [NSString stringWithFormat:@"players/%@", userId]; - - return request; -} - - -@end - @implementation OSRequestPostNotification + (instancetype)withAppId:(NSString *)appId withJson:(NSMutableDictionary *)json { let request = [OSRequestPostNotification new]; @@ -122,188 +77,6 @@ + (instancetype)withAppId:(NSString *)appId withJson:(NSMutableDictionary *)json } @end -@implementation OSRequestUpdateDeviceToken -+ (instancetype _Nonnull)withUserId:(NSString * _Nonnull)userId appId:(NSString * _Nonnull)appId deviceToken:(NSString * _Nullable)identifier notificationTypes:(NSNumber * _Nullable)notificationTypes externalIdAuthToken:(NSString * _Nullable)externalIdAuthToken { - - let request = [OSRequestUpdateDeviceToken new]; - - let params = [NSMutableDictionary new]; - params[@"app_id"] = appId; - - if (notificationTypes) - params[@"notification_types"] = notificationTypes; - - if (identifier) - params[@"identifier"] = identifier; - - if (externalIdAuthToken && externalIdAuthToken.length > 0) - params[@"external_user_id_auth_hash"] = externalIdAuthToken; - - request.parameters = params; - request.method = PUT; - request.path = [NSString stringWithFormat:@"players/%@", userId]; - - return request; -} - -+ (instancetype)withUserId:(NSString *)userId appId:(NSString *)appId deviceToken:(NSString *)identifier withParentId:(NSString *)parentId emailAuthToken:(NSString *)emailAuthHash email:(NSString *)email externalIdAuthToken:(NSString *)externalIdAuthToken { - let request = [OSRequestUpdateDeviceToken new]; - - let params = [NSMutableDictionary new]; - params[@"app_id"] = appId; - - if (email) - params[@"email"] = email; - - if (identifier) - params[@"identifier"] = identifier; - - if (parentId) - params[@"parent_player_id"] = parentId; - - if (emailAuthHash && emailAuthHash.length > 0) - params[@"email_auth_hash"] = emailAuthHash; - - if (externalIdAuthToken && externalIdAuthToken.length > 0) - params[@"external_user_id_auth_hash"] = externalIdAuthToken; - - request.parameters = params; - request.method = PUT; - request.path = [NSString stringWithFormat:@"players/%@", userId]; - - return request; -} - -+ (instancetype)withUserId:(NSString *)userId appId:(NSString *)appId deviceToken:(NSString *)identifier smsAuthToken:(NSString *)smsAuthToken externalIdAuthToken:(NSString *)externalIdAuthToken { - let request = [OSRequestUpdateDeviceToken new]; - - let params = [NSMutableDictionary new]; - params[@"app_id"] = appId; - - if (identifier) - params[@"identifier"] = identifier; - - if (smsAuthToken && smsAuthToken.length > 0) - params[SMS_NUMBER_AUTH_HASH_KEY] = smsAuthToken; - - if (externalIdAuthToken && externalIdAuthToken.length > 0) - params[@"external_user_id_auth_hash"] = externalIdAuthToken; - - request.parameters = params; - request.method = PUT; - request.path = [NSString stringWithFormat:@"players/%@", userId]; - - return request; -} -@end - -@implementation OSRequestCreateDevice -+ (instancetype _Nonnull)withAppId:(NSString * _Nonnull)appId withDeviceType:(NSNumber * _Nonnull)deviceType withEmail:(NSString * _Nullable)email withPlayerId:(NSString * _Nullable)playerId withEmailAuthHash:(NSString * _Nullable)emailAuthHash withExternalUserId: (NSString * _Nullable)externalUserId withExternalIdAuthToken:(NSString * _Nullable)externalIdAuthToken { - let request = [OSRequestCreateDevice new]; - - let params = [[NSMutableDictionary alloc] initWithDictionary:@{ - @"app_id" : appId, - @"device_type" : deviceType, - @"identifier" : email ?: [NSNull null], - @"email_auth_hash" : emailAuthHash ?: [NSNull null], - @"external_user_id_auth_hash" : externalIdAuthToken ?: [NSNull null], - @"device_player_id" : playerId ?: [NSNull null] - }]; - - if (externalUserId) { - params[@"external_user_id"] = externalUserId; - } - request.parameters = params; - request.method = POST; - request.path = @"players"; - - return request; -} - -+ (instancetype)withAppId:(NSString *)appId withDeviceType:(NSNumber *)deviceType withSMSNumber:(NSString *)smsNumber withPlayerId:(NSString *)playerId withSMSAuthHash:(NSString *)smsAuthHash withExternalUserId: (NSString * _Nullable)externalUserId withExternalIdAuthToken:(NSString *)externalIdAuthToken { - let request = [OSRequestCreateDevice new]; - - let params = [[NSMutableDictionary alloc] initWithDictionary:@{ - @"app_id" : appId, - @"device_type" : deviceType, - @"identifier" : smsNumber ?: [NSNull null], - SMS_NUMBER_AUTH_HASH_KEY : smsAuthHash ?: [NSNull null], - @"external_user_id_auth_hash" : externalIdAuthToken ?: [NSNull null], - @"device_player_id" : playerId ?: [NSNull null] - }]; - - if (externalUserId) { - params[@"external_user_id"] = externalUserId; - } - - request.parameters = params; - request.method = POST; - request.path = @"players"; - - return request; -} -@end - -@implementation OSRequestLogoutEmail - -+ (instancetype _Nonnull)withAppId:(NSString * _Nonnull)appId emailPlayerId:(NSString * _Nonnull)emailPlayerId devicePlayerId:(NSString * _Nonnull)devicePlayerId emailAuthHash:(NSString * _Nullable)emailAuthHash { - let request = [OSRequestLogoutEmail new]; - - request.parameters = @{ - @"parent_player_id" : emailPlayerId ?: [NSNull null], - @"email_auth_hash" : emailAuthHash ?: [NSNull null], - @"app_id" : appId - }; - - request.method = POST; - request.path = [NSString stringWithFormat:@"players/%@/email_logout", devicePlayerId]; - - return request; -} - -@end - -@implementation OSRequestUpdateNotificationTypes -+ (instancetype)withUserId:(NSString *)userId appId:(NSString *)appId notificationTypes:(NSNumber *)notificationTypes { - let request = [OSRequestUpdateNotificationTypes new]; - - request.parameters = @{@"app_id" : appId, @"notification_types" : notificationTypes}; - request.method = PUT; - request.path = [NSString stringWithFormat:@"players/%@", userId]; - - return request; -} -@end - -@implementation OSRequestSendPurchases -+ (instancetype)withUserId:(NSString *)userId externalIdAuthToken:(NSString * _Nullable)externalIdAuthToken appId:(NSString *)appId withPurchases:(NSArray *)purchases { - let request = [OSRequestSendPurchases new]; - - request.parameters = @{@"app_id" : appId, - @"purchases" : purchases, - @"external_user_id_auth_hash" : externalIdAuthToken ?: [NSNull null] - }; - request.method = POST; - request.path = [NSString stringWithFormat:@"players/%@/on_purchase", userId]; - - return request; -} - -+ (instancetype)withUserId:(NSString *)userId emailAuthToken:(NSString *)emailAuthToken appId:(NSString *)appId withPurchases:(NSArray *)purchases { - let request = [OSRequestSendPurchases new]; - - request.parameters = @{ - @"app_id" : appId, - @"purchases" : purchases, - @"email_auth_hash" : emailAuthToken ?: [NSNull null] - }; - request.method = POST; - request.path = [NSString stringWithFormat:@"players/%@/on_purchase", userId]; - - return request; -} -@end - @implementation OSRequestSubmitNotificationOpened + (instancetype)withUserId:(NSString *)userId appId:(NSString *)appId wasOpened:(BOOL)opened messageId:(NSString *)messageId withDeviceType:(nonnull NSNumber *)deviceType{ let request = [OSRequestSubmitNotificationOpened new]; @@ -316,162 +89,6 @@ + (instancetype)withUserId:(NSString *)userId appId:(NSString *)appId wasOpened: } @end -@implementation OSRequestRegisterUser -+ (instancetype _Nonnull)withData:(NSDictionary * _Nonnull)registrationData userId:(NSString * _Nullable)userId { - - let request = [OSRequestRegisterUser new]; - - request.parameters = registrationData; - request.method = POST; - request.path = userId ? [NSString stringWithFormat:@"players/%@/on_session", userId] : @"players"; - - return request; -} -@end - -@implementation OSRequestSyncHashedEmail -+ (instancetype)withUserId:(NSString *)userId appId:(NSString *)appId email:(NSString *)email networkType:(NSNumber *)netType { - let request = [OSRequestSyncHashedEmail new]; - - let lowerCase = [email lowercaseString]; - let md5Hash = [OneSignalCoreHelper hashUsingMD5:lowerCase]; - let sha1Hash = [OneSignalCoreHelper hashUsingSha1:lowerCase]; - - [OneSignalLog onesignalLog:ONE_S_LL_DEBUG message:[NSString stringWithFormat:@"%@ - MD5: %@, SHA1:%@", lowerCase, md5Hash, sha1Hash]]; - - request.parameters = @{@"app_id" : appId, @"em_m" : md5Hash, @"em_s" : sha1Hash, @"net_type" : netType}; - request.method = PUT; - request.path = [NSString stringWithFormat:@"players/%@", userId]; - - return request; -} -@end - -@implementation OSRequestUpdateLanguage - -+ (instancetype _Nonnull)withUserId:(NSString * _Nonnull)userId - appId:(NSString * _Nonnull)appId - language:(NSString * _Nonnull)language - emailAuthToken:(NSString * _Nullable)emailAuthHash - externalIdAuthToken:(NSString * _Nullable)externalIdAuthToken { - return [self withUserId:userId appId:appId language:language authToken:emailAuthHash authTokenKey:@"email_auth_hash" externalIdAuthToken:externalIdAuthToken]; -} - -+ (instancetype)withUserId:(NSString *)userId - appId:(NSString *)appId - language:(NSString *)language - smsAuthToken:(NSString *)smsAuthToken - externalIdAuthToken:(NSString *)externalIdAuthToken { - return [self withUserId:userId appId:appId language:language authToken:smsAuthToken authTokenKey:@"sms_auth_hash" externalIdAuthToken:externalIdAuthToken]; -} - -+ (instancetype)withUserId:(NSString *)userId - appId:(NSString *)appId - language:(NSString *)language - authToken:(NSString *)authToken - authTokenKey:(NSString *)authTokenKey - externalIdAuthToken:(NSString *)externalIdAuthToken { - let request = [OSRequestUpdateLanguage new]; - - [OneSignalLog onesignalLog:ONE_S_LL_VERBOSE message:[NSString stringWithFormat:@"Attempting Update to Language"]]; - - let params = [NSMutableDictionary new]; - params[@"app_id"] = appId; - params[@"language"] = language; - - if (authToken && authToken.length > 0 && authTokenKey) - params[authTokenKey] = authToken; - - if (externalIdAuthToken && externalIdAuthToken.length > 0) - params[@"external_user_id_auth_hash"] = externalIdAuthToken; - - request.parameters = params; - request.method = PUT; - request.path = [NSString stringWithFormat:@"players/%@", userId]; - - return request; -} - -@end - -@implementation OSRequestBadgeCount - -+ (instancetype _Nonnull)withUserId:(NSString * _Nonnull)userId - appId:(NSString * _Nonnull)appId - badgeCount:(NSNumber * _Nonnull)badgeCount - emailAuthToken:(NSString * _Nullable)emailAuthHash - externalIdAuthToken:(NSString * _Nullable)externalIdAuthToken { - return [self withUserId:userId appId:appId badgeCount:badgeCount authToken:emailAuthHash authTokenKey:@"email_auth_hash" externalIdAuthToken:externalIdAuthToken]; -} - -+ (instancetype)withUserId:(NSString *)userId - appId:(NSString *)appId - badgeCount:(NSNumber *)badgeCount - smsAuthToken:(NSString *)smsAuthToken - externalIdAuthToken:(NSString *)externalIdAuthToken { - return [self withUserId:userId appId:appId badgeCount:badgeCount authToken:smsAuthToken authTokenKey:@"sms_auth_hash" externalIdAuthToken:externalIdAuthToken]; -} - -+ (instancetype)withUserId:(NSString *)userId - appId:(NSString *)appId - badgeCount:(NSNumber *)badgeCount - authToken:(NSString *)authToken - authTokenKey:(NSString *)authTokenKey - externalIdAuthToken:(NSString *)externalIdAuthToken { - let request = [OSRequestBadgeCount new]; - - let params = [NSMutableDictionary new]; - params[@"app_id"] = appId; - params[@"badgeCount"] = badgeCount; - - if (authToken && authToken.length > 0 && authTokenKey) - params[authTokenKey] = authToken; - - if (externalIdAuthToken && externalIdAuthToken.length > 0) - params[@"external_user_id_auth_hash"] = externalIdAuthToken; - - request.parameters = params; - request.method = PUT; - request.path = [NSString stringWithFormat:@"players/%@", userId]; - - return request; -} - -@end - -@implementation OSRequestUpdateExternalUserId -+ (instancetype _Nonnull)withUserId:(NSString * _Nullable)externalId withUserIdHashToken:(NSString * _Nullable)hashToken withOneSignalUserId:(NSString *)userId appId:(NSString *)appId { - return [self withUserId:externalId withUserIdHashToken:hashToken withOneSignalUserId:userId withChannelHashToken:nil withHashTokenKey:nil appId:appId]; -} - -+ (instancetype)withUserId:(NSString *)externalId withUserIdHashToken:(NSString *)hashToken withOneSignalUserId:(NSString *)userId withEmailHashToken:(NSString *)emailHashToken appId:(NSString *)appId { - return [self withUserId:externalId withUserIdHashToken:hashToken withOneSignalUserId:userId withChannelHashToken:emailHashToken withHashTokenKey:@"email_auth_hash" appId:appId]; -} - -+ (instancetype)withUserId:(NSString *)externalId withUserIdHashToken:(NSString *)hashToken withOneSignalUserId:(NSString *)userId withSMSHashToken:(NSString *)smsHashToken appId:(NSString *)appId { - return [self withUserId:externalId withUserIdHashToken:hashToken withOneSignalUserId:userId withChannelHashToken:smsHashToken withHashTokenKey:@"sms_auth_hash" appId:appId]; -} - -+ (instancetype)withUserId:(NSString *)externalId withUserIdHashToken:(NSString *)hashToken withOneSignalUserId:(NSString *)userId withChannelHashToken:(NSString *)channelHashToken withHashTokenKey:(NSString *)hashTokenKey appId:(NSString *)appId { - NSString *msg = [NSString stringWithFormat:@"App ID: %@, external ID: %@", appId, externalId]; - [OneSignalLog onesignalLog:ONE_S_LL_DEBUG message:msg]; - - let request = [OSRequestUpdateExternalUserId new]; - NSMutableDictionary *parametres = [NSMutableDictionary new]; - [parametres setObject:appId forKey:@"app_id"]; - [parametres setObject:externalId ?: @"" forKey:@"external_user_id"]; - if (hashToken && [hashToken length] > 0) - [parametres setObject:hashToken forKey:@"external_user_id_auth_hash"]; - if (channelHashToken && hashTokenKey) - [parametres setObject:channelHashToken forKey:hashTokenKey]; - request.parameters = parametres; - request.method = PUT; - request.path = [NSString stringWithFormat:@"players/%@", userId]; - - return request; -} -@end - @implementation OSRequestTrackV1 NSString * const OS_USAGE_DATA = @"OS-Usage-Data"; + (instancetype)trackUsageData:(NSString *)osUsageData appId:(NSString *)appId { @@ -490,14 +107,14 @@ + (instancetype)trackUsageData:(NSString *)osUsageData appId:(NSString *)appId { @end @implementation OSRequestLiveActivityEnter -+ (instancetype)withUserId:(NSString * _Nonnull)userId ++ (instancetype)withSubscriptionId:(NSString * _Nonnull)subscriptionId appId:(NSString * _Nonnull)appId activityId:(NSString * _Nonnull)activityId token:(NSString * _Nonnull)token { let request = [OSRequestLiveActivityEnter new]; let params = [NSMutableDictionary new]; params[@"push_token"] = token; - params[@"subscription_id"] = userId; // pre-5.X.X subscription_id = player_id = userId + params[@"subscription_id"] = subscriptionId; // pre-5.X.X subscription_id = player_id = userId params[@"device_type"] = @0; request.parameters = params; request.method = POST; @@ -510,7 +127,7 @@ + (instancetype)withUserId:(NSString * _Nonnull)userId @end @implementation OSRequestLiveActivityExit -+ (instancetype)withUserId:(NSString * _Nonnull)userId ++ (instancetype)withSubscriptionId:(NSString * _Nonnull)subscriptionId appId:(NSString * _Nonnull)appId activityId:(NSString * _Nonnull)activityId { let request = [OSRequestLiveActivityExit new]; @@ -518,7 +135,7 @@ + (instancetype)withUserId:(NSString * _Nonnull)userId NSString *urlSafeActivityId = [activityId stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLUserAllowedCharacterSet]]; - request.path = [NSString stringWithFormat:@"apps/%@/live_activities/%@/token/%@", appId, urlSafeActivityId, userId]; + request.path = [NSString stringWithFormat:@"apps/%@/live_activities/%@/token/%@", appId, urlSafeActivityId, subscriptionId]; return request; } diff --git a/iOS_SDK/OneSignalSDK/OneSignalCore/Source/API/OneSignalClient.h b/iOS_SDK/OneSignalSDK/OneSignalCore/Source/API/OneSignalClient.h index 432a9abda..46f466add 100644 --- a/iOS_SDK/OneSignalSDK/OneSignalCore/Source/API/OneSignalClient.h +++ b/iOS_SDK/OneSignalSDK/OneSignalCore/Source/API/OneSignalClient.h @@ -26,7 +26,7 @@ */ #import -#import "OneSignalRequest.h" +#import #ifndef OneSignalClient_h #define OneSignalClient_h diff --git a/iOS_SDK/OneSignalSDK/OneSignalCore/Source/API/OneSignalClient.m b/iOS_SDK/OneSignalSDK/OneSignalCore/Source/API/OneSignalClient.m index f836ed2d2..9c38f0c7f 100644 --- a/iOS_SDK/OneSignalSDK/OneSignalCore/Source/API/OneSignalClient.m +++ b/iOS_SDK/OneSignalSDK/OneSignalCore/Source/API/OneSignalClient.m @@ -59,8 +59,8 @@ -(instancetype)init { - (NSURLSessionConfiguration *)configurationWithCachingPolicy:(NSURLRequestCachePolicy)policy { NSURLSessionConfiguration *configuration = [NSURLSessionConfiguration defaultSessionConfiguration]; - configuration.timeoutIntervalForRequest = REQUEST_TIMEOUT_REQUEST; - configuration.timeoutIntervalForResource = REQUEST_TIMEOUT_RESOURCE; + configuration.timeoutIntervalForRequest = REQUEST_TIMEOUT_REQUEST; // TODO: Are these anything? + configuration.timeoutIntervalForResource = REQUEST_TIMEOUT_RESOURCE; // TODO: Are these anything? //prevent caching of requests, this mainly impacts OSRequestGetIosParams, //since the OSRequestGetTags endpoint has a caching header policy @@ -101,13 +101,14 @@ - (void)executeSimultaneousRequests:(NSDictionary 0) { - innerJson = [NSJSONSerialization JSONObjectWithData:data options:kNilOptions error:&jsonError]; + innerJson = [NSJSONSerialization JSONObjectWithData:data options:NSJSONReadingMutableContainers error:&jsonError]; + innerJson[@"httpStatusCode"] = [NSNumber numberWithLong:statusCode]; [OneSignalLog onesignalLog:ONE_S_LL_VERBOSE message:[NSString stringWithFormat:@"network response (%@): %@", NSStringFromClass([request class]), innerJson]]; if (jsonError) { if (failureBlock != nil) @@ -384,7 +394,7 @@ - (void)handleJSONNSURLResponse:(NSURLResponse*)response data:(NSData*)data erro if ([self willReattemptRequest:(int)statusCode withRequest:request success:successBlock failure:failureBlock asyncRequest:async]) return; - if (error == nil && (statusCode == 200 || statusCode == 202)) { + if (error == nil && (statusCode == 200 || statusCode == 201 || statusCode == 202)) { if (successBlock != nil) { if (innerJson != nil) successBlock(innerJson); diff --git a/iOS_SDK/OneSignalSDK/Source/OneSignalReachability.h b/iOS_SDK/OneSignalSDK/OneSignalCore/Source/API/OneSignalReachability.h similarity index 97% rename from iOS_SDK/OneSignalSDK/Source/OneSignalReachability.h rename to iOS_SDK/OneSignalSDK/OneSignalCore/Source/API/OneSignalReachability.h index 92418b4b0..28f5cec33 100644 --- a/iOS_SDK/OneSignalSDK/Source/OneSignalReachability.h +++ b/iOS_SDK/OneSignalSDK/OneSignalCore/Source/API/OneSignalReachability.h @@ -29,6 +29,7 @@ #import #import +// Remark: This file could move to Core typedef enum : NSInteger { NotReachable = 0, diff --git a/iOS_SDK/OneSignalSDK/Source/OneSignalReachability.m b/iOS_SDK/OneSignalSDK/OneSignalCore/Source/API/OneSignalReachability.m similarity index 98% rename from iOS_SDK/OneSignalSDK/Source/OneSignalReachability.m rename to iOS_SDK/OneSignalSDK/OneSignalCore/Source/API/OneSignalReachability.m index 1a8b8b63d..bdf196c1b 100644 --- a/iOS_SDK/OneSignalSDK/Source/OneSignalReachability.m +++ b/iOS_SDK/OneSignalSDK/OneSignalCore/Source/API/OneSignalReachability.m @@ -29,7 +29,7 @@ #import #import #import - +// TODO: Before GA: There is a better native way to work with this, using different imports #import #import "OneSignalReachability.h" diff --git a/iOS_SDK/OneSignalSDK/OneSignalCore/Source/API/OneSignalRequest.h b/iOS_SDK/OneSignalSDK/OneSignalCore/Source/API/OneSignalRequest.h index 4e1b1fa82..be81332ed 100644 --- a/iOS_SDK/OneSignalSDK/OneSignalCore/Source/API/OneSignalRequest.h +++ b/iOS_SDK/OneSignalSDK/OneSignalCore/Source/API/OneSignalRequest.h @@ -28,7 +28,7 @@ #pragma clang diagnostic ignored "-Wnullability-completeness" #import -#import "OneSignalCommonDefines.h" +#import #ifndef OneSignalRequest_h @@ -47,6 +47,7 @@ typedef void (^OSFailureBlock)(NSError* error); @property (strong, nonatomic, nullable) NSDictionary *additionalHeaders; @property (nonatomic) int reattemptCount; @property (nonatomic) BOOL dataRequest; //false for JSON based requests +@property (nonatomic) NSDate *timestamp; -(BOOL)missingAppId; //for requests that don't require an appId parameter, the subclass should override this method and return false -(NSMutableURLRequest * _Nonnull )urlRequest; diff --git a/iOS_SDK/OneSignalSDK/OneSignalCore/Source/API/OneSignalRequest.m b/iOS_SDK/OneSignalSDK/OneSignalCore/Source/API/OneSignalRequest.m index 65554094a..ca70f8b62 100644 --- a/iOS_SDK/OneSignalSDK/OneSignalCore/Source/API/OneSignalRequest.m +++ b/iOS_SDK/OneSignalSDK/OneSignalCore/Source/API/OneSignalRequest.m @@ -28,8 +28,10 @@ #import "OneSignalRequest.h" #import "OneSignalCommonDefines.h" #import "OneSignalLog.h" +#import "OneSignalWrapper.h" #define HTTP_HEADER_KEY_OS_VERSION @"SDK-Version" +#define HTTP_HEADER_KEY_OS_WRAPPER @"SDK-Wrapper" #define HTTP_HEADER_PREFIX_OS_VERSION @"onesignal/ios/" @implementation OneSignalRequest @@ -47,6 +49,8 @@ - (id)init { // However some requests want to load non-JSON data like HTML // In those cases, `dataRequest` should be true self.dataRequest = false; + + self.timestamp = [NSDate date]; } return self; @@ -70,6 +74,12 @@ -(NSMutableURLRequest *)urlRequest { NSString *versionString = [NSString stringWithFormat:@"%@%@", HTTP_HEADER_PREFIX_OS_VERSION, ONESIGNAL_VERSION]; [request setValue:versionString forHTTPHeaderField:HTTP_HEADER_KEY_OS_VERSION]; + // Set header field if this is used in a wrapper SDK + if (OneSignalWrapper.sdkType && OneSignalWrapper.sdkVersion) { + NSString *wrapperString = [NSString stringWithFormat:@"onesignal/%@/%@", OneSignalWrapper.sdkType, OneSignalWrapper.sdkVersion]; + [request setValue:wrapperString forHTTPHeaderField:HTTP_HEADER_KEY_OS_WRAPPER]; + } + [request setHTTPMethod:httpMethodString(self.method)]; switch (self.method) { @@ -78,6 +88,7 @@ -(NSMutableURLRequest *)urlRequest { [self attachQueryParametersToRequest:request withParameters:self.parameters]; break; case POST: + case PATCH: case PUT: [self attachBodyToRequest:request withParameters:self.parameters]; break; @@ -89,13 +100,13 @@ -(NSMutableURLRequest *)urlRequest { } -(BOOL)missingAppId { - if ([self.path containsString:@"apps/"]) { - NSArray *pathComponents = [self.path componentsSeparatedByString:@"/"]; - NSUInteger x = [pathComponents indexOfObject:@"apps"] + 1; // Find the index that follows "apps" in the path - return ([pathComponents count] <= x || [[pathComponents objectAtIndex:x] length] == 0 || [[pathComponents objectAtIndex:x] isEqual: @"(null)"]); - } - - return (self.parameters[@"app_id"] == nil || [self.parameters[@"app_id"] length] == 0); + if ([self.path containsString:@"apps/"]) { + NSArray *pathComponents = [self.path componentsSeparatedByString:@"/"]; + NSUInteger x = [pathComponents indexOfObject:@"apps"] + 1; // Find the index that follows "apps" in the path + return ([pathComponents count] <= x || [[pathComponents objectAtIndex:x] length] == 0 || [[pathComponents objectAtIndex:x] isEqual: @"(null)"]); + } + + return (self.parameters[@"app_id"] == nil || [self.parameters[@"app_id"] length] == 0); } -(void)attachBodyToRequest:(NSMutableURLRequest *)request withParameters:(NSDictionary *)parameters { diff --git a/iOS_SDK/OneSignalSDK/Source/NSDateFormatter+OneSignal.h b/iOS_SDK/OneSignalSDK/OneSignalCore/Source/Categories/NSDateFormatter+OneSignal.h similarity index 100% rename from iOS_SDK/OneSignalSDK/Source/NSDateFormatter+OneSignal.h rename to iOS_SDK/OneSignalSDK/OneSignalCore/Source/Categories/NSDateFormatter+OneSignal.h diff --git a/iOS_SDK/OneSignalSDK/Source/NSDateFormatter+OneSignal.m b/iOS_SDK/OneSignalSDK/OneSignalCore/Source/Categories/NSDateFormatter+OneSignal.m similarity index 100% rename from iOS_SDK/OneSignalSDK/Source/NSDateFormatter+OneSignal.m rename to iOS_SDK/OneSignalSDK/OneSignalCore/Source/Categories/NSDateFormatter+OneSignal.m diff --git a/iOS_SDK/OneSignalSDK/OneSignalCore/Source/OSDeviceUtils.h b/iOS_SDK/OneSignalSDK/OneSignalCore/Source/OSDeviceUtils.h new file mode 100644 index 000000000..e646d6d1d --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignalCore/Source/OSDeviceUtils.h @@ -0,0 +1,41 @@ +/* + Modified MIT License + + Copyright 2022 OneSignal + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + 1. The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + 2. All copies of substantial portions of the Software may only be used in connection + with services provided by OneSignal. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + */ + +#import + +// NS_ASSUME_NONNULL_BEGIN + +@interface OSDeviceUtils : NSObject + ++ (NSString *)getCurrentDeviceVersion; ++ (BOOL)isIOSVersionGreaterThanOrEqual:(NSString *)version; ++ (BOOL)isIOSVersionLessThan:(NSString *)version; ++ (NSString*)getDeviceVariant; + +@end + +// NS_ASSUME_NONNULL_END diff --git a/iOS_SDK/OneSignalSDK/OneSignalCore/Source/OSDeviceUtils.m b/iOS_SDK/OneSignalSDK/OneSignalCore/Source/OSDeviceUtils.m new file mode 100644 index 000000000..f5343df66 --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignalCore/Source/OSDeviceUtils.m @@ -0,0 +1,75 @@ +/* + Modified MIT License + + Copyright 2022 OneSignal + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + 1. The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + 2. All copies of substantial portions of the Software may only be used in connection + with services provided by OneSignal. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + */ + +#import +#import +#import "OSMacros.h" +#import "OSDeviceUtils.h" + +@implementation OSDeviceUtils + ++ (NSString *)getCurrentDeviceVersion { + return [[UIDevice currentDevice] systemVersion]; +} + ++ (BOOL)isIOSVersionGreaterThanOrEqual:(NSString *)version { + return [[self getCurrentDeviceVersion] compare:version options:NSNumericSearch] != NSOrderedAscending; +} + ++ (BOOL)isIOSVersionLessThan:(NSString *)version { + return [[self getCurrentDeviceVersion] compare:version options:NSNumericSearch] == NSOrderedAscending; +} + ++ (NSString*)getSystemInfoMachine { + // e.g. @"x86_64" or @"iPhone9,3" + struct utsname systemInfo; + uname(&systemInfo); + return [NSString stringWithCString:systemInfo.machine + encoding:NSUTF8StringEncoding]; +} + +// This will get real device model if it is a real iOS device (Example iPhone8,2) +// If an iOS Simulator it will return "Simulator iPhone" or "Simulator iPad" +// If a macOS Catalyst app, return "Mac" ++ (NSString*)getDeviceVariant { + let systemInfoMachine = [self getSystemInfoMachine]; + + // x86_64 could mean an iOS Simulator or Catalyst app on macOS + #if TARGET_OS_MACCATALYST + return @"Mac"; + #elif TARGET_OS_SIMULATOR + let model = UIDevice.currentDevice.model; + if (model) { + return [@"Simulator " stringByAppendingString:model]; + } else { + return @"Simulator"; + } + #endif + return systemInfoMachine; +} + +@end diff --git a/iOS_SDK/OneSignalSDK/OneSignalCore/Source/OSDialogInstanceManager.h b/iOS_SDK/OneSignalSDK/OneSignalCore/Source/OSDialogInstanceManager.h new file mode 100644 index 000000000..3c842a306 --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignalCore/Source/OSDialogInstanceManager.h @@ -0,0 +1,40 @@ +/* + Modified MIT License + + Copyright 2022 OneSignal + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + 1. The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + 2. All copies of substantial portions of the Software may only be used in connection + with services provided by OneSignal. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + */ + +#import + +typedef void (^OSDialogActionCompletion)(int tappedActionIndex); + +@protocol OSDialogPresenter +- (void)presentDialogWithTitle:(NSString * _Nonnull)title withMessage:(NSString * _Nonnull)message withActions:(NSArray * _Nullable)actionTitles cancelTitle:(NSString * _Nonnull)cancelTitle withActionCompletion:(OSDialogActionCompletion _Nullable)completion; +- (void)clearQueue; +@end + +@interface OSDialogInstanceManager : NSObject ++ (void)setSharedInstance:(NSObject *_Nonnull)instance; ++ (NSObject *_Nullable)sharedInstance; +@end diff --git a/iOS_SDK/OneSignalSDK/OneSignalCore/Source/OSDialogInstanceManager.m b/iOS_SDK/OneSignalSDK/OneSignalCore/Source/OSDialogInstanceManager.m new file mode 100644 index 000000000..b24b09d6f --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignalCore/Source/OSDialogInstanceManager.m @@ -0,0 +1,41 @@ +/* + Modified MIT License + + Copyright 2022 OneSignal + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + 1. The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + 2. All copies of substantial portions of the Software may only be used in connection + with services provided by OneSignal. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + */ + +#import "OSDialogInstanceManager.h" + +@implementation OSDialogInstanceManager + +static NSObject *_sharedInstance; ++ (void)setSharedInstance:(NSObject *_Nonnull)instance { + _sharedInstance = instance; +} + ++ (NSObject * _Nullable)sharedInstance { + return _sharedInstance; +} + +@end diff --git a/iOS_SDK/OneSignalSDK/OneSignalCore/Source/OSInAppMessages.h b/iOS_SDK/OneSignalSDK/OneSignalCore/Source/OSInAppMessages.h new file mode 100644 index 000000000..ff7a084e1 --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignalCore/Source/OSInAppMessages.h @@ -0,0 +1,142 @@ +/* + Modified MIT License + + Copyright 2023 OneSignal + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + 1. The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + 2. All copies of substantial portions of the Software may only be used in connection + with services provided by OneSignal. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + */ + +/** + Public API for the InAppMessages namespace. + */ + +@interface OSInAppMessage : NSObject + +@property (strong, nonatomic, nonnull) NSString *messageId; + +// Dictionary of properties available on OSInAppMessage only +- (NSDictionary *_Nonnull)jsonRepresentation; + +@end + + +@interface OSInAppMessageTag : NSObject + +@property (strong, nonatomic, nullable) NSDictionary *tagsToAdd; +@property (strong, nonatomic, nullable) NSArray *tagsToRemove; + +// Convert the class into a NSDictionary +- (NSDictionary *_Nonnull)jsonRepresentation; + +@end + +typedef NS_ENUM(NSUInteger, OSInAppMessageActionUrlType) { + OSInAppMessageActionUrlTypeSafari, + + OSInAppMessageActionUrlTypeWebview, + + OSInAppMessageActionUrlTypeReplaceContent +}; + +@interface OSInAppMessageClickResult : NSObject + +// The action name attached to the IAM action +@property (strong, nonatomic, nullable) NSString *actionId; + +// The URL (if any) that should be opened when the action occurs +@property (strong, nonatomic, nullable) NSString *url; + +// Whether or not the click action dismisses the message +@property (nonatomic) BOOL closingMessage; + +// Determines where the URL is loaded, ie. app opens a webview +@property (nonatomic) OSInAppMessageActionUrlType urlTarget; + +// Convert the class into a NSDictionary +- (NSDictionary *_Nonnull)jsonRepresentation; + +@end + +@interface OSInAppMessageWillDisplayEvent : NSObject +@property (nonatomic, readonly, nonnull) OSInAppMessage *message; +- (NSDictionary *_Nonnull)jsonRepresentation; +@end + +@interface OSInAppMessageDidDisplayEvent : NSObject +@property (nonatomic, readonly, nonnull) OSInAppMessage *message; +- (NSDictionary *_Nonnull)jsonRepresentation; +@end + +@interface OSInAppMessageWillDismissEvent : NSObject +@property (nonatomic, readonly, nonnull) OSInAppMessage *message; +- (NSDictionary *_Nonnull)jsonRepresentation; +@end + +@interface OSInAppMessageDidDismissEvent : NSObject +@property (nonatomic, readonly, nonnull) OSInAppMessage *message; +- (NSDictionary *_Nonnull)jsonRepresentation; +@end + +@interface OSInAppMessageClickEvent : NSObject +@property (nonatomic, readonly, nonnull) OSInAppMessage *message; +@property (nonatomic, readonly, nonnull) OSInAppMessageClickResult *result; +// Convert the class into a NSDictionary +- (NSDictionary *_Nonnull)jsonRepresentation; +@end + +@protocol OSInAppMessageClickListener +- (void)onClickInAppMessage:(OSInAppMessageClickEvent *_Nonnull)event +NS_SWIFT_NAME(onClick(event:)); +@end + +@protocol OSInAppMessageLifecycleListener +@optional +- (void)onWillDisplayInAppMessage:(OSInAppMessageWillDisplayEvent *_Nonnull)event +NS_SWIFT_NAME(onWillDisplay(event:)); +- (void)onDidDisplayInAppMessage:(OSInAppMessageDidDisplayEvent *_Nonnull)event +NS_SWIFT_NAME(onDidDisplay(event:)); +- (void)onWillDismissInAppMessage:(OSInAppMessageWillDismissEvent *_Nonnull)event +NS_SWIFT_NAME(onWillDismiss(event:)); +- (void)onDidDismissInAppMessage:(OSInAppMessageDidDismissEvent *_Nonnull)event +NS_SWIFT_NAME(onDidDismiss(event:)); +@end + +@protocol OSInAppMessages + ++ (void)addTrigger:(NSString * _Nonnull)key withValue:(NSString * _Nonnull)value; ++ (void)addTriggers:(NSDictionary * _Nonnull)triggers; ++ (void)removeTrigger:(NSString * _Nonnull)key; ++ (void)removeTriggers:(NSArray * _Nonnull)keys; ++ (void)clearTriggers; +// Allows Swift users to: OneSignal.InAppMessages.paused = true ++ (BOOL)paused NS_REFINED_FOR_SWIFT; ++ (void)paused:(BOOL)pause NS_REFINED_FOR_SWIFT; + ++ (void)addClickListener:(NSObject *_Nullable)listener NS_REFINED_FOR_SWIFT; ++ (void)removeClickListener:(NSObject *_Nullable)listener NS_REFINED_FOR_SWIFT; ++ (void)addLifecycleListener:(NSObject *_Nullable)listener NS_REFINED_FOR_SWIFT; ++ (void)removeLifecycleListener:(NSObject *_Nullable)listener NS_REFINED_FOR_SWIFT; +@end + +@interface OSStubInAppMessages : NSObject ++ (Class)InAppMessages; +@end diff --git a/iOS_SDK/OneSignalSDK/Source/OSUserStateEmailSynchronizer.h b/iOS_SDK/OneSignalSDK/OneSignalCore/Source/OSLocation.h similarity index 77% rename from iOS_SDK/OneSignalSDK/Source/OSUserStateEmailSynchronizer.h rename to iOS_SDK/OneSignalSDK/OneSignalCore/Source/OSLocation.h index 7b18f4757..a0a1eda40 100644 --- a/iOS_SDK/OneSignalSDK/Source/OSUserStateEmailSynchronizer.h +++ b/iOS_SDK/OneSignalSDK/OneSignalCore/Source/OSLocation.h @@ -1,7 +1,7 @@ /** Modified MIT License -Copyright 2021 OneSignal +Copyright 2023 OneSignal Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -25,11 +25,16 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -#import "OSUserStateSynchronizer.h" - -@interface OSUserStateEmailSynchronizer : OSUserStateSynchronizer - -- (instancetype)initWithEmailSubscriptionState:(OSEmailSubscriptionState *)emailSubscriptionState - withSubcriptionState:(OSSubscriptionState *)subscriptionState; +/** + Public API for the Location namespace. + */ +@protocol OSLocation +// - Request and track user's location ++ (void)requestPermission; ++ (void)setShared:(BOOL)enable NS_REFINED_FOR_SWIFT; ++ (BOOL)isShared NS_REFINED_FOR_SWIFT; +@end +@interface OSStubLocation : NSObject ++ (Class)Location; @end diff --git a/iOS_SDK/OneSignalSDK/OneSignalCore/Source/OSNotification+Internal.h b/iOS_SDK/OneSignalSDK/OneSignalCore/Source/OSNotification+Internal.h index cdc43ea8e..44fc23e87 100644 --- a/iOS_SDK/OneSignalSDK/OneSignalCore/Source/OSNotification+Internal.h +++ b/iOS_SDK/OneSignalSDK/OneSignalCore/Source/OSNotification+Internal.h @@ -25,16 +25,12 @@ * THE SOFTWARE. */ -#import "OSNotificationClasses.h" +#import #ifndef OSNotification_Internal_h #define OSNotification_Internal_h @interface OSNotification(Internal) -+(instancetype _Nonnull )parseWithApns:(nonnull NSDictionary *)message; -- (void)setCompletionBlock:(OSNotificationDisplayResponse _Nonnull)completion; -- (void)startTimeoutTimer; -- (void)complete:(nullable OSNotification *)notification; @end #endif /* OSNotification_Internal_h */ diff --git a/iOS_SDK/OneSignalSDK/OneSignalCore/Source/OSNotification.m b/iOS_SDK/OneSignalSDK/OneSignalCore/Source/OSNotification.m index a31c6ef3f..141b1e85a 100644 --- a/iOS_SDK/OneSignalSDK/OneSignalCore/Source/OSNotification.m +++ b/iOS_SDK/OneSignalSDK/OneSignalCore/Source/OSNotification.m @@ -26,23 +26,12 @@ */ #import - #import - #import "OSNotification+Internal.h" - #import "OSNotification.h" - -#import "OneSignalCommonDefines.h" - -#import "OneSignalUserDefaults.h" - #import "OneSignalLog.h" @implementation OSNotification - - OSNotificationDisplayResponse _completion; - NSTimer *_timeoutTimer; + (instancetype)parseWithApns:(nonnull NSDictionary*)message { if (!message) @@ -63,8 +52,6 @@ - (void)initWithRawMessage:(NSDictionary*)message { [self parseOriginalPayload]; [self parseOtherApnsFields]; - - _timeoutTimer = [NSTimer timerWithTimeInterval:CUSTOM_DISPLAY_TYPE_TIMEOUT target:self selector:@selector(timeoutTimerFired:) userInfo:_notificationId repeats:false]; } // Original OneSignal payload format. @@ -300,34 +287,4 @@ - (NSString *)stringify { return [[NSString alloc] initWithData:jsonData encoding:NSUTF8StringEncoding]; } -#pragma mark willShowInForegroundHandler Methods - -- (void)setCompletionBlock:(OSNotificationDisplayResponse)completion { - _completion = completion; -} - - - (void)complete:(OSNotification *)notification { - [_timeoutTimer invalidate]; - if (_completion) { - _completion(notification); - _completion = nil; - } - } - - - (void)startTimeoutTimer { - [[NSRunLoop currentRunLoop] addTimer:_timeoutTimer forMode:NSRunLoopCommonModes]; - } - - - (void)timeoutTimerFired:(NSTimer *)timer { - [OneSignalLog onesignalLog:ONE_S_LL_ERROR - message:[NSString stringWithFormat:@"Notification willShowInForeground completion timed out. Completion was not called within %f seconds.", CUSTOM_DISPLAY_TYPE_TIMEOUT]]; - [self complete:self]; - } - - - (void)dealloc { - if (_timeoutTimer && _completion) { - [_timeoutTimer invalidate]; - } - } - @end diff --git a/iOS_SDK/OneSignalSDK/OneSignalCore/Source/OSNotificationClasses.h b/iOS_SDK/OneSignalSDK/OneSignalCore/Source/OSNotificationClasses.h index 2d8fed289..dd4a8ce18 100644 --- a/iOS_SDK/OneSignalSDK/OneSignalCore/Source/OSNotificationClasses.h +++ b/iOS_SDK/OneSignalSDK/OneSignalCore/Source/OSNotificationClasses.h @@ -25,7 +25,7 @@ * THE SOFTWARE. */ -#import "OSNotification.h" +#import // Pass in nil means a notification will not display typedef void (^OSNotificationDisplayResponse)(OSNotification* _Nullable notification); @@ -36,20 +36,17 @@ typedef NS_ENUM(NSUInteger, OSNotificationActionType) { OSNotificationActionTypeActionTaken }; -@interface OSNotificationAction : NSObject - -/* The type of the notification action */ -@property(readonly)OSNotificationActionType type; - +@interface OSNotificationClickResult : NSObject /* The ID associated with the button tapped. NULL when the actionType is NotificationTapped */ @property(readonly, nullable)NSString* actionId; +@property(readonly, nullable)NSString* url; @end -@interface OSNotificationOpenedResult : NSObject +@interface OSNotificationClickEvent : NSObject @property(readonly, nonnull)OSNotification* notification; -@property(readonly, nonnull)OSNotificationAction *action; +@property(readonly, nonnull)OSNotificationClickResult *result; /* Convert object into an NSString that can be convertible into a custom Dictionary / JSON Object */ - (NSString* _Nonnull)stringify; diff --git a/iOS_SDK/OneSignalSDK/Source/OSObservable.h b/iOS_SDK/OneSignalSDK/OneSignalCore/Source/OSObservable.h similarity index 80% rename from iOS_SDK/OneSignalSDK/Source/OSObservable.h rename to iOS_SDK/OneSignalSDK/OneSignalCore/Source/OSObservable.h index 7262740fd..117041623 100644 --- a/iOS_SDK/OneSignalSDK/Source/OSObservable.h +++ b/iOS_SDK/OneSignalSDK/OneSignalCore/Source/OSObservable.h @@ -34,10 +34,19 @@ @end @interface OSObservable<__covariant ObserverType, __covariant ObjectType> : NSObject -- (instancetype)initWithChangeSelector:(SEL)selector; +- (instancetype _Nonnull)initWithChangeSelector:(SEL)selector; - (void)addObserver:(ObserverType)observer; - (void)removeObserver:(ObserverType)observer; - (BOOL)notifyChange:(ObjectType)state; @end +// OSBoolObservable is for BOOL states which OSObservable above does not work with + +@interface OSBoolObservable<__covariant ObserverType> : NSObject +- (instancetype _Nonnull)initWithChangeSelector:(SEL)selector; +- (void)addObserver:(ObserverType)observer; +- (void)removeObserver:(ObserverType)observer; +- (BOOL)notifyChange:(BOOL)state; +@end + #endif /* OSObservable_h */ diff --git a/iOS_SDK/OneSignalSDK/Source/OSObservable.m b/iOS_SDK/OneSignalSDK/OneSignalCore/Source/OSObservable.m similarity index 54% rename from iOS_SDK/OneSignalSDK/Source/OSObservable.m rename to iOS_SDK/OneSignalSDK/OneSignalCore/Source/OSObservable.m index a8118e382..fef10c9ce 100644 --- a/iOS_SDK/OneSignalSDK/Source/OSObservable.m +++ b/iOS_SDK/OneSignalSDK/OneSignalCore/Source/OSObservable.m @@ -27,15 +27,14 @@ #import #import "OSObservable.h" - -#import "OneSignalHelper.h" +#import "OneSignalCoreHelper.h" @implementation OSObservable { NSHashTable* observers; SEL changeSelector; } -- (instancetype)initWithChangeSelector:(SEL)selector { +- (instancetype _Nonnull)initWithChangeSelector:(SEL)selector { if (self = [super init]) { observers = [NSHashTable weakObjectsHashTable]; changeSelector = selector; @@ -88,8 +87,81 @@ - (BOOL)notifyChange:(id)state { } - (void)callObserver:(id)observer withSelector:(SEL)selector withState:(id)state { - [OneSignalHelper dispatch_async_on_main_queue:^{ - [observer performSelector:changeSelector withObject:state]; + [OneSignalCoreHelper dispatch_async_on_main_queue:^{ + [observer performSelector:self->changeSelector withObject:state]; + }]; +} + +#pragma clang diagnostic pop + +@end + + +@implementation OSBoolObservable { +NSHashTable* observers; +SEL changeSelector; +} + +- (instancetype _Nonnull)initWithChangeSelector:(SEL)selector { + if (self = [super init]) { + observers = [NSHashTable weakObjectsHashTable]; + changeSelector = selector; + } + return self; +} + +- (instancetype)init { + if (self = [super init]) + observers = [NSHashTable new]; + return self; +} + +- (void)addObserver:(id)observer { + @synchronized(observers) { + [observers addObject:observer]; + } +} + +- (void)removeObserver:(id)observer { + @synchronized(observers) { + [observers removeObject:observer]; + } +} + +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Warc-performSelector-leaks" + +- (BOOL)notifyChange:(BOOL)state { + BOOL fired = false; + + @synchronized(observers) { + NSArray *obs = [observers copy]; + for (id observer in obs) { + fired = true; + if (changeSelector) { + // Any Observable setup to fire a custom selector with changeSelector + // is external to our SDK. Run on the main thread in case the + // app developer needs to update UI elements. + + [self callObserver:observer withSelector:changeSelector withState:state]; + } + } + } + + return fired; +} + +- (void)callObserver:(id)observer withSelector:(SEL)selector withState:(BOOL)state { + [OneSignalCoreHelper dispatch_async_on_main_queue:^{ + // The following declaration is to resolve: Sending 'const BOOL *' (aka 'const bool *') to parameter of type 'void * _Nonnull' discards qualifiers + BOOL boolValue = state; + + NSMethodSignature* signature = [[observer class] instanceMethodSignatureForSelector:self->changeSelector]; + NSInvocation* invocation = [NSInvocation invocationWithMethodSignature:signature]; + [invocation setTarget: observer]; + [invocation setSelector:self->changeSelector]; + [invocation setArgument: &boolValue atIndex: 2]; + [invocation invoke]; }]; } diff --git a/iOS_SDK/OneSignalSDK/OneSignalCore/Source/OSPrivacyConsentController.h b/iOS_SDK/OneSignalSDK/OneSignalCore/Source/OSPrivacyConsentController.h index 37c4f09e6..63f5beb56 100644 --- a/iOS_SDK/OneSignalSDK/OneSignalCore/Source/OSPrivacyConsentController.h +++ b/iOS_SDK/OneSignalSDK/OneSignalCore/Source/OSPrivacyConsentController.h @@ -29,5 +29,7 @@ THE SOFTWARE. @interface OSPrivacyConsentController : NSObject + (BOOL)requiresUserPrivacyConsent; + (void)consentGranted:(BOOL)granted; ++ (BOOL)getPrivacyConsent; + (BOOL)shouldLogMissingPrivacyConsentErrorWithMethodName:(NSString *)methodName; ++ (void)setRequiresPrivacyConsent:(BOOL)required; @end diff --git a/iOS_SDK/OneSignalSDK/OneSignalCore/Source/OSPrivacyConsentController.m b/iOS_SDK/OneSignalSDK/OneSignalCore/Source/OSPrivacyConsentController.m index d8f8e95d2..e1c2a8cdd 100644 --- a/iOS_SDK/OneSignalSDK/OneSignalCore/Source/OSPrivacyConsentController.m +++ b/iOS_SDK/OneSignalSDK/OneSignalCore/Source/OSPrivacyConsentController.m @@ -31,9 +31,24 @@ of this software and associated documentation files (the "Software"), to deal #import "OneSignalUserDefaults.h" #import "OneSignalCommonDefines.h" #import "OneSignalLog.h" +#import "OSRemoteParamController.h" @implementation OSPrivacyConsentController ++ (void)setRequiresPrivacyConsent:(BOOL)required { + OSRemoteParamController *remoteParamController = [OSRemoteParamController sharedController]; + + // Already set by remote params + if ([remoteParamController hasPrivacyConsentKey]) + return; + + if ([self requiresUserPrivacyConsent] && !required) { + [OneSignalLog onesignalLog:ONE_S_LL_ERROR message:@"Cannot change setConsentRequired() from TRUE to FALSE"]; + return; + } + [OneSignalUserDefaults.initShared saveBoolForKey:OSUD_REQUIRES_USER_PRIVACY_CONSENT withValue:required]; +} + + (BOOL)requiresUserPrivacyConsent { BOOL shouldRequireUserConsent = [OneSignalUserDefaults.initShared getSavedBoolForKey:OSUD_REQUIRES_USER_PRIVACY_CONSENT defaultValue:NO]; // if the plist key does not exist default to true @@ -50,6 +65,12 @@ + (void)consentGranted:(BOOL)granted { [OneSignalUserDefaults.initStandard saveBoolForKey:GDPR_CONSENT_GRANTED withValue:granted]; } ++ (BOOL)getPrivacyConsent { + // The default is the inverse of privacy consent required + BOOL defaultValue = ![OneSignalUserDefaults.initShared getSavedBoolForKey:OSUD_REQUIRES_USER_PRIVACY_CONSENT defaultValue:NO]; + return [OneSignalUserDefaults.initStandard getSavedBoolForKey:GDPR_CONSENT_GRANTED defaultValue:defaultValue]; +} + + (BOOL)shouldLogMissingPrivacyConsentErrorWithMethodName:(NSString *)methodName { if ([self requiresUserPrivacyConsent]) { if (methodName) { diff --git a/iOS_SDK/OneSignalSDK/OneSignalCore/Source/OSStubInAppMessages.m b/iOS_SDK/OneSignalSDK/OneSignalCore/Source/OSStubInAppMessages.m new file mode 100644 index 000000000..b15fc8ab2 --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignalCore/Source/OSStubInAppMessages.m @@ -0,0 +1,83 @@ +/* + Modified MIT License + + Copyright 2023 OneSignal + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + 1. The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + 2. All copies of substantial portions of the Software may only be used in connection + with services provided by OneSignal. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + */ + +#import +#import "OSInAppMessages.h" +#import "OneSignalLog.h" + +@implementation OSStubInAppMessages + ++ (Class)InAppMessages { + return self; +} + ++ (void)addClickListener:(NSObject * _Nullable)listener { + [OneSignalLog onesignalLog:ONE_S_LL_ERROR message:@"OneSignalInAppMessages not found. In order to use OneSignal's In App Messaging features the OneSignalInAppMessages module must be added."]; +} + ++ (void)addLifecycleListener:(NSObject * _Nullable)listener { + [OneSignalLog onesignalLog:ONE_S_LL_ERROR message:@"OneSignalInAppMessages not found. In order to use OneSignal's In App Messaging features the OneSignalInAppMessages module must be added."]; +} + ++ (void)addTrigger:(NSString * _Nonnull)key withValue:(NSString * _Nonnull)value { + [OneSignalLog onesignalLog:ONE_S_LL_ERROR message:@"OneSignalInAppMessages not found. In order to use OneSignal's In App Messaging features the OneSignalInAppMessages module must be added."]; +} + ++ (void)addTriggers:(NSDictionary * _Nonnull)triggers { + [OneSignalLog onesignalLog:ONE_S_LL_ERROR message:@"OneSignalInAppMessages not found. In order to use OneSignal's In App Messaging features the OneSignalInAppMessages module must be added."]; +} + ++ (void)clearTriggers { + [OneSignalLog onesignalLog:ONE_S_LL_ERROR message:@"OneSignalInAppMessages not found. In order to use OneSignal's In App Messaging features the OneSignalInAppMessages module must be added."]; +} + ++ (BOOL)paused { + [OneSignalLog onesignalLog:ONE_S_LL_ERROR message:@"OneSignalInAppMessages not found. In order to use OneSignal's In App Messaging features the OneSignalInAppMessages module must be added."]; + return true; +} + ++ (void)paused:(BOOL)pause { + [OneSignalLog onesignalLog:ONE_S_LL_ERROR message:@"OneSignalInAppMessages not found. In order to use OneSignal's In App Messaging features the OneSignalInAppMessages module must be added."]; +} + ++ (void)removeClickListener:(NSObject * _Nullable)listener { + [OneSignalLog onesignalLog:ONE_S_LL_ERROR message:@"OneSignalInAppMessages not found. In order to use OneSignal's In App Messaging features the OneSignalInAppMessages module must be added."]; +} + ++ (void)removeLifecycleListener:(NSObject * _Nullable)listener { + [OneSignalLog onesignalLog:ONE_S_LL_ERROR message:@"OneSignalInAppMessages not found. In order to use OneSignal's In App Messaging features the OneSignalInAppMessages module must be added."]; +} + ++ (void)removeTrigger:(NSString * _Nonnull)key { + [OneSignalLog onesignalLog:ONE_S_LL_ERROR message:@"OneSignalInAppMessages not found. In order to use OneSignal's In App Messaging features the OneSignalInAppMessages module must be added."]; +} + ++ (void)removeTriggers:(NSArray * _Nonnull)keys { + [OneSignalLog onesignalLog:ONE_S_LL_ERROR message:@"OneSignalInAppMessages not found. In order to use OneSignal's In App Messaging features the OneSignalInAppMessages module must be added."]; +} + +@end diff --git a/iOS_SDK/OneSignalSDK/OneSignalCore/Source/OSStubLocation.m b/iOS_SDK/OneSignalSDK/OneSignalCore/Source/OSStubLocation.m new file mode 100644 index 000000000..e04faf84e --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignalCore/Source/OSStubLocation.m @@ -0,0 +1,51 @@ +/* + Modified MIT License + + Copyright 2023 OneSignal + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + 1. The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + 2. All copies of substantial portions of the Software may only be used in connection + with services provided by OneSignal. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + */ + +#import +#import "OneSignalLog.h" +#import "OSLocation.h" + +@implementation OSStubLocation + ++ (Class)Location { + return self; +} + ++ (BOOL)isShared { + [OneSignalLog onesignalLog:ONE_S_LL_ERROR message:@"OneSignalLocation not found. In order to use OneSignal's location features the OneSignalLocation module must be added."]; + return false; +} + ++ (void)requestPermission { + [OneSignalLog onesignalLog:ONE_S_LL_ERROR message:@"OneSignalLocation not found. In order to use OneSignal's location features the OneSignalLocation module must be added."]; +} + ++ (void)setShared:(BOOL)enable { + [OneSignalLog onesignalLog:ONE_S_LL_ERROR message:@"OneSignalLocation not found. In order to use OneSignal's location features the OneSignalLocation module must be added."]; +} + +@end diff --git a/iOS_SDK/OneSignalSDK/OneSignalCore/Source/OneSignalCommonDefines.h b/iOS_SDK/OneSignalSDK/OneSignalCore/Source/OneSignalCommonDefines.h index d0d496869..ca7256cdf 100644 --- a/iOS_SDK/OneSignalSDK/OneSignalCore/Source/OneSignalCommonDefines.h +++ b/iOS_SDK/OneSignalSDK/OneSignalCore/Source/OneSignalCommonDefines.h @@ -46,7 +46,7 @@ // "*" in comment line ending comment means the string value has not been changed // App -#define ONESIGNAL_VERSION @"031207" +#define ONESIGNAL_VERSION @"050002" #define OSUD_APP_ID @"GT_APP_ID" // * OSUD_APP_ID #define OSUD_REGISTERED_WITH_APPLE @"GT_REGISTERED_WITH_APPLE" // * OSUD_REGISTERED_WITH_APPLE @@ -65,30 +65,14 @@ #define OSUD_PERMISSION_EPHEMERAL_FROM @"OSUD_PERMISSION_EPHEMERAL_FROM" // * OSUD_PERMISSION_EPHEMERAL_FROM #define OSUD_LANGUAGE @"OSUD_LANGUAGE" // * OSUD_LANGUAGE #define DEFAULT_LANGUAGE @"en" // * OSUD_LANGUAGE -// Player -#define OSUD_EXTERNAL_USER_ID @"OS_EXTERNAL_USER_ID" // * OSUD_EXTERNAL_USER_ID -#define OSUD_PLAYER_ID_TO @"GT_PLAYER_ID" // * OSUD_PLAYER_ID_TO -#define OSUD_PLAYER_ID_FROM @"GT_PLAYER_ID_LAST" // * OSUD_PLAYER_ID_FROM -#define OSUD_PUSH_TOKEN_TO @"GT_DEVICE_TOKEN" // * OSUD_PUSH_TOKEN_TO -#define OSUD_PUSH_TOKEN_FROM @"GT_DEVICE_TOKEN_LAST" // * OSUD_PUSH_TOKEN_FROM -#define OSUD_USER_SUBSCRIPTION_TO @"ONESIGNAL_SUBSCRIPTION" // * OSUD_USER_SUBSCRIPTION_TO -#define OSUD_USER_SUBSCRIPTION_FROM @"ONESIGNAL_SUBSCRIPTION_SETTING" // * OSUD_USER_SUBSCRIPTION_FROM -#define OSUD_EXTERNAL_ID_AUTH_CODE @"OSUD_EXTERNAL_ID_AUTH_CODE" -// Email -#define OSUD_EMAIL_ADDRESS @"EMAIL_ADDRESS" // * OSUD_EMAIL_ADDRESS -#define OSUD_EMAIL_PLAYER_ID @"GT_EMAIL_PLAYER_ID" // * OSUD_EMAIL_PLAYER_ID -#define OSUD_EMAIL_EXTERNAL_USER_ID @"OSUD_EMAIL_EXTERNAL_USER_ID" // OSUD_EMAIL_EXTERNAL_USER_ID -#define OSUD_REQUIRE_EMAIL_AUTH @"GT_REQUIRE_EMAIL_AUTH" // * OSUD_REQUIRE_EMAIL_AUTH -#define OSUD_EMAIL_AUTH_CODE @"GT_EMAIL_AUTH_CODE" // * OSUD_EMAIL_AUTH_CODE -// SMS -#define OSUD_SMS_NUMBER @"OSUD_SMS_NUMBER" -#define OSUD_SMS_PLAYER_ID @"OSUD_SMS_PLAYER_ID" -#define OSUD_SMS_EXTERNAL_USER_ID @"OSUD_SMS_EXTERNAL_USER_ID" -#define OSUD_REQUIRE_SMS_AUTH @"OSUD_REQUIRE_SMS_AUTH" -#define OSUD_SMS_AUTH_CODE @"OSUD_SMS_AUTH_CODE" + +/* Push Subscription */ +#define OSUD_LEGACY_PLAYER_ID @"GT_PLAYER_ID" // The legacy player ID from SDKs prior to 5.x.x +#define OSUD_PUSH_SUBSCRIPTION_ID @"OSUD_PUSH_SUBSCRIPTION_ID" +#define OSUD_PUSH_TOKEN @"GT_DEVICE_TOKEN" + // Notification #define OSUD_LAST_MESSAGE_OPENED @"GT_LAST_MESSAGE_OPENED_" // * OSUD_MOST_RECENT_NOTIFICATION_OPENED -#define OSUD_NOTIFICATION_OPEN_LAUNCH_URL @"ONESIGNAL_INAPP_LAUNCH_URL" // * OSUD_NOTIFICATION_OPEN_LAUNCH_URL #define OSUD_TEMP_CACHED_NOTIFICATION_MEDIA @"OSUD_TEMP_CACHED_NOTIFICATION_MEDIA" // OSUD_TEMP_CACHED_NOTIFICATION_MEDIA // Remote Params #define OSUD_LOCATION_ENABLED @"OSUD_LOCATION_ENABLED" @@ -118,8 +102,6 @@ #define OSUD_APP_LAST_CLOSED_TIME @"GT_LAST_CLOSED_TIME" // * OSUD_APP_LAST_CLOSED_TIME #define OSUD_UNSENT_ACTIVE_TIME @"GT_UNSENT_ACTIVE_TIME" // * OSUD_UNSENT_ACTIVE_TIME #define OSUD_UNSENT_ACTIVE_TIME_ATTRIBUTED @"GT_UNSENT_ACTIVE_TIME_ATTRIBUTED" // * OSUD_UNSENT_ACTIVE_TIME_ATTRIBUTED -#define OSUD_PLAYER_TAGS @"OSUD_PLAYER_TAGS" - // * OSUD_PLAYER_TAGS // Deprecated Selectors #define DEPRECATED_SELECTORS @[ @"application:didReceiveLocalNotification:", \ @@ -172,6 +154,7 @@ // APNS params #define ONESIGNAL_IAM_PREVIEW @"os_in_app_message_preview_id" +#define ONESIGNAL_POST_PREVIEW_IAM @"ONESIGNAL_POST_PREVIEW_IAM" #define ONESIGNAL_SUPPORTED_ATTACHMENT_TYPES @[@"aiff", @"wav", @"mp3", @"mp4", @"jpg", @"jpeg", @"png", @"gif", @"mpeg", @"mpg", @"avi", @"m4a", @"m4v"] @@ -200,6 +183,15 @@ typedef enum {BACKGROUND, END_SESSION} FocusEventType; typedef enum {ATTRIBUTED, NOT_ATTRIBUTED} FocusAttributionState; #define focusAttributionStateString(enum) [@[@"ATTRIBUTED", @"NOT_ATTRIBUTED"] objectAtIndex:enum] +// OneSignal Background Task Identifiers +#define ATTRIBUTED_FOCUS_TASK @"ATTRIBUTED_FOCUS_TASK" +#define UNATTRIBUTED_FOCUS_TASK @"UNATTRIBUTED_FOCUS_TASK" +#define SEND_SESSION_TIME_TO_USER_TASK @"SEND_SESSION_TIME_TO_USER_TASK" +#define OPERATION_REPO_BACKGROUND_TASK @"OPERATION_REPO_BACKGROUND_TASK" +#define IDENTITY_EXECUTOR_BACKGROUND_TASK @"IDENTITY_EXECUTOR_BACKGROUND_TASK_" +#define PROPERTIES_EXECUTOR_BACKGROUND_TASK @"PROPERTIES_EXECUTOR_BACKGROUND_TASK_" +#define SUBSCRIPTION_EXECUTOR_BACKGROUND_TASK @"SUBSCRIPTION_EXECUTOR_BACKGROUND_TASK_" + // OneSignal constants #define OS_PUSH @"push" #define OS_EMAIL @"email" @@ -209,8 +201,8 @@ typedef enum {ATTRIBUTED, NOT_ATTRIBUTED} FocusAttributionState; #define OS_CHANNELS @[OS_PUSH, OS_EMAIL, OS_SMS] // OneSignal API Client Defines -typedef enum {GET, POST, HEAD, PUT, DELETE, OPTIONS, CONNECT, TRACE} HTTPMethod; -#define OS_API_CLIENT_STRINGS @[@"GET", @"POST", @"HEAD", @"PUT", @"DELETE", @"OPTIONS", @"CONNECT", @"TRACE"] +typedef enum {GET, POST, HEAD, PUT, DELETE, OPTIONS, CONNECT, TRACE, PATCH} HTTPMethod; +#define OS_API_CLIENT_STRINGS @[@"GET", @"POST", @"HEAD", @"PUT", @"DELETE", @"OPTIONS", @"CONNECT", @"TRACE", @"PATCH"] #define httpMethodString(enum) [OS_API_CLIENT_STRINGS objectAtIndex:enum] // Notification types @@ -233,13 +225,6 @@ typedef enum {GET, POST, HEAD, PUT, DELETE, OPTIONS, CONNECT, TRACE} HTTPMethod; // 1 week in seconds #define WEEK_IN_SECONDS 604800.0 -// Registration delay -#define REGISTRATION_DELAY_SECONDS 30.0 - -// How long the SDK will wait for APNS to respond -// before registering the user anyways -#define APNS_TIMEOUT 25.0 - // The SDK saves a list of category ID's allowing multiple notifications // to have their own unique buttons/etc. #define SHARED_CATEGORY_LIST @"com.onesignal.shared_registered_categories" @@ -253,13 +238,10 @@ typedef enum {GET, POST, HEAD, PUT, DELETE, OPTIONS, CONNECT, TRACE} HTTPMethod; #ifndef OS_TEST // OneSignal API Client Defines - #define REATTEMPT_DELAY 30.0 + #define REATTEMPT_DELAY 5.0 #define REQUEST_TIMEOUT_REQUEST 120.0 //for most HTTP requests #define REQUEST_TIMEOUT_RESOURCE 120.0 //for loading a resource like an image - #define MAX_ATTEMPT_COUNT 3 - - // Send tags batch delay - #define SEND_TAGS_DELAY 5.0 + #define MAX_ATTEMPT_COUNT 5 // the max number of UNNotificationCategory ID's the SDK will register #define MAX_CATEGORIES_SIZE 128 @@ -276,9 +258,6 @@ typedef enum {GET, POST, HEAD, PUT, DELETE, OPTIONS, CONNECT, TRACE} HTTPMethod; #define REQUEST_TIMEOUT_RESOURCE 0.02 //for loading a resource like an image #define MAX_ATTEMPT_COUNT 3 - // Send tags batch delay - #define SEND_TAGS_DELAY 0.005 - // the max number of UNNotificationCategory ID's the SDK will register #define MAX_CATEGORIES_SIZE 5 @@ -301,4 +280,52 @@ typedef enum {GET, POST, HEAD, PUT, DELETE, OPTIONS, CONNECT, TRACE} HTTPMethod; #define MAX_NOTIFICATION_MEDIA_SIZE_BYTES 50000000 +#pragma mark User Model + +#define OS_ONESIGNAL_ID @"onesignal_id" +#define OS_EXTERNAL_ID @"external_id" + +#define OS_ON_USER_WILL_CHANGE @"OS_ON_USER_WILL_CHANGE" + +// Models and Model Stores +#define OS_IDENTITY_MODEL_KEY @"OS_IDENTITY_MODEL_KEY" +#define OS_IDENTITY_MODEL_STORE_KEY @"OS_IDENTITY_MODEL_STORE_KEY" +#define OS_PROPERTIES_MODEL_KEY @"OS_PROPERTIES_MODEL_KEY" +#define OS_PROPERTIES_MODEL_STORE_KEY @"OS_PROPERTIES_MODEL_STORE_KEY" +#define OS_PUSH_SUBSCRIPTION_MODEL_KEY @"OS_PUSH_SUBSCRIPTION_MODEL_KEY" +#define OS_PUSH_SUBSCRIPTION_MODEL_STORE_KEY @"OS_PUSH_SUBSCRIPTION_MODEL_STORE_KEY" +#define OS_SUBSCRIPTION_MODEL_STORE_KEY @"OS_SUBSCRIPTION_MODEL_STORE_KEY" + +// Deltas +#define OS_ADD_ALIAS_DELTA @"OS_ADD_ALIAS_DELTA" +#define OS_REMOVE_ALIAS_DELTA @"OS_REMOVE_ALIAS_DELTA" + +#define OS_UPDATE_PROPERTIES_DELTA @"OS_UPDATE_PROPERTIES_DELTA" + +#define OS_ADD_SUBSCRIPTION_DELTA @"OS_ADD_SUBSCRIPTION_DELTA" +#define OS_REMOVE_SUBSCRIPTION_DELTA @"OS_REMOVE_SUBSCRIPTION_DELTA" +#define OS_UPDATE_SUBSCRIPTION_DELTA @"OS_UPDATE_SUBSCRIPTION_DELTA" + +// Operation Repo +#define OS_OPERATION_REPO_DELTA_QUEUE_KEY @"OS_OPERATION_REPO_DELTA_QUEUE_KEY" + +// User Executor +#define OS_USER_EXECUTOR_USER_REQUEST_QUEUE_KEY @"OS_USER_EXECUTOR_USER_REQUEST_QUEUE_KEY" +#define OS_USER_EXECUTOR_TRANSFER_SUBSCRIPTION_REQUEST_QUEUE_KEY @"OS_USER_EXECUTOR_TRANSFER_SUBSCRIPTION_REQUEST_QUEUE_KEY" + +// Identity Executor +#define OS_IDENTITY_EXECUTOR_DELTA_QUEUE_KEY @"OS_IDENTITY_EXECUTOR_DELTA_QUEUE_KEY" +#define OS_IDENTITY_EXECUTOR_ADD_REQUEST_QUEUE_KEY @"OS_IDENTITY_EXECUTOR_ADD_REQUEST_QUEUE_KEY" +#define OS_IDENTITY_EXECUTOR_REMOVE_REQUEST_QUEUE_KEY @"OS_IDENTITY_EXECUTOR_REMOVE_REQUEST_QUEUE_KEY" + +// Property Executor +#define OS_PROPERTIES_EXECUTOR_DELTA_QUEUE_KEY @"OS_PROPERTIES_EXECUTOR_DELTA_QUEUE_KEY" +#define OS_PROPERTIES_EXECUTOR_UPDATE_REQUEST_QUEUE_KEY @"OS_PROPERTIES_EXECUTOR_UPDATE_REQUEST_QUEUE_KEY" + +// Subscription Executor +#define OS_SUBSCRIPTION_EXECUTOR_DELTA_QUEUE_KEY @"OS_SUBSCRIPTION_EXECUTOR_DELTA_QUEUE_KEY" +#define OS_SUBSCRIPTION_EXECUTOR_ADD_REQUEST_QUEUE_KEY @"OS_SUBSCRIPTION_EXECUTOR_ADD_REQUEST_QUEUE_KEY" +#define OS_SUBSCRIPTION_EXECUTOR_REMOVE_REQUEST_QUEUE_KEY @"OS_SUBSCRIPTION_EXECUTOR_REMOVE_REQUEST_QUEUE_KEY" +#define OS_SUBSCRIPTION_EXECUTOR_UPDATE_REQUEST_QUEUE_KEY @"OS_SUBSCRIPTION_EXECUTOR_UPDATE_REQUEST_QUEUE_KEY" + #endif /* OneSignalCommonDefines_h */ diff --git a/iOS_SDK/OneSignalSDK/OneSignalCore/Source/OneSignalConfigManager.h b/iOS_SDK/OneSignalSDK/OneSignalCore/Source/OneSignalConfigManager.h new file mode 100644 index 000000000..481b16eee --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignalCore/Source/OneSignalConfigManager.h @@ -0,0 +1,36 @@ +/* + Modified MIT License + + Copyright 2022 OneSignal + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + 1. The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + 2. All copies of substantial portions of the Software may only be used in connection + with services provided by OneSignal. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + */ + +#import + +@interface OneSignalConfigManager : NSObject + ++ (void)setAppId:(NSString *)appId; ++ (NSString *_Nullable)getAppId; ++ (BOOL)shouldAwaitAppIdAndLogMissingPrivacyConsentForMethod:(NSString *)methodName; + +@end diff --git a/iOS_SDK/OneSignalSDK/OneSignalCore/Source/OneSignalConfigManager.m b/iOS_SDK/OneSignalSDK/OneSignalCore/Source/OneSignalConfigManager.m new file mode 100644 index 000000000..41060e347 --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignalCore/Source/OneSignalConfigManager.m @@ -0,0 +1,56 @@ +/* + Modified MIT License + + Copyright 2022 OneSignal + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + 1. The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + 2. All copies of substantial portions of the Software may only be used in connection + with services provided by OneSignal. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + */ + +#import "OneSignalConfigManager.h" +#import "OSPrivacyConsentController.h" +#import "OneSignalLog.h" + +@implementation OneSignalConfigManager + +static NSString *_appId; ++ (void)setAppId:(NSString *)appId { + _appId = appId; +} ++ (NSString *_Nullable)getAppId { + return _appId; +} + ++ (BOOL)shouldAwaitAppIdAndLogMissingPrivacyConsentForMethod:(NSString *)methodName { + BOOL shouldAwait = false; + if (!_appId) { + if (methodName) { + [OneSignalLog onesignalLog:ONE_S_LL_WARN message:[NSString stringWithFormat:@"Your application has called %@ before app ID has been set. Please call `initialize:appId withLaunchOptions:launchOptions` in order to set the app ID", methodName]]; + } + shouldAwait = true; + } + if ([OSPrivacyConsentController shouldLogMissingPrivacyConsentErrorWithMethodName:methodName]) { + shouldAwait = true; + } + return shouldAwait; +} + +@end diff --git a/iOS_SDK/OneSignalSDK/OneSignalCore/Source/OneSignalCore.h b/iOS_SDK/OneSignalSDK/OneSignalCore/Source/OneSignalCore.h index 5d7cc7c88..966ea8fdc 100644 --- a/iOS_SDK/OneSignalSDK/OneSignalCore/Source/OneSignalCore.h +++ b/iOS_SDK/OneSignalSDK/OneSignalCore/Source/OneSignalCore.h @@ -27,24 +27,32 @@ #pragma clang diagnostic ignored "-Wnullability-completeness" #import -#import "OneSignalUserDefaults.h" -#import "OneSignalCommonDefines.h" -#import "OSNotification.h" -#import "OSNotification+Internal.h" -#import "OSNotificationClasses.h" -#import "OneSignalLog.h" -#import "NSURL+OneSignal.h" -#import "NSString+OneSignal.h" -#import "OSRequests.h" -#import "OneSignalRequest.h" -#import "OneSignalClient.h" -#import "OneSignalCoreHelper.h" -#import "OneSignalTrackFirebaseAnalytics.h" -#import "OSMacros.h" -#import "OSJSONHandling.h" -#import "OSPrivacyConsentController.h" - -@interface OneSignalCore : NSObject - -@end - +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import diff --git a/iOS_SDK/OneSignalSDK/OneSignalCore/Source/OneSignalCoreHelper.h b/iOS_SDK/OneSignalSDK/OneSignalCore/Source/OneSignalCoreHelper.h index 2a95e9c38..9194ead16 100644 --- a/iOS_SDK/OneSignalSDK/OneSignalCore/Source/OneSignalCoreHelper.h +++ b/iOS_SDK/OneSignalSDK/OneSignalCore/Source/OneSignalCoreHelper.h @@ -25,6 +25,7 @@ * THE SOFTWARE. */ +#import @interface OneSignalCoreHelper : NSObject #pragma clang diagnostic ignored "-Wstrict-prototypes" #pragma clang diagnostic ignored "-Wnullability-completeness" @@ -37,4 +38,33 @@ + (NSString*)hashUsingSha1:(NSString*)string; + (NSString*)hashUsingMD5:(NSString*)string; + (NSString*)trimURLSpacing:(NSString*)url; ++ (NSString*)parseNSErrorAsJsonString:(NSError*)error; ++ (BOOL)isOneSignalPayload:(NSDictionary *)payload; ++ (NSMutableDictionary*) formatApsPayloadIntoStandard:(NSDictionary*)remoteUserInfo identifier:(NSString*)identifier; ++ (BOOL)isRemoteSilentNotification:(NSDictionary*)msg; ++ (BOOL)isDisplayableNotification:(NSDictionary*)msg; ++ (NSString*)randomStringWithLength:(int)length; ++ (BOOL)verifyURL:(NSString *)urlString; ++ (BOOL)isWWWScheme:(NSURL*)url; + +// For NSInvocations. Use this when wanting to performSelector with more than 2 arguments ++(void)callSelector:(SEL)selector onObject:(id)object withArgs:(NSArray*)args; +// For NSInvocations. Use this when wanting to performSelector with a boolean argument ++(void)callSelector:(SEL)selector onObject:(id)object withArg:(BOOL)arg; +/* + A simplified enum for UIDeviceOrientation with just invalid, portrait, and landscape + */ +typedef NS_ENUM(NSInteger, ViewOrientation) { + OrientationInvalid, + OrientationPortrait, + OrientationLandscape, +}; + ++ (ViewOrientation)validateOrientation:(UIDeviceOrientation)orientation; + ++ (CGFloat)sizeToScale:(float)size; + ++ (CGRect)getScreenBounds; + ++ (float)getScreenScale; @end diff --git a/iOS_SDK/OneSignalSDK/OneSignalCore/Source/OneSignalCoreHelper.m b/iOS_SDK/OneSignalSDK/OneSignalCore/Source/OneSignalCoreHelper.m index 5a1c1718f..963879d28 100644 --- a/iOS_SDK/OneSignalSDK/OneSignalCore/Source/OneSignalCoreHelper.m +++ b/iOS_SDK/OneSignalSDK/OneSignalCore/Source/OneSignalCoreHelper.m @@ -285,4 +285,192 @@ + (NSString*)trimURLSpacing:(NSString*)url { return [url stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceCharacterSet]]; } ++ (NSString*)parseNSErrorAsJsonString:(NSError*)error { + NSString* jsonResponse; + + if (error.userInfo && error.userInfo[@"returned"]) { + @try { + NSData* jsonData = [NSJSONSerialization dataWithJSONObject:error.userInfo[@"returned"] options:0 error:nil]; + jsonResponse = [[NSString alloc] initWithData:jsonData encoding:NSUTF8StringEncoding]; + } @catch(NSException* e) { + jsonResponse = @"{\"error\": \"Unknown error parsing error response.\"}"; + } + } + else + jsonResponse = @"{\"error\": \"HTTP no response error\"}"; + + return jsonResponse; +} + +// Prevent the OSNotification blocks from firing if we receive a Non-OneSignal remote push ++ (BOOL)isOneSignalPayload:(NSDictionary *)payload { + if (!payload) + return NO; + return payload[@"custom"][@"i"] || payload[@"os_data"][@"i"]; +} + + ++ (NSMutableDictionary*)formatApsPayloadIntoStandard:(NSDictionary*)remoteUserInfo identifier:(NSString*)identifier { + NSMutableDictionary* userInfo, *customDict, *additionalData, *optionsDict; + BOOL is2dot4Format = false; + + if (remoteUserInfo[@"os_data"]) { + userInfo = [remoteUserInfo mutableCopy]; + additionalData = [NSMutableDictionary dictionary]; + + if (remoteUserInfo[@"os_data"][@"buttons"]) { + + is2dot4Format = [userInfo[@"os_data"][@"buttons"] isKindOfClass:[NSArray class]]; + if (is2dot4Format) + optionsDict = userInfo[@"os_data"][@"buttons"]; + else + optionsDict = userInfo[@"os_data"][@"buttons"][@"o"]; + } + } + else if (remoteUserInfo[@"custom"]) { + userInfo = [remoteUserInfo mutableCopy]; + customDict = [userInfo[@"custom"] mutableCopy]; + if (customDict[@"a"]) + additionalData = [[NSMutableDictionary alloc] initWithDictionary:customDict[@"a"]]; + else + additionalData = [[NSMutableDictionary alloc] init]; + optionsDict = userInfo[@"o"]; + } + else { + return nil; + } + + if (optionsDict) { + NSMutableArray* buttonArray = [[NSMutableArray alloc] init]; + for (NSDictionary* button in optionsDict) { + [buttonArray addObject: @{@"text" : button[@"n"], + @"id" : (button[@"i"] ? button[@"i"] : button[@"n"])}]; + } + additionalData[@"actionButtons"] = buttonArray; + } + + if (![@"com.apple.UNNotificationDefaultActionIdentifier" isEqualToString:identifier]) + additionalData[@"actionSelected"] = identifier; + + if ([additionalData count] == 0) + additionalData = nil; + else if (remoteUserInfo[@"os_data"]) { + [userInfo addEntriesFromDictionary:additionalData]; + if (!is2dot4Format && userInfo[@"os_data"][@"buttons"]) + userInfo[@"aps"] = @{@"alert" : userInfo[@"os_data"][@"buttons"][@"m"]}; + } + + else { + customDict[@"a"] = additionalData; + userInfo[@"custom"] = customDict; + + if (userInfo[@"m"]) + userInfo[@"aps"] = @{@"alert" : userInfo[@"m"]}; + } + + return userInfo; +} + ++ (BOOL)isDisplayableNotification:(NSDictionary*)msg { + if ([self isRemoteSilentNotification:msg]) { + return false; + } + return msg[@"aps"][@"alert"] != nil; +} + ++ (BOOL)isRemoteSilentNotification:(NSDictionary*)msg { + //no alert, sound, or badge payload + if(msg[@"badge"] || msg[@"aps"][@"badge"] || msg[@"m"] || msg[@"o"] || msg[@"s"] || (msg[@"title"] && [msg[@"title"] length] > 0) || msg[@"sound"] || msg[@"aps"][@"sound"] || msg[@"aps"][@"alert"] || msg[@"os_data"][@"buttons"]) + return false; + return true; +} + ++ (NSString *)randomStringWithLength:(int)length { + NSString * letters = @"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"; + NSMutableString *randomString = [[NSMutableString alloc] initWithCapacity:length]; + for(int i = 0; i < length; i++) { + uint32_t ln = (uint32_t)letters.length; + uint32_t rand = arc4random_uniform(ln); + [randomString appendFormat:@"%C", [letters characterAtIndex:rand]]; + } + return randomString; +} + ++ (BOOL)verifyURL:(NSString *)urlString { + if (urlString) { + NSURL* url = [NSURL URLWithString:urlString]; + if (url) + return YES; + } + + return NO; +} + ++ (BOOL)isWWWScheme:(NSURL*)url { + NSString* urlScheme = [url.scheme lowercaseString]; + return [urlScheme isEqualToString:@"http"] || [urlScheme isEqualToString:@"https"]; +} + ++(void)callSelector:(SEL)selector onObject:(id)object withArg:(BOOL)arg { + NSMethodSignature *methodSignature = [object methodSignatureForSelector:selector]; + NSInvocation *invocation = [NSInvocation invocationWithMethodSignature:methodSignature]; + [invocation setSelector:selector]; + [invocation setTarget:object]; + [invocation setArgument:&arg atIndex:2]; + [invocation invoke]; +} + ++(void)callSelector:(SEL)selector + onObject:(id)object + withArgs:(NSArray*)args { + NSMethodSignature *methodSignature = [object methodSignatureForSelector:selector]; + NSInvocation *invocation = [NSInvocation invocationWithMethodSignature:methodSignature]; + [invocation setSelector:selector]; + [invocation setTarget:object]; + for(int i = 0; i < methodSignature.numberOfArguments - 2; i++) { + id argv = [args objectAtIndex:i]; + [invocation setArgument:&argv atIndex:i + 2]; + } + + [invocation invoke]; +} + +/* + Given a UIDeviceOrientation return the custom enum ViewOrientation + */ ++ (ViewOrientation)validateOrientation:(UIDeviceOrientation)orientation { + if (UIDeviceOrientationIsPortrait(orientation)) + return OrientationPortrait; + else if (UIDeviceOrientationIsLandscape(orientation)) + return OrientationLandscape; + + return OrientationInvalid; +} + +/* + Given a float convert it to the phone scaled CGFloat + Multiplies float by iPhones scale value + */ ++ (CGFloat)sizeToScale:(float)size { + float scale = [self getScreenScale]; + return (CGFloat) (size * scale); +} + +/* + Get currentDevice screen bounds + Contains point of origin (x, y) and the size (height, width) of the screen + Changes in regards to the phones current orientation + */ ++ (CGRect)getScreenBounds { + return UIScreen.mainScreen.bounds; +} + +/* + Get currentDevice screen scale + Important for specific constraints so that phones of different resolution scale properly + */ ++ (float)getScreenScale { + return UIScreen.mainScreen.scale; +} + @end diff --git a/iOS_SDK/OneSignalSDK/OneSignalCore/Source/OneSignalLog.h b/iOS_SDK/OneSignalSDK/OneSignalCore/Source/OneSignalLog.h index 7f776f5fb..d5e72bcbe 100644 --- a/iOS_SDK/OneSignalSDK/OneSignalCore/Source/OneSignalLog.h +++ b/iOS_SDK/OneSignalSDK/OneSignalCore/Source/OneSignalLog.h @@ -26,8 +26,6 @@ */ #import -@interface OneSignalLog : NSObject -#pragma mark Logging typedef NS_ENUM(NSUInteger, ONE_S_LOG_LEVEL) { ONE_S_LL_NONE, ONE_S_LL_FATAL, @@ -38,8 +36,13 @@ typedef NS_ENUM(NSUInteger, ONE_S_LOG_LEVEL) { ONE_S_LL_VERBOSE }; +@protocol OSDebug + (void)setLogLevel:(ONE_S_LOG_LEVEL)logLevel; -+ (ONE_S_LOG_LEVEL)getLogLevel; -+ (void)onesignalLog:(ONE_S_LOG_LEVEL)logLevel message:(NSString* _Nonnull)message; ++ (void)setAlertLevel:(ONE_S_LOG_LEVEL)logLevel NS_REFINED_FOR_SWIFT; +@end +@interface OneSignalLog : NSObject ++ (Class)Debug; ++ (void)onesignalLog:(ONE_S_LOG_LEVEL)logLevel message:(NSString* _Nonnull)message; ++ (ONE_S_LOG_LEVEL)getLogLevel; @end diff --git a/iOS_SDK/OneSignalSDK/OneSignalCore/Source/OneSignalLog.m b/iOS_SDK/OneSignalSDK/OneSignalCore/Source/OneSignalLog.m index 600d30e98..0a840128b 100644 --- a/iOS_SDK/OneSignalSDK/OneSignalCore/Source/OneSignalLog.m +++ b/iOS_SDK/OneSignalSDK/OneSignalCore/Source/OneSignalLog.m @@ -27,25 +27,31 @@ #import #import "OneSignalLog.h" +#import "OSDialogInstanceManager.h" @implementation OneSignalLog static ONE_S_LOG_LEVEL _nsLogLevel = ONE_S_LL_WARN; +static ONE_S_LOG_LEVEL _alertLogLevel = ONE_S_LL_NONE; + ++ (Class)Debug { + return self; +} + (void)setLogLevel:(ONE_S_LOG_LEVEL)nsLogLevel { _nsLogLevel = nsLogLevel; } -+ (ONE_S_LOG_LEVEL)getLogLevel { - return _nsLogLevel; ++ (void)setAlertLevel:(ONE_S_LOG_LEVEL)logLevel { + _alertLogLevel = logLevel; } -+ (void) onesignal_Log:(ONE_S_LOG_LEVEL)logLevel message:(NSString*) message { ++ (void)onesignalLog:(ONE_S_LOG_LEVEL)logLevel message:(NSString* _Nonnull)message { onesignal_Log(logLevel, message); } -+ (void)onesignalLog:(ONE_S_LOG_LEVEL)logLevel message:(NSString* _Nonnull)message { - onesignal_Log(logLevel, message); ++ (ONE_S_LOG_LEVEL)getLogLevel { + return _nsLogLevel; } void onesignal_Log(ONE_S_LOG_LEVEL logLevel, NSString* message) { @@ -76,6 +82,10 @@ void onesignal_Log(ONE_S_LOG_LEVEL logLevel, NSString* message) { if (logLevel <= _nsLogLevel) NSLog(@"%@", [levelString stringByAppendingString:message]); + + if (logLevel <= _alertLogLevel) { + [[OSDialogInstanceManager sharedInstance] presentDialogWithTitle:levelString withMessage:message withActions:nil cancelTitle:NSLocalizedString(@"Close", @"Close button") withActionCompletion:nil]; + } } @end diff --git a/iOS_SDK/OneSignalSDK/Source/OneSignalMobileProvision.h b/iOS_SDK/OneSignalSDK/OneSignalCore/Source/OneSignalMobileProvision.h similarity index 84% rename from iOS_SDK/OneSignalSDK/Source/OneSignalMobileProvision.h rename to iOS_SDK/OneSignalSDK/OneSignalCore/Source/OneSignalMobileProvision.h index 65d6dced1..b040ea114 100644 --- a/iOS_SDK/OneSignalSDK/Source/OneSignalMobileProvision.h +++ b/iOS_SDK/OneSignalSDK/OneSignalCore/Source/OneSignalMobileProvision.h @@ -6,7 +6,7 @@ // Copyright (c) 2013 The Blindsight Corporation. All rights reserved. // Released under the BSD 2-Clause License (see LICENSE) -typedef NS_ENUM(NSInteger, UIApplicationReleaseMode) { +typedef NS_ENUM(NSInteger, OSUIApplicationReleaseMode) { UIApplicationReleaseUnknown, UIApplicationReleaseDev, UIApplicationReleaseAdHoc, @@ -18,6 +18,6 @@ typedef NS_ENUM(NSInteger, UIApplicationReleaseMode) { @interface OneSignalMobileProvision : NSObject -+ (UIApplicationReleaseMode) releaseMode; ++ (OSUIApplicationReleaseMode) releaseMode; @end diff --git a/iOS_SDK/OneSignalSDK/Source/OneSignalMobileProvision.m b/iOS_SDK/OneSignalSDK/OneSignalCore/Source/OneSignalMobileProvision.m similarity index 92% rename from iOS_SDK/OneSignalSDK/Source/OneSignalMobileProvision.m rename to iOS_SDK/OneSignalSDK/OneSignalCore/Source/OneSignalMobileProvision.m index 3f58dc634..61f1aae9c 100644 --- a/iOS_SDK/OneSignalSDK/Source/OneSignalMobileProvision.m +++ b/iOS_SDK/OneSignalSDK/OneSignalCore/Source/OneSignalMobileProvision.m @@ -5,13 +5,10 @@ // Created by kaolin fire on 2013-06-24. // Copyright (c) 2013 The Blindsight Corporation. All rights reserved. // Released under the BSD 2-Clause License (see LICENSE) -#import #import #import "OneSignalMobileProvision.h" -#import "TargetConditionals.h" -#import "OneSignal.h" -#import "OneSignalInternal.h" +#import "OneSignalLog.h" @implementation OneSignalMobileProvision @@ -83,18 +80,18 @@ + (NSDictionary*) getProvision { } + (void)logInvalidProvisionError:(NSString *)message { - [OneSignal onesignalLog:ONE_S_LL_ERROR message:message]; + [OneSignalLog onesignalLog:ONE_S_LL_ERROR message:message]; } -+ (UIApplicationReleaseMode) releaseMode { ++ (OSUIApplicationReleaseMode) releaseMode { NSDictionary *entitlements = nil; NSDictionary *provision = [self getProvision]; if (provision) { - [OneSignal onesignalLog:ONE_S_LL_DEBUG message:[NSString stringWithFormat:@"provision: %@", provision]]; + [OneSignalLog onesignalLog:ONE_S_LL_DEBUG message:[NSString stringWithFormat:@"provision: %@", provision]]; entitlements = [provision objectForKey:@"Entitlements"]; } else - [OneSignal onesignalLog:ONE_S_LL_DEBUG message:@"provision not found"]; + [OneSignalLog onesignalLog:ONE_S_LL_DEBUG message:@"provision not found"]; if (!provision) { // failure to read other than it simply not existing diff --git a/iOS_SDK/OneSignalSDK/OneSignalCore/Source/OneSignalTrackFirebaseAnalytics.h b/iOS_SDK/OneSignalSDK/OneSignalCore/Source/OneSignalTrackFirebaseAnalytics.h index 7cc355975..948541aaf 100644 --- a/iOS_SDK/OneSignalSDK/OneSignalCore/Source/OneSignalTrackFirebaseAnalytics.h +++ b/iOS_SDK/OneSignalSDK/OneSignalCore/Source/OneSignalTrackFirebaseAnalytics.h @@ -26,14 +26,14 @@ */ #import -#import "OSNotificationClasses.h" +#import @interface OneSignalTrackFirebaseAnalytics : NSObject +(BOOL)libraryExists; +(void)init; +(void)updateFromDownloadParams:(NSDictionary*)params; -+(void)trackOpenEvent:(OSNotificationOpenedResult*)results; ++(void)trackOpenEvent:(OSNotificationClickEvent*)event; +(void)trackReceivedEvent:(OSNotification*)notification; +(void)trackInfluenceOpenEvent; @end diff --git a/iOS_SDK/OneSignalSDK/OneSignalCore/Source/OneSignalTrackFirebaseAnalytics.m b/iOS_SDK/OneSignalSDK/OneSignalCore/Source/OneSignalTrackFirebaseAnalytics.m index 6c1416c87..e3d520100 100644 --- a/iOS_SDK/OneSignalSDK/OneSignalCore/Source/OneSignalTrackFirebaseAnalytics.m +++ b/iOS_SDK/OneSignalSDK/OneSignalCore/Source/OneSignalTrackFirebaseAnalytics.m @@ -87,7 +87,7 @@ + (NSString*)getCampaignNameFromNotification:(OSNotification *)notification { return [notification.title substringToIndex:titleLength]; } -+ (void)trackOpenEvent:(OSNotificationOpenedResult*)results { ++ (void)trackOpenEvent:(OSNotificationClickEvent*)event { if (!trackingEnabled) return; @@ -97,8 +97,8 @@ + (void)trackOpenEvent:(OSNotificationOpenedResult*)results { parameters:@{ @"source": @"OneSignal", @"medium": @"notification", - @"notification_id": results.notification.notificationId, - @"campaign": [self getCampaignNameFromNotification:results.notification] + @"notification_id": event.notification.notificationId, + @"campaign": [self getCampaignNameFromNotification:event.notification] }]; } @@ -135,9 +135,10 @@ + (void)trackInfluenceOpenEvent { NSString *campaign = [sharedUserDefaults getSavedStringForKey:ONESIGNAL_FB_LAST_GAF_CAMPAIGN_RECEIVED defaultValue:nil]; NSMutableDictionary *params = [NSMutableDictionary dictionaryWithDictionary:@{ - @"source": @"OneSignal", - @"medium": @"notification" + @"source": @"OneSignal", + @"medium": @"notification" }]; + if (notificationId) { params[@"notification_id"] = notificationId; } @@ -145,7 +146,7 @@ + (void)trackInfluenceOpenEvent { params[@"campaign"] = campaign; } [self logEventWithName:@"os_notification_influence_open" - parameters:params]; + parameters:params]; } @end diff --git a/iOS_SDK/OneSignalSDK/OneSignalCore/Source/OneSignalUserDefaults.m b/iOS_SDK/OneSignalSDK/OneSignalCore/Source/OneSignalUserDefaults.m index 78ba082b1..fb48bacf5 100644 --- a/iOS_SDK/OneSignalSDK/OneSignalCore/Source/OneSignalUserDefaults.m +++ b/iOS_SDK/OneSignalSDK/OneSignalCore/Source/OneSignalUserDefaults.m @@ -31,12 +31,14 @@ @implementation OneSignalUserDefaults : NSObject +// TODO: Revisit if we should use a singletone, not init so much + (OneSignalUserDefaults * _Nonnull)initStandard { OneSignalUserDefaults *instance = [OneSignalUserDefaults new]; instance.userDefaults = [instance getStandardUserDefault]; return instance; } +// TODO: Revisit if we should use a singletone, not init so much + (OneSignalUserDefaults * _Nonnull)initShared { OneSignalUserDefaults *instance = [OneSignalUserDefaults new]; instance.userDefaults = [instance getSharedUserDefault]; diff --git a/iOS_SDK/OneSignalSDK/OneSignalCore/Source/OneSignalWrapper.h b/iOS_SDK/OneSignalSDK/OneSignalCore/Source/OneSignalWrapper.h new file mode 100644 index 000000000..8fbab577d --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignalCore/Source/OneSignalWrapper.h @@ -0,0 +1,38 @@ +/* + Modified MIT License + + Copyright 2023 OneSignal + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + 1. The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + 2. All copies of substantial portions of the Software may only be used in connection + with services provided by OneSignal. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + */ + +#import + +@interface OneSignalWrapper : NSObject + +/* Type of Wrapper SDK such as "unity" */ +@property (class, nullable) NSString* sdkType; + +/* Version of Wrapper SDK in format "xxyyzz" */ +@property (class, nullable) NSString* sdkVersion; + +@end diff --git a/iOS_SDK/OneSignalSDK/OneSignalCore/Source/OneSignalWrapper.m b/iOS_SDK/OneSignalSDK/OneSignalCore/Source/OneSignalWrapper.m new file mode 100644 index 000000000..0a941cfef --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignalCore/Source/OneSignalWrapper.m @@ -0,0 +1,48 @@ +/* + Modified MIT License + + Copyright 2023 OneSignal + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + 1. The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + 2. All copies of substantial portions of the Software may only be used in connection + with services provided by OneSignal. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + */ + +#import "OneSignalWrapper.h" + +@implementation OneSignalWrapper + +static NSString* _sdkType; ++ (NSString*)sdkType { + return _sdkType; +} ++ (void)setSdkType:(NSString*)sdkType { + _sdkType = sdkType; +} + +static NSString* _sdkVersion; ++ (NSString*)sdkVersion { + return _sdkVersion; +} ++ (void)setSdkVersion:(NSString *)sdkVersion { + _sdkVersion = sdkVersion; +} + +@end diff --git a/iOS_SDK/OneSignalSDK/Source/OSRemoteParamController.h b/iOS_SDK/OneSignalSDK/OneSignalCore/Source/RemoteParameters/OSRemoteParamController.h similarity index 97% rename from iOS_SDK/OneSignalSDK/Source/OSRemoteParamController.h rename to iOS_SDK/OneSignalSDK/OneSignalCore/Source/RemoteParameters/OSRemoteParamController.h index 5ef64a8f0..94df375af 100644 --- a/iOS_SDK/OneSignalSDK/Source/OSRemoteParamController.h +++ b/iOS_SDK/OneSignalSDK/OneSignalCore/Source/RemoteParameters/OSRemoteParamController.h @@ -30,6 +30,8 @@ THE SOFTWARE. @interface OSRemoteParamController : NSObject ++ (OSRemoteParamController *)sharedController; + @property (strong, nonatomic, readonly, nonnull) NSDictionary *remoteParams; - (void)saveRemoteParams:(NSDictionary *_Nonnull)params; diff --git a/iOS_SDK/OneSignalSDK/Source/OSRemoteParamController.m b/iOS_SDK/OneSignalSDK/OneSignalCore/Source/RemoteParameters/OSRemoteParamController.m similarity index 80% rename from iOS_SDK/OneSignalSDK/Source/OSRemoteParamController.m rename to iOS_SDK/OneSignalSDK/OneSignalCore/Source/RemoteParameters/OSRemoteParamController.m index 2b0d52c0a..627da5f1c 100644 --- a/iOS_SDK/OneSignalSDK/Source/OSRemoteParamController.m +++ b/iOS_SDK/OneSignalSDK/OneSignalCore/Source/RemoteParameters/OSRemoteParamController.m @@ -27,30 +27,21 @@ of this software and associated documentation files (the "Software"), to deal #import #import "OSRemoteParamController.h" -#import "OneSignalHelper.h" -#import "OneSignal.h" - -@interface OneSignal () - -+ (void)startLocationSharedWithFlag:(BOOL)enable; - -@end +#import "OneSignalCommonDefines.h" +#import "OneSignalUserDefaults.h" +#import "OSPrivacyConsentController.h" @implementation OSRemoteParamController +static OSRemoteParamController *_sharedController; ++ (OSRemoteParamController *)sharedController { + if (!_sharedController) + _sharedController = [OSRemoteParamController new]; + return _sharedController; +} + - (void)saveRemoteParams:(NSDictionary *)params { _remoteParams = params; - - if ([self hasLocationKey]) { - let shared = [params[IOS_LOCATION_SHARED] boolValue]; - [OneSignal startLocationSharedWithFlag:shared]; - } - - if ([self hasPrivacyConsentKey]) { - let required = [params[IOS_REQUIRES_USER_PRIVACY_CONSENT] boolValue]; - [self savePrivacyConsentRequired:required]; - [OneSignal setRequiresUserPrivacyConsent:required]; - } } - (BOOL)hasLocationKey { diff --git a/iOS_SDK/OneSignalSDK/Source/OneSignalSelectorHelpers.h b/iOS_SDK/OneSignalSDK/OneSignalCore/Source/Swizzling/OneSignalSelectorHelpers.h similarity index 100% rename from iOS_SDK/OneSignalSDK/Source/OneSignalSelectorHelpers.h rename to iOS_SDK/OneSignalSDK/OneSignalCore/Source/Swizzling/OneSignalSelectorHelpers.h diff --git a/iOS_SDK/OneSignalSDK/Source/OneSignalSelectorHelpers.m b/iOS_SDK/OneSignalSDK/OneSignalCore/Source/Swizzling/OneSignalSelectorHelpers.m similarity index 100% rename from iOS_SDK/OneSignalSDK/Source/OneSignalSelectorHelpers.m rename to iOS_SDK/OneSignalSDK/OneSignalCore/Source/Swizzling/OneSignalSelectorHelpers.m diff --git a/iOS_SDK/OneSignalSDK/OneSignalCore/Source/SwizzlingForwarder.h b/iOS_SDK/OneSignalSDK/OneSignalCore/Source/Swizzling/SwizzlingForwarder.h similarity index 100% rename from iOS_SDK/OneSignalSDK/OneSignalCore/Source/SwizzlingForwarder.h rename to iOS_SDK/OneSignalSDK/OneSignalCore/Source/Swizzling/SwizzlingForwarder.h diff --git a/iOS_SDK/OneSignalSDK/OneSignalCore/Source/SwizzlingForwarder.m b/iOS_SDK/OneSignalSDK/OneSignalCore/Source/Swizzling/SwizzlingForwarder.m similarity index 100% rename from iOS_SDK/OneSignalSDK/OneSignalCore/Source/SwizzlingForwarder.m rename to iOS_SDK/OneSignalSDK/OneSignalCore/Source/Swizzling/SwizzlingForwarder.m diff --git a/iOS_SDK/OneSignalSDK/OneSignalExtension/OneSignalExtension.h b/iOS_SDK/OneSignalSDK/OneSignalExtension/OneSignalExtension.h index ef76a2cea..9a0853efc 100644 --- a/iOS_SDK/OneSignalSDK/OneSignalExtension/OneSignalExtension.h +++ b/iOS_SDK/OneSignalSDK/OneSignalExtension/OneSignalExtension.h @@ -27,10 +27,10 @@ #import #import -#import "OneSignalAttachmentHandler.h" -#import "OneSignalExtensionBadgeHandler.h" -#import "OneSignalReceiveReceiptsController.h" -#import "OneSignalNotificationServiceExtensionHandler.h" +#import +#import +#import +#import @interface OneSignalExtension : NSObject #pragma mark NotificationService Extension diff --git a/iOS_SDK/OneSignalSDK/OneSignalExtension/OneSignalNotificationServiceExtensionHandler.m b/iOS_SDK/OneSignalSDK/OneSignalExtension/OneSignalNotificationServiceExtensionHandler.m index 8cb6a5df7..70415ab18 100644 --- a/iOS_SDK/OneSignalSDK/OneSignalExtension/OneSignalNotificationServiceExtensionHandler.m +++ b/iOS_SDK/OneSignalSDK/OneSignalExtension/OneSignalNotificationServiceExtensionHandler.m @@ -132,14 +132,14 @@ + (void)addActionButtonsToExtentionRequest:(UNNotificationRequest*)request + (void)onNotificationReceived:(NSString *)receivedNotificationId withBlockingTask:(dispatch_semaphore_t)semaphore { if (receivedNotificationId && ![receivedNotificationId isEqualToString:@""]) { // If update was made without app being initialized/launched before -> migrate - [OneSignalOutcomes migrate]; + [OSOutcomes migrate]; [OneSignalLog onesignalLog:ONE_S_LL_VERBOSE message:[NSString stringWithFormat:@"NSE request received, sessionManager: %@", [OSSessionManager sharedSessionManager]]]; // Save received notification id [[OSSessionManager sharedSessionManager] onNotificationReceived:receivedNotificationId]; // Track confirmed delivery let sharedUserDefaults = OneSignalUserDefaults.initShared; - let playerId = [sharedUserDefaults getSavedStringForKey:OSUD_PLAYER_ID_TO defaultValue:nil]; + let playerId = [sharedUserDefaults getSavedStringForKey:OSUD_PUSH_SUBSCRIPTION_ID defaultValue:nil]; let appId = [sharedUserDefaults getSavedStringForKey:OSUD_APP_ID defaultValue:nil]; // Randomize send of confirmed deliveries to lessen traffic for high recipient notifications int randomDelay = semaphore != nil ? arc4random_uniform(MAX_CONF_DELIVERY_DELAY) : 0; diff --git a/iOS_SDK/OneSignalSDK/OneSignalExtension/OneSignalReceiveReceiptsController.m b/iOS_SDK/OneSignalSDK/OneSignalExtension/OneSignalReceiveReceiptsController.m index b0bc90158..f3ab87765 100644 --- a/iOS_SDK/OneSignalSDK/OneSignalExtension/OneSignalReceiveReceiptsController.m +++ b/iOS_SDK/OneSignalSDK/OneSignalExtension/OneSignalReceiveReceiptsController.m @@ -38,7 +38,7 @@ - (BOOL)isReceiveReceiptsEnabled { - (void)sendReceiveReceiptWithNotificationId:(NSString *)notificationId { let sharedUserDefaults = OneSignalUserDefaults.initShared; - let playerId = [sharedUserDefaults getSavedStringForKey:OSUD_PLAYER_ID_TO defaultValue:nil]; + let playerId = [sharedUserDefaults getSavedStringForKey:OSUD_PUSH_SUBSCRIPTION_ID defaultValue:nil]; let appId = [sharedUserDefaults getSavedStringForKey:OSUD_APP_ID defaultValue:nil]; [self sendReceiveReceiptWithPlayerId:playerId diff --git a/iOS_SDK/OneSignalSDK/Source/OSDynamicTriggerController.h b/iOS_SDK/OneSignalSDK/OneSignalInAppMessages/Controller/OSDynamicTriggerController.h similarity index 100% rename from iOS_SDK/OneSignalSDK/Source/OSDynamicTriggerController.h rename to iOS_SDK/OneSignalSDK/OneSignalInAppMessages/Controller/OSDynamicTriggerController.h diff --git a/iOS_SDK/OneSignalSDK/Source/OSDynamicTriggerController.m b/iOS_SDK/OneSignalSDK/OneSignalInAppMessages/Controller/OSDynamicTriggerController.m similarity index 87% rename from iOS_SDK/OneSignalSDK/Source/OSDynamicTriggerController.m rename to iOS_SDK/OneSignalSDK/OneSignalInAppMessages/Controller/OSDynamicTriggerController.m index 9a630fcd9..2e98511bb 100644 --- a/iOS_SDK/OneSignalSDK/Source/OSDynamicTriggerController.m +++ b/iOS_SDK/OneSignalSDK/OneSignalInAppMessages/Controller/OSDynamicTriggerController.m @@ -27,10 +27,10 @@ #import "OSDynamicTriggerController.h" #import "OSInAppMessagingDefines.h" -#import "OneSignalHelper.h" -#import "OneSignalInternal.h" #import "OneSignalCommonDefines.h" #import "OSMessagingController.h" +#import +#import "OSSessionManager.h" @interface OSDynamicTriggerController () @@ -77,9 +77,9 @@ - (BOOL)dynamicTriggerShouldFire:(OSTrigger *)trigger withMessageId:(NSString *) // Check what type of trigger it is if ([trigger.kind isEqualToString:OS_DYNAMIC_TRIGGER_KIND_SESSION_TIME]) { - let currentDuration = fabs([[OneSignal sessionLaunchTime] timeIntervalSinceNow]); + let currentDuration = fabs([[OSSessionManager.sharedSessionManager sessionLaunchTime] timeIntervalSinceNow]); if ([self evaluateTimeInterval:requiredTimeValue withCurrentValue:currentDuration forOperator:trigger.operatorType]) { - [OneSignal onesignalLog:ONE_S_LL_VERBOSE message:[NSString stringWithFormat:@"session time trigger completed: %@", trigger.triggerId]]; + [OneSignalLog onesignalLog:ONE_S_LL_VERBOSE message:[NSString stringWithFormat:@"session time trigger completed: %@", trigger.triggerId]]; [self.delegate dynamicTriggerCompleted:trigger.triggerId]; //[self.delegate dynamicTriggerFired:trigger.triggerId]; return true; @@ -94,7 +94,7 @@ - (BOOL)dynamicTriggerShouldFire:(OSTrigger *)trigger withMessageId:(NSString *) let timestampSinceLastMessage = fabs([self.timeSinceLastMessage timeIntervalSinceNow]); if ([self evaluateTimeInterval:requiredTimeValue withCurrentValue:timestampSinceLastMessage forOperator:trigger.operatorType]) { - [OneSignal onesignalLog:ONE_S_LL_VERBOSE message:[NSString stringWithFormat:@"time since last inapp trigger completed: %@", trigger.triggerId]]; + [OneSignalLog onesignalLog:ONE_S_LL_VERBOSE message:[NSString stringWithFormat:@"time since last inapp trigger completed: %@", trigger.triggerId]]; return true; } offset = requiredTimeValue - timestampSinceLastMessage; @@ -111,7 +111,7 @@ - (BOOL)dynamicTriggerShouldFire:(OSTrigger *)trigger withMessageId:(NSString *) userInfo:@{@"trigger" : trigger} repeats:false]; if (timer) { - [OneSignal onesignalLog:ONE_S_LL_VERBOSE message:[NSString stringWithFormat:@"timer added for triggerId: %@, messageId: %@", trigger.triggerId, messageId]]; + [OneSignalLog onesignalLog:ONE_S_LL_VERBOSE message:[NSString stringWithFormat:@"timer added for triggerId: %@, messageId: %@", trigger.triggerId, messageId]]; [[NSRunLoop mainRunLoop] addTimer:timer forMode:NSRunLoopCommonModes]; } @@ -139,7 +139,7 @@ - (BOOL)evaluateTimeInterval:(NSTimeInterval)timeInterval withCurrentValue:(NSTi case OSTriggerOperatorTypeNotEqualTo: return !OS_ROUGHLY_EQUAL(timeInterval, currentTimeInterval); default: - [OneSignal onesignalLog:ONE_S_LL_ERROR message:[NSString stringWithFormat:@"Attempted to apply an invalid operator on a time-based in-app-message trigger: %@", OS_OPERATOR_TO_STRING(operator)]]; + [OneSignalLog onesignalLog:ONE_S_LL_ERROR message:[NSString stringWithFormat:@"Attempted to apply an invalid operator on a time-based in-app-message trigger: %@", OS_OPERATOR_TO_STRING(operator)]]; return false; } } diff --git a/iOS_SDK/OneSignalSDK/Source/OSInAppMessageController.h b/iOS_SDK/OneSignalSDK/OneSignalInAppMessages/Controller/OSInAppMessageController.h similarity index 100% rename from iOS_SDK/OneSignalSDK/Source/OSInAppMessageController.h rename to iOS_SDK/OneSignalSDK/OneSignalInAppMessages/Controller/OSInAppMessageController.h diff --git a/iOS_SDK/OneSignalSDK/Source/OSInAppMessageController.m b/iOS_SDK/OneSignalSDK/OneSignalInAppMessages/Controller/OSInAppMessageController.m similarity index 80% rename from iOS_SDK/OneSignalSDK/Source/OSInAppMessageController.m rename to iOS_SDK/OneSignalSDK/OneSignalInAppMessages/Controller/OSInAppMessageController.m index bfb3b12ad..5aa037244 100644 --- a/iOS_SDK/OneSignalSDK/Source/OSInAppMessageController.m +++ b/iOS_SDK/OneSignalSDK/OneSignalInAppMessages/Controller/OSInAppMessageController.m @@ -27,6 +27,7 @@ #import "OSInAppMessageController.h" #import +#import #import "OSInAppMessagingDefines.h" #import "OSInAppMessagingRequests.h" @@ -38,18 +39,18 @@ - (void)loadMessageHTMLContentWithResult:(OSResultSuccessBlock _Nullable)success if (!variantId) { if (failureBlock) - failureBlock([NSError errorWithDomain:@"onesignal" code:0 userInfo:@{@"error" : [NSString stringWithFormat:@"Unable to find variant ID for languages (%@) for message ID: %@", NSLocale.preferredLanguages, self.messageId]}]); + failureBlock([NSError errorWithDomain:@"onesignal" code:0 userInfo:@{@"error" : [NSString stringWithFormat:@"Unable to find variant ID for languages (%@) for message ID: %@", OneSignalUserManagerImpl.sharedInstance.language, self.messageId]}]); return; } - let request = [OSRequestLoadInAppMessageContent withAppId:OneSignal.appId withMessageId:self.messageId withVariantId:variantId]; + let request = [OSRequestLoadInAppMessageContent withAppId:[OneSignalConfigManager getAppId] withMessageId:self.messageId withVariantId:variantId]; [OneSignalClient.sharedClient executeRequest:request onSuccess:successBlock onFailure:failureBlock]; } - (void)loadPreviewMessageHTMLContentWithUUID:(NSString * _Nonnull)previewUUID success:(OSResultSuccessBlock _Nullable)successBlock failure:(OSFailureBlock _Nullable)failureBlock { - let request = [OSRequestLoadInAppMessagePreviewContent withAppId:OneSignal.appId previewUUID:previewUUID]; + let request = [OSRequestLoadInAppMessagePreviewContent withAppId:[OneSignalConfigManager getAppId] previewUUID:previewUUID]; [OneSignalClient.sharedClient executeRequest:request onSuccess:successBlock onFailure:failureBlock]; } @@ -62,20 +63,16 @@ variant over lower platforms (ie. 'all') even if they have a matching language. */ - (NSString * _Nullable)variantId { - let isoLanguageCodes = [NSLocale preferredLanguages]; + // we only want the first two characters, ie. "en-US" we want "en" + NSString *userLanguageCode = [OneSignalUserManagerImpl.sharedInstance.language substringToIndex:2]; NSString *variantId; for (NSString *type in PREFERRED_VARIANT_ORDER) { if (self.variants[type]) { - for (NSString *code in isoLanguageCodes) { - // we only want the first two characters, ie. "en-US" we want "en" - let isoLanguageCode = [code substringToIndex:2]; - - if (self.variants[type][isoLanguageCode]) { - variantId = self.variants[type][isoLanguageCode]; - break; - } + if (self.variants[type][userLanguageCode]) { + variantId = self.variants[type][userLanguageCode]; + break; } if (!variantId && self.variants[type][@"default"]) { diff --git a/iOS_SDK/OneSignalSDK/OneSignalInAppMessages/Controller/OSInAppMessageMigrationController.h b/iOS_SDK/OneSignalSDK/OneSignalInAppMessages/Controller/OSInAppMessageMigrationController.h new file mode 100644 index 000000000..7f433cd9d --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignalInAppMessages/Controller/OSInAppMessageMigrationController.h @@ -0,0 +1,33 @@ +/* + Modified MIT License + + Copyright 2023 OneSignal + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + 1. The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + 2. All copies of substantial portions of the Software may only be used in connection + with services provided by OneSignal. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + */ + +#import + +@interface OSInAppMessageMigrationController : NSObject ++ (void)migrate; +@end + diff --git a/iOS_SDK/OneSignalSDK/OneSignalInAppMessages/Controller/OSInAppMessageMigrationController.m b/iOS_SDK/OneSignalSDK/OneSignalInAppMessages/Controller/OSInAppMessageMigrationController.m new file mode 100644 index 000000000..a9410fbe0 --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignalInAppMessages/Controller/OSInAppMessageMigrationController.m @@ -0,0 +1,101 @@ +/* + Modified MIT License + + Copyright 2023 OneSignal + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + 1. The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + 2. All copies of substantial portions of the Software may only be used in connection + with services provided by OneSignal. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + */ + +#import "OSInAppMessageMigrationController.h" +#import "OSInAppMessagingDefines.h" +#import "OSInAppMessageInternal.h" + +@implementation OSInAppMessageMigrationController + ++(void)migrate { + [self migrateIAMRedisplayCache]; + [self migrateToOSInAppMessageInternal]; +} + +// Devices could potentially have bad data in the OS_IAM_REDISPLAY_DICTIONARY +// that was saved as a dictionary and not CodeableData. Try to detect if that is the case +// and save it is as CodeableData instead. ++ (void)migrateIAMRedisplayCache { + let iamRedisplayCacheFixVersion = 30203; + long sdkVersion = [OneSignalUserDefaults.initShared getSavedIntegerForKey:OSUD_CACHED_SDK_VERSION defaultValue:0]; + if (sdkVersion >= iamRedisplayCacheFixVersion) + return; + + @try { + __unused NSMutableDictionary *redisplayDict =[[NSMutableDictionary alloc] initWithDictionary:[OneSignalUserDefaults.initStandard + getSavedCodeableDataForKey:OS_IAM_REDISPLAY_DICTIONARY + defaultValue:[NSMutableDictionary new]]]; + } @catch (NSException *exception) { + @try { + // The redisplay IAMs might have been saved as a dictionary. + // Try to read them as a dictionary and then save them as a codeable. + NSMutableDictionary *redisplayDict = [[NSMutableDictionary alloc] initWithDictionary:[OneSignalUserDefaults.initStandard + getSavedDictionaryForKey:OS_IAM_REDISPLAY_DICTIONARY + defaultValue:[NSMutableDictionary new]]]; + [OneSignalUserDefaults.initStandard saveCodeableDataForKey:OS_IAM_REDISPLAY_DICTIONARY + withValue:redisplayDict]; + } @catch (NSException *exception) { + //Clear the cached redisplay dictionary of bad data + [OneSignalUserDefaults.initStandard saveCodeableDataForKey:OS_IAM_REDISPLAY_DICTIONARY + withValue:nil]; + } + } +} + +// OSInAppMessage has been made public +// The old class has been renamed to OSInAppMessageInternal +// We must set the new class name to the unarchiver to avoid crashing ++ (void)migrateToOSInAppMessageInternal { + let nameChangeVersion = 30700; + long sdkVersion = [OneSignalUserDefaults.initShared getSavedIntegerForKey:OSUD_CACHED_SDK_VERSION defaultValue:0]; + [NSKeyedUnarchiver setClass:[OSInAppMessageInternal class] forClassName:@"OSInAppMessage"]; + if (sdkVersion < nameChangeVersion) { + [OneSignalLog onesignalLog:ONE_S_LL_DEBUG message:[NSString stringWithFormat:@"Migrating OSInAppMessage from version: %ld", sdkVersion]]; + + [NSKeyedUnarchiver setClass:[OSInAppMessageInternal class] forClassName:@"OSInAppMessage"]; + // Messages Array + NSArray *messages = [OneSignalUserDefaults.initStandard getSavedCodeableDataForKey:OS_IAM_MESSAGES_ARRAY + defaultValue:[NSArray new]]; + if (messages && messages.count) { + [NSKeyedArchiver setClassName:@"OSInAppMessageInternal" forClass:[OSInAppMessageInternal class]]; + [OneSignalUserDefaults.initStandard saveCodeableDataForKey:OS_IAM_MESSAGES_ARRAY withValue:messages]; + } else { + [OneSignalUserDefaults.initStandard saveCodeableDataForKey:OS_IAM_MESSAGES_ARRAY withValue:nil]; + } + + // Redisplay Messages Dict + NSMutableDictionary *redisplayedInAppMessages = [[NSMutableDictionary alloc] initWithDictionary:[OneSignalUserDefaults.initStandard getSavedCodeableDataForKey:OS_IAM_REDISPLAY_DICTIONARY defaultValue:[NSMutableDictionary new]]]; + if (redisplayedInAppMessages && redisplayedInAppMessages.count) { + [OneSignalUserDefaults.initStandard saveCodeableDataForKey:OS_IAM_REDISPLAY_DICTIONARY withValue:redisplayedInAppMessages]; + } else { + [OneSignalUserDefaults.initStandard saveCodeableDataForKey:OS_IAM_REDISPLAY_DICTIONARY withValue:nil]; + } + } +} + + +@end diff --git a/iOS_SDK/OneSignalSDK/Source/OSMessagingController.h b/iOS_SDK/OneSignalSDK/OneSignalInAppMessages/Controller/OSMessagingController.h similarity index 81% rename from iOS_SDK/OneSignalSDK/Source/OSMessagingController.h rename to iOS_SDK/OneSignalSDK/OneSignalInAppMessages/Controller/OSMessagingController.h index 89d3960cf..d37e3577e 100644 --- a/iOS_SDK/OneSignalSDK/Source/OSMessagingController.h +++ b/iOS_SDK/OneSignalSDK/OneSignalInAppMessages/Controller/OSMessagingController.h @@ -28,8 +28,8 @@ #import #import "OSInAppMessageInternal.h" #import "OSInAppMessageViewController.h" -#import "OneSignal.h" #import "OSTriggerController.h" +#import NS_ASSUME_NONNULL_BEGIN @@ -39,7 +39,7 @@ NS_ASSUME_NONNULL_BEGIN @end -@interface OSMessagingController : NSObject +@interface OSMessagingController : NSObject @property (class, readonly) BOOL isInAppMessagingPaused; @@ -48,11 +48,11 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic) BOOL isInAppMessageShowing; + (OSMessagingController *)sharedInstance; ++ (void)start; + (void)removeInstance; - (void)presentInAppMessage:(OSInAppMessageInternal *)message; -- (void)presentInAppPreviewMessage:(OSInAppMessageInternal *)message; - (void)updateInAppMessagesFromCache; -- (void)updateInAppMessagesFromOnSession:(NSArray *)newMessages; +- (void)getInAppMessagesFromServer:(NSString * _Nullable)subscriptionId; - (void)messageViewImpressionRequest:(OSInAppMessageInternal *)message; - (void)messageViewPageImpressionRequest:(OSInAppMessageInternal *)message withPageId:(NSString *)pageId; @@ -60,11 +60,14 @@ NS_ASSUME_NONNULL_BEGIN - (void)setInAppMessagingPaused:(BOOL)pause; - (void)addTriggers:(NSDictionary *)triggers; - (void)removeTriggersForKeys:(NSArray *)keys; +- (void)clearTriggers; - (NSDictionary *)getTriggers; - (id)getTriggerValueForKey:(NSString *)key; -- (void)setInAppMessageClickHandler:(OSInAppMessageClickBlock)actionClickBlock; -- (void)setInAppMessageDelegate:(NSObject *_Nullable)delegate; +- (void)addInAppMessageClickListener:(NSObject *_Nullable)listener; +- (void)removeInAppMessageClickListener:(NSObject *_Nullable)listener; +- (void)addInAppMessageLifecycleListener:(NSObject *_Nullable)listener; +- (void)removeInAppMessageLifecycleListener:(NSObject *_Nullable)listener; @end diff --git a/iOS_SDK/OneSignalSDK/Source/OSMessagingController.m b/iOS_SDK/OneSignalSDK/OneSignalInAppMessages/Controller/OSMessagingController.m similarity index 69% rename from iOS_SDK/OneSignalSDK/Source/OSMessagingController.m rename to iOS_SDK/OneSignalSDK/OneSignalInAppMessages/Controller/OSMessagingController.m index 3cd706834..9b7aff4ce 100644 --- a/iOS_SDK/OneSignalSDK/Source/OSMessagingController.m +++ b/iOS_SDK/OneSignalSDK/OneSignalInAppMessages/Controller/OSMessagingController.m @@ -26,18 +26,75 @@ */ #import "OSMessagingController.h" -#import "OneSignalHelper.h" +#import "UIApplication+OneSignal.h" // Previously imported via "OneSignalHelper.h" +#import "NSDateFormatter+OneSignal.h" // Previously imported via "OneSignalHelper.h" #import -#import "OneSignalInternal.h" -#import "OSInAppMessageAction.h" +#import "OSInAppMessageClickResult.h" +#import "OSInAppMessageClickEvent.h" #import "OSInAppMessageController.h" #import "OSInAppMessagePrompt.h" -#import "OneSignalDialogController.h" #import "OSInAppMessagingRequests.h" +#import "OneSignalWebViewManager.h" +#import +#import "OSSessionManager.h" -@interface OneSignal () +@implementation OSInAppMessageWillDisplayEvent -+ (void)sendClickActionOutcomes:(NSArray *)outcomes; +- (OSInAppMessageWillDisplayEvent*)initWithInAppMessage:(OSInAppMessage *)message { + _message = message; + return self; +} + +- (NSDictionary *)jsonRepresentation { + NSMutableDictionary *json = [NSMutableDictionary new]; + json[@"message"] = [self.message jsonRepresentation]; + return json; +} + +@end + +@implementation OSInAppMessageDidDisplayEvent + +- (OSInAppMessageDidDisplayEvent*)initWithInAppMessage:(OSInAppMessage *)message { + _message = message; + return self; +} + +- (NSDictionary *)jsonRepresentation { + NSMutableDictionary *json = [NSMutableDictionary new]; + json[@"message"] = [self.message jsonRepresentation]; + return json; +} + +@end + +@implementation OSInAppMessageWillDismissEvent + +- (OSInAppMessageWillDismissEvent*)initWithInAppMessage:(OSInAppMessage *)message { + _message = message; + return self; +} + +- (NSDictionary *)jsonRepresentation { + NSMutableDictionary *json = [NSMutableDictionary new]; + json[@"message"] = [self.message jsonRepresentation]; + return json; +} + +@end + +@implementation OSInAppMessageDidDismissEvent + +- (OSInAppMessageDidDismissEvent*)initWithInAppMessage:(OSInAppMessage *)message { + _message = message; + return self; +} + +- (NSDictionary *)jsonRepresentation { + NSMutableDictionary *json = [NSMutableDictionary new]; + json[@"message"] = [self.message jsonRepresentation]; + return json; +} @end @@ -64,10 +121,9 @@ @interface OSMessagingController () // Tracking for impessions so that an IAM is only tracked once and not several times if it is reshown @property (strong, nonatomic, nonnull) NSMutableSet *viewedPageIDs; -// Click action block to allow overridden behavior when clicking an IAM -@property (strong, nonatomic, nullable) OSInAppMessageClickBlock actionClickBlock; +@property (nonatomic) NSMutableArray *> *clickListeners; -@property (weak, nonatomic, nullable) NSObject *inAppMessageDelegate; +@property (nonatomic) NSMutableArray *> *lifecycleListeners; @property (strong, nullable) OSInAppMessageViewController *viewController; @@ -94,10 +150,11 @@ @implementation OSMessagingController + (OSMessagingController *)sharedInstance { dispatch_once(&once, ^{ // Make sure only devices with iOS 10 or newer can use IAMs - if ([self doesDeviceSupportIAM]) + if ([self doesDeviceSupportIAM]) { sharedInstance = [OSMessagingController new]; - else + } else { sharedInstance = [DummyOSMessagingController new]; + } }); return sharedInstance; } @@ -107,6 +164,11 @@ + (void)removeInstance { once = 0; } ++ (void)start { + OSMessagingController *shared = OSMessagingController.sharedInstance; + [OneSignalUserManagerImpl.sharedInstance addObserver:shared]; +} + static BOOL _isInAppMessagingPaused = false; - (BOOL)isInAppMessagingPaused { return _isInAppMessagingPaused; @@ -122,11 +184,11 @@ - (void)setInAppMessagingPaused:(BOOL)pause { + (BOOL)doesDeviceSupportIAM { // We do not support Mac Catalyst as it does not display correctly. // We could support in the future after we reslove the display issues. - if ([@"Mac" isEqualToString:[OneSignalHelper getDeviceVariant]]) + if ([@"Mac" isEqualToString:[OSDeviceUtils getDeviceVariant]]) return false; // Only support iOS 10 and newer due to Safari 9 WebView issues - return [OneSignalHelper isIOSVersionGreaterThanOrEqual:@"10.0"]; + return [OSDeviceUtils isIOSVersionGreaterThanOrEqual:@"10.0"]; } - (instancetype)init { @@ -138,13 +200,15 @@ - (instancetype)init { defaultValue:[NSArray new]]; [self initializeTriggerController]; self.messageDisplayQueue = [NSMutableArray new]; + self.clickListeners = [NSMutableArray new]; + self.lifecycleListeners = [NSMutableArray new]; let standardUserDefaults = OneSignalUserDefaults.initStandard; // Get all cached IAM data from NSUserDefaults for shown, impressions, and clicks self.seenInAppMessages = [[NSMutableSet alloc] initWithSet:[standardUserDefaults getSavedSetForKey:OS_IAM_SEEN_SET_KEY defaultValue:nil]]; self.redisplayedInAppMessages = [[NSMutableDictionary alloc] initWithDictionary:[standardUserDefaults getSavedCodeableDataForKey:OS_IAM_REDISPLAY_DICTIONARY defaultValue:[NSMutableDictionary new]]]; - [OneSignal onesignalLog:ONE_S_LL_VERBOSE message:[NSString stringWithFormat:@"init redisplayedInAppMessages with: %@", [_redisplayedInAppMessages description]]]; + [OneSignalLog onesignalLog:ONE_S_LL_VERBOSE message:[NSString stringWithFormat:@"init redisplayedInAppMessages with: %@", [_redisplayedInAppMessages description]]]; self.clickedClickIds = [[NSMutableSet alloc] initWithSet:[standardUserDefaults getSavedSetForKey:OS_IAM_CLICKED_SET_KEY defaultValue:nil]]; self.impressionedInAppMessages = [[NSMutableSet alloc] initWithSet:[standardUserDefaults getSavedSetForKey:OS_IAM_IMPRESSIONED_SET_KEY defaultValue:nil]]; self.viewedPageIDs = [[NSMutableSet alloc] initWithSet:[standardUserDefaults getSavedSetForKey:OS_IAM_PAGE_IMPRESSIONED_SET_KEY defaultValue:nil]]; @@ -152,6 +216,8 @@ - (instancetype)init { self.isAppInactive = NO; // BOOL that controls if in-app messaging is paused or not (false by default) _isInAppMessagingPaused = false; + + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(handleIAMPreview:) name:ONESIGNAL_POST_PREVIEW_IAM object:nil]; } return self; @@ -170,8 +236,46 @@ - (void)updateInAppMessagesFromCache { [self evaluateMessages]; } -- (void)updateInAppMessagesFromOnSession:(NSArray *)newMessages { - [OneSignal onesignalLog:ONE_S_LL_VERBOSE message:@"updateInAppMessagesFromOnSession"]; +- (void)getInAppMessagesFromServer:(NSString *)subscriptionId { + [OneSignalLog onesignalLog:ONE_S_LL_VERBOSE message:@"getInAppMessagesFromServer"]; + + if (!subscriptionId) { + [self updateInAppMessagesFromCache]; + return; + } + + OSRequestGetInAppMessages *request = [OSRequestGetInAppMessages withSubscriptionId:subscriptionId]; + [OneSignalClient.sharedClient executeRequest:request onSuccess:^(NSDictionary *result) { + dispatch_async(dispatch_get_main_queue(), ^{ + [OneSignalLog onesignalLog:ONE_S_LL_VERBOSE message:@"getInAppMessagesFromServer success"]; + if (result[@"in_app_messages"]) { // when there are no IAMs, will this still be there? + let messages = [NSMutableArray new]; + + for (NSDictionary *messageJson in result[@"in_app_messages"]) { + let message = [OSInAppMessageInternal instanceWithJson:messageJson]; + if (message) { + [messages addObject:message]; + } + } + + [self updateInAppMessagesFromServer:messages]; + return; + } + + // TODO: Check this request and response. If no IAMs returned, should we really get from cache? + // This is the existing implementation but it could mean this user has no IAMs? + + // Default is using cached IAMs in the messaging controller + [self updateInAppMessagesFromCache]; + }); + } onFailure:^(NSError *error) { + [OneSignalLog onesignalLog:ONE_S_LL_VERBOSE message:[NSString stringWithFormat:@"getInAppMessagesFromServer failure: %@", error.localizedDescription]]; + [self updateInAppMessagesFromCache]; + }]; +} + +- (void)updateInAppMessagesFromServer:(NSArray *)newMessages { + [OneSignalLog onesignalLog:ONE_S_LL_VERBOSE message:@"updateInAppMessagesFromServer"]; self.messages = newMessages; // Cache if messages passed in are not null, this method is called from on_session for @@ -186,7 +290,7 @@ - (void)updateInAppMessagesFromOnSession:(NSArray *)ne } - (void)resetRedisplayMessagesBySession { - [OneSignal onesignalLog:ONE_S_LL_VERBOSE message:[NSString stringWithFormat:@"resetRedisplayMessagesBySession with redisplayedInAppMessages: %@", [_redisplayedInAppMessages description]]]; + [OneSignalLog onesignalLog:ONE_S_LL_VERBOSE message:[NSString stringWithFormat:@"resetRedisplayMessagesBySession with redisplayedInAppMessages: %@", [_redisplayedInAppMessages description]]]; for (NSString *messageId in _redisplayedInAppMessages) { [_redisplayedInAppMessages objectForKey:messageId].isDisplayedInSession = false; @@ -195,7 +299,7 @@ - (void)resetRedisplayMessagesBySession { - (void)deleteInactiveMessage:(OSInAppMessageInternal *)message { let deleteMessage = [NSString stringWithFormat:@"Deleting inactive in-app message from cache: %@", message.messageId]; - [OneSignal onesignalLog:ONE_S_LL_ERROR message:deleteMessage]; + [OneSignalLog onesignalLog:ONE_S_LL_ERROR message:deleteMessage]; NSMutableArray *newMessagesArray = [NSMutableArray arrayWithArray:self.messages]; [newMessagesArray removeObject: message]; self.messages = newMessagesArray; @@ -230,46 +334,68 @@ - (void)deleteOldRedisplayedInAppMessages { } } -- (void)setInAppMessageClickHandler:(OSInAppMessageClickBlock)actionClickBlock { - self.actionClickBlock = actionClickBlock; +- (void)addInAppMessageClickListener:(NSObject *_Nullable)listener { + [_clickListeners addObject:listener]; } -- (void)setInAppMessageDelegate:(NSObject *_Nullable)delegate { - _inAppMessageDelegate = delegate; +- (void)removeInAppMessageClickListener:(NSObject *_Nullable)listener { + [_clickListeners removeObject:listener]; +} + +- (void)addInAppMessageLifecycleListener:(NSObject *_Nullable)listener { + [_lifecycleListeners addObject:listener]; +} + +- (void)removeInAppMessageLifecycleListener:(NSObject *_Nullable)listener { + [_lifecycleListeners removeObject:listener]; } - (void)onWillDisplayInAppMessage:(OSInAppMessageInternal *)message { - if (self.inAppMessageDelegate && - [self.inAppMessageDelegate respondsToSelector:@selector(onWillDisplayInAppMessage:)]) { - [self.inAppMessageDelegate onWillDisplayInAppMessage:message]; + for (NSObject *listener in _lifecycleListeners) { + if ([listener respondsToSelector:@selector(onWillDisplayInAppMessage:)]) { + OSInAppMessageWillDisplayEvent *event = [[OSInAppMessageWillDisplayEvent alloc] initWithInAppMessage:message]; + [listener onWillDisplayInAppMessage:event]; + } } } - (void)onDidDisplayInAppMessage:(OSInAppMessageInternal *)message { - if (self.inAppMessageDelegate && - [self.inAppMessageDelegate respondsToSelector:@selector(onDidDisplayInAppMessage:)]) { - [self.inAppMessageDelegate onDidDisplayInAppMessage:message]; + for (NSObject *listener in _lifecycleListeners) { + if ([listener respondsToSelector:@selector(onDidDisplayInAppMessage:)]) { + OSInAppMessageDidDisplayEvent *event = [[OSInAppMessageDidDisplayEvent alloc] initWithInAppMessage:message]; + [listener onDidDisplayInAppMessage:event]; + } } } - (void)onWillDismissInAppMessage:(OSInAppMessageInternal *)message { - if (self.inAppMessageDelegate && - [self.inAppMessageDelegate respondsToSelector:@selector(onWillDismissInAppMessage:)]) { - [self.inAppMessageDelegate onWillDismissInAppMessage:message]; + for (NSObject *listener in _lifecycleListeners) { + if ([listener respondsToSelector:@selector(onWillDismissInAppMessage:)]) { + OSInAppMessageWillDismissEvent *event = [[OSInAppMessageWillDismissEvent alloc] initWithInAppMessage:message]; + [listener onWillDismissInAppMessage:event]; + } } } - (void)onDidDismissInAppMessage:(OSInAppMessageInternal *)message { - if (self.inAppMessageDelegate && - [self.inAppMessageDelegate respondsToSelector:@selector(onDidDismissInAppMessage:)]) { - [self.inAppMessageDelegate onDidDismissInAppMessage:message]; + for (NSObject *listener in _lifecycleListeners) { + if ([listener respondsToSelector:@selector(onDidDismissInAppMessage:)]) { + OSInAppMessageDidDismissEvent *event = [[OSInAppMessageDidDismissEvent alloc] initWithInAppMessage:message]; + [listener onDidDismissInAppMessage:event]; + } } } +- (void)handleIAMPreview:(NSNotification *)nsNotification { + OSNotification *notification = [nsNotification.userInfo objectForKey:@"notification"]; + OSInAppMessageInternal *message = [OSInAppMessageInternal instancePreviewFromNotification:notification]; + [self presentInAppPreviewMessage:message]; +} + - (void)presentInAppMessage:(OSInAppMessageInternal *)message { if (!message.variantId) { - let errorMessage = [NSString stringWithFormat:@"Attempted to display a message with a nil variantId. Current preferred language is %@, supported message variants are %@", NSLocale.preferredLanguages, message.variants]; - [OneSignal onesignalLog:ONE_S_LL_ERROR message:errorMessage]; + let errorMessage = [NSString stringWithFormat:@"Attempted to display a message with a nil variantId. Current preferred language is %@, supported message variants are %@", OneSignalUserManagerImpl.sharedInstance.language, message.variants]; + [OneSignalLog onesignalLog:ONE_S_LL_ERROR message:errorMessage]; return; } @@ -284,7 +410,7 @@ - (void)presentInAppMessage:(OSInAppMessageInternal *)message { } // Return early if the app is not active if (![UIApplication applicationIsActive]) { - [OneSignal onesignalLog:ONE_S_LL_VERBOSE message:@"Pause IAMs display due to app inactivity"]; + [OneSignalLog onesignalLog:ONE_S_LL_VERBOSE message:@"Pause IAMs display due to app inactivity"]; _isAppInactive = YES; return; } @@ -323,7 +449,7 @@ - (void)displayMessage:(OSInAppMessageInternal *)message { // Check if the app disabled IAMs for this device before showing an IAM if (_isInAppMessagingPaused && !message.isPreview) { [self cleanUpInAppWindow]; - [OneSignal onesignalLog:ONE_S_LL_VERBOSE message:@"In app messages will not show while paused"]; + [OneSignalLog onesignalLog:ONE_S_LL_VERBOSE message:@"In app messages will not show while paused"]; return; } self.isInAppMessageShowing = true; @@ -351,50 +477,49 @@ - (void)sendMessageImpression:(OSInAppMessageInternal *)message { - (void)loadTags { self.calledLoadTags = YES; - [OneSignal getTags:^(NSDictionary *result) { - if (self.viewController) { - self.viewController.waitForTags = NO; - } - }]; + // TODO: should we always pull new tags? + // For now we aren't pulling new tags and we are just using what is already on the user + // I am leaving the logic for waiting for tags to be pulled in case this changes + self.viewController.waitForTags = NO; } - (void)messageViewPageImpressionRequest:(OSInAppMessageInternal *)message withPageId:(NSString *)pageId { if (message.isPreview) { - [OneSignal onesignalLog:ONE_S_LL_VERBOSE message:[NSString stringWithFormat:@"Not sending page impression for preview message. ID: %@",pageId]]; + [OneSignalLog onesignalLog:ONE_S_LL_VERBOSE message:[NSString stringWithFormat:@"Not sending page impression for preview message. ID: %@",pageId]]; return; } if (!pageId) { - [OneSignal onesignalLog:ONE_S_LL_ERROR message:[NSString stringWithFormat:@"Attempting to send page impression for nil page id"]]; + [OneSignalLog onesignalLog:ONE_S_LL_ERROR message:[NSString stringWithFormat:@"Attempting to send page impression for nil page id"]]; return; } NSString *messagePrefixedPageId = [message.messageId stringByAppendingString:pageId]; if ([self.viewedPageIDs containsObject:messagePrefixedPageId]) { - [OneSignal onesignalLog:ONE_S_LL_VERBOSE message:[NSString stringWithFormat:@"Page Impression already sent. id: %@",pageId]]; + [OneSignalLog onesignalLog:ONE_S_LL_VERBOSE message:[NSString stringWithFormat:@"Page Impression already sent. id: %@",pageId]]; return; } [self.viewedPageIDs addObject:messagePrefixedPageId]; - [OneSignal onesignalLog:ONE_S_LL_VERBOSE message:[NSString stringWithFormat:@"Page Impression Request page id: %@",pageId]]; + [OneSignalLog onesignalLog:ONE_S_LL_VERBOSE message:[NSString stringWithFormat:@"Page Impression Request page id: %@",pageId]]; // Create the request and attach a payload to it - let metricsRequest = [OSRequestInAppMessagePageViewed withAppId:OneSignal.appId - withPlayerId:OneSignal.currentSubscriptionState.userId + let metricsRequest = [OSRequestInAppMessagePageViewed withAppId:OneSignalConfigManager.getAppId + withPlayerId:OneSignalUserManagerImpl.sharedInstance.pushSubscriptionId withMessageId:message.messageId withPageId:pageId forVariantId:message.variantId]; - + [OneSignalClient.sharedClient executeRequest:metricsRequest onSuccess:^(NSDictionary *result) { NSString *successMessage = [NSString stringWithFormat:@"In App Message with message id: %@ and page id: %@, successful POST page impression update with result: %@", message.messageId, pageId, result]; - [OneSignal onesignalLog:ONE_S_LL_DEBUG message:successMessage]; + [OneSignalLog onesignalLog:ONE_S_LL_DEBUG message:successMessage]; // If the post was successful, save the updated viewedPageIds set [OneSignalUserDefaults.initStandard saveSetForKey:OS_IAM_PAGE_IMPRESSIONED_SET_KEY withValue:self.viewedPageIDs]; } onFailure:^(NSError *error) { NSString *errorMessage = [NSString stringWithFormat:@"In App Message with message id: %@ and page id: %@, failed POST page impression update with error: %@", message.messageId, pageId, error]; - [OneSignal onesignalLog:ONE_S_LL_ERROR message:errorMessage]; + [OneSignalLog onesignalLog:ONE_S_LL_ERROR message:errorMessage]; if (message) { [self.viewedPageIDs removeObject:messagePrefixedPageId]; } @@ -419,22 +544,22 @@ - (void)messageViewImpressionRequest:(OSInAppMessageInternal *)message { [self.impressionedInAppMessages addObject:message.messageId]; // Create the request and attach a payload to it - let metricsRequest = [OSRequestInAppMessageViewed withAppId:OneSignal.appId - withPlayerId:OneSignal.currentSubscriptionState.userId + let metricsRequest = [OSRequestInAppMessageViewed withAppId:OneSignalConfigManager.getAppId + withPlayerId:OneSignalUserManagerImpl.sharedInstance.pushSubscriptionId withMessageId:message.messageId forVariantId:message.variantId]; [OneSignalClient.sharedClient executeRequest:metricsRequest onSuccess:^(NSDictionary *result) { NSString *successMessage = [NSString stringWithFormat:@"In App Message with id: %@, successful POST impression update with result: %@", message.messageId, result]; - [OneSignal onesignalLog:ONE_S_LL_DEBUG message:successMessage]; + [OneSignalLog onesignalLog:ONE_S_LL_DEBUG message:successMessage]; // If the post was successful, save the updated impressionedInAppMessages set [OneSignalUserDefaults.initStandard saveSetForKey:OS_IAM_IMPRESSIONED_SET_KEY withValue:self.impressionedInAppMessages]; } onFailure:^(NSError *error) { NSString *errorMessage = [NSString stringWithFormat:@"In App Message with id: %@, failed POST impression update with error: %@", message.messageId, error]; - [OneSignal onesignalLog:ONE_S_LL_ERROR message:errorMessage]; + [OneSignalLog onesignalLog:ONE_S_LL_ERROR message:errorMessage]; // If the post failed, remove the messageId from the impressionedInAppMessages set [self.impressionedInAppMessages removeObject:message.messageId]; @@ -445,7 +570,7 @@ - (void)messageViewImpressionRequest:(OSInAppMessageInternal *)message { Checks to see if any messages should be shown now */ - (void)evaluateMessages { - [OneSignal onesignalLog:ONE_S_LL_VERBOSE message:@"Evaluating in app messages"]; + [OneSignalLog onesignalLog:ONE_S_LL_VERBOSE message:@"Evaluating in app messages"]; for (OSInAppMessageInternal *message in self.messages) { if ([self.triggerController messageMatchesTriggers:message]) { // Make changes to IAM if redisplay available @@ -478,22 +603,23 @@ - (void)setDataForRedisplay:(OSInAppMessageInternal *)message { BOOL messageDismissed = [_seenInAppMessages containsObject:message.messageId]; let redisplayMessageSavedData = [_redisplayedInAppMessages objectForKey:message.messageId]; - [OneSignalLog onesignalLog:ONE_S_LL_VERBOSE message:[NSString stringWithFormat:@"Redisplay dismissed: %@ and data: %@", messageDismissed ? @"YES" : @"NO", redisplayMessageSavedData.jsonRepresentation.description]]; + [OneSignalLog onesignalLog:ONE_S_LL_VERBOSE message:[NSString stringWithFormat:@"Redisplay dismissed: %@ and data: %@", messageDismissed ? @"YES" : @"NO", redisplayMessageSavedData.jsonRepresentationInternal.description]]; if (messageDismissed && redisplayMessageSavedData) { - [OneSignalLog onesignalLog:ONE_S_LL_VERBOSE message:[NSString stringWithFormat:@"Redisplay IAM: %@", message.jsonRepresentation.description]]; + [OneSignalLog onesignalLog:ONE_S_LL_VERBOSE message:[NSString stringWithFormat:@"Redisplay IAM: %@", message.jsonRepresentationInternal.description]]; + message.displayStats.displayQuantity = redisplayMessageSavedData.displayStats.displayQuantity; message.displayStats.lastDisplayTime = redisplayMessageSavedData.displayStats.lastDisplayTime; // Message that don't have triggers should display only once per session BOOL triggerHasChanged = [self hasMessageTriggerChanged:message]; - [OneSignal onesignalLog:ONE_S_LL_VERBOSE message:[NSString stringWithFormat:@"setDataForRedisplay with message: %@ \ntriggerHasChanged: %@ \nno triggers: %@ \ndisplayed in session saved: %@", message, message.isTriggerChanged ? @"YES" : @"NO", [message.triggers count] == 0 ? @"YES" : @"NO", redisplayMessageSavedData.isDisplayedInSession ? @"YES" : @"NO"]]; + [OneSignalLog onesignalLog:ONE_S_LL_VERBOSE message:[NSString stringWithFormat:@"setDataForRedisplay with message: %@ \ntriggerHasChanged: %@ \nno triggers: %@ \ndisplayed in session saved: %@", message, message.isTriggerChanged ? @"YES" : @"NO", [message.triggers count] == 0 ? @"YES" : @"NO", redisplayMessageSavedData.isDisplayedInSession ? @"YES" : @"NO"]]; // Check if conditions are correct for redisplay if (triggerHasChanged && [message.displayStats isDelayTimeSatisfied:self.dateGenerator()] && [message.displayStats shouldDisplayAgain]) { - [OneSignal onesignalLog:ONE_S_LL_VERBOSE message:@"setDataForRedisplay clear arrays"]; + [OneSignalLog onesignalLog:ONE_S_LL_VERBOSE message:@"setDataForRedisplay clear arrays"]; [self.seenInAppMessages removeObject:message.messageId]; [self.impressionedInAppMessages removeObject:message.messageId]; @@ -525,16 +651,17 @@ - (BOOL)shouldShowInAppMessage:(OSInAppMessageInternal *)message { return ![self.seenInAppMessages containsObject:message.messageId] && [self.triggerController messageMatchesTriggers:message] && ![message isFinished] && - OneSignal.isRegisterUserFinished; + OneSignalUserManagerImpl.sharedInstance.pushSubscriptionId != nil; + return true; } -- (void)handleMessageActionWithURL:(OSInAppMessageAction *)action { - switch (action.urlActionType) { +- (void)handleMessageActionWithURL:(OSInAppMessageClickResult *)action { + switch (action.urlTarget) { case OSInAppMessageActionUrlTypeSafari: - [[UIApplication sharedApplication] openURL:action.clickUrl options:@{} completionHandler:^(BOOL success) {}]; + [[UIApplication sharedApplication] openURL:[NSURL URLWithString:action.url] options:@{} completionHandler:^(BOOL success) {}]; break; case OSInAppMessageActionUrlTypeWebview: - [OneSignalHelper displayWebView:action.clickUrl]; + [OneSignalWebViewManager displayWebView:[NSURL URLWithString:action.url]]; break; case OSInAppMessageActionUrlTypeReplaceContent: // This case is handled by the in-app message view controller. @@ -569,6 +696,11 @@ - (void)removeTriggersForKeys:(NSArray *)keys { [self.triggerController removeTriggersForKeys:keys]; } +- (void)clearTriggers { + NSDictionary *allTriggers = [self getTriggers]; + [self removeTriggersForKeys:allTriggers.allKeys]; +} + - (NSDictionary *)getTriggers { return self.triggerController.getTriggers; } @@ -588,7 +720,7 @@ - (void)messageViewControllerWillDismiss:(OSInAppMessageInternal *)message { - (void)messageViewControllerWasDismissed:(OSInAppMessageInternal *)message displayed:(BOOL)displayed { @synchronized (self.messageDisplayQueue) { - [OneSignal onesignalLog:ONE_S_LL_VERBOSE message:@"Dismissing IAM and preparing to show next IAM"]; + [OneSignalLog onesignalLog:ONE_S_LL_VERBOSE message:@"Dismissing IAM and preparing to show next IAM"]; // Remove DIRECT influence due to ClickHandler of ClickAction outcomes [[OSSessionManager sharedSessionManager] onDirectInfluenceFromIAMClickFinished]; @@ -600,20 +732,20 @@ - (void)messageViewControllerWasDismissed:(OSInAppMessageInternal *)message disp OSInAppMessageInternal *showingIAM = self.messageDisplayQueue.firstObject; [self.seenInAppMessages addObject:showingIAM.messageId]; [OneSignalUserDefaults.initStandard saveSetForKey:OS_IAM_SEEN_SET_KEY withValue:self.seenInAppMessages]; - [OneSignal onesignalLog:ONE_S_LL_VERBOSE message:[NSString stringWithFormat:@"Dismissing IAM save seenInAppMessages: %@", _seenInAppMessages]]; + [OneSignalLog onesignalLog:ONE_S_LL_VERBOSE message:[NSString stringWithFormat:@"Dismissing IAM save seenInAppMessages: %@", _seenInAppMessages]]; // Remove dismissed IAM from messageDisplayQueue [self.messageDisplayQueue removeObjectAtIndex:0]; [self persistInAppMessageForRedisplay:showingIAM]; } // Reset the IAM viewController to prepare for next IAM if one exists - [self cleanUpInAppWindow]; + self.viewController = nil; // Reset time since last IAM [self setAndPersistTimeSinceLastMessage]; if (!_currentPromptAction) { [self evaluateMessageDisplayQueue]; } else { //do nothing prompt is handling the re-showing - [OneSignal onesignalLog:ONE_S_LL_VERBOSE message:@"Stop evaluateMessageDisplayQueue because prompt is currently displayed"]; + [OneSignalLog onesignalLog:ONE_S_LL_VERBOSE message:@"Stop evaluateMessageDisplayQueue because prompt is currently displayed"]; } } } @@ -641,7 +773,7 @@ - (void)setAndPersistTimeSinceLastMessage { } - (void)evaluateMessageDisplayQueue { - [OneSignal onesignalLog:ONE_S_LL_VERBOSE message:@"Evaluating message display queue"]; + [OneSignalLog onesignalLog:ONE_S_LL_VERBOSE message:@"Evaluating message display queue"]; // No IAMs are showing currently self.isInAppMessageShowing = false; @@ -659,7 +791,7 @@ - (void)evaluateMessageDisplayQueue { - (void)persistInAppMessageForRedisplay:(OSInAppMessageInternal *)message { // If the IAM doesn't have the re display prop or is a preview IAM there is no need to save it if (![message.displayStats isRedisplayEnabled] || message.isPreview) { - [OneSignal onesignalLog:ONE_S_LL_VERBOSE message:[NSString stringWithFormat:@"not persisting %@",message.displayStats]]; + [OneSignalLog onesignalLog:ONE_S_LL_VERBOSE message:[NSString stringWithFormat:@"not persisting %@",message.displayStats]]; return; } @@ -669,19 +801,19 @@ - (void)persistInAppMessageForRedisplay:(OSInAppMessageInternal *)message { message.isTriggerChanged = false; message.isDisplayedInSession = true; - [OneSignal onesignalLog:ONE_S_LL_VERBOSE message:[NSString stringWithFormat:@"redisplayedInAppMessages: %@", [_redisplayedInAppMessages description]]]; + [OneSignalLog onesignalLog:ONE_S_LL_VERBOSE message:[NSString stringWithFormat:@"redisplayedInAppMessages: %@", [_redisplayedInAppMessages description]]]; // Update the data to enable future re displays // Avoid calling the userdefault data again [_redisplayedInAppMessages setObject:message forKey:message.messageId]; [OneSignalUserDefaults.initStandard saveCodeableDataForKey:OS_IAM_REDISPLAY_DICTIONARY withValue:_redisplayedInAppMessages]; - [OneSignal onesignalLog:ONE_S_LL_VERBOSE message:[NSString stringWithFormat:@"persistInAppMessageForRedisplay: %@ \nredisplayedInAppMessages: %@", [message description], _redisplayedInAppMessages]]; + [OneSignalLog onesignalLog:ONE_S_LL_VERBOSE message:[NSString stringWithFormat:@"persistInAppMessageForRedisplay: %@ \nredisplayedInAppMessages: %@", [message description], _redisplayedInAppMessages]]; let standardUserDefaults = OneSignalUserDefaults.initStandard; let redisplayedInAppMessages = [[NSMutableDictionary alloc] initWithDictionary:[standardUserDefaults getSavedCodeableDataForKey:OS_IAM_REDISPLAY_DICTIONARY defaultValue:[NSMutableDictionary new]]]; - [OneSignal onesignalLog:ONE_S_LL_VERBOSE message:[NSString stringWithFormat:@"persistInAppMessageForRedisplay saved redisplayedInAppMessages: %@", [redisplayedInAppMessages description]]]; + [OneSignalLog onesignalLog:ONE_S_LL_VERBOSE message:[NSString stringWithFormat:@"persistInAppMessageForRedisplay saved redisplayedInAppMessages: %@", [redisplayedInAppMessages description]]]; } - (void)handlePromptActions:(NSArray *> *)promptActions withMessage:(OSInAppMessageInternal *)inAppMessage { @@ -695,10 +827,10 @@ - (void)handlePromptActions:(NSArray *> *)promptA } if (_currentPromptAction) { - [OneSignal onesignalLog:ONE_S_LL_VERBOSE message:[NSString stringWithFormat:@"IAM prompt to handle: %@", [_currentPromptAction description]]]; + [OneSignalLog onesignalLog:ONE_S_LL_VERBOSE message:[NSString stringWithFormat:@"IAM prompt to handle: %@", [_currentPromptAction description]]]; _currentPromptAction.hasPrompted = YES; [_currentPromptAction handlePrompt:^(PromptActionResult result) { - [OneSignal onesignalLog:ONE_S_LL_VERBOSE message:[NSString stringWithFormat:@"IAM prompt to handle finished accepted: %u", result]]; + [OneSignalLog onesignalLog:ONE_S_LL_VERBOSE message:[NSString stringWithFormat:@"IAM prompt to handle finished accepted: %u", result]]; if (inAppMessage.isPreview && result == LOCATION_PERMISSIONS_MISSING_INFO_PLIST) { [self showAlertDialogMessage:inAppMessage promptActions:promptActions]; } else { @@ -706,7 +838,7 @@ - (void)handlePromptActions:(NSArray *> *)promptA } }]; } else if (!_viewController) { // IAM dismissed by action - [OneSignal onesignalLog:ONE_S_LL_VERBOSE message:@"IAM with prompt dismissed from actionTaken"]; + [OneSignalLog onesignalLog:ONE_S_LL_VERBOSE message:@"IAM with prompt dismissed from actionTaken"]; _currentInAppMessage = nil; _currentPromptActions = nil; [self evaluateMessageDisplayQueue]; @@ -721,26 +853,32 @@ - (void)showAlertDialogMessage:(OSInAppMessageInternal *)inAppMessage let message = NSLocalizedString(@"Looks like this app doesn't have location services configured. Please see OneSignal docs for more information.", @"An alert message indicating that the application is not configured to use have location services."); let title = NSLocalizedString(@"Location Not Available", @"An alert title indicating that the location service is unavailable."); let okAction = NSLocalizedString(@"OK", @"Allows the user to acknowledge and dismiss the alert"); - [[OneSignalDialogController sharedInstance] presentDialogWithTitle:title withMessage:message withActions:nil cancelTitle:okAction withActionCompletion:^(int tappedActionIndex) { + [[OSDialogInstanceManager sharedInstance] presentDialogWithTitle:title withMessage:message withActions:nil cancelTitle:okAction withActionCompletion:^(int tappedActionIndex) { //completion is called on the main thread [self handlePromptActions:_currentPromptActions withMessage:_currentInAppMessage]; }]; } -- (void)messageViewDidSelectAction:(OSInAppMessageInternal *)message withAction:(OSInAppMessageAction *)action { +- (void)messageViewDidSelectAction:(OSInAppMessageInternal *)message withAction:(OSInAppMessageClickResult *)action { // Assign firstClick BOOL based on message being clicked previously or not action.firstClick = [message takeActionAsUnique]; - if (action.clickUrl) + if (action.url) [self handleMessageActionWithURL:action]; if (action.promptActions && action.promptActions.count > 0) [self handlePromptActions:action.promptActions withMessage:message]; - - if (self.actionClickBlock) { - // Any outcome sent on this callback should count as DIRECT from this IAM + + if (_clickListeners.count > 0) { + // Any outcome sent on the listener's callback should count as DIRECT from this IAM [[OSSessionManager sharedSessionManager] onDirectInfluenceFromIAMClick:message.messageId]; - self.actionClickBlock(action); + } + + for (NSObject *listener in _clickListeners) { + if ([listener respondsToSelector:@selector(onClickInAppMessage:)]) { + OSInAppMessageClickEvent *event = [[OSInAppMessageClickEvent alloc] initWithInAppMessage:message clickResult:action]; + [listener onClickInAppMessage:event]; + } } if (message.isPreview) { @@ -772,12 +910,12 @@ - (void)messageWillDisplay:(nonnull OSInAppMessageInternal *)message { /* * Show the developer what will happen with a non IAM preview */ -- (void)processPreviewInAppMessage:(OSInAppMessageInternal *)message withAction:(OSInAppMessageAction *)action { +- (void)processPreviewInAppMessage:(OSInAppMessageInternal *)message withAction:(OSInAppMessageClickResult *)action { if (action.tags) - [OneSignal onesignalLog:ONE_S_LL_VERBOSE message:[NSString stringWithFormat:@"Tags detected inside of the action click payload, ignoring because action came from IAM preview\nTags: %@", action.tags.jsonRepresentation]]; + [OneSignalLog onesignalLog:ONE_S_LL_VERBOSE message:[NSString stringWithFormat:@"Tags detected inside of the action click payload, ignoring because action came from IAM preview\nTags: %@", action.tags.jsonRepresentation]]; if (action.outcomes.count > 0) { - [OneSignal onesignalLog:ONE_S_LL_VERBOSE message:[NSString stringWithFormat:@"Outcomes detected inside of the action click payload, ignoring because action came from IAM preview: %@", [action.outcomes description]]]; + [OneSignalLog onesignalLog:ONE_S_LL_VERBOSE message:[NSString stringWithFormat:@"Outcomes detected inside of the action click payload, ignoring because action came from IAM preview: %@", [action.outcomes description]]]; } } @@ -791,14 +929,13 @@ - (BOOL)isClickAvailable:(OSInAppMessageInternal *)message withClickId:(NSString return ([message.displayStats isRedisplayEnabled] && [message isClickAvailable:clickId]) || ![_clickedClickIds containsObject:clickId]; } -- (void)sendClickRESTCall:(OSInAppMessageInternal *)message withAction:(OSInAppMessageAction *)action { +- (void)sendClickRESTCall:(OSInAppMessageInternal *)message withAction:(OSInAppMessageClickResult *)action { let clickId = action.clickId; // If the IAM clickId exists within the cached clickedClickIds return early so the click is not tracked // unless that click is from an IAM with redisplay // Handles body, button, or image clicks if (![self isClickAvailable:message withClickId:clickId]) return; - if (!clickId) { [OneSignalLog onesignalLog:ONE_S_LL_ERROR message:@"sendClickRESTCall:withAction: call could not be made because the click action does not have an id."]; return; @@ -807,9 +944,9 @@ - (void)sendClickRESTCall:(OSInAppMessageInternal *)message withAction:(OSInAppM [self.clickedClickIds addObject:clickId]; // Track clickId per IAM [message addClickId:clickId]; - - let metricsRequest = [OSRequestInAppMessageClicked withAppId:OneSignal.appId - withPlayerId:OneSignal.currentSubscriptionState.userId + + let metricsRequest = [OSRequestInAppMessageClicked withAppId:OneSignalConfigManager.getAppId + withPlayerId:OneSignalUserManagerImpl.sharedInstance.pushSubscriptionId withMessageId:message.messageId forVariantId:message.variantId withAction:action]; @@ -817,27 +954,27 @@ - (void)sendClickRESTCall:(OSInAppMessageInternal *)message withAction:(OSInAppM [OneSignalClient.sharedClient executeRequest:metricsRequest onSuccess:^(NSDictionary *result) { NSString *successMessage = [NSString stringWithFormat:@"In App Message with id: %@, successful POST click update for click id: %@, with result: %@", message.messageId, action.clickId, result]; - [OneSignal onesignalLog:ONE_S_LL_DEBUG message:successMessage]; + [OneSignalLog onesignalLog:ONE_S_LL_DEBUG message:successMessage]; // Save the updated clickedClickIds since click was tracked successfully [OneSignalUserDefaults.initStandard saveSetForKey:OS_IAM_CLICKED_SET_KEY withValue:self.clickedClickIds]; } onFailure:^(NSError *error) { NSString *errorMessage = [NSString stringWithFormat:@"In App Message with id: %@, failed POST click update for click id: %@, with error: %@", message.messageId, action.clickId, error]; - [OneSignal onesignalLog:ONE_S_LL_ERROR message:errorMessage]; + [OneSignalLog onesignalLog:ONE_S_LL_ERROR message:errorMessage]; // Remove clickId from local clickedClickIds since click was not tracked [self.clickedClickIds removeObject:action.clickId]; }]; } -- (void)sendTagCallWithAction:(OSInAppMessageAction *)action { +- (void)sendTagCallWithAction:(OSInAppMessageClickResult *)action { if (action.tags) { OSInAppMessageTag *tag = action.tags; if (tag.tagsToAdd) - [OneSignal sendTags:tag.tagsToAdd]; + [OneSignalUserManagerImpl.sharedInstance addTags:tag.tagsToAdd]; if (tag.tagsToRemove) - [OneSignal deleteTags:tag.tagsToRemove]; + [OneSignalUserManagerImpl.sharedInstance removeTags:tag.tagsToRemove]; } } @@ -845,7 +982,16 @@ - (void)sendOutcomes:(NSArray*)outcomes forMessageId:(N if (outcomes.count == 0) return; [[OSSessionManager sharedSessionManager] onDirectInfluenceFromIAMClick:messageId]; - [OneSignal sendClickActionOutcomes:outcomes]; + [self sendClickActionOutcomes:outcomes]; +} + +- (void)sendClickActionOutcomes:(NSArray *)outcomes { + if (![OSOutcomes sharedController]) { + [OneSignalLog onesignalLog:ONE_S_LL_ERROR message:@"Make sure OneSignal init is called first"]; + return; + } + + [OSOutcomes.sharedController sendClickActionOutcomes:outcomes appId:OneSignalConfigManager.getAppId deviceType:[NSNumber numberWithInt:DEVICE_TYPE_PUSH]]; } /* @@ -866,6 +1012,7 @@ - (void)webViewContentFinishedLoading:(OSInAppMessageInternal *)message { self.window.windowLevel = UIWindowLevelAlert; self.window.frame = [[UIScreen mainScreen] bounds]; } + self.window.rootViewController = _viewController; self.window.backgroundColor = [UIColor clearColor]; self.window.opaque = true; @@ -889,7 +1036,7 @@ - (void)addKeySceneToWindow:(UIWindow*)window { } - (void)dynamicTriggerCompleted:(NSString *)triggerId { - [OneSignal onesignalLog:ONE_S_LL_VERBOSE message:[NSString stringWithFormat:@"messageDynamicTriggerCompleted called with triggerId: %@", triggerId]]; + [OneSignalLog onesignalLog:ONE_S_LL_VERBOSE message:[NSString stringWithFormat:@"messageDynamicTriggerCompleted called with triggerId: %@", triggerId]]; [self makeRedisplayMessagesAvailableWithTriggers:@[triggerId]]; } @@ -906,7 +1053,7 @@ - (void)makeRedisplayMessagesAvailableWithTriggers:(NSArray *)trigge - (void)triggerConditionChanged { // We should re-evaluate all in-app messages - [OneSignal onesignalLog:ONE_S_LL_VERBOSE message:@"Trigger condition changed"]; + [OneSignalLog onesignalLog:ONE_S_LL_VERBOSE message:@"Trigger condition changed"]; [self evaluateMessages]; } @@ -915,11 +1062,35 @@ - (void)onApplicationDidBecomeActive { // To avoid excesive message evaluation // we should re-evaluate all in-app messages only if it was paused by inactive if (_isAppInactive) { - [OneSignal onesignalLog:ONE_S_LL_VERBOSE message:@"Evaluating messages due to inactive app"]; + [OneSignalLog onesignalLog:ONE_S_LL_VERBOSE message:@"Evaluating messages due to inactive app"]; _isAppInactive = NO; [self evaluateMessages]; } } + +#pragma mark OSPushSubscriptionObserver Methods +- (void)onPushSubscriptionDidChangeWithState:(OSPushSubscriptionChangedState * _Nonnull)state { + // Don't pull IAMs if the new subscription ID is nil + if (state.current.id == nil) { + [OneSignalLog onesignalLog:ONE_S_LL_VERBOSE message:@"OSMessagingController onPushSubscriptionDidChange: changed to nil subscription id"]; + return; + } + // Don't pull IAMs if the subscription ID has not changed + if (state.previous.id != nil && + [state.current.id isEqualToString:state.previous.id]) { + [OneSignalLog onesignalLog:ONE_S_LL_VERBOSE message:@"OSMessagingController onPushSubscriptionDidChange: changed to the same subscription id"]; + return; + } + + // Pull new IAMs when the subscription id changes to a new valid subscription id + [OneSignalLog onesignalLog:ONE_S_LL_VERBOSE message:@"OSMessagingController onPushSubscriptionDidChange: changed to new valid subscription id"]; + [self getInAppMessagesFromServer:state.current.id]; +} + +- (void)dealloc { + [[NSNotificationCenter defaultCenter] removeObserver:self]; +} + @end @implementation DummyOSMessagingController @@ -928,23 +1099,25 @@ + (OSMessagingController *)sharedInstance {return nil; } - (instancetype)init { self = [super init]; return self; } - (BOOL)isInAppMessagingPaused { return false; } - (void)setInAppMessagingPaused:(BOOL)pause {} -- (void)updateInAppMessagesFromOnSession:(NSArray *)newMessages {} -- (void)setInAppMessageClickHandler:(OSInAppMessageClickBlock)actionClickBlock {} +- (void)getInAppMessagesFromServer {} +- (void)addInAppMessageClickListener:(NSObject *)listener {} +- (void)removeInAppMessageClickListener:(NSObject *)listener {} - (void)presentInAppMessage:(OSInAppMessageInternal *)message {} - (void)presentInAppPreviewMessage:(OSInAppMessageInternal *)message {} - (void)displayMessage:(OSInAppMessageInternal *)message {} - (void)messageViewImpressionRequest:(OSInAppMessageInternal *)message {} - (void)evaluateMessages {} - (BOOL)shouldShowInAppMessage:(OSInAppMessageInternal *)message { return false; } -- (void)handleMessageActionWithURL:(OSInAppMessageAction *)action {} +- (void)handleMessageActionWithURL:(OSInAppMessageClickResult *)action {} #pragma mark Trigger Methods - (void)addTriggers:(NSDictionary *)triggers {} - (void)removeTriggersForKeys:(NSArray *)keys {} +- (void)clearTriggers {} - (NSDictionary *)getTriggers { return @{}; } - (id)getTriggerValueForKey:(NSString *)key { return 0; } #pragma mark OSInAppMessageViewControllerDelegate Methods - (void)messageViewControllerWasDismissed {} -- (void)messageViewDidSelectAction:(OSInAppMessageInternal *)message withAction:(OSInAppMessageAction *)action {} +- (void)messageViewDidSelectAction:(OSInAppMessageInternal *)message withAction:(OSInAppMessageClickResult *)action {} - (void)webViewContentFinishedLoading:(OSInAppMessageInternal *)message {} #pragma mark OSTriggerControllerDelegate Methods - (void)triggerConditionChanged {} diff --git a/iOS_SDK/OneSignalSDK/Source/OSTriggerController.h b/iOS_SDK/OneSignalSDK/OneSignalInAppMessages/Controller/OSTriggerController.h similarity index 100% rename from iOS_SDK/OneSignalSDK/Source/OSTriggerController.h rename to iOS_SDK/OneSignalSDK/OneSignalInAppMessages/Controller/OSTriggerController.h diff --git a/iOS_SDK/OneSignalSDK/Source/OSTriggerController.m b/iOS_SDK/OneSignalSDK/OneSignalInAppMessages/Controller/OSTriggerController.m similarity index 96% rename from iOS_SDK/OneSignalSDK/Source/OSTriggerController.m rename to iOS_SDK/OneSignalSDK/OneSignalInAppMessages/Controller/OSTriggerController.m index 00a750be6..8499192ab 100644 --- a/iOS_SDK/OneSignalSDK/Source/OSTriggerController.m +++ b/iOS_SDK/OneSignalSDK/OneSignalInAppMessages/Controller/OSTriggerController.m @@ -27,7 +27,6 @@ #import "OSTriggerController.h" #import "OSInAppMessagingDefines.h" -#import "OneSignalHelper.h" @interface OSTriggerController () @property (strong, nonatomic, nonnull) NSMutableDictionary *triggers; @@ -257,7 +256,7 @@ - (BOOL)trigger:(NSString *)value matchesStringValue:(NSString *)realValue opera case OSTriggerOperatorTypeNotEqualTo: return ![realValue isEqualToString:value]; default: - [OneSignal onesignalLog:ONE_S_LL_ERROR message:[NSString stringWithFormat:@"Attempted to use an invalid comparison operator (%@) on a string type", OS_OPERATOR_TO_STRING(operatorType)]]; + [OneSignalLog onesignalLog:ONE_S_LL_ERROR message:[NSString stringWithFormat:@"Attempted to use an invalid comparison operator (%@) on a string type", OS_OPERATOR_TO_STRING(operatorType)]]; } return false; } @@ -279,7 +278,7 @@ - (BOOL)trigger:(NSNumber *)value matchesNumericValue:(id)realValue operatorType case OSTriggerOperatorTypeExists: case OSTriggerOperatorTypeNotExists: case OSTriggerOperatorTypeContains: - [OneSignal onesignalLog:ONE_S_LL_ERROR message:[NSString stringWithFormat:@"Attempted to compare/check equality for a non-comparative operator (%@)", OS_OPERATOR_TO_STRING(operatorType)]]; + [OneSignalLog onesignalLog:ONE_S_LL_ERROR message:[NSString stringWithFormat:@"Attempted to compare/check equality for a non-comparative operator (%@)", OS_OPERATOR_TO_STRING(operatorType)]]; } return false; } diff --git a/iOS_SDK/OneSignalSDK/Source/OSInAppMessageBridgeEvent.h b/iOS_SDK/OneSignalSDK/OneSignalInAppMessages/Model/OSInAppMessageBridgeEvent.h similarity index 95% rename from iOS_SDK/OneSignalSDK/Source/OSInAppMessageBridgeEvent.h rename to iOS_SDK/OneSignalSDK/OneSignalInAppMessages/Model/OSInAppMessageBridgeEvent.h index 915fa412d..eb4886ed5 100644 --- a/iOS_SDK/OneSignalSDK/Source/OSInAppMessageBridgeEvent.h +++ b/iOS_SDK/OneSignalSDK/OneSignalInAppMessages/Model/OSInAppMessageBridgeEvent.h @@ -26,7 +26,7 @@ */ #import -#import "OSInAppMessageAction.h" +#import "OSInAppMessageClickResult.h" #import "OSInAppMessagePage.h" #import "OSInAppMessagingDefines.h" #import @@ -59,7 +59,7 @@ typedef NS_ENUM(NSUInteger, OSInAppMessageBridgeEventType) { @property (nonatomic) OSInAppMessageBridgeEventRenderingComplete *renderingComplete; @property (nonatomic) OSInAppMessageBridgeEventResize *resize; @property (nonatomic, nullable) OSInAppMessageBridgeEventPageChange *pageChange; -@property (strong, nonatomic, nullable) OSInAppMessageAction *userAction; +@property (strong, nonatomic, nullable) OSInAppMessageClickResult *userAction; @end NS_ASSUME_NONNULL_END diff --git a/iOS_SDK/OneSignalSDK/Source/OSInAppMessageBridgeEvent.m b/iOS_SDK/OneSignalSDK/OneSignalInAppMessages/Model/OSInAppMessageBridgeEvent.m similarity index 94% rename from iOS_SDK/OneSignalSDK/Source/OSInAppMessageBridgeEvent.m rename to iOS_SDK/OneSignalSDK/OneSignalInAppMessages/Model/OSInAppMessageBridgeEvent.m index 116119a34..52c5f1c79 100644 --- a/iOS_SDK/OneSignalSDK/Source/OSInAppMessageBridgeEvent.m +++ b/iOS_SDK/OneSignalSDK/OneSignalInAppMessages/Model/OSInAppMessageBridgeEvent.m @@ -26,8 +26,7 @@ */ #import "OSInAppMessageBridgeEvent.h" -#import "OSInAppMessageAction.h" -#import "OneSignalHelper.h" +#import "OSInAppMessageClickResult.h" @implementation OSInAppMessageBridgeEvent @@ -35,7 +34,7 @@ + (instancetype)instanceWithData:(NSData *)data { NSError *error; NSDictionary *json = [NSJSONSerialization JSONObjectWithData:data options:NSJSONReadingAllowFragments error:&error]; if (error || !json) { - [OneSignal onesignalLog:ONE_S_LL_WARN message:[NSString stringWithFormat:@"Unable to decode JS-bridge event with error: %@", error.description ?: @"Unknown Error"]]; + [OneSignalLog onesignalLog:ONE_S_LL_WARN message:[NSString stringWithFormat:@"Unable to decode JS-bridge event with error: %@", error.description ?: @"Unknown Error"]]; return nil; } @@ -55,7 +54,7 @@ + (instancetype _Nullable)instanceWithJson:(NSDictionary *)json { // deserialize the action JSON if ([json[@"body"] isKindOfClass:[NSDictionary class]]) { - let action = [OSInAppMessageAction instanceWithJson:json[@"body"]]; + let action = [OSInAppMessageClickResult instanceWithJson:json[@"body"]]; if (!action) return nil; diff --git a/iOS_SDK/OneSignalSDK/OneSignalInAppMessages/Model/OSInAppMessageClickEvent.h b/iOS_SDK/OneSignalSDK/OneSignalInAppMessages/Model/OSInAppMessageClickEvent.h new file mode 100644 index 000000000..d6a5d064a --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignalInAppMessages/Model/OSInAppMessageClickEvent.h @@ -0,0 +1,38 @@ +/** + * Modified MIT License + * + * Copyright 2023 OneSignal + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * 1. The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * 2. All copies of substantial portions of the Software may only be used in connection + * with services provided by OneSignal. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#import +#import "OneSignalInAppMessages.h" +#import "OSInAppMessageInternal.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface OSInAppMessageClickEvent () +- (instancetype _Nonnull)initWithInAppMessage:(OSInAppMessageInternal *)message clickResult:(OSInAppMessageClickResult *)result; +@end + +NS_ASSUME_NONNULL_END diff --git a/iOS_SDK/OneSignalSDK/Source/LanguageProviderAppDefined.m b/iOS_SDK/OneSignalSDK/OneSignalInAppMessages/Model/OSInAppMessageClickEvent.m similarity index 65% rename from iOS_SDK/OneSignalSDK/Source/LanguageProviderAppDefined.m rename to iOS_SDK/OneSignalSDK/OneSignalInAppMessages/Model/OSInAppMessageClickEvent.m index 0d6e701a6..ee6da0999 100644 --- a/iOS_SDK/OneSignalSDK/Source/LanguageProviderAppDefined.m +++ b/iOS_SDK/OneSignalSDK/OneSignalInAppMessages/Model/OSInAppMessageClickEvent.m @@ -1,7 +1,7 @@ /** * Modified MIT License * - * Copyright 2021 OneSignal + * Copyright 2023 OneSignal * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -24,18 +24,27 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ -#import "LanguageProviderAppDefined.h" -#import "OneSignalHelper.h" -#import "LanguageContext.h" -@implementation LanguageProviderAppDefined -- (void)setLanguage:(NSString *)language { - [OneSignalUserDefaults.initStandard saveStringForKey:OSUD_LANGUAGE withValue:language]; +#import "OSInAppMessageClickEvent.h" + +@implementation OSInAppMessageClickEvent + +- (instancetype)initWithInAppMessage:(OSInAppMessageInternal *)message clickResult:(OSInAppMessageClickResult *)result { + _message = message; + _result = result; + return self; +} + +- (NSDictionary *)jsonRepresentation { + let json = [NSMutableDictionary new]; + json[@"message"] = [self.message jsonRepresentation]; + json[@"result"] = [self.result jsonRepresentation]; + return json; } -- (NSString *)language { - return [OneSignalUserDefaults.initStandard getSavedStringForKey:OSUD_LANGUAGE defaultValue:DEFAULT_LANGUAGE]; +- (NSString *)description { + return [NSString stringWithFormat:@"OSInAppMessageClickEvent message: %@ \nresult: %@", _message, [_result description]]; } @end diff --git a/iOS_SDK/OneSignalSDK/Source/OSInAppMessageAction.h b/iOS_SDK/OneSignalSDK/OneSignalInAppMessages/Model/OSInAppMessageClickResult.h similarity index 78% rename from iOS_SDK/OneSignalSDK/Source/OSInAppMessageAction.h rename to iOS_SDK/OneSignalSDK/OneSignalInAppMessages/Model/OSInAppMessageClickResult.h index e9ed0b688..4206bad62 100644 --- a/iOS_SDK/OneSignalSDK/Source/OSInAppMessageAction.h +++ b/iOS_SDK/OneSignalSDK/OneSignalInAppMessages/Model/OSInAppMessageClickResult.h @@ -30,18 +30,11 @@ #import "OSInAppMessageTag.h" #import #import "OSInAppMessagePrompt.h" +#import "OneSignalInAppMessages.h" NS_ASSUME_NONNULL_BEGIN -typedef NS_ENUM(NSUInteger, OSInAppMessageActionUrlType) { - OSInAppMessageActionUrlTypeSafari, - - OSInAppMessageActionUrlTypeWebview, - - OSInAppMessageActionUrlTypeReplaceContent -}; - -@interface OSInAppMessageAction () +@interface OSInAppMessageClickResult () // The type of element that was clicked, button or image @property (strong, nonatomic, nonnull) NSString *clickType; @@ -49,11 +42,21 @@ typedef NS_ENUM(NSUInteger, OSInAppMessageActionUrlType) { // The unique identifier for this click @property (strong, nonatomic, nonnull) NSString *clickId; +//UUID for the page in an IAM Carousel +@property (strong, nonatomic, nullable) NSString *pageId; + + +// Whether or not the click action is first click on the IAM +@property (nonatomic) BOOL firstClick; + // The prompt action available @property (nonatomic, nullable) NSArray*> *promptActions; -// Determines where the URL is loaded, ie. app opens a webview -@property (nonatomic) OSInAppMessageActionUrlType urlActionType; +// The outcome to send for this action +@property (strong, nonatomic, nullable) NSArray *outcomes; + +// The tags to send for this action +@property (strong, nonatomic, nullable) OSInAppMessageTag *tags; @end diff --git a/iOS_SDK/OneSignalSDK/Source/OSInAppMessageAction.m b/iOS_SDK/OneSignalSDK/OneSignalInAppMessages/Model/OSInAppMessageClickResult.m similarity index 73% rename from iOS_SDK/OneSignalSDK/Source/OSInAppMessageAction.m rename to iOS_SDK/OneSignalSDK/OneSignalInAppMessages/Model/OSInAppMessageClickResult.m index 53d5b0509..24a479bdf 100644 --- a/iOS_SDK/OneSignalSDK/Source/OSInAppMessageAction.m +++ b/iOS_SDK/OneSignalSDK/OneSignalInAppMessages/Model/OSInAppMessageClickResult.m @@ -25,12 +25,11 @@ * THE SOFTWARE. */ -#import "OneSignalHelper.h" -#import "OSInAppMessageAction.h" +#import "OSInAppMessageClickResult.h" #import "OSInAppMessagePushPrompt.h" #import "OSInAppMessageLocationPrompt.h" -@implementation OSInAppMessageAction +@implementation OSInAppMessageClickResult #define OS_URL_ACTION_TYPES @[@"browser", @"webview", @"replacement"] #define OS_IS_VALID_URL_ACTION(string) [OS_URL_ACTION_TYPES containsObject:string] @@ -41,7 +40,7 @@ + (instancetype _Nullable)instanceWithData:(NSData *)data { NSDictionary *json = [NSJSONSerialization JSONObjectWithData:data options:0 error:&error]; if (error || !json) { - [OneSignal onesignalLog:ONE_S_LL_ERROR message:[NSString stringWithFormat:@"Unable to decode in-app message JSON: %@", error.description ?: @"No Data"]]; + [OneSignalLog onesignalLog:ONE_S_LL_ERROR message:[NSString stringWithFormat:@"Unable to decode in-app message JSON: %@", error.description ?: @"No Data"]]; return nil; } @@ -49,7 +48,7 @@ + (instancetype _Nullable)instanceWithData:(NSData *)data { } + (instancetype _Nullable)instanceWithJson:(NSDictionary *)json { - OSInAppMessageAction *action = [OSInAppMessageAction new]; + OSInAppMessageClickResult *action = [OSInAppMessageClickResult new]; // on click goes here if ([json[@"click_type"] isKindOfClass:[NSString class]]) action.clickType = json[@"click_type"]; @@ -58,25 +57,25 @@ + (instancetype _Nullable)instanceWithJson:(NSDictionary *)json { action.clickId = json[@"id"]; if ([json[@"url"] isKindOfClass:[NSString class]]) - action.clickUrl = [NSURL URLWithString:json[@"url"]]; + action.url = json[@"url"]; if ([json[@"name"] isKindOfClass:[NSString class]]) - action.clickName = json[@"name"]; + action.actionId = json[@"name"]; if ([json[@"pageId"] isKindOfClass:[NSString class]]) action.pageId = json[@"pageId"]; if ([json[@"url_target"] isKindOfClass:[NSString class]] && OS_IS_VALID_URL_ACTION(json[@"url_target"])) - action.urlActionType = OS_URL_ACTION_TYPE_FROM_STRING(json[@"url_target"]); + action.urlTarget = OS_URL_ACTION_TYPE_FROM_STRING(json[@"url_target"]); else - action.urlActionType = OSInAppMessageActionUrlTypeWebview; + action.urlTarget = OSInAppMessageActionUrlTypeWebview; if ([json[@"close"] isKindOfClass:[NSNumber class]]) - action.closesMessage = [json[@"close"] boolValue]; + action.closingMessage = [json[@"close"] boolValue]; else - action.closesMessage = true; // Default behavior + action.closingMessage = true; // Default behavior - [OneSignal onesignalLog:ONE_S_LL_VERBOSE message:[NSString stringWithFormat:@"OSInAppMessageAction %@", json]]; + [OneSignalLog onesignalLog:ONE_S_LL_VERBOSE message:[NSString stringWithFormat:@"OSInAppMessageClickResult %@", json]]; NSMutableArray *outcomes = [NSMutableArray new]; //TODO: when backend is ready check that key matches @@ -122,30 +121,18 @@ + (instancetype _Nullable)instancePreviewFromNotification:(OSNotification * _Non - (NSDictionary *)jsonRepresentation { let json = [NSMutableDictionary new]; - json[@"click_name"] = self.clickName; - json[@"first_click"] = @(self.firstClick); - json[@"closes_message"] = @(self.closesMessage); + json[@"actionId"] = self.actionId; + json[@"urlTarget"] = @(self.urlTarget); + json[@"closingMessage"] = @(self.closingMessage); - if (self.clickUrl) - json[@"click_url"] = self.clickUrl.absoluteString; - - if (self.outcomes && self.outcomes.count > 0) { - let *jsonOutcomes = [NSMutableArray new]; - for (OSInAppMessageOutcome *outcome in self.outcomes) { - [jsonOutcomes addObject:[outcome jsonRepresentation]]; - } - - json[@"outcomes"] = jsonOutcomes; - } - - if (self.tags) - json[@"tags"] = [self.tags jsonRepresentation]; + if (self.url) + json[@"url"] = self.url; return json; } - (NSString *)description { - return [NSString stringWithFormat:@"OSInAppMessageAction outcome: %@ \ntag: %@ promptAction: %@", _outcomes, _tags, [_promptActions description]]; + return [NSString stringWithFormat:@"OSInAppMessageClickResult actionId: %@ \nurl: %@ urlTarget: %@ closingMessage: %@", _actionId, _url, @(_urlTarget), @(_closingMessage)]; } @end diff --git a/iOS_SDK/OneSignalSDK/Source/OSInAppMessageDisplayStats.h b/iOS_SDK/OneSignalSDK/OneSignalInAppMessages/Model/OSInAppMessageDisplayStats.h similarity index 100% rename from iOS_SDK/OneSignalSDK/Source/OSInAppMessageDisplayStats.h rename to iOS_SDK/OneSignalSDK/OneSignalInAppMessages/Model/OSInAppMessageDisplayStats.h diff --git a/iOS_SDK/OneSignalSDK/Source/OSInAppMessageDisplayStats.m b/iOS_SDK/OneSignalSDK/OneSignalInAppMessages/Model/OSInAppMessageDisplayStats.m similarity index 93% rename from iOS_SDK/OneSignalSDK/Source/OSInAppMessageDisplayStats.m rename to iOS_SDK/OneSignalSDK/OneSignalInAppMessages/Model/OSInAppMessageDisplayStats.m index 48b40c09c..c71c73e05 100644 --- a/iOS_SDK/OneSignalSDK/Source/OSInAppMessageDisplayStats.m +++ b/iOS_SDK/OneSignalSDK/OneSignalInAppMessages/Model/OSInAppMessageDisplayStats.m @@ -26,7 +26,6 @@ */ #import "OSInAppMessageDisplayStats.h" -#import "OneSignalHelper.h" @interface OSInAppMessageDisplayStats () @property (nonatomic, readwrite) BOOL redisplayEnabled; @@ -61,7 +60,7 @@ + (instancetype _Nullable)instanceWithData:(NSData * _Nonnull)data { NSDictionary *json = [NSJSONSerialization JSONObjectWithData:data options:0 error:&error]; if (error || !json) { - [OneSignal onesignalLog:ONE_S_LL_ERROR message:[NSString stringWithFormat:@"Unable to decode in-app display state message JSON: %@", error.description ?: @"No Data"]]; + [OneSignalLog onesignalLog:ONE_S_LL_ERROR message:[NSString stringWithFormat:@"Unable to decode in-app display state message JSON: %@", error.description ?: @"No Data"]]; return nil; } @@ -112,7 +111,7 @@ - (BOOL)isDelayTimeSatisfied:(NSTimeInterval)date { - (BOOL)shouldDisplayAgain { BOOL result = _displayQuantity < _displayLimit; - [OneSignal onesignalLog:ONE_S_LL_VERBOSE message:[NSString stringWithFormat:@"In app message shouldDisplayAgain: %hhu", result]]; + [OneSignalLog onesignalLog:ONE_S_LL_VERBOSE message:[NSString stringWithFormat:@"In app message shouldDisplayAgain: %hhu", result]]; return result; } diff --git a/iOS_SDK/OneSignalSDK/Source/OSInAppMessageInternal.h b/iOS_SDK/OneSignalSDK/OneSignalInAppMessages/Model/OSInAppMessageInternal.h similarity index 94% rename from iOS_SDK/OneSignalSDK/Source/OSInAppMessageInternal.h rename to iOS_SDK/OneSignalSDK/OneSignalInAppMessages/Model/OSInAppMessageInternal.h index dd49b45ec..5ea62f000 100644 --- a/iOS_SDK/OneSignalSDK/Source/OSInAppMessageInternal.h +++ b/iOS_SDK/OneSignalSDK/OneSignalInAppMessages/Model/OSInAppMessageInternal.h @@ -28,8 +28,8 @@ #import #import "OSInAppMessagingDefines.h" #import "OSInAppMessageDisplayStats.h" -#import "OneSignal.h" #import "OSTrigger.h" +#import "OneSignalInAppMessages.h" NS_ASSUME_NONNULL_BEGIN @@ -59,6 +59,8 @@ NS_ASSUME_NONNULL_BEGIN - (void)addClickId:(NSString *)clickId; - (BOOL)isFinished; +// Dictionary of properties available on OSInAppMessageInternal +- (NSDictionary *_Nonnull)jsonRepresentationInternal; @end diff --git a/iOS_SDK/OneSignalSDK/Source/OSInAppMessageInternal.m b/iOS_SDK/OneSignalSDK/OneSignalInAppMessages/Model/OSInAppMessageInternal.m similarity index 95% rename from iOS_SDK/OneSignalSDK/Source/OSInAppMessageInternal.m rename to iOS_SDK/OneSignalSDK/OneSignalInAppMessages/Model/OSInAppMessageInternal.m index 9fc9feeb0..040e3bc54 100644 --- a/iOS_SDK/OneSignalSDK/Source/OSInAppMessageInternal.m +++ b/iOS_SDK/OneSignalSDK/OneSignalInAppMessages/Model/OSInAppMessageInternal.m @@ -26,7 +26,7 @@ */ #import "OSInAppMessageInternal.h" -#import "OneSignalHelper.h" +#import "NSDateFormatter+OneSignal.h" #import "OneSignalCommonDefines.h" @implementation OSInAppMessage @@ -89,7 +89,7 @@ + (instancetype)instanceWithData:(NSData *)data { NSDictionary *json = [NSJSONSerialization JSONObjectWithData:data options:0 error:&error]; if (error || !json) { - [OneSignal onesignalLog:ONE_S_LL_ERROR message:[NSString stringWithFormat:@"Unable to decode in-app message JSON: %@", error.description ?: @"No Data"]]; + [OneSignalLog onesignalLog:ONE_S_LL_ERROR message:[NSString stringWithFormat:@"Unable to decode in-app message JSON: %@", error.description ?: @"No Data"]]; return nil; } @@ -142,7 +142,7 @@ + (instancetype)instanceWithJson:(NSDictionary * _Nonnull)json { if (trigger) [subTriggers addObject:trigger]; else { - [OneSignal onesignalLog:ONE_S_LL_WARN message:[NSString stringWithFormat:@"Trigger JSON is invalid: %@", triggerJson]]; + [OneSignalLog onesignalLog:ONE_S_LL_WARN message:[NSString stringWithFormat:@"Trigger JSON is invalid: %@", triggerJson]]; return nil; } } @@ -165,7 +165,7 @@ + (instancetype)instancePreviewFromNotification:(OSNotification *)notification { return message; } --(NSDictionary *)jsonRepresentation { +- (NSDictionary *)jsonRepresentationInternal { let json = [NSMutableDictionary new]; json[@"messageId"] = self.messageId; diff --git a/iOS_SDK/OneSignalSDK/Source/OSInAppMessageLocationPrompt.h b/iOS_SDK/OneSignalSDK/OneSignalInAppMessages/Model/OSInAppMessageLocationPrompt.h similarity index 100% rename from iOS_SDK/OneSignalSDK/Source/OSInAppMessageLocationPrompt.h rename to iOS_SDK/OneSignalSDK/OneSignalInAppMessages/Model/OSInAppMessageLocationPrompt.h diff --git a/iOS_SDK/OneSignalSDK/OneSignalInAppMessages/Model/OSInAppMessageLocationPrompt.m b/iOS_SDK/OneSignalSDK/OneSignalInAppMessages/Model/OSInAppMessageLocationPrompt.m new file mode 100644 index 000000000..b00bc22f2 --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignalInAppMessages/Model/OSInAppMessageLocationPrompt.m @@ -0,0 +1,73 @@ +/** +* Modified MIT License +* +* Copyright 2020 OneSignal +* +* Permission is hereby granted, free of charge, to any person obtaining a copy +* of this software and associated documentation files (the "Software"), to deal +* in the Software without restriction, including without limitation the rights +* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +* copies of the Software, and to permit persons to whom the Software is +* furnished to do so, subject to the following conditions: +* +* 1. The above copyright notice and this permission notice shall be included in +* all copies or substantial portions of the Software. +* +* 2. All copies of substantial portions of the Software may only be used in connection +* with services provided by OneSignal. +* +* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +* THE SOFTWARE. +*/ + +#import +#import "OSInAppMessageLocationPrompt.h" +#import +#import + +//@interface OneSignalLocation () +// +//+ (void)promptLocationFallbackToSettings:(BOOL)fallback completionHandler:(void (^)(PromptActionResult result))completionHandler; +// +//@end + +@implementation OSInAppMessageLocationPrompt + +- (instancetype)init +{ + self = [super init]; + if (self) { + _hasPrompted = NO; + } + return self; +} + +- (void)handlePrompt:(void (^)(PromptActionResult result))completionHandler { + /* + This code calls [OneSignalLocation promptLocationFallbackToSettings:true completionHandler:completionHandler]; + */ + BOOL fallback = YES; + let oneSignalLocationManager = NSClassFromString(@"OneSignalLocationManager"); + if (oneSignalLocationManager != nil && [oneSignalLocationManager respondsToSelector:@selector(promptLocationFallbackToSettings:completionHandler:)]) { + NSMethodSignature* signature = [oneSignalLocationManager methodSignatureForSelector:@selector(promptLocationFallbackToSettings:completionHandler:)]; + NSInvocation* invocation = [NSInvocation invocationWithMethodSignature: signature]; + [invocation setTarget: oneSignalLocationManager]; + [invocation setSelector: @selector(promptLocationFallbackToSettings:completionHandler:)]; + [invocation setArgument: &fallback atIndex: 2]; + [invocation setArgument: &completionHandler atIndex: 3]; + [invocation invoke]; + } else { + [OneSignalLog onesignalLog:ONE_S_LL_ERROR message:@"OneSignalLocation not found. In order to use OneSignal's location features the OneSignalLocation module must be added."]; + } +} + +- (NSString *)description { + return [NSString stringWithFormat:@"OSInAppMessageLocationPrompt hasPrompted:%@", _hasPrompted ? @"YES" : @"NO"]; +} + +@end diff --git a/iOS_SDK/OneSignalSDK/Source/OSInAppMessagePage.h b/iOS_SDK/OneSignalSDK/OneSignalInAppMessages/Model/OSInAppMessagePage.h similarity index 100% rename from iOS_SDK/OneSignalSDK/Source/OSInAppMessagePage.h rename to iOS_SDK/OneSignalSDK/OneSignalInAppMessages/Model/OSInAppMessagePage.h diff --git a/iOS_SDK/OneSignalSDK/Source/OSInAppMessagePage.m b/iOS_SDK/OneSignalSDK/OneSignalInAppMessages/Model/OSInAppMessagePage.m similarity index 100% rename from iOS_SDK/OneSignalSDK/Source/OSInAppMessagePage.m rename to iOS_SDK/OneSignalSDK/OneSignalInAppMessages/Model/OSInAppMessagePage.m diff --git a/iOS_SDK/OneSignalSDK/Source/OSInAppMessagePrompt.h b/iOS_SDK/OneSignalSDK/OneSignalInAppMessages/Model/OSInAppMessagePrompt.h similarity index 97% rename from iOS_SDK/OneSignalSDK/Source/OSInAppMessagePrompt.h rename to iOS_SDK/OneSignalSDK/OneSignalInAppMessages/Model/OSInAppMessagePrompt.h index ec31538ec..4420a3e7e 100644 --- a/iOS_SDK/OneSignalSDK/Source/OSInAppMessagePrompt.h +++ b/iOS_SDK/OneSignalSDK/OneSignalInAppMessages/Model/OSInAppMessagePrompt.h @@ -28,7 +28,7 @@ #ifndef OSInAppMessagingPrompt_h #define OSInAppMessagingPrompt_h -#import "OneSignal.h" +#import #import "OneSignalCommonDefines.h" #import diff --git a/iOS_SDK/OneSignalSDK/Source/OSInAppMessagePushPrompt.h b/iOS_SDK/OneSignalSDK/OneSignalInAppMessages/Model/OSInAppMessagePushPrompt.h similarity index 100% rename from iOS_SDK/OneSignalSDK/Source/OSInAppMessagePushPrompt.h rename to iOS_SDK/OneSignalSDK/OneSignalInAppMessages/Model/OSInAppMessagePushPrompt.h diff --git a/iOS_SDK/OneSignalSDK/Source/OSInAppMessagePushPrompt.m b/iOS_SDK/OneSignalSDK/OneSignalInAppMessages/Model/OSInAppMessagePushPrompt.m similarity index 90% rename from iOS_SDK/OneSignalSDK/Source/OSInAppMessagePushPrompt.m rename to iOS_SDK/OneSignalSDK/OneSignalInAppMessages/Model/OSInAppMessagePushPrompt.m index 29ce33cf5..59bd00c38 100644 --- a/iOS_SDK/OneSignalSDK/Source/OSInAppMessagePushPrompt.m +++ b/iOS_SDK/OneSignalSDK/OneSignalInAppMessages/Model/OSInAppMessagePushPrompt.m @@ -26,8 +26,8 @@ */ #import "OSInAppMessagePushPrompt.h" -#import "OneSignal.h" -#import "OneSignalHelper.h" +#import "OneSignalInAppMessages.h" +#import @implementation OSInAppMessagePushPrompt @@ -45,7 +45,7 @@ - (void)handlePrompt:(void (^)(PromptActionResult result))completionHandler { let result = accepted ? PERMISSION_GRANTED : PERMISSION_DENIED; completionHandler(result); }; - [OneSignal promptForPushNotificationsWithUserResponse:acceptedCompletionHandler fallbackToSettings:YES]; + [OSNotificationsManager requestPermission:acceptedCompletionHandler fallbackToSettings:YES]; } - (NSString *)description { diff --git a/iOS_SDK/OneSignalSDK/Source/OSInAppMessageTag.h b/iOS_SDK/OneSignalSDK/OneSignalInAppMessages/Model/OSInAppMessageTag.h similarity index 94% rename from iOS_SDK/OneSignalSDK/Source/OSInAppMessageTag.h rename to iOS_SDK/OneSignalSDK/OneSignalInAppMessages/Model/OSInAppMessageTag.h index 77fe577e1..57d7f2d25 100644 --- a/iOS_SDK/OneSignalSDK/Source/OSInAppMessageTag.h +++ b/iOS_SDK/OneSignalSDK/OneSignalInAppMessages/Model/OSInAppMessageTag.h @@ -26,7 +26,8 @@ */ #import -#import "OneSignal.h" +#import +#import "OneSignalInAppMessages.h" @interface OSInAppMessageTag () diff --git a/iOS_SDK/OneSignalSDK/Source/OSInAppMessageTag.m b/iOS_SDK/OneSignalSDK/OneSignalInAppMessages/Model/OSInAppMessageTag.m similarity index 93% rename from iOS_SDK/OneSignalSDK/Source/OSInAppMessageTag.m rename to iOS_SDK/OneSignalSDK/OneSignalInAppMessages/Model/OSInAppMessageTag.m index 69dc95a06..f2a559197 100644 --- a/iOS_SDK/OneSignalSDK/Source/OSInAppMessageTag.m +++ b/iOS_SDK/OneSignalSDK/OneSignalInAppMessages/Model/OSInAppMessageTag.m @@ -26,7 +26,6 @@ */ #import "OSInAppMessageTag.h" -#import "OneSignalHelper.h" @implementation OSInAppMessageTag @@ -35,7 +34,7 @@ + (instancetype)instanceWithData:(NSData *)data { NSDictionary *json = [NSJSONSerialization JSONObjectWithData:data options:0 error:&error]; if (error || !json) { - [OneSignal onesignalLog:ONE_S_LL_ERROR message:[NSString stringWithFormat:@"Unable to decode in-app message tag JSON: %@", error.description ?: @"No Data"]]; + [OneSignalLog onesignalLog:ONE_S_LL_ERROR message:[NSString stringWithFormat:@"Unable to decode in-app message tag JSON: %@", error.description ?: @"No Data"]]; return nil; } diff --git a/iOS_SDK/OneSignalSDK/Source/OSTrigger.h b/iOS_SDK/OneSignalSDK/OneSignalInAppMessages/Model/OSTrigger.h similarity index 100% rename from iOS_SDK/OneSignalSDK/Source/OSTrigger.h rename to iOS_SDK/OneSignalSDK/OneSignalInAppMessages/Model/OSTrigger.h diff --git a/iOS_SDK/OneSignalSDK/Source/OSTrigger.m b/iOS_SDK/OneSignalSDK/OneSignalInAppMessages/Model/OSTrigger.m similarity index 95% rename from iOS_SDK/OneSignalSDK/Source/OSTrigger.m rename to iOS_SDK/OneSignalSDK/OneSignalInAppMessages/Model/OSTrigger.m index 75de88c01..cb964b80b 100644 --- a/iOS_SDK/OneSignalSDK/Source/OSTrigger.m +++ b/iOS_SDK/OneSignalSDK/OneSignalInAppMessages/Model/OSTrigger.m @@ -26,8 +26,6 @@ */ #import "OSTrigger.h" -#import "OneSignalHelper.h" -#import "OneSignal.h" @implementation OSTrigger @@ -36,7 +34,7 @@ + (instancetype)instanceWithData:(NSData *)data { let json = (NSDictionary *)[NSJSONSerialization JSONObjectWithData:data options:NSJSONReadingAllowFragments error:&error]; if (error || !json) { - [OneSignal onesignalLog:ONE_S_LL_ERROR message:[NSString stringWithFormat:@"Encountered an error parsing OSTrigger JSON: %@", error.description ?: @"None"]]; + [OneSignalLog onesignalLog:ONE_S_LL_ERROR message:[NSString stringWithFormat:@"Encountered an error parsing OSTrigger JSON: %@", error.description ?: @"None"]]; return nil; } diff --git a/iOS_SDK/OneSignalSDK/Source/OSInAppMessagingDefines.h b/iOS_SDK/OneSignalSDK/OneSignalInAppMessages/OSInAppMessagingDefines.h similarity index 100% rename from iOS_SDK/OneSignalSDK/Source/OSInAppMessagingDefines.h rename to iOS_SDK/OneSignalSDK/OneSignalInAppMessages/OSInAppMessagingDefines.h diff --git a/iOS_SDK/OneSignalSDK/OneSignalInAppMessages/OneSignalInAppMessages.h b/iOS_SDK/OneSignalSDK/OneSignalInAppMessages/OneSignalInAppMessages.h new file mode 100644 index 000000000..11d0faa67 --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignalInAppMessages/OneSignalInAppMessages.h @@ -0,0 +1,38 @@ +/* + Modified MIT License + + Copyright 2022 OneSignal + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + 1. The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + 2. All copies of substantial portions of the Software may only be used in connection + with services provided by OneSignal. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + */ + +#import +#import + +@interface OneSignalInAppMessages : NSObject + ++ (Class_Nonnull)InAppMessages; ++ (void)start; ++ (void)getInAppMessagesFromServer:(NSString * _Nullable)subscriptionId; ++ (void)onApplicationDidBecomeActive; ++ (void)migrate; +@end diff --git a/iOS_SDK/OneSignalSDK/OneSignalInAppMessages/OneSignalInAppMessages.m b/iOS_SDK/OneSignalSDK/OneSignalInAppMessages/OneSignalInAppMessages.m new file mode 100644 index 000000000..f9540813c --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignalInAppMessages/OneSignalInAppMessages.m @@ -0,0 +1,133 @@ +/* + Modified MIT License + + Copyright 2022 OneSignal + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + 1. The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + 2. All copies of substantial portions of the Software may only be used in connection + with services provided by OneSignal. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + */ + +#import "OneSignalInAppMessages.h" +#import "OSMessagingController.h" +#import "OSInAppMessageMigrationController.h" + +@implementation OneSignalInAppMessages + ++ (Class)InAppMessages { + return self; +} + ++ (void)start { + // Initialize the shared instance and start observing the push subscription + [OSMessagingController start]; +} + ++ (void)getInAppMessagesFromServer:(NSString * _Nullable)subscriptionId { + [OSMessagingController.sharedInstance getInAppMessagesFromServer:subscriptionId]; +} + ++ (void)onApplicationDidBecomeActive { + [OSMessagingController.sharedInstance onApplicationDidBecomeActive]; +} + ++ (void)migrate { + [OSInAppMessageMigrationController migrate]; +} + ++ (void)addClickListener:(NSObject *_Nullable)listener { + [OneSignalLog onesignalLog:ONE_S_LL_VERBOSE message:@"In app message click listener added successfully"]; + [OSMessagingController.sharedInstance addInAppMessageClickListener:listener]; +} + ++ (void)removeClickListener:(NSObject *_Nullable)listener { + [OneSignalLog onesignalLog:ONE_S_LL_VERBOSE message:@"In app message click listener removed successfully"]; + [OSMessagingController.sharedInstance removeInAppMessageClickListener:listener]; +} + ++ (void)addLifecycleListener:(NSObject *_Nullable)listener { + [OneSignalLog onesignalLog:ONE_S_LL_VERBOSE message:@"In app message lifecycle listener added successfully"]; + [OSMessagingController.sharedInstance addInAppMessageLifecycleListener:listener]; +} + ++ (void)removeLifecycleListener:(NSObject *_Nullable)listener { + [OneSignalLog onesignalLog:ONE_S_LL_VERBOSE message:@"In app message lifecycle listener removed successfully"]; + [OSMessagingController.sharedInstance removeInAppMessageLifecycleListener:listener]; +} + ++ (void)addTrigger:(NSString * _Nonnull)key withValue:(NSString * _Nonnull)value { + // return if the user has not granted privacy permissions + if ([OSPrivacyConsentController shouldLogMissingPrivacyConsentErrorWithMethodName:@"addTrigger:withValue:"]) + return; + + if (!key) { + [OneSignalLog onesignalLog:ONE_S_LL_ERROR message:@"Attempted to set a trigger with a nil key."]; + return; + } + + [OSMessagingController.sharedInstance addTriggers:@{key : value}]; +} + ++ (void)addTriggers:(NSDictionary * _Nonnull)triggers { + // return if the user has not granted privacy permissions + if ([OSPrivacyConsentController shouldLogMissingPrivacyConsentErrorWithMethodName:@"addTriggers:"]) + return; + + [OSMessagingController.sharedInstance addTriggers:triggers]; +} + ++ (void)removeTrigger:(NSString * _Nonnull)key { + // return if the user has not granted privacy permissions + if ([OSPrivacyConsentController shouldLogMissingPrivacyConsentErrorWithMethodName:@"removeTriggerForKey:"]) + return; + + if (!key) { + [OneSignalLog onesignalLog:ONE_S_LL_ERROR message:@"Attempted to remove a trigger with a nil key."]; + return; + } + + [OSMessagingController.sharedInstance removeTriggersForKeys:@[key]]; +} + ++ (void)removeTriggers:(NSArray * _Nonnull)keys { + // return if the user has not granted privacy permissions + if ([OSPrivacyConsentController shouldLogMissingPrivacyConsentErrorWithMethodName:@"removeTriggerForKey:"]) + return; + + [OSMessagingController.sharedInstance removeTriggersForKeys:keys]; +} + ++ (void)clearTriggers { + // return if the user has not granted privacy permissions + if ([OSPrivacyConsentController shouldLogMissingPrivacyConsentErrorWithMethodName:@"clearTriggers:"]) + return; + + [OSMessagingController.sharedInstance clearTriggers]; +} + ++ (void)paused:(BOOL)pause { + [OSMessagingController.sharedInstance setInAppMessagingPaused:pause]; +} + ++ (BOOL)paused { + return [OSMessagingController.sharedInstance isInAppMessagingPaused]; +} + +@end diff --git a/iOS_SDK/OneSignalSDK/OneSignalInAppMessages/Requests/OSInAppMessagingRequests.h b/iOS_SDK/OneSignalSDK/OneSignalInAppMessages/Requests/OSInAppMessagingRequests.h new file mode 100644 index 000000000..c37b4bbf1 --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignalInAppMessages/Requests/OSInAppMessagingRequests.h @@ -0,0 +1,57 @@ +/* + Modified MIT License + + Copyright 2021 OneSignal + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + 1. The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + 2. All copies of substantial portions of the Software may only be used in connection + with services provided by OneSignal. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + */ + +#import +#import "OSInAppMessageClickResult.h" + +@interface OSRequestGetInAppMessages : OneSignalRequest ++ (instancetype _Nonnull)withSubscriptionId:(NSString * _Nonnull)subscriptionId; +@end + +@interface OSRequestInAppMessageViewed : OneSignalRequest ++ (instancetype _Nonnull)withAppId:(NSString * _Nonnull)appId withPlayerId:(NSString * _Nonnull)playerId withMessageId:(NSString * _Nonnull)messageId forVariantId:(NSString * _Nonnull)variantId; +@end + +@interface OSRequestInAppMessagePageViewed : OneSignalRequest ++ (instancetype _Nonnull)withAppId:(NSString * _Nonnull)appId withPlayerId:(NSString * _Nonnull)playerId withMessageId:(NSString * _Nonnull)messageId withPageId:(NSString * _Nonnull)pageId forVariantId:(NSString * _Nonnull)variantId; +@end + +@interface OSRequestLoadInAppMessageContent : OneSignalRequest ++ (instancetype _Nonnull)withAppId:(NSString * _Nonnull)appId withMessageId:(NSString * _Nonnull)messageId withVariantId:(NSString * _Nonnull)variant; +@end + +@interface OSRequestLoadInAppMessagePreviewContent : OneSignalRequest ++ (instancetype _Nonnull)withAppId:(NSString * _Nonnull)appId previewUUID:(NSString * _Nonnull)previewUUID; +@end + +@interface OSRequestInAppMessageClicked : OneSignalRequest ++ (instancetype _Nonnull)withAppId:(NSString * _Nonnull)appId + withPlayerId:(NSString * _Nonnull)playerId + withMessageId:(NSString * _Nonnull)messageId + forVariantId:(NSString * _Nonnull)variantId + withAction:(OSInAppMessageClickResult * _Nonnull)action; +@end diff --git a/iOS_SDK/OneSignalSDK/Source/OSInAppMessagingRequests.m b/iOS_SDK/OneSignalSDK/OneSignalInAppMessages/Requests/OSInAppMessagingRequests.m similarity index 65% rename from iOS_SDK/OneSignalSDK/Source/OSInAppMessagingRequests.m rename to iOS_SDK/OneSignalSDK/OneSignalInAppMessages/Requests/OSInAppMessagingRequests.m index 29035adc0..159b3ebab 100644 --- a/iOS_SDK/OneSignalSDK/Source/OSInAppMessagingRequests.m +++ b/iOS_SDK/OneSignalSDK/OneSignalInAppMessages/Requests/OSInAppMessagingRequests.m @@ -1,14 +1,42 @@ -// -// OSInAppMessagingRequests.m -// OneSignal -// -// Created by Elliot Mawby on 9/28/21. -// Copyright © 2021 Hiptic. All rights reserved. -// - +/* + Modified MIT License + + Copyright 2021 OneSignal + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + 1. The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + 2. All copies of substantial portions of the Software may only be used in connection + with services provided by OneSignal. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + */ #import #import "OSInAppMessagingRequests.h" +@implementation OSRequestGetInAppMessages ++ (instancetype _Nonnull)withSubscriptionId:(NSString * _Nonnull)subscriptionId { + let request = [OSRequestGetInAppMessages new]; + request.method = GET; + NSString *appId = [OneSignalConfigManager getAppId]; + request.path = [NSString stringWithFormat:@"apps/%@/subscriptions/%@/iams", appId, subscriptionId]; + return request; +} +@end + @implementation OSRequestInAppMessageViewed + (instancetype _Nonnull)withAppId:(NSString * _Nonnull)appId withPlayerId:(NSString * _Nonnull)playerId @@ -58,7 +86,7 @@ + (instancetype _Nonnull)withAppId:(NSString * _Nonnull)appId withPlayerId:(NSString * _Nonnull)playerId withMessageId:(NSString * _Nonnull)messageId forVariantId:(NSString * _Nonnull)variantId - withAction:(OSInAppMessageAction * _Nonnull)action { + withAction:(OSInAppMessageClickResult * _Nonnull)action { let request = [OSRequestInAppMessageClicked new]; request.parameters = @{ diff --git a/iOS_SDK/OneSignalSDK/Source/OSInAppMessageView.h b/iOS_SDK/OneSignalSDK/OneSignalInAppMessages/UI/OSInAppMessageView.h similarity index 100% rename from iOS_SDK/OneSignalSDK/Source/OSInAppMessageView.h rename to iOS_SDK/OneSignalSDK/OneSignalInAppMessages/UI/OSInAppMessageView.h diff --git a/iOS_SDK/OneSignalSDK/Source/OSInAppMessageView.m b/iOS_SDK/OneSignalSDK/OneSignalInAppMessages/UI/OSInAppMessageView.m similarity index 90% rename from iOS_SDK/OneSignalSDK/Source/OSInAppMessageView.m rename to iOS_SDK/OneSignalSDK/OneSignalInAppMessages/UI/OSInAppMessageView.m index cad3739d2..26423c762 100644 --- a/iOS_SDK/OneSignalSDK/Source/OSInAppMessageView.m +++ b/iOS_SDK/OneSignalSDK/OneSignalInAppMessages/UI/OSInAppMessageView.m @@ -26,12 +26,9 @@ */ #import "OSInAppMessageView.h" -#import "OneSignalHelper.h" #import -#import "OSInAppMessageAction.h" -#import "OneSignalViewHelper.h" -#import "OSPlayerTags.h" - +#import "OSInAppMessageClickResult.h" +#import @interface OSInAppMessageView () @@ -56,12 +53,12 @@ - (instancetype _Nonnull)initWithMessage:(OSInAppMessageInternal *)inAppMessage - (NSString *)getTagsString { NSError *error; - OSPlayerTags *tags = [OneSignal getPlayerTags]; - if (!tags.allTags || tags.allTags.count <= 0 ) { - [OneSignal onesignalLog:ONE_S_LL_VERBOSE message:@"[getTagsString] no tags found for the player"]; + NSDictionary *tags = [OneSignalUserManagerImpl.sharedInstance getTags]; + if (tags == nil || tags.count <= 0 ) { + [OneSignalLog onesignalLog:ONE_S_LL_VERBOSE message:@"[getTagsString] no tags found for the player"]; return nil; } - NSData *jsonData = [NSJSONSerialization dataWithJSONObject:tags.allTags + NSData *jsonData = [NSJSONSerialization dataWithJSONObject:tags options:NSJSONWritingPrettyPrinted error:&error]; NSString *jsonString; @@ -90,7 +87,7 @@ - (NSString *)addTagsToHTML:(NSString *)html { - (void)loadedHtmlContent:(NSString *)html withBaseURL:(NSURL *)url { // UI Update must be done on the main thread NSString *taggedHTML = [self addTagsToHTML:html]; - [OneSignal onesignalLog:ONE_S_LL_VERBOSE message:[NSString stringWithFormat:@"loadedHtmlContent with Tags: \n%@", taggedHTML]]; + [OneSignalLog onesignalLog:ONE_S_LL_VERBOSE message:[NSString stringWithFormat:@"loadedHtmlContent with Tags: \n%@", taggedHTML]]; [self.webView loadHTMLString:taggedHTML baseURL:url]; } @@ -99,7 +96,7 @@ - (void)setupWebviewWithMessageHandler:(id)handler { let configuration = [WKWebViewConfiguration new]; [configuration.userContentController addScriptMessageHandler:handler name:@"iosListener"]; - CGFloat marginSpacing = [OneSignalViewHelper sizeToScale:MESSAGE_MARGIN]; + CGFloat marginSpacing = [OneSignalCoreHelper sizeToScale:MESSAGE_MARGIN]; // WebView should use mainBounds as frame since we need to make sure it spans full possible screen size // to prevent text wrapping while obtaining true height of message from JS @@ -136,7 +133,7 @@ - (void)setIsFullscreen:(BOOL)isFullscreen { - (void)setWebviewFrame { CGRect mainBounds = UIScreen.mainScreen.bounds; if (!self.isFullscreen) { - CGFloat marginSpacing = [OneSignalViewHelper sizeToScale:MESSAGE_MARGIN]; + CGFloat marginSpacing = [OneSignalCoreHelper sizeToScale:MESSAGE_MARGIN]; mainBounds.size.width -= (2.0 * marginSpacing); } [self.webView setFrame:mainBounds]; @@ -158,11 +155,11 @@ - (void)resetWebViewToMaxBoundsAndResizeHeight:(void (^) (NSNumber *newHeight)) [self.webView evaluateJavaScript:OS_JS_GET_PAGE_META_DATA_METHOD completionHandler:^(NSDictionary *result, NSError *error) { if (error) { NSString *errorMessage = [NSString stringWithFormat:@"Javascript Method: %@ Evaluated with Error: %@", OS_JS_GET_PAGE_META_DATA_METHOD, error]; - [OneSignal onesignalLog:ONE_S_LL_ERROR message:errorMessage]; + [OneSignalLog onesignalLog:ONE_S_LL_ERROR message:errorMessage]; return; } NSString *successMessage = [NSString stringWithFormat:@"Javascript Method: %@ Evaluated with Success: %@", OS_JS_GET_PAGE_META_DATA_METHOD, result]; - [OneSignal onesignalLog:ONE_S_LL_VERBOSE message:successMessage]; + [OneSignalLog onesignalLog:ONE_S_LL_VERBOSE message:successMessage]; [self setupWebViewConstraints]; @@ -185,11 +182,11 @@ - (void)updateSafeAreaInsets { [self.webView evaluateJavaScript:setInsetsString completionHandler:^(NSDictionary *result, NSError * _Nullable error) { if (error) { NSString *errorMessage = [NSString stringWithFormat:@"Javascript Method: %@ Evaluated with Error: %@", OS_SET_SAFE_AREA_INSETS_METHOD, error]; - [OneSignal onesignalLog:ONE_S_LL_ERROR message:errorMessage]; + [OneSignalLog onesignalLog:ONE_S_LL_ERROR message:errorMessage]; return; } NSString *successMessage = [NSString stringWithFormat:@"Javascript Method: %@ Evaluated with Success: %@", OS_SET_SAFE_AREA_INSETS_METHOD, result]; - [OneSignal onesignalLog:ONE_S_LL_VERBOSE message:successMessage]; + [OneSignalLog onesignalLog:ONE_S_LL_VERBOSE message:successMessage]; }]; } } @@ -199,7 +196,7 @@ - (NSNumber *)extractHeightFromMetaDataPayload:(NSDictionary *)result { } - (void)setupWebViewConstraints { - [OneSignal onesignalLog:ONE_S_LL_VERBOSE message:@"Setting up In-App Message WebView Constraints"]; + [OneSignalLog onesignalLog:ONE_S_LL_VERBOSE message:@"Setting up In-App Message WebView Constraints"]; [self.webView removeConstraints:[self.webView constraints]]; diff --git a/iOS_SDK/OneSignalSDK/Source/OSInAppMessageViewController.h b/iOS_SDK/OneSignalSDK/OneSignalInAppMessages/UI/OSInAppMessageViewController.h similarity index 96% rename from iOS_SDK/OneSignalSDK/Source/OSInAppMessageViewController.h rename to iOS_SDK/OneSignalSDK/OneSignalInAppMessages/UI/OSInAppMessageViewController.h index 8f2a33998..d57b56a41 100644 --- a/iOS_SDK/OneSignalSDK/Source/OSInAppMessageViewController.h +++ b/iOS_SDK/OneSignalSDK/OneSignalInAppMessages/UI/OSInAppMessageViewController.h @@ -29,14 +29,14 @@ #import #import "OSInAppMessageInternal.h" #import "OSInAppMessageView.h" -#import "OSInAppMessageAction.h" +#import "OSInAppMessageClickResult.h" #import NS_ASSUME_NONNULL_BEGIN @protocol OSInAppMessageViewControllerDelegate -- (void)messageViewDidSelectAction:(OSInAppMessageInternal *)message withAction:(OSInAppMessageAction *)action; +- (void)messageViewDidSelectAction:(OSInAppMessageInternal *)message withAction:(OSInAppMessageClickResult *)action; - (void)messageViewDidDisplayPage:(OSInAppMessageInternal *)message withPageId:(NSString *)pageId; - (void)messageViewControllerDidDisplay:(OSInAppMessageInternal *)message; - (void)messageViewControllerWillDismiss:(OSInAppMessageInternal *)message; diff --git a/iOS_SDK/OneSignalSDK/Source/OSInAppMessageViewController.m b/iOS_SDK/OneSignalSDK/OneSignalInAppMessages/UI/OSInAppMessageViewController.m similarity index 92% rename from iOS_SDK/OneSignalSDK/Source/OSInAppMessageViewController.m rename to iOS_SDK/OneSignalSDK/OneSignalInAppMessages/UI/OSInAppMessageViewController.m index 614ca7f4e..9645bb8d9 100644 --- a/iOS_SDK/OneSignalSDK/Source/OSInAppMessageViewController.m +++ b/iOS_SDK/OneSignalSDK/OneSignalInAppMessages/UI/OSInAppMessageViewController.m @@ -27,22 +27,16 @@ #import "OSInAppMessageViewController.h" #import "OSInAppMessageView.h" -#import "OneSignalHelper.h" -#import "OneSignalViewHelper.h" #import "OSInAppMessageController.h" #import "OSInAppMessageBridgeEvent.h" +#import +#import "OSSessionManager.h" #define HIGHEST_CONSTRAINT_PRIORITY 999.0f #define HIGH_CONSTRAINT_PRIORITY 990.0f #define MEDIUM_CONSTRAINT_PRIORITY 950.0f #define LOW_CONSTRAINT_PRIORITY 900.0f -@interface OneSignal () - -+ (OSSessionManager*)sessionManager; - -@end - @interface OSInAppMessageViewController () // The actual message subview @@ -101,12 +95,15 @@ @interface OSInAppMessageViewController () @implementation OSInAppMessageViewController +OSInAppMessageInternal *_dismissingMessage = nil; + - (instancetype _Nonnull)initWithMessage:(OSInAppMessageInternal *)inAppMessage delegate:(id)delegate { if (self = [super init]) { self.message = inAppMessage; self.delegate = delegate; self.useHeightMargin = YES; self.useWidthMargin = YES; + _dismissingMessage = nil; } return self; @@ -142,17 +139,17 @@ - (void)viewWillDisappear:(BOOL)animated { } - (void)applicationIsActive:(NSNotification *)notification { - [OneSignal onesignalLog:ONE_S_LL_VERBOSE message:@"Application Active"]; + [OneSignalLog onesignalLog:ONE_S_LL_VERBOSE message:@"Application Active"]; // Animate the showing of the IAM when opening the app from background [self animateAppearance:NO]; } - (void)applicationIsInBackground:(NSNotification *)notification { - [OneSignal onesignalLog:ONE_S_LL_VERBOSE message:@"Application Entered Background"]; + [OneSignalLog onesignalLog:ONE_S_LL_VERBOSE message:@"Application Entered Background"]; // Get current orientation of the device UIDeviceOrientation currentDeviceOrientation = UIDevice.currentDevice.orientation; - self.orientationOnBackground = [OneSignalViewHelper validateOrientation:currentDeviceOrientation]; + self.orientationOnBackground = [OneSignalCoreHelper validateOrientation:currentDeviceOrientation]; // Make sure pan constraint is no longer active so IAM does not stay in panned location self.panVerticalConstraint.active = false; @@ -172,7 +169,7 @@ - (void)addAppEnterBackgroundObserver { Wait until the actual HTML content is loaded before animating appearance */ - (void)setupInitialMessageUI { - [OneSignal onesignalLog:ONE_S_LL_VERBOSE message:@"Setting up In-App Message"]; + [OneSignalLog onesignalLog:ONE_S_LL_VERBOSE message:@"Setting up In-App Message"]; self.messageView.delegate = self; @@ -199,7 +196,7 @@ - (void)setupInitialMessageUI { } - (void)displayMessage { - [OneSignal onesignalLog:ONE_S_LL_VERBOSE message:@"Displaying In-App Message"]; + [OneSignalLog onesignalLog:ONE_S_LL_VERBOSE message:@"Displaying In-App Message"]; // Sets up the message view in a hidden position while we wait [self setupInitialMessageUI]; @@ -219,14 +216,14 @@ - (void)maxDisplayTimeTimerFinished { - (OSResultSuccessBlock)messageContentOnSuccess { return ^(NSDictionary *data) { - [OneSignalHelper dispatch_async_on_main_queue:^{ + [OneSignalCoreHelper dispatch_async_on_main_queue:^{ if (!data) { [self encounteredErrorLoadingMessageContent:nil]; return; } let message = [NSString stringWithFormat:@"In App Messaging htmlContent.html: %@", data[@"html"]]; - [OneSignal onesignalLog:ONE_S_LL_VERBOSE message:message]; + [OneSignalLog onesignalLog:ONE_S_LL_VERBOSE message:message]; if (!self.message.isPreview) [[OSSessionManager sharedSessionManager] onInAppMessageReceived:self.message.messageId]; @@ -314,7 +311,7 @@ - (void)encounteredErrorLoadingMessageContent:(NSError * _Nullable)error { if (error.code == 410 || error.code == 404) { [self.delegate messageIsNotActive:self.message]; } - [OneSignal onesignalLog:ONE_S_LL_ERROR message:message]; + [OneSignalLog onesignalLog:ONE_S_LL_ERROR message:message]; } /* @@ -323,10 +320,10 @@ Sets up the message view in its initial (hidden) position Once the HTML content is loaded, we call animateAppearance() to show the message view */ - (void)addConstraintsForMessage { - [OneSignal onesignalLog:ONE_S_LL_VERBOSE message:@"Setting up In-App Message Constraints"]; + [OneSignalLog onesignalLog:ONE_S_LL_VERBOSE message:@"Setting up In-App Message Constraints"]; if (![self.view.subviews containsObject:self.messageView]) { - [OneSignal onesignalLog:ONE_S_LL_VERBOSE message:@"addConstraintsForMessage: messageView is not a subview of OSInAppMessageViewController"]; + [OneSignalLog onesignalLog:ONE_S_LL_VERBOSE message:@"addConstraintsForMessage: messageView is not a subview of OSInAppMessageViewController"]; [self.view addSubview:self.messageView]; } @@ -353,17 +350,17 @@ - (void)addConstraintsForMessage { } } - CGRect mainBounds = [OneSignalViewHelper getScreenBounds]; - CGFloat marginSpacing = [OneSignalViewHelper sizeToScale:MESSAGE_MARGIN]; + CGRect mainBounds = [OneSignalCoreHelper getScreenBounds]; + CGFloat marginSpacing = [OneSignalCoreHelper sizeToScale:MESSAGE_MARGIN]; let screenHeight = [NSString stringWithFormat:@"Screen Bounds Height: %f", mainBounds.size.height]; - [OneSignal onesignalLog:ONE_S_LL_VERBOSE message:screenHeight]; + [OneSignalLog onesignalLog:ONE_S_LL_VERBOSE message:screenHeight]; let screenWidth = [NSString stringWithFormat:@"Screen Bounds Width: %f", mainBounds.size.width]; - [OneSignal onesignalLog:ONE_S_LL_VERBOSE message:screenWidth]; + [OneSignalLog onesignalLog:ONE_S_LL_VERBOSE message:screenWidth]; let screenScale = [NSString stringWithFormat:@"Screen Bounds Scale: %f", UIScreen.mainScreen.scale]; - [OneSignal onesignalLog:ONE_S_LL_VERBOSE message:screenScale]; + [OneSignalLog onesignalLog:ONE_S_LL_VERBOSE message:screenScale]; let heightMessage = [NSString stringWithFormat:@"In App Message Height: %f", self.message.height.doubleValue]; - [OneSignal onesignalLog:ONE_S_LL_VERBOSE message:heightMessage]; + [OneSignalLog onesignalLog:ONE_S_LL_VERBOSE message:heightMessage]; // Height constraint based on the IAM being full screen or any others with a specific height // NOTE: full screen IAM payload has no height, so match screen height minus margins @@ -496,6 +493,10 @@ - (void)dismissCurrentInAppMessage:(BOOL)up withVelocity:(double)velocity { [self.delegate messageViewControllerWasDismissed:self.message displayed:NO]; return; } + + if (_dismissingMessage == self.message) { + return; + } [self.delegate messageViewControllerWillDismiss:self.message]; @@ -527,7 +528,7 @@ - (void)dismissCurrentInAppMessage:(BOOL)up withVelocity:(double)velocity { animationOption = UIViewAnimationOptionCurveEaseIn; dismissAnimationDuration = MIN_DISMISSAL_ANIMATION_DURATION; } - + _dismissingMessage = self.message; [UIView animateWithDuration:dismissAnimationDuration delay:0.0f options:animationOption animations:^{ self.view.backgroundColor = [UIColor clearColor]; self.view.alpha = 0.0f; @@ -705,9 +706,9 @@ - (void)jsEventOccurredWithBody:(NSData *)body { let event = [OSInAppMessageBridgeEvent instanceWithData:body]; NSString *eventMessage = [NSString stringWithFormat:@"Action Occured with Event: %@", event]; - [OneSignal onesignalLog:ONE_S_LL_VERBOSE message:eventMessage]; + [OneSignalLog onesignalLog:ONE_S_LL_VERBOSE message:eventMessage]; NSString *eventTypeMessage = [NSString stringWithFormat:@"Action Occured with Event Type: %lu", (unsigned long)event.type]; - [OneSignal onesignalLog:ONE_S_LL_VERBOSE message:eventTypeMessage]; + [OneSignalLog onesignalLog:ONE_S_LL_VERBOSE message:eventTypeMessage]; if (event) { switch (event.type) { @@ -722,7 +723,7 @@ - (void)jsEventOccurredWithBody:(NSData *)body { // This is only fired once the javascript on the page sends the "rendering_complete" type event dispatch_async(dispatch_get_main_queue(), ^{ [self.delegate webViewContentFinishedLoading:self.message]; - [OneSignalHelper performSelector:@selector(displayMessage) onMainThreadOnObject:self withObject:nil afterDelay:0.0f]; + [OneSignalCoreHelper performSelector:@selector(displayMessage) onMainThreadOnObject:self withObject:nil afterDelay:0.0f]; }); break; } @@ -738,9 +739,9 @@ - (void)jsEventOccurredWithBody:(NSData *)body { case OSInAppMessageBridgeEventTypeActionTaken: { if (event.userAction.clickType) [self.delegate messageViewDidSelectAction:self.message withAction:event.userAction]; - if (event.userAction.urlActionType == OSInAppMessageActionUrlTypeReplaceContent) - [self.messageView loadReplacementURL:event.userAction.clickUrl]; - if (event.userAction.closesMessage) + if (event.userAction.urlTarget == OSInAppMessageActionUrlTypeReplaceContent) + [self.messageView loadReplacementURL:[NSURL URLWithString:event.userAction.url]]; + if (event.userAction.closingMessage) [self dismissCurrentInAppMessage]; break; } @@ -798,18 +799,18 @@ - (void)viewWillTransitionToSize:(CGSize)size withTransitionCoordinator:(id #import "OneSignalWebView.h" -#import "OneSignal.h" -#import "OneSignalHelper.h" +#import @implementation OneSignalWebView @@ -87,7 +86,7 @@ -(void)webView:(WKWebView *)webView didFinishNavigation:(WKNavigation *)navigati [_webView evaluateJavaScript:@"document.title" completionHandler:^(id _Nullable result, NSError * _Nullable error) { self.title = result; self.navigationController.title = self.title; - [_uiBusy stopAnimating]; + [self->_uiBusy stopAnimating]; }]; } @@ -144,14 +143,14 @@ - (void)showInApp { - (void)clearWebView { [_webView loadHTMLString:@"" baseURL:nil]; if (viewControllerForPresentation) { - [OneSignal onesignalLog:ONE_S_LL_VERBOSE message:@"clearing web view"]; + [OneSignalLog onesignalLog:ONE_S_LL_VERBOSE message:@"clearing web view"]; [viewControllerForPresentation.view removeFromSuperview]; } } - (void)presentationControllerDidDismiss:(UIPresentationController *)presentationController { - [OneSignal onesignalLog:ONE_S_LL_VERBOSE message:@"presentation controller did dismiss webview"]; + [OneSignalLog onesignalLog:ONE_S_LL_VERBOSE message:@"presentation controller did dismiss webview"]; [self clearWebView]; } diff --git a/iOS_SDK/OneSignalSDK/OneSignalInAppMessages/UI/OneSignalWebViewManager.h b/iOS_SDK/OneSignalSDK/OneSignalInAppMessages/UI/OneSignalWebViewManager.h new file mode 100644 index 000000000..ec0bb71cf --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignalInAppMessages/UI/OneSignalWebViewManager.h @@ -0,0 +1,33 @@ +/* + Modified MIT License + + Copyright 2022 OneSignal + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + 1. The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + 2. All copies of substantial portions of the Software may only be used in connection + with services provided by OneSignal. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + */ + +#import "OneSignalWebView.h" + +@interface OneSignalWebViewManager : NSObject ++ (OneSignalWebView *_Nonnull)webVC; ++ (void)displayWebView:(NSURL*_Nonnull)url; +@end diff --git a/iOS_SDK/OneSignalSDK/OneSignalInAppMessages/UI/OneSignalWebViewManager.m b/iOS_SDK/OneSignalSDK/OneSignalInAppMessages/UI/OneSignalWebViewManager.m new file mode 100644 index 000000000..743c8f54c --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignalInAppMessages/UI/OneSignalWebViewManager.m @@ -0,0 +1,47 @@ +/* + Modified MIT License + + Copyright 2022 OneSignal + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + 1. The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + 2. All copies of substantial portions of the Software may only be used in connection + with services provided by OneSignal. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + */ + +#import +#import "OneSignalWebViewManager.h" + +@implementation OneSignalWebViewManager : NSObject + +OneSignalWebView *_webVC; ++ (OneSignalWebView * _Nonnull)webVC { + if (!_webVC) { + _webVC = [[OneSignalWebView alloc] init]; + } + return _webVC; +} + ++ (void)displayWebView:(NSURL *_Nonnull)url { + [self webVC].url = url; + [[self webVC] showInApp]; +} + + +@end diff --git a/iOS_SDK/OneSignalSDK/OneSignalInAppMessagesFramework/Info.plist b/iOS_SDK/OneSignalSDK/OneSignalInAppMessagesFramework/Info.plist new file mode 100644 index 000000000..fbe1e6b31 --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignalInAppMessagesFramework/Info.plist @@ -0,0 +1,24 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0 + CFBundleVersion + $(CURRENT_PROJECT_VERSION) + NSPrincipalClass + + + diff --git a/iOS_SDK/OneSignalSDK/Source/OneSignalLocation.h b/iOS_SDK/OneSignalSDK/OneSignalLocation/OneSignalLocationManager.h similarity index 78% rename from iOS_SDK/OneSignalSDK/Source/OneSignalLocation.h rename to iOS_SDK/OneSignalSDK/OneSignalLocation/OneSignalLocationManager.h index 2cbfd39eb..20fdd69b9 100644 --- a/iOS_SDK/OneSignalSDK/Source/OneSignalLocation.h +++ b/iOS_SDK/OneSignalSDK/OneSignalLocation/OneSignalLocationManager.h @@ -27,7 +27,8 @@ #import #import -#import "OneSignalCommonDefines.h" +#import +#import #ifndef OneSignalLocation_h #define OneSignalLocation_h @@ -42,19 +43,15 @@ typedef struct os_last_location { double verticalAccuracy; double horizontalAccuracy; } os_last_location; - -@interface OneSignalLocation : NSObject - -+ (OneSignalLocation*) sharedInstance; -+ (bool)started; -+ (void)internalGetLocation:(bool)prompt fallbackToSettings:(BOOL)fallback; -- (void)locationManager:(id)manager didUpdateLocations:(NSArray *)locations; -+ (void)getLocation:(bool)prompt fallbackToSettings:(BOOL)fallback withCompletionHandler:(void (^)(PromptActionResult result))completionHandler; -+ (void)sendLocation; -+ (os_last_location*)lastLocation; +//rename to OneSignalLocationManager +@interface OneSignalLocationManager : NSObject ++ (Class)Location; ++ (OneSignalLocationManager*) sharedInstance; ++ (void)start; + (void)clearLastLocation; + (void)onFocus:(BOOL)isActive; - ++ (void)startLocationSharedWithFlag:(BOOL)enable; ++ (void)promptLocationFallbackToSettings:(BOOL)fallback completionHandler:(void (^)(PromptActionResult result))completionHandler; @end #endif /* OneSignalLocation_h */ diff --git a/iOS_SDK/OneSignalSDK/Source/OneSignalLocation.m b/iOS_SDK/OneSignalSDK/OneSignalLocation/OneSignalLocationManager.m similarity index 69% rename from iOS_SDK/OneSignalSDK/Source/OneSignalLocation.m rename to iOS_SDK/OneSignalSDK/OneSignalLocation/OneSignalLocationManager.m index 48001f2b3..3dc23d8fc 100644 --- a/iOS_SDK/OneSignalSDK/Source/OneSignalLocation.m +++ b/iOS_SDK/OneSignalSDK/OneSignalLocation/OneSignalLocationManager.m @@ -27,23 +27,11 @@ #import #import - -#import "OneSignalLocation.h" -#import "OneSignalHelper.h" -#import "OneSignal.h" +#import "OneSignalLocationManager.h" #import -#import "OneSignalDialogController.h" -#import "OSStateSynchronizer.h" - -@interface OneSignal () -+ (NSString *)mEmailUserId; -+ (NSString*)mUserId; -+ (NSString *)mEmailAuthToken; -+ (NSString *)mExternalIdAuthToken; -+ (OSStateSynchronizer *)stateSynchronizer; -@end +#import -@implementation OneSignalLocation +@implementation OneSignalLocationManager //Track time until next location fire event const NSTimeInterval foregroundSendLocationWaitTime = 5 * 60.0; @@ -82,17 +70,63 @@ +(NSObject*)mutexObjectForLastLocation { return _mutexObjectForLastLocation; } -static OneSignalLocation* singleInstance = nil; -+(OneSignalLocation*) sharedInstance { +static OneSignalLocationManager* singleInstance = nil; ++(OneSignalLocationManager*) sharedInstance { @synchronized( singleInstance ) { if( !singleInstance ) { - singleInstance = [[OneSignalLocation alloc] init]; + singleInstance = [[OneSignalLocationManager alloc] init]; } } return singleInstance; } ++ (Class)Location { + return self; +} + ++ (void)start { + if ([OneSignalConfigManager getAppId] != nil && [self isShared]) { + [OneSignalLocationManager getLocation:false fallbackToSettings:false withCompletionHandler:nil]; + } +} + ++ (void)setShared:(BOOL)enable { + // Already set by remote params + if ([[OSRemoteParamController sharedController] hasLocationKey]) + return; + + [self startLocationSharedWithFlag:enable]; +} + ++ (void)startLocationSharedWithFlag:(BOOL)enable { + [OneSignalLog onesignalLog:ONE_S_LL_VERBOSE message:[NSString stringWithFormat:@"startLocationSharedWithFlag called with status: %d", (int) enable]]; + + [[OSRemoteParamController sharedController] saveLocationShared:enable]; + + if (!enable) { + [OneSignalLog onesignalLog:ONE_S_LL_VERBOSE message:@"startLocationSharedWithFlag set false, clearing last location!"]; + [OneSignalLocationManager clearLastLocation]; + } +} + ++ (void)requestPermission { + [self promptLocationFallbackToSettings:false completionHandler:nil]; +} + ++ (void)promptLocationFallbackToSettings:(BOOL)fallback completionHandler:(void (^)(PromptActionResult result))completionHandler { + // return if the user has not granted privacy permissions + if ([OSPrivacyConsentController shouldLogMissingPrivacyConsentErrorWithMethodName:@"promptLocation"]) + return; + + [OneSignalLocationManager getLocation:true fallbackToSettings:fallback withCompletionHandler:completionHandler]; +} + ++ (BOOL)isShared { + return [[OSRemoteParamController sharedController] isLocationShared]; +} + + + (os_last_location*)lastLocation { return lastLocation; } @@ -102,23 +136,23 @@ + (bool)started { } + (void)clearLastLocation { - @synchronized(OneSignalLocation.mutexObjectForLastLocation) { + @synchronized(OneSignalLocationManager.mutexObjectForLastLocation) { lastLocation = nil; } } + (void)getLocation:(bool)prompt fallbackToSettings:(BOOL)fallback withCompletionHandler:(void (^)(PromptActionResult result))completionHandler { if (completionHandler) - [OneSignalLocation.locationListeners addObject:completionHandler]; + [OneSignalLocationManager.locationListeners addObject:completionHandler]; if (hasDelayed) - [OneSignalLocation internalGetLocation:prompt fallbackToSettings:fallback]; + [OneSignalLocationManager internalGetLocation:prompt fallbackToSettings:fallback]; else { // Delay required for locationServicesEnabled and authorizationStatus return the correct values when CoreLocation is not statically linked. dispatch_time_t popTime = dispatch_time(DISPATCH_TIME_NOW, 2.0 * NSEC_PER_SEC); dispatch_after(popTime, dispatch_get_main_queue(), ^(void) { hasDelayed = true; - [OneSignalLocation internalGetLocation:prompt fallbackToSettings:fallback]; + [OneSignalLocationManager internalGetLocation:prompt fallbackToSettings:fallback]; }); } // Listen to app going to and from background @@ -127,7 +161,7 @@ + (void)getLocation:(bool)prompt fallbackToSettings:(BOOL)fallback withCompletio + (void)onFocus:(BOOL)isActive { // return if the user has not granted privacy permissions - if ([OneSignal requiresUserPrivacyConsent]) + if ([OSPrivacyConsentController requiresUserPrivacyConsent]) return; if (!locationManager || ![self started]) @@ -159,7 +193,7 @@ + (void)onFocus:(BOOL)isActive { #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wint-conversion" if ([NSClassFromString(@"CLLocationManager") performSelector:@selector(authorizationStatus)] == kCLAuthorizationStatusAuthorizedAlways) { - [OneSignalLocation beginTask]; + [OneSignalLocationManager beginTask]; [requestLocationTimer invalidate]; [self requestLocation]; } else { @@ -170,7 +204,7 @@ + (void)onFocus:(BOOL)isActive { + (void)beginTask { fcTask = [[UIApplication sharedApplication] beginBackgroundTaskWithExpirationHandler:^{ - [OneSignalLocation endTask]; + [OneSignalLocationManager endTask]; }]; } @@ -180,12 +214,12 @@ + (void)endTask { } + (void)sendAndClearLocationListener:(PromptActionResult)result { - [OneSignal onesignalLog:ONE_S_LL_DEBUG message:[NSString stringWithFormat:@"OneSignalLocation sendAndClearLocationListener listeners: %@", OneSignalLocation.locationListeners]]; - for (int i = 0; i < OneSignalLocation.locationListeners.count; i++) { - ((void (^)(PromptActionResult result))[OneSignalLocation.locationListeners objectAtIndex:i])(result); + [OneSignalLog onesignalLog:ONE_S_LL_DEBUG message:[NSString stringWithFormat:@"OneSignalLocation sendAndClearLocationListener listeners: %@", OneSignalLocationManager.locationListeners]]; + for (int i = 0; i < OneSignalLocationManager.locationListeners.count; i++) { + ((void (^)(PromptActionResult result))[OneSignalLocationManager.locationListeners objectAtIndex:i])(result); } // We only call the listeners once - [OneSignalLocation.locationListeners removeAllObjects]; + [OneSignalLocationManager.locationListeners removeAllObjects]; } + (void)sendCurrentAuthStatusToListeners { @@ -213,7 +247,7 @@ + (void)internalGetLocation:(bool)prompt fallbackToSettings:(BOOL)fallback { // We evaluate the following cases after permissions were asked (denied or given) CLAuthorizationStatus permissionStatus = [clLocationManagerClass performSelector:@selector(authorizationStatus)]; BOOL showSettings = prompt && fallback && permissionStatus == kCLAuthorizationStatusDenied; - [OneSignal onesignalLog:ONE_S_LL_DEBUG message:[NSString stringWithFormat:@"internalGetLocation called showSettings: %@", showSettings ? @"YES" : @"NO"]]; + [OneSignalLog onesignalLog:ONE_S_LL_DEBUG message:[NSString stringWithFormat:@"internalGetLocation called showSettings: %@", showSettings ? @"YES" : @"NO"]]; // Fallback to settings alert view when the following condition are true: // - On a prompt flow // - Fallback to settings is enabled @@ -227,7 +261,7 @@ + (void)internalGetLocation:(bool)prompt fallbackToSettings:(BOOL)fallback { // Check for location in plist if (![clLocationManagerClass performSelector:@selector(locationServicesEnabled)]) { - [OneSignal onesignalLog:ONE_S_LL_DEBUG message:@"CLLocationManager locationServices Disabled."]; + [OneSignalLog onesignalLog:ONE_S_LL_DEBUG message:@"CLLocationManager locationServices Disabled."]; [self sendAndClearLocationListener:ERROR]; return; } @@ -235,7 +269,7 @@ + (void)internalGetLocation:(bool)prompt fallbackToSettings:(BOOL)fallback { CLAuthorizationStatus permissionStatus = [clLocationManagerClass performSelector:@selector(authorizationStatus)]; // return if permission not determined and should not prompt if (permissionStatus == kCLAuthorizationStatusNotDetermined && !prompt) { - [OneSignal onesignalLog:ONE_S_LL_DEBUG message:@"internalGetLocation kCLAuthorizationStatusNotDetermined."]; + [OneSignalLog onesignalLog:ONE_S_LL_DEBUG message:@"internalGetLocation kCLAuthorizationStatusNotDetermined."]; return; } @@ -257,14 +291,14 @@ + (void)internalGetLocation:(bool)prompt fallbackToSettings:(BOOL)fallback { BOOL backgroundLocationEnable = backgroundModes && [backgroundModes containsObject:@"location"] && alwaysDescription; BOOL permissionEnable = permissionStatus == kCLAuthorizationStatusAuthorizedAlways || prompt; - [OneSignal onesignalLog:ONE_S_LL_DEBUG message:[NSString stringWithFormat:@"internalGetLocation called backgroundLocationEnable: %@ permissionEnable: %@", backgroundLocationEnable ? @"YES" : @"NO", permissionEnable ? @"YES" : @"NO"]]; + [OneSignalLog onesignalLog:ONE_S_LL_DEBUG message:[NSString stringWithFormat:@"internalGetLocation called backgroundLocationEnable: %@ permissionEnable: %@", backgroundLocationEnable ? @"YES" : @"NO", permissionEnable ? @"YES" : @"NO"]]; if (backgroundLocationEnable && permissionEnable) { #pragma clang diagnostic push #pragma clang diagnostic ignored "-Warc-performSelector-leaks" [locationManager performSelector:NSSelectorFromString(@"requestAlwaysAuthorization")]; #pragma clang diagnostic pop - if ([OneSignalHelper isIOSVersionGreaterThanOrEqual:@"9.0"]) + if ([OSDeviceUtils isIOSVersionGreaterThanOrEqual:@"9.0"]) [locationManager setValue:@YES forKey:@"allowsBackgroundLocationUpdates"]; } @@ -274,7 +308,7 @@ + (void)internalGetLocation:(bool)prompt fallbackToSettings:(BOOL)fallback { } else { - [OneSignal onesignalLog:ONE_S_LL_ERROR message:@"Include a privacy NSLocationAlwaysUsageDescription or NSLocationWhenInUseUsageDescription in your info.plist to request location permissions."]; + [OneSignalLog onesignalLog:ONE_S_LL_ERROR message:@"Include a privacy NSLocationAlwaysUsageDescription or NSLocationWhenInUseUsageDescription in your info.plist to request location permissions."]; [self sendAndClearLocationListener:LOCATION_PERMISSIONS_MISSING_INFO_PLIST]; } @@ -289,16 +323,16 @@ + (void)internalGetLocation:(bool)prompt fallbackToSettings:(BOOL)fallback { } + (void)showLocationSettingsAlertController { - [OneSignal onesignalLog:ONE_S_LL_DEBUG message:@"CLLocationManager permissionStatus kCLAuthorizationStatusDenied fallaback to settings"]; - [[OneSignalDialogController sharedInstance] presentDialogWithTitle:@"Location Not Available" withMessage:@"You have previously denied sharing your device location. Please go to settings to enable." withActions:@[@"Open Settings"] cancelTitle:@"Cancel" withActionCompletion:^(int tappedActionIndex) { + [OneSignalLog onesignalLog:ONE_S_LL_DEBUG message:@"CLLocationManager permissionStatus kCLAuthorizationStatusDenied fallaback to settings"]; + [[OSDialogInstanceManager sharedInstance] presentDialogWithTitle:@"Location Not Available" withMessage:@"You have previously denied sharing your device location. Please go to settings to enable." withActions:@[@"Open Settings"] cancelTitle:@"Cancel" withActionCompletion:^(int tappedActionIndex) { if (tappedActionIndex > -1) { - [OneSignal onesignalLog:ONE_S_LL_DEBUG message:@"CLLocationManage open settings option click"]; + [OneSignalLog onesignalLog:ONE_S_LL_DEBUG message:@"CLLocationManage open settings option click"]; #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wdeprecated" [[UIApplication sharedApplication] openURL:[NSURL URLWithString:UIApplicationOpenSettingsURLString]]; #pragma clang diagnostic pop } - [OneSignalLocation sendAndClearLocationListener:false]; + [OneSignalLocationManager sendAndClearLocationListener:false]; return; }]; } @@ -308,7 +342,7 @@ + (BOOL)backgroundTaskIsActive { } + (void)requestLocation { - [OneSignal onesignalLog:ONE_S_LL_DEBUG message:@"OneSignalLocation Requesting Updated Location"]; + [OneSignalLog onesignalLog:ONE_S_LL_DEBUG message:@"OneSignalLocation Requesting Updated Location"]; id clLocationManagerClass = NSClassFromString(@"CLLocationManager"); if ([UIApplication sharedApplication].applicationState == UIApplicationStateBackground && [clLocationManagerClass performSelector:@selector(significantLocationChangeMonitoringAvailable)]) { @@ -325,16 +359,16 @@ + (void)requestLocation { - (void)locationManager:(id)manager didUpdateLocations:(NSArray *)locations { // return if the user has not granted privacy permissions or location shared is false - if (([OneSignal requiresUserPrivacyConsent] || ![OneSignal isLocationShared]) && !fallbackToSettings) { - [OneSignal onesignalLog:ONE_S_LL_DEBUG message:@"CLLocationManagerDelegate clear Location listener due to permissions denied or location shared not available"]; - [OneSignalLocation sendAndClearLocationListener:PERMISSION_DENIED]; + if (([OSPrivacyConsentController requiresUserPrivacyConsent] || ![OneSignalLocationManager isShared]) && !fallbackToSettings) { + [OneSignalLog onesignalLog:ONE_S_LL_DEBUG message:@"CLLocationManagerDelegate clear Location listener due to permissions denied or location shared not available"]; + [OneSignalLocationManager sendAndClearLocationListener:PERMISSION_DENIED]; return; } [manager performSelector:@selector(stopUpdatingLocation)]; if ([UIApplication sharedApplication].applicationState != UIApplicationStateBackground) { [manager performSelector:@selector(stopMonitoringSignificantLocationChanges)]; if (!requestLocationTimer) - [OneSignalLocation resetSendTimer]; + [OneSignalLocationManager resetSendTimer]; } id location = locations.lastObject; @@ -348,11 +382,11 @@ - (void)locationManager:(id)manager didUpdateLocations:(NSArray *)locations { [invocation invoke]; [invocation getReturnValue:&cords]; - @synchronized(OneSignalLocation.mutexObjectForLastLocation) { + @synchronized(OneSignalLocationManager.mutexObjectForLastLocation) { if (!lastLocation) lastLocation = (os_last_location*)malloc(sizeof(os_last_location)); if (lastLocation == NULL) { - [OneSignal onesignalLog:ONE_S_LL_ERROR message:@"OneSignalLocation: unable to allocate memory for os_last_location"]; + [OneSignalLog onesignalLog:ONE_S_LL_ERROR message:@"OneSignalLocation: unable to allocate memory for os_last_location"]; return; } lastLocation->verticalAccuracy = [[location valueForKey:@"verticalAccuracy"] doubleValue]; @@ -362,19 +396,19 @@ - (void)locationManager:(id)manager didUpdateLocations:(NSArray *)locations { - [OneSignalLocation sendLocation]; + [OneSignalLocationManager sendLocation]; - [OneSignalLocation sendAndClearLocationListener:PERMISSION_GRANTED]; - if ([OneSignalLocation backgroundTaskIsActive]) { - [OneSignalLocation endTask]; + [OneSignalLocationManager sendAndClearLocationListener:PERMISSION_GRANTED]; + if ([OneSignalLocationManager backgroundTaskIsActive]) { + [OneSignalLocationManager endTask]; } } - (void)locationManager:(id)manager didFailWithError:(NSError *)error { - [OneSignal onesignalLog:ONE_S_LL_ERROR message:[NSString stringWithFormat:@"CLLocationManager did fail with error: %@", error]]; - [OneSignalLocation sendAndClearLocationListener:ERROR]; - if ([OneSignalLocation backgroundTaskIsActive]) { - [OneSignalLocation endTask]; + [OneSignalLog onesignalLog:ONE_S_LL_ERROR message:[NSString stringWithFormat:@"CLLocationManager did fail with error: %@", error]]; + [OneSignalLocationManager sendAndClearLocationListener:ERROR]; + if ([OneSignalLocationManager backgroundTaskIsActive]) { + [OneSignalLocationManager endTask]; } } @@ -386,22 +420,24 @@ + (void)resetSendTimer { + (void)sendLocation { // return if the user has not granted privacy permissions - if ([OneSignal requiresUserPrivacyConsent]) + if ([OSPrivacyConsentController requiresUserPrivacyConsent]) return; - @synchronized(OneSignalLocation.mutexObjectForLastLocation) { - if (!lastLocation || ![OneSignal mUserId]) + @synchronized(OneSignalLocationManager.mutexObjectForLastLocation) { + NSString *userId = OneSignalUserManagerImpl.sharedInstance.pushSubscriptionId; + if (!lastLocation || !userId) return; //Fired from timer and not initial location fetched if (initialLocationSent && [UIApplication sharedApplication].applicationState != UIApplicationStateBackground) - [OneSignalLocation resetSendTimer]; + [OneSignalLocationManager resetSendTimer]; initialLocationSent = YES; - [OneSignal.stateSynchronizer sendLocation:lastLocation appId:[OneSignal appId] networkType:[OneSignalHelper getNetType] backgroundState:([UIApplication sharedApplication].applicationState != UIApplicationStateActive)]; + CGFloat latitude = lastLocation->cords.latitude; + CGFloat longitude = lastLocation->cords.longitude; + [OneSignalUserManagerImpl.sharedInstance setLocationWithLatitude:latitude longitude:longitude]; } - } diff --git a/iOS_SDK/OneSignalSDK/OneSignalLocationFramework/Info.plist b/iOS_SDK/OneSignalSDK/OneSignalLocationFramework/Info.plist new file mode 100644 index 000000000..fbe1e6b31 --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignalLocationFramework/Info.plist @@ -0,0 +1,24 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0 + CFBundleVersion + $(CURRENT_PROJECT_VERSION) + NSPrincipalClass + + + diff --git a/iOS_SDK/OneSignalSDK/OneSignalNotifications/Categories/UIApplicationDelegate+OneSignalNotifications.h b/iOS_SDK/OneSignalSDK/OneSignalNotifications/Categories/UIApplicationDelegate+OneSignalNotifications.h new file mode 100644 index 000000000..4a723264d --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignalNotifications/Categories/UIApplicationDelegate+OneSignalNotifications.h @@ -0,0 +1,35 @@ +/** + * Modified MIT License + * + * Copyright 2016 OneSignal + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * 1. The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * 2. All copies of substantial portions of the Software may only be used in connection + * with services provided by OneSignal. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#ifndef UIApplicationDelegate_OneSignalNotifications_h +#define UIApplicationDelegate_OneSignalNotifications_h +@interface OneSignalNotificationsAppDelegate : NSObject + ++ (void)traceCall:(NSString*)selector; + +@end +#endif /* UIApplicationDelegate_OneSignalNotifications_h */ diff --git a/iOS_SDK/OneSignalSDK/OneSignalNotifications/Categories/UIApplicationDelegate+OneSignalNotifications.m b/iOS_SDK/OneSignalSDK/OneSignalNotifications/Categories/UIApplicationDelegate+OneSignalNotifications.m new file mode 100644 index 000000000..50ae12bc7 --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignalNotifications/Categories/UIApplicationDelegate+OneSignalNotifications.m @@ -0,0 +1,225 @@ +/** + * Modified MIT License + * + * Copyright 2016 OneSignal + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * 1. The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * 2. All copies of substantial portions of the Software may only be used in connection + * with services provided by OneSignal. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#import +#import +#import "OneSignalNotifications.h" +#import "UIApplicationDelegate+OneSignalNotifications.h" +#import "OSNotification+Internal.h" +#import "OneSignalCommonDefines.h" +#import "OneSignalSelectorHelpers.h" +#import "SwizzlingForwarder.h" +#import "OSNotificationsManager.h" +#import + +// This class hooks into the UIApplicationDelegate selectors to receive iOS 9 and older events. +// - UNUserNotificationCenter is used for iOS 10 +// - Orignal implementations are called so other plugins and the developers AppDelegate is still called. + +@implementation OneSignalNotificationsAppDelegate + ++ (void) oneSignalLoadedTagSelector {} + +// A Set to keep track of which classes we have already swizzled so we only +// swizzle each one once. If we swizzled more than once then this will create +// an infinite loop, this includes swizzling with ourselves but also with +// another SDK that swizzles. +static NSMutableSet* swizzledClasses; + +- (void) setOneSignalDelegate:(id)delegate { + [OneSignalNotificationsAppDelegate traceCall:@"setOneSignalDelegate:"]; + [OneSignalLog onesignalLog:ONE_S_LL_VERBOSE message:[NSString stringWithFormat:@"ONESIGNAL setOneSignalDelegate CALLED: %@", delegate]]; + + if (swizzledClasses == nil) + swizzledClasses = [NSMutableSet new]; + + Class delegateClass = [delegate class]; + + if (delegate == nil || [OneSignalNotificationsAppDelegate swizzledClassInHeirarchy:delegateClass]) { + [self setOneSignalDelegate:delegate]; + return; + } + [swizzledClasses addObject:delegateClass]; + + Class newClass = [OneSignalNotificationsAppDelegate class]; + + // Need to keep this one for iOS 10 for content-available notifiations when the app is not in focus + // iOS 10 doesn't fire a selector on UNUserNotificationCenter in this cases most likely becuase + // UNNotificationServiceExtension (mutable-content) and UNNotificationContentExtension (with category) replaced it. + injectSelector( + delegateClass, + @selector(application:didReceiveRemoteNotification:fetchCompletionHandler:), + newClass, + @selector(oneSignalReceiveRemoteNotification:UserInfo:fetchCompletionHandler:) + ); + + injectSelector( + delegateClass, + @selector(application:didFailToRegisterForRemoteNotificationsWithError:), + newClass, + @selector(oneSignalDidFailRegisterForRemoteNotification:error:) + ); + + injectSelector( + delegateClass, + @selector(application:didRegisterForRemoteNotificationsWithDeviceToken:), + newClass, + @selector(oneSignalDidRegisterForRemoteNotifications:deviceToken:) + ); + + [self setOneSignalDelegate:delegate]; +} + ++ (BOOL)swizzledClassInHeirarchy:(Class)delegateClass { + if ([swizzledClasses containsObject:delegateClass]) { + [OneSignalLog onesignalLog:ONE_S_LL_VERBOSE message:[NSString stringWithFormat:@"OneSignal already swizzled %@", NSStringFromClass(delegateClass)]]; + return true; + } + Class superClass = class_getSuperclass(delegateClass); + while(superClass) { + if ([swizzledClasses containsObject:superClass]) { + [OneSignalLog onesignalLog:ONE_S_LL_VERBOSE message:[NSString stringWithFormat:@"OneSignal already swizzled %@ in super class: %@", NSStringFromClass(delegateClass), NSStringFromClass(superClass)]]; + return true; + } + superClass = class_getSuperclass(superClass); + } + return false; +} + +- (void)oneSignalDidRegisterForRemoteNotifications:(UIApplication*)app deviceToken:(NSData*)inDeviceToken { + [OneSignalNotificationsAppDelegate traceCall:@"oneSignalDidRegisterForRemoteNotifications:deviceToken:"]; + + [OSNotificationsManager didRegisterForRemoteNotifications:app deviceToken:inDeviceToken]; + + SwizzlingForwarder *forwarder = [[SwizzlingForwarder alloc] + initWithTarget:self + withYourSelector:@selector( + oneSignalDidRegisterForRemoteNotifications:deviceToken: + ) + withOriginalSelector:@selector( + application:didRegisterForRemoteNotificationsWithDeviceToken: + ) + ]; + [forwarder invokeWithArgs:@[app, inDeviceToken]]; +} + +- (void)oneSignalDidFailRegisterForRemoteNotification:(UIApplication*)app error:(NSError*)err { + [OneSignalNotificationsAppDelegate traceCall:@"oneSignalDidFailRegisterForRemoteNotification:error:"]; + + if ([OneSignalConfigManager getAppId]) + [OSNotificationsManager handleDidFailRegisterForRemoteNotification:err]; + + SwizzlingForwarder *forwarder = [[SwizzlingForwarder alloc] + initWithTarget:self + withYourSelector:@selector( + oneSignalDidFailRegisterForRemoteNotification:error: + ) + withOriginalSelector:@selector( + application:didFailToRegisterForRemoteNotificationsWithError: + ) + ]; + [forwarder invokeWithArgs:@[app, err]]; +} + +// Fires when a notication is opened or recieved while the app is in focus. +// - Also fires when the app is in the background and a notificaiton with content-available=1 is received. +// NOTE: completionHandler must only be called once! +// iOS 10 - This crashes the app if it is called twice! Crash will happen when the app is resumed. +// iOS 9 - Does not have this issue. +- (void) oneSignalReceiveRemoteNotification:(UIApplication*)application UserInfo:(NSDictionary*)userInfo fetchCompletionHandler:(void (^)(UIBackgroundFetchResult)) completionHandler { + [OneSignalNotificationsAppDelegate traceCall:@"oneSignalReceiveRemoteNotification:UserInfo:fetchCompletionHandler:"]; + SwizzlingForwarder *forwarder = [[SwizzlingForwarder alloc] + initWithTarget:self + withYourSelector:@selector( + oneSignalReceiveRemoteNotification:UserInfo:fetchCompletionHandler: + ) + withOriginalSelector:@selector( + application:didReceiveRemoteNotification:fetchCompletionHandler: + ) + ]; + + BOOL startedBackgroundJob = false; + + if ([OneSignalConfigManager getAppId]) { + let appState = [UIApplication sharedApplication].applicationState; + let isVisibleNotification = userInfo[@"aps"][@"alert"] != nil; + + // iOS 9 - Notification was tapped on + // https://medium.com/posts-from-emmerge/ios-push-notification-background-fetch-demystified-7090358bb66e + // - NOTE: We do not have the extra logic for the notifiation center or double tap home button cases + // of "inactive" on notification received the link above describes. + // Omiting that complex logic as iOS 9 usage stats are very low (12/11/2020) and these are rare cases. + if ([OSDeviceUtils isIOSVersionLessThan:@"10.0"] && appState == UIApplicationStateInactive && isVisibleNotification) { + [OSNotificationsManager notificationReceived:userInfo wasOpened:YES]; + } + else if (appState == UIApplicationStateActive && isVisibleNotification) + [OSNotificationsManager notificationReceived:userInfo wasOpened:NO]; + else + startedBackgroundJob = [OSNotificationsManager receiveRemoteNotification:application UserInfo:userInfo completionHandler:forwarder.hasReceiver ? nil : completionHandler]; + } + + if (forwarder.hasReceiver) { + [forwarder invokeWithArgs:@[application, userInfo, completionHandler]]; + return; + } + + [OneSignalNotificationsAppDelegate + forwardToDepercatedApplication:application + didReceiveRemoteNotification:userInfo]; + + if (!startedBackgroundJob) + completionHandler(UIBackgroundFetchResultNewData); +} + +// Forwards to application:didReceiveRemoteNotification: in the rare case +// that the app happens to use this BUT doesn't use +// UNUserNotificationCenterDelegate OR +// application:didReceiveRemoteNotification:fetchCompletionHandler: +// https://developer.apple.com/documentation/uikit/uiapplicationdelegate/1623117-application?language=objc ++(void)forwardToDepercatedApplication:(UIApplication*)application didReceiveRemoteNotification:(NSDictionary*)userInfo { + id originalDelegate = UIApplication.sharedApplication.delegate; + if (![originalDelegate respondsToSelector:@selector(application:didReceiveRemoteNotification:)]) + return; + + // Make sure we don't forward to this depreated selector on cold start + // from a notification open, since iOS itself doesn't call this either + if ([OSNotificationsManager getColdStartFromTapOnNotification]) + return; + + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wdeprecated-declarations" + [originalDelegate application:application didReceiveRemoteNotification:userInfo]; + #pragma clang diagnostic pop +} + +// Used to log all calls, also used in unit tests to observer +// the OneSignalNotificationsAppDelegate selectors get called. ++(void) traceCall:(NSString*)selector { + [OneSignalLog onesignalLog:ONE_S_LL_VERBOSE message:selector]; +} + +@end diff --git a/iOS_SDK/OneSignalSDK/Source/UNUserNotificationCenter+OneSignal.h b/iOS_SDK/OneSignalSDK/OneSignalNotifications/Categories/UNUserNotificationCenter+OneSignalNotifications.h similarity index 87% rename from iOS_SDK/OneSignalSDK/Source/UNUserNotificationCenter+OneSignal.h rename to iOS_SDK/OneSignalSDK/OneSignalNotifications/Categories/UNUserNotificationCenter+OneSignalNotifications.h index 975d3d3ff..6941aeb39 100644 --- a/iOS_SDK/OneSignalSDK/Source/UNUserNotificationCenter+OneSignal.h +++ b/iOS_SDK/OneSignalSDK/OneSignalNotifications/Categories/UNUserNotificationCenter+OneSignalNotifications.h @@ -25,12 +25,10 @@ * THE SOFTWARE. */ -#ifndef UNUserNotificationCenter_OneSignal_h -#define UNUserNotificationCenter_OneSignal_h +#ifndef UNUserNotificationCenter_OneSignalNotifications_h +#define UNUserNotificationCenter_OneSignalNotifications_h -#import "OneSignal.h" - -@interface OneSignalUNUserNotificationCenter : NSObject +@interface OneSignalNotificationsUNUserNotificationCenter : NSObject + (void)setup; + (void)swizzleSelectors; + (void)swizzleSelectorsOnDelegate:(id)delegate; @@ -48,9 +46,9 @@ withCompletionHandler:(void (^)(UNNotificationPresentationOptions options))completionHandler; - (void)onesignalUserNotificationCenter:(UNUserNotificationCenter *)center didReceiveNotificationResponse:(UNNotificationResponse *)response - withCompletionHandler:(void(^)())completionHandler; + withCompletionHandler:(void(^)(void))completionHandler; + (void)traceCall:(NSString*)selector; @end -#endif /* UNUserNotificationCenter_OneSignal_h */ +#endif /* UNUserNotificationCenter_OneSignalNotifications_h */ diff --git a/iOS_SDK/OneSignalSDK/Source/UNUserNotificationCenter+OneSignal.m b/iOS_SDK/OneSignalSDK/OneSignalNotifications/Categories/UNUserNotificationCenter+OneSignalNotifications.m similarity index 78% rename from iOS_SDK/OneSignalSDK/Source/UNUserNotificationCenter+OneSignal.m rename to iOS_SDK/OneSignalSDK/OneSignalNotifications/Categories/UNUserNotificationCenter+OneSignalNotifications.m index 5944507ba..14bb1bbc1 100644 --- a/iOS_SDK/OneSignalSDK/Source/UNUserNotificationCenter+OneSignal.m +++ b/iOS_SDK/OneSignalSDK/OneSignalNotifications/Categories/UNUserNotificationCenter+OneSignalNotifications.m @@ -29,14 +29,10 @@ #import #import -#import "UNUserNotificationCenter+OneSignal.h" -#import "OneSignal.h" -#import "OneSignalInternal.h" -#import "OneSignalHelper.h" -#import "OneSignalSelectorHelpers.h" -#import "UIApplicationDelegate+OneSignal.h" -#import "OneSignalCommonDefines.h" -#import "SwizzlingForwarder.h" +#import "UNUserNotificationCenter+OneSignalNotifications.h" +#import "UIApplicationDelegate+OneSignalNotifications.h" +#import "OSNotificationsManager.h" +#import #import #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wundeclared-selector" @@ -46,11 +42,6 @@ typedef void (^OSUNNotificationCenterCompletionHandler)(UNNotificationPresentationOptions options); -@interface OneSignal (UN_extra) -+ (void)notificationReceived:(NSDictionary*)messageDict wasOpened:(BOOL)opened; -+ (void)handleWillPresentNotificationInForegroundWithPayload:(NSDictionary *)payload withCompletion:(OSNotificationDisplayResponse)completionHandler; -@end - @interface OSUNUserNotificationCenterDelegate : NSObject + (OSUNUserNotificationCenterDelegate*)sharedInstance; @end @@ -77,18 +68,18 @@ + (OSUNUserNotificationCenterDelegate*)sharedInstance { // This ensures we don't produce any side effects to standard iOS API selectors. // The `callLegacyAppDeletegateSelector` selector below takes care of this backwards compatibility handling. -@implementation OneSignalUNUserNotificationCenter +@implementation OneSignalNotificationsUNUserNotificationCenter + (void)setup { - [OneSignalUNUserNotificationCenter swizzleSelectors]; - [OneSignalUNUserNotificationCenter registerDelegate]; + [OneSignalNotificationsUNUserNotificationCenter swizzleSelectors]; + [OneSignalNotificationsUNUserNotificationCenter registerDelegate]; } + (void)swizzleSelectors { injectSelector( [UNUserNotificationCenter class], @selector(setDelegate:), - [OneSignalUNUserNotificationCenter class], + [OneSignalNotificationsUNUserNotificationCenter class], @selector(setOneSignalUNDelegate:) ); @@ -97,13 +88,13 @@ + (void)swizzleSelectors { injectSelector( [UNUserNotificationCenter class], @selector(requestAuthorizationWithOptions:completionHandler:), - [OneSignalUNUserNotificationCenter class], + [OneSignalNotificationsUNUserNotificationCenter class], @selector(onesignalRequestAuthorizationWithOptions:completionHandler:) ); injectSelector( [UNUserNotificationCenter class], @selector(getNotificationSettingsWithCompletionHandler:), - [OneSignalUNUserNotificationCenter class], + [OneSignalNotificationsUNUserNotificationCenter class], @selector(onesignalGetNotificationSettingsWithCompletionHandler:) ); } @@ -148,14 +139,13 @@ - (void)onesignalRequestAuthorizationWithOptions:(UNAuthorizationOptions)options //we don't want to modify these settings if the authorization is provisional (iOS 12 'Direct to History') if (notProvisionalRequest) - OneSignal.currentPermissionState.hasPrompted = true; - + OSNotificationsManager.currentPermissionState.hasPrompted = true; useCachedUNNotificationSettings = true; id wrapperBlock = ^(BOOL granted, NSError* error) { useCachedUNNotificationSettings = false; if (notProvisionalRequest) { - OneSignal.currentPermissionState.accepted = granted; - OneSignal.currentPermissionState.answeredPrompt = true; + OSNotificationsManager.currentPermissionState.accepted = granted; + OSNotificationsManager.currentPermissionState.answeredPrompt = true; } completionHandler(granted, error); }; @@ -193,15 +183,15 @@ - (void) setOneSignalUNDelegate:(id)delegate { Class delegateClass = [delegate class]; - if (delegate == nil || [OneSignalUNUserNotificationCenter swizzledClassInHeirarchy:delegateClass]) { + if (delegate == nil || [OneSignalNotificationsUNUserNotificationCenter swizzledClassInHeirarchy:delegateClass]) { [self setOneSignalUNDelegate:delegate]; return; } [swizzledClasses addObject:delegateClass]; - [OneSignal onesignalLog:ONE_S_LL_VERBOSE message:@"OneSignalUNUserNotificationCenter setOneSignalUNDelegate Fired!"]; + [OneSignalLog onesignalLog:ONE_S_LL_VERBOSE message:@"OneSignalNotificationsUNUserNotificationCenter setOneSignalUNDelegate Fired!"]; - [OneSignalUNUserNotificationCenter swizzleSelectorsOnDelegate:delegate]; + [OneSignalNotificationsUNUserNotificationCenter swizzleSelectorsOnDelegate:delegate]; // Call orignal iOS implemenation [self setOneSignalUNDelegate:delegate]; @@ -228,13 +218,13 @@ + (void)swizzleSelectorsOnDelegate:(id)delegate { injectSelector( delegateUNClass, @selector(userNotificationCenter:willPresentNotification:withCompletionHandler:), - [OneSignalUNUserNotificationCenter class], + [OneSignalNotificationsUNUserNotificationCenter class], @selector(onesignalUserNotificationCenter:willPresentNotification:withCompletionHandler:) ); injectSelector( delegateUNClass, @selector(userNotificationCenter:didReceiveNotificationResponse:withCompletionHandler:), - [OneSignalUNUserNotificationCenter class], + [OneSignalNotificationsUNUserNotificationCenter class], @selector(onesignalUserNotificationCenter:didReceiveNotificationResponse:withCompletionHandler:) ); } @@ -257,7 +247,7 @@ + (BOOL)forwardNotificationWithCenter:(UNUserNotificationCenter *)center return true; } else { // call a legacy AppDelegate selector - [OneSignalUNUserNotificationCenter callLegacyAppDeletegateSelector:notification + [OneSignalNotificationsUNUserNotificationCenter callLegacyAppDeletegateSelector:notification isTextReply:false actionIdentifier:nil userText:nil @@ -274,54 +264,54 @@ - (void)onesignalUserNotificationCenter:(UNUserNotificationCenter *)center willPresentNotification:(UNNotification *)notification withCompletionHandler:(void (^)(UNNotificationPresentationOptions options))completionHandler { - [OneSignalUNUserNotificationCenter traceCall:@"onesignalUserNotificationCenter:willPresentNotification:withCompletionHandler:"]; + [OneSignalNotificationsUNUserNotificationCenter traceCall:@"onesignalUserNotificationCenter:willPresentNotification:withCompletionHandler:"]; // return if the user has not granted privacy permissions or if not a OneSignal payload - if ([OSPrivacyConsentController shouldLogMissingPrivacyConsentErrorWithMethodName:nil] || ![OneSignalHelper isOneSignalPayload:notification.request.content.userInfo]) { - BOOL hasReceiver = [OneSignalUNUserNotificationCenter forwardNotificationWithCenter:center notification:notification OneSignalCenter:self completionHandler:completionHandler]; + if ([OSPrivacyConsentController shouldLogMissingPrivacyConsentErrorWithMethodName:nil] || ![OneSignalCoreHelper isOneSignalPayload:notification.request.content.userInfo]) { + BOOL hasReceiver = [OneSignalNotificationsUNUserNotificationCenter forwardNotificationWithCenter:center notification:notification OneSignalCenter:self completionHandler:completionHandler]; if (!hasReceiver) { completionHandler(7); } return; } - [OneSignal onesignalLog:ONE_S_LL_VERBOSE message:[NSString stringWithFormat:@"onesignalUserNotificationCenter:willPresentNotification:withCompletionHandler: Fired! %@", notification.request.content.body]]; + [OneSignalLog onesignalLog:ONE_S_LL_VERBOSE message:[NSString stringWithFormat:@"onesignalUserNotificationCenter:willPresentNotification:withCompletionHandler: Fired! %@", notification.request.content.body]]; - [OneSignal handleWillPresentNotificationInForegroundWithPayload:notification.request.content.userInfo withCompletion:^(OSNotification *responseNotif) { + [OSNotificationsManager handleWillPresentNotificationInForegroundWithPayload:notification.request.content.userInfo withCompletion:^(OSNotification *responseNotif) { UNNotificationPresentationOptions displayType = responseNotif != nil ? (UNNotificationPresentationOptions)7 : (UNNotificationPresentationOptions)0; finishProcessingNotification(notification, center, displayType, completionHandler, self); }]; } -// To avoid a crash caused by using the swizzled OneSignalUNUserNotificationCenter type this is implemented as a C function +// To avoid a crash caused by using the swizzled OneSignalNotificationsUNUserNotificationCenter type this is implemented as a C function void finishProcessingNotification(UNNotification *notification, UNUserNotificationCenter *center, UNNotificationPresentationOptions displayType, OSUNNotificationCenterCompletionHandler completionHandler, - OneSignalUNUserNotificationCenter *instance) { - [OneSignal onesignalLog:ONE_S_LL_VERBOSE message:@"finishProcessingNotification: Fired!"]; + OneSignalNotificationsUNUserNotificationCenter *instance) { + [OneSignalLog onesignalLog:ONE_S_LL_VERBOSE message:@"finishProcessingNotification: Fired!"]; NSUInteger completionHandlerOptions = displayType; - [OneSignal onesignalLog:ONE_S_LL_VERBOSE message:[NSString stringWithFormat:@"Notification display type: %lu", (unsigned long)displayType]]; + [OneSignalLog onesignalLog:ONE_S_LL_VERBOSE message:[NSString stringWithFormat:@"Notification display type: %lu", (unsigned long)displayType]]; - if ([OneSignal appId]) - [OneSignal notificationReceived:notification.request.content.userInfo wasOpened:NO]; + if ([OneSignalConfigManager getAppId]) + [OSNotificationsManager notificationReceived:notification.request.content.userInfo wasOpened:NO]; - [OneSignalUNUserNotificationCenter forwardNotificationWithCenter:center notification:notification OneSignalCenter:instance completionHandler:completionHandler]; + [OneSignalNotificationsUNUserNotificationCenter forwardNotificationWithCenter:center notification:notification OneSignalCenter:instance completionHandler:completionHandler]; // Calling completionHandler for the following reasons: // App dev may have not implented userNotificationCenter:willPresentNotification. // App dev may have implemented this selector but forgot to call completionHandler(). // Note - iOS only uses the first call to completionHandler(). - [OneSignal onesignalLog:ONE_S_LL_VERBOSE message:[NSString stringWithFormat:@"finishProcessingNotification: call completionHandler with options: %lu",(unsigned long)completionHandlerOptions]]; + [OneSignalLog onesignalLog:ONE_S_LL_VERBOSE message:[NSString stringWithFormat:@"finishProcessingNotification: call completionHandler with options: %lu",(unsigned long)completionHandlerOptions]]; completionHandler(completionHandlerOptions); } + (void)forwardReceivedNotificationResponseWithCenter:(UNUserNotificationCenter *)center didReceiveNotificationResponse:(UNNotificationResponse *)response OneSignalCenter:(id)instance - withCompletionHandler:(void(^)())completionHandler { + withCompletionHandler:(void(^)(void))completionHandler { // Call original selector if one was set. SwizzlingForwarder *forwarder = [[SwizzlingForwarder alloc] initWithTarget:instance @@ -337,10 +327,10 @@ + (void)forwardReceivedNotificationResponseWithCenter:(UNUserNotificationCenter } // Or call a legacy AppDelegate selector // - If not a dismiss event as their isn't a iOS 9 selector for it. - else if (![OneSignalUNUserNotificationCenter isDismissEvent:response]) { + else if (![OneSignalNotificationsUNUserNotificationCenter isDismissEvent:response]) { BOOL isTextReply = [response isKindOfClass:NSClassFromString(@"UNTextInputNotificationResponse")]; NSString* userText = isTextReply ? [response valueForKey:@"userText"] : nil; - [OneSignalUNUserNotificationCenter callLegacyAppDeletegateSelector:response.notification + [OneSignalNotificationsUNUserNotificationCenter callLegacyAppDeletegateSelector:response.notification isTextReply:isTextReply actionIdentifier:response.actionIdentifier userText:userText @@ -351,20 +341,19 @@ + (void)forwardReceivedNotificationResponseWithCenter:(UNUserNotificationCenter completionHandler(); } - // Apple's docs - Called to let your app know which action was selected by the user for a given notification. - (void)onesignalUserNotificationCenter:(UNUserNotificationCenter *)center didReceiveNotificationResponse:(UNNotificationResponse *)response - withCompletionHandler:(void(^)())completionHandler { - [OneSignalUNUserNotificationCenter traceCall:@"onesignalUserNotificationCenter:didReceiveNotificationResponse:withCompletionHandler:"]; - - if (![OSPrivacyConsentController shouldLogMissingPrivacyConsentErrorWithMethodName:nil] && [OneSignalHelper isOneSignalPayload:response.notification.request.content.userInfo]) { - [OneSignal onesignalLog:ONE_S_LL_VERBOSE message:@"onesignalUserNotificationCenter:didReceiveNotificationResponse:withCompletionHandler: Fired!"]; - - [OneSignalUNUserNotificationCenter processiOS10Open:response]; + withCompletionHandler:(void(^)(void))completionHandler { + [OneSignalNotificationsUNUserNotificationCenter traceCall:@"onesignalUserNotificationCenter:didReceiveNotificationResponse:withCompletionHandler:"]; + + if (![OSPrivacyConsentController shouldLogMissingPrivacyConsentErrorWithMethodName:nil] && [OneSignalCoreHelper isOneSignalPayload:response.notification.request.content.userInfo]) { + [OneSignalLog onesignalLog:ONE_S_LL_VERBOSE message:@"onesignalUserNotificationCenter:didReceiveNotificationResponse:withCompletionHandler: Fired!"]; + + [OneSignalNotificationsUNUserNotificationCenter processiOS10Open:response]; } - - [OneSignalUNUserNotificationCenter forwardReceivedNotificationResponseWithCenter:center didReceiveNotificationResponse:response OneSignalCenter:self withCompletionHandler:completionHandler]; + + [OneSignalNotificationsUNUserNotificationCenter forwardReceivedNotificationResponseWithCenter:center didReceiveNotificationResponse:response OneSignalCenter:self withCompletionHandler:completionHandler]; } + (BOOL)isDismissEvent:(UNNotificationResponse *)response { @@ -372,19 +361,19 @@ + (BOOL)isDismissEvent:(UNNotificationResponse *)response { } + (void)processiOS10Open:(UNNotificationResponse*)response { - if (![OneSignal appId]) + if (![OneSignalConfigManager getAppId]) return; - if ([OneSignalUNUserNotificationCenter isDismissEvent:response]) + if ([OneSignalNotificationsUNUserNotificationCenter isDismissEvent:response]) return; - if (![OneSignalHelper isOneSignalPayload:response.notification.request.content.userInfo]) + if (![OneSignalCoreHelper isOneSignalPayload:response.notification.request.content.userInfo]) return; - let userInfo = [OneSignalHelper formatApsPayloadIntoStandard:response.notification.request.content.userInfo + let userInfo = [OneSignalCoreHelper formatApsPayloadIntoStandard:response.notification.request.content.userInfo identifier:response.actionIdentifier]; - [OneSignal notificationReceived:userInfo wasOpened:YES]; + [OSNotificationsManager notificationReceived:userInfo wasOpened:YES]; } // Calls depercated pre-iOS 10 selector if one is set on the AppDelegate. @@ -401,8 +390,8 @@ + (void)callLegacyAppDeletegateSelector:(UNNotification *)notification actionIdentifier:(NSString*)actionIdentifier userText:(NSString*)userText fromPresentNotification:(BOOL)fromPresentNotification - withCompletionHandler:(void(^)())completionHandler { - [OneSignal onesignalLog:ONE_S_LL_VERBOSE message:@"callLegacyAppDeletegateSelector:withCompletionHandler: Fired!"]; + withCompletionHandler:(void(^)(void))completionHandler { + [OneSignalLog onesignalLog:ONE_S_LL_VERBOSE message:@"callLegacyAppDeletegateSelector:withCompletionHandler: Fired!"]; UIApplication *sharedApp = [UIApplication sharedApplication]; @@ -450,7 +439,7 @@ The iOS SDK used to call some local notification selectors (such as didReceiveLo // Used to log all calls, also used in unit tests to observer // the OneSignalUserNotificationCenter selectors get called. +(void) traceCall:(NSString*)selector { - [OneSignal onesignalLog:ONE_S_LL_VERBOSE message:selector]; + [OneSignalLog onesignalLog:ONE_S_LL_VERBOSE message:selector]; } @end diff --git a/iOS_SDK/OneSignalSDK/Source/OneSignalNotificationSettings.h b/iOS_SDK/OneSignalSDK/OneSignalNotifications/NotificationSettings/OneSignalNotificationSettings.h similarity index 85% rename from iOS_SDK/OneSignalSDK/Source/OneSignalNotificationSettings.h rename to iOS_SDK/OneSignalSDK/OneSignalNotifications/NotificationSettings/OneSignalNotificationSettings.h index d2b219d78..6f4850b19 100644 --- a/iOS_SDK/OneSignalSDK/Source/OneSignalNotificationSettings.h +++ b/iOS_SDK/OneSignalSDK/OneSignalNotifications/NotificationSettings/OneSignalNotificationSettings.h @@ -28,20 +28,21 @@ #ifndef OneSignalNotificationSettings_h #define OneSignalNotificationSettings_h -#import "OneSignal.h" - #import +#import -@protocol OneSignalNotificationSettings +typedef void(^OSUserResponseBlock)(BOOL accepted); +@interface OneSignalNotificationSettings : NSObject - (int) getNotificationTypes; -- (OSPermissionState*)getNotificationPermissionState; -- (void)getNotificationPermissionState:(void (^)(OSPermissionState *subscriptionState))completionHandler; +- (OSPermissionStateInternal*)getNotificationPermissionState; +- (void)getNotificationPermissionState:(void (^)(OSPermissionStateInternal *subscriptionState))completionHandler; - (void)promptForNotifications:(OSUserResponseBlock)block; - (void)registerForProvisionalAuthorization:(OSUserResponseBlock)block; // Only used for iOS 9 - (void)onNotificationPromptResponse:(int)notificationTypes; - ++(dispatch_queue_t)getQueue; @end + #endif /* OneSignaNotificationSettings_h */ diff --git a/iOS_SDK/OneSignalSDK/Source/OneSignalNotificationSettingsIOS10.m b/iOS_SDK/OneSignalSDK/OneSignalNotifications/NotificationSettings/OneSignalNotificationSettings.m similarity index 73% rename from iOS_SDK/OneSignalSDK/Source/OneSignalNotificationSettingsIOS10.m rename to iOS_SDK/OneSignalSDK/OneSignalNotifications/NotificationSettings/OneSignalNotificationSettings.m index fb0e49375..8d2dc9425 100644 --- a/iOS_SDK/OneSignalSDK/Source/OneSignalNotificationSettingsIOS10.m +++ b/iOS_SDK/OneSignalSDK/OneSignalNotifications/NotificationSettings/OneSignalNotificationSettings.m @@ -25,23 +25,24 @@ * THE SOFTWARE. */ -#import "OneSignalNotificationSettingsIOS10.h" - -#import "OneSignalInternal.h" +#import "OneSignalNotificationSettings.h" #import #import -#import "OneSignalHelper.h" #import "OneSignalCommonDefines.h" +#import "OSNotificationsManager.h" +#import +#import +#import -@interface OneSignalNotificationSettingsIOS10 () +@interface OneSignalNotificationSettings () // Used as both an optimization and to prevent queue deadlocks. @property (atomic) BOOL useCachedStatus; @end -@implementation OneSignalNotificationSettingsIOS10 +@implementation OneSignalNotificationSettings // Used to run all calls to getNotificationSettingsWithCompletionHandler sequentially // This prevents any possible deadlocks due to race condiditions. @@ -55,9 +56,9 @@ - (instancetype)init { return [super init]; } -- (void)getNotificationPermissionState:(void (^)(OSPermissionState *subscriptionStatus))completionHandler { +- (void)getNotificationPermissionState:(void (^)(OSPermissionStateInternal *subscriptionStatus))completionHandler { if (self.useCachedStatus) { - completionHandler(OneSignal.currentPermissionState); + completionHandler(OSNotificationsManager.currentPermissionState); return; } @@ -65,7 +66,7 @@ - (void)getNotificationPermissionState:(void (^)(OSPermissionState *subscription // NOTE2: Apple runs the callback on a background serial queue dispatch_async(serialQueue, ^{ [[UNUserNotificationCenter currentNotificationCenter] getNotificationSettingsWithCompletionHandler:^(UNNotificationSettings* settings) { - OSPermissionState* status = OneSignal.currentPermissionState; + OSPermissionStateInternal* status = OSNotificationsManager.currentPermissionState; //to avoid 'undeclared identifier' errors in older versions of Xcode, //we do not directly reference UNAuthorizationStatusProvisional (which is only available in iOS 12/Xcode 10 @@ -87,11 +88,11 @@ - (void)getNotificationPermissionState:(void (^)(OSPermissionState *subscription + (settings.lockScreenSetting == UNNotificationSettingEnabled ? 8 : 0); // check if using provisional notifications - if ([OneSignalHelper isIOSVersionGreaterThanOrEqual:@"12.0"] && settings.authorizationStatus == provisionalStatus) + if ([OSDeviceUtils isIOSVersionGreaterThanOrEqual:@"12.0"] && settings.authorizationStatus == provisionalStatus) status.notificationTypes += PROVISIONAL_UNAUTHORIZATIONOPTION; // also check if 'deliver quietly' is enabled. - if ([OneSignalHelper isIOSVersionGreaterThanOrEqual:@"10.0"] && settings.notificationCenterSetting == UNNotificationSettingEnabled) + if ([OSDeviceUtils isIOSVersionGreaterThanOrEqual:@"10.0"] && settings.notificationCenterSetting == UNNotificationSettingEnabled) status.notificationTypes += 16; self.useCachedStatus = true; @@ -103,34 +104,34 @@ - (void)getNotificationPermissionState:(void (^)(OSPermissionState *subscription // used only in cases where UNUserNotificationCenter getNotificationSettingsWith... // callback does not get executed in a timely fashion. Rather than returning nil, -- (OSPermissionState *)defaultPermissionState { - if (OneSignal.currentPermissionState != nil) { - return OneSignal.currentPermissionState; +- (OSPermissionStateInternal *)defaultPermissionState { + if (OSNotificationsManager.currentPermissionState != nil) { + return OSNotificationsManager.currentPermissionState; } - OSPermissionState *defaultState = [OSPermissionState new]; + OSPermissionStateInternal *defaultState = [OSPermissionStateInternal new]; defaultState.notificationTypes = 0; return defaultState; } -- (OSPermissionState*)getNotificationPermissionState { +- (OSPermissionStateInternal*)getNotificationPermissionState { if (self.useCachedStatus) - return OneSignal.currentPermissionState; + return OSNotificationsManager.currentPermissionState; - __block OSPermissionState* returnStatus = OneSignal.currentPermissionState; + __block OSPermissionStateInternal* returnState = OSNotificationsManager.currentPermissionState; dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); dispatch_sync(serialQueue, ^{ - [self getNotificationPermissionState:^(OSPermissionState *status) { - returnStatus = status; + [self getNotificationPermissionState:^(OSPermissionStateInternal *state) { + returnState = state; dispatch_semaphore_signal(semaphore); }]; }); dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, (int64_t)(100 * NSEC_PER_MSEC))); - return returnStatus ?: self.defaultPermissionState; + return returnState ?: self.defaultPermissionState; } - (int)getNotificationTypes { @@ -143,11 +144,11 @@ - (void)promptForNotifications:(void(^)(BOOL accepted))completionHandler { id responseBlock = ^(BOOL granted, NSError* error) { // Run callback on main / UI thread - [OneSignalHelper dispatch_async_on_main_queue: ^{ - OneSignal.currentPermissionState.provisional = false; - OneSignal.currentPermissionState.accepted = granted; - OneSignal.currentPermissionState.answeredPrompt = true; - [OneSignal updateNotificationTypes: granted ? 15 : 0]; + [OneSignalCoreHelper dispatch_async_on_main_queue: ^{ // OneSignalCoreHelper.dispatch_async_on_main_queue ?? + OSNotificationsManager.currentPermissionState.provisional = false; + OSNotificationsManager.currentPermissionState.accepted = granted; + OSNotificationsManager.currentPermissionState.answeredPrompt = true; + [OSNotificationsManager updateNotificationTypes: granted ? 15 : 0]; if (completionHandler) completionHandler(granted); }]; @@ -155,23 +156,23 @@ - (void)promptForNotifications:(void(^)(BOOL accepted))completionHandler { UNAuthorizationOptions options = (UNAuthorizationOptionAlert + UNAuthorizationOptionSound + UNAuthorizationOptionBadge); - if ([OneSignalHelper isIOSVersionGreaterThanOrEqual:@"12.0"] && [OneSignal providesAppNotificationSettings]) { + if ([OSDeviceUtils isIOSVersionGreaterThanOrEqual:@"12.0"] && [OSNotificationsManager providesAppNotificationSettings]) { options += PROVIDES_SETTINGS_UNAUTHORIZATIONOPTION; } UNUserNotificationCenter* center = [UNUserNotificationCenter currentNotificationCenter]; [center requestAuthorizationWithOptions:options completionHandler:responseBlock]; - [OneSignal registerForAPNsToken]; + [OSNotificationsManager registerForAPNsToken]; } - (void)registerForProvisionalAuthorization:(OSUserResponseBlock)block { - if ([OneSignalHelper isIOSVersionLessThan:@"12.0"]) { + if ([OSDeviceUtils isIOSVersionLessThan:@"12.0"]) { return; } - OSPermissionState *state = [self getNotificationPermissionState]; + OSPermissionStateInternal *state = [self getNotificationPermissionState]; //don't register for provisional if the user has already accepted the prompt if (state.status != OSNotificationPermissionNotDetermined || state.answeredPrompt) { @@ -185,9 +186,9 @@ - (void)registerForProvisionalAuthorization:(OSUserResponseBlock)block { let options = PROVISIONAL_UNAUTHORIZATIONOPTION + DEFAULT_UNAUTHORIZATIONOPTIONS; id responseBlock = ^(BOOL granted, NSError *error) { - [OneSignalHelper dispatch_async_on_main_queue:^{ - OneSignal.currentPermissionState.provisional = true; - [OneSignal updateNotificationTypes: options]; + [OneSignalCoreHelper dispatch_async_on_main_queue:^{ // OneSignalCoreHelper.dispatch_async_on_main_queue ?? + OSNotificationsManager.currentPermissionState.provisional = true; + [OSNotificationsManager updateNotificationTypes: options]; if (block) block(granted); }]; diff --git a/iOS_SDK/OneSignalSDK/Source/LanguageProviderDevice.h b/iOS_SDK/OneSignalSDK/OneSignalNotifications/OSNotification+OneSignal.h similarity index 84% rename from iOS_SDK/OneSignalSDK/Source/LanguageProviderDevice.h rename to iOS_SDK/OneSignalSDK/OneSignalNotifications/OSNotification+OneSignal.h index 7a24a1760..09197167e 100644 --- a/iOS_SDK/OneSignalSDK/Source/LanguageProviderDevice.h +++ b/iOS_SDK/OneSignalSDK/OneSignalNotifications/OSNotification+OneSignal.h @@ -1,7 +1,7 @@ /** * Modified MIT License * - * Copyright 2021 OneSignal + * Copyright 2021OneSignal * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -25,15 +25,13 @@ * THE SOFTWARE. */ -#import -#import "LanguageProvider.h" - -NS_ASSUME_NONNULL_BEGIN -@interface LanguageProviderDevice : NSObject - -@property (readonly, nonnull)NSString* language; +#import +#import +/** + Public interface used in the OSNotificationLifecycleListener's onWillDisplay event. + */ +@interface OSDisplayableNotification : OSNotification +- (void)display; @end - -NS_ASSUME_NONNULL_END diff --git a/iOS_SDK/OneSignalSDK/OneSignalNotifications/OSNotification+OneSignal.m b/iOS_SDK/OneSignalSDK/OneSignalNotifications/OSNotification+OneSignal.m new file mode 100644 index 000000000..f28970869 --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignalNotifications/OSNotification+OneSignal.m @@ -0,0 +1,110 @@ +/** + * Modified MIT License + * + * Copyright 2021OneSignal + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * 1. The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * 2. All copies of substantial portions of the Software may only be used in connection + * with services provided by OneSignal. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#import "OSNotification+OneSignal.h" +#import +#import + +@interface OSNotification () +- (void)initWithRawMessage:(NSDictionary*)message; +@end + +@implementation OSDisplayableNotification + +OSNotificationDisplayResponse _completion; +NSTimer *_timeoutTimer; +BOOL _wantsToDisplay = true; + ++ (instancetype)parseWithApns:(nonnull NSDictionary*)message { + if (!message) + return nil; + + OSDisplayableNotification *osNotification = [OSDisplayableNotification new]; + + [osNotification initWithRawMessage:message]; + [osNotification setTimeoutTimer]; + return osNotification; +} + +- (void)setTimeoutTimer { + _timeoutTimer = [NSTimer timerWithTimeInterval:CUSTOM_DISPLAY_TYPE_TIMEOUT target:self selector:@selector(timeoutTimerFired:) userInfo:self.notificationId repeats:false]; +} + +- (void)startTimeoutTimer { + [[NSRunLoop currentRunLoop] addTimer:_timeoutTimer forMode:NSRunLoopCommonModes]; +} + +- (void)setCompletionBlock:(OSNotificationDisplayResponse)completion { + _completion = completion; +} + +- (void)display { + if (!_completion) { + [OneSignalLog onesignalLog:ONE_S_LL_ERROR message:@"OSNotificationWillDisplayEvent.notification.display cannot be called due to timing out or notification was already displayed."]; + } + [self complete:self]; +} + +- (void)complete:(OSDisplayableNotification *)notification { + [_timeoutTimer invalidate]; + /* + If notification is null here then display was cancelled and we need to + reset the badge count to the value prior to receipt of this notif + */ + if (!notification) { + NSInteger previousBadgeCount = [UIApplication sharedApplication].applicationIconBadgeNumber; + [OneSignalUserDefaults.initShared saveIntegerForKey:ONESIGNAL_BADGE_KEY withValue:previousBadgeCount]; + } + if (_completion) { + _completion(notification); + _completion = nil; + } +} + +- (BOOL)wantsToDisplay { + return _wantsToDisplay; +} + +- (void)setWantsToDisplay:(BOOL)display { + _wantsToDisplay = display; +} + +- (void)timeoutTimerFired:(NSTimer *)timer { + [OneSignalLog onesignalLog:ONE_S_LL_WARN message:[NSString stringWithFormat:@"OSNotificationLifecycleListener:onWillDisplayNotification timed out. Display was not called within %f seconds. Continue with display notification: %d", CUSTOM_DISPLAY_TYPE_TIMEOUT, _wantsToDisplay]]; + if (_wantsToDisplay) { + [self complete:self]; + } else { + [self complete:nil]; + } +} + +- (void)dealloc { + if (_timeoutTimer && _completion) { + [_timeoutTimer invalidate]; + } +} +@end diff --git a/iOS_SDK/OneSignalSDK/OneSignalNotifications/OSNotificationsManager.h b/iOS_SDK/OneSignalSDK/OneSignalNotifications/OSNotificationsManager.h new file mode 100644 index 000000000..cd973d8d6 --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignalNotifications/OSNotificationsManager.h @@ -0,0 +1,125 @@ +/* + Modified MIT License + + Copyright 2022 OneSignal + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + 1. The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + 2. All copies of substantial portions of the Software may only be used in connection + with services provided by OneSignal. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + */ + +#import +#import +#import +#import +#import +#import + +@protocol OSNotificationClickListener +- (void)onClickNotification:(OSNotificationClickEvent *_Nonnull)event +NS_SWIFT_NAME(onClick(event:)); +@end + +@interface OSNotificationWillDisplayEvent : NSObject + +@property (readonly, strong, nonatomic, nonnull) OSDisplayableNotification *notification; // TODO: strong? nonatomic? nullable? +- (void)preventDefault; + +@end + +@protocol OSNotificationLifecycleListener +- (void)onWillDisplayNotification:(OSNotificationWillDisplayEvent *_Nonnull)event NS_SWIFT_NAME(onWillDisplay(event:)); +@end + +/** + Public API for the Notifications namespace. + */ +@protocol OSNotifications ++ (BOOL)permission NS_REFINED_FOR_SWIFT; ++ (BOOL)canRequestPermission NS_REFINED_FOR_SWIFT; ++ (OSNotificationPermission)permissionNative NS_REFINED_FOR_SWIFT; ++ (void)addForegroundLifecycleListener:(NSObject *_Nullable)listener; ++ (void)removeForegroundLifecycleListener:(NSObject *_Nullable)listener; ++ (void)addClickListener:(NSObject*_Nonnull)listener NS_REFINED_FOR_SWIFT; ++ (void)removeClickListener:(NSObject*_Nonnull)listener NS_REFINED_FOR_SWIFT; ++ (void)requestPermission:(OSUserResponseBlock _Nullable )block; ++ (void)requestPermission:(OSUserResponseBlock _Nullable )block fallbackToSettings:(BOOL)fallback; ++ (void)registerForProvisionalAuthorization:(OSUserResponseBlock _Nullable )block NS_REFINED_FOR_SWIFT; ++ (void)addPermissionObserver:(NSObject*_Nonnull)observer NS_REFINED_FOR_SWIFT; ++ (void)removePermissionObserver:(NSObject*_Nonnull)observer NS_REFINED_FOR_SWIFT; ++ (void)clearAll; +@end + + +@protocol OneSignalNotificationsDelegate +// set delegate before user +// can check responds to selector +- (void)setNotificationTypes:(int)notificationTypes; +- (void)setPushToken:(NSString * _Nonnull)pushToken; + +@end + + +@interface OSNotificationsManager : NSObject + +@property (class, weak, nonatomic, nullable) id delegate; + ++ (Class _Nonnull)Notifications; ++ (void)start; ++ (void)setColdStartFromTapOnNotification:(BOOL)coldStartFromTapOnNotification; ++ (BOOL)getColdStartFromTapOnNotification; + +@property (class, readonly) OSPermissionStateInternal* _Nonnull currentPermissionState; +@property (class) OSPermissionStateInternal* _Nonnull lastPermissionState; + ++ (void)clearStatics; // Used by Unit Tests + +// Indicates if the app provides its own custom Notification customization settings UI +// To enable this, set kOSSettingsKeyProvidesAppNotificationSettings to true in init. ++ (BOOL)providesAppNotificationSettings; +/* Used to determine if the app is able to present it's own customized Notification Settings view (iOS 12+) */ ++ (void)setProvidesNotificationSettingsView:(BOOL)providesView; + ++ (BOOL)registerForAPNsToken; ++ (void)sendPushTokenToDelegate; + ++ (int)getNotificationTypes:(BOOL)pushDisabled; ++ (void)updateNotificationTypes:(int)notificationTypes; ++ (void)sendNotificationTypesUpdateToDelegate; + +// Used to manage observers added by the app developer. +@property (class, readonly) ObservablePermissionStateChangesType* _Nullable permissionStateChangesObserver; + +@property (class, readonly) OneSignalNotificationSettings* _Nonnull osNotificationSettings; + +// This is set by the user module ++ (void)setPushSubscriptionId:(NSString *_Nullable)pushSubscriptionId; + ++ (void)handleWillShowInForegroundForNotification:(OSNotification *_Nonnull)notification completion:(OSNotificationDisplayResponse _Nonnull)completion; ++ (void)handleNotificationActionWithUrl:(NSString* _Nullable)url actionID:(NSString* _Nonnull)actionID; ++ (BOOL)clearBadgeCount:(BOOL)fromNotifOpened; + ++ (BOOL)receiveRemoteNotification:(UIApplication* _Nonnull)application UserInfo:(NSDictionary* _Nonnull)userInfo completionHandler:(void (^_Nonnull)(UIBackgroundFetchResult))completionHandler; ++ (void)notificationReceived:(NSDictionary* _Nonnull)messageDict wasOpened:(BOOL)opened; ++ (void)handleWillPresentNotificationInForegroundWithPayload:(NSDictionary * _Nonnull)payload withCompletion:(OSNotificationDisplayResponse _Nonnull)completion; ++ (void)didRegisterForRemoteNotifications:(UIApplication *_Nonnull)app deviceToken:(NSData *_Nonnull)inDeviceToken; ++ (void)handleDidFailRegisterForRemoteNotification:(NSError*_Nonnull)err; ++ (void)checkProvisionalAuthorizationStatus; +@end diff --git a/iOS_SDK/OneSignalSDK/OneSignalNotifications/OSNotificationsManager.m b/iOS_SDK/OneSignalSDK/OneSignalNotifications/OSNotificationsManager.m new file mode 100644 index 000000000..7635dae06 --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignalNotifications/OSNotificationsManager.m @@ -0,0 +1,969 @@ +/* + Modified MIT License + + Copyright 2022 OneSignal + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + 1. The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + 2. All copies of substantial portions of the Software may only be used in connection + with services provided by OneSignal. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + */ + +#import "OSNotificationsManager.h" +#import +#import +#import +#import "OSNotification+OneSignal.h" +#import +#import "OneSignalWebViewManager.h" +#import "UNUserNotificationCenter+OneSignalNotifications.h" +#import "UIApplicationDelegate+OneSignalNotifications.h" +#import + +@implementation OSNotificationClickEvent +@synthesize notification = _notification, result = _result; + +- (id)initWithNotification:(OSNotification*)notification result:(OSNotificationClickResult*)result { + self = [super init]; + if(self) { + _notification = notification; + _result = result; + } + return self; +} + +- (NSString*)stringify { + NSError * err; + NSDictionary *jsonDictionary = [self jsonRepresentation]; + NSData * jsonData = [NSJSONSerialization dataWithJSONObject:jsonDictionary options:0 error:&err]; + return [[NSString alloc] initWithData:jsonData encoding:NSUTF8StringEncoding]; +} + +// Convert the class into a NSDictionary +- (NSDictionary *_Nonnull)jsonRepresentation { + NSError * jsonError = nil; + NSData *objectData = [[self.notification stringify] dataUsingEncoding:NSUTF8StringEncoding]; + NSDictionary *notifDict = [NSJSONSerialization JSONObjectWithData:objectData + options:NSJSONReadingMutableContainers + error:&jsonError]; + + NSMutableDictionary* obj = [NSMutableDictionary new]; + NSMutableDictionary* result = [NSMutableDictionary new]; + [result setObject:self.result.actionId forKeyedSubscript:@"actionID"]; + [result setObject:self.result.url forKeyedSubscript:@"url"]; + [obj setObject:result forKeyedSubscript:@"result"]; + [obj setObject:notifDict forKeyedSubscript:@"notification"]; + + return obj; +} + +@end + +@implementation OSNotificationClickResult +@synthesize url = _url, actionId = _actionId; + +-(id)initWithUrl:(NSString*)url :(NSString*)actionID { + self = [super init]; + if(self) { + _url = url; + _actionId = actionID; + } + return self; +} + +@end + +@interface OSDisplayableNotification () +- (void)startTimeoutTimer; +- (void)setCompletionBlock:(OSNotificationDisplayResponse)completion; +- (void)complete:(OSDisplayableNotification *)notification; +- (BOOL)wantsToDisplay; +- (void)setWantsToDisplay:(BOOL)display; +@end + +@implementation OSNotificationWillDisplayEvent + +- (id)initWithDisplayableNotification:(OSDisplayableNotification*)notification { + self = [super init]; + if(self) { + _notification = notification; + } + return self; +} + +- (BOOL)isPreventDefault { + return !_notification.wantsToDisplay; +} + +- (void)preventDefault { + [OneSignalLog onesignalLog:ONE_S_LL_VERBOSE message:[NSString stringWithFormat:@"OSNotificationWillDisplayEvent.preventDefault called."]]; + _notification.wantsToDisplay = false; +} + +@end + +@implementation OSNotificationsManager + ++ (Class)Notifications { + return self; +} + +static id _delegate; ++ (id)delegate { + return _delegate; +} ++(void)setDelegate:(id)delegate { + _delegate = delegate; +} + +static NSMutableArray *> *_lifecycleListeners; ++ (NSMutableArray *>*)lifecycleListeners { + if (!_lifecycleListeners) + _lifecycleListeners = [NSMutableArray new]; + return _lifecycleListeners; +} + +// UIApplication-registerForRemoteNotifications has been called but a success or failure has not triggered yet. +static BOOL _waitingForApnsResponse = false; +static BOOL _providesAppNotificationSettings = false; +BOOL requestedProvisionalAuthorization = false; + +static int mSubscriptionStatus = -1; + +static NSMutableArray *_unprocessedClickEvents; +static NSMutableArray *> *_clickListeners; ++ (NSMutableArray *>*)clickListeners { + if (!_clickListeners) + _clickListeners = [NSMutableArray new]; + return _clickListeners; +} + +static NSDictionary* _lastMessageReceived; +static NSString *_lastMessageID = @""; +static NSString *_lastMessageIdFromAction; +static UIBackgroundTaskIdentifier _mediaBackgroundTask; +static BOOL _disableBadgeClearing = NO; + + +static BOOL _coldStartFromTapOnNotification = NO; +// Set to false as soon as it's read. ++ (BOOL)getColdStartFromTapOnNotification { + BOOL val = _coldStartFromTapOnNotification; + _coldStartFromTapOnNotification = NO; + return val; +} ++ (void)setColdStartFromTapOnNotification:(BOOL)coldStartFromTapOnNotification { + _coldStartFromTapOnNotification = coldStartFromTapOnNotification; +} + ++ (void)setMSubscriptionStatus:(NSNumber*)status { + mSubscriptionStatus = [status intValue]; +} + +static OneSignalNotificationSettings *_osNotificationSettings; ++ (OneSignalNotificationSettings *)osNotificationSettings { + if (!_osNotificationSettings) { + _osNotificationSettings = [OneSignalNotificationSettings new]; + } + return _osNotificationSettings; +} + +// static property def to add developer's OSPermissionStateChanges observers to. +static ObservablePermissionStateChangesType* _permissionStateChangesObserver; ++ (ObservablePermissionStateChangesType*)permissionStateChangesObserver { + if (!_permissionStateChangesObserver) + _permissionStateChangesObserver = [[OSBoolObservable alloc] initWithChangeSelector:@selector(onNotificationPermissionDidChange:)]; + return _permissionStateChangesObserver; +} + +// static property def for currentPermissionState +static OSPermissionStateInternal* _currentPermissionState; ++ (OSPermissionStateInternal*)currentPermissionState { + if (!_currentPermissionState) { + _currentPermissionState = [OSPermissionStateInternal alloc]; + _currentPermissionState = [_currentPermissionState initAsTo]; + [self lastPermissionState]; // Trigger creation + [_currentPermissionState.observable addObserver:[OSPermissionChangedInternalObserver alloc]]; + } + return _currentPermissionState; +} + +// static property def for previous OSPermissionState +static OSPermissionStateInternal* _lastPermissionState; ++ (OSPermissionStateInternal*)lastPermissionState { + if (!_lastPermissionState) + _lastPermissionState = [[OSPermissionStateInternal alloc] initAsFrom]; + return _lastPermissionState; +} + +// TODO: pushToken, pushSubscriptionId needs to be available... is this the right setup +static NSString *_pushToken; ++ (NSString*)pushToken { + if (!_pushToken) { + _pushToken = [OneSignalUserDefaults.initShared getSavedStringForKey:OSUD_PUSH_TOKEN defaultValue:nil]; + } + return _pushToken; +} + +static NSString *_pushSubscriptionId; ++ (NSString*)pushSubscriptionId { + if (!_pushSubscriptionId) { + _pushSubscriptionId = [OneSignalUserDefaults.initShared getSavedStringForKey:OSUD_PUSH_SUBSCRIPTION_ID defaultValue:nil]; + } + return _pushSubscriptionId; +} ++ (void)setPushSubscriptionId:(NSString *)pushSubscriptionId { + _pushSubscriptionId = pushSubscriptionId; +} + +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wundeclared-selector" ++ (void)start { + // Swizzle - UIApplication delegate + //TODO: do the equivalent in the notificaitons module + injectSelector( + [UIApplication class], + @selector(setDelegate:), + [OneSignalNotificationsAppDelegate class], + @selector(setOneSignalDelegate:) + ); + //TODO: This swizzling is done from notifications module + injectSelector( + [UIApplication class], + @selector(setApplicationIconBadgeNumber:), + [OneSignalNotificationsAppDelegate class], + @selector(onesignalSetApplicationIconBadgeNumber:) + ); + [OneSignalNotificationsUNUserNotificationCenter setup]; +} +#pragma clang diagnostic pop + ++ (void)resetLocals { + _lastMessageReceived = nil; + _lastMessageIdFromAction = nil; + _lastMessageID = @""; + _unprocessedClickEvents = nil; +} + ++ (void)setLastPermissionState:(OSPermissionStateInternal *)lastPermissionState { + _lastPermissionState = lastPermissionState; +} + ++ (BOOL)permission { + return self.currentPermissionState.reachable; +} + ++ (BOOL)canRequestPermission { + return !self.currentPermissionState.answeredPrompt; +} + ++ (OSNotificationPermission)permissionNative { + return self.currentPermissionState.status; +} + ++ (void)requestPermission:(OSUserResponseBlock)block { + // return if the user has not granted privacy permissions + if ([OSPrivacyConsentController shouldLogMissingPrivacyConsentErrorWithMethodName:@"requestPermission:"]) + return; + + [OneSignalLog onesignalLog:ONE_S_LL_VERBOSE message:[NSString stringWithFormat:@"requestPermission Called"]]; + + self.currentPermissionState.hasPrompted = true; + + [self.osNotificationSettings promptForNotifications:block]; +} + +// if user has disabled push notifications & fallback == true, +// the SDK will prompt the user to open notification Settings for this app ++ (void)requestPermission:(OSUserResponseBlock)block fallbackToSettings:(BOOL)fallback { + + if (self.currentPermissionState.hasPrompted == true && self.osNotificationSettings.getNotificationTypes == 0 && fallback) { + //show settings + + let localizedTitle = NSLocalizedString(@"Open Settings", @"A title saying that the user can open iOS Settings"); + let localizedSettingsActionTitle = NSLocalizedString(@"Open Settings", @"A button allowing the user to open the Settings app"); + let localizedCancelActionTitle = NSLocalizedString(@"Cancel", @"A button allowing the user to close the Settings prompt"); + + //the developer can provide a custom message in Info.plist if they choose. + var localizedMessage = (NSString *)[[NSBundle mainBundle] objectForInfoDictionaryKey:FALLBACK_TO_SETTINGS_MESSAGE]; + + if (!localizedMessage) + localizedMessage = NSLocalizedString(@"You currently have notifications turned off for this application. You can open Settings to re-enable them", @"A message explaining that users can open Settings to re-enable push notifications"); + + /* + Provide a protocol for this and inject it rather than referencing dialogcontroller directly. This is is because it uses UIApplication sharedApplication + */ + + [[OSDialogInstanceManager sharedInstance] presentDialogWithTitle:localizedTitle withMessage:localizedMessage withActions:@[localizedSettingsActionTitle] cancelTitle:localizedCancelActionTitle withActionCompletion:^(int tappedActionIndex) { + if (block) + block(false); + //completion is called on the main thread + if (tappedActionIndex > -1) + [self presentAppSettings]; + }]; + + return; + } + + [self requestPermission:block]; +} + ++ (void)registerForProvisionalAuthorization:(OSUserResponseBlock)block { + if ([OSDeviceUtils isIOSVersionGreaterThanOrEqual:@"12.0"]) + [self.osNotificationSettings registerForProvisionalAuthorization:block]; + else + [OneSignalLog onesignalLog:ONE_S_LL_WARN message:@"registerForProvisionalAuthorization is only available in iOS 12+."]; +} + +// Checks to see if we should register for APNS' new Provisional authorization +// (also known as Direct to History). +// This behavior is determined by the OneSignal Parameters request ++ (void)checkProvisionalAuthorizationStatus { + if ([OSPrivacyConsentController shouldLogMissingPrivacyConsentErrorWithMethodName:nil]) + return; + + BOOL usesProvisional = [OneSignalUserDefaults.initStandard getSavedBoolForKey:OSUD_USES_PROVISIONAL_PUSH_AUTHORIZATION defaultValue:false]; + + // if iOS parameters for this app have never downloaded, this method + // should return + if (!usesProvisional || requestedProvisionalAuthorization) + return; + + requestedProvisionalAuthorization = true; + + [self.osNotificationSettings registerForProvisionalAuthorization:nil]; +} + +// iOS 12+ only +// A boolean indicating if the app provides its own custom Notifications Settings UI +// If this is set to TRUE via the kOSSettingsKeyProvidesAppNotificationSettings init +// parameter, the SDK will request authorization from the User Notification Center ++ (BOOL)providesAppNotificationSettings { + return _providesAppNotificationSettings; +} + ++ (void)setProvidesNotificationSettingsView:(BOOL)providesView { + _providesAppNotificationSettings = providesView; +} + +//presents the settings page to control/customize push notification settings ++ (void)presentAppSettings { + + //only supported in 10+ + if ([OSDeviceUtils isIOSVersionLessThan:@"10.0"]) + return; + + let url = [NSURL URLWithString:UIApplicationOpenSettingsURLString]; + + if (!url) + return; + + if ([[UIApplication sharedApplication] canOpenURL:url]) { + [[UIApplication sharedApplication] openURL:url options:@{} completionHandler:nil]; + } else { + [OneSignalLog onesignalLog:ONE_S_LL_ERROR message:@"Unable to open settings for this application"]; + } +} + ++ (void)clearAll { + [[UNUserNotificationCenter currentNotificationCenter] removeAllDeliveredNotifications]; + // TODO: Determine if we also need to call clearBadgeCount + [self clearBadgeCount:false]; +} + ++ (BOOL)registerForAPNsToken { + if (self.waitingForApnsResponse) + return true; + + id backgroundModes = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"UIBackgroundModes"]; + BOOL backgroundModesEnabled = (backgroundModes && [backgroundModes containsObject:@"remote-notification"]); + + // Only try to register for a pushToken if: + // - The user accepted notifications + // - "Background Modes" > "Remote Notifications" are enabled in Xcode + if (![self.osNotificationSettings getNotificationPermissionState].accepted && !backgroundModesEnabled) + return false; + + // Don't attempt to register again if there was a non-recoverable error. + if (mSubscriptionStatus < -9) + return false; + + [OneSignalLog onesignalLog:ONE_S_LL_VERBOSE message:@"Firing registerForRemoteNotifications"]; + + self.waitingForApnsResponse = true; + [OneSignalCoreHelper dispatch_async_on_main_queue:^{ + [[UIApplication sharedApplication] registerForRemoteNotifications]; + }]; + + return true; +} + ++ (void)didRegisterForRemoteNotifications:(UIApplication *)app + deviceToken:(NSData *)inDeviceToken { + let parsedDeviceToken = [NSString hexStringFromData:inDeviceToken]; + + [OneSignalLog onesignalLog:ONE_S_LL_INFO message: [NSString stringWithFormat:@"Device Registered with Apple: %@", parsedDeviceToken]]; + + if (!parsedDeviceToken) { + [OneSignalLog onesignalLog:ONE_S_LL_ERROR message:@"Unable to convert APNS device token to a string"]; + return; + } + + self.waitingForApnsResponse = false; + + _pushToken = parsedDeviceToken; + + // Cache push token + [OneSignalUserDefaults.initShared saveStringForKey:OSUD_PUSH_TOKEN withValue:_pushToken]; + + [self sendPushTokenToDelegate]; +} + ++ (void)handleDidFailRegisterForRemoteNotification:(NSError*)err { + OSNotificationsManager.waitingForApnsResponse = false; + + if (err.code == 3000) { + [self setSubscriptionErrorStatus:ERROR_PUSH_CAPABLILITY_DISABLED]; + [OneSignalLog onesignalLog:ONE_S_LL_ERROR message:@"ERROR! 'Push Notifications' capability missing! Add the capability in Xcode under 'Target' -> '' -> 'Signing & Capabilities' then click the '+ Capability' button."]; + } + else if (err.code == 3010) { + [self setSubscriptionErrorStatus:ERROR_PUSH_SIMULATOR_NOT_SUPPORTED]; + [OneSignalLog onesignalLog:ONE_S_LL_ERROR message:[NSString stringWithFormat:@"Error! iOS Simulator does not support push! Please test on a real iOS device. Error: %@", err]]; + } + else { + [self setSubscriptionErrorStatus:ERROR_PUSH_UNKNOWN_APNS_ERROR]; + [OneSignalLog onesignalLog:ONE_S_LL_ERROR message:[NSString stringWithFormat:@"Error registering for Apple push notifications! Error: %@", err]]; + } +} + ++ (void)sendPushTokenToDelegate { + // TODO: Keep this as a check on _pushToken instead of self.pushToken? + if (_pushToken != nil && self.delegate && [self.delegate respondsToSelector:@selector(setPushToken:)]) { + [self.delegate setPushToken:_pushToken]; + } +} + ++ (void)setSubscriptionErrorStatus:(int)errorType { + [OneSignalLog onesignalLog:ONE_S_LL_VERBOSE message: [NSString stringWithFormat:@"setSubscriptionErrorStatus: %d", errorType]]; + + mSubscriptionStatus = errorType; + [self sendNotificationTypesUpdateToDelegate]; +} + +// onNotificationPermissionDidChange should only fire if the reachable property changed. ++ (void)addPermissionObserver:(NSObject*)observer { + [self.permissionStateChangesObserver addObserver:observer]; + + if (self.currentPermissionState.reachable != self.lastPermissionState.reachable) + [OSPermissionChangedInternalObserver fireChangesObserver:self.currentPermissionState]; +} + ++ (void)removePermissionObserver:(NSObject*)observer { + [self.permissionStateChangesObserver removeObserver:observer]; +} + +// User just responed to the iOS native notification permission prompt. ++ (void)updateNotificationTypes:(int)notificationTypes { + [OneSignalLog onesignalLog:ONE_S_LL_VERBOSE message:[NSString stringWithFormat:@"updateNotificationTypes called: %d", notificationTypes]]; + + // TODO: Dropped support, can remove below? + if ([OSDeviceUtils isIOSVersionLessThan:@"10.0"]) + [OneSignalUserDefaults.initStandard saveBoolForKey:OSUD_WAS_NOTIFICATION_PROMPT_ANSWERED_TO withValue:true]; + + BOOL startedRegister = [OSNotificationsManager registerForAPNsToken]; + + [OneSignalLog onesignalLog:ONE_S_LL_VERBOSE message:[NSString stringWithFormat:@"startedRegister: %d", startedRegister]]; + + // TODO: Dropped support, can remove below? + [self.osNotificationSettings onNotificationPromptResponse:notificationTypes]; // iOS 9 only + + // TODO: This can be called before the User Manager sets itself as the delegate + [self sendNotificationTypesUpdateToDelegate]; +} + ++ (void)sendNotificationTypesUpdateToDelegate { + // We don't delay observer update to wait until the OneSignal server is notified + // TODO: We can do the above and delay observers until server is updated. + if (self.delegate && [self.delegate respondsToSelector:@selector(setNotificationTypes:)]) { + [self.delegate setNotificationTypes:[self getNotificationTypes]]; + } +} + +// Accounts for manual disabling by the app developer ++ (int)getNotificationTypes:(BOOL)pushDisabled { + if (pushDisabled) { + return -2; + } + + return [self getNotificationTypes]; +} + +// Device notification types, that doesn't account for manual disabling by the app developer ++ (int)getNotificationTypes { + [OneSignalLog onesignalLog:ONE_S_LL_VERBOSE message: [NSString stringWithFormat:@"getNotificationTypes:mSubscriptionStatus: %d", mSubscriptionStatus]]; + + if (mSubscriptionStatus < -9) + return mSubscriptionStatus; + + // This was previously nil if just accessing _pushToken + if (OSNotificationsManager.waitingForApnsResponse && !self.pushToken) + return ERROR_PUSH_DELEGATE_NEVER_FIRED; + + OSPermissionStateInternal* permissionStatus = [OSNotificationsManager.osNotificationSettings getNotificationPermissionState]; + + //only return the error statuses if not provisional + if (!permissionStatus.provisional && !permissionStatus.hasPrompted) + return ERROR_PUSH_NEVER_PROMPTED; + + if (!permissionStatus.provisional && !permissionStatus.answeredPrompt) + return ERROR_PUSH_PROMPT_NEVER_ANSWERED; + + return permissionStatus.notificationTypes; +} + ++ (BOOL)waitingForApnsResponse { + return _waitingForApnsResponse; +} + ++ (void)setWaitingForApnsResponse:(BOOL)value { + _waitingForApnsResponse = value; +} + ++ (void)clearStatics { + _waitingForApnsResponse = false; + _currentPermissionState = nil; + _lastPermissionState = nil; + requestedProvisionalAuthorization = false; + + // and more... +} + +static NSString *_lastAppActiveMessageId; ++ (void)setLastAppActiveMessageId:(NSString*)value { _lastAppActiveMessageId = value; } +static NSString *_lastnonActiveMessageId; ++ (void)setLastnonActiveMessageId:(NSString*)value { _lastnonActiveMessageId = value; } + + +// Entry point for the following: +// - 1. (iOS all) - Opening notifications +// - 2. Notification received +// - 2A. iOS 9 - Notification received while app is in focus. +// - 2B. iOS 10 - Notification received/displayed while app is in focus. +// isActive is not always true for when the application is on foreground, we need differentiation +// between foreground and isActive ++ (void)notificationReceived:(NSDictionary*)messageDict wasOpened:(BOOL)opened { + if ([OSPrivacyConsentController shouldLogMissingPrivacyConsentErrorWithMethodName:nil]) + return; + + if (![OneSignalConfigManager getAppId]) { + return; + } + + // This method should not continue to be executed for non-OS push notifications + if (![OneSignalCoreHelper isOneSignalPayload:messageDict]) + return; + + [OneSignalLog onesignalLog:ONE_S_LL_VERBOSE message:[NSString stringWithFormat:@"notificationReceived called! opened: %@", opened ? @"YES" : @"NO"]]; + + NSDictionary* customDict = [messageDict objectForKey:@"os_data"] ?: [messageDict objectForKey:@"custom"]; + + // Should be called first, other methods relay on this global state below. + [self lastMessageReceived:messageDict]; + + BOOL isPreview = [[OSNotification parseWithApns:messageDict] additionalData][ONESIGNAL_IAM_PREVIEW] != nil; + + if (opened) { + // Prevent duplicate calls + let newId = [self checkForProcessedDups:customDict lastMessageId:_lastnonActiveMessageId]; + if ([@"dup" isEqualToString:newId]) { + [OneSignalLog onesignalLog:ONE_S_LL_VERBOSE message:@"Duplicate notif received. Not calling opened handler."]; + return; + } + if (newId) + _lastnonActiveMessageId = newId; + //app was in background / not running and opened due to a tap on a notification or an action check what type + OSNotificationActionType type = OSNotificationActionTypeOpened; + + if (messageDict[@"custom"][@"a"][@"actionSelected"] || messageDict[@"actionSelected"]) + type = OSNotificationActionTypeActionTaken; + + // Call Action Block + [self handleNotificationOpened:messageDict actionType:type]; + } else if (isPreview && [OSDeviceUtils isIOSVersionGreaterThanOrEqual:@"10.0"]) { + let notification = [OSNotification parseWithApns:messageDict]; + [self handleIAMPreview:notification]; + } +} + ++ (NSString*)checkForProcessedDups:(NSDictionary*)customDict lastMessageId:(NSString*)lastMessageId { + if (customDict && customDict[@"i"]) { + NSString* currentNotificationId = customDict[@"i"]; + if ([currentNotificationId isEqualToString:lastMessageId]) + return @"dup"; + return customDict[@"i"]; + } + return nil; +} + ++ (void)handleWillPresentNotificationInForegroundWithPayload:(NSDictionary *)payload withCompletion:(OSNotificationDisplayResponse)completion { + // check to make sure the app is in focus and it's a OneSignal notification + if (![OneSignalCoreHelper isOneSignalPayload:payload] + || UIApplication.sharedApplication.applicationState == UIApplicationStateBackground) { + completion([OSNotification new]); + return; + } + //Only call the OSNotificationLifecycleListener for notifications not preview IAMs + + OSDisplayableNotification *osNotification = [OSDisplayableNotification parseWithApns:payload]; + if ([osNotification additionalData][ONESIGNAL_IAM_PREVIEW]) { + completion(nil); + return; + } + [self handleWillShowInForegroundForNotification:osNotification completion:completion]; +} + ++ (void)handleWillShowInForegroundForNotification:(OSDisplayableNotification *)notification completion:(OSNotificationDisplayResponse)completion { + [notification setCompletionBlock:completion]; + if (self.lifecycleListeners.count == 0) { + completion(notification); + return; + } + + [notification startTimeoutTimer]; + OSNotificationWillDisplayEvent *event = [[OSNotificationWillDisplayEvent alloc] initWithDisplayableNotification:notification]; + + for (NSObject *listener in self.lifecycleListeners) { + if ([listener respondsToSelector:@selector(onWillDisplayNotification:)]) { + [listener onWillDisplayNotification:event]; + } + } + + if (![event isPreventDefault]) { + [OneSignalLog onesignalLog:ONE_S_LL_VERBOSE message:[NSString stringWithFormat:@"OSNotificationWillDisplayEvent's preventDefault not called, now display notification with notificationId %@.", notification.notificationId]]; + [notification complete:notification]; + } +} + ++ (void)handleNotificationOpened:(NSDictionary*)messageDict + actionType:(OSNotificationActionType)actionType { + + // return if the user has not granted privacy permissions + if ([OSPrivacyConsentController shouldLogMissingPrivacyConsentErrorWithMethodName:@"handleNotificationOpened:actionType:"]) + return; + + OSNotification *notification = [OSNotification parseWithApns:messageDict]; + if ([self handleIAMPreview:notification]) + return; + + NSDictionary* customDict = [messageDict objectForKey:@"custom"] ?: [messageDict objectForKey:@"os_data"]; + // Notify backend that user opened the notification + NSString* messageId = [customDict objectForKey:@"i"]; + [self submitNotificationOpened:messageId]; + + let isActive = [UIApplication sharedApplication].applicationState == UIApplicationStateActive; + + [OneSignalLog onesignalLog:ONE_S_LL_VERBOSE message:[NSString stringWithFormat:@"handleNotificationOpened called! isActive: %@ notificationId: %@", + isActive ? @"YES" : @"NO", messageId]]; + + if (![self shouldSuppressURL]) { + // Try to fetch the open url to launch + [self launchWebURL:notification.launchURL]; //TODO: where should this live? + } + + [self clearBadgeCount:true]; + + NSString* actionID = NULL; + if (actionType == OSNotificationActionTypeActionTaken) { + actionID = messageDict[@"custom"][@"a"][@"actionSelected"]; + if(!actionID) + actionID = messageDict[@"actionSelected"]; + } + + // Call Action Block + [self lastMessageReceived:messageDict]; + if (!isActive) { + OSSessionManager.sharedSessionManager.appEntryState = NOTIFICATION_CLICK; + [[OSSessionManager sharedSessionManager] onDirectInfluenceFromNotificationOpen:NOTIFICATION_CLICK withNotificationId:messageId]; + } + + [self handleNotificationActionWithUrl:notification.launchURL actionID:actionID]; +} + ++ (void)submitNotificationOpened:(NSString*)messageId { + // return if the user has not granted privacy permissions + if ([OSPrivacyConsentController shouldLogMissingPrivacyConsentErrorWithMethodName:nil]) + return; + + let standardUserDefaults = OneSignalUserDefaults.initStandard; + //(DUPLICATE Fix): Make sure we do not upload a notification opened twice for the same messageId + //Keep track of the Id for the last message sent + NSString* lastMessageId = [standardUserDefaults getSavedStringForKey:OSUD_LAST_MESSAGE_OPENED defaultValue:nil]; + //Only submit request if messageId not nil and: (lastMessage is nil or not equal to current one) + if(messageId && (!lastMessageId || ![lastMessageId isEqualToString:messageId])) { + [OneSignalClient.sharedClient executeRequest:[OSRequestSubmitNotificationOpened withUserId:[self pushSubscriptionId] + appId:[OneSignalConfigManager getAppId] + wasOpened:YES + messageId:messageId + withDeviceType:[NSNumber numberWithInt:DEVICE_TYPE_PUSH]] + onSuccess:nil + onFailure:nil]; + [standardUserDefaults saveStringForKey:OSUD_LAST_MESSAGE_OPENED withValue:messageId]; + } +} + ++ (void)launchWebURL:(NSString*)openUrl { + + NSString* toOpenUrl = [OneSignalCoreHelper trimURLSpacing:openUrl]; + + if (toOpenUrl && [OneSignalCoreHelper verifyURL:toOpenUrl]) { + NSURL *url = [NSURL URLWithString:toOpenUrl]; + // Give the app resume animation time to finish when tapping on a notification from the notification center. + // Isn't a requirement but improves visual flow. + [self performSelector:@selector(displayWebView:) withObject:url afterDelay:0.5]; + } + +} + ++ (void)displayWebView:(NSURL*)url { + __block let openUrlBlock = ^void(BOOL shouldOpen) { + if (!shouldOpen) + return; + + [OneSignalCoreHelper dispatch_async_on_main_queue: ^{ + dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.25 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ + // Keep dispatch_async. Without this the url can take an extra 2 to 10 secounds to open. + [[UIApplication sharedApplication] openURL:url options:@{} completionHandler:nil]; + }); + }]; + }; + openUrlBlock(true); +} + ++ (BOOL)clearBadgeCount:(BOOL)fromNotifOpened { + + NSNumber *disableBadgeNumber = [[NSBundle mainBundle] objectForInfoDictionaryKey:ONESIGNAL_DISABLE_BADGE_CLEARING]; + + if (disableBadgeNumber) + _disableBadgeClearing = [disableBadgeNumber boolValue]; + else + _disableBadgeClearing = NO; + + if (_disableBadgeClearing) + return false; + + bool wasBadgeSet = [UIApplication sharedApplication].applicationIconBadgeNumber > 0; + + if (fromNotifOpened || wasBadgeSet) { + [OneSignalCoreHelper runOnMainThread:^{ + [[UIApplication sharedApplication] setApplicationIconBadgeNumber:0]; + }]; + } + + return wasBadgeSet; +} + ++ (BOOL)handleIAMPreview:(OSNotification *)notification { + NSString *uuid = [notification additionalData][ONESIGNAL_IAM_PREVIEW]; + if (uuid) { + [OneSignalLog onesignalLog:ONE_S_LL_VERBOSE message:@"IAM Preview Detected, Begin Handling"]; + NSDictionary *userInfo = [NSDictionary dictionaryWithObject:notification forKey:@"notification"]; + [[NSNotificationCenter defaultCenter] postNotificationName:ONESIGNAL_POST_PREVIEW_IAM object:nil userInfo:userInfo]; + return YES; + } + return NO; +} + ++ (void)handleNotificationActionWithUrl:(NSString*)url actionID:(NSString*)actionID { + if (![OneSignalCoreHelper isOneSignalPayload:_lastMessageReceived]) + return; + + OSNotificationClickResult *result = [[OSNotificationClickResult alloc] initWithUrl:url :actionID]; + OSNotification *notification = [OSNotification parseWithApns:_lastMessageReceived]; + OSNotificationClickEvent *event = [[OSNotificationClickEvent alloc] initWithNotification:notification result:result]; + + // Prevent duplicate calls to same action + if ([notification.notificationId isEqualToString:_lastMessageIdFromAction]) + return; + _lastMessageIdFromAction = notification.notificationId; + + [OneSignalTrackFirebaseAnalytics trackOpenEvent:event]; + + if (self.clickListeners.count == 0) { + [self addUnprocessedClickEvent:event]; + return; + } + [self fireClickListenersForEvent:event]; +} + ++ (void)fireClickListenersForEvent:(OSNotificationClickEvent*)event { + for (NSObject *listener in self.clickListeners) { + if ([listener respondsToSelector:@selector(onClickNotification:)]) { + [listener onClickNotification:event]; + } + } +} + ++ (void)lastMessageReceived:(NSDictionary*)message { + _lastMessageReceived = message; +} + ++ (BOOL)shouldSuppressURL { + // if the plist key does not exist default to false + // the plist value specifies whether the user wants to open an url using default browser or OSWebView + NSDictionary *bundleDict = [[NSBundle mainBundle] infoDictionary]; + BOOL shouldSuppress = [bundleDict[ONESIGNAL_SUPRESS_LAUNCH_URLS] boolValue]; + return shouldSuppress ?: false; +} + ++ (void)addClickListener:(NSObject*)listener { + [self.clickListeners addObject:listener]; + [OneSignalLog onesignalLog:ONE_S_LL_VERBOSE message:@"Notification click listener added successfully"]; + [self fireClickListenersForUnprocessedEvents]; +} + ++ (void)removeClickListener:(NSObject*)listener { + [self.clickListeners removeObject:listener]; + [OneSignalLog onesignalLog:ONE_S_LL_VERBOSE message:@"Notification click listener removed successfully"]; +} + ++ (void)addForegroundLifecycleListener:(NSObject *_Nullable)listener { + [self.lifecycleListeners addObject:listener]; + [OneSignalLog onesignalLog:ONE_S_LL_VERBOSE message:@"ForegroundLifecycleListener added successfully"]; +} + ++ (void)removeForegroundLifecycleListener:(NSObject * _Nullable)listener { + [self.lifecycleListeners removeObject:listener]; + [OneSignalLog onesignalLog:ONE_S_LL_VERBOSE message:@"ForegroundLifecycleListener removed successfully"]; +} + ++ (NSMutableArray*)getUnprocessedClickEvents { + if (!_unprocessedClickEvents) + _unprocessedClickEvents = [NSMutableArray new]; + return _unprocessedClickEvents; +} + ++ (void)addUnprocessedClickEvent:(OSNotificationClickEvent*)event { + [[self getUnprocessedClickEvents] addObject:event]; +} + ++ (void)fireClickListenersForUnprocessedEvents { + if (self.clickListeners.count == 0) { + return; + } + for (OSNotificationClickEvent* event in [self getUnprocessedClickEvents]) { + [self fireClickListenersForEvent:event]; + } + _unprocessedClickEvents = [NSMutableArray new]; +} + ++ (BOOL)receiveRemoteNotification:(UIApplication*)application UserInfo:(NSDictionary*)userInfo completionHandler:(void (^)(UIBackgroundFetchResult))completionHandler { + var startedBackgroundJob = false; + + NSDictionary* richData = nil; + // TODO: Look into why the userInfo payload would be different here for displaying vs opening.... + // Check for buttons or attachments pre-2.4.0 version + if ((userInfo[@"os_data"][@"buttons"] && [userInfo[@"os_data"][@"buttons"] isKindOfClass:[NSDictionary class]]) || userInfo[@"at"] || userInfo[@"o"]) + richData = userInfo; + + // Generate local notification for action button and/or attachments. + if (richData) { + let osNotification = [OSNotification parseWithApns:userInfo]; + + if ([OSDeviceUtils isIOSVersionGreaterThanOrEqual:@"10.0"]) { + startedBackgroundJob = true; + [self addNotificationRequest:osNotification completionHandler:completionHandler]; + } + } + // Method was called due to a tap on a notification - Fire open notification + else if (application.applicationState == UIApplicationStateActive) { + _lastMessageReceived = userInfo; + + if ([OneSignalCoreHelper isDisplayableNotification:userInfo]) { + [self notificationReceived:userInfo wasOpened:YES]; + } + return startedBackgroundJob; + } + // content-available notification received in the background + else { + _lastMessageReceived = userInfo; + } + + return startedBackgroundJob; +} + ++ (void)addNotificationRequest:(OSNotification*)notification + completionHandler:(void (^)(UIBackgroundFetchResult))completionHandler { + + // Start background thread to download media so we don't lock the main UI thread. + dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{ + [self beginBackgroundMediaTask]; + + let notificationRequest = [self prepareUNNotificationRequest:notification]; + [[UNUserNotificationCenter currentNotificationCenter] + addNotificationRequest:notificationRequest + withCompletionHandler:^(NSError * _Nullable error) {}]; + if (completionHandler) + completionHandler(UIBackgroundFetchResultNewData); + + [self endBackgroundMediaTask]; + }); + +} + ++ (void)beginBackgroundMediaTask { + _mediaBackgroundTask = [[UIApplication sharedApplication] beginBackgroundTaskWithExpirationHandler:^{ + [self endBackgroundMediaTask]; + }]; +} + ++ (void)endBackgroundMediaTask { + [[UIApplication sharedApplication] endBackgroundTask: _mediaBackgroundTask]; + _mediaBackgroundTask = UIBackgroundTaskInvalid; +} + ++ (UNNotificationRequest*)prepareUNNotificationRequest:(OSNotification*)notification { + let content = [UNMutableNotificationContent new]; + + [OneSignalAttachmentHandler addActionButtons:notification toNotificationContent:content]; + + content.title = notification.title; + content.subtitle = notification.subtitle; + content.body = notification.body; + + content.userInfo = notification.rawPayload; + + if (notification.sound) + content.sound = [UNNotificationSound soundNamed:notification.sound]; + else + content.sound = UNNotificationSound.defaultSound; + + if (notification.badge != 0) + content.badge = [NSNumber numberWithInteger:notification.badge]; + + // Check if media attached + [OneSignalAttachmentHandler addAttachments:notification toNotificationContent:content]; + + let trigger = [UNTimeIntervalNotificationTrigger triggerWithTimeInterval:0.25 repeats:NO]; + let identifier = [OneSignalCoreHelper randomStringWithLength:16]; + return [UNNotificationRequest requestWithIdentifier:identifier content:content trigger:trigger]; +} + + +@end + diff --git a/iOS_SDK/OneSignalSDK/Source/OSPermission.h b/iOS_SDK/OneSignalSDK/OneSignalNotifications/OSPermission.h similarity index 53% rename from iOS_SDK/OneSignalSDK/Source/OSPermission.h rename to iOS_SDK/OneSignalSDK/OneSignalNotifications/OSPermission.h index fd937c70b..5fd75c02b 100644 --- a/iOS_SDK/OneSignalSDK/Source/OSPermission.h +++ b/iOS_SDK/OneSignalSDK/OneSignalNotifications/OSPermission.h @@ -27,21 +27,43 @@ #import -#import "OneSignal.h" -#import "OSObservable.h" - -// Redefines are done so we can make properites writeable and backed internal variables accesiable to the SDK. -// Basicly the C# equivlent of a public gettter with an internal/protected settter. +#import + +typedef NS_ENUM(NSInteger, OSNotificationPermission) { + // The user has not yet made a choice regarding whether your app can show notifications. + OSNotificationPermissionNotDetermined = 0, + + // The application is not authorized to post user notifications. + OSNotificationPermissionDenied, + + // The application is authorized to post user notifications. + OSNotificationPermissionAuthorized, + + // the application is only authorized to post Provisional notifications (direct to history) + OSNotificationPermissionProvisional, + + // the application is authorized to send notifications for 8 hours. Only used by App Clips. + OSNotificationPermissionEphemeral +}; + +// Permission Classes + +// TODO: this object can be REMOVED now that permission is a boolean +@interface OSPermissionState : NSObject +@property (readonly, nonatomic) BOOL permission; +- (NSDictionary * _Nonnull)jsonRepresentation; +- (instancetype _Nonnull )initWithPermission:(BOOL)permission; +@end @protocol OSPermissionStateObserver -- (void)onChanged:(OSPermissionState*)state; +- (void)onChanged:(OSPermissionState * _Nonnull)state; @end -typedef OSObservable*, OSPermissionState*> ObserablePermissionStateType; +typedef OSObservable*, OSPermissionState*> ObservablePermissionStateType; // Redefine OSPermissionState -@interface OSPermissionState () { +@interface OSPermissionStateInternal : NSObject { @protected BOOL _hasPrompted; @protected BOOL _answeredPrompt; } @@ -52,40 +74,29 @@ typedef OSObservable*, OSPermissionState*> O @property (readwrite, nonatomic) BOOL provisional; //internal flag @property (readwrite, nonatomic) BOOL ephemeral; @property (readwrite, nonatomic) BOOL reachable; +@property (readonly, nonatomic) OSNotificationPermission status; @property int notificationTypes; -@property (nonatomic) ObserablePermissionStateType* observable; +@property (nonatomic) ObservablePermissionStateType * _Nonnull observable; - (void) persistAsFrom; -- (instancetype)initAsTo; -- (instancetype)initAsFrom; - -- (BOOL)compare:(OSPermissionState*)from; +- (instancetype _Nonnull )initAsTo; +- (instancetype _Nonnull )initAsFrom; +- (OSPermissionState * _Nonnull)getExternalState; +- (NSDictionary * _Nonnull)jsonRepresentation; @end -// Redefine OSPermissionStateChanges -@interface OSPermissionStateChanges () - -@property (readwrite) OSPermissionState* to; -@property (readwrite) OSPermissionState* from; - +@protocol OSNotificationPermissionObserver +- (void)onNotificationPermissionDidChange:(BOOL)permission; @end -typedef OSObservable*, OSPermissionStateChanges*> ObserablePermissionStateChangesType; +typedef OSBoolObservable*> ObservablePermissionStateChangesType; @interface OSPermissionChangedInternalObserver : NSObject -+ (void)fireChangesObserver:(OSPermissionState*)state; ++ (void)fireChangesObserver:(OSPermissionStateInternal * _Nonnull)state; @end -@interface OneSignal (PermissionAdditions) - -@property (class) OSPermissionState* lastPermissionState; -@property (class) OSPermissionState* currentPermissionState; -// Used to manage observers added by the app developer. -@property (class) ObserablePermissionStateChangesType* permissionStateChangesObserver; - -@end diff --git a/iOS_SDK/OneSignalSDK/Source/OSPermission.m b/iOS_SDK/OneSignalSDK/OneSignalNotifications/OSPermission.m similarity index 71% rename from iOS_SDK/OneSignalSDK/Source/OSPermission.m rename to iOS_SDK/OneSignalSDK/OneSignalNotifications/OSPermission.m index 853b845f0..6edf22634 100644 --- a/iOS_SDK/OneSignalSDK/Source/OSPermission.m +++ b/iOS_SDK/OneSignalSDK/OneSignalNotifications/OSPermission.m @@ -26,19 +26,19 @@ */ #import "OSPermission.h" -#import "OneSignalHelper.h" -#import "OneSignalInternal.h" +#import +#import "OSNotificationsManager.h" -@implementation OSPermissionState +@implementation OSPermissionStateInternal -- (ObserablePermissionStateType*)observable { +- (ObservablePermissionStateType*)observable { if (!_observable) _observable = [OSObservable new]; return _observable; } - (instancetype)initAsTo { - [OneSignal.osNotificationSettings getNotificationPermissionState]; + [OSNotificationsManager.osNotificationSettings getNotificationPermissionState]; return self; } @@ -67,7 +67,7 @@ - (void)persistAsFrom { - (instancetype)copyWithZone:(NSZone*)zone { - OSPermissionState* copy = [[self class] new]; + OSPermissionStateInternal* copy = [[self class] new]; if (copy) { copy->_hasPrompted = _hasPrompted; @@ -85,7 +85,7 @@ - (void)setHasPrompted:(BOOL)inHasPrompted { BOOL last = self.hasPrompted; _hasPrompted = inHasPrompted; if (last != self.hasPrompted) - [self.observable notifyChange:self]; + [self.observable notifyChange:(OSPermissionState*)self]; } - (BOOL)hasPrompted { @@ -104,7 +104,7 @@ - (void)setProvisional:(BOOL)provisional { _provisional = provisional; if (previous != _provisional) - [self.observable notifyChange:self]; + [self.observable notifyChange:(OSPermissionState*)self]; } - (BOOL)isProvisional { @@ -115,7 +115,7 @@ - (void)setAnsweredPrompt:(BOOL)inansweredPrompt { BOOL last = self.answeredPrompt; _answeredPrompt = inansweredPrompt; if (last != self.answeredPrompt) - [self.observable notifyChange:self]; + [self.observable notifyChange:(OSPermissionState*)self]; } - (BOOL)answeredPrompt { @@ -129,14 +129,14 @@ - (void)setAccepted:(BOOL)accepted { BOOL changed = _accepted != accepted; _accepted = accepted; if (changed) - [self.observable notifyChange:self]; + [self.observable notifyChange:(OSPermissionState*)self]; } - (void)setEphemeral:(BOOL)ephemeral { BOOL changed = _ephemeral != ephemeral; _ephemeral = ephemeral; if (changed) - [self.observable notifyChange:self]; + [self.observable notifyChange:(OSPermissionState*)self]; } - (void)setProvidesAppNotificationSettings:(BOOL)providesAppNotificationSettings { @@ -159,71 +159,52 @@ - (OSNotificationPermission)status { return OSNotificationPermissionNotDetermined; } -- (NSString*)statusAsString { - switch(self.status) { - case OSNotificationPermissionNotDetermined: - return @"NotDetermined"; - case OSNotificationPermissionAuthorized: - return @"Authorized"; - case OSNotificationPermissionDenied: - return @"Denied"; - case OSNotificationPermissionProvisional: - return @"Provisional"; - case OSNotificationPermissionEphemeral: - return @"Ephemeral"; - } - return @"NotDetermined"; +- (OSPermissionState *)getExternalState { + return [[OSPermissionState alloc] initWithPermission:self.reachable]; +} + +- (NSString*)description { + static NSString* format = @""; + return [NSString stringWithFormat:format, self.hasPrompted, self.status, self.provisional]; } -- (BOOL)compare:(OSPermissionState*)from { - return self.accepted != from.accepted || - self.ephemeral != from.ephemeral || - self.answeredPrompt != from.answeredPrompt || - self.hasPrompted != from.hasPrompted; + + +@end + +@implementation OSPermissionState + +- (instancetype)initWithPermission:(BOOL)permission { + _permission = permission; + return self; } - (NSString*)description { - static NSString* format = @""; - return [NSString stringWithFormat:format, self.hasPrompted, self.statusAsString, self.provisional]; + static NSString* format = @""; + return [NSString stringWithFormat:format, self.permission]; } -- (NSDictionary*)toDictionary { - return @{@"hasPrompted": @(self.hasPrompted), - @"status": @(self.status), - @"provisional" : @(self.provisional)}; +- (NSDictionary*)jsonRepresentation { + return @{@"permission": @(self.permission)}; } @end - @implementation OSPermissionChangedInternalObserver -- (void)onChanged:(OSPermissionState*)state { +- (void)onChanged:(OSPermissionStateInternal*)state { [OSPermissionChangedInternalObserver fireChangesObserver:state]; } -+ (void)fireChangesObserver:(OSPermissionState*)state { - OSPermissionStateChanges* stateChanges = [OSPermissionStateChanges alloc]; - stateChanges.from = OneSignal.lastPermissionState; - stateChanges.to = [state copy]; ++ (void)fireChangesObserver:(OSPermissionStateInternal*)state { + if (state.reachable == OSNotificationsManager.lastPermissionState.reachable) { + return; + } - BOOL hasReceiver = [OneSignal.permissionStateChangesObserver notifyChange:stateChanges]; + BOOL hasReceiver = [OSNotificationsManager.permissionStateChangesObserver notifyChange:state.reachable]; if (hasReceiver) { - OneSignal.lastPermissionState = [state copy]; - [OneSignal.lastPermissionState persistAsFrom]; + OSNotificationsManager.lastPermissionState = [state copy]; + [OSNotificationsManager.lastPermissionState persistAsFrom]; } } @end - -@implementation OSPermissionStateChanges - -- (NSString*)description { - static NSString* format = @""; - return [NSString stringWithFormat:format, _from, _to]; -} - -- (NSDictionary*)toDictionary { - return @{@"from": [_from toDictionary], @"to": [_to toDictionary]}; -} - -@end diff --git a/iOS_SDK/OneSignalSDK/OneSignalNotifications/OneSignalNotifications.h b/iOS_SDK/OneSignalSDK/OneSignalNotifications/OneSignalNotifications.h new file mode 100644 index 000000000..4e0368d99 --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignalNotifications/OneSignalNotifications.h @@ -0,0 +1,32 @@ +/* + Modified MIT License + + Copyright 2022 OneSignal + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + 1. The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + 2. All copies of substantial portions of the Software may only be used in connection + with services provided by OneSignal. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + */ + +#import + +#import +#import +#import diff --git a/iOS_SDK/OneSignalSDK/OneSignalNotificationsFramework/Info.plist b/iOS_SDK/OneSignalSDK/OneSignalNotificationsFramework/Info.plist new file mode 100644 index 000000000..fbe1e6b31 --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignalNotificationsFramework/Info.plist @@ -0,0 +1,24 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0 + CFBundleVersion + $(CURRENT_PROJECT_VERSION) + NSPrincipalClass + + + diff --git a/iOS_SDK/OneSignalSDK/OneSignalOSCore/OneSignalOSCore.docc/OneSignalOSCore.md b/iOS_SDK/OneSignalSDK/OneSignalOSCore/OneSignalOSCore.docc/OneSignalOSCore.md new file mode 100755 index 000000000..c42885cb2 --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignalOSCore/OneSignalOSCore.docc/OneSignalOSCore.md @@ -0,0 +1,13 @@ +# ``OneSignalOSCore`` + +Summary + +## Overview + +Text + +## Topics + +### Group + +- ``Symbol`` \ No newline at end of file diff --git a/iOS_SDK/OneSignalSDK/OneSignalOSCore/Source/OSBackgroundTaskManager.swift b/iOS_SDK/OneSignalSDK/OneSignalOSCore/Source/OSBackgroundTaskManager.swift new file mode 100644 index 000000000..65d99f364 --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignalOSCore/Source/OSBackgroundTaskManager.swift @@ -0,0 +1,73 @@ +/* + Modified MIT License + + Copyright 2022 OneSignal + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + 1. The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + 2. All copies of substantial portions of the Software may only be used in connection + with services provided by OneSignal. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + */ + +import Foundation +import OneSignalCore + +@objc +public protocol OSBackgroundTaskHandler { + func beginBackgroundTask(_ taskIdentifier: String) + func endBackgroundTask(_ taskIdentifier: String) + func setTaskInvalid(_ taskIdentifier: String) +} + +// TODO: Migrate more background tasks to use this... + +// check if Core needs to use this, then ok to live here +@objc +public class OSBackgroundTaskManager: NSObject { + @objc public static var taskHandler: OSBackgroundTaskHandler? + + @objc + public static func beginBackgroundTask(_ taskIdentifier: String) { + guard let delegate = taskHandler else { + OneSignalLog.onesignalLog(.LL_ERROR, message: "OSBackgroundTaskManager:beginBackgroundTask \(taskIdentifier) cannot be executed due to no task handler.") + return + } + delegate.beginBackgroundTask(taskIdentifier) + } + + @objc + public static func endBackgroundTask(_ taskIdentifier: String) { + guard let delegate = taskHandler else { + OneSignalLog.onesignalLog(.LL_ERROR, message: "OSBackgroundTaskManager:endBackgroundTask \(taskIdentifier) cannot be executed due to no task handler.") + return + } + delegate.endBackgroundTask(taskIdentifier) + } + + @objc + public static func setTaskInvalid(_ taskIdentifier: String) { + guard let delegate = taskHandler else { + OneSignalLog.onesignalLog(.LL_ERROR, message: "OSBackgroundTaskManager:setTaskInvalid \(taskIdentifier) cannot be executed due to no task handler.") + // But not necessarily an error because this task won't exist + // Can be called in initialization of services before delegate is set + return + } + delegate.setTaskInvalid(taskIdentifier) + } +} diff --git a/iOS_SDK/OneSignalSDK/OneSignalOSCore/Source/OSDelta.swift b/iOS_SDK/OneSignalSDK/OneSignalOSCore/Source/OSDelta.swift new file mode 100644 index 000000000..5eb03c73c --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignalOSCore/Source/OSDelta.swift @@ -0,0 +1,82 @@ +/* + Modified MIT License + + Copyright 2022 OneSignal + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + 1. The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + 2. All copies of substantial portions of the Software may only be used in connection + with services provided by OneSignal. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + */ + +import Foundation + +// TODO: Known Issue: Since these don't carry the app_id, it may have changed by the time Deltas become Requests, if app_id changes. +// All requests requiring unique ID's will effectively be dropped. + +open class OSDelta: NSObject, NSCoding { + public let name: String + public let deltaId: String + public let timestamp: Date + public var model: OSModel + public let property: String + public let value: Any + + override open var description: String { + return "OSDelta \(name) with property: \(property) value: \(value)" + } + + public init(name: String, model: OSModel, property: String, value: Any) { + self.name = name + self.deltaId = UUID().uuidString + self.timestamp = Date() + self.model = model + self.property = property + self.value = value + } + + public func encode(with coder: NSCoder) { + coder.encode(name, forKey: "name") + coder.encode(deltaId, forKey: "deltaId") + coder.encode(timestamp, forKey: "timestamp") + coder.encode(model, forKey: "model") + coder.encode(property, forKey: "property") + coder.encode(value, forKey: "value") + } + + public required init?(coder: NSCoder) { + guard let name = coder.decodeObject(forKey: "name") as? String, + let deltaId = coder.decodeObject(forKey: "deltaId") as? String, + let timestamp = coder.decodeObject(forKey: "timestamp") as? Date, + let model = coder.decodeObject(forKey: "model") as? OSModel, + let property = coder.decodeObject(forKey: "property") as? String, + let value = coder.decodeObject(forKey: "value") + else { + // Log error + return nil + } + + self.name = name + self.deltaId = deltaId + self.timestamp = timestamp + self.model = model + self.property = property + self.value = value + } +} diff --git a/iOS_SDK/OneSignalSDK/OneSignalOSCore/Source/OSEventProducer.swift b/iOS_SDK/OneSignalSDK/OneSignalOSCore/Source/OSEventProducer.swift new file mode 100644 index 000000000..fd84d34c2 --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignalOSCore/Source/OSEventProducer.swift @@ -0,0 +1,52 @@ +/* + Modified MIT License + + Copyright 2022 OneSignal + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + 1. The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + 2. All copies of substantial portions of the Software may only be used in connection + with services provided by OneSignal. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + */ + +import Foundation +import OneSignalCore + +public class OSEventProducer: NSObject { + // Not an array as there is at most 1 subsriber per OSEventProducer anyway + var subscriber: THandler? + + public func subscribe(_ handler: THandler) { + // TODO: UM do we want to synchronize on subscribers + subscriber = handler // TODO: UM style, implicit or explicit self? + } + + public func unsubscribe(_ handler: THandler) { + OneSignalLog.onesignalLog(.LL_VERBOSE, message: "OSEventProducer.unsubscribe() called with handler: \(handler)") + // TODO: UM do we want to synchronize on subscribers + subscriber = nil + } + + public func fire(callback: (THandler) -> Void) { + // dump(subscribers) -> uncomment for more verbose log during testing + if let subscriber = subscriber { + callback(subscriber) + } + } +} diff --git a/iOS_SDK/OneSignalSDK/OneSignalOSCore/Source/OSModel.swift b/iOS_SDK/OneSignalSDK/OneSignalOSCore/Source/OSModel.swift new file mode 100644 index 000000000..96f2249f2 --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignalOSCore/Source/OSModel.swift @@ -0,0 +1,76 @@ +/* + Modified MIT License + + Copyright 2022 OneSignal + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + 1. The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + 2. All copies of substantial portions of the Software may only be used in connection + with services provided by OneSignal. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + */ + +import Foundation + +@objc +open class OSModel: NSObject, NSCoding { + public let modelId: String + public var changeNotifier: OSEventProducer + private var hydrating = false // TODO: Starts out false? + + public init(changeNotifier: OSEventProducer) { + self.modelId = UUID().uuidString + self.changeNotifier = changeNotifier + } + + open func encode(with coder: NSCoder) { + coder.encode(modelId, forKey: "modelId") + } + + public required init?(coder: NSCoder) { + guard let modelId = coder.decodeObject(forKey: "modelId") as? String else { + // log error + return nil + } + self.changeNotifier = OSEventProducer() + self.modelId = modelId + } + + // We can add operation name to this... , such as enum of "updated", "deleted", "added" + public func set(property: String, newValue: T) { + let changeArgs = OSModelChangedArgs(model: self, property: property, newValue: newValue) + + changeNotifier.fire { modelChangeHandler in + modelChangeHandler.onModelUpdated(args: changeArgs, hydrating: self.hydrating) + } + } + + /** + This function receives a server response and updates the model's properties. + */ + public func hydrate(_ response: [String: Any]) { + // TODO: Thread safety when processing server responses to hydrate models. + self.hydrating = true + hydrateModel(response) // Calls model-specific hydration logic + self.hydrating = false + } + + open func hydrateModel(_ response: [String: Any]) { + fatalError("hydrateModel(response:) has not been implemented") + } +} diff --git a/iOS_SDK/OneSignalSDK/OneSignalOSCore/Source/OSModelChangedHandler.swift b/iOS_SDK/OneSignalSDK/OneSignalOSCore/Source/OSModelChangedHandler.swift new file mode 100644 index 000000000..77d479c00 --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignalOSCore/Source/OSModelChangedHandler.swift @@ -0,0 +1,59 @@ +/* + Modified MIT License + + Copyright 2022 OneSignal + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + 1. The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + 2. All copies of substantial portions of the Software may only be used in connection + with services provided by OneSignal. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + */ + +import Foundation + +public class OSModelChangedArgs: NSObject { + /** + The full model in its current state. + */ + public let model: OSModel + + /** + The property that was changed. + */ + public let property: String + + /** + The new value of the property, after it has been changed. + */ + public let newValue: Any + + override public var description: String { + return "OSModelChangedArgs for model: \(model) with property: \(property) value: \(newValue)" + } + + init(model: OSModel, property: String, newValue: Any) { + self.model = model + self.property = property + self.newValue = newValue + } +} + +public protocol OSModelChangedHandler { + func onModelUpdated(args: OSModelChangedArgs, hydrating: Bool) +} diff --git a/iOS_SDK/OneSignalSDK/OneSignalOSCore/Source/OSModelStore.swift b/iOS_SDK/OneSignalSDK/OneSignalOSCore/Source/OSModelStore.swift new file mode 100644 index 000000000..64a2f832c --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignalOSCore/Source/OSModelStore.swift @@ -0,0 +1,165 @@ +/* + Modified MIT License + + Copyright 2022 OneSignal + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + 1. The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + 2. All copies of substantial portions of the Software may only be used in connection + with services provided by OneSignal. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + */ + +import OneSignalCore + +open class OSModelStore: NSObject { + let storeKey: String + let changeSubscription: OSEventProducer + var models: [String: TModel] + + public init(changeSubscription: OSEventProducer, storeKey: String) { + self.storeKey = storeKey + self.changeSubscription = changeSubscription + + // read models from cache, if any + if let models = OneSignalUserDefaults.initShared().getSavedCodeableData(forKey: self.storeKey, defaultValue: [:]) as? [String: TModel] { + self.models = models + } else { + // log error + self.models = [:] + } + super.init() + + // listen for changes to the models + for model in self.models.values { + model.changeNotifier.subscribe(self) + } + } + + public func registerAsUserObserver() -> OSModelStore { + // This method was taken out of the initializer as the push subscription model store should not be clearing its user defaults + NotificationCenter.default.addObserver(self, selector: #selector(self.removeModelsFromUserDefaults), + name: Notification.Name(OS_ON_USER_WILL_CHANGE), object: nil) + return self + } + + deinit { + NotificationCenter.default.removeObserver(self, name: Notification.Name(OS_ON_USER_WILL_CHANGE), object: nil) + } + + /** + Uses the ID that is used as the key to store models in the store's models dictionary. + Examples: "person@example.com" for a subscription model or `OS_IDENTITY_MODEL_KEY` for an identity model. + */ + public func getModel(key: String) -> TModel? { + return self.models[key] + } + + /** + Uses the `modelId` to get the corresponding model in the store's models dictionary. + */ + public func getModel(modelId: String) -> TModel? { + for model in models.values { + if model.modelId == modelId { + return model + } + } + return nil + } + + public func getModels() -> [String: TModel] { + return self.models + } + + public func add(id: String, model: TModel, hydrating: Bool) { + // TODO: Check if we are adding the same model? Do we replace? + // For example, calling addEmail multiple times with the same email + // Check API endpoint for behavior + models[id] = model + + // persist the models (including new model) to storage + OneSignalUserDefaults.initShared().saveCodeableData(forKey: self.storeKey, withValue: self.models) + + // listen for changes to this model + model.changeNotifier.subscribe(self) + + guard !hydrating else { + return + } + + self.changeSubscription.fire { modelStoreListener in + modelStoreListener.onAdded(model) + } + } + + /** + Returns false if this model does not exist in the store. + This can happen if remove email or SMS is called and it doesn't exist in the store. + */ + public func remove(_ id: String) { + OneSignalLog.onesignalLog(.LL_VERBOSE, message: "OSModelStore remove() called with model \(id)") + // TODO: Nothing will happen if model doesn't exist in the store + if let model = models[id] { + models.removeValue(forKey: id) + + // persist the models (with removed model) to storage + OneSignalUserDefaults.initShared().saveCodeableData(forKey: self.storeKey, withValue: self.models) + + // no longer listen for changes to this model + model.changeNotifier.unsubscribe(self) + + self.changeSubscription.fire { modelStoreListener in + modelStoreListener.onRemoved(model) + } + } else { + OneSignalLog.onesignalLog(.LL_ERROR, message: "OSModelStore cannot remove \(id) because it doesn't exist in the store.") + } + } + + /** + We remove this store's models from UserDefaults but not from the store itself. + We may still need references to model(s) in this store! + */ + @objc func removeModelsFromUserDefaults() { + // Clear the UserDefaults models cache when OS_ON_USER_WILL_CHANGEclearModelsFromStore() called + OneSignalUserDefaults.initShared().removeValue(forKey: self.storeKey) + } + + /** + We clear this store's models but not from the UserDefaults cache. + When the User changes, the Subscription Model Store must remove all models. + In contrast, it is not necessary for the Identity or Properties Model Stores to do so. + */ + public func clearModelsFromStore() { + self.models = [:] + } +} + +extension OSModelStore: OSModelChangedHandler { + public func onModelUpdated(args: OSModelChangedArgs, hydrating: Bool) { + // persist the changed models to storage + OneSignalUserDefaults.initShared().saveCodeableData(forKey: self.storeKey, withValue: self.models) + + guard !hydrating else { + return + } + self.changeSubscription.fire { modelStoreListener in + modelStoreListener.onUpdated(args) + } + } +} diff --git a/iOS_SDK/OneSignalSDK/OneSignalOSCore/Source/OSModelStoreChangedHandler.swift b/iOS_SDK/OneSignalSDK/OneSignalOSCore/Source/OSModelStoreChangedHandler.swift new file mode 100644 index 000000000..a009cc08f --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignalOSCore/Source/OSModelStoreChangedHandler.swift @@ -0,0 +1,49 @@ +/* + Modified MIT License + + Copyright 2022 OneSignal + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + 1. The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + 2. All copies of substantial portions of the Software may only be used in connection + with services provided by OneSignal. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + */ + +import Foundation + +/** + A handler interface for [OSModelStore.subscribe]. Implement this protocol to subscribe + to model change events for a specific model store. + */ +public protocol OSModelStoreChangedHandler { + /** + Called when a model has been added to the model store. + */ + func onAdded(_ model: OSModel) + + /** + Called when a model has been updated. + */ + func onUpdated(_ args: OSModelChangedArgs) + + /** + Called when a model has been removed from the model store. + */ + func onRemoved(_ model: OSModel) +} diff --git a/iOS_SDK/OneSignalSDK/OneSignalOSCore/Source/OSModelStoreListener.swift b/iOS_SDK/OneSignalSDK/OneSignalOSCore/Source/OSModelStoreListener.swift new file mode 100644 index 000000000..d6297fbd3 --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignalOSCore/Source/OSModelStoreListener.swift @@ -0,0 +1,80 @@ +/* + Modified MIT License + + Copyright 2022 OneSignal + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + 1. The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + 2. All copies of substantial portions of the Software may only be used in connection + with services provided by OneSignal. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + */ + +import Foundation +import OneSignalCore + +public protocol OSModelStoreListener: OSModelStoreChangedHandler { + associatedtype TModel: OSModel + + var store: OSModelStore { get } + + init(store: OSModelStore) + + func getAddModelDelta(_ model: TModel) -> OSDelta? + + func getRemoveModelDelta(_ model: TModel) -> OSDelta? + + func getUpdateModelDelta(_ args: OSModelChangedArgs) -> OSDelta? +} + +extension OSModelStoreListener { + public func start() { + store.changeSubscription.subscribe(self) + } + + func close() { + store.changeSubscription.unsubscribe(self) + } + + public func onAdded(_ model: OSModel) { + guard let addedModel = model as? Self.TModel else { + // log error + return + } + if let delta = getAddModelDelta(addedModel) { + OSOperationRepo.sharedInstance.enqueueDelta(delta) + } + } + + public func onUpdated(_ args: OSModelChangedArgs) { + if let delta = getUpdateModelDelta(args) { + OSOperationRepo.sharedInstance.enqueueDelta(delta) + } + } + + public func onRemoved(_ model: OSModel) { + OneSignalLog.onesignalLog(.LL_VERBOSE, message: "OSModelStoreListener.onRemoved() called with model \(model)") + guard let removedModel = model as? Self.TModel else { + // log error + return + } + if let delta = getRemoveModelDelta(removedModel) { + OSOperationRepo.sharedInstance.enqueueDelta(delta) + } + } +} diff --git a/iOS_SDK/OneSignalSDK/OneSignalOSCore/Source/OSOperationExecutor.swift b/iOS_SDK/OneSignalSDK/OneSignalOSCore/Source/OSOperationExecutor.swift new file mode 100644 index 000000000..db3aee576 --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignalOSCore/Source/OSOperationExecutor.swift @@ -0,0 +1,41 @@ +/* + Modified MIT License + + Copyright 2022 OneSignal + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + 1. The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + 2. All copies of substantial portions of the Software may only be used in connection + with services provided by OneSignal. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + */ + +import OneSignalCore + +// TODO: Concrete executors drop OSDeltas and Requests when initializing from the cache, when they cannot be connected to their respective models anymore. Revisit this behavior of dropping. + +public protocol OSOperationExecutor { + var supportedDeltas: [String] { get } + var deltaQueue: [OSDelta] { get } + + func enqueueDelta(_ delta: OSDelta) + func cacheDeltaQueue() + func processDeltaQueue(inBackground: Bool) + + func processRequestQueue(inBackground: Bool) +} diff --git a/iOS_SDK/OneSignalSDK/OneSignalOSCore/Source/OSOperationRepo.swift b/iOS_SDK/OneSignalSDK/OneSignalOSCore/Source/OSOperationRepo.swift new file mode 100644 index 000000000..8f9e8f77b --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignalOSCore/Source/OSOperationRepo.swift @@ -0,0 +1,157 @@ +/* + Modified MIT License + + Copyright 2022 OneSignal + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + 1. The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + 2. All copies of substantial portions of the Software may only be used in connection + with services provided by OneSignal. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + */ + +import Foundation +import OneSignalCore + +/** + The OSOperationRepo is a static singleton. + OSDeltas are enqueued when model store observers observe changes to their models, and sorted to their appropriate executors. + */ +public class OSOperationRepo: NSObject { + public static let sharedInstance = OSOperationRepo() + private var hasCalledStart = false + + // Maps delta names to the interfaces for the operation executors + var deltasToExecutorMap: [String: OSOperationExecutor] = [:] + var executors: [OSOperationExecutor] = [] + var deltaQueue: [OSDelta] = [] + + // TODO: This should come from a config, plist, method, remote params + var pollIntervalSeconds = 5 + public var paused = false + + /** + Initilize this Operation Repo. Read from the cache. Executors may not be available by this time. + If everything starts up on initialize(), order can matter, ideally not but it can. + Likely call init on this from oneSignal but exeuctors can come from diff modules. + */ + public func start() { + guard !OneSignalConfigManager.shouldAwaitAppIdAndLogMissingPrivacyConsent(forMethod: nil) else { + return + } + guard !hasCalledStart else { + return + } + hasCalledStart = true + + OneSignalLog.onesignalLog(.LL_VERBOSE, message: "OSOperationRepo calling start()") + // register as user observer + NotificationCenter.default.addObserver(self, + selector: #selector(self.flushDeltaQueue), + name: Notification.Name(OS_ON_USER_WILL_CHANGE), + object: nil) + // Read the Deltas from cache, if any... + if let deltaQueue = OneSignalUserDefaults.initShared().getSavedCodeableData(forKey: OS_OPERATION_REPO_DELTA_QUEUE_KEY, defaultValue: []) as? [OSDelta] { + self.deltaQueue = deltaQueue + } else { + // log error + } + + pollFlushQueue() + } + + private func pollFlushQueue() { + DispatchQueue.global().asyncAfter(deadline: .now() + .seconds(pollIntervalSeconds)) { [weak self] in + self?.flushDeltaQueue() + self?.pollFlushQueue() + } + } + + /** + Add and start an executor. + */ + public func addExecutor(_ executor: OSOperationExecutor) { + guard !OneSignalConfigManager.shouldAwaitAppIdAndLogMissingPrivacyConsent(forMethod: nil) else { + return + } + start() + executors.append(executor) + for delta in executor.supportedDeltas { + deltasToExecutorMap[delta] = executor + } + } + + func enqueueDelta(_ delta: OSDelta) { + guard !OneSignalConfigManager.shouldAwaitAppIdAndLogMissingPrivacyConsent(forMethod: nil) else { + return + } + start() + OneSignalLog.onesignalLog(.LL_VERBOSE, message: "OSOperationRepo enqueueDelta: \(delta)") + deltaQueue.append(delta) + + // Persist the deltas (including new delta) to storage + OneSignalUserDefaults.initShared().saveCodeableData(forKey: OS_OPERATION_REPO_DELTA_QUEUE_KEY, withValue: self.deltaQueue) + } + + @objc public func flushDeltaQueue(inBackground: Bool = false) { + guard !paused else { + OneSignalLog.onesignalLog(.LL_DEBUG, message: "OSOperationRepo not flushing queue due to being paused") + return + } + + guard !OneSignalConfigManager.shouldAwaitAppIdAndLogMissingPrivacyConsent(forMethod: nil) else { + return + } + + if (inBackground) { + OSBackgroundTaskManager.beginBackgroundTask(OPERATION_REPO_BACKGROUND_TASK) + } + + start() + if !deltaQueue.isEmpty { + OneSignalLog.onesignalLog(.LL_VERBOSE, message: "OSOperationRepo flushDeltaQueue in background: \(inBackground) with queue: \(deltaQueue)") + } + + var index = 0 + for delta in deltaQueue { + if let executor = deltasToExecutorMap[delta.name] { + executor.enqueueDelta(delta) + deltaQueue.remove(at: index) + } else { + // keep in queue if no executor matches, we may not have the executor available yet + index += 1 + } + } + + // Persist the deltas (including removed deltas) to storage after they are divvy'd up to executors. + OneSignalUserDefaults.initShared().saveCodeableData(forKey: OS_OPERATION_REPO_DELTA_QUEUE_KEY, withValue: self.deltaQueue) + + for executor in executors { + executor.cacheDeltaQueue() + } + + for executor in executors { + executor.processDeltaQueue(inBackground: inBackground) + } + + if (inBackground) { + OSBackgroundTaskManager.endBackgroundTask(OPERATION_REPO_BACKGROUND_TASK) + } + + } +} diff --git a/iOS_SDK/OneSignalSDK/OneSignalOSCore/Source/OneSignalOSCore.h b/iOS_SDK/OneSignalSDK/OneSignalOSCore/Source/OneSignalOSCore.h new file mode 100644 index 000000000..e1e4858b7 --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignalOSCore/Source/OneSignalOSCore.h @@ -0,0 +1,34 @@ +/* + Modified MIT License + + Copyright 2022 OneSignal + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + 1. The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + 2. All copies of substantial portions of the Software may only be used in connection + with services provided by OneSignal. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + */ + +#import + +//! Project version number for OneSignalOSCore. +FOUNDATION_EXPORT double OneSignalOSCoreVersionNumber; + +//! Project version string for OneSignalOSCore. +FOUNDATION_EXPORT const unsigned char OneSignalOSCoreVersionString[]; diff --git a/iOS_SDK/OneSignalSDK/OneSignalOSCoreFramework/Info.plist b/iOS_SDK/OneSignalSDK/OneSignalOSCoreFramework/Info.plist new file mode 100644 index 000000000..37f13eb0c --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignalOSCoreFramework/Info.plist @@ -0,0 +1,22 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0 + CFBundleVersion + $(CURRENT_PROJECT_VERSION) + + diff --git a/iOS_SDK/OneSignalSDK/OneSignalOutcomes/OneSignalOutcomes.m b/iOS_SDK/OneSignalSDK/OneSignalOutcomes/OSOutcomes.m similarity index 62% rename from iOS_SDK/OneSignalSDK/OneSignalOutcomes/OneSignalOutcomes.m rename to iOS_SDK/OneSignalSDK/OneSignalOutcomes/OSOutcomes.m index 86d5741a6..8723107aa 100644 --- a/iOS_SDK/OneSignalSDK/OneSignalOutcomes/OneSignalOutcomes.m +++ b/iOS_SDK/OneSignalSDK/OneSignalOutcomes/OSOutcomes.m @@ -27,7 +27,27 @@ of this software and associated documentation files (the "Software"), to deal #import "OneSignalOutcomes.h" #import -@implementation OneSignalOutcomes +@implementation OSOutcomes + ++ (Class)Session { + return self; +} + +static OneSignalOutcomeEventsController *_sharedController; ++ (OneSignalOutcomeEventsController *)sharedController { + return _sharedController; +} + ++ (void)start { + _sharedController = [[OneSignalOutcomeEventsController alloc] + initWithSessionManager:[OSSessionManager sharedSessionManager] + outcomeEventsFactory:[[OSOutcomeEventsFactory alloc] + initWithCache:[OSOutcomeEventsCache sharedOutcomeEventsCache]]]; +} + ++ (void)clearStatics { + _sharedController = nil; +} + (void)migrate { [self migrateToVersion_02_14_00_AndGreater]; @@ -67,4 +87,43 @@ + (void)saveCurrentSDKVersion { let currentVersion = [ONESIGNAL_VERSION intValue]; [OneSignalUserDefaults.initShared saveIntegerForKey:OSUD_CACHED_SDK_VERSION withValue:currentVersion]; } + +#pragma mark Session namespace + ++ (void)addOutcome:(NSString * _Nonnull)name { + if ([OSPrivacyConsentController shouldLogMissingPrivacyConsentErrorWithMethodName:@"addOutcome"]) { + return; + } + if (!_sharedController) { + [OneSignalLog onesignalLog:ONE_S_LL_ERROR message:@"Attempted to call OneSignal.Session before init. Make sure OneSignal init is called first."]; + return; + } + + [_sharedController addOutcome:name]; +} + ++ (void)addOutcomeWithValue:(NSString * _Nonnull)name value:(NSNumber * _Nonnull)value { + if ([OSPrivacyConsentController shouldLogMissingPrivacyConsentErrorWithMethodName:@"addOutcomeWithValue"]) { + return; + } + if (!_sharedController) { + [OneSignalLog onesignalLog:ONE_S_LL_ERROR message:@"Attempted to call OneSignal.Session before init. Make sure OneSignal init is called first."]; + return; + } + + [_sharedController addOutcomeWithValue:name value:value]; +} + ++ (void)addUniqueOutcome:(NSString * _Nonnull)name { + if ([OSPrivacyConsentController shouldLogMissingPrivacyConsentErrorWithMethodName:@"addUniqueOutcome"]) { + return; + } + if (!_sharedController) { + [OneSignalLog onesignalLog:ONE_S_LL_ERROR message:@"Attempted to call OneSignal.Session before init. Make sure OneSignal init is called first."]; + return; + } + + [_sharedController addUniqueOutcome:name]; +} + @end diff --git a/iOS_SDK/OneSignalSDK/OneSignalOutcomes/OneSignalOutcomes.h b/iOS_SDK/OneSignalSDK/OneSignalOutcomes/OneSignalOutcomes.h index e673d4346..e3dcb57d1 100644 --- a/iOS_SDK/OneSignalSDK/OneSignalOutcomes/OneSignalOutcomes.h +++ b/iOS_SDK/OneSignalSDK/OneSignalOutcomes/OneSignalOutcomes.h @@ -40,8 +40,23 @@ #import "OSOutcomeEventsFactory.h" #import "OSTrackerFactory.h" #import "OSOutcomeEventsRepository.h" +#import "OSFocusInfluenceParam.h" -@interface OneSignalOutcomes : NSObject +/** + Public API for Session namespace. + */ +@protocol OSSession ++ (void)addOutcome:(NSString * _Nonnull)name; ++ (void)addUniqueOutcome:(NSString * _Nonnull)name; ++ (void)addOutcomeWithValue:(NSString * _Nonnull)name value:(NSNumber * _Nonnull)value NS_REFINED_FOR_SWIFT; + +@end + +@interface OSOutcomes : NSObject ++ (Class _Nonnull)Session; ++ (OneSignalOutcomeEventsController * _Nullable)sharedController; ++ (void)start; ++ (void)clearStatics; + (void)migrate; @end diff --git a/iOS_SDK/OneSignalSDK/OneSignalOutcomes/Source/Influence/OSChannelTracker.m b/iOS_SDK/OneSignalSDK/OneSignalOutcomes/Source/Influence/OSChannelTracker.m index 4ab0470da..d712247aa 100644 --- a/iOS_SDK/OneSignalSDK/OneSignalOutcomes/Source/Influence/OSChannelTracker.m +++ b/iOS_SDK/OneSignalSDK/OneSignalOutcomes/Source/Influence/OSChannelTracker.m @@ -146,7 +146,6 @@ - (OSInfluence *)currentSessionInfluence { } else { [OneSignalLog onesignalLog:ONE_S_LL_ERROR message:@"OSChannelTracker:currentSessionInfluence found a direct influence without a direct id."]; } - } } else if (_influenceType == INDIRECT) { if ([self isIndirectSessionEnabled]) { diff --git a/iOS_SDK/OneSignalSDK/Source/OSFocusInfluenceParam.h b/iOS_SDK/OneSignalSDK/OneSignalOutcomes/Source/Influence/model/OSFocusInfluenceParam.h similarity index 100% rename from iOS_SDK/OneSignalSDK/Source/OSFocusInfluenceParam.h rename to iOS_SDK/OneSignalSDK/OneSignalOutcomes/Source/Influence/model/OSFocusInfluenceParam.h diff --git a/iOS_SDK/OneSignalSDK/Source/OSFocusInfluenceParam.m b/iOS_SDK/OneSignalSDK/OneSignalOutcomes/Source/Influence/model/OSFocusInfluenceParam.m similarity index 100% rename from iOS_SDK/OneSignalSDK/Source/OSFocusInfluenceParam.m rename to iOS_SDK/OneSignalSDK/OneSignalOutcomes/Source/Influence/model/OSFocusInfluenceParam.m diff --git a/iOS_SDK/OneSignalSDK/OneSignalOutcomes/Source/OutcomeEvents/OSOutcomesRequests.h b/iOS_SDK/OneSignalSDK/OneSignalOutcomes/Source/OutcomeEvents/OSOutcomesRequests.h index c690b3c05..866d01287 100644 --- a/iOS_SDK/OneSignalSDK/OneSignalOutcomes/Source/OutcomeEvents/OSOutcomesRequests.h +++ b/iOS_SDK/OneSignalSDK/OneSignalOutcomes/Source/OutcomeEvents/OSOutcomesRequests.h @@ -27,6 +27,7 @@ #import #import #import "OSOutcomeEvent.h" +#import "OSFocusInfluenceParam.h" @interface OSRequestSendOutcomesV1ToServer : OneSignalRequest @@ -49,3 +50,11 @@ deviceType:(NSNumber * _Nonnull)deviceType; @end + +@interface OSRequestSendSessionEndOutcomes : OneSignalRequest ++ (instancetype _Nonnull)withActiveTime:(NSNumber * _Nonnull)activeTime + appId:(NSString * _Nonnull)appId + pushSubscriptionId:(NSString * _Nonnull)pushSubscriptionId + onesignalId:(NSString * _Nonnull)onesignalId + influenceParams:(NSArray * _Nonnull)influenceParams; +@end diff --git a/iOS_SDK/OneSignalSDK/OneSignalOutcomes/Source/OutcomeEvents/OSOutcomesRequests.m b/iOS_SDK/OneSignalSDK/OneSignalOutcomes/Source/OutcomeEvents/OSOutcomesRequests.m index 07caad673..8b4257e83 100644 --- a/iOS_SDK/OneSignalSDK/OneSignalOutcomes/Source/OutcomeEvents/OSOutcomesRequests.m +++ b/iOS_SDK/OneSignalSDK/OneSignalOutcomes/Source/OutcomeEvents/OSOutcomesRequests.m @@ -125,3 +125,38 @@ + (instancetype)measureOutcomeEvent:(OSOutcomeEventParams *)outcome appId:(NSStr return request; } @end + +@implementation OSRequestSendSessionEndOutcomes + ++ (instancetype _Nonnull)withActiveTime:(NSNumber * _Nonnull)activeTime + appId:(NSString * _Nonnull)appId + pushSubscriptionId:(NSString * _Nonnull)pushSubscriptionId + onesignalId:(NSString * _Nonnull)onesignalId + influenceParams:(NSArray * _Nonnull)influenceParams { + let request = [OSRequestSendSessionEndOutcomes new]; + + let params = [NSMutableDictionary new]; + params[@"app_id"] = appId; + params[@"id"] = @"os__session_duration"; + params[@"session_time"] = @([activeTime intValue]); + params[@"subscription"] = @{@"id": pushSubscriptionId, @"type": @"iOSPush"}; + params[@"onesignal_id"] = onesignalId; + + // TODO: Check params for "direct" + "notification_ids", should be filled by influenceParams + // params[@"direct"] = @(true); + // params[@"notification_ids"] = @"lorem"; + if (influenceParams) { + for (OSFocusInfluenceParam *influenceParam in influenceParams) { + params[influenceParam.influenceKey] = influenceParam.influenceIds; + params[influenceParam.influenceDirectKey] = @(influenceParam.directInfluence); + } + } + + request.parameters = params; + request.method = POST; + request.path = @"outcomes/measure"; + + return request; +} + +@end diff --git a/iOS_SDK/OneSignalSDK/OneSignalOutcomes/Source/OutcomeEvents/OSSessionManager.h b/iOS_SDK/OneSignalSDK/OneSignalOutcomes/Source/OutcomeEvents/OSSessionManager.h index 7e35c39e9..a1616f737 100644 --- a/iOS_SDK/OneSignalSDK/OneSignalOutcomes/Source/OutcomeEvents/OSSessionManager.h +++ b/iOS_SDK/OneSignalSDK/OneSignalOutcomes/Source/OutcomeEvents/OSSessionManager.h @@ -41,18 +41,20 @@ + (void)resetSharedSessionManager; @property (nonatomic) id _Nullable delegate; +@property AppEntryAction appEntryState; - (instancetype _Nonnull)init:(Class _Nullable)delegate withTrackerFactory:(OSTrackerFactory *_Nonnull)trackerFactory; - (NSArray *_Nonnull)getInfluences; - (NSArray *_Nonnull)getSessionInfluences; - (void)initSessionFromCache; -- (void)restartSessionIfNeeded:(AppEntryAction)entryAction; +- (void)restartSessionIfNeeded; - (void)onInAppMessageReceived:(NSString * _Nonnull)messageId; - (void)onDirectInfluenceFromIAMClick:(NSString * _Nonnull)directIAMId; - (void)onDirectInfluenceFromIAMClickFinished; - (void)onNotificationReceived:(NSString * _Nonnull)notificationId; - (void)onDirectInfluenceFromNotificationOpen:(AppEntryAction)entryAction withNotificationId:(NSString * _Nonnull)directNotificationId; -- (void)attemptSessionUpgrade:(AppEntryAction)entryAction; +- (void)attemptSessionUpgrade; +- (NSDate *_Nullable)sessionLaunchTime; @end diff --git a/iOS_SDK/OneSignalSDK/OneSignalOutcomes/Source/OutcomeEvents/OSSessionManager.m b/iOS_SDK/OneSignalSDK/OneSignalOutcomes/Source/OutcomeEvents/OSSessionManager.m index 4ecab5b20..23edf01ed 100644 --- a/iOS_SDK/OneSignalSDK/OneSignalOutcomes/Source/OutcomeEvents/OSSessionManager.m +++ b/iOS_SDK/OneSignalSDK/OneSignalOutcomes/Source/OutcomeEvents/OSSessionManager.m @@ -39,6 +39,10 @@ @interface OSSessionManager () @implementation OSSessionManager static OSSessionManager *_sessionManager; + +NSDate *_sessionLaunchTime; +AppEntryAction _appEntryState = APP_CLOSE; + + (OSSessionManager*)sharedSessionManager { if (!_sessionManager) _sessionManager = [[OSSessionManager alloc] init:nil withTrackerFactory:[OSTrackerFactory sharedTrackerFactory]]; @@ -49,6 +53,14 @@ + (void)resetSharedSessionManager { _sessionManager = nil; } +- (AppEntryAction)appEntryState { + return _appEntryState; +} + +- (void)setAppEntryState:(AppEntryAction)appEntryState { + _appEntryState = appEntryState; +} + - (instancetype _Nonnull)init:(id)delegate withTrackerFactory:(OSTrackerFactory *)trackerFactory { if (self = [super init]) { _delegate = delegate; @@ -72,11 +84,11 @@ - (void)initSessionFromCache { [OneSignalLog onesignalLog:ONE_S_LL_DEBUG message:[NSString stringWithFormat:@"SessionManager restored from cache with influences: %@", [self getInfluences].description]]; } -- (void)restartSessionIfNeeded:(AppEntryAction)entryAction { - NSArray *channelTrackers = [_trackerFactory channelsToResetByEntryAction:entryAction]; +- (void)restartSessionIfNeeded { + NSArray *channelTrackers = [_trackerFactory channelsToResetByEntryAction:_appEntryState]; NSMutableArray *updatedInfluences = [NSMutableArray new]; - [OneSignalLog onesignalLog:ONE_S_LL_DEBUG message:[NSString stringWithFormat:@"OneSignal SessionManager restartSessionIfNeeded with entryAction:: %u channelTrackers: %@", entryAction, channelTrackers.description]]; + [OneSignalLog onesignalLog:ONE_S_LL_DEBUG message:[NSString stringWithFormat:@"OneSignal SessionManager restartSessionIfNeeded with entryAction:: %u channelTrackers: %@", _appEntryState, channelTrackers.description]]; for (OSChannelTracker *channelTracker in channelTrackers) { NSArray *lastIds = [channelTracker lastReceivedIds]; @@ -94,6 +106,8 @@ - (void)restartSessionIfNeeded:(AppEntryAction)entryAction { } [self sendSessionEndingWithInfluences:updatedInfluences]; + + _sessionLaunchTime = [NSDate date]; } - (void)onInAppMessageReceived:(NSString *)messageId { @@ -129,12 +143,13 @@ - (void)onNotificationReceived:(NSString *)notificationId { } - (void)onDirectInfluenceFromNotificationOpen:(AppEntryAction)entryAction withNotificationId:(NSString *)directNotificationId { + _appEntryState = entryAction; [OneSignalLog onesignalLog:ONE_S_LL_DEBUG message:[NSString stringWithFormat:@"OneSignal SessionManager onDirectInfluenceFromNotificationOpen notificationId: %@", directNotificationId]]; if (!directNotificationId || directNotificationId.length == 0) return; - [self attemptSessionUpgrade:entryAction withDirectId:directNotificationId]; + [self attemptSessionUpgradeWithDirectId:directNotificationId]; } /* @@ -145,15 +160,15 @@ - (void)onDirectInfluenceFromNotificationOpen:(AppEntryAction)entryAction withNo * INDIRECT -> DIRECT * DIRECT -> DIRECT */ -- (void)attemptSessionUpgrade:(AppEntryAction)entryAction { - [self attemptSessionUpgrade:entryAction withDirectId:nil]; +- (void)attemptSessionUpgrade { + [self attemptSessionUpgradeWithDirectId:nil]; } -- (void)attemptSessionUpgrade:(AppEntryAction)entryAction withDirectId:(NSString *)directId { - [OneSignalLog onesignalLog:ONE_S_LL_DEBUG message:[NSString stringWithFormat:@"OneSignal SessionManager attemptSessionUpgrade with entryAction: %u", entryAction]]; +- (void)attemptSessionUpgradeWithDirectId:(NSString *)directId { + [OneSignalLog onesignalLog:ONE_S_LL_DEBUG message:[NSString stringWithFormat:@"OneSignal SessionManager attemptSessionUpgrade with entryAction: %u", _appEntryState]]; - OSChannelTracker *channelTrackerByAction = [_trackerFactory channelByEntryAction:entryAction]; - NSArray *channelTrackersToReset = [_trackerFactory channelsToResetByEntryAction:entryAction]; + OSChannelTracker *channelTrackerByAction = [_trackerFactory channelByEntryAction:_appEntryState]; + NSArray *channelTrackersToReset = [_trackerFactory channelsToResetByEntryAction:_appEntryState]; NSMutableArray *influencesToEnd = [NSMutableArray new]; OSInfluence *lastInfluence = nil; @@ -185,7 +200,7 @@ - (void)attemptSessionUpgrade:(AppEntryAction)entryAction withDirectId:(NSString if (channelTracker.influenceType == UNATTRIBUTED) { NSArray *lastIds = [channelTracker lastReceivedIds]; // There are new ids for attribution and the application was open again without resetting session - if (lastIds.count > 0 && entryAction != APP_CLOSE) { + if (lastIds.count > 0 && _appEntryState != APP_CLOSE) { // Save influence to ended it later if needed // This influence will be unattributed OSInfluence *influence = [channelTracker currentSessionInfluence]; @@ -263,4 +278,8 @@ - (void)sendSessionEndingWithInfluences:(NSArray *)endingInfluenc [_delegate onSessionEnding:endingInfluences]; } +- (NSDate *)sessionLaunchTime { + return _sessionLaunchTime; +} + @end diff --git a/iOS_SDK/OneSignalSDK/OneSignalOutcomes/Source/OutcomeEvents/OneSignalOutcomeEventsController.h b/iOS_SDK/OneSignalSDK/OneSignalOutcomes/Source/OutcomeEvents/OneSignalOutcomeEventsController.h index f99c5ce83..b49257d26 100644 --- a/iOS_SDK/OneSignalSDK/OneSignalOutcomes/Source/OutcomeEvents/OneSignalOutcomeEventsController.h +++ b/iOS_SDK/OneSignalSDK/OneSignalOutcomes/Source/OutcomeEvents/OneSignalOutcomeEventsController.h @@ -30,6 +30,7 @@ #import "OSOutcomeEventsFactory.h" #import "OSInAppMessageOutcome.h" #import "OSOutcomeEvent.h" +#import "OSFocusInfluenceParam.h" @interface OneSignalOutcomeEventsController : NSObject @@ -37,25 +38,22 @@ outcomeEventsFactory:(OSOutcomeEventsFactory *_Nonnull)outcomeEventsFactory; - (void)clearOutcomes; +- (void)cleanUniqueOutcomeNotifications; + +- (void)addOutcome:(NSString * _Nonnull)name; +- (void)addUniqueOutcome:(NSString * _Nonnull)name; +- (void)addOutcomeWithValue:(NSString * _Nonnull)name value:(NSNumber * _Nonnull)value; - (void)sendClickActionOutcomes:(NSArray *_Nonnull)outcomes appId:(NSString * _Nonnull)appId deviceType:(NSNumber * _Nonnull)deviceType; -- (void)sendOutcomeEvent:(NSString * _Nonnull)name - appId:(NSString * _Nonnull)appId - deviceType:(NSNumber * _Nonnull)deviceType - successBlock:(OSSendOutcomeSuccess _Nullable)success; - -- (void)sendUniqueOutcomeEvent:(NSString * _Nonnull)name +- (void)sendSessionEndOutcomes:(NSNumber* _Nonnull)timeElapsed appId:(NSString * _Nonnull)appId - deviceType:(NSNumber * _Nonnull)deviceType - successBlock:(OSSendOutcomeSuccess _Nullable)success; - -- (void)sendOutcomeEventWithValue:(NSString * _Nonnull)name - value:(NSNumber * _Nullable)weight - appId:(NSString * _Nonnull)appId - deviceType:(NSNumber * _Nonnull)deviceType - successBlock:(OSSendOutcomeSuccess _Nullable)success; + pushSubscriptionId:(NSString * _Nonnull)pushSubscriptionId + onesignalId:(NSString * _Nonnull)onesignalId + influenceParams:(NSArray * _Nonnull)influenceParams + onSuccess:(OSResultSuccessBlock _Nonnull)successBlock + onFailure:(OSFailureBlock _Nonnull)failureBlock; @end diff --git a/iOS_SDK/OneSignalSDK/OneSignalOutcomes/Source/OutcomeEvents/OneSignalOutcomeEventsController.m b/iOS_SDK/OneSignalSDK/OneSignalOutcomes/Source/OutcomeEvents/OneSignalOutcomeEventsController.m index 82f456640..4d319474c 100644 --- a/iOS_SDK/OneSignalSDK/OneSignalOutcomes/Source/OutcomeEvents/OneSignalOutcomeEventsController.m +++ b/iOS_SDK/OneSignalSDK/OneSignalOutcomes/Source/OutcomeEvents/OneSignalOutcomeEventsController.m @@ -34,6 +34,7 @@ of this software and associated documentation files (the "Software"), to deal #import "OSOutcomeEventsRepository.h" #import "OSInfluenceDataDefines.h" #import "OSInAppMessageOutcome.h" +#import "OSOutcomesRequests.h" @interface OneSignalOutcomeEventsController () @@ -69,6 +70,25 @@ - (void)clearOutcomes { [self saveUnattributedUniqueOutcomeEvents]; } +/* + Iterate through all stored cached OSUniqueOutcomeNotification and clean any items over 7 days old + */ +- (void)cleanUniqueOutcomeNotifications { + NSArray *uniqueOutcomeNotifications = [OneSignalUserDefaults.initShared getSavedCodeableDataForKey:OSUD_CACHED_ATTRIBUTED_UNIQUE_OUTCOME_EVENT_NOTIFICATION_IDS_SENT defaultValue:nil]; + + NSTimeInterval timeInSeconds = [[NSDate date] timeIntervalSince1970]; + NSMutableArray *finalNotifications = [NSMutableArray new]; + for (OSCachedUniqueOutcome *notif in uniqueOutcomeNotifications) { + + // Save notif if it has been stored for less than or equal to a week + NSTimeInterval diff = timeInSeconds - [notif.timestamp doubleValue]; + if (diff <= WEEK_IN_SECONDS) + [finalNotifications addObject:notif]; + } + + [OneSignalUserDefaults.initShared saveCodeableDataForKey:OSUD_CACHED_ATTRIBUTED_UNIQUE_OUTCOME_EVENT_NOTIFICATION_IDS_SENT withValue:finalNotifications]; +} + - (void)sendClickActionOutcomes:(NSArray *)outcomes appId:(NSString * _Nonnull)appId deviceType:(NSNumber * _Nonnull)deviceType { @@ -84,6 +104,31 @@ - (void)sendClickActionOutcomes:(NSArray *)outcomes } } +- (void)sendSessionEndOutcomes:(NSNumber * _Nonnull)timeElapsed + appId:(NSString * _Nonnull)appId + pushSubscriptionId:(NSString * _Nonnull)pushSubscriptionId + onesignalId:(NSString * _Nonnull)onesignalId + influenceParams:(NSArray * _Nonnull)influenceParams + onSuccess:(OSResultSuccessBlock _Nonnull)successBlock + onFailure:(OSFailureBlock _Nonnull)failureBlock { + [OneSignalClient.sharedClient executeRequest:[OSRequestSendSessionEndOutcomes + withActiveTime:timeElapsed + appId:appId + pushSubscriptionId:pushSubscriptionId + onesignalId:onesignalId + influenceParams:influenceParams] onSuccess:^(NSDictionary *result) { + [OneSignalLog onesignalLog:ONE_S_LL_DEBUG message:@"OneSignalOutcomeEventsController:sendSessionEndOutcomes attributed succeed"]; + if (successBlock) { + successBlock(result); + } + } onFailure:^(NSError *error) { + [OneSignalLog onesignalLog:ONE_S_LL_ERROR message:@"OneSignalOutcomeEventsController:sendSessionEndOutcomes attributed failed"]; + if (failureBlock) { + failureBlock(error); + } + }]; +} + - (void)sendUniqueOutcomeEvent:(NSString * _Nonnull)name appId:(NSString * _Nonnull)appId deviceType:(NSNumber * _Nonnull)deviceType @@ -285,4 +330,50 @@ - (void)saveUnattributedUniqueOutcomeEvents { [_outcomeEventsFactory.repository saveUnattributedUniqueOutcomeEventsSent:unattributedUniqueOutcomeEventsSentSet]; } +#pragma mark Session namespace methods forwarded here + +// TODO: Clean up successBlocks b/c no longer provided to end users + +- (void)addOutcome:(NSString * _Nonnull)name { + if (![self isValidOutcomeEntry:name]) { + return; + } + + [self sendOutcomeEvent:name appId:[OneSignalConfigManager getAppId] deviceType:[NSNumber numberWithInt:DEVICE_TYPE_PUSH] successBlock:nil]; +} + +- (void)addOutcomeWithValue:(NSString * _Nonnull)name value:(NSNumber * _Nonnull)value { + if (![self isValidOutcomeEntry:name] || ![self isValidOutcomeValue:value]) { + return; + } + + [self sendOutcomeEventWithValue:name value:value appId:[OneSignalConfigManager getAppId] deviceType:[NSNumber numberWithInt:DEVICE_TYPE_PUSH] successBlock:nil]; +} + +- (void)addUniqueOutcome:(NSString * _Nonnull)name { + if (![self isValidOutcomeEntry:name]) { + return; + } + + [self sendUniqueOutcomeEvent:name appId:[OneSignalConfigManager getAppId] deviceType:[NSNumber numberWithInt:DEVICE_TYPE_PUSH] successBlock:nil]; +} + +- (BOOL)isValidOutcomeEntry:(NSString * _Nonnull)name { + if (!name || [name length] == 0) { + [OneSignalLog onesignalLog:ONE_S_LL_ERROR message:@"Outcome name must not be null or empty"]; + return false; + } + + return true; +} + +- (BOOL)isValidOutcomeValue:(NSNumber *)value { + if (!value || value.intValue <= 0) { + [OneSignalLog onesignalLog:ONE_S_LL_ERROR message:@"Outcome value must not be null or 0"]; + return false; + } + + return true; +} + @end diff --git a/iOS_SDK/OneSignalSDK/OneSignalUser/OneSignalUser.docc/OneSignalUser.md b/iOS_SDK/OneSignalSDK/OneSignalUser/OneSignalUser.docc/OneSignalUser.md new file mode 100755 index 000000000..d7ba5a8f4 --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignalUser/OneSignalUser.docc/OneSignalUser.md @@ -0,0 +1,13 @@ +# ``OneSignalUser`` + +Summary + +## Overview + +Text + +## Topics + +### Group + +- ``Symbol`` \ No newline at end of file diff --git a/iOS_SDK/OneSignalSDK/OneSignalUser/Source/OSIdentityModel.swift b/iOS_SDK/OneSignalSDK/OneSignalUser/Source/OSIdentityModel.swift new file mode 100644 index 000000000..af2139327 --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignalUser/Source/OSIdentityModel.swift @@ -0,0 +1,105 @@ +/* + Modified MIT License + + Copyright 2022 OneSignal + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + 1. The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + 2. All copies of substantial portions of the Software may only be used in connection + with services provided by OneSignal. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + */ + +import Foundation +import OneSignalCore +import OneSignalOSCore + +class OSIdentityModel: OSModel { + var onesignalId: String? { + return aliases[OS_ONESIGNAL_ID] + } + + var externalId: String? { + return aliases[OS_EXTERNAL_ID] + } + + var aliases: [String: String] = [:] + + // TODO: We need to make this token secure + public var jwtBearerToken: String? + + // MARK: - Initialization + + // Initialize with aliases, if any + init(aliases: [String: String]?, changeNotifier: OSEventProducer) { + super.init(changeNotifier: changeNotifier) + self.aliases = aliases ?? [:] + } + + override func encode(with coder: NSCoder) { + super.encode(with: coder) + coder.encode(aliases, forKey: "aliases") + } + + required init?(coder: NSCoder) { + super.init(coder: coder) + guard let aliases = coder.decodeObject(forKey: "aliases") as? [String: String] else { + // log error + return nil + } + self.aliases = aliases + } + + /** + Called to clear the model's data in preparation for hydration via a fetch user call. + */ + func clearData() { + self.aliases = [:] + } + + // MARK: - Alias Methods + + func addAliases(_ aliases: [String: String]) { + for (label, id) in aliases { + self.aliases[label] = id + } + self.set(property: "aliases", newValue: aliases) + } + + func removeAliases(_ labels: [String]) { + for label in labels { + self.aliases.removeValue(forKey: label) + self.set(property: "aliases", newValue: [label: ""]) + } + } + + public override func hydrateModel(_ response: [String: Any]) { + OneSignalLog.onesignalLog(.LL_VERBOSE, message: "OSIdentityModel hydrateModel()") + for property in response { + switch property.key { + case "external_id": + aliases[OS_EXTERNAL_ID] = property.value as? String + case "onesignal_id": + aliases[OS_ONESIGNAL_ID] = property.value as? String + default: + aliases[property.key] = property.value as? String + } + self.set(property: "aliases", newValue: aliases) + } + } +} diff --git a/iOS_SDK/OneSignalSDK/OneSignalUser/Source/OSIdentityModelStoreListener.swift b/iOS_SDK/OneSignalSDK/OneSignalUser/Source/OSIdentityModelStoreListener.swift new file mode 100644 index 000000000..359050d20 --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignalUser/Source/OSIdentityModelStoreListener.swift @@ -0,0 +1,68 @@ +/* + Modified MIT License + + Copyright 2022 OneSignal + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + 1. The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + 2. All copies of substantial portions of the Software may only be used in connection + with services provided by OneSignal. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + */ + +import Foundation +import OneSignalCore +import OneSignalOSCore + +class OSIdentityModelStoreListener: OSModelStoreListener { + var store: OSModelStore + + required init(store: OSModelStore) { + self.store = store + } + + func getAddModelDelta(_ model: OSIdentityModel) -> OSDelta? { + return nil + } + + func getRemoveModelDelta(_ model: OSIdentityModel) -> OSDelta? { + return nil + } + + /** + Determines if this update is adding aliases or removing aliases. + */ + func getUpdateModelDelta(_ args: OSModelChangedArgs) -> OSDelta? { + // TODO: Let users call addAliases with "" IDs? If so, this will change... + guard + let aliasesDict = args.newValue as? [String: String], + let (_, id) = aliasesDict.first + else { + // Log error + return nil + } + let name = ( id == "" ) ? OS_REMOVE_ALIAS_DELTA : OS_ADD_ALIAS_DELTA + + return OSDelta( + name: name, + model: args.model, + property: args.property, + value: args.newValue + ) + } +} diff --git a/iOS_SDK/OneSignalSDK/OneSignalUser/Source/OSIdentityOperationExecutor.swift b/iOS_SDK/OneSignalSDK/OneSignalUser/Source/OSIdentityOperationExecutor.swift new file mode 100644 index 000000000..c49ef5c7b --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignalUser/Source/OSIdentityOperationExecutor.swift @@ -0,0 +1,262 @@ +/* + Modified MIT License + + Copyright 2022 OneSignal + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + 1. The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + 2. All copies of substantial portions of the Software may only be used in connection + with services provided by OneSignal. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + */ + +import OneSignalOSCore +import OneSignalCore + +class OSIdentityOperationExecutor: OSOperationExecutor { + var supportedDeltas: [String] = [OS_ADD_ALIAS_DELTA, OS_REMOVE_ALIAS_DELTA] + var deltaQueue: [OSDelta] = [] + // To simplify uncaching, we maintain separate request queues for each type + var addRequestQueue: [OSRequestAddAliases] = [] + var removeRequestQueue: [OSRequestRemoveAlias] = [] + + init() { + // Read unfinished deltas from cache, if any... + if var deltaQueue = OneSignalUserDefaults.initShared().getSavedCodeableData(forKey: OS_IDENTITY_EXECUTOR_DELTA_QUEUE_KEY, defaultValue: []) as? [OSDelta] { + // Hook each uncached Delta to the model in the store + for (index, delta) in deltaQueue.enumerated().reversed() { + if let modelInStore = OneSignalUserManagerImpl.sharedInstance.identityModelStore.getModel(modelId: delta.model.modelId) { + // The model exists in the store, set it to be the Delta's model + delta.model = modelInStore + } else { + // The model does not exist, drop this Delta + deltaQueue.remove(at: index) + } + } + self.deltaQueue = deltaQueue + } else { + OneSignalLog.onesignalLog(.LL_ERROR, message: "OSIdentityOperationExecutor error encountered reading from cache for \(OS_IDENTITY_EXECUTOR_DELTA_QUEUE_KEY)") + } + + // Read unfinished requests from cache, if any... + + if var addRequestQueue = OneSignalUserDefaults.initShared().getSavedCodeableData(forKey: OS_IDENTITY_EXECUTOR_ADD_REQUEST_QUEUE_KEY, defaultValue: []) as? [OSRequestAddAliases] { + // Hook each uncached Request to the model in the store + for (index, request) in addRequestQueue.enumerated().reversed() { + if let identityModel = OneSignalUserManagerImpl.sharedInstance.identityModelStore.getModel(modelId: request.identityModel.modelId) { + // 1. The model exists in the store, so set it to be the Request's models + request.identityModel = identityModel + } else if let identityModel = OSUserExecutor.identityModels[request.identityModel.modelId] { + // 2. The model exists in the user executor + request.identityModel = identityModel + } else if !request.prepareForExecution() { + // 3. The models do not exist AND this request cannot be sent, drop this Request + addRequestQueue.remove(at: index) + } + } + self.addRequestQueue = addRequestQueue + } else { + OneSignalLog.onesignalLog(.LL_ERROR, message: "OSIdentityOperationExecutor error encountered reading from cache for \(OS_IDENTITY_EXECUTOR_ADD_REQUEST_QUEUE_KEY)") + } + + if var removeRequestQueue = OneSignalUserDefaults.initShared().getSavedCodeableData(forKey: OS_IDENTITY_EXECUTOR_REMOVE_REQUEST_QUEUE_KEY, defaultValue: []) as? [OSRequestRemoveAlias] { + // Hook each uncached Request to the model in the store + for (index, request) in removeRequestQueue.enumerated().reversed() { + if let identityModel = OneSignalUserManagerImpl.sharedInstance.identityModelStore.getModel(modelId: request.identityModel.modelId) { + // 1. The model exists in the store, so set it to be the Request's model + request.identityModel = identityModel + } else if let identityModel = OSUserExecutor.identityModels[request.identityModel.modelId] { + // 2. The model exists in the user executor + request.identityModel = identityModel + } else if !request.prepareForExecution() { + // 3. The model does not exist AND this request cannot be sent, drop this Request + removeRequestQueue.remove(at: index) + } + } + self.removeRequestQueue = removeRequestQueue + } else { + OneSignalLog.onesignalLog(.LL_ERROR, message: "OSIdentityOperationExecutor error encountered reading from cache for \(OS_IDENTITY_EXECUTOR_REMOVE_REQUEST_QUEUE_KEY)") + } + } + + func enqueueDelta(_ delta: OSDelta) { + OneSignalLog.onesignalLog(.LL_VERBOSE, message: "OSIdentityOperationExecutor enqueueDelta: \(delta)") + deltaQueue.append(delta) + } + + func cacheDeltaQueue() { + OneSignalUserDefaults.initShared().saveCodeableData(forKey: OS_IDENTITY_EXECUTOR_DELTA_QUEUE_KEY, withValue: self.deltaQueue) + } + + func processDeltaQueue(inBackground: Bool) { + if !deltaQueue.isEmpty { + OneSignalLog.onesignalLog(.LL_VERBOSE, message: "OSIdentityOperationExecutor processDeltaQueue with queue: \(deltaQueue)") + } + for delta in deltaQueue { + guard let model = delta.model as? OSIdentityModel, + let aliases = delta.value as? [String: String] + else { + // Log error + continue + } + + switch delta.name { + case OS_ADD_ALIAS_DELTA: + let request = OSRequestAddAliases(aliases: aliases, identityModel: model) + addRequestQueue.append(request) + + case OS_REMOVE_ALIAS_DELTA: + if let label = aliases.first?.key { + let request = OSRequestRemoveAlias(labelToRemove: label, identityModel: model) + removeRequestQueue.append(request) + } + + default: + OneSignalLog.onesignalLog(.LL_DEBUG, message: "OSIdentityOperationExecutor met incompatible OSDelta type: \(delta)") + } + } + + self.deltaQueue = [] // TODO: Check that we can simply clear all the deltas in the deltaQueue + + // persist executor's requests (including new request) to storage + OneSignalUserDefaults.initShared().saveCodeableData(forKey: OS_IDENTITY_EXECUTOR_ADD_REQUEST_QUEUE_KEY, withValue: self.addRequestQueue) + OneSignalUserDefaults.initShared().saveCodeableData(forKey: OS_IDENTITY_EXECUTOR_REMOVE_REQUEST_QUEUE_KEY, withValue: self.removeRequestQueue) + + OneSignalUserDefaults.initShared().saveCodeableData(forKey: OS_IDENTITY_EXECUTOR_DELTA_QUEUE_KEY, withValue: self.deltaQueue) // This should be empty, can remove instead? + + processRequestQueue(inBackground: inBackground) + } + + func processRequestQueue(inBackground: Bool) { + let requestQueue: [OneSignalRequest] = addRequestQueue + removeRequestQueue + + if requestQueue.isEmpty { + return + } + + // Sort the requestQueue by timestamp + for request in requestQueue.sorted(by: { first, second in + return first.timestamp < second.timestamp + }) { + if request.isKind(of: OSRequestAddAliases.self), let addAliasesRequest = request as? OSRequestAddAliases { + executeAddAliasesRequest(addAliasesRequest, inBackground: inBackground) + } else if request.isKind(of: OSRequestRemoveAlias.self), let removeAliasRequest = request as? OSRequestRemoveAlias { + executeRemoveAliasRequest(removeAliasRequest, inBackground: inBackground) + } else { + OneSignalLog.onesignalLog(.LL_DEBUG, message: "OSIdentityOperationExecutor.processRequestQueue met incompatible OneSignalRequest type: \(request).") + } + } + } + + func executeAddAliasesRequest(_ request: OSRequestAddAliases, inBackground: Bool) { + guard !request.sentToClient else { + return + } + guard request.prepareForExecution() else { + return + } + request.sentToClient = true + + OneSignalLog.onesignalLog(.LL_VERBOSE, message: "OSIdentityOperationExecutor: executeAddAliasesRequest making request: \(request)") + + let backgroundTaskIdentifier = IDENTITY_EXECUTOR_BACKGROUND_TASK + UUID().uuidString + if (inBackground) { + OSBackgroundTaskManager.beginBackgroundTask(backgroundTaskIdentifier) + } + + OneSignalClient.shared().execute(request) { _ in + // No hydration from response + // On success, remove request from cache + self.addRequestQueue.removeAll(where: { $0 == request}) + OneSignalUserDefaults.initShared().saveCodeableData(forKey: OS_IDENTITY_EXECUTOR_ADD_REQUEST_QUEUE_KEY, withValue: self.addRequestQueue) + if (inBackground) { + OSBackgroundTaskManager.endBackgroundTask(backgroundTaskIdentifier) + } + } onFailure: { error in + OneSignalLog.onesignalLog(.LL_ERROR, message: "OSIdentityOperationExecutor add aliases request failed with error: \(error.debugDescription)") + if let nsError = error as? NSError { + let responseType = OSNetworkingUtils.getResponseStatusType(nsError.code) + if responseType == .missing { + // Remove from cache and queue + self.addRequestQueue.removeAll(where: { $0 == request}) + OneSignalUserDefaults.initShared().saveCodeableData(forKey: OS_IDENTITY_EXECUTOR_ADD_REQUEST_QUEUE_KEY, withValue: self.addRequestQueue) + // Logout if the user in the SDK is the same + guard OneSignalUserManagerImpl.sharedInstance.isCurrentUser(request.identityModel) + else { + if (inBackground) { + OSBackgroundTaskManager.endBackgroundTask(backgroundTaskIdentifier) + } + return + } + // The subscription has been deleted along with the user, so remove the subscription_id but keep the same push subscription model + OneSignalUserManagerImpl.sharedInstance.pushSubscriptionModel?.subscriptionId = nil + OneSignalUserManagerImpl.sharedInstance._logout() + } else if responseType != .retryable { + // Fail, no retry, remove from cache and queue + self.addRequestQueue.removeAll(where: { $0 == request}) + OneSignalUserDefaults.initShared().saveCodeableData(forKey: OS_IDENTITY_EXECUTOR_ADD_REQUEST_QUEUE_KEY, withValue: self.addRequestQueue) + } + } + if (inBackground) { + OSBackgroundTaskManager.endBackgroundTask(backgroundTaskIdentifier) + } + } + } + + func executeRemoveAliasRequest(_ request: OSRequestRemoveAlias, inBackground: Bool) { + guard !request.sentToClient else { + return + } + guard request.prepareForExecution() else { + return + } + request.sentToClient = true + + OneSignalLog.onesignalLog(.LL_VERBOSE, message: "OSIdentityOperationExecutor: executeRemoveAliasRequest making request: \(request)") + + let backgroundTaskIdentifier = IDENTITY_EXECUTOR_BACKGROUND_TASK + UUID().uuidString + if (inBackground) { + OSBackgroundTaskManager.beginBackgroundTask(backgroundTaskIdentifier) + } + + OneSignalClient.shared().execute(request) { _ in + // There is nothing to hydrate + // On success, remove request from cache + self.removeRequestQueue.removeAll(where: { $0 == request}) + OneSignalUserDefaults.initShared().saveCodeableData(forKey: OS_IDENTITY_EXECUTOR_REMOVE_REQUEST_QUEUE_KEY, withValue: self.removeRequestQueue) + if (inBackground) { + OSBackgroundTaskManager.endBackgroundTask(backgroundTaskIdentifier) + } + } onFailure: { error in + OneSignalLog.onesignalLog(.LL_ERROR, message: "OSIdentityOperationExecutor remove alias request failed with error: \(error.debugDescription)") + + if let nsError = error as? NSError { + let responseType = OSNetworkingUtils.getResponseStatusType(nsError.code) + if responseType != .retryable { + // Fail, no retry, remove from cache and queue + // A response of .missing could mean the alias doesn't exist on this user OR this user has been deleted + self.removeRequestQueue.removeAll(where: { $0 == request}) + OneSignalUserDefaults.initShared().saveCodeableData(forKey: OS_IDENTITY_EXECUTOR_REMOVE_REQUEST_QUEUE_KEY, withValue: self.removeRequestQueue) + } + } + if (inBackground) { + OSBackgroundTaskManager.endBackgroundTask(backgroundTaskIdentifier) + } + } + } +} diff --git a/iOS_SDK/OneSignalSDK/OneSignalUser/Source/OSPropertiesModel.swift b/iOS_SDK/OneSignalSDK/OneSignalUser/Source/OSPropertiesModel.swift new file mode 100644 index 000000000..ce35d9eb2 --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignalUser/Source/OSPropertiesModel.swift @@ -0,0 +1,160 @@ +/* + Modified MIT License + + Copyright 2022 OneSignal + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + 1. The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + 2. All copies of substantial portions of the Software may only be used in connection + with services provided by OneSignal. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + */ + +import Foundation +import OneSignalOSCore +import OneSignalCore + +struct OSPropertiesDeltas { + let sessionTime: NSNumber? + let sessionCount: NSNumber? + let amountSpent: NSNumber? + let purchases: [[String: AnyObject]]? + + func jsonRepresentation() -> [String: Any] { + var deltas = [String: Any]() + deltas["session_count"] = sessionCount + deltas["session_time"] = sessionTime?.intValue // server expects an int + deltas["amountSpent"] = amountSpent + deltas["purchases"] = purchases + return deltas + } +} + +// Both lat and long must exist to be accepted by the server +class OSLocationPoint: NSObject, NSCoding { + let lat: Float + let long: Float + + init(lat: Float, long: Float) { + self.lat = lat + self.long = long + } + + public func encode(with coder: NSCoder) { + coder.encode(lat, forKey: "lat") + coder.encode(long, forKey: "long") + } + + public required init?(coder: NSCoder) { + self.lat = coder.decodeFloat(forKey: "lat") + self.long = coder.decodeFloat(forKey: "long") + } +} + +class OSPropertiesModel: OSModel { + var language: String? { + didSet { + self.set(property: "language", newValue: language) + } + } + + var location: OSLocationPoint? { + didSet { + self.set(property: "location", newValue: location) + } + } + + var timezoneId = TimeZone.current.identifier + + var tags: [String: String] = [:] + + // MARK: - Initialization + + // We seem to lose access to this init() in superclass after adding init?(coder: NSCoder) + override init(changeNotifier: OSEventProducer) { + super.init(changeNotifier: changeNotifier) + self.language = getPreferredLanguage() + } + + private func getPreferredLanguage() -> String { + let preferredLanguages = NSLocale.preferredLanguages + if !preferredLanguages.isEmpty { + return preferredLanguages[0] + } else { + return DEFAULT_LANGUAGE + } + } + + override func encode(with coder: NSCoder) { + super.encode(with: coder) + coder.encode(language, forKey: "language") + coder.encode(tags, forKey: "tags") + // ... and more + } + + required init?(coder: NSCoder) { + super.init(coder: coder) + language = coder.decodeObject(forKey: "language") as? String + guard let tags = coder.decodeObject(forKey: "tags") as? [String: String] else { + // log error + return + } + self.tags = tags + + // ... and more + } + + /** + Called to clear the model's data in preparation for hydration via a fetch user call. + */ + func clearData() { + // TODO: What about language, lat, long? + self.tags = [:] + } + + // MARK: - Tag Methods + + func addTags(_ tags: [String: String]) { + for (key, value) in tags { + self.tags[key] = value + } + self.set(property: "tags", newValue: tags) + } + + func removeTags(_ tags: [String]) { + var tagsToSend: [String: String] = [:] + for tag in tags { + self.tags.removeValue(forKey: tag) + tagsToSend[tag] = "" + } + self.set(property: "tags", newValue: tagsToSend) + } + + public override func hydrateModel(_ response: [String: Any]) { + for property in response { + switch property.key { + case "language": + self.language = property.value as? String + case "tags": + self.tags = property.value as? [String: String] ?? [:] + default: + OneSignalLog.onesignalLog(.LL_DEBUG, message: "Not hydrating properties model for property: \(property)") + } + } + } +} diff --git a/iOS_SDK/OneSignalSDK/OneSignalUser/Source/OSPropertiesModelStoreListener.swift b/iOS_SDK/OneSignalSDK/OneSignalUser/Source/OSPropertiesModelStoreListener.swift new file mode 100644 index 000000000..8d4ef768b --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignalUser/Source/OSPropertiesModelStoreListener.swift @@ -0,0 +1,55 @@ +/* + Modified MIT License + + Copyright 2022 OneSignal + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + 1. The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + 2. All copies of substantial portions of the Software may only be used in connection + with services provided by OneSignal. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + */ + +import Foundation +import OneSignalCore +import OneSignalOSCore + +class OSPropertiesModelStoreListener: OSModelStoreListener { + var store: OSModelStore + + required init(store: OSModelStore) { + self.store = store + } + + func getAddModelDelta(_ model: OSPropertiesModel) -> OSDelta? { + return nil + } + + func getRemoveModelDelta(_ model: OSPropertiesModel) -> OSDelta? { + return nil + } + + func getUpdateModelDelta(_ args: OSModelChangedArgs) -> OSDelta? { + return OSDelta( + name: OS_UPDATE_PROPERTIES_DELTA, + model: args.model, + property: args.property, + value: args.newValue + ) + } +} diff --git a/iOS_SDK/OneSignalSDK/OneSignalUser/Source/OSPropertyOperationExecutor.swift b/iOS_SDK/OneSignalSDK/OneSignalUser/Source/OSPropertyOperationExecutor.swift new file mode 100644 index 000000000..3c3e5b2b9 --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignalUser/Source/OSPropertyOperationExecutor.swift @@ -0,0 +1,208 @@ +/* + Modified MIT License + + Copyright 2022 OneSignal + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + 1. The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + 2. All copies of substantial portions of the Software may only be used in connection + with services provided by OneSignal. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + */ + +import OneSignalOSCore +import OneSignalCore + +class OSPropertyOperationExecutor: OSOperationExecutor { + var supportedDeltas: [String] = [OS_UPDATE_PROPERTIES_DELTA] + var deltaQueue: [OSDelta] = [] + var updateRequestQueue: [OSRequestUpdateProperties] = [] + + init() { + // Read unfinished deltas from cache, if any... + // Note that we should only have deltas for the current user as old ones are flushed.. + if var deltaQueue = OneSignalUserDefaults.initShared().getSavedCodeableData(forKey: OS_PROPERTIES_EXECUTOR_DELTA_QUEUE_KEY, defaultValue: []) as? [OSDelta] { + // Hook each uncached Delta to the model in the store + for (index, delta) in deltaQueue.enumerated().reversed() { + if let modelInStore = OneSignalUserManagerImpl.sharedInstance.propertiesModelStore.getModel(modelId: delta.model.modelId) { + // 1. The model exists in the properties model store, set it to be the Delta's model + delta.model = modelInStore + } else { + // 2. The model does not exist, drop this Delta + deltaQueue.remove(at: index) + } + } + self.deltaQueue = deltaQueue + } else { + OneSignalLog.onesignalLog(.LL_ERROR, message: "OSPropertyOperationExecutor error encountered reading from cache for \(OS_PROPERTIES_EXECUTOR_DELTA_QUEUE_KEY)") + } + + // Read unfinished requests from cache, if any... + if var updateRequestQueue = OneSignalUserDefaults.initShared().getSavedCodeableData(forKey: OS_PROPERTIES_EXECUTOR_UPDATE_REQUEST_QUEUE_KEY, defaultValue: []) as? [OSRequestUpdateProperties] { + // Hook each uncached Request to the model in the store + for (index, request) in updateRequestQueue.enumerated().reversed() { + // 0. Hook up the properties model if its the current user's so it can hydrate + if let propertiesModel = OneSignalUserManagerImpl.sharedInstance.propertiesModelStore.getModel(modelId: request.modelToUpdate.modelId) { + request.modelToUpdate = propertiesModel + } + if let identityModel = OneSignalUserManagerImpl.sharedInstance.identityModelStore.getModel(modelId: request.identityModel.modelId) { + // 1. The identity model exist in the store, set it to be the Request's models + request.identityModel = identityModel + } else if let identityModel = OSUserExecutor.identityModels[request.identityModel.modelId] { + // 2. The model exists in the user executor + request.identityModel = identityModel + } else if !request.prepareForExecution() { + // 3. The identitymodel do not exist AND this request cannot be sent, drop this Request + updateRequestQueue.remove(at: index) + } + } + self.updateRequestQueue = updateRequestQueue + } else { + OneSignalLog.onesignalLog(.LL_ERROR, message: "OSPropertyOperationExecutor error encountered reading from cache for \(OS_PROPERTIES_EXECUTOR_UPDATE_REQUEST_QUEUE_KEY)") + } + } + + func enqueueDelta(_ delta: OSDelta) { + OneSignalLog.onesignalLog(.LL_VERBOSE, message: "OSPropertyOperationExecutor enqueue delta\(delta)") + deltaQueue.append(delta) + } + + func cacheDeltaQueue() { + OneSignalUserDefaults.initShared().saveCodeableData(forKey: OS_PROPERTIES_EXECUTOR_DELTA_QUEUE_KEY, withValue: self.deltaQueue) + } + + func processDeltaQueue(inBackground: Bool) { + if !deltaQueue.isEmpty { + OneSignalLog.onesignalLog(.LL_VERBOSE, message: "OSPropertyOperationExecutor processDeltaQueue with queue: \(deltaQueue)") + } + for delta in deltaQueue { + guard let model = delta.model as? OSPropertiesModel else { + // Log error + continue + } + + let request = OSRequestUpdateProperties( + properties: [delta.property: delta.value], + deltas: nil, + refreshDeviceMetadata: false, // Sort this out. + modelToUpdate: model, + identityModel: OneSignalUserManagerImpl.sharedInstance.user.identityModel // TODO: Make sure this is ok + ) + updateRequestQueue.append(request) + } + self.deltaQueue = [] // TODO: Check that we can simply clear all the deltas in the deltaQueue + + // persist executor's requests (including new request) to storage + OneSignalUserDefaults.initShared().saveCodeableData(forKey: OS_PROPERTIES_EXECUTOR_UPDATE_REQUEST_QUEUE_KEY, withValue: self.updateRequestQueue) + + OneSignalUserDefaults.initShared().saveCodeableData(forKey: OS_PROPERTIES_EXECUTOR_DELTA_QUEUE_KEY, withValue: self.deltaQueue) // This should be empty, can remove instead? + processRequestQueue(inBackground: inBackground) + } + + func processRequestQueue(inBackground: Bool) { + if updateRequestQueue.isEmpty { + return + } + + for request in updateRequestQueue { + executeUpdatePropertiesRequest(request, inBackground: inBackground) + } + } + + func executeUpdatePropertiesRequest(_ request: OSRequestUpdateProperties, inBackground: Bool) { + guard !request.sentToClient else { + return + } + guard request.prepareForExecution() else { + return + } + request.sentToClient = true + + let backgroundTaskIdentifier = PROPERTIES_EXECUTOR_BACKGROUND_TASK + UUID().uuidString + if (inBackground) { + OSBackgroundTaskManager.beginBackgroundTask(backgroundTaskIdentifier) + } + + OneSignalClient.shared().execute(request) { _ in + // On success, remove request from cache, and we do need to hydrate + // TODO: We need to hydrate after all ? What why ? + self.updateRequestQueue.removeAll(where: { $0 == request}) + OneSignalUserDefaults.initShared().saveCodeableData(forKey: OS_PROPERTIES_EXECUTOR_UPDATE_REQUEST_QUEUE_KEY, withValue: self.updateRequestQueue) + if (inBackground) { + OSBackgroundTaskManager.endBackgroundTask(backgroundTaskIdentifier) + } + } onFailure: { error in + OneSignalLog.onesignalLog(.LL_ERROR, message: "OSPropertyOperationExecutor update properties request failed with error: \(error.debugDescription)") + if let nsError = error as? NSError { + let responseType = OSNetworkingUtils.getResponseStatusType(nsError.code) + if responseType == .missing { + // remove from cache and queue + self.updateRequestQueue.removeAll(where: { $0 == request}) + OneSignalUserDefaults.initShared().saveCodeableData(forKey: OS_PROPERTIES_EXECUTOR_UPDATE_REQUEST_QUEUE_KEY, withValue: self.updateRequestQueue) + // Logout if the user in the SDK is the same + guard OneSignalUserManagerImpl.sharedInstance.isCurrentUser(request.identityModel) + else { + if (inBackground) { + OSBackgroundTaskManager.endBackgroundTask(backgroundTaskIdentifier) + } + return + } + // The subscription has been deleted along with the user, so remove the subscription_id but keep the same push subscription model + OneSignalUserManagerImpl.sharedInstance.pushSubscriptionModel?.subscriptionId = nil + OneSignalUserManagerImpl.sharedInstance._logout() + } else if responseType != .retryable { + // Fail, no retry, remove from cache and queue + self.updateRequestQueue.removeAll(where: { $0 == request}) + OneSignalUserDefaults.initShared().saveCodeableData(forKey: OS_PROPERTIES_EXECUTOR_UPDATE_REQUEST_QUEUE_KEY, withValue: self.updateRequestQueue) + } + } + if (inBackground) { + OSBackgroundTaskManager.endBackgroundTask(backgroundTaskIdentifier) + } + } + } +} + +extension OSPropertyOperationExecutor { + // TODO: We can make this go through the operation repo + func updateProperties(propertiesDeltas: OSPropertiesDeltas, refreshDeviceMetadata: Bool, propertiesModel: OSPropertiesModel, identityModel: OSIdentityModel, sendImmediately: Bool = false, onSuccess: (() -> Void)? = nil, onFailure: (() -> Void)? = nil) { + + let request = OSRequestUpdateProperties( + properties: [:], + deltas: propertiesDeltas.jsonRepresentation(), + refreshDeviceMetadata: refreshDeviceMetadata, + modelToUpdate: propertiesModel, + identityModel: identityModel) + + if (sendImmediately) { + // Bypass the request queues + OneSignalClient.shared().execute(request) { _ in + if let onSuccess = onSuccess { + onSuccess() + } + } onFailure: { _ in + if let onFailure = onFailure { + onFailure() + } + } + } else { + updateRequestQueue.append(request) + OneSignalUserDefaults.initShared().saveCodeableData(forKey: OS_PROPERTIES_EXECUTOR_UPDATE_REQUEST_QUEUE_KEY, withValue: self.updateRequestQueue) + } + } +} diff --git a/iOS_SDK/OneSignalSDK/OneSignalUser/Source/OSSubscriptionModel.swift b/iOS_SDK/OneSignalSDK/OneSignalUser/Source/OSSubscriptionModel.swift new file mode 100644 index 000000000..046b61195 --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignalUser/Source/OSSubscriptionModel.swift @@ -0,0 +1,485 @@ +/* + Modified MIT License + + Copyright 2022 OneSignal + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + 1. The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + 2. All copies of substantial portions of the Software may only be used in connection + with services provided by OneSignal. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + */ + +import Foundation +import OneSignalCore +import OneSignalOSCore +import OneSignalNotifications + +// MARK: - Push Subscription Specific + +@objc public protocol OSPushSubscriptionObserver { // TODO: weak reference? + @objc func onPushSubscriptionDidChange(state: OSPushSubscriptionChangedState) +} + +@objc +public class OSPushSubscriptionState: NSObject { + @objc public let id: String? + @objc public let token: String? + @objc public let optedIn: Bool + + @objc public override var description: String { + return "" + } + + init(id: String?, token: String?, optedIn: Bool) { + self.id = id + self.token = token + self.optedIn = optedIn + } + + @objc public func jsonRepresentation() -> NSDictionary { + let id = self.id ?? "nil" + let token = self.token ?? "nil" + return [ + "id": id, + "token": token, + "optedIn": optedIn + ] + } + + func equals(_ state: OSPushSubscriptionState) -> Bool { + return self.id == state.id && self.token == state.token && self.optedIn == state.optedIn + } +} + +@objc +public class OSPushSubscriptionChangedState: NSObject { + @objc public let current: OSPushSubscriptionState + @objc public let previous: OSPushSubscriptionState + + @objc public override var description: String { + return "" + } + + init(current: OSPushSubscriptionState, previous: OSPushSubscriptionState) { + self.current = current + self.previous = previous + } + + @objc public func jsonRepresentation() -> NSDictionary { + return ["previous": previous.jsonRepresentation(), "current": current.jsonRepresentation()] + } +} + +// MARK: - Subscription Model + +enum OSSubscriptionType: String { + case push = "iOSPush" + case email = "Email" + case sms = "SMS" +} + +/** + Internal subscription model. + */ +class OSSubscriptionModel: OSModel { + var type: OSSubscriptionType + + var address: String? { // This is token on push subs so must remain Optional + didSet { + guard address != oldValue else { + return + } + self.set(property: "address", newValue: address) + + guard self.type == .push else { + return + } + + updateNotificationTypes() + + firePushSubscriptionChanged(.address(oldValue)) + } + } + + // Set via server response + var subscriptionId: String? { + didSet { + guard subscriptionId != oldValue else { + return + } + self.set(property: "subscriptionId", newValue: subscriptionId) + + guard self.type == .push else { + return + } + + // Cache the subscriptionId as it persists across users on the device?? + OneSignalUserDefaults.initShared().saveString(forKey: OSUD_PUSH_SUBSCRIPTION_ID, withValue: subscriptionId) + + firePushSubscriptionChanged(.subscriptionId(oldValue)) + } + } + + // Internal property to send to server, not meant for outside access + var enabled: Bool { // Does not consider subscription_id in the calculation + get { + return calculateIsEnabled(address: address, reachable: _reachable, isDisabled: _isDisabled) + } + } + + var optedIn: Bool { + // optedIn = permission + userPreference + get { + return calculateIsOptedIn(reachable: _reachable, isDisabled: _isDisabled) + } + } + + // Push Subscription Only + // Initialize to be -1, so not to deal with unwrapping every time, and simplifies caching + var notificationTypes = -1 { + didSet { + guard self.type == .push && notificationTypes != oldValue else { + return + } + + // If _isDisabled is set, this supersedes as the value to send to server. + if _isDisabled && notificationTypes != -2 { + notificationTypes = -2 + return + } + _reachable = notificationTypes > 0 + self.set(property: "notificationTypes", newValue: notificationTypes) + } + } + + // swiftlint:disable identifier_name + /** + This is set by the permission state changing. + Defaults to true for email & SMS, defaults to false for push. + Note that this property reflects the `reachable` property of a permission state. As provisional permission is considered to be `optedIn` and `enabled`. + */ + var _reachable: Bool { + didSet { + guard self.type == .push && _reachable != oldValue else { + return + } + firePushSubscriptionChanged(.reachable(oldValue)) + } + } + + // Set by the app developer when they call User.pushSubscription.optOut() + var _isDisabled: Bool { // Default to false for all subscriptions + didSet { + guard self.type == .push && _isDisabled != oldValue else { + return + } + firePushSubscriptionChanged(.isDisabled(oldValue)) + notificationTypes = -2 + } + } + + // Properties for push subscription + var testType: Int? { + didSet { + guard testType != oldValue else { + return + } + self.set(property: "testType", newValue: testType) + } + } + + var deviceOs = UIDevice.current.systemVersion { + didSet { + guard deviceOs != oldValue else { + return + } + self.set(property: "deviceOs", newValue: deviceOs) + } + } + + var sdk = ONESIGNAL_VERSION { + didSet { + guard sdk != oldValue else { + return + } + self.set(property: "sdk", newValue: sdk) + } + } + + var deviceModel: String? = OSDeviceUtils.getDeviceVariant() { + didSet { + guard deviceModel != oldValue else { + return + } + self.set(property: "deviceModel", newValue: deviceModel) + } + } + + var appVersion: String? = Bundle.main.infoDictionary?["CFBundleShortVersionString"] as? String { + didSet { + guard appVersion != oldValue else { + return + } + self.set(property: "appVersion", newValue: appVersion) + } + } + + var netType: Int? = OSNetworkingUtils.getNetType() as? Int { + didSet { + guard netType != oldValue else { + return + } + self.set(property: "netType", newValue: netType) + } + } + + // When a Subscription is initialized, it may not have a subscriptionId until a request to the backend is made. + init(type: OSSubscriptionType, + address: String?, + subscriptionId: String?, + reachable: Bool, + isDisabled: Bool, + changeNotifier: OSEventProducer) { + self.type = type + self.address = address + self.subscriptionId = subscriptionId + _reachable = reachable + _isDisabled = isDisabled + + // Set test_type if subscription model is PUSH, and update notificationTypes + if type == .push { + let releaseMode: OSUIApplicationReleaseMode = OneSignalMobileProvision.releaseMode() + #if targetEnvironment(simulator) + if (releaseMode == OSUIApplicationReleaseMode.UIApplicationReleaseUnknown) { + self.testType = OSUIApplicationReleaseMode.UIApplicationReleaseDev.rawValue + } + #endif + // Workaround to unsure how to extract the Int value in 1 step... + if releaseMode == .UIApplicationReleaseDev { + self.testType = OSUIApplicationReleaseMode.UIApplicationReleaseDev.rawValue + } + if releaseMode == .UIApplicationReleaseAdHoc { + self.testType = OSUIApplicationReleaseMode.UIApplicationReleaseAdHoc.rawValue + } + if releaseMode == .UIApplicationReleaseWildcard { + self.testType = OSUIApplicationReleaseMode.UIApplicationReleaseWildcard.rawValue + } + notificationTypes = Int(OSNotificationsManager.getNotificationTypes(_isDisabled)) + } + + super.init(changeNotifier: changeNotifier) + } + + override func encode(with coder: NSCoder) { + super.encode(with: coder) + coder.encode(type.rawValue, forKey: "type") // Encodes as String + coder.encode(address, forKey: "address") + coder.encode(subscriptionId, forKey: "subscriptionId") + coder.encode(_reachable, forKey: "_reachable") + coder.encode(_isDisabled, forKey: "_isDisabled") + coder.encode(notificationTypes, forKey: "notificationTypes") + coder.encode(testType, forKey: "testType") + coder.encode(deviceOs, forKey: "deviceOs") + coder.encode(sdk, forKey: "sdk") + coder.encode(deviceModel, forKey: "deviceModel") + coder.encode(appVersion, forKey: "appVersion") + coder.encode(netType, forKey: "netType") + } + + required init?(coder: NSCoder) { + guard + let rawType = coder.decodeObject(forKey: "type") as? String, + let type = OSSubscriptionType(rawValue: rawType) + else { + // Log error + return nil + } + self.type = type + self.address = coder.decodeObject(forKey: "address") as? String + self.subscriptionId = coder.decodeObject(forKey: "subscriptionId") as? String + self._reachable = coder.decodeBool(forKey: "_reachable") + self._isDisabled = coder.decodeBool(forKey: "_isDisabled") + self.notificationTypes = coder.decodeInteger(forKey: "notificationTypes") + self.testType = coder.decodeObject(forKey: "testType") as? Int + self.deviceOs = coder.decodeObject(forKey: "deviceOs") as? String ?? UIDevice.current.systemVersion + self.sdk = coder.decodeObject(forKey: "sdk") as? String ?? ONESIGNAL_VERSION + self.deviceModel = coder.decodeObject(forKey: "deviceModel") as? String + self.appVersion = coder.decodeObject(forKey: "appVersion") as? String + self.netType = coder.decodeObject(forKey: "netType") as? Int + + super.init(coder: coder) + } + + public override func hydrateModel(_ response: [String: Any]) { + OneSignalLog.onesignalLog(.LL_VERBOSE, message: "OSSubscriptionModel hydrateModel()") + for property in response { + switch property.key { + case "id": + self.subscriptionId = property.value as? String + case "type": + if let type = OSSubscriptionType(rawValue: property.value as? String ?? "") { + self.type = type + } + // case "token": + // TODO: For now, don't hydrate token + // self.address = property.value as? String + case "enabled": + if let enabled = property.value as? Bool { + if self.enabled != enabled { // TODO: Is this right? + _isDisabled = !enabled + } + } + case "notification_types": + if let notificationTypes = property.value as? Int { + self.notificationTypes = notificationTypes + } + default: + OneSignalLog.onesignalLog(.LL_DEBUG, message: "Unused property on subscription model") + } + } + } + + // Using snake_case so we can use this in request bodies + public func jsonRepresentation() -> [String: Any] { + var json: [String: Any] = [:] + json["id"] = self.subscriptionId + json["type"] = self.type.rawValue + json["token"] = self.address + json["enabled"] = self.enabled + json["test_type"] = self.testType + json["device_os"] = self.deviceOs + json["sdk"] = self.sdk + json["device_model"] = self.deviceModel + json["app_version"] = self.appVersion + json["net_type"] = self.netType + // notificationTypes defaults to -1 instead of nil, don't send if it's -1 + if self.notificationTypes != -1 { + json["notification_types"] = self.notificationTypes + } + return json + } +} + +// Push Subscription related +extension OSSubscriptionModel { + // Only used for the push subscription model + var currentPushSubscriptionState: OSPushSubscriptionState { + return OSPushSubscriptionState(id: self.subscriptionId, + token: self.address, + optedIn: self.optedIn + ) + } + + // Calculates if the device is opted in to push notification. + // Must have permission and not be opted out. + func calculateIsOptedIn(reachable: Bool, isDisabled: Bool) -> Bool { + return reachable && !isDisabled + } + + // Calculates if push notifications are enabled on the device. + // Does not consider the existence of the subscription_id, as we send this in the request to create a push subscription. + func calculateIsEnabled(address: String?, reachable: Bool, isDisabled: Bool) -> Bool { + return address != nil && reachable && !isDisabled + } + + func updateNotificationTypes() { + notificationTypes = Int(OSNotificationsManager.getNotificationTypes(_isDisabled)) + } + + func updateTestType() { + let releaseMode: OSUIApplicationReleaseMode = OneSignalMobileProvision.releaseMode() + // Workaround to unsure how to extract the Int value in 1 step... + if releaseMode == .UIApplicationReleaseDev { + self.testType = OSUIApplicationReleaseMode.UIApplicationReleaseDev.rawValue + } + if releaseMode == .UIApplicationReleaseAdHoc { + self.testType = OSUIApplicationReleaseMode.UIApplicationReleaseAdHoc.rawValue + } + if releaseMode == .UIApplicationReleaseWildcard { + self.testType = OSUIApplicationReleaseMode.UIApplicationReleaseWildcard.rawValue + } + } + + func update() { + updateTestType() + deviceOs = UIDevice.current.systemVersion + sdk = ONESIGNAL_VERSION + deviceModel = OSDeviceUtils.getDeviceVariant() + appVersion = Bundle.main.infoDictionary?["CFBundleShortVersionString"] as? String + netType = OSNetworkingUtils.getNetType() as? Int + // sdkType ?? + // isRooted ?? + } + + enum OSPushPropertyChanged { + case subscriptionId(String?) + case reachable(Bool) + case isDisabled(Bool) + case address(String?) + } + + func firePushSubscriptionChanged(_ changedProperty: OSPushPropertyChanged) { + var prevIsOptedIn = true + var prevIsEnabled = true + var prevSubscriptionState = OSPushSubscriptionState(id: "", token: "", optedIn: true) + + switch changedProperty { + case .subscriptionId(let oldValue): + prevIsEnabled = calculateIsEnabled(address: address, reachable: _reachable, isDisabled: _isDisabled) + prevIsOptedIn = calculateIsOptedIn(reachable: _reachable, isDisabled: _isDisabled) + prevSubscriptionState = OSPushSubscriptionState(id: oldValue, token: address, optedIn: prevIsOptedIn) + + case .reachable(let oldValue): + prevIsEnabled = calculateIsEnabled(address: address, reachable: oldValue, isDisabled: _isDisabled) + prevIsOptedIn = calculateIsOptedIn(reachable: oldValue, isDisabled: _isDisabled) + prevSubscriptionState = OSPushSubscriptionState(id: subscriptionId, token: address, optedIn: prevIsOptedIn) + + case .isDisabled(let oldValue): + prevIsEnabled = calculateIsEnabled(address: address, reachable: _reachable, isDisabled: oldValue) + prevIsOptedIn = calculateIsOptedIn(reachable: _reachable, isDisabled: oldValue) + prevSubscriptionState = OSPushSubscriptionState(id: subscriptionId, token: address, optedIn: prevIsOptedIn) + + case .address(let oldValue): + prevIsEnabled = calculateIsEnabled(address: oldValue, reachable: _reachable, isDisabled: _isDisabled) + prevIsOptedIn = calculateIsOptedIn(reachable: _reachable, isDisabled: _isDisabled) + prevSubscriptionState = OSPushSubscriptionState(id: subscriptionId, token: oldValue, optedIn: prevIsOptedIn) + } + + let newIsOptedIn = calculateIsOptedIn(reachable: _reachable, isDisabled: _isDisabled) + + let newIsEnabled = calculateIsEnabled(address: address, reachable: _reachable, isDisabled: _isDisabled) + + if prevIsEnabled != newIsEnabled { + self.set(property: "enabled", newValue: newIsEnabled) + } + + let newSubscriptionState = OSPushSubscriptionState(id: subscriptionId, token: address, optedIn: newIsOptedIn) + + // TODO: Make this method less hacky, this is a final check before firing push observer + guard !prevSubscriptionState.equals(newSubscriptionState) else { + return + } + + let stateChanges = OSPushSubscriptionChangedState(current: newSubscriptionState, previous: prevSubscriptionState) + + // TODO: Don't fire observer until server is udated + OneSignalLog.onesignalLog(.LL_VERBOSE, message: "firePushSubscriptionChanged from \(prevSubscriptionState.jsonRepresentation()) to \(newSubscriptionState.jsonRepresentation())") + OneSignalUserManagerImpl.sharedInstance.pushSubscriptionStateChangesObserver.notifyChange(stateChanges) + } +} diff --git a/iOS_SDK/OneSignalSDK/OneSignalUser/Source/OSSubscriptionModelStoreListener.swift b/iOS_SDK/OneSignalSDK/OneSignalUser/Source/OSSubscriptionModelStoreListener.swift new file mode 100644 index 000000000..79183a893 --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignalUser/Source/OSSubscriptionModelStoreListener.swift @@ -0,0 +1,68 @@ +/* + Modified MIT License + + Copyright 2022 OneSignal + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + 1. The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + 2. All copies of substantial portions of the Software may only be used in connection + with services provided by OneSignal. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + */ + +import Foundation +import OneSignalCore +import OneSignalOSCore + +class OSSubscriptionModelStoreListener: OSModelStoreListener { + var store: OSModelStore + + required init(store: OSModelStore) { + self.store = store + } + + func getAddModelDelta(_ model: OSSubscriptionModel) -> OSDelta? { + return OSDelta( + name: OS_ADD_SUBSCRIPTION_DELTA, + model: model, + property: model.type.rawValue, // push, email, sms + value: model.address ?? "" + ) + } + + /** + The `property` and `value` is not needed for a remove operation, so just pass in some model data as placeholders. + */ + func getRemoveModelDelta(_ model: OSSubscriptionModel) -> OSDelta? { + return OSDelta( + name: OS_REMOVE_SUBSCRIPTION_DELTA, + model: model, + property: model.type.rawValue, // push, email, sms + value: model.address ?? "" + ) + } + + func getUpdateModelDelta(_ args: OSModelChangedArgs) -> OSDelta? { + return OSDelta( + name: OS_UPDATE_SUBSCRIPTION_DELTA, + model: args.model, + property: args.property, + value: args.newValue + ) + } +} diff --git a/iOS_SDK/OneSignalSDK/OneSignalUser/Source/OSSubscriptionOperationExecutor.swift b/iOS_SDK/OneSignalSDK/OneSignalUser/Source/OSSubscriptionOperationExecutor.swift new file mode 100644 index 000000000..0541ba27c --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignalUser/Source/OSSubscriptionOperationExecutor.swift @@ -0,0 +1,373 @@ +/* + Modified MIT License + + Copyright 2022 OneSignal + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + 1. The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + 2. All copies of substantial portions of the Software may only be used in connection + with services provided by OneSignal. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + */ + +import OneSignalOSCore +import OneSignalCore + +class OSSubscriptionOperationExecutor: OSOperationExecutor { + var supportedDeltas: [String] = [OS_ADD_SUBSCRIPTION_DELTA, OS_REMOVE_SUBSCRIPTION_DELTA, OS_UPDATE_SUBSCRIPTION_DELTA] + var deltaQueue: [OSDelta] = [] + // To simplify uncaching, we maintain separate request queues for each type + var addRequestQueue: [OSRequestCreateSubscription] = [] + var removeRequestQueue: [OSRequestDeleteSubscription] = [] + var updateRequestQueue: [OSRequestUpdateSubscription] = [] + var subscriptionModels: [String: OSSubscriptionModel] = [:] + + init() { + // Read unfinished deltas from cache, if any... + if var deltaQueue = OneSignalUserDefaults.initShared().getSavedCodeableData(forKey: OS_SUBSCRIPTION_EXECUTOR_DELTA_QUEUE_KEY, defaultValue: []) as? [OSDelta] { + // Hook each uncached Delta to the model in the store + for (index, delta) in deltaQueue.enumerated().reversed() { + if let modelInStore = getSubscriptionModelFromStores(modelId: delta.model.modelId) { + // The model exists in the subscription store, set it to be the Delta's model + delta.model = modelInStore + } else { + // The model does not exist, drop this Delta + deltaQueue.remove(at: index) + } + } + self.deltaQueue = deltaQueue + } else { + OneSignalLog.onesignalLog(.LL_ERROR, message: "OSSubscriptionOperationExecutor error encountered reading from cache for \(OS_SUBSCRIPTION_EXECUTOR_DELTA_QUEUE_KEY)") + } + + // Read unfinished requests from cache, if any... + + var requestQueue: [OSRequestCreateSubscription] = [] + + if let cachedAddRequestQueue = OneSignalUserDefaults.initShared().getSavedCodeableData(forKey: OS_SUBSCRIPTION_EXECUTOR_ADD_REQUEST_QUEUE_KEY, defaultValue: []) as? [OSRequestCreateSubscription] { + // Hook each uncached Request to the model in the store + for request in cachedAddRequestQueue { + // 1. Hook up the subscription model + if let subscriptionModel = getSubscriptionModelFromStores(modelId: request.subscriptionModel.modelId) { + // a. The model exist in the store, set it to be the Request's models + request.subscriptionModel = subscriptionModel + } else if let subscriptionModel = subscriptionModels[request.subscriptionModel.modelId] { + // b. The model exists in the dictionary of seen models + request.subscriptionModel = subscriptionModel + } else { + // c. The model has not been seen yet, add to dict + subscriptionModels[request.subscriptionModel.modelId] = request.subscriptionModel + } + // 2. Hook up the identity model + if let identityModel = OneSignalUserManagerImpl.sharedInstance.identityModelStore.getModel(modelId: request.identityModel.modelId) { + // a. The model exist in the store + request.identityModel = identityModel + } else if let identityModel = OSUserExecutor.identityModels[request.identityModel.modelId] { + // b. The model exist in the user executor + request.identityModel = identityModel + } else if !request.prepareForExecution() { + // The model do not exist AND this request cannot be sent, drop this Request + continue + } + requestQueue.append(request) + } + self.addRequestQueue = requestQueue + } else { + OneSignalLog.onesignalLog(.LL_ERROR, message: "OSSubscriptionOperationExecutor error encountered reading from cache for \(OS_SUBSCRIPTION_EXECUTOR_ADD_REQUEST_QUEUE_KEY)") + } + + if var removeRequestQueue = OneSignalUserDefaults.initShared().getSavedCodeableData(forKey: OS_SUBSCRIPTION_EXECUTOR_REMOVE_REQUEST_QUEUE_KEY, defaultValue: []) as? [OSRequestDeleteSubscription] { + // Hook each uncached Request to the model in the store + for (index, request) in removeRequestQueue.enumerated().reversed() { + if let subscriptionModel = getSubscriptionModelFromStores(modelId: request.subscriptionModel.modelId) { + // 1. The model exists in the store, set it to be the Request's model + request.subscriptionModel = subscriptionModel + } else if let subscriptionModel = subscriptionModels[request.subscriptionModel.modelId] { + // 2. The model exists in the dict of seen subscription models + request.subscriptionModel = subscriptionModel + } else if !request.prepareForExecution() { + // 3. The model does not exist AND this request cannot be sent, drop this Request + removeRequestQueue.remove(at: index) + } + } + self.removeRequestQueue = removeRequestQueue + } else { + OneSignalLog.onesignalLog(.LL_ERROR, message: "OSSubscriptionOperationExecutor error encountered reading from cache for \(OS_SUBSCRIPTION_EXECUTOR_REMOVE_REQUEST_QUEUE_KEY)") + } + + if var updateRequestQueue = OneSignalUserDefaults.initShared().getSavedCodeableData(forKey: OS_SUBSCRIPTION_EXECUTOR_UPDATE_REQUEST_QUEUE_KEY, defaultValue: []) as? [OSRequestUpdateSubscription] { + // Hook each uncached Request to the model in the store + for (index, request) in updateRequestQueue.enumerated().reversed() { + if let subscriptionModel = getSubscriptionModelFromStores(modelId: request.subscriptionModel.modelId) { + // 1. The model exists in the store, set it to be the Request's model + request.subscriptionModel = subscriptionModel + } else if let subscriptionModel = subscriptionModels[request.subscriptionModel.modelId] { + // 2. The model exists in the dict of seen subscription models + request.subscriptionModel = subscriptionModel + } else if !request.prepareForExecution() { + // 3. The models do not exist AND this request cannot be sent, drop this Request + updateRequestQueue.remove(at: index) + } + } + self.updateRequestQueue = updateRequestQueue + } else { + OneSignalLog.onesignalLog(.LL_ERROR, message: "OSSubscriptionOperationExecutor error encountered reading from cache for \(OS_SUBSCRIPTION_EXECUTOR_UPDATE_REQUEST_QUEUE_KEY)") + } + } + + /** + Since there are 2 subscription stores, we need to check both stores for the model with a particular `modelId`. + */ + func getSubscriptionModelFromStores(modelId: String) -> OSSubscriptionModel? { + if let modelInStore = OneSignalUserManagerImpl.sharedInstance.pushSubscriptionModelStore.getModel(modelId: modelId) { + return modelInStore + } + if let modelInStore = OneSignalUserManagerImpl.sharedInstance.subscriptionModelStore.getModel(modelId: modelId) { + return modelInStore + } + return nil + } + + func enqueueDelta(_ delta: OSDelta) { + OneSignalLog.onesignalLog(.LL_VERBOSE, message: "OSSubscriptionOperationExecutor enqueueDelta: \(delta)") + deltaQueue.append(delta) + } + + func cacheDeltaQueue() { + OneSignalUserDefaults.initShared().saveCodeableData(forKey: OS_SUBSCRIPTION_EXECUTOR_DELTA_QUEUE_KEY, withValue: self.deltaQueue) + } + + func processDeltaQueue(inBackground: Bool) { + if !deltaQueue.isEmpty { + OneSignalLog.onesignalLog(.LL_VERBOSE, message: "OSSubscriptionOperationExecutor processDeltaQueue with queue: \(deltaQueue)") + } + for delta in deltaQueue { + guard let model = delta.model as? OSSubscriptionModel else { + // Log error + continue + } + + switch delta.name { + case OS_ADD_SUBSCRIPTION_DELTA: + let request = OSRequestCreateSubscription( + subscriptionModel: model, + identityModel: OneSignalUserManagerImpl.sharedInstance.user.identityModel // TODO: Make sure this is ok + ) + addRequestQueue.append(request) + + case OS_REMOVE_SUBSCRIPTION_DELTA: + let request = OSRequestDeleteSubscription( + subscriptionModel: model + ) + removeRequestQueue.append(request) + + case OS_UPDATE_SUBSCRIPTION_DELTA: + let request = OSRequestUpdateSubscription( + subscriptionObject: [delta.property: delta.value], + subscriptionModel: model + ) + updateRequestQueue.append(request) + + default: + // Log error + OneSignalLog.onesignalLog(.LL_DEBUG, message: "OSSubscriptionOperationExecutor met incompatible OSDelta type: \(delta).") + } + } + + self.deltaQueue = [] // TODO: Check that we can simply clear all the deltas in the deltaQueue + + // persist executor's requests (including new request) to storage + OneSignalUserDefaults.initShared().saveCodeableData(forKey: OS_SUBSCRIPTION_EXECUTOR_ADD_REQUEST_QUEUE_KEY, withValue: self.addRequestQueue) + OneSignalUserDefaults.initShared().saveCodeableData(forKey: OS_SUBSCRIPTION_EXECUTOR_REMOVE_REQUEST_QUEUE_KEY, withValue: self.removeRequestQueue) + OneSignalUserDefaults.initShared().saveCodeableData(forKey: OS_SUBSCRIPTION_EXECUTOR_UPDATE_REQUEST_QUEUE_KEY, withValue: self.updateRequestQueue) + + OneSignalUserDefaults.initShared().saveCodeableData(forKey: OS_SUBSCRIPTION_EXECUTOR_DELTA_QUEUE_KEY, withValue: self.deltaQueue) // This should be empty, can remove instead? + + processRequestQueue(inBackground: inBackground) + } + + // Bypasses the operation repo to create a push subscription request + func createPushSubscription(subscriptionModel: OSSubscriptionModel, identityModel: OSIdentityModel) { + let request = OSRequestCreateSubscription(subscriptionModel: subscriptionModel, identityModel: identityModel) + addRequestQueue.append(request) + OneSignalUserDefaults.initShared().saveCodeableData(forKey: OS_SUBSCRIPTION_EXECUTOR_ADD_REQUEST_QUEUE_KEY, withValue: self.addRequestQueue) + } + + func processRequestQueue(inBackground: Bool) { + let requestQueue: [OneSignalRequest] = addRequestQueue + removeRequestQueue + updateRequestQueue + + if requestQueue.isEmpty { + return + } + + // Sort the requestQueue by timestamp + for request in requestQueue.sorted(by: { first, second in + return first.timestamp < second.timestamp + }) { + if request.isKind(of: OSRequestCreateSubscription.self), let createSubscriptionRequest = request as? OSRequestCreateSubscription { + executeCreateSubscriptionRequest(createSubscriptionRequest, inBackground: inBackground) + } else if request.isKind(of: OSRequestDeleteSubscription.self), let deleteSubscriptionRequest = request as? OSRequestDeleteSubscription { + executeDeleteSubscriptionRequest(deleteSubscriptionRequest, inBackground: inBackground) + } else if request.isKind(of: OSRequestUpdateSubscription.self), let updateSubscriptionRequest = request as? OSRequestUpdateSubscription { + executeUpdateSubscriptionRequest(updateSubscriptionRequest, inBackground: inBackground) + } else { + OneSignalLog.onesignalLog(.LL_DEBUG, message: "OSSubscriptionOperationExecutor.processRequestQueue met incompatible OneSignalRequest type: \(request).") + } + } + } + + func executeCreateSubscriptionRequest(_ request: OSRequestCreateSubscription, inBackground: Bool) { + guard !request.sentToClient else { + return + } + guard request.prepareForExecution() else { + return + } + request.sentToClient = true + + let backgroundTaskIdentifier = SUBSCRIPTION_EXECUTOR_BACKGROUND_TASK + UUID().uuidString + if (inBackground) { + OSBackgroundTaskManager.beginBackgroundTask(backgroundTaskIdentifier) + } + + OneSignalLog.onesignalLog(.LL_VERBOSE, message: "OSSubscriptionOperationExecutor: executeCreateSubscriptionRequest making request: \(request)") + OneSignalClient.shared().execute(request) { result in + // On success, remove request from cache (even if not hydrating model), and hydrate model + self.addRequestQueue.removeAll(where: { $0 == request}) + OneSignalUserDefaults.initShared().saveCodeableData(forKey: OS_SUBSCRIPTION_EXECUTOR_ADD_REQUEST_QUEUE_KEY, withValue: self.addRequestQueue) + + guard let response = result?["subscription"] as? [String: Any] else { + OneSignalLog.onesignalLog(.LL_ERROR, message: "Unabled to parse response to create subscription request") + if (inBackground) { + OSBackgroundTaskManager.endBackgroundTask(backgroundTaskIdentifier) + } + return + } + request.subscriptionModel.hydrate(response) + if (inBackground) { + OSBackgroundTaskManager.endBackgroundTask(backgroundTaskIdentifier) + } + } onFailure: { error in + OneSignalLog.onesignalLog(.LL_ERROR, message: "OSSubscriptionOperationExecutor create subscription request failed with error: \(error.debugDescription)") + if let nsError = error as? NSError { + let responseType = OSNetworkingUtils.getResponseStatusType(nsError.code) + if responseType == .missing { + self.addRequestQueue.removeAll(where: { $0 == request}) + OneSignalUserDefaults.initShared().saveCodeableData(forKey: OS_SUBSCRIPTION_EXECUTOR_ADD_REQUEST_QUEUE_KEY, withValue: self.addRequestQueue) + // Logout if the user in the SDK is the same + guard OneSignalUserManagerImpl.sharedInstance.isCurrentUser(request.identityModel) + else { + if (inBackground) { + OSBackgroundTaskManager.endBackgroundTask(backgroundTaskIdentifier) + } + return + } + // The subscription has been deleted along with the user, so remove the subscription_id but keep the same push subscription model + OneSignalUserManagerImpl.sharedInstance.pushSubscriptionModel?.subscriptionId = nil + OneSignalUserManagerImpl.sharedInstance._logout() + } else if responseType != .retryable { + // Fail, no retry, remove from cache and queue + self.addRequestQueue.removeAll(where: { $0 == request}) + OneSignalUserDefaults.initShared().saveCodeableData(forKey: OS_SUBSCRIPTION_EXECUTOR_ADD_REQUEST_QUEUE_KEY, withValue: self.addRequestQueue) + } + } + if (inBackground) { + OSBackgroundTaskManager.endBackgroundTask(backgroundTaskIdentifier) + } + } + } + + func executeDeleteSubscriptionRequest(_ request: OSRequestDeleteSubscription, inBackground: Bool) { + guard !request.sentToClient else { + return + } + guard request.prepareForExecution() else { + return + } + request.sentToClient = true + + let backgroundTaskIdentifier = SUBSCRIPTION_EXECUTOR_BACKGROUND_TASK + UUID().uuidString + if (inBackground) { + OSBackgroundTaskManager.beginBackgroundTask(backgroundTaskIdentifier) + } + + // This request can be executed as-is. + OneSignalLog.onesignalLog(.LL_VERBOSE, message: "OSSubscriptionOperationExecutor: executeDeleteSubscriptionRequest making request: \(request)") + OneSignalClient.shared().execute(request) { _ in + // On success, remove request from cache. No model hydration occurs. + // For example, if app restarts and we read in operations between sending this off and getting the response + self.removeRequestQueue.removeAll(where: { $0 == request}) + OneSignalUserDefaults.initShared().saveCodeableData(forKey: OS_SUBSCRIPTION_EXECUTOR_REMOVE_REQUEST_QUEUE_KEY, withValue: self.removeRequestQueue) + if (inBackground) { + OSBackgroundTaskManager.endBackgroundTask(backgroundTaskIdentifier) + } + } onFailure: { error in + OneSignalLog.onesignalLog(.LL_ERROR, message: "OSSubscriptionOperationExecutor delete subscription request failed with error: \(error.debugDescription)") + if let nsError = error as? NSError { + let responseType = OSNetworkingUtils.getResponseStatusType(nsError.code) + if responseType != .retryable { + // Fail, no retry, remove from cache and queue + // If this request returns a missing status, that is ok as this is a delete request + self.removeRequestQueue.removeAll(where: { $0 == request}) + OneSignalUserDefaults.initShared().saveCodeableData(forKey: OS_SUBSCRIPTION_EXECUTOR_REMOVE_REQUEST_QUEUE_KEY, withValue: self.removeRequestQueue) + } + } + if (inBackground) { + OSBackgroundTaskManager.endBackgroundTask(backgroundTaskIdentifier) + } + } + } + + func executeUpdateSubscriptionRequest(_ request: OSRequestUpdateSubscription, inBackground: Bool) { + guard !request.sentToClient else { + return + } + guard request.prepareForExecution() else { + return + } + request.sentToClient = true + + let backgroundTaskIdentifier = SUBSCRIPTION_EXECUTOR_BACKGROUND_TASK + UUID().uuidString + if (inBackground) { + OSBackgroundTaskManager.beginBackgroundTask(backgroundTaskIdentifier) + } + + OneSignalClient.shared().execute(request) { _ in + // On success, remove request from cache. No model hydration occurs. + // For example, if app restarts and we read in operations between sending this off and getting the response + self.updateRequestQueue.removeAll(where: { $0 == request}) + OneSignalUserDefaults.initShared().saveCodeableData(forKey: OS_SUBSCRIPTION_EXECUTOR_UPDATE_REQUEST_QUEUE_KEY, withValue: self.updateRequestQueue) + if (inBackground) { + OSBackgroundTaskManager.endBackgroundTask(backgroundTaskIdentifier) + } + } onFailure: { error in + OneSignalLog.onesignalLog(.LL_ERROR, message: "OSSubscriptionOperationExecutor update subscription request failed with error: \(error.debugDescription)") + if let nsError = error as? NSError { + let responseType = OSNetworkingUtils.getResponseStatusType(nsError.code) + if responseType != .retryable { + // Fail, no retry, remove from cache and queue + self.updateRequestQueue.removeAll(where: { $0 == request}) + OneSignalUserDefaults.initShared().saveCodeableData(forKey: OS_SUBSCRIPTION_EXECUTOR_UPDATE_REQUEST_QUEUE_KEY, withValue: self.updateRequestQueue) + } + } + if (inBackground) { + OSBackgroundTaskManager.endBackgroundTask(backgroundTaskIdentifier) + } + } + } +} diff --git a/iOS_SDK/OneSignalSDK/OneSignalUser/Source/OSUserInternalImpl.swift b/iOS_SDK/OneSignalSDK/OneSignalUser/Source/OSUserInternalImpl.swift new file mode 100644 index 000000000..75b02deb6 --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignalUser/Source/OSUserInternalImpl.swift @@ -0,0 +1,136 @@ +/* + Modified MIT License + + Copyright 2022 OneSignal + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + 1. The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + 2. All copies of substantial portions of the Software may only be used in connection + with services provided by OneSignal. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + */ + +import OneSignalCore +import OneSignalOSCore + +/** + This is the user interface exposed to the public. + */ +// TODO: Wrong description above? Not exposed to public. +protocol OSUserInternal { + var isAnonymous: Bool { get } + var pushSubscriptionModel: OSSubscriptionModel { get } + var identityModel: OSIdentityModel { get } + var propertiesModel: OSPropertiesModel { get } + // Aliases + func addAliases(_ aliases: [String: String]) + func removeAliases(_ labels: [String]) + // Tags + func addTags(_ tags: [String: String]) + func removeTags(_ tags: [String]) + // Location + func setLocation(lat: Float, long: Float) + // Language + func setLanguage(_ language: String?) +} + +/** + Internal user object that implements the OSUserInternal protocol. + */ +class OSUserInternalImpl: NSObject, OSUserInternal { + + // TODO: Determine if having any alias should return true + // Is an anon user who has added aliases, still an anon user? + var isAnonymous: Bool { + return identityModel.externalId == nil + } + + var identityModel: OSIdentityModel + var propertiesModel: OSPropertiesModel + var pushSubscriptionModel: OSSubscriptionModel + + // Sessions will be outside this? + + init(identityModel: OSIdentityModel, propertiesModel: OSPropertiesModel, pushSubscriptionModel: OSSubscriptionModel) { + self.identityModel = identityModel + self.propertiesModel = propertiesModel + self.pushSubscriptionModel = pushSubscriptionModel + } + + // MARK: - Aliases + + /** + Prohibit the use of `onesignal_id` and `external_id`as alias label. + Prohibit the setting of aliases to the empty string (users should use `removeAlias` methods instead). + */ + func addAliases(_ aliases: [String: String]) { + // Decide if the non-offending aliases should still be added. + OneSignalLog.onesignalLog(.LL_VERBOSE, message: "OneSignal.User addAliases called with: \(aliases)") + guard aliases[OS_ONESIGNAL_ID] == nil, + aliases[OS_EXTERNAL_ID] == nil, + !aliases.values.contains("") + else { + // log error + OneSignalLog.onesignalLog(.LL_ERROR, message: "OneSignal.User addAliases error: Cannot use \(OS_ONESIGNAL_ID) or \(OS_EXTERNAL_ID) as a alias label. Or, cannot use empty string as an alias ID.") + return + } + identityModel.addAliases(aliases) + } + + /** + Prohibit the removal of `onesignal_id` and `external_id`. + */ + func removeAliases(_ labels: [String]) { + OneSignalLog.onesignalLog(.LL_VERBOSE, message: "OneSignal.User removeAliases called with: \(labels)") + guard !labels.contains(OS_ONESIGNAL_ID), + !labels.contains(OS_EXTERNAL_ID) + else { + // log error + OneSignalLog.onesignalLog(.LL_ERROR, message: "OneSignal.User removeAliases error: Cannot use \(OS_ONESIGNAL_ID) or \(OS_EXTERNAL_ID) as a alias label.") + return + } + identityModel.removeAliases(labels) + } + + // MARK: - Tags + + func addTags(_ tags: [String: String]) { + OneSignalLog.onesignalLog(.LL_VERBOSE, message: "OneSignal.User addTags called with: \(tags)") + propertiesModel.addTags(tags) + } + + func removeTags(_ tags: [String]) { + OneSignalLog.onesignalLog(.LL_VERBOSE, message: "OneSignal.User removeTags called with: \(tags)") + + propertiesModel.removeTags(tags) + } + + // MARK: - Location + + func setLocation(lat: Float, long: Float) { + OneSignalLog.onesignalLog(.LL_VERBOSE, message: "OneSignal.User setLocation called with lat: \(lat) long: \(long)") + + propertiesModel.location = OSLocationPoint(lat: lat, long: long) + } + + // MARK: - Language + + func setLanguage(_ language: String?) { + propertiesModel.language = language + } +} diff --git a/iOS_SDK/OneSignalSDK/OneSignalUser/Source/OSUserRequests.swift b/iOS_SDK/OneSignalSDK/OneSignalUser/Source/OSUserRequests.swift new file mode 100644 index 000000000..0c4f3f332 --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignalUser/Source/OSUserRequests.swift @@ -0,0 +1,1416 @@ +/* + Modified MIT License + + Copyright 2022 OneSignal + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + 1. The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + 2. All copies of substantial portions of the Software may only be used in connection + with services provided by OneSignal. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + */ + +import OneSignalCore +import OneSignalNotifications +import OneSignalOSCore + +/** + Involved in the login process and responsible for Identify User and Create User. + Can execute `OSRequestCreateUser`, `OSRequestIdentifyUser`, `OSRequestTransferSubscription`, `OSRequestFetchUser`, `OSRequestFetchIdentityBySubscription`. + */ +class OSUserExecutor { + static var userRequestQueue: [OSUserRequest] = [] + static var transferSubscriptionRequestQueue: [OSRequestTransferSubscription] = [] + static var identityModels: [String: OSIdentityModel] = [:] + + // Read in requests from the cache, do not read in FetchUser requests as this is not needed. + static func start() { + var userRequestQueue: [OSUserRequest] = [] + + // Read unfinished Create User + Identify User + Get Identity By Subscription requests from cache, if any... + if let cachedRequestQueue = OneSignalUserDefaults.initShared().getSavedCodeableData(forKey: OS_USER_EXECUTOR_USER_REQUEST_QUEUE_KEY, defaultValue: []) as? [OSUserRequest] { + // Hook each uncached Request to the right model reference + for request in cachedRequestQueue { + if request.isKind(of: OSRequestFetchIdentityBySubscription.self), let req = request as? OSRequestFetchIdentityBySubscription { + if let identityModel = OneSignalUserManagerImpl.sharedInstance.identityModelStore.getModel(modelId: req.identityModel.modelId) { + // 1. The model exist in the store, set it to be the Request's model + req.identityModel = identityModel + } else if let identityModel = identityModels[req.identityModel.modelId] { + // 2. The model exists in the dict of identityModels already processed to use + req.identityModel = identityModel + } else { + // 3. The models do not exist, use the model on the request, and add to dict. + identityModels[req.identityModel.modelId] = req.identityModel + } + userRequestQueue.append(req) + + } else if request.isKind(of: OSRequestCreateUser.self), let req = request as? OSRequestCreateUser { + if let identityModel = OneSignalUserManagerImpl.sharedInstance.identityModelStore.getModel(modelId: req.identityModel.modelId) { + // 1. The model exist in the store, set it to be the Request's model + req.identityModel = identityModel + } else if let identityModel = identityModels[req.identityModel.modelId] { + // 2. The model exists in the dict of identityModels already processed to use + req.identityModel = identityModel + } else { + // 3. The models do not exist, use the model on the request, and add to dict. + identityModels[req.identityModel.modelId] = req.identityModel + } + userRequestQueue.append(req) + + } else if request.isKind(of: OSRequestIdentifyUser.self), let req = request as? OSRequestIdentifyUser { + + if let identityModelToIdentify = identityModels[req.identityModelToIdentify.modelId], + let identityModelToUpdate = OneSignalUserManagerImpl.sharedInstance.identityModelStore.getModel(modelId: req.identityModelToUpdate.modelId) { + // 1. A model exist in the dict and a model exist in the store, set it to be the Request's models + req.identityModelToIdentify = identityModelToIdentify + req.identityModelToUpdate = identityModelToUpdate + } else if let identityModelToIdentify = identityModels[req.identityModelToIdentify.modelId], + let identityModelToUpdate = identityModels[req.identityModelToUpdate.modelId] { + // 2. The two models exist in the dict, set it to be the Request's models + req.identityModelToIdentify = identityModelToIdentify + req.identityModelToUpdate = identityModelToUpdate + } else if let identityModelToIdentify = identityModels[req.identityModelToIdentify.modelId], + identityModels[req.identityModelToUpdate.modelId] == nil { + // 3. A model is in the dict, the other model does not exist + req.identityModelToIdentify = identityModelToIdentify + identityModels[req.identityModelToUpdate.modelId] = req.identityModelToUpdate + } else { + // 4. Both models don't exist yet + identityModels[req.identityModelToIdentify.modelId] = req.identityModelToIdentify + identityModels[req.identityModelToUpdate.modelId] = req.identityModelToUpdate + } + userRequestQueue.append(req) + } + } + } + self.userRequestQueue = userRequestQueue + + // Read unfinished Transfer Subscription requests from cache, if any... + if let transferSubscriptionRequestQueue = OneSignalUserDefaults.initShared().getSavedCodeableData(forKey: OS_USER_EXECUTOR_TRANSFER_SUBSCRIPTION_REQUEST_QUEUE_KEY, defaultValue: []) as? [OSRequestTransferSubscription] { + // We only care about the last transfer subscription request + if let request = transferSubscriptionRequestQueue.last { + // Hook the uncached Request to the model in the store + if request.subscriptionModel.modelId == OneSignalUserManagerImpl.sharedInstance.user.pushSubscriptionModel.modelId { + // The model exist, set it to be the Request's model + request.subscriptionModel = OneSignalUserManagerImpl.sharedInstance.user.pushSubscriptionModel + self.transferSubscriptionRequestQueue = [request] + } else if !request.prepareForExecution() { + // The model do not exist AND this request cannot be sent, drop this Request + OneSignalLog.onesignalLog(.LL_ERROR, message: "OSUserExecutor.start() reading request \(request) from cache failed. Dropping request.") + self.transferSubscriptionRequestQueue = [] + } + } + } else { + OneSignalLog.onesignalLog(.LL_ERROR, message: "OSUserExecutor error encountered reading from cache for \(OS_USER_EXECUTOR_TRANSFER_SUBSCRIPTION_REQUEST_QUEUE_KEY)") + } + + executePendingRequests() + } + + static func appendToQueue(_ request: OSUserRequest) { + if request.isKind(of: OSRequestTransferSubscription.self), let req = request as? OSRequestTransferSubscription { + self.transferSubscriptionRequestQueue.append(req) + OneSignalUserDefaults.initShared().saveCodeableData(forKey: OS_USER_EXECUTOR_TRANSFER_SUBSCRIPTION_REQUEST_QUEUE_KEY, withValue: self.transferSubscriptionRequestQueue) + } else { + self.userRequestQueue.append(request) + OneSignalUserDefaults.initShared().saveCodeableData(forKey: OS_USER_EXECUTOR_USER_REQUEST_QUEUE_KEY, withValue: self.userRequestQueue) + } + } + + static func removeFromQueue(_ request: OSUserRequest) { + if request.isKind(of: OSRequestTransferSubscription.self), let req = request as? OSRequestTransferSubscription { + transferSubscriptionRequestQueue.removeAll(where: { $0 == req}) + OneSignalUserDefaults.initShared().saveCodeableData(forKey: OS_USER_EXECUTOR_TRANSFER_SUBSCRIPTION_REQUEST_QUEUE_KEY, withValue: self.transferSubscriptionRequestQueue) + } else { + userRequestQueue.removeAll(where: { $0 == request}) + OneSignalUserDefaults.initShared().saveCodeableData(forKey: OS_USER_EXECUTOR_USER_REQUEST_QUEUE_KEY, withValue: self.userRequestQueue) + } + } + + static func executePendingRequests() { + let requestQueue: [OSUserRequest] = userRequestQueue + transferSubscriptionRequestQueue + + if requestQueue.isEmpty { + return + } + + // Sort the requestQueue by timestamp + for request in requestQueue.sorted(by: { first, second in + return first.timestamp < second.timestamp + }) { + // Return as soon as we reach an un-executable request + if !request.prepareForExecution() { + return + } + + if request.isKind(of: OSRequestFetchIdentityBySubscription.self), let fetchIdentityRequest = request as? OSRequestFetchIdentityBySubscription { + executeFetchIdentityBySubscriptionRequest(fetchIdentityRequest) + return + } else if request.isKind(of: OSRequestCreateUser.self), let createUserRequest = request as? OSRequestCreateUser { + executeCreateUserRequest(createUserRequest) + return + } else if request.isKind(of: OSRequestIdentifyUser.self), let identifyUserRequest = request as? OSRequestIdentifyUser { + executeIdentifyUserRequest(identifyUserRequest) + return + } else if request.isKind(of: OSRequestTransferSubscription.self), let transferSubscriptionRequest = request as? OSRequestTransferSubscription { + executeTransferPushSubscriptionRequest(transferSubscriptionRequest) + return + } else if request.isKind(of: OSRequestFetchUser.self), let fetchUserRequest = request as? OSRequestFetchUser { + executeFetchUserRequest(fetchUserRequest) + return + } else { + // Log Error + OneSignalLog.onesignalLog(.LL_ERROR, message: "OSUserExecutor met incompatible Request type that cannot be executed.") + } + } + } + + /** + Used to parse Create User and Fetch User responses. The `originalPushToken` is the push token when the request was created, which may be different from the push token currently in the SDK. For example, when the request was created, there may be no push token yet, but soon after, the SDK receives a push token. This is used to determine whether or not to hydrate the push subscription. + */ + static func parseFetchUserResponse(response: [AnyHashable: Any], identityModel: OSIdentityModel, originalPushToken: String?) { + + // If this was a create user, it hydrates the onesignal_id of the request's identityModel + // The model in the store may be different, and it may be waiting on the onesignal_id of this previous model + if let identityObject = parseIdentityObjectResponse(response) { + identityModel.hydrate(identityObject) + } + + // TODO: Determine how to hydrate the push subscription, which is still faulty. + // Hydrate by token if sub_id exists? + // Problem: a user can have multiple iOS push subscription, and perhaps missing token + // Ideally we only get push subscription for this device in the response, not others + + // Hydrate the push subscription if we don't already have a subscription ID AND token matches the original request + if (OneSignalUserManagerImpl.sharedInstance.pushSubscriptionModel?.subscriptionId == nil), + let subscriptionObject = parseSubscriptionObjectResponse(response) { + for subModel in subscriptionObject { + if subModel["type"] as? String == "iOSPush", + areTokensEqual(tokenA: originalPushToken, tokenB: subModel["token"] as? String) { // response may have "" token or no token + OneSignalUserManagerImpl.sharedInstance.pushSubscriptionModel?.hydrate(subModel) + if let subId = subModel["id"] as? String { + OSNotificationsManager.setPushSubscriptionId(subId) + } + break + } + } + } + + // Check if the current user is the same as the one in the request + // If user has changed, don't hydrate, except for push subscription above + guard OneSignalUserManagerImpl.sharedInstance.isCurrentUser(identityModel) else { + return + } + + if let identityObject = parseIdentityObjectResponse(response) { + OneSignalUserManagerImpl.sharedInstance.user.identityModel.hydrate(identityObject) + } + + if let propertiesObject = parsePropertiesObjectResponse(response) { + OneSignalUserManagerImpl.sharedInstance.user.propertiesModel.hydrate(propertiesObject) + } + + // Now parse email and sms subscriptions + if let subscriptionObject = parseSubscriptionObjectResponse(response) { + let models = OneSignalUserManagerImpl.sharedInstance.subscriptionModelStore.getModels() + for subModel in subscriptionObject { + if let address = subModel["token"] as? String, + let rawType = subModel["type"] as? String, + rawType != "iOSPush", + let type = OSSubscriptionType(rawValue: rawType) { + if let model = models[address] { + // This subscription exists in the store, hydrate + model.hydrate(subModel) + + } else { + // This subscription does not exist in the store, add + OneSignalUserManagerImpl.sharedInstance.subscriptionModelStore.add(id: address, model: OSSubscriptionModel( + type: type, + address: address, + subscriptionId: subModel["id"] as? String, + reachable: true, + isDisabled: false, + changeNotifier: OSEventProducer()), hydrating: true + ) + } + } + } + } + } + + /** + Returns if 2 tokens are equal. This is needed as a nil token is equal to the empty string "". + */ + static func areTokensEqual(tokenA: String?, tokenB: String?) -> Bool { + // They are both strings or both nil + if tokenA == tokenB { + return true + } + // One is nil and the other is "" + if (tokenA == nil && tokenB == "") || (tokenA == "" && tokenB == nil) { + return true + } + return false + } + + static func parseSubscriptionObjectResponse(_ response: [AnyHashable: Any]?) -> [[String: Any]]? { + return response?["subscriptions"] as? [[String: Any]] + } + + static func parsePropertiesObjectResponse(_ response: [AnyHashable: Any]?) -> [String: Any]? { + return response?["properties"] as? [String: Any] + } + + static func parseIdentityObjectResponse(_ response: [AnyHashable: Any]?) -> [String: String]? { + return response?["identity"] as? [String: String] + } + + // We will pass minimal properties to this request + static func createUser(_ user: OSUserInternal) { + let originalPushToken = user.pushSubscriptionModel.address + let request = OSRequestCreateUser(identityModel: user.identityModel, propertiesModel: user.propertiesModel, pushSubscriptionModel: user.pushSubscriptionModel, originalPushToken: originalPushToken) + + appendToQueue(request) + + executePendingRequests() + } + + static func executeCreateUserRequest(_ request: OSRequestCreateUser) { + guard !request.sentToClient else { + return + } + guard request.prepareForExecution() else { + // Currently there are no requirements needed before sending this request + return + } + request.sentToClient = true + + // Hook up push subscription model, it may be updated with a subscription_id, etc. + if let pushSubscriptionModel = OneSignalUserManagerImpl.sharedInstance.pushSubscriptionModelStore.getModel(modelId: request.pushSubscriptionModel.modelId) { + request.pushSubscriptionModel = pushSubscriptionModel + request.updatePushSubscriptionModel(pushSubscriptionModel) + } + + OneSignalClient.shared().execute(request) { response in + removeFromQueue(request) + + // TODO: Differentiate if we need to fetch the user based on response code of 200, 201, 202 + // Create User's response won't send us the user's complete info if this user already exists + if let response = response { + // Parse the response for any data we need to update + parseFetchUserResponse(response: response, identityModel: request.identityModel, originalPushToken: request.originalPushToken) + + // If this user already exists and we logged into an external_id, fetch the user data + // TODO: Only do this if response code is 200 or 202 + // Fetch the user only if its the current user + if OneSignalUserManagerImpl.sharedInstance.isCurrentUser(request.identityModel), + let identity = request.parameters?["identity"] as? [String: String], + let externalId = identity[OS_EXTERNAL_ID] { + fetchUser(aliasLabel: OS_EXTERNAL_ID, aliasId: externalId, identityModel: request.identityModel) + } else { + executePendingRequests() + } + } + OSOperationRepo.sharedInstance.paused = false + } onFailure: { error in + OneSignalLog.onesignalLog(.LL_ERROR, message: "OSUserExecutor create user request failed with error: \(error.debugDescription)") + if let nsError = error as? NSError { + let responseType = OSNetworkingUtils.getResponseStatusType(nsError.code) + if responseType != .retryable { + // A failed create user request would leave the SDK in a bad state + // Don't remove the request from cache and pause the operation repo + // We will retry this request on a new session + OSOperationRepo.sharedInstance.paused = true + request.sentToClient = false + } + } else { + executePendingRequests() + } + } + } + + static func fetchIdentityBySubscription(_ user: OSUserInternal) { + let request = OSRequestFetchIdentityBySubscription(identityModel: user.identityModel, pushSubscriptionModel: user.pushSubscriptionModel) + + appendToQueue(request) + executePendingRequests() + } + + /** + For migrating legacy players from 3.x to 5.x. This request will fetch the identity object for a subscription ID, and we will use the returned onesignalId to fetch and hydrate the local user. + */ + static func executeFetchIdentityBySubscriptionRequest(_ request: OSRequestFetchIdentityBySubscription) { + guard !request.sentToClient else { + return + } + guard request.prepareForExecution() else { + return + } + request.sentToClient = true + + OneSignalClient.shared().execute(request) { response in + removeFromQueue(request) + + if let identityObject = parseIdentityObjectResponse(response), + let onesignalId = identityObject[OS_ONESIGNAL_ID] + { + request.identityModel.hydrate(identityObject) + + // Fetch this user's data if it is the current user + guard OneSignalUserManagerImpl.sharedInstance.isCurrentUser(request.identityModel) + else { + executePendingRequests() + return + } + + fetchUser(aliasLabel: OS_ONESIGNAL_ID, aliasId: onesignalId, identityModel: request.identityModel) + } + } onFailure: { error in + OneSignalLog.onesignalLog(.LL_ERROR, message: "OSUserExecutor executeFetchIdentityBySubscriptionRequest failed with error: \(error.debugDescription)") + if let nsError = error as? NSError { + let responseType = OSNetworkingUtils.getResponseStatusType(nsError.code) + if responseType != .retryable { + // Fail, no retry, remove the subscription_id but keep the same push subscription model + OneSignalUserManagerImpl.sharedInstance.pushSubscriptionModel?.subscriptionId = nil + removeFromQueue(request) + } + } + executePendingRequests() + } + } + + static func identifyUser(externalId: String, identityModelToIdentify: OSIdentityModel, identityModelToUpdate: OSIdentityModel) { + let request = OSRequestIdentifyUser( + aliasLabel: OS_EXTERNAL_ID, + aliasId: externalId, + identityModelToIdentify: identityModelToIdentify, + identityModelToUpdate: identityModelToUpdate + ) + + appendToQueue(request) + + executePendingRequests() + } + + static func executeIdentifyUserRequest(_ request: OSRequestIdentifyUser) { + guard !request.sentToClient else { + return + } + guard request.prepareForExecution() else { + // Missing onesignal_id + return + } + request.sentToClient = true + + OneSignalClient.shared().execute(request) { _ in + removeFromQueue(request) + + // the anonymous user has been identified, still need to Fetch User as we cleared local data + // Fetch the user only if its the current user + if OneSignalUserManagerImpl.sharedInstance.isCurrentUser(request.identityModelToUpdate) { + fetchUser(aliasLabel: OS_EXTERNAL_ID, aliasId: request.aliasId, identityModel: request.identityModelToUpdate) + } else { + executePendingRequests() + } + } onFailure: { error in + OneSignalLog.onesignalLog(.LL_VERBOSE, message: "executeIdentifyUserRequest failed with error \(error.debugDescription)") + if let nsError = error as? NSError { + let responseType = OSNetworkingUtils.getResponseStatusType(nsError.code) + if responseType == .conflict { + // Returns 409 if any provided (label, id) pair exists on another User, so the SDK will switch to this user. + OneSignalLog.onesignalLog(.LL_DEBUG, message: "executeIdentifyUserRequest returned error code user-2. Now handling user-2 error response... switch to this user.") + + removeFromQueue(request) + // Fetch the user only if its the current user + if OneSignalUserManagerImpl.sharedInstance.isCurrentUser(request.identityModelToUpdate) { + fetchUser(aliasLabel: OS_EXTERNAL_ID, aliasId: request.aliasId, identityModel: request.identityModelToUpdate) + // TODO: Link ^ to the new user... what was this todo for? + } + transferPushSubscriptionTo(aliasLabel: request.aliasLabel, aliasId: request.aliasId) + } else if responseType == .invalid || responseType == .unauthorized { + // Failed, no retry + removeFromQueue(request) + executePendingRequests() + } else if responseType == .missing { + removeFromQueue(request) + executePendingRequests() + // Logout if the user in the SDK is the same + guard OneSignalUserManagerImpl.sharedInstance.isCurrentUser(request.identityModelToUpdate) + else { + return + } + // The subscription has been deleted along with the user, so remove the subscription_id but keep the same push subscription model + OneSignalUserManagerImpl.sharedInstance.pushSubscriptionModel?.subscriptionId = nil + OneSignalUserManagerImpl.sharedInstance._logout() + } + } else { + executePendingRequests() + } + } + } + + static func transferPushSubscriptionTo(aliasLabel: String, aliasId: String) { + // TODO: Where to get pushSubscriptionModel for this request + let request = OSRequestTransferSubscription( + subscriptionModel: OneSignalUserManagerImpl.sharedInstance.user.pushSubscriptionModel, + aliasLabel: aliasLabel, + aliasId: aliasId + ) + + appendToQueue(request) + + executePendingRequests() + } + + static func executeTransferPushSubscriptionRequest(_ request: OSRequestTransferSubscription) { + guard !request.sentToClient else { + return + } + guard request.prepareForExecution() else { + // Missing subscriptionId + OneSignalLog.onesignalLog(.LL_DEBUG, message: "OSUserExecutor.executeTransferPushSubscriptionRequest with request \(request) cannot be executed due to failing prepareForExecution()") + return + } + request.sentToClient = true + OneSignalClient.shared().execute(request) { _ in + removeFromQueue(request) + + // TODO: ... hydrate with returned identity object? + executePendingRequests() + + } onFailure: { error in + OneSignalLog.onesignalLog(.LL_ERROR, message: "OSUserExecutor executeTransferPushSubscriptionRequest failed with error: \(error.debugDescription)") + if let nsError = error as? NSError { + let responseType = OSNetworkingUtils.getResponseStatusType(nsError.code) + if responseType != .retryable { + // Fail, no retry, remove from cache and queue + removeFromQueue(request) + } + } + executePendingRequests() + } + } + + static func fetchUser(aliasLabel: String, aliasId: String, identityModel: OSIdentityModel, onNewSession: Bool = false) { + let request = OSRequestFetchUser(identityModel: identityModel, aliasLabel: aliasLabel, aliasId: aliasId, onNewSession: onNewSession) + + appendToQueue(request) + + executePendingRequests() + } + + static func executeFetchUserRequest(_ request: OSRequestFetchUser) { + guard !request.sentToClient else { + return + } + guard request.prepareForExecution() else { + // This should not happen as we set the alias to use for the request path + return + } + request.sentToClient = true + OneSignalClient.shared().execute(request) { response in + removeFromQueue(request) + + if let response = response { + // Clear local data in preparation for hydration + OneSignalUserManagerImpl.sharedInstance.clearUserData() + parseFetchUserResponse(response: response, identityModel: request.identityModel, originalPushToken: OneSignalUserManagerImpl.sharedInstance.token) + + // If this is a on-new-session's fetch user call, check that the subscription still exists + if request.onNewSession, + OneSignalUserManagerImpl.sharedInstance.isCurrentUser(request.identityModel), + let subId = OneSignalUserManagerImpl.sharedInstance.pushSubscriptionModel?.subscriptionId, + let subscriptionObjects = parseSubscriptionObjectResponse(response) + { + var subscriptionExists = false + for subModel in subscriptionObjects { + if subModel["id"] as? String == subId { + subscriptionExists = true + break + } + } + + if !subscriptionExists { + // This subscription probably has been deleted + OneSignalLog.onesignalLog(.LL_ERROR, message: "OSUserExecutor.executeFetchUserRequest found this device's push subscription gone, now send the push subscription to server.") + OneSignalUserManagerImpl.sharedInstance.pushSubscriptionModel?.subscriptionId = nil + OneSignalUserManagerImpl.sharedInstance.createPushSubscriptionRequest() + } + } + } + executePendingRequests() + } onFailure: { error in + OneSignalLog.onesignalLog(.LL_ERROR, message: "OSUserExecutor executeFetchUserRequest failed with error: \(error.debugDescription)") + if let nsError = error as? NSError { + let responseType = OSNetworkingUtils.getResponseStatusType(nsError.code) + if responseType == .missing { + removeFromQueue(request) + // Logout if the user in the SDK is the same + guard OneSignalUserManagerImpl.sharedInstance.isCurrentUser(request.identityModel) + else { + return + } + // The subscription has been deleted along with the user, so remove the subscription_id but keep the same push subscription model + OneSignalUserManagerImpl.sharedInstance.pushSubscriptionModel?.subscriptionId = nil + OneSignalUserManagerImpl.sharedInstance._logout() + } else if responseType != .retryable { + // If the error is not retryable, remove from cache and queue + removeFromQueue(request) + } + } + executePendingRequests() + } + } +} + +// MARK: - User Request Classes + +protocol OSUserRequest: OneSignalRequest, NSCoding { + var sentToClient: Bool { get set } + func prepareForExecution() -> Bool +} + +// TODO: Confirm the type of the things in the parameters field +// TODO: Don't hardcode the strings? + +/** + This request will be made with the minimum information needed. The payload will contain an externalId or no identities. + The push subscription may or may not have a token or suscriptionId already. + There will be no properties sent. + */ +class OSRequestCreateUser: OneSignalRequest, OSUserRequest { + var sentToClient = false + let stringDescription: String + override var description: String { + return stringDescription + } + + var identityModel: OSIdentityModel + var pushSubscriptionModel: OSSubscriptionModel + var originalPushToken: String? + + func prepareForExecution() -> Bool { + guard let appId = OneSignalConfigManager.getAppId() else { + OneSignalLog.onesignalLog(.LL_DEBUG, message: "Cannot generate the create user request due to null app ID.") + return false + } + self.addJWTHeader(identityModel: identityModel) + self.path = "apps/\(appId)/users" + // The pushSub doesn't need to have a token. + return true + } + + // When reading from the cache, update the push subscription model + func updatePushSubscriptionModel(_ pushSubscriptionModel: OSSubscriptionModel) { + self.pushSubscriptionModel = pushSubscriptionModel + self.parameters?["subscriptions"] = [pushSubscriptionModel.jsonRepresentation()] + self.originalPushToken = pushSubscriptionModel.address + } + + init(identityModel: OSIdentityModel, propertiesModel: OSPropertiesModel, pushSubscriptionModel: OSSubscriptionModel, originalPushToken: String?) { + self.identityModel = identityModel + self.pushSubscriptionModel = pushSubscriptionModel + self.originalPushToken = originalPushToken + self.stringDescription = "OSRequestCreateUser" + super.init() + + var params: [String: Any] = [:] + + // Identity Object + params["identity"] = [:] + if let externalId = identityModel.externalId { + params["identity"] = [OS_EXTERNAL_ID: externalId] + } + + // Properties Object + var propertiesObject: [String: Any] = [:] + propertiesObject["language"] = propertiesModel.language + propertiesObject["timezone_id"] = propertiesModel.timezoneId + params["properties"] = propertiesObject + + self.parameters = params + self.updatePushSubscriptionModel(pushSubscriptionModel) + self.method = POST + } + + func encode(with coder: NSCoder) { + coder.encode(identityModel, forKey: "identityModel") + coder.encode(pushSubscriptionModel, forKey: "pushSubscriptionModel") + coder.encode(originalPushToken, forKey: "originalPushToken") + coder.encode(parameters, forKey: "parameters") + coder.encode(method.rawValue, forKey: "method") // Encodes as String + coder.encode(path, forKey: "path") + coder.encode(timestamp, forKey: "timestamp") + } + + required init?(coder: NSCoder) { + guard + let identityModel = coder.decodeObject(forKey: "identityModel") as? OSIdentityModel, + let pushSubscriptionModel = coder.decodeObject(forKey: "pushSubscriptionModel") as? OSSubscriptionModel, + let parameters = coder.decodeObject(forKey: "parameters") as? [String: Any], + let rawMethod = coder.decodeObject(forKey: "method") as? UInt32, + let path = coder.decodeObject(forKey: "path") as? String, + let timestamp = coder.decodeObject(forKey: "timestamp") as? Date + else { + // Log error + return nil + } + self.identityModel = identityModel + self.pushSubscriptionModel = pushSubscriptionModel + self.originalPushToken = coder.decodeObject(forKey: "originalPushToken") as? String + self.stringDescription = "OSRequestCreateUser" + super.init() + self.parameters = parameters + self.method = HTTPMethod(rawValue: rawMethod) + self.path = path + self.timestamp = timestamp + } +} + +class OSRequestFetchIdentityBySubscription: OneSignalRequest, OSUserRequest { + var sentToClient = false + let stringDescription: String + + override var description: String { + return stringDescription + } + + var identityModel: OSIdentityModel + var pushSubscriptionModel: OSSubscriptionModel + + func prepareForExecution() -> Bool { + guard let appId = OneSignalConfigManager.getAppId() else { + OneSignalLog.onesignalLog(.LL_DEBUG, message: "Cannot generate the FetchIdentityBySubscription request due to null app ID.") + return false + } + + if let subscriptionId = pushSubscriptionModel.subscriptionId { + self.path = "apps/\(appId)/subscriptions/\(subscriptionId)/user/identity" + return true + } else { + // This is an error, and should never happen + OneSignalLog.onesignalLog(.LL_ERROR, message: "Cannot generate the FetchIdentityBySubscription request due to null subscriptionId.") + self.path = "" + return false + } + } + + init(identityModel: OSIdentityModel, pushSubscriptionModel: OSSubscriptionModel) { + self.identityModel = identityModel + self.pushSubscriptionModel = pushSubscriptionModel + self.stringDescription = "OSRequestFetchIdentityBySubscription with subscriptionId: \(pushSubscriptionModel.subscriptionId ?? "nil")" + super.init() + self.method = GET + } + + func encode(with coder: NSCoder) { + coder.encode(identityModel, forKey: "identityModel") + coder.encode(pushSubscriptionModel, forKey: "pushSubscriptionModel") + coder.encode(method.rawValue, forKey: "method") // Encodes as String + coder.encode(timestamp, forKey: "timestamp") + } + + required init?(coder: NSCoder) { + guard + let identityModel = coder.decodeObject(forKey: "identityModel") as? OSIdentityModel, + let pushSubscriptionModel = coder.decodeObject(forKey: "pushSubscriptionModel") as? OSSubscriptionModel, + let rawMethod = coder.decodeObject(forKey: "method") as? UInt32, + let timestamp = coder.decodeObject(forKey: "timestamp") as? Date + else { + // Log error + return nil + } + self.identityModel = identityModel + self.pushSubscriptionModel = pushSubscriptionModel + + self.stringDescription = "OSRequestFetchIdentityBySubscription with subscriptionId: \(pushSubscriptionModel.subscriptionId ?? "nil")" + super.init() + self.method = HTTPMethod(rawValue: rawMethod) + self.timestamp = timestamp + } +} + +/** + The `identityModelToIdentify` is used for the `onesignal_id` of the user we want to associate with this alias. + This request will tell us if we should continue with the previous user who is now identitfied, or to change users to the one this alias already exists on. + + Note: The SDK needs an user to operate on before this request returns. However, at the time of this request's creation, the SDK does not know if there is already an user associated with this alias. So, it creates a blank new user (whose identity model is passed in as `identityModelToUpdate`, + which is the model used to make a subsequent ``OSRequestFetchUser``). + */ +class OSRequestIdentifyUser: OneSignalRequest, OSUserRequest { + var sentToClient = false + let stringDescription: String + override var description: String { + return stringDescription + } + + var identityModelToIdentify: OSIdentityModel + var identityModelToUpdate: OSIdentityModel + let aliasLabel: String + let aliasId: String + + // requires a onesignal_id to send this request + func prepareForExecution() -> Bool { + if let onesignalId = identityModelToIdentify.onesignalId, let appId = OneSignalConfigManager.getAppId() { + self.addJWTHeader(identityModel: identityModelToIdentify) + self.path = "apps/\(appId)/users/by/\(OS_ONESIGNAL_ID)/\(onesignalId)/identity" + return true + } else { + // self.path is non-nil, so set to empty string + self.path = "" + return false + } + } + + /** + - Parameters: + - aliasLabel: The alias label we want to identify this user with. + - aliasId: The alias ID we want to identify this user with. + - identityModelToIdentify: Belongs to the user we want to identify with this alias. + - identityModelToUpdate: Belongs to the user we want to send in the subsequent ``OSRequestFetchUser`` that is made when this request returns. + */ + init(aliasLabel: String, aliasId: String, identityModelToIdentify: OSIdentityModel, identityModelToUpdate: OSIdentityModel) { + self.identityModelToIdentify = identityModelToIdentify + self.identityModelToUpdate = identityModelToUpdate + self.aliasLabel = aliasLabel + self.aliasId = aliasId + self.stringDescription = "OSRequestIdentifyUser with aliasLabel: \(aliasLabel) aliasId: \(aliasId)" + super.init() + self.parameters = ["identity": [aliasLabel: aliasId]] + self.method = PATCH + _ = prepareForExecution() // sets the path property + } + + func encode(with coder: NSCoder) { + coder.encode(identityModelToIdentify, forKey: "identityModelToIdentify") + coder.encode(identityModelToUpdate, forKey: "identityModelToUpdate") + coder.encode(aliasLabel, forKey: "aliasLabel") + coder.encode(aliasId, forKey: "aliasId") + coder.encode(parameters, forKey: "parameters") + coder.encode(method.rawValue, forKey: "method") // Encodes as String + coder.encode(timestamp, forKey: "timestamp") + } + + required init?(coder: NSCoder) { + guard + let identityModelToIdentify = coder.decodeObject(forKey: "identityModelToIdentify") as? OSIdentityModel, + let identityModelToUpdate = coder.decodeObject(forKey: "identityModelToUpdate") as? OSIdentityModel, + let aliasLabel = coder.decodeObject(forKey: "aliasLabel") as? String, + let aliasId = coder.decodeObject(forKey: "aliasId") as? String, + let parameters = coder.decodeObject(forKey: "parameters") as? [String: [String: String]], + let rawMethod = coder.decodeObject(forKey: "method") as? UInt32, + let timestamp = coder.decodeObject(forKey: "timestamp") as? Date + else { + // Log error + return nil + } + self.identityModelToIdentify = identityModelToIdentify + self.identityModelToUpdate = identityModelToUpdate + self.aliasLabel = aliasLabel + self.aliasId = aliasId + self.stringDescription = "OSRequestIdentifyUser with aliasLabel: \(aliasLabel) aliasId: \(aliasId)" + super.init() + self.timestamp = timestamp + self.parameters = parameters + self.method = HTTPMethod(rawValue: rawMethod) + _ = prepareForExecution() + } +} + +/** + If an alias is passed in, it will be used to fetch the user. If not, then by default, use the `onesignal_id` in the `identityModel` to fetch the user. + The `identityModel` is also used to reference the user that is updated with the response. + */ +class OSRequestFetchUser: OneSignalRequest, OSUserRequest { + var sentToClient = false + let stringDescription: String + override var description: String { + return stringDescription + } + + let identityModel: OSIdentityModel + let aliasLabel: String + let aliasId: String + let onNewSession: Bool + + func prepareForExecution() -> Bool { + guard let appId = OneSignalConfigManager.getAppId() else { + OneSignalLog.onesignalLog(.LL_DEBUG, message: "Cannot generate the fetch user request due to null app ID.") + return false + } + self.addJWTHeader(identityModel: identityModel) + self.path = "apps/\(appId)/users/by/\(aliasLabel)/\(aliasId)" + return true + } + + init(identityModel: OSIdentityModel, aliasLabel: String, aliasId: String, onNewSession: Bool) { + self.identityModel = identityModel + self.aliasLabel = aliasLabel + self.aliasId = aliasId + self.onNewSession = onNewSession + self.stringDescription = "OSRequestFetchUser with aliasLabel: \(aliasLabel) aliasId: \(aliasId)" + super.init() + self.method = GET + _ = prepareForExecution() // sets the path property + } + + func encode(with coder: NSCoder) { + coder.encode(aliasLabel, forKey: "aliasLabel") + coder.encode(aliasId, forKey: "aliasId") + coder.encode(identityModel, forKey: "identityModel") + coder.encode(onNewSession, forKey: "onNewSession") + coder.encode(method.rawValue, forKey: "method") // Encodes as String + coder.encode(timestamp, forKey: "timestamp") + } + + required init?(coder: NSCoder) { + guard + let identityModel = coder.decodeObject(forKey: "identityModel") as? OSIdentityModel, + let aliasLabel = coder.decodeObject(forKey: "aliasLabel") as? String, + let aliasId = coder.decodeObject(forKey: "aliasId") as? String, + let rawMethod = coder.decodeObject(forKey: "method") as? UInt32, + let timestamp = coder.decodeObject(forKey: "timestamp") as? Date + else { + // Log error + return nil + } + self.identityModel = identityModel + self.aliasLabel = aliasLabel + self.aliasId = aliasId + self.onNewSession = coder.decodeBool(forKey: "onNewSession") + self.stringDescription = "OSRequestFetchUser with aliasLabel: \(aliasLabel) aliasId: \(aliasId)" + super.init() + self.method = HTTPMethod(rawValue: rawMethod) + self.timestamp = timestamp + _ = prepareForExecution() + } +} + +class OSRequestAddAliases: OneSignalRequest, OSUserRequest { + var sentToClient = false + let stringDescription: String + override var description: String { + return stringDescription + } + + var identityModel: OSIdentityModel + let aliases: [String: String] + + // requires a `onesignal_id` to send this request + func prepareForExecution() -> Bool { + if let onesignalId = identityModel.onesignalId, let appId = OneSignalConfigManager.getAppId() { + self.addJWTHeader(identityModel: identityModel) + self.path = "apps/\(appId)/users/by/\(OS_ONESIGNAL_ID)/\(onesignalId)/identity" + return true + } else { + // self.path is non-nil, so set to empty string + self.path = "" + return false + } + } + + init(aliases: [String: String], identityModel: OSIdentityModel) { + self.identityModel = identityModel + self.aliases = aliases + self.stringDescription = "OSRequestAddAliases with aliases: \(aliases)" + super.init() + self.parameters = ["identity": aliases] + self.method = PATCH + _ = prepareForExecution() // sets the path property + } + + func encode(with coder: NSCoder) { + coder.encode(identityModel, forKey: "identityModel") + coder.encode(aliases, forKey: "aliases") + coder.encode(parameters, forKey: "parameters") + coder.encode(method.rawValue, forKey: "method") // Encodes as String + coder.encode(timestamp, forKey: "timestamp") + } + + required init?(coder: NSCoder) { + guard + let identityModel = coder.decodeObject(forKey: "identityModel") as? OSIdentityModel, + let aliases = coder.decodeObject(forKey: "aliases") as? [String: String], + let rawMethod = coder.decodeObject(forKey: "method") as? UInt32, + let parameters = coder.decodeObject(forKey: "parameters") as? [String: [String: String]], + let timestamp = coder.decodeObject(forKey: "timestamp") as? Date + else { + // Log error + return nil + } + self.identityModel = identityModel + self.aliases = aliases + self.stringDescription = "OSRequestAddAliases with parameters: \(parameters)" + super.init() + self.parameters = parameters + self.method = HTTPMethod(rawValue: rawMethod) + self.timestamp = timestamp + _ = prepareForExecution() + } +} + +class OSRequestRemoveAlias: OneSignalRequest, OSUserRequest { + var sentToClient = false + let stringDescription: String + override var description: String { + return stringDescription + } + + let labelToRemove: String + var identityModel: OSIdentityModel + + func prepareForExecution() -> Bool { + if let onesignalId = identityModel.onesignalId, let appId = OneSignalConfigManager.getAppId() { + self.addJWTHeader(identityModel: identityModel) + self.path = "apps/\(appId)/users/by/\(OS_ONESIGNAL_ID)/\(onesignalId)/identity/\(labelToRemove)" + return true + } else { + // self.path is non-nil, so set to empty string + self.path = "" + return false + } + } + + init(labelToRemove: String, identityModel: OSIdentityModel) { + self.labelToRemove = labelToRemove + self.identityModel = identityModel + self.stringDescription = "OSRequestRemoveAlias with aliasLabel: \(labelToRemove)" + super.init() + self.method = DELETE + _ = prepareForExecution() // sets the path property + } + + func encode(with coder: NSCoder) { + coder.encode(labelToRemove, forKey: "labelToRemove") + coder.encode(identityModel, forKey: "identityModel") + coder.encode(method.rawValue, forKey: "method") // Encodes as String + coder.encode(timestamp, forKey: "timestamp") + } + + required init?(coder: NSCoder) { + guard + let labelToRemove = coder.decodeObject(forKey: "labelToRemove") as? String, + let identityModel = coder.decodeObject(forKey: "identityModel") as? OSIdentityModel, + let rawMethod = coder.decodeObject(forKey: "method") as? UInt32, + let timestamp = coder.decodeObject(forKey: "timestamp") as? Date + else { + // Log error + return nil + } + self.labelToRemove = labelToRemove + self.identityModel = identityModel + self.stringDescription = "OSRequestRemoveAlias with aliasLabel: \(labelToRemove)" + super.init() + self.method = HTTPMethod(rawValue: rawMethod) + self.timestamp = timestamp + _ = prepareForExecution() + } +} + +class OSRequestUpdateProperties: OneSignalRequest, OSUserRequest { + var sentToClient = false + let stringDescription: String + override var description: String { + return stringDescription + } + + // TODO: does updating properties even have a response in which we need to hydrate from? Then we can get rid of modelToUpdate + // Yes we may, if we cleared local state + var modelToUpdate: OSPropertiesModel + var identityModel: OSIdentityModel + + // TODO: Decide if addPushSubscriptionIdToAdditionalHeadersIfNeeded should block. + // Note Android adds it to requests, if the push sub ID exists + func prepareForExecution() -> Bool { + if let onesignalId = identityModel.onesignalId, + let appId = OneSignalConfigManager.getAppId(), + addPushSubscriptionIdToAdditionalHeadersIfNeeded() { + self.addJWTHeader(identityModel: identityModel) + self.path = "apps/\(appId)/users/by/\(OS_ONESIGNAL_ID)/\(onesignalId)" + return true + } else { + // self.path is non-nil, so set to empty string + self.path = "" + return false + } + } + + func addPushSubscriptionIdToAdditionalHeadersIfNeeded() -> Bool { + guard let parameters = self.parameters else { + return true + } + if parameters["deltas"] != nil { // , !parameters["deltas"].isEmpty + if let pushSubscriptionId = OneSignalUserManagerImpl.sharedInstance.pushSubscriptionId { + var additionalHeaders = self.additionalHeaders ?? [String: String]() + additionalHeaders["OneSignal-Subscription-Id"] = pushSubscriptionId + self.additionalHeaders = additionalHeaders + return true + } else { + return false + } + } + return true + } + + init(properties: [String: Any], deltas: [String: Any]?, refreshDeviceMetadata: Bool?, modelToUpdate: OSPropertiesModel, identityModel: OSIdentityModel) { + self.modelToUpdate = modelToUpdate + self.identityModel = identityModel + self.stringDescription = "OSRequestUpdateProperties with properties: \(properties) deltas: \(String(describing: deltas)) refreshDeviceMetadata: \(String(describing: refreshDeviceMetadata))" + super.init() + + var propertiesObject = properties + if let location = propertiesObject["location"] as? OSLocationPoint { + propertiesObject["lat"] = location.lat + propertiesObject["long"] = location.long + propertiesObject.removeValue(forKey: "location") + } + var params: [String: Any] = [:] + params["properties"] = propertiesObject + params["refresh_device_metadata"] = refreshDeviceMetadata + if let deltas = deltas { + params["deltas"] = deltas + } + self.parameters = params + self.method = PATCH + _ = prepareForExecution() // sets the path property + } + + func encode(with coder: NSCoder) { + coder.encode(modelToUpdate, forKey: "modelToUpdate") + coder.encode(identityModel, forKey: "identityModel") + coder.encode(parameters, forKey: "parameters") + coder.encode(method.rawValue, forKey: "method") // Encodes as String + coder.encode(timestamp, forKey: "timestamp") + } + + required init?(coder: NSCoder) { + guard + let modelToUpdate = coder.decodeObject(forKey: "modelToUpdate") as? OSPropertiesModel, + let identityModel = coder.decodeObject(forKey: "identityModel") as? OSIdentityModel, + let rawMethod = coder.decodeObject(forKey: "method") as? UInt32, + let parameters = coder.decodeObject(forKey: "parameters") as? [String: Any], + let timestamp = coder.decodeObject(forKey: "timestamp") as? Date + else { + // Log error + return nil + } + self.modelToUpdate = modelToUpdate + self.identityModel = identityModel + self.stringDescription = "OSRequestUpdateProperties with parameters: \(parameters)" + super.init() + self.parameters = parameters + self.method = HTTPMethod(rawValue: rawMethod) + self.timestamp = timestamp + _ = prepareForExecution() + } +} + +/** + Primary uses of this request are for adding Email and SMS subscriptions. Push subscriptions typically won't be created using + this request because they will be created with ``OSRequestCreateUser``. However, if we detect that this device's + push subscription is ever deleted, we will make a request to create it again. + */ +class OSRequestCreateSubscription: OneSignalRequest, OSUserRequest { + var sentToClient = false + let stringDescription: String + override var description: String { + return stringDescription + } + + var subscriptionModel: OSSubscriptionModel + var identityModel: OSIdentityModel + + // Need the onesignal_id of the user + func prepareForExecution() -> Bool { + if let onesignalId = identityModel.onesignalId, let appId = OneSignalConfigManager.getAppId() { + self.addJWTHeader(identityModel: identityModel) + self.path = "apps/\(appId)/users/by/\(OS_ONESIGNAL_ID)/\(onesignalId)/subscriptions" + return true + } else { + self.path = "" // self.path is non-nil, so set to empty string + return false + } + } + + init(subscriptionModel: OSSubscriptionModel, identityModel: OSIdentityModel) { + self.subscriptionModel = subscriptionModel + self.identityModel = identityModel + self.stringDescription = "OSRequestCreateSubscription with subscriptionModel: \(subscriptionModel.address ?? "nil")" + super.init() + self.parameters = ["subscription": subscriptionModel.jsonRepresentation()] + self.method = POST + _ = prepareForExecution() // sets the path property + } + + func encode(with coder: NSCoder) { + coder.encode(subscriptionModel, forKey: "subscriptionModel") + coder.encode(identityModel, forKey: "identityModel") + coder.encode(parameters, forKey: "parameters") + coder.encode(method.rawValue, forKey: "method") // Encodes as String + coder.encode(timestamp, forKey: "timestamp") + } + + required init?(coder: NSCoder) { + guard + let subscriptionModel = coder.decodeObject(forKey: "subscriptionModel") as? OSSubscriptionModel, + let identityModel = coder.decodeObject(forKey: "identityModel") as? OSIdentityModel, + let rawMethod = coder.decodeObject(forKey: "method") as? UInt32, + let parameters = coder.decodeObject(forKey: "parameters") as? [String: Any], + let timestamp = coder.decodeObject(forKey: "timestamp") as? Date + else { + // Log error + return nil + } + self.subscriptionModel = subscriptionModel + self.identityModel = identityModel + self.stringDescription = "OSRequestCreateSubscription with subscriptionModel: \(subscriptionModel.address ?? "nil")" + super.init() + self.parameters = parameters + self.method = HTTPMethod(rawValue: rawMethod) + self.timestamp = timestamp + _ = prepareForExecution() + } +} + +/** + Transfers the Subscription specified by the subscriptionId to the User identified by the identity in the payload. + Only one entry is allowed, `onesignal_id` or an Alias. We will use the alias specified. + The anticipated usage of this request is only for push subscriptions. + */ +class OSRequestTransferSubscription: OneSignalRequest, OSUserRequest { + var sentToClient = false + let stringDescription: String + override var description: String { + return stringDescription + } + + var subscriptionModel: OSSubscriptionModel + let aliasLabel: String + let aliasId: String + + // Need an alias and subscription_id + func prepareForExecution() -> Bool { + if let subscriptionId = subscriptionModel.subscriptionId, let appId = OneSignalConfigManager.getAppId() { + self.path = "apps/\(appId)/subscriptions/\(subscriptionId)/owner" + // TODO: self.addJWTHeader(identityModel: identityModel) ?? + return true + } else { + self.path = "" // self.path is non-nil, so set to empty string + return false + } + } + + /** + Must pass an Alias pair to identify the User. + */ + init( + subscriptionModel: OSSubscriptionModel, + aliasLabel: String, + aliasId: String + ) { + self.subscriptionModel = subscriptionModel + self.aliasLabel = aliasLabel + self.aliasId = aliasId + self.stringDescription = "OSRequestTransferSubscription" + super.init() + self.parameters = ["identity": [aliasLabel: aliasId]] + self.method = PATCH + _ = prepareForExecution() // sets the path property + } + + func encode(with coder: NSCoder) { + coder.encode(subscriptionModel, forKey: "subscriptionModel") + coder.encode(aliasLabel, forKey: "aliasLabel") + coder.encode(aliasId, forKey: "aliasId") + coder.encode(parameters, forKey: "parameters") + coder.encode(method.rawValue, forKey: "method") // Encodes as String + coder.encode(timestamp, forKey: "timestamp") + } + + required init?(coder: NSCoder) { + guard + let subscriptionModel = coder.decodeObject(forKey: "subscriptionModel") as? OSSubscriptionModel, + let aliasLabel = coder.decodeObject(forKey: "aliasLabel") as? String, + let aliasId = coder.decodeObject(forKey: "aliasId") as? String, + let rawMethod = coder.decodeObject(forKey: "method") as? UInt32, + let parameters = coder.decodeObject(forKey: "parameters") as? [String: Any], + let timestamp = coder.decodeObject(forKey: "timestamp") as? Date + else { + // Log error + return nil + } + self.subscriptionModel = subscriptionModel + self.aliasLabel = aliasLabel + self.aliasId = aliasId + self.stringDescription = "OSRequestTransferSubscription" + super.init() + self.parameters = parameters + self.method = HTTPMethod(rawValue: rawMethod) + self.timestamp = timestamp + _ = prepareForExecution() + } +} + +/** + Currently, only the Push Subscription will make this Update Request. + */ +class OSRequestUpdateSubscription: OneSignalRequest, OSUserRequest { + var sentToClient = false + let stringDescription: String + override var description: String { + return stringDescription + } + + var subscriptionModel: OSSubscriptionModel + + // Need the subscription_id + func prepareForExecution() -> Bool { + if let subscriptionId = subscriptionModel.subscriptionId, let appId = OneSignalConfigManager.getAppId() { + self.path = "apps/\(appId)/subscriptions/\(subscriptionId)" + return true + } else { + self.path = "" // self.path is non-nil, so set to empty string + return false + } + } + + // TODO: just need the sub model and send it + // But the model may be outdated or not sync with the subscriptionObject + init(subscriptionObject: [String: Any], subscriptionModel: OSSubscriptionModel) { + self.subscriptionModel = subscriptionModel + self.stringDescription = "OSRequestUpdateSubscription with subscriptionObject: \(subscriptionObject)" + super.init() + + // Rename "address" key as "token", if it exists + var subscriptionParams = subscriptionObject + subscriptionParams.removeValue(forKey: "address") + subscriptionParams.removeValue(forKey: "notificationTypes") + subscriptionParams["token"] = subscriptionModel.address + subscriptionParams["device_os"] = subscriptionModel.deviceOs + subscriptionParams["sdk"] = subscriptionModel.sdk + subscriptionParams["app_version"] = subscriptionModel.appVersion + + // notificationTypes defaults to -1 instead of nil, don't send if it's -1 + if subscriptionModel.notificationTypes != -1 { + subscriptionParams["notification_types"] = subscriptionModel.notificationTypes + } + + subscriptionParams["enabled"] = subscriptionModel.enabled + // TODO: The above is not quite right. If we hydrate, we will over-write any pending updates + // May use subscriptionObject, but enabled and notification_types should be sent together... + + self.parameters = ["subscription": subscriptionParams] + self.method = PATCH + _ = prepareForExecution() // sets the path property + } + + func encode(with coder: NSCoder) { + coder.encode(subscriptionModel, forKey: "subscriptionModel") + coder.encode(parameters, forKey: "parameters") + coder.encode(method.rawValue, forKey: "method") // Encodes as String + coder.encode(timestamp, forKey: "timestamp") + } + + required init?(coder: NSCoder) { + guard + let subscriptionModel = coder.decodeObject(forKey: "subscriptionModel") as? OSSubscriptionModel, + let rawMethod = coder.decodeObject(forKey: "method") as? UInt32, + let parameters = coder.decodeObject(forKey: "parameters") as? [String: Any], + let timestamp = coder.decodeObject(forKey: "timestamp") as? Date + else { + // Log error + return nil + } + self.subscriptionModel = subscriptionModel + self.stringDescription = "OSRequestUpdateSubscription with parameters: \(parameters)" + super.init() + self.parameters = parameters + self.method = HTTPMethod(rawValue: rawMethod) + self.timestamp = timestamp + _ = prepareForExecution() + } +} + +/** + Delete the subscription specified by the `subscriptionId` in the `subscriptionModel`. + Prior to the creation of this request, this model has already been removed from the model store. + - Remark: If this model did not already exist in the store, no request is created. + */ +class OSRequestDeleteSubscription: OneSignalRequest, OSUserRequest { + var sentToClient = false + let stringDescription: String + override var description: String { + return stringDescription + } + + var subscriptionModel: OSSubscriptionModel + + // Need the subscription_id + func prepareForExecution() -> Bool { + if let subscriptionId = subscriptionModel.subscriptionId, let appId = OneSignalConfigManager.getAppId() { + self.path = "apps/\(appId)/subscriptions/\(subscriptionId)" + return true + } else { + // self.path is non-nil, so set to empty string + self.path = "" + return false + } + } + + init(subscriptionModel: OSSubscriptionModel) { + self.subscriptionModel = subscriptionModel + self.stringDescription = "OSRequestDeleteSubscription with subscriptionModel: \(subscriptionModel.address ?? "nil")" + super.init() + self.method = DELETE + _ = prepareForExecution() // sets the path property + } + + func encode(with coder: NSCoder) { + coder.encode(subscriptionModel, forKey: "subscriptionModel") + coder.encode(method.rawValue, forKey: "method") // Encodes as String + coder.encode(timestamp, forKey: "timestamp") + } + + required init?(coder: NSCoder) { + guard + let subscriptionModel = coder.decodeObject(forKey: "subscriptionModel") as? OSSubscriptionModel, + let rawMethod = coder.decodeObject(forKey: "method") as? UInt32, + let timestamp = coder.decodeObject(forKey: "timestamp") as? Date + else { + // Log error + return nil + } + self.subscriptionModel = subscriptionModel + self.stringDescription = "OSRequestDeleteSubscription with subscriptionModel: \(subscriptionModel.address ?? "nil")" + super.init() + self.method = HTTPMethod(rawValue: rawMethod) + self.timestamp = timestamp + _ = prepareForExecution() + } +} + +internal extension OneSignalRequest { + func addJWTHeader(identityModel: OSIdentityModel) { +// guard let token = identityModel.jwtBearerToken else { +// return +// } +// var additionalHeaders = self.additionalHeaders ?? [String:String]() +// additionalHeaders["Authorization"] = "Bearer \(token)" +// self.additionalHeaders = additionalHeaders + } +} diff --git a/iOS_SDK/OneSignalSDK/OneSignalUser/Source/OneSignalUser.h b/iOS_SDK/OneSignalSDK/OneSignalUser/Source/OneSignalUser.h new file mode 100644 index 000000000..e677dada3 --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignalUser/Source/OneSignalUser.h @@ -0,0 +1,34 @@ +/* + Modified MIT License + + Copyright 2022 OneSignal + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + 1. The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + 2. All copies of substantial portions of the Software may only be used in connection + with services provided by OneSignal. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + */ + +#import + +//! Project version number for OneSignalUser. +FOUNDATION_EXPORT double OneSignalUserVersionNumber; + +//! Project version string for OneSignalUser. +FOUNDATION_EXPORT const unsigned char OneSignalUserVersionString[]; diff --git a/iOS_SDK/OneSignalSDK/OneSignalUser/Source/OneSignalUserManagerImpl.swift b/iOS_SDK/OneSignalSDK/OneSignalUser/Source/OneSignalUserManagerImpl.swift new file mode 100644 index 000000000..cf694a1b4 --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignalUser/Source/OneSignalUserManagerImpl.swift @@ -0,0 +1,810 @@ +/* + Modified MIT License + + Copyright 2022 OneSignal + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + 1. The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + 2. All copies of substantial portions of the Software may only be used in connection + with services provided by OneSignal. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + */ + +import OneSignalCore +import OneSignalOSCore +import OneSignalNotifications + +/** + Public-facing API to access the User Manager. + */ +@objc protocol OneSignalUserManager { + // swiftlint:disable identifier_name + var User: OSUser { get } + func login(externalId: String, token: String?) + func logout() + // Location + func setLocation(latitude: Float, longitude: Float) + // Purchase Tracking + func sendPurchases(_ purchases: [[String: AnyObject]]) +} + +/** + This is the user interface exposed to the public. + */ +@objc public protocol OSUser { + var pushSubscription: OSPushSubscription { get } + // Aliases + func addAlias(label: String, id: String) + func addAliases(_ aliases: [String: String]) + func removeAlias(_ label: String) + func removeAliases(_ labels: [String]) + // Tags + func addTag(key: String, value: String) + func addTags(_ tags: [String: String]) + func removeTag(_ tag: String) + func removeTags(_ tags: [String]) + // Email + func addEmail(_ email: String) + func removeEmail(_ email: String) + // SMS + func addSms(_ number: String) + func removeSms(_ number: String) + // Language + func setLanguage(_ language: String) + // JWT Token Expire + typealias OSJwtCompletionBlock = (_ newJwtToken: String) -> Void + typealias OSJwtExpiredHandler = (_ externalId: String, _ completion: OSJwtCompletionBlock) -> Void + func onJwtExpired(expiredHandler: @escaping OSJwtExpiredHandler) +} + +/** + This is the push subscription interface exposed to the public. + */ +@objc public protocol OSPushSubscription { + var id: String? { get } + var token: String? { get } + var optedIn: Bool { get } + + func optIn() + func optOut() + func addObserver(_ observer: OSPushSubscriptionObserver) + func removeObserver(_ observer: OSPushSubscriptionObserver) +} + +@objc +public class OneSignalUserManagerImpl: NSObject, OneSignalUserManager { + @objc public static let sharedInstance = OneSignalUserManagerImpl() + + @objc public var onesignalId: String? { + return _user?.identityModel.onesignalId + } + + /** + Convenience accessor. We access the push subscription model via the model store instead of via`user.pushSubscriptionModel`. + If privacy consent is set in a wrong order, we may have sent requests, but hydrate on a mock user. + However, we want to set tokens and subscription ID on the actual push subscription model. + */ + var pushSubscriptionModel: OSSubscriptionModel? { + return pushSubscriptionModelStore.getModel(key: OS_PUSH_SUBSCRIPTION_MODEL_KEY) + } + + @objc public var pushSubscriptionId: String? { + return _user?.pushSubscriptionModel.subscriptionId + } + + @objc public var language: String? { + return _user?.propertiesModel.language + } + + private var hasCalledStart = false + + private var jwtExpiredHandler: OSJwtExpiredHandler? + + var user: OSUserInternal { + guard !OneSignalConfigManager.shouldAwaitAppIdAndLogMissingPrivacyConsent(forMethod: nil) else { + return _mockUser + } + start() + if let user = _user { + return user + } + + // There is no user instance, initialize a "guest user" + let user = _login(externalId: nil, token: nil) + _user = user + return user + } + + private var _user: OSUserInternal? + + // This is a user instance to operate on when there is no app_id and/or privacy consent yet, effectively no-op. + // The models are not added to any model stores. + private let _mockUser = OSUserInternalImpl( + identityModel: OSIdentityModel(aliases: nil, changeNotifier: OSEventProducer()), + propertiesModel: OSPropertiesModel(changeNotifier: OSEventProducer()), + pushSubscriptionModel: OSSubscriptionModel(type: .push, address: nil, subscriptionId: nil, reachable: false, isDisabled: true, changeNotifier: OSEventProducer())) + + @objc public var requiresUserAuth = false + + // Push Subscription + private var _pushSubscriptionStateChangesObserver: OSObservable? + var pushSubscriptionStateChangesObserver: OSObservable { + if let observer = _pushSubscriptionStateChangesObserver { + return observer + } + let pushSubscriptionStateChangesObserver = OSObservable(change: #selector(OSPushSubscriptionObserver.onPushSubscriptionDidChange(state:))) + _pushSubscriptionStateChangesObserver = pushSubscriptionStateChangesObserver + + return pushSubscriptionStateChangesObserver + } + + // Model Stores + let identityModelStore = OSModelStore(changeSubscription: OSEventProducer(), storeKey: OS_IDENTITY_MODEL_STORE_KEY).registerAsUserObserver() + let propertiesModelStore = OSModelStore(changeSubscription: OSEventProducer(), storeKey: OS_PROPERTIES_MODEL_STORE_KEY).registerAsUserObserver() + // Holds email and sms subscription models + let subscriptionModelStore = OSModelStore(changeSubscription: OSEventProducer(), storeKey: OS_SUBSCRIPTION_MODEL_STORE_KEY).registerAsUserObserver() + // Holds a single push subscription model + let pushSubscriptionModelStore = OSModelStore(changeSubscription: OSEventProducer(), storeKey: OS_PUSH_SUBSCRIPTION_MODEL_STORE_KEY) + + // These must be initialized in init() + let identityModelStoreListener: OSIdentityModelStoreListener + let propertiesModelStoreListener: OSPropertiesModelStoreListener + let subscriptionModelStoreListener: OSSubscriptionModelStoreListener + let pushSubscriptionModelStoreListener: OSSubscriptionModelStoreListener + + // Executors must be initialize after sharedInstance is initialized + var propertyExecutor: OSPropertyOperationExecutor? + var identityExecutor: OSIdentityOperationExecutor? + var subscriptionExecutor: OSSubscriptionOperationExecutor? + + private override init() { + self.identityModelStoreListener = OSIdentityModelStoreListener(store: identityModelStore) + self.propertiesModelStoreListener = OSPropertiesModelStoreListener(store: propertiesModelStore) + self.subscriptionModelStoreListener = OSSubscriptionModelStoreListener(store: subscriptionModelStore) + self.pushSubscriptionModelStoreListener = OSSubscriptionModelStoreListener(store: pushSubscriptionModelStore) + } + + // TODO: This method is called A LOT, check if all calls are needed. + @objc + public func start() { + guard !OneSignalConfigManager.shouldAwaitAppIdAndLogMissingPrivacyConsent(forMethod: nil) else { + return + } + guard !hasCalledStart else { + return + } + + hasCalledStart = true + OneSignalLog.onesignalLog(.LL_VERBOSE, message: "OneSignalUserManager calling start") + + OSNotificationsManager.delegate = self + + var hasCachedUser = false + + // Path 1. Load user from cache, if any + // Corrupted state if any of these models exist without the others + if let identityModel = identityModelStore.getModels()[OS_IDENTITY_MODEL_KEY], + let propertiesModel = propertiesModelStore.getModels()[OS_PROPERTIES_MODEL_KEY], + let pushSubscription = pushSubscriptionModelStore.getModels()[OS_PUSH_SUBSCRIPTION_MODEL_KEY] { + hasCachedUser = true + _user = OSUserInternalImpl(identityModel: identityModel, propertiesModel: propertiesModel, pushSubscriptionModel: pushSubscription) + OneSignalLog.onesignalLog(.LL_VERBOSE, message: "OneSignalUserManager.start called, loaded the user from cache.") + } + + // TODO: Update the push sub model with any new state from NotificationsManager + + // Setup the executors + OSUserExecutor.start() + OSOperationRepo.sharedInstance.start() + + // Cannot initialize these executors in `init` as they reference the sharedInstance + let propertyExecutor = OSPropertyOperationExecutor() + let identityExecutor = OSIdentityOperationExecutor() + let subscriptionExecutor = OSSubscriptionOperationExecutor() + self.propertyExecutor = propertyExecutor + self.identityExecutor = identityExecutor + self.subscriptionExecutor = subscriptionExecutor + OSOperationRepo.sharedInstance.addExecutor(identityExecutor) + OSOperationRepo.sharedInstance.addExecutor(propertyExecutor) + OSOperationRepo.sharedInstance.addExecutor(subscriptionExecutor) + + // Path 2. There is a legacy player to migrate + if let legacyPlayerId = OneSignalUserDefaults.initShared().getSavedString(forKey: OSUD_LEGACY_PLAYER_ID, defaultValue: nil) { + OneSignalLog.onesignalLog(.LL_DEBUG, message: "OneSignalUserManager: creating user linked to legacy subscription \(legacyPlayerId)") + createUserFromLegacyPlayer(legacyPlayerId) + OneSignalUserDefaults.initStandard().removeValue(forKey: OSUD_LEGACY_PLAYER_ID) + OneSignalUserDefaults.initShared().removeValue(forKey: OSUD_LEGACY_PLAYER_ID) + } else { + // Path 3. Creates an anonymous user if there isn't one in the cache nor a legacy player + createUserIfNil() + } + + // Model store listeners subscribe to their models + identityModelStoreListener.start() + propertiesModelStoreListener.start() + subscriptionModelStoreListener.start() + pushSubscriptionModelStoreListener.start() + if hasCachedUser { + _user?.pushSubscriptionModel.update() + } + } + + @objc + public func login(externalId: String, token: String?) { + guard !OneSignalConfigManager.shouldAwaitAppIdAndLogMissingPrivacyConsent(forMethod: nil) else { + return + } + start() + guard externalId != "" else { + // Log error + return + } + OneSignalLog.onesignalLog(.LL_VERBOSE, message: "OneSignal.User login called with externalId: \(externalId)") + _ = _login(externalId: externalId, token: token) + } + + /** + Converting a 3.x player to a 5.x user. There is a cached legacy player, so we will create the user based on the legacy player ID. + */ + private func createUserFromLegacyPlayer(_ playerId: String) { + // 1. Create the Push Subscription Model + let pushSubscriptionModel = createDefaultPushSubscription(subscriptionId: playerId) + + // 2. Set the internal user + let newUser = setNewInternalUser(externalId: nil, pushSubscriptionModel: pushSubscriptionModel) + + // 3. Make the request + OSUserExecutor.fetchIdentityBySubscription(newUser) + } + + private func createNewUser(externalId: String?, token: String?) -> OSUserInternal { + guard !OneSignalConfigManager.shouldAwaitAppIdAndLogMissingPrivacyConsent(forMethod: nil) else { + return _mockUser + } + + // Check if the existing user is the same one being logged in. If so, return. + if let user = _user { + guard user.identityModel.externalId != externalId || externalId == nil else { + OneSignalLog.onesignalLog(.LL_VERBOSE, message: "OneSignalUserManager.createNewUser: not creating new user due to logging into the same user.)") + return user + } + } + + let pushSubscriptionModel = pushSubscriptionModelStore.getModel(key: OS_PUSH_SUBSCRIPTION_MODEL_KEY) + + // prepareForNewUser may be already called by logout, so we don't want to call it again. Also, there should be no need to call this method if there is no user. + if _user != nil { + prepareForNewUser() + } + + let newUser = setNewInternalUser(externalId: externalId, pushSubscriptionModel: pushSubscriptionModel) + newUser.identityModel.jwtBearerToken = token + OSUserExecutor.createUser(newUser) + return self.user + } + + /** + The current user in the SDK is an anonymous user, and we are logging in with an externalId. + + There are two scenarios addressed: + 1. This externalId already exists on another user. We create a new SDK user and fetch that user's information. + 2. This externalId doesn't exist on any users. We successfully identify the user, but we still create a new SDK user and fetch to update it. + */ + private func identifyUser(externalId: String, currentUser: OSUserInternal) { + guard !OneSignalConfigManager.shouldAwaitAppIdAndLogMissingPrivacyConsent(forMethod: nil) else { + return + } + + // Get the identity model of the current user + let identityModelToIdentify = currentUser.identityModel + + // Immediately drop the old user and set a new user in the SDK + let pushSubscriptionModel = pushSubscriptionModelStore.getModel(key: OS_PUSH_SUBSCRIPTION_MODEL_KEY) + prepareForNewUser() + let newUser = setNewInternalUser(externalId: externalId, pushSubscriptionModel: pushSubscriptionModel) + + // Now proceed to identify the previous user + OSUserExecutor.identifyUser( + externalId: externalId, + identityModelToIdentify: identityModelToIdentify, + identityModelToUpdate: newUser.identityModel + ) + } + + /** + Returns if the OSIdentityModel passed in belongs to the current user. This method is used in deciding whether or not to hydrate via a server response, for example. + */ + func isCurrentUser(_ identityModel: OSIdentityModel) -> Bool { + return self.identityModelStore.getModel(modelId: identityModel.modelId) != nil + } + + /** + Clears the existing user's data in preparation for hydration via a fetch user call. + */ + func clearUserData() { + // Identity and property models should still be the same instances, but with data cleared + _user?.identityModel.clearData() + _user?.propertiesModel.clearData() + + // Subscription model store should be cleared completely + OneSignalUserManagerImpl.sharedInstance.subscriptionModelStore.clearModelsFromStore() + } + + private func _login(externalId: String?, token: String?) -> OSUserInternal { + guard !OneSignalConfigManager.shouldAwaitAppIdAndLogMissingPrivacyConsent(forMethod: nil) else { + return _mockUser + } + OneSignalLog.onesignalLog(.LL_VERBOSE, message: "OneSignalUserManager internal _login called with externalId: \(externalId ?? "nil")") + + // If have token, validate token. Account for this being a requirement. + // Logging into an identified user from an anonymous user + if let externalId = externalId, + let user = _user, + user.isAnonymous { + user.identityModel.jwtBearerToken = token + identifyUser(externalId: externalId, currentUser: user) + return self.user + } + + // Logging into anon -> anon, identified -> anon, identified -> identified, or nil -> any user + return createNewUser(externalId: externalId, token: token) + } + + /** + The SDK needs to have a user at all times, so this method will create a new anonymous user. If the current user is already anonymous, calling `logout` results in a no-op. + */ + @objc + public func logout() { + guard user.identityModel.externalId != nil else { + OneSignalLog.onesignalLog(.LL_DEBUG, message: "OneSignal.User logout called, but the user is currently anonymous, so not logging out.") + return + } + _logout() + } + + public func _logout() { + prepareForNewUser() + _user = nil + createUserIfNil() + } + + @objc + public func clearAllModelsFromStores() { + prepareForNewUser() + } + + private func createUserIfNil() { + guard !OneSignalConfigManager.shouldAwaitAppIdAndLogMissingPrivacyConsent(forMethod: nil) else { + return + } + _ = self.user + } + + /** + Notifies observers that the user will be changed. Responses include model stores clearing their User Defaults + and the operation repo flushing the current (soon to be old) user's operations. + */ + private func prepareForNewUser() { + OneSignalLog.onesignalLog(.LL_VERBOSE, message: "OneSignalUserManagerImpl prepareForNewUser called") + NotificationCenter.default.post(name: Notification.Name(OS_ON_USER_WILL_CHANGE), object: nil) + + // This store MUST be cleared, Identity and Properties do not. + subscriptionModelStore.clearModelsFromStore() + } + + /** + Creates and sets a blank new SDK user with the provided externalId, if any. + */ + private func setNewInternalUser(externalId: String?, pushSubscriptionModel: OSSubscriptionModel?) -> OSUserInternal { + let aliases: [String: String]? + if let externalIdToUse = externalId { + aliases = [OS_EXTERNAL_ID: externalIdToUse] + } else { + aliases = nil + } + + let identityModel = OSIdentityModel(aliases: aliases, changeNotifier: OSEventProducer()) + self.identityModelStore.add(id: OS_IDENTITY_MODEL_KEY, model: identityModel, hydrating: false) + + let propertiesModel = OSPropertiesModel(changeNotifier: OSEventProducer()) + self.propertiesModelStore.add(id: OS_PROPERTIES_MODEL_KEY, model: propertiesModel, hydrating: false) + + // TODO: We will have to save subscription_id and push_token to user defaults when we get them + + let pushSubscription = pushSubscriptionModel ?? createDefaultPushSubscription(subscriptionId: nil) + + // Add pushSubscription to store if not present + if !pushSubscriptionModelStore.getModels().keys.contains(OS_PUSH_SUBSCRIPTION_MODEL_KEY) { + pushSubscriptionModelStore.add(id: OS_PUSH_SUBSCRIPTION_MODEL_KEY, model: pushSubscription, hydrating: false) + } + + _user = OSUserInternalImpl(identityModel: identityModel, propertiesModel: propertiesModel, pushSubscriptionModel: pushSubscription) + return self.user + } + + /** + Creates a default Push Subscription Model using the optionally passed in subscriptionId. An scenario where the subscriptionId will be passed in is when we are converting a legacy player's information from 3.x into a Push Subscription Model. + */ + func createDefaultPushSubscription(subscriptionId: String?) -> OSSubscriptionModel { + let sharedUserDefaults = OneSignalUserDefaults.initShared() + let reachable = OSNotificationsManager.currentPermissionState.reachable + let token = sharedUserDefaults.getSavedString(forKey: OSUD_PUSH_TOKEN, defaultValue: nil) + let subscriptionId = subscriptionId ?? sharedUserDefaults.getSavedString(forKey: OSUD_PUSH_SUBSCRIPTION_ID, defaultValue: nil) + + return OSSubscriptionModel(type: .push, + address: token, + subscriptionId: subscriptionId, + reachable: reachable, + isDisabled: false, + changeNotifier: OSEventProducer()) + } + + func createPushSubscriptionRequest() { + // subscriptionExecutor should exist as this should be called after `start()` has been called + if let subscriptionExecutor = self.subscriptionExecutor, + let subscriptionModel = pushSubscriptionModel + { + subscriptionExecutor.createPushSubscription(subscriptionModel: subscriptionModel, identityModel: user.identityModel) + } else { + OneSignalLog.onesignalLog(.LL_ERROR, message: "OneSignalUserManagerImpl.createPushSubscriptionRequest cannot be executed due to missing subscriptionExecutor.") + } + } + + @objc + public func getTags() -> [String: String]? { + guard let user = _user else { + return nil + } + return user.propertiesModel.tags + } + + @objc + public func setLocation(latitude: Float, longitude: Float) { + guard !OneSignalConfigManager.shouldAwaitAppIdAndLogMissingPrivacyConsent(forMethod: "setLocation") else { + return + } + guard let user = _user else { + OneSignalLog.onesignalLog(ONE_S_LOG_LEVEL.LL_DEBUG, message: "Failed to set location because User is nil") + return + } + user.setLocation(lat: latitude, long: longitude) + } + + @objc + public func sendPurchases(_ purchases: [[String: AnyObject]]) { + guard !OneSignalConfigManager.shouldAwaitAppIdAndLogMissingPrivacyConsent(forMethod: "sendPurchases") else { + return + } + guard let user = _user else { + OneSignalLog.onesignalLog(ONE_S_LOG_LEVEL.LL_DEBUG, message: "Failed to send purchases because User is nil") + return + } + // Get the identity and properties model of the current user + let identityModel = user.identityModel + let propertiesModel = user.propertiesModel + let propertiesDeltas = OSPropertiesDeltas(sessionTime: nil, sessionCount: nil, amountSpent: nil, purchases: purchases) + + // propertyExecutor should exist as this should be called after `start()` has been called + if let propertyExecutor = self.propertyExecutor { + propertyExecutor.updateProperties( + propertiesDeltas: propertiesDeltas, + refreshDeviceMetadata: false, + propertiesModel: propertiesModel, + identityModel: identityModel + ) + } else { + OneSignalLog.onesignalLog(.LL_ERROR, message: "OneSignalUserManagerImpl.sendPurchases with purchases: \(purchases) cannot be executed due to missing property executor.") + } + } + + private func fireJwtExpired() { + guard let externalId = user.identityModel.externalId, let jwtExpiredHandler = self.jwtExpiredHandler else { + return + } + jwtExpiredHandler(externalId) { [self] (newToken) -> Void in + guard user.identityModel.externalId == externalId else { + return + } + user.identityModel.jwtBearerToken = newToken + } + } +} + +// MARK: - Sessions + +extension OneSignalUserManagerImpl { + @objc + public func startNewSession() { + OneSignalLog.onesignalLog(.LL_VERBOSE, message: "OneSignalUserManagerImpl starting new session") + guard !OneSignalConfigManager.shouldAwaitAppIdAndLogMissingPrivacyConsent(forMethod: nil) else { + return + } + start() + + OSUserExecutor.executePendingRequests() + OSOperationRepo.sharedInstance.paused = false + updateSession(sessionCount: 1, sessionTime: nil, refreshDeviceMetadata: true) + + // Fetch the user's data if there is a onesignal_id + // TODO: What if onesignal_id is missing, because we may init a user from cache but it may be missing onesignal_id. Is this ok. + if let onesignalId = onesignalId { + OSUserExecutor.fetchUser(aliasLabel: OS_ONESIGNAL_ID, aliasId: onesignalId, identityModel: user.identityModel, onNewSession: true) + } + } + + @objc + public func updateSession(sessionCount: NSNumber?, sessionTime: NSNumber?, refreshDeviceMetadata: Bool, sendImmediately: Bool = false, onSuccess: (() -> Void)? = nil, onFailure: (() -> Void)? = nil) { + guard !OneSignalConfigManager.shouldAwaitAppIdAndLogMissingPrivacyConsent(forMethod: nil) else { + if let onFailure = onFailure { + onFailure() + } + return + } + + // Get the identity and properties model of the current user + let identityModel = user.identityModel + let propertiesModel = user.propertiesModel + let propertiesDeltas = OSPropertiesDeltas(sessionTime: sessionTime, sessionCount: sessionCount, amountSpent: nil, purchases: nil) + + // propertyExecutor should exist as this should be called after `start()` has been called + if let propertyExecutor = self.propertyExecutor { + propertyExecutor.updateProperties( + propertiesDeltas: propertiesDeltas, + refreshDeviceMetadata: refreshDeviceMetadata, + propertiesModel: propertiesModel, + identityModel: identityModel, + sendImmediately: sendImmediately, + onSuccess: onSuccess, + onFailure: onFailure + ) + } else { + OneSignalLog.onesignalLog(.LL_ERROR, message: "OneSignalUserManagerImpl.updateSession with sessionCount: \(String(describing: sessionCount)) sessionTime: \(String(describing: sessionTime)) cannot be executed due to missing property executor.") + if let onFailure = onFailure { + onFailure() + } + } + } + + /** + App has been backgrounded. Run background tasks such to flush the operation repo and hydrating models. + Need to consider app killed vs app backgrounded and handle gracefully. + */ + @objc + public func runBackgroundTasks() { + OSOperationRepo.sharedInstance.flushDeltaQueue(inBackground: true) + } +} + +extension OneSignalUserManagerImpl: OSUser { + public func onJwtExpired(expiredHandler: @escaping OSJwtExpiredHandler) { + jwtExpiredHandler = expiredHandler + } + + public var User: OSUser { + start() + return self + } + + public var pushSubscription: OSPushSubscription { + start() + return self + } + + public func addAlias(label: String, id: String) { + guard !OneSignalConfigManager.shouldAwaitAppIdAndLogMissingPrivacyConsent(forMethod: "addAlias") else { + return + } + user.addAliases([label: id]) + } + + public func addAliases(_ aliases: [String: String]) { + guard !OneSignalConfigManager.shouldAwaitAppIdAndLogMissingPrivacyConsent(forMethod: "addAliases") else { + return + } + user.addAliases(aliases) + } + + public func removeAlias(_ label: String) { + guard !OneSignalConfigManager.shouldAwaitAppIdAndLogMissingPrivacyConsent(forMethod: "removeAlias") else { + return + } + user.removeAliases([label]) + } + + public func removeAliases(_ labels: [String]) { + guard !OneSignalConfigManager.shouldAwaitAppIdAndLogMissingPrivacyConsent(forMethod: "removeAliases") else { + return + } + user.removeAliases(labels) + } + + public func addTag(key: String, value: String) { + guard !OneSignalConfigManager.shouldAwaitAppIdAndLogMissingPrivacyConsent(forMethod: "addTag") else { + return + } + user.addTags([key: value]) + } + + public func addTags(_ tags: [String: String]) { + guard !OneSignalConfigManager.shouldAwaitAppIdAndLogMissingPrivacyConsent(forMethod: "addTags") else { + return + } + user.addTags(tags) + } + + public func removeTag(_ tag: String) { + guard !OneSignalConfigManager.shouldAwaitAppIdAndLogMissingPrivacyConsent(forMethod: "removeTag") else { + return + } + user.removeTags([tag]) + } + + public func removeTags(_ tags: [String]) { + guard !OneSignalConfigManager.shouldAwaitAppIdAndLogMissingPrivacyConsent(forMethod: "removeTags") else { + return + } + user.removeTags(tags) + } + + public func addEmail(_ email: String) { + guard !OneSignalConfigManager.shouldAwaitAppIdAndLogMissingPrivacyConsent(forMethod: "addEmail") else { + return + } + // Check if is valid email? + // Check if this email already exists on this User? + createUserIfNil() + let model = OSSubscriptionModel( + type: .email, + address: email, + subscriptionId: nil, + reachable: true, + isDisabled: false, + changeNotifier: OSEventProducer() + ) + self.subscriptionModelStore.add(id: email, model: model, hydrating: false) + } + + /** + If this email doesn't already exist on the user, it cannot be removed. + This will be a no-op and no request will be made. + Error handling needs to be implemented in the future. + */ + public func removeEmail(_ email: String) { + guard !OneSignalConfigManager.shouldAwaitAppIdAndLogMissingPrivacyConsent(forMethod: "removeEmail") else { + return + } + // Check if is valid email? + createUserIfNil() + self.subscriptionModelStore.remove(email) + } + + public func addSms(_ number: String) { + guard !OneSignalConfigManager.shouldAwaitAppIdAndLogMissingPrivacyConsent(forMethod: "addSmsNumber") else { + return + } + // Check if is valid SMS? + // Check if this SMS already exists on this User? + createUserIfNil() + let model = OSSubscriptionModel( + type: .sms, + address: number, + subscriptionId: nil, + reachable: true, + isDisabled: false, + changeNotifier: OSEventProducer() + ) + self.subscriptionModelStore.add(id: number, model: model, hydrating: false) + } + + /** + If this email doesn't already exist on the user, it cannot be removed. + This will be a no-op and no request will be made. + Error handling needs to be implemented in the future. + */ + public func removeSms(_ number: String) { + guard !OneSignalConfigManager.shouldAwaitAppIdAndLogMissingPrivacyConsent(forMethod: "removeSmsNumber") else { + return + } + // Check if is valid SMS? + createUserIfNil() + self.subscriptionModelStore.remove(number) + } + + public func setLanguage(_ language: String) { + guard !OneSignalConfigManager.shouldAwaitAppIdAndLogMissingPrivacyConsent(forMethod: "setLanguage") else { + return + } + + if language == "" { + OneSignalLog.onesignalLog(.LL_ERROR, message: "OneSignal.User.setLanguage cannot be called with an empty language code.") + return + } + + user.setLanguage(language) + } +} + +extension OneSignalUserManagerImpl: OSPushSubscription { + + public func addObserver(_ observer: OSPushSubscriptionObserver) { + // This is a method in the User namespace that doesn't require privacy consent first + self.pushSubscriptionStateChangesObserver.addObserver(observer) + } + + public func removeObserver(_ observer: OSPushSubscriptionObserver) { + self.pushSubscriptionStateChangesObserver.removeObserver(observer) + } + + public var id: String? { + guard !OneSignalConfigManager.shouldAwaitAppIdAndLogMissingPrivacyConsent(forMethod: "pushSubscription.id") else { + return nil + } + return user.pushSubscriptionModel.subscriptionId + } + + public var token: String? { + guard !OneSignalConfigManager.shouldAwaitAppIdAndLogMissingPrivacyConsent(forMethod: "pushSubscription.token") else { + return nil + } + return user.pushSubscriptionModel.address + } + + public var optedIn: Bool { + guard !OneSignalConfigManager.shouldAwaitAppIdAndLogMissingPrivacyConsent(forMethod: "pushSubscription.optedIn") else { + return false + } + return user.pushSubscriptionModel.optedIn + } + + /** + Enable the push subscription, and prompts if needed. `optedIn` can still be `false` after `optIn()` is called if permission is not granted. + */ + public func optIn() { + guard !OneSignalConfigManager.shouldAwaitAppIdAndLogMissingPrivacyConsent(forMethod: "pushSubscription.optIn") else { + return + } + user.pushSubscriptionModel._isDisabled = false + OSNotificationsManager.requestPermission(nil, fallbackToSettings: true) + } + + public func optOut() { + guard !OneSignalConfigManager.shouldAwaitAppIdAndLogMissingPrivacyConsent(forMethod: "pushSubscription.optOut") else { + return + } + user.pushSubscriptionModel._isDisabled = true + } +} + +extension OneSignalUserManagerImpl: OneSignalNotificationsDelegate { + // While we await app_id and privacy consent, these methods are a no-op + // Once the UserManager is started in `init`, it calls these to set the state of the pushSubscriptionModel + + public func setNotificationTypes(_ notificationTypes: Int32) { + guard !OneSignalConfigManager.shouldAwaitAppIdAndLogMissingPrivacyConsent(forMethod: nil) else { + return + } + user.pushSubscriptionModel.notificationTypes = Int(notificationTypes) + } + + public func setPushToken(_ pushToken: String) { + guard !OneSignalConfigManager.shouldAwaitAppIdAndLogMissingPrivacyConsent(forMethod: nil) else { + return + } + user.pushSubscriptionModel.address = pushToken + } +} diff --git a/iOS_SDK/OneSignalSDK/OneSignalUser/Source/UnitTestApp-Bridging-Header.h b/iOS_SDK/OneSignalSDK/OneSignalUser/Source/UnitTestApp-Bridging-Header.h new file mode 100644 index 000000000..1b2cb5d6d --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignalUser/Source/UnitTestApp-Bridging-Header.h @@ -0,0 +1,4 @@ +// +// Use this file to import your target's public headers that you would like to expose to Swift. +// + diff --git a/iOS_SDK/OneSignalSDK/OneSignalUserFramework/Info.plist b/iOS_SDK/OneSignalSDK/OneSignalUserFramework/Info.plist new file mode 100644 index 000000000..37f13eb0c --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignalUserFramework/Info.plist @@ -0,0 +1,22 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0 + CFBundleVersion + $(CURRENT_PROJECT_VERSION) + + diff --git a/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework.zip b/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework.zip index cbe0feb17..8f9186be8 100644 Binary files a/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework.zip and b/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework.zip differ diff --git a/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/Info.plist b/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/Info.plist index c09ce53cb..9c41ef71d 100644 --- a/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/Info.plist +++ b/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/Info.plist @@ -6,7 +6,7 @@ LibraryIdentifier - ios-arm64_x86_64-maccatalyst + ios-arm64_x86_64-simulator LibraryPath OneSignalCore.framework SupportedArchitectures @@ -17,34 +17,34 @@ SupportedPlatform ios SupportedPlatformVariant - maccatalyst + simulator LibraryIdentifier - ios-arm64_x86_64-simulator + ios-arm64 LibraryPath OneSignalCore.framework SupportedArchitectures arm64 - x86_64 SupportedPlatform ios - SupportedPlatformVariant - simulator LibraryIdentifier - ios-arm64 + ios-arm64_x86_64-maccatalyst LibraryPath OneSignalCore.framework SupportedArchitectures arm64 + x86_64 SupportedPlatform ios + SupportedPlatformVariant + maccatalyst CFBundlePackageType diff --git a/iOS_SDK/OneSignalSDK/Source/LanguageProvider.h b/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64/OneSignalCore.framework/Headers/NSDateFormatter+OneSignal.h similarity index 89% rename from iOS_SDK/OneSignalSDK/Source/LanguageProvider.h rename to iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64/OneSignalCore.framework/Headers/NSDateFormatter+OneSignal.h index 92cfed3fc..eb40931a9 100644 --- a/iOS_SDK/OneSignalSDK/Source/LanguageProvider.h +++ b/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64/OneSignalCore.framework/Headers/NSDateFormatter+OneSignal.h @@ -1,7 +1,7 @@ /** * Modified MIT License * - * Copyright 2021 OneSignal + * Copyright 2020 OneSignal * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -25,8 +25,7 @@ * THE SOFTWARE. */ -@protocol LanguageProvider - -@property (readonly, nonnull)NSString* language; - +#import +@interface NSDateFormatter (OneSignal) ++ (instancetype)iso8601DateFormatter; @end diff --git a/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64/OneSignalCore.framework/Headers/OSDeviceUtils.h b/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64/OneSignalCore.framework/Headers/OSDeviceUtils.h new file mode 100644 index 000000000..e646d6d1d --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64/OneSignalCore.framework/Headers/OSDeviceUtils.h @@ -0,0 +1,41 @@ +/* + Modified MIT License + + Copyright 2022 OneSignal + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + 1. The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + 2. All copies of substantial portions of the Software may only be used in connection + with services provided by OneSignal. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + */ + +#import + +// NS_ASSUME_NONNULL_BEGIN + +@interface OSDeviceUtils : NSObject + ++ (NSString *)getCurrentDeviceVersion; ++ (BOOL)isIOSVersionGreaterThanOrEqual:(NSString *)version; ++ (BOOL)isIOSVersionLessThan:(NSString *)version; ++ (NSString*)getDeviceVariant; + +@end + +// NS_ASSUME_NONNULL_END diff --git a/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64/OneSignalCore.framework/Headers/OSDialogInstanceManager.h b/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64/OneSignalCore.framework/Headers/OSDialogInstanceManager.h new file mode 100644 index 000000000..3c842a306 --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64/OneSignalCore.framework/Headers/OSDialogInstanceManager.h @@ -0,0 +1,40 @@ +/* + Modified MIT License + + Copyright 2022 OneSignal + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + 1. The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + 2. All copies of substantial portions of the Software may only be used in connection + with services provided by OneSignal. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + */ + +#import + +typedef void (^OSDialogActionCompletion)(int tappedActionIndex); + +@protocol OSDialogPresenter +- (void)presentDialogWithTitle:(NSString * _Nonnull)title withMessage:(NSString * _Nonnull)message withActions:(NSArray * _Nullable)actionTitles cancelTitle:(NSString * _Nonnull)cancelTitle withActionCompletion:(OSDialogActionCompletion _Nullable)completion; +- (void)clearQueue; +@end + +@interface OSDialogInstanceManager : NSObject ++ (void)setSharedInstance:(NSObject *_Nonnull)instance; ++ (NSObject *_Nullable)sharedInstance; +@end diff --git a/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64/OneSignalCore.framework/Headers/OSInAppMessages.h b/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64/OneSignalCore.framework/Headers/OSInAppMessages.h new file mode 100644 index 000000000..ff7a084e1 --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64/OneSignalCore.framework/Headers/OSInAppMessages.h @@ -0,0 +1,142 @@ +/* + Modified MIT License + + Copyright 2023 OneSignal + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + 1. The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + 2. All copies of substantial portions of the Software may only be used in connection + with services provided by OneSignal. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + */ + +/** + Public API for the InAppMessages namespace. + */ + +@interface OSInAppMessage : NSObject + +@property (strong, nonatomic, nonnull) NSString *messageId; + +// Dictionary of properties available on OSInAppMessage only +- (NSDictionary *_Nonnull)jsonRepresentation; + +@end + + +@interface OSInAppMessageTag : NSObject + +@property (strong, nonatomic, nullable) NSDictionary *tagsToAdd; +@property (strong, nonatomic, nullable) NSArray *tagsToRemove; + +// Convert the class into a NSDictionary +- (NSDictionary *_Nonnull)jsonRepresentation; + +@end + +typedef NS_ENUM(NSUInteger, OSInAppMessageActionUrlType) { + OSInAppMessageActionUrlTypeSafari, + + OSInAppMessageActionUrlTypeWebview, + + OSInAppMessageActionUrlTypeReplaceContent +}; + +@interface OSInAppMessageClickResult : NSObject + +// The action name attached to the IAM action +@property (strong, nonatomic, nullable) NSString *actionId; + +// The URL (if any) that should be opened when the action occurs +@property (strong, nonatomic, nullable) NSString *url; + +// Whether or not the click action dismisses the message +@property (nonatomic) BOOL closingMessage; + +// Determines where the URL is loaded, ie. app opens a webview +@property (nonatomic) OSInAppMessageActionUrlType urlTarget; + +// Convert the class into a NSDictionary +- (NSDictionary *_Nonnull)jsonRepresentation; + +@end + +@interface OSInAppMessageWillDisplayEvent : NSObject +@property (nonatomic, readonly, nonnull) OSInAppMessage *message; +- (NSDictionary *_Nonnull)jsonRepresentation; +@end + +@interface OSInAppMessageDidDisplayEvent : NSObject +@property (nonatomic, readonly, nonnull) OSInAppMessage *message; +- (NSDictionary *_Nonnull)jsonRepresentation; +@end + +@interface OSInAppMessageWillDismissEvent : NSObject +@property (nonatomic, readonly, nonnull) OSInAppMessage *message; +- (NSDictionary *_Nonnull)jsonRepresentation; +@end + +@interface OSInAppMessageDidDismissEvent : NSObject +@property (nonatomic, readonly, nonnull) OSInAppMessage *message; +- (NSDictionary *_Nonnull)jsonRepresentation; +@end + +@interface OSInAppMessageClickEvent : NSObject +@property (nonatomic, readonly, nonnull) OSInAppMessage *message; +@property (nonatomic, readonly, nonnull) OSInAppMessageClickResult *result; +// Convert the class into a NSDictionary +- (NSDictionary *_Nonnull)jsonRepresentation; +@end + +@protocol OSInAppMessageClickListener +- (void)onClickInAppMessage:(OSInAppMessageClickEvent *_Nonnull)event +NS_SWIFT_NAME(onClick(event:)); +@end + +@protocol OSInAppMessageLifecycleListener +@optional +- (void)onWillDisplayInAppMessage:(OSInAppMessageWillDisplayEvent *_Nonnull)event +NS_SWIFT_NAME(onWillDisplay(event:)); +- (void)onDidDisplayInAppMessage:(OSInAppMessageDidDisplayEvent *_Nonnull)event +NS_SWIFT_NAME(onDidDisplay(event:)); +- (void)onWillDismissInAppMessage:(OSInAppMessageWillDismissEvent *_Nonnull)event +NS_SWIFT_NAME(onWillDismiss(event:)); +- (void)onDidDismissInAppMessage:(OSInAppMessageDidDismissEvent *_Nonnull)event +NS_SWIFT_NAME(onDidDismiss(event:)); +@end + +@protocol OSInAppMessages + ++ (void)addTrigger:(NSString * _Nonnull)key withValue:(NSString * _Nonnull)value; ++ (void)addTriggers:(NSDictionary * _Nonnull)triggers; ++ (void)removeTrigger:(NSString * _Nonnull)key; ++ (void)removeTriggers:(NSArray * _Nonnull)keys; ++ (void)clearTriggers; +// Allows Swift users to: OneSignal.InAppMessages.paused = true ++ (BOOL)paused NS_REFINED_FOR_SWIFT; ++ (void)paused:(BOOL)pause NS_REFINED_FOR_SWIFT; + ++ (void)addClickListener:(NSObject *_Nullable)listener NS_REFINED_FOR_SWIFT; ++ (void)removeClickListener:(NSObject *_Nullable)listener NS_REFINED_FOR_SWIFT; ++ (void)addLifecycleListener:(NSObject *_Nullable)listener NS_REFINED_FOR_SWIFT; ++ (void)removeLifecycleListener:(NSObject *_Nullable)listener NS_REFINED_FOR_SWIFT; +@end + +@interface OSStubInAppMessages : NSObject ++ (Class)InAppMessages; +@end diff --git a/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64/OneSignalCore.framework/Headers/OSJSONHandling.h b/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64/OneSignalCore.framework/Headers/OSJSONHandling.h index 0a565039a..2979b48e6 100644 --- a/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64/OneSignalCore.framework/Headers/OSJSONHandling.h +++ b/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64/OneSignalCore.framework/Headers/OSJSONHandling.h @@ -26,7 +26,7 @@ */ #import -#import "OSNotification.h" +#import @protocol OSJSONDecodable + (instancetype _Nullable)instanceWithData:(NSData * _Nonnull)data; diff --git a/iOS_SDK/OneSignalSDK/Source/OSUserStateSMSSynchronizer.h b/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64/OneSignalCore.framework/Headers/OSLocation.h similarity index 77% rename from iOS_SDK/OneSignalSDK/Source/OSUserStateSMSSynchronizer.h rename to iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64/OneSignalCore.framework/Headers/OSLocation.h index 6732fa7f1..a0a1eda40 100644 --- a/iOS_SDK/OneSignalSDK/Source/OSUserStateSMSSynchronizer.h +++ b/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64/OneSignalCore.framework/Headers/OSLocation.h @@ -1,7 +1,7 @@ /** Modified MIT License -Copyright 2021 OneSignal +Copyright 2023 OneSignal Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -25,11 +25,16 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -#import "OSUserStateSynchronizer.h" - -@interface OSUserStateSMSSynchronizer : OSUserStateSynchronizer - -- (instancetype)initWithSMSSubscriptionState:(OSSMSSubscriptionState *)smsSubscriptionState - withSubcriptionState:(OSSubscriptionState *)subscriptionState; +/** + Public API for the Location namespace. + */ +@protocol OSLocation +// - Request and track user's location ++ (void)requestPermission; ++ (void)setShared:(BOOL)enable NS_REFINED_FOR_SWIFT; ++ (BOOL)isShared NS_REFINED_FOR_SWIFT; +@end +@interface OSStubLocation : NSObject ++ (Class)Location; @end diff --git a/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64/OneSignalCore.framework/Headers/OSNetworkingUtils.h b/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64/OneSignalCore.framework/Headers/OSNetworkingUtils.h new file mode 100644 index 000000000..795f87be5 --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64/OneSignalCore.framework/Headers/OSNetworkingUtils.h @@ -0,0 +1,47 @@ +/* + Modified MIT License + + Copyright 2022 OneSignal + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + 1. The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + 2. All copies of substantial portions of the Software may only be used in connection + with services provided by OneSignal. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + */ + +#import + +// NS_ASSUME_NONNULL_BEGIN + +typedef NS_ENUM(NSInteger, OSResponseStatusType) { + OSResponseStatusInvalid = 0, + OSResponseStatusRetryable, + OSResponseStatusUnauthorized, + OSResponseStatusMissing, + OSResponseStatusConflict +}; + +@interface OSNetworkingUtils : NSObject + ++ (NSNumber*)getNetType; ++ (OSResponseStatusType)getResponseStatusType:(NSInteger)statusCode; + +@end + +// NS_ASSUME_NONNULL_END diff --git a/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64/OneSignalCore.framework/Headers/OSNotification+Internal.h b/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64/OneSignalCore.framework/Headers/OSNotification+Internal.h index cdc43ea8e..44fc23e87 100644 --- a/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64/OneSignalCore.framework/Headers/OSNotification+Internal.h +++ b/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64/OneSignalCore.framework/Headers/OSNotification+Internal.h @@ -25,16 +25,12 @@ * THE SOFTWARE. */ -#import "OSNotificationClasses.h" +#import #ifndef OSNotification_Internal_h #define OSNotification_Internal_h @interface OSNotification(Internal) -+(instancetype _Nonnull )parseWithApns:(nonnull NSDictionary *)message; -- (void)setCompletionBlock:(OSNotificationDisplayResponse _Nonnull)completion; -- (void)startTimeoutTimer; -- (void)complete:(nullable OSNotification *)notification; @end #endif /* OSNotification_Internal_h */ diff --git a/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64/OneSignalCore.framework/Headers/OSNotificationClasses.h b/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64/OneSignalCore.framework/Headers/OSNotificationClasses.h index 2d8fed289..dd4a8ce18 100644 --- a/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64/OneSignalCore.framework/Headers/OSNotificationClasses.h +++ b/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64/OneSignalCore.framework/Headers/OSNotificationClasses.h @@ -25,7 +25,7 @@ * THE SOFTWARE. */ -#import "OSNotification.h" +#import // Pass in nil means a notification will not display typedef void (^OSNotificationDisplayResponse)(OSNotification* _Nullable notification); @@ -36,20 +36,17 @@ typedef NS_ENUM(NSUInteger, OSNotificationActionType) { OSNotificationActionTypeActionTaken }; -@interface OSNotificationAction : NSObject - -/* The type of the notification action */ -@property(readonly)OSNotificationActionType type; - +@interface OSNotificationClickResult : NSObject /* The ID associated with the button tapped. NULL when the actionType is NotificationTapped */ @property(readonly, nullable)NSString* actionId; +@property(readonly, nullable)NSString* url; @end -@interface OSNotificationOpenedResult : NSObject +@interface OSNotificationClickEvent : NSObject @property(readonly, nonnull)OSNotification* notification; -@property(readonly, nonnull)OSNotificationAction *action; +@property(readonly, nonnull)OSNotificationClickResult *result; /* Convert object into an NSString that can be convertible into a custom Dictionary / JSON Object */ - (NSString* _Nonnull)stringify; diff --git a/iOS_SDK/OneSignalSDK/Source/OneSignalNotificationSettingsIOS9.h b/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64/OneSignalCore.framework/Headers/OSObservable.h similarity index 63% rename from iOS_SDK/OneSignalSDK/Source/OneSignalNotificationSettingsIOS9.h rename to iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64/OneSignalCore.framework/Headers/OSObservable.h index 2a944e37b..117041623 100644 --- a/iOS_SDK/OneSignalSDK/Source/OneSignalNotificationSettingsIOS9.h +++ b/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64/OneSignalCore.framework/Headers/OSObservable.h @@ -25,14 +25,28 @@ * THE SOFTWARE. */ -#ifndef OneSignalNotificationSettingsIOS9_h -#define OneSignalNotificationSettingsIOS9_h +#ifndef OSObservable_h +#define OSObservable_h -#import "OneSignalNotificationSettings.h" -// Used for iOS 9 -@interface OneSignalNotificationSettingsIOS9 : NSObject +@protocol OSObserver +- (void)onChanged:(id)state; +@end + +@interface OSObservable<__covariant ObserverType, __covariant ObjectType> : NSObject +- (instancetype _Nonnull)initWithChangeSelector:(SEL)selector; +- (void)addObserver:(ObserverType)observer; +- (void)removeObserver:(ObserverType)observer; +- (BOOL)notifyChange:(ObjectType)state; +@end + +// OSBoolObservable is for BOOL states which OSObservable above does not work with +@interface OSBoolObservable<__covariant ObserverType> : NSObject +- (instancetype _Nonnull)initWithChangeSelector:(SEL)selector; +- (void)addObserver:(ObserverType)observer; +- (void)removeObserver:(ObserverType)observer; +- (BOOL)notifyChange:(BOOL)state; @end -#endif /* OneSignalNotificationSettingsIOS9_h */ +#endif /* OSObservable_h */ diff --git a/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64/OneSignalCore.framework/Headers/OSPrivacyConsentController.h b/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64/OneSignalCore.framework/Headers/OSPrivacyConsentController.h index 37c4f09e6..63f5beb56 100644 --- a/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64/OneSignalCore.framework/Headers/OSPrivacyConsentController.h +++ b/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64/OneSignalCore.framework/Headers/OSPrivacyConsentController.h @@ -29,5 +29,7 @@ THE SOFTWARE. @interface OSPrivacyConsentController : NSObject + (BOOL)requiresUserPrivacyConsent; + (void)consentGranted:(BOOL)granted; ++ (BOOL)getPrivacyConsent; + (BOOL)shouldLogMissingPrivacyConsentErrorWithMethodName:(NSString *)methodName; ++ (void)setRequiresPrivacyConsent:(BOOL)required; @end diff --git a/iOS_SDK/OneSignalSDK/Source/OSLocationState.m b/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64/OneSignalCore.framework/Headers/OSRemoteParamController.h similarity index 67% rename from iOS_SDK/OneSignalSDK/Source/OSLocationState.m rename to iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64/OneSignalCore.framework/Headers/OSRemoteParamController.h index 1ff768643..94df375af 100644 --- a/iOS_SDK/OneSignalSDK/Source/OSLocationState.m +++ b/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64/OneSignalCore.framework/Headers/OSRemoteParamController.h @@ -1,7 +1,7 @@ /** Modified MIT License -Copyright 2021 OneSignal +Copyright 2020 OneSignal Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -25,20 +25,24 @@ of this software and associated documentation files (the "Software"), to deal THE SOFTWARE. */ -#import -#import "OSLocationState.h" +#ifndef OSRemoteParamController_h +#define OSRemoteParamController_h -@implementation OSLocationState +@interface OSRemoteParamController : NSObject -- (NSDictionary *)toDictionary { - NSDictionary *dataDic = [NSDictionary dictionaryWithObjectsAndKeys: - _latitude, @"lat", - _longitude, @"long", - _verticalAccuracy, @"loc_acc_vert", - _accuracy, @"loc_acc", - nil]; - - return dataDic; -} ++ (OSRemoteParamController *)sharedController; + +@property (strong, nonatomic, readonly, nonnull) NSDictionary *remoteParams; + +- (void)saveRemoteParams:(NSDictionary *_Nonnull)params; +- (BOOL)hasLocationKey; +- (BOOL)hasPrivacyConsentKey; + +- (BOOL)isLocationShared; +- (void)saveLocationShared:(BOOL)shared; +- (BOOL)isPrivacyConsentRequired; +- (void)savePrivacyConsentRequired:(BOOL)shared; @end + +#endif /* OSRemoteParamController_h */ diff --git a/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64/OneSignalCore.framework/Headers/OSRequests.h b/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64/OneSignalCore.framework/Headers/OSRequests.h index 43bf0348b..03e3a02a6 100644 --- a/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64/OneSignalCore.framework/Headers/OSRequests.h +++ b/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64/OneSignalCore.framework/Headers/OSRequests.h @@ -26,17 +26,13 @@ */ #import -#import "OneSignalRequest.h" +#import #ifndef OneSignalRequests_h #define OneSignalRequests_h NS_ASSUME_NONNULL_BEGIN -@interface OSRequestGetTags : OneSignalRequest -+ (instancetype)withUserId:(NSString *)userId appId:(NSString *)appId; -@end - @interface OSRequestGetIosParams : OneSignalRequest + (instancetype)withUserId:(NSString *)userId appId:(NSString *)appId; @end @@ -45,110 +41,26 @@ NS_ASSUME_NONNULL_BEGIN + (instancetype)withAppId:(NSString *)appId withJson:(NSMutableDictionary *)json; @end -@interface OSRequestUpdateNotificationTypes : OneSignalRequest -+ (instancetype)withUserId:(NSString *)userId appId:(NSString *)appId notificationTypes:(NSNumber *)notificationTypes; -@end - -@interface OSRequestSendPurchases : OneSignalRequest -+ (instancetype)withUserId:(NSString *)userId externalIdAuthToken:(NSString * _Nullable)externalIdAuthToken appId:(NSString *)appId withPurchases:(NSArray *)purchases; -+ (instancetype)withUserId:(NSString *)userId emailAuthToken:(NSString *)emailAuthToken appId:(NSString *)appId withPurchases:(NSArray *)purchases; -@end - @interface OSRequestSubmitNotificationOpened : OneSignalRequest + (instancetype)withUserId:(NSString *)userId appId:(NSString *)appId wasOpened:(BOOL)opened messageId:(NSString *)messageId withDeviceType:(NSNumber *)deviceType; @end -@interface OSRequestSyncHashedEmail : OneSignalRequest -+ (instancetype)withUserId:(NSString *)userId appId:(NSString *)appId email:(NSString *)email networkType:(NSNumber *)netType; -@end - NS_ASSUME_NONNULL_END -@interface OSRequestUpdateDeviceToken : OneSignalRequest -// Push channel update device token -+ (instancetype _Nonnull)withUserId:(NSString * _Nonnull)userId appId:(NSString * _Nonnull)appId deviceToken:(NSString * _Nullable)identifier notificationTypes:(NSNumber * _Nullable)notificationTypes externalIdAuthToken:(NSString * _Nullable)externalIdAuthToken; - -// Email channel update device token -+ (instancetype _Nonnull)withUserId:(NSString * _Nonnull)userId appId:(NSString * _Nonnull)appId deviceToken:(NSString * _Nullable)identifier withParentId:(NSString * _Nullable)parentId emailAuthToken:(NSString * _Nullable)emailAuthHash email:(NSString * _Nullable)email externalIdAuthToken:(NSString * _Nullable)externalIdAuthToken; - -// SMS channel update device token -+ (instancetype _Nonnull)withUserId:(NSString * _Nonnull)userId appId:(NSString * _Nonnull)appId deviceToken:(NSString * _Nullable)identifier smsAuthToken:(NSString * _Nullable)smsAuthToken externalIdAuthToken:(NSString * _Nullable)externalIdAuthToken; -@end - -@interface OSRequestRegisterUser : OneSignalRequest -+ (instancetype _Nonnull)withData:(NSDictionary * _Nonnull)registrationData userId:(NSString * _Nullable)userId; -@end - -@interface OSRequestCreateDevice : OneSignalRequest -+ (instancetype _Nonnull)withAppId:(NSString * _Nonnull)appId withDeviceType:(NSNumber * _Nonnull)deviceType withEmail:(NSString * _Nullable)email withPlayerId:(NSString * _Nullable)playerId withEmailAuthHash:(NSString * _Nullable)emailAuthHash withExternalUserId:(NSString * _Nullable)externalUserId withExternalIdAuthToken:(NSString * _Nullable)externalIdAuthToken; - -+ (instancetype _Nonnull)withAppId:(NSString * _Nonnull)appId withDeviceType:(NSNumber * _Nonnull)deviceType withSMSNumber:(NSString * _Nullable)smsNumber withPlayerId:(NSString * _Nullable)playerId withSMSAuthHash:(NSString * _Nullable)smsAuthHash withExternalUserId:(NSString * _Nullable)externalUserId withExternalIdAuthToken:(NSString * _Nullable)externalIdAuthToken; -@end - -@interface OSRequestLogoutEmail : OneSignalRequest -+ (instancetype _Nonnull)withAppId:(NSString * _Nonnull)appId emailPlayerId:(NSString * _Nonnull)emailPlayerId devicePlayerId:(NSString * _Nonnull)devicePlayerId emailAuthHash:(NSString * _Nullable)emailAuthHash; -@end - -@interface OSRequestLogoutSMS : OneSignalRequest -+ (instancetype _Nonnull)withAppId:(NSString * _Nonnull)appId smsPlayerId:(NSString * _Nonnull)smsPlayerId smsAuthHash:(NSString * _Nullable)smsAuthHash devicePlayerId:(NSString * _Nonnull)devicePlayerId; -@end - -@interface OSRequestSendTagsToServer : OneSignalRequest -+ (instancetype _Nonnull)withUserId:(NSString * _Nonnull)userId appId:(NSString * _Nonnull)appId tags:(NSDictionary * _Nonnull)tags networkType:(NSNumber * _Nonnull)netType withEmailAuthHashToken:(NSString * _Nullable)emailAuthToken withExternalIdAuthHashToken:(NSString * _Nullable)externalIdAuthToken; - -+ (instancetype _Nonnull)withUserId:(NSString * _Nonnull)userId appId:(NSString * _Nonnull)appId tags:(NSDictionary * _Nonnull)tags networkType:(NSNumber * _Nonnull)netType withSMSAuthHashToken:(NSString * _Nullable)smsAuthToken withExternalIdAuthHashToken:(NSString * _Nullable)externalIdAuthToken; -@end - -@interface OSRequestUpdateLanguage : OneSignalRequest -+ (instancetype _Nonnull)withUserId:(NSString * _Nonnull)userId - appId:(NSString * _Nonnull)appId - language:(NSString * _Nonnull)language - emailAuthToken:(NSString * _Nullable)emailAuthHash - externalIdAuthToken:(NSString * _Nullable)externalIdAuthToken; - -+ (instancetype _Nonnull)withUserId:(NSString * _Nonnull)userId - appId:(NSString * _Nonnull)appId - language:(NSString * _Nonnull)language - smsAuthToken:(NSString * _Nullable)smsAuthToken - externalIdAuthToken:(NSString * _Nullable)externalIdAuthToken; -@end - -@interface OSRequestBadgeCount : OneSignalRequest -+ (instancetype _Nonnull)withUserId:(NSString * _Nonnull)userId - appId:(NSString * _Nonnull)appId - badgeCount:(NSNumber * _Nonnull)badgeCount - emailAuthToken:(NSString * _Nullable)emailAuthHash - externalIdAuthToken:(NSString * _Nullable)externalIdAuthToken; - -+ (instancetype _Nonnull)withUserId:(NSString * _Nonnull)userId - appId:(NSString * _Nonnull)appId - badgeCount:(NSNumber * _Nonnull)badgeCount - smsAuthToken:(NSString * _Nullable)smsAuthToken - externalIdAuthToken:(NSString * _Nullable)externalIdAuthToken; -@end - -@interface OSRequestUpdateExternalUserId : OneSignalRequest -+ (instancetype _Nonnull)withUserId:(NSString * _Nullable)externalId withUserIdHashToken:(NSString * _Nullable)hashToken withOneSignalUserId:(NSString * _Nonnull)userId appId:(NSString * _Nonnull)appId; - -+ (instancetype _Nonnull)withUserId:(NSString * _Nullable)externalId withUserIdHashToken:(NSString * _Nullable)hashToken withOneSignalUserId:(NSString * _Nonnull)userId withEmailHashToken:(NSString * _Nullable)emailHashToken appId:(NSString * _Nonnull)appId; - -+ (instancetype _Nonnull)withUserId:(NSString * _Nullable)externalId withUserIdHashToken:(NSString * _Nullable)hashToken withOneSignalUserId:(NSString * _Nonnull)userId withSMSHashToken:(NSString * _Nullable)smsHashToken appId:(NSString * _Nonnull)appId; -@end - @interface OSRequestTrackV1 : OneSignalRequest + (instancetype _Nonnull)trackUsageData:(NSString * _Nonnull)osUsageData appId:(NSString * _Nonnull)appId; @end @interface OSRequestLiveActivityEnter: OneSignalRequest -+ (instancetype _Nonnull)withUserId:(NSString * _Nonnull)userId ++ (instancetype _Nonnull)withSubscriptionId:(NSString * _Nonnull)subscriptionId appId:(NSString * _Nonnull)appId activityId:(NSString * _Nonnull)activityId token:(NSString * _Nonnull)token; @end @interface OSRequestLiveActivityExit: OneSignalRequest -+ (instancetype _Nonnull)withUserId:(NSString * _Nonnull)userId ++ (instancetype _Nonnull)withSubscriptionId:(NSString * _Nonnull)subscriptionId appId:(NSString * _Nonnull)appId activityId:(NSString * _Nonnull)activityId; @end diff --git a/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64/OneSignalCore.framework/Headers/OneSignalClient.h b/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64/OneSignalCore.framework/Headers/OneSignalClient.h index 432a9abda..46f466add 100644 --- a/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64/OneSignalCore.framework/Headers/OneSignalClient.h +++ b/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64/OneSignalCore.framework/Headers/OneSignalClient.h @@ -26,7 +26,7 @@ */ #import -#import "OneSignalRequest.h" +#import #ifndef OneSignalClient_h #define OneSignalClient_h diff --git a/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64/OneSignalCore.framework/Headers/OneSignalCommonDefines.h b/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64/OneSignalCore.framework/Headers/OneSignalCommonDefines.h index d0d496869..ca7256cdf 100644 --- a/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64/OneSignalCore.framework/Headers/OneSignalCommonDefines.h +++ b/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64/OneSignalCore.framework/Headers/OneSignalCommonDefines.h @@ -46,7 +46,7 @@ // "*" in comment line ending comment means the string value has not been changed // App -#define ONESIGNAL_VERSION @"031207" +#define ONESIGNAL_VERSION @"050002" #define OSUD_APP_ID @"GT_APP_ID" // * OSUD_APP_ID #define OSUD_REGISTERED_WITH_APPLE @"GT_REGISTERED_WITH_APPLE" // * OSUD_REGISTERED_WITH_APPLE @@ -65,30 +65,14 @@ #define OSUD_PERMISSION_EPHEMERAL_FROM @"OSUD_PERMISSION_EPHEMERAL_FROM" // * OSUD_PERMISSION_EPHEMERAL_FROM #define OSUD_LANGUAGE @"OSUD_LANGUAGE" // * OSUD_LANGUAGE #define DEFAULT_LANGUAGE @"en" // * OSUD_LANGUAGE -// Player -#define OSUD_EXTERNAL_USER_ID @"OS_EXTERNAL_USER_ID" // * OSUD_EXTERNAL_USER_ID -#define OSUD_PLAYER_ID_TO @"GT_PLAYER_ID" // * OSUD_PLAYER_ID_TO -#define OSUD_PLAYER_ID_FROM @"GT_PLAYER_ID_LAST" // * OSUD_PLAYER_ID_FROM -#define OSUD_PUSH_TOKEN_TO @"GT_DEVICE_TOKEN" // * OSUD_PUSH_TOKEN_TO -#define OSUD_PUSH_TOKEN_FROM @"GT_DEVICE_TOKEN_LAST" // * OSUD_PUSH_TOKEN_FROM -#define OSUD_USER_SUBSCRIPTION_TO @"ONESIGNAL_SUBSCRIPTION" // * OSUD_USER_SUBSCRIPTION_TO -#define OSUD_USER_SUBSCRIPTION_FROM @"ONESIGNAL_SUBSCRIPTION_SETTING" // * OSUD_USER_SUBSCRIPTION_FROM -#define OSUD_EXTERNAL_ID_AUTH_CODE @"OSUD_EXTERNAL_ID_AUTH_CODE" -// Email -#define OSUD_EMAIL_ADDRESS @"EMAIL_ADDRESS" // * OSUD_EMAIL_ADDRESS -#define OSUD_EMAIL_PLAYER_ID @"GT_EMAIL_PLAYER_ID" // * OSUD_EMAIL_PLAYER_ID -#define OSUD_EMAIL_EXTERNAL_USER_ID @"OSUD_EMAIL_EXTERNAL_USER_ID" // OSUD_EMAIL_EXTERNAL_USER_ID -#define OSUD_REQUIRE_EMAIL_AUTH @"GT_REQUIRE_EMAIL_AUTH" // * OSUD_REQUIRE_EMAIL_AUTH -#define OSUD_EMAIL_AUTH_CODE @"GT_EMAIL_AUTH_CODE" // * OSUD_EMAIL_AUTH_CODE -// SMS -#define OSUD_SMS_NUMBER @"OSUD_SMS_NUMBER" -#define OSUD_SMS_PLAYER_ID @"OSUD_SMS_PLAYER_ID" -#define OSUD_SMS_EXTERNAL_USER_ID @"OSUD_SMS_EXTERNAL_USER_ID" -#define OSUD_REQUIRE_SMS_AUTH @"OSUD_REQUIRE_SMS_AUTH" -#define OSUD_SMS_AUTH_CODE @"OSUD_SMS_AUTH_CODE" + +/* Push Subscription */ +#define OSUD_LEGACY_PLAYER_ID @"GT_PLAYER_ID" // The legacy player ID from SDKs prior to 5.x.x +#define OSUD_PUSH_SUBSCRIPTION_ID @"OSUD_PUSH_SUBSCRIPTION_ID" +#define OSUD_PUSH_TOKEN @"GT_DEVICE_TOKEN" + // Notification #define OSUD_LAST_MESSAGE_OPENED @"GT_LAST_MESSAGE_OPENED_" // * OSUD_MOST_RECENT_NOTIFICATION_OPENED -#define OSUD_NOTIFICATION_OPEN_LAUNCH_URL @"ONESIGNAL_INAPP_LAUNCH_URL" // * OSUD_NOTIFICATION_OPEN_LAUNCH_URL #define OSUD_TEMP_CACHED_NOTIFICATION_MEDIA @"OSUD_TEMP_CACHED_NOTIFICATION_MEDIA" // OSUD_TEMP_CACHED_NOTIFICATION_MEDIA // Remote Params #define OSUD_LOCATION_ENABLED @"OSUD_LOCATION_ENABLED" @@ -118,8 +102,6 @@ #define OSUD_APP_LAST_CLOSED_TIME @"GT_LAST_CLOSED_TIME" // * OSUD_APP_LAST_CLOSED_TIME #define OSUD_UNSENT_ACTIVE_TIME @"GT_UNSENT_ACTIVE_TIME" // * OSUD_UNSENT_ACTIVE_TIME #define OSUD_UNSENT_ACTIVE_TIME_ATTRIBUTED @"GT_UNSENT_ACTIVE_TIME_ATTRIBUTED" // * OSUD_UNSENT_ACTIVE_TIME_ATTRIBUTED -#define OSUD_PLAYER_TAGS @"OSUD_PLAYER_TAGS" - // * OSUD_PLAYER_TAGS // Deprecated Selectors #define DEPRECATED_SELECTORS @[ @"application:didReceiveLocalNotification:", \ @@ -172,6 +154,7 @@ // APNS params #define ONESIGNAL_IAM_PREVIEW @"os_in_app_message_preview_id" +#define ONESIGNAL_POST_PREVIEW_IAM @"ONESIGNAL_POST_PREVIEW_IAM" #define ONESIGNAL_SUPPORTED_ATTACHMENT_TYPES @[@"aiff", @"wav", @"mp3", @"mp4", @"jpg", @"jpeg", @"png", @"gif", @"mpeg", @"mpg", @"avi", @"m4a", @"m4v"] @@ -200,6 +183,15 @@ typedef enum {BACKGROUND, END_SESSION} FocusEventType; typedef enum {ATTRIBUTED, NOT_ATTRIBUTED} FocusAttributionState; #define focusAttributionStateString(enum) [@[@"ATTRIBUTED", @"NOT_ATTRIBUTED"] objectAtIndex:enum] +// OneSignal Background Task Identifiers +#define ATTRIBUTED_FOCUS_TASK @"ATTRIBUTED_FOCUS_TASK" +#define UNATTRIBUTED_FOCUS_TASK @"UNATTRIBUTED_FOCUS_TASK" +#define SEND_SESSION_TIME_TO_USER_TASK @"SEND_SESSION_TIME_TO_USER_TASK" +#define OPERATION_REPO_BACKGROUND_TASK @"OPERATION_REPO_BACKGROUND_TASK" +#define IDENTITY_EXECUTOR_BACKGROUND_TASK @"IDENTITY_EXECUTOR_BACKGROUND_TASK_" +#define PROPERTIES_EXECUTOR_BACKGROUND_TASK @"PROPERTIES_EXECUTOR_BACKGROUND_TASK_" +#define SUBSCRIPTION_EXECUTOR_BACKGROUND_TASK @"SUBSCRIPTION_EXECUTOR_BACKGROUND_TASK_" + // OneSignal constants #define OS_PUSH @"push" #define OS_EMAIL @"email" @@ -209,8 +201,8 @@ typedef enum {ATTRIBUTED, NOT_ATTRIBUTED} FocusAttributionState; #define OS_CHANNELS @[OS_PUSH, OS_EMAIL, OS_SMS] // OneSignal API Client Defines -typedef enum {GET, POST, HEAD, PUT, DELETE, OPTIONS, CONNECT, TRACE} HTTPMethod; -#define OS_API_CLIENT_STRINGS @[@"GET", @"POST", @"HEAD", @"PUT", @"DELETE", @"OPTIONS", @"CONNECT", @"TRACE"] +typedef enum {GET, POST, HEAD, PUT, DELETE, OPTIONS, CONNECT, TRACE, PATCH} HTTPMethod; +#define OS_API_CLIENT_STRINGS @[@"GET", @"POST", @"HEAD", @"PUT", @"DELETE", @"OPTIONS", @"CONNECT", @"TRACE", @"PATCH"] #define httpMethodString(enum) [OS_API_CLIENT_STRINGS objectAtIndex:enum] // Notification types @@ -233,13 +225,6 @@ typedef enum {GET, POST, HEAD, PUT, DELETE, OPTIONS, CONNECT, TRACE} HTTPMethod; // 1 week in seconds #define WEEK_IN_SECONDS 604800.0 -// Registration delay -#define REGISTRATION_DELAY_SECONDS 30.0 - -// How long the SDK will wait for APNS to respond -// before registering the user anyways -#define APNS_TIMEOUT 25.0 - // The SDK saves a list of category ID's allowing multiple notifications // to have their own unique buttons/etc. #define SHARED_CATEGORY_LIST @"com.onesignal.shared_registered_categories" @@ -253,13 +238,10 @@ typedef enum {GET, POST, HEAD, PUT, DELETE, OPTIONS, CONNECT, TRACE} HTTPMethod; #ifndef OS_TEST // OneSignal API Client Defines - #define REATTEMPT_DELAY 30.0 + #define REATTEMPT_DELAY 5.0 #define REQUEST_TIMEOUT_REQUEST 120.0 //for most HTTP requests #define REQUEST_TIMEOUT_RESOURCE 120.0 //for loading a resource like an image - #define MAX_ATTEMPT_COUNT 3 - - // Send tags batch delay - #define SEND_TAGS_DELAY 5.0 + #define MAX_ATTEMPT_COUNT 5 // the max number of UNNotificationCategory ID's the SDK will register #define MAX_CATEGORIES_SIZE 128 @@ -276,9 +258,6 @@ typedef enum {GET, POST, HEAD, PUT, DELETE, OPTIONS, CONNECT, TRACE} HTTPMethod; #define REQUEST_TIMEOUT_RESOURCE 0.02 //for loading a resource like an image #define MAX_ATTEMPT_COUNT 3 - // Send tags batch delay - #define SEND_TAGS_DELAY 0.005 - // the max number of UNNotificationCategory ID's the SDK will register #define MAX_CATEGORIES_SIZE 5 @@ -301,4 +280,52 @@ typedef enum {GET, POST, HEAD, PUT, DELETE, OPTIONS, CONNECT, TRACE} HTTPMethod; #define MAX_NOTIFICATION_MEDIA_SIZE_BYTES 50000000 +#pragma mark User Model + +#define OS_ONESIGNAL_ID @"onesignal_id" +#define OS_EXTERNAL_ID @"external_id" + +#define OS_ON_USER_WILL_CHANGE @"OS_ON_USER_WILL_CHANGE" + +// Models and Model Stores +#define OS_IDENTITY_MODEL_KEY @"OS_IDENTITY_MODEL_KEY" +#define OS_IDENTITY_MODEL_STORE_KEY @"OS_IDENTITY_MODEL_STORE_KEY" +#define OS_PROPERTIES_MODEL_KEY @"OS_PROPERTIES_MODEL_KEY" +#define OS_PROPERTIES_MODEL_STORE_KEY @"OS_PROPERTIES_MODEL_STORE_KEY" +#define OS_PUSH_SUBSCRIPTION_MODEL_KEY @"OS_PUSH_SUBSCRIPTION_MODEL_KEY" +#define OS_PUSH_SUBSCRIPTION_MODEL_STORE_KEY @"OS_PUSH_SUBSCRIPTION_MODEL_STORE_KEY" +#define OS_SUBSCRIPTION_MODEL_STORE_KEY @"OS_SUBSCRIPTION_MODEL_STORE_KEY" + +// Deltas +#define OS_ADD_ALIAS_DELTA @"OS_ADD_ALIAS_DELTA" +#define OS_REMOVE_ALIAS_DELTA @"OS_REMOVE_ALIAS_DELTA" + +#define OS_UPDATE_PROPERTIES_DELTA @"OS_UPDATE_PROPERTIES_DELTA" + +#define OS_ADD_SUBSCRIPTION_DELTA @"OS_ADD_SUBSCRIPTION_DELTA" +#define OS_REMOVE_SUBSCRIPTION_DELTA @"OS_REMOVE_SUBSCRIPTION_DELTA" +#define OS_UPDATE_SUBSCRIPTION_DELTA @"OS_UPDATE_SUBSCRIPTION_DELTA" + +// Operation Repo +#define OS_OPERATION_REPO_DELTA_QUEUE_KEY @"OS_OPERATION_REPO_DELTA_QUEUE_KEY" + +// User Executor +#define OS_USER_EXECUTOR_USER_REQUEST_QUEUE_KEY @"OS_USER_EXECUTOR_USER_REQUEST_QUEUE_KEY" +#define OS_USER_EXECUTOR_TRANSFER_SUBSCRIPTION_REQUEST_QUEUE_KEY @"OS_USER_EXECUTOR_TRANSFER_SUBSCRIPTION_REQUEST_QUEUE_KEY" + +// Identity Executor +#define OS_IDENTITY_EXECUTOR_DELTA_QUEUE_KEY @"OS_IDENTITY_EXECUTOR_DELTA_QUEUE_KEY" +#define OS_IDENTITY_EXECUTOR_ADD_REQUEST_QUEUE_KEY @"OS_IDENTITY_EXECUTOR_ADD_REQUEST_QUEUE_KEY" +#define OS_IDENTITY_EXECUTOR_REMOVE_REQUEST_QUEUE_KEY @"OS_IDENTITY_EXECUTOR_REMOVE_REQUEST_QUEUE_KEY" + +// Property Executor +#define OS_PROPERTIES_EXECUTOR_DELTA_QUEUE_KEY @"OS_PROPERTIES_EXECUTOR_DELTA_QUEUE_KEY" +#define OS_PROPERTIES_EXECUTOR_UPDATE_REQUEST_QUEUE_KEY @"OS_PROPERTIES_EXECUTOR_UPDATE_REQUEST_QUEUE_KEY" + +// Subscription Executor +#define OS_SUBSCRIPTION_EXECUTOR_DELTA_QUEUE_KEY @"OS_SUBSCRIPTION_EXECUTOR_DELTA_QUEUE_KEY" +#define OS_SUBSCRIPTION_EXECUTOR_ADD_REQUEST_QUEUE_KEY @"OS_SUBSCRIPTION_EXECUTOR_ADD_REQUEST_QUEUE_KEY" +#define OS_SUBSCRIPTION_EXECUTOR_REMOVE_REQUEST_QUEUE_KEY @"OS_SUBSCRIPTION_EXECUTOR_REMOVE_REQUEST_QUEUE_KEY" +#define OS_SUBSCRIPTION_EXECUTOR_UPDATE_REQUEST_QUEUE_KEY @"OS_SUBSCRIPTION_EXECUTOR_UPDATE_REQUEST_QUEUE_KEY" + #endif /* OneSignalCommonDefines_h */ diff --git a/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64/OneSignalCore.framework/Headers/OneSignalConfigManager.h b/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64/OneSignalCore.framework/Headers/OneSignalConfigManager.h new file mode 100644 index 000000000..481b16eee --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64/OneSignalCore.framework/Headers/OneSignalConfigManager.h @@ -0,0 +1,36 @@ +/* + Modified MIT License + + Copyright 2022 OneSignal + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + 1. The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + 2. All copies of substantial portions of the Software may only be used in connection + with services provided by OneSignal. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + */ + +#import + +@interface OneSignalConfigManager : NSObject + ++ (void)setAppId:(NSString *)appId; ++ (NSString *_Nullable)getAppId; ++ (BOOL)shouldAwaitAppIdAndLogMissingPrivacyConsentForMethod:(NSString *)methodName; + +@end diff --git a/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64/OneSignalCore.framework/Headers/OneSignalCore.h b/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64/OneSignalCore.framework/Headers/OneSignalCore.h index 5d7cc7c88..966ea8fdc 100644 --- a/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64/OneSignalCore.framework/Headers/OneSignalCore.h +++ b/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64/OneSignalCore.framework/Headers/OneSignalCore.h @@ -27,24 +27,32 @@ #pragma clang diagnostic ignored "-Wnullability-completeness" #import -#import "OneSignalUserDefaults.h" -#import "OneSignalCommonDefines.h" -#import "OSNotification.h" -#import "OSNotification+Internal.h" -#import "OSNotificationClasses.h" -#import "OneSignalLog.h" -#import "NSURL+OneSignal.h" -#import "NSString+OneSignal.h" -#import "OSRequests.h" -#import "OneSignalRequest.h" -#import "OneSignalClient.h" -#import "OneSignalCoreHelper.h" -#import "OneSignalTrackFirebaseAnalytics.h" -#import "OSMacros.h" -#import "OSJSONHandling.h" -#import "OSPrivacyConsentController.h" - -@interface OneSignalCore : NSObject - -@end - +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import diff --git a/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64/OneSignalCore.framework/Headers/OneSignalCoreHelper.h b/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64/OneSignalCore.framework/Headers/OneSignalCoreHelper.h index 2a95e9c38..9194ead16 100644 --- a/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64/OneSignalCore.framework/Headers/OneSignalCoreHelper.h +++ b/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64/OneSignalCore.framework/Headers/OneSignalCoreHelper.h @@ -25,6 +25,7 @@ * THE SOFTWARE. */ +#import @interface OneSignalCoreHelper : NSObject #pragma clang diagnostic ignored "-Wstrict-prototypes" #pragma clang diagnostic ignored "-Wnullability-completeness" @@ -37,4 +38,33 @@ + (NSString*)hashUsingSha1:(NSString*)string; + (NSString*)hashUsingMD5:(NSString*)string; + (NSString*)trimURLSpacing:(NSString*)url; ++ (NSString*)parseNSErrorAsJsonString:(NSError*)error; ++ (BOOL)isOneSignalPayload:(NSDictionary *)payload; ++ (NSMutableDictionary*) formatApsPayloadIntoStandard:(NSDictionary*)remoteUserInfo identifier:(NSString*)identifier; ++ (BOOL)isRemoteSilentNotification:(NSDictionary*)msg; ++ (BOOL)isDisplayableNotification:(NSDictionary*)msg; ++ (NSString*)randomStringWithLength:(int)length; ++ (BOOL)verifyURL:(NSString *)urlString; ++ (BOOL)isWWWScheme:(NSURL*)url; + +// For NSInvocations. Use this when wanting to performSelector with more than 2 arguments ++(void)callSelector:(SEL)selector onObject:(id)object withArgs:(NSArray*)args; +// For NSInvocations. Use this when wanting to performSelector with a boolean argument ++(void)callSelector:(SEL)selector onObject:(id)object withArg:(BOOL)arg; +/* + A simplified enum for UIDeviceOrientation with just invalid, portrait, and landscape + */ +typedef NS_ENUM(NSInteger, ViewOrientation) { + OrientationInvalid, + OrientationPortrait, + OrientationLandscape, +}; + ++ (ViewOrientation)validateOrientation:(UIDeviceOrientation)orientation; + ++ (CGFloat)sizeToScale:(float)size; + ++ (CGRect)getScreenBounds; + ++ (float)getScreenScale; @end diff --git a/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64/OneSignalCore.framework/Headers/OneSignalLog.h b/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64/OneSignalCore.framework/Headers/OneSignalLog.h index 7f776f5fb..d5e72bcbe 100644 --- a/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64/OneSignalCore.framework/Headers/OneSignalLog.h +++ b/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64/OneSignalCore.framework/Headers/OneSignalLog.h @@ -26,8 +26,6 @@ */ #import -@interface OneSignalLog : NSObject -#pragma mark Logging typedef NS_ENUM(NSUInteger, ONE_S_LOG_LEVEL) { ONE_S_LL_NONE, ONE_S_LL_FATAL, @@ -38,8 +36,13 @@ typedef NS_ENUM(NSUInteger, ONE_S_LOG_LEVEL) { ONE_S_LL_VERBOSE }; +@protocol OSDebug + (void)setLogLevel:(ONE_S_LOG_LEVEL)logLevel; -+ (ONE_S_LOG_LEVEL)getLogLevel; -+ (void)onesignalLog:(ONE_S_LOG_LEVEL)logLevel message:(NSString* _Nonnull)message; ++ (void)setAlertLevel:(ONE_S_LOG_LEVEL)logLevel NS_REFINED_FOR_SWIFT; +@end +@interface OneSignalLog : NSObject ++ (Class)Debug; ++ (void)onesignalLog:(ONE_S_LOG_LEVEL)logLevel message:(NSString* _Nonnull)message; ++ (ONE_S_LOG_LEVEL)getLogLevel; @end diff --git a/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64/OneSignalCore.framework/Headers/OneSignalMobileProvision.h b/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64/OneSignalCore.framework/Headers/OneSignalMobileProvision.h new file mode 100644 index 000000000..b040ea114 --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64/OneSignalCore.framework/Headers/OneSignalMobileProvision.h @@ -0,0 +1,23 @@ +// +// OneSignalMobileProvision.h +// Renamed from UIApplication+BSMobileProvision.h to prevent conflicts +// +// Created by kaolin fire on 2013-06-24. +// Copyright (c) 2013 The Blindsight Corporation. All rights reserved. +// Released under the BSD 2-Clause License (see LICENSE) + +typedef NS_ENUM(NSInteger, OSUIApplicationReleaseMode) { + UIApplicationReleaseUnknown, + UIApplicationReleaseDev, + UIApplicationReleaseAdHoc, + UIApplicationReleaseWildcard, + UIApplicationReleaseAppStore, + UIApplicationReleaseSim, + UIApplicationReleaseEnterprise +}; + +@interface OneSignalMobileProvision : NSObject + ++ (OSUIApplicationReleaseMode) releaseMode; + +@end diff --git a/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64/OneSignalCore.framework/Headers/OneSignalRequest.h b/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64/OneSignalCore.framework/Headers/OneSignalRequest.h index 4e1b1fa82..be81332ed 100644 --- a/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64/OneSignalCore.framework/Headers/OneSignalRequest.h +++ b/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64/OneSignalCore.framework/Headers/OneSignalRequest.h @@ -28,7 +28,7 @@ #pragma clang diagnostic ignored "-Wnullability-completeness" #import -#import "OneSignalCommonDefines.h" +#import #ifndef OneSignalRequest_h @@ -47,6 +47,7 @@ typedef void (^OSFailureBlock)(NSError* error); @property (strong, nonatomic, nullable) NSDictionary *additionalHeaders; @property (nonatomic) int reattemptCount; @property (nonatomic) BOOL dataRequest; //false for JSON based requests +@property (nonatomic) NSDate *timestamp; -(BOOL)missingAppId; //for requests that don't require an appId parameter, the subclass should override this method and return false -(NSMutableURLRequest * _Nonnull )urlRequest; diff --git a/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64/OneSignalCore.framework/Headers/OneSignalSelectorHelpers.h b/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64/OneSignalCore.framework/Headers/OneSignalSelectorHelpers.h new file mode 100644 index 000000000..4cd8469c7 --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64/OneSignalCore.framework/Headers/OneSignalSelectorHelpers.h @@ -0,0 +1,34 @@ +/** + * Modified MIT License + * + * Copyright 2017 OneSignal + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * 1. The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * 2. All copies of substantial portions of the Software may only be used in connection + * with services provided by OneSignal. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#ifndef OneSignalSelectorHelpers_h +#define OneSignalSelectorHelpers_h + +// Functions to help sizzle methods. +BOOL injectSelector(Class targetClass, SEL targetSelector, Class myClass, SEL mySelector); + +#endif /* OneSignalSelectorHelpers_h */ diff --git a/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64/OneSignalCore.framework/Headers/OneSignalTrackFirebaseAnalytics.h b/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64/OneSignalCore.framework/Headers/OneSignalTrackFirebaseAnalytics.h index 7cc355975..948541aaf 100644 --- a/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64/OneSignalCore.framework/Headers/OneSignalTrackFirebaseAnalytics.h +++ b/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64/OneSignalCore.framework/Headers/OneSignalTrackFirebaseAnalytics.h @@ -26,14 +26,14 @@ */ #import -#import "OSNotificationClasses.h" +#import @interface OneSignalTrackFirebaseAnalytics : NSObject +(BOOL)libraryExists; +(void)init; +(void)updateFromDownloadParams:(NSDictionary*)params; -+(void)trackOpenEvent:(OSNotificationOpenedResult*)results; ++(void)trackOpenEvent:(OSNotificationClickEvent*)event; +(void)trackReceivedEvent:(OSNotification*)notification; +(void)trackInfluenceOpenEvent; @end diff --git a/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64/OneSignalCore.framework/Headers/OneSignalWrapper.h b/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64/OneSignalCore.framework/Headers/OneSignalWrapper.h new file mode 100644 index 000000000..8fbab577d --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64/OneSignalCore.framework/Headers/OneSignalWrapper.h @@ -0,0 +1,38 @@ +/* + Modified MIT License + + Copyright 2023 OneSignal + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + 1. The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + 2. All copies of substantial portions of the Software may only be used in connection + with services provided by OneSignal. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + */ + +#import + +@interface OneSignalWrapper : NSObject + +/* Type of Wrapper SDK such as "unity" */ +@property (class, nullable) NSString* sdkType; + +/* Version of Wrapper SDK in format "xxyyzz" */ +@property (class, nullable) NSString* sdkVersion; + +@end diff --git a/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64/OneSignalCore.framework/Headers/SwizzlingForwarder.h b/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64/OneSignalCore.framework/Headers/SwizzlingForwarder.h new file mode 100644 index 000000000..5559b52d1 --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64/OneSignalCore.framework/Headers/SwizzlingForwarder.h @@ -0,0 +1,38 @@ +#import + +NS_ASSUME_NONNULL_BEGIN + +/** + Use this in your swizzled methods implementations to ensure your swizzling + does not create side effects. + This is done by checking if there was an existing implementations and also if + the object has a forwardingTargetForSelector: setup. + */ +@interface SwizzlingForwarder : NSObject +/** + Constructor to setup this instance so you can call invokeWithArgs latter + to forward the call onto the correct selector and object so you swizzling does + create any cause side effects. + @param object Your object, normally you should pass in self. + @param yourSelector Your named selector. + @param originalSelector The original selector, the one you would call if + swizzling was out of the picture. + @return Always returns an instance. + */ +-(instancetype)initWithTarget:(id)object + withYourSelector:(SEL)yourSelector + withOriginalSelector:(SEL)originalSelector; + +/** + Optionally call before invokeWithArgs to know it will execute anything. + */ +-(BOOL)hasReceiver; + +/** + Must call this to call in your swizzled method somewhere to ensure the + original code is still run. + */ +-(void)invokeWithArgs:(NSArray*)args; +@end + +NS_ASSUME_NONNULL_END diff --git a/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64/OneSignalCore.framework/Info.plist b/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64/OneSignalCore.framework/Info.plist index 4fe158e16..7401ac976 100644 Binary files a/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64/OneSignalCore.framework/Info.plist and b/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64/OneSignalCore.framework/Info.plist differ diff --git a/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64/OneSignalCore.framework/OneSignalCore b/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64/OneSignalCore.framework/OneSignalCore index 6106f8ed2..b9ed43aff 100755 Binary files a/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64/OneSignalCore.framework/OneSignalCore and b/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64/OneSignalCore.framework/OneSignalCore differ diff --git a/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64/OneSignalCore.framework/_CodeSignature/CodeResources b/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64/OneSignalCore.framework/_CodeSignature/CodeResources index 6b4cde255..eee0fe4e2 100644 --- a/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64/OneSignalCore.framework/_CodeSignature/CodeResources +++ b/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64/OneSignalCore.framework/_CodeSignature/CodeResources @@ -4,6 +4,10 @@ files + Headers/NSDateFormatter+OneSignal.h + + ifs8KRiBPsLi2tcZaH5fqH8jlNg= + Headers/NSString+OneSignal.h /HTg8wbY+rfIy9/kCShHF2Oev6Y= @@ -12,17 +16,37 @@ RUcvMsE7Pj+BUpa1H4SgBH/O/EQ= + Headers/OSDeviceUtils.h + + qZnSYyg9QxHCH9m743tw/0wlLEE= + + Headers/OSDialogInstanceManager.h + + e5mWq3a0PQfTjU5ei4329nYUfwc= + + Headers/OSInAppMessages.h + + IR0wqr+0bgd4ZnDqeU0WgCPaQTo= + Headers/OSJSONHandling.h - 91d8OZhU9KOTu2qY+EdAF+M47+E= + 4LPubo4CHRtzWQ0TUlW8TcnrpnA= + + Headers/OSLocation.h + + o5UrpkxGWvWryFw5cKA4uD6cYyw= Headers/OSMacros.h 7HmaM9ljZnw77iovX0v/wnb3bX0= + Headers/OSNetworkingUtils.h + + x0y2o36axCWvOHRlZxY5hsZ4jmw= + Headers/OSNotification+Internal.h - hwttm7oX6fN2cgP1Z4laQAKP49Q= + 86k7Huy5kc2mfWTUAhc90rEQjs4= Headers/OSNotification.h @@ -30,51 +54,79 @@ Headers/OSNotificationClasses.h - iNvshoGLl4IEMy2K1Lq2stVxdB4= + L6If5GOxRJg1EgpvI3912AAVD1M= + + Headers/OSObservable.h + + uxk6nXuqHiQSVAOp/BQL4OAArxA= Headers/OSPrivacyConsentController.h - //dQV0JwOyLrzhcfN4IkI2abbFM= + M+s6N3SgUW271aVJk0EYnL/UIAo= + + Headers/OSRemoteParamController.h + + vX2LZhQ43LmAjwjYp/La6Hloomc= Headers/OSRequests.h - MqtDyOupA+cu7c+vEvwpMBVA1b4= + J1Kk5zLcCjEXVkzVwqgbEN27Myk= Headers/OneSignalClient.h - TAYBk2YV4sw9wzS85jL0QtcAen0= + xP3ln1gkiz3rYTGL3cLbXxIleq4= Headers/OneSignalCommonDefines.h - 1eS5Ug1Qlv9xeX/u6irY7k1VOg4= + nCgqTW0JEq1hprpZG8HigWLrhIk= + + Headers/OneSignalConfigManager.h + + rs5am2kldk0oFRiHVIRnYiOwwfk= Headers/OneSignalCore.h - T109aNL3gpg8ZtBUTteB6+7IuQ8= + fEHoz2bZp9TOWw+VERtj2wWR2p4= Headers/OneSignalCoreHelper.h - xQeNeuYQWybV7qex/9h0H2mvUqI= + /jKV40WVBCZu0YXLa1+IE0moY+k= Headers/OneSignalLog.h - 8fVibMV9iMCVoj/I14R7AwCROpk= + o5RSmHYkpLQOk/hhVawytbfylUg= + + Headers/OneSignalMobileProvision.h + + 7ZQcyM590dEqGyz7BtLDG3YORL0= Headers/OneSignalRequest.h - /uBkuxddG/dPmbTbANavHELydCw= + MxsNsoartS9iesNGTQE5YZ5qp64= + + Headers/OneSignalSelectorHelpers.h + + 3CBAjr2xx3yz874iThgaAtmtaAo= Headers/OneSignalTrackFirebaseAnalytics.h - oUxC/1Bnj1fAEZ+hPm30tS5H+f0= + 4YsXpAcxdhsGDmyQVKWbUwj1Ifw= Headers/OneSignalUserDefaults.h ZvwZZD2HkwwG1wOkh8jGhnl2lTY= + Headers/OneSignalWrapper.h + + 85h+tJFMUS/hX3RieVOMzFs03oE= + + Headers/SwizzlingForwarder.h + + HfyVhL3eh5S045pKiGtUIUEbITU= + Info.plist - GBtruN+usPqIPSVf+LITCYfdQJ8= + WQetsZaL6F1keGWZfoQuWKXLr1c= Modules/module.modulemap @@ -83,6 +135,13 @@ files2 + Headers/NSDateFormatter+OneSignal.h + + hash2 + + hn2vYW78u8AOY/ve3SKGul3cFrG350NV3Um0+EzhGHU= + + Headers/NSString+OneSignal.h hash2 @@ -97,11 +156,39 @@ DC9WcVr/94eTh7NHtwKhA8C2fPJVJfY0nn9A6fuHGhA= + Headers/OSDeviceUtils.h + + hash2 + + CJpM5If7vZz4m960lM+ulaOZohExs1bTVVH5q0zODe4= + + + Headers/OSDialogInstanceManager.h + + hash2 + + TZyL4I0k2RDNt3IPxABcOPcjrjywMJ0x1SZXMXeiqxA= + + + Headers/OSInAppMessages.h + + hash2 + + bqHvuK40s5I7ykwwB/ucIDu8LyZcKLMOGagHfuOpUKY= + + Headers/OSJSONHandling.h hash2 - kwMvLl1JtYBgIUz5NHRrummY0mdnyAPM2lP6HtOGETw= + s3NgkOLqd6fRlHYOq0qucoCdi9UhfSqxLGpl26BnNck= + + + Headers/OSLocation.h + + hash2 + + Ci2MC5dabTrUMJjPeBp9MLhuPzvSeMfGFLHdooZzTbc= Headers/OSMacros.h @@ -111,11 +198,18 @@ aKanW/TgpNzztpIpYJVbnxfUUFcNJAolzoX8n0+EwJc= + Headers/OSNetworkingUtils.h + + hash2 + + ZGA1WvJrfJUvBvSHYQC2gW9v2qpNNy33Dm9rbTNxWPM= + + Headers/OSNotification+Internal.h hash2 - bz9UK/DGxP8LAEzMdBiUj0l9UsfhSo11AUAW6X1NfNQ= + Tc1KYQDY1EeOl2QeL9dKZQU7KTeDLFWV8v+EOhkiw9Q= Headers/OSNotification.h @@ -129,70 +223,105 @@ hash2 - TfTvbYwUILlXsIfPJ92tgrhSS23UTibhhKt6j4Q984U= + FLr4F43qLlZCYpjFXeqgpCiheBKvOyBSrnUxl+64Sys= + + + Headers/OSObservable.h + + hash2 + + YSHpULg8LgM3KqieFsTXQ3IusHjt3KxhMuJm/nBEy4c= Headers/OSPrivacyConsentController.h hash2 - Nl0w50EzXPgal1ghTEM3QIoYLzOYHH195NTzq3Zlvmo= + ZbsLBZFACw0H6sd80zOvxaGw6Jq/0Sz1diu28fYUOZY= + + + Headers/OSRemoteParamController.h + + hash2 + + ksHXJtuz3uj948tfqdNMchzP74zrK8cUPqvAVUHa3tQ= Headers/OSRequests.h hash2 - YdFlpQOMH+9m9N627gcvPVwShSPrBzKvDm3E3FCYHvk= + IgxmAHnDmkedMwrgA9QzZfoahOsSjNJjysKwkzKpq00= Headers/OneSignalClient.h hash2 - cbF3Wa3Lqa0Wb2275ot3ploX1KXQ+znQBiBOu0TzV6M= + CSAZbyxJ1QBEtH5JYy/HwJiYsj+udPG1u4dhMFgkUtQ= Headers/OneSignalCommonDefines.h hash2 - eqM+JeBS7UHFUhH5+9VG9IniNho+Ty3RnfIngZcsDMY= + 1qNmj2Xi1nveKzdxur6CcYWRiJz8wgQlamdfr2EFJb4= + + + Headers/OneSignalConfigManager.h + + hash2 + + 6+sJzc6wU2Vd6ZJtouqBsA12C1qGLBjFS/ED/+he950= Headers/OneSignalCore.h hash2 - uLAWfHauq9MJASOHxa8O6emo1oXTfJcLShIdOAUxG88= + CZNtCCWsZDtT4qPjBwdved+ePMTZHxOiPePJe2wbheY= Headers/OneSignalCoreHelper.h hash2 - vK6D0j+ZbW5ycXiO3jb9aLvluPdvyYGxCSFl1gkVp14= + OMNqcRy39+beti7vT2rQki8JFnft65SbakA3QVQxHQQ= Headers/OneSignalLog.h hash2 - GajjtheSMz3cfqOsaWZFUEdWm75d/HAwr00JdpDcUp0= + mBG60JTXM7cBDv7D7ZdAWOJbwxvoG7s2bg5IPmg/ZZM= + + + Headers/OneSignalMobileProvision.h + + hash2 + + l0RcO5v+JFSsTR7XTKreN7doUQ28JwnxoHpQKZd00vU= Headers/OneSignalRequest.h hash2 - 69iw4bnJGwQNk11KAchyrRMPCM6Rf4C9Wvn+HMnTCXc= + b0DH58A5Q4B9Cj/lCH23eT3A6PqLAijRhgpNgm6nCbQ= + + + Headers/OneSignalSelectorHelpers.h + + hash2 + + FcuF30Rl2JdaHXFJ+B6tKmImZk5GiiEUtfmseHgsVO8= Headers/OneSignalTrackFirebaseAnalytics.h hash2 - VCgGIHlXYAQKerOcmqkIesJ+B+oWLXQya/3m1cYjnKc= + f8S2EXmRtv0a2KL8RoiLzMsuhMYEHNSZoywQelMGAYs= Headers/OneSignalUserDefaults.h @@ -202,6 +331,20 @@ QIYtzchiCKQguyJOSY6PEhV0H98JRi2PdXSBmZxxLN4= + Headers/OneSignalWrapper.h + + hash2 + + 9rcG3BS5U4BNIRWmGWNlhOqrxsdC9FulAIj+pruvlMo= + + + Headers/SwizzlingForwarder.h + + hash2 + + 9kEbEQebIgu9aMkeBUQpTkT17xgIRXd1EC50UYWEmL8= + + Modules/module.modulemap hash2 diff --git a/iOS_SDK/OneSignalSDK/Source/OSNotification+OneSignal.h b/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalCore.framework/Versions/A/Headers/NSDateFormatter+OneSignal.h similarity index 88% rename from iOS_SDK/OneSignalSDK/Source/OSNotification+OneSignal.h rename to iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalCore.framework/Versions/A/Headers/NSDateFormatter+OneSignal.h index b1c17bc44..eb40931a9 100644 --- a/iOS_SDK/OneSignalSDK/Source/OSNotification+OneSignal.h +++ b/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalCore.framework/Versions/A/Headers/NSDateFormatter+OneSignal.h @@ -1,7 +1,7 @@ /** * Modified MIT License * - * Copyright 2021OneSignal + * Copyright 2020 OneSignal * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -25,10 +25,7 @@ * THE SOFTWARE. */ - #import -#import - -@interface OSNotification (OneSignal) -- (OSNotificationDisplayResponse _Nullable)getCompletionBlock; +@interface NSDateFormatter (OneSignal) ++ (instancetype)iso8601DateFormatter; @end diff --git a/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalCore.framework/Versions/A/Headers/OSDeviceUtils.h b/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalCore.framework/Versions/A/Headers/OSDeviceUtils.h new file mode 100644 index 000000000..e646d6d1d --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalCore.framework/Versions/A/Headers/OSDeviceUtils.h @@ -0,0 +1,41 @@ +/* + Modified MIT License + + Copyright 2022 OneSignal + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + 1. The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + 2. All copies of substantial portions of the Software may only be used in connection + with services provided by OneSignal. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + */ + +#import + +// NS_ASSUME_NONNULL_BEGIN + +@interface OSDeviceUtils : NSObject + ++ (NSString *)getCurrentDeviceVersion; ++ (BOOL)isIOSVersionGreaterThanOrEqual:(NSString *)version; ++ (BOOL)isIOSVersionLessThan:(NSString *)version; ++ (NSString*)getDeviceVariant; + +@end + +// NS_ASSUME_NONNULL_END diff --git a/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalCore.framework/Versions/A/Headers/OSDialogInstanceManager.h b/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalCore.framework/Versions/A/Headers/OSDialogInstanceManager.h new file mode 100644 index 000000000..3c842a306 --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalCore.framework/Versions/A/Headers/OSDialogInstanceManager.h @@ -0,0 +1,40 @@ +/* + Modified MIT License + + Copyright 2022 OneSignal + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + 1. The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + 2. All copies of substantial portions of the Software may only be used in connection + with services provided by OneSignal. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + */ + +#import + +typedef void (^OSDialogActionCompletion)(int tappedActionIndex); + +@protocol OSDialogPresenter +- (void)presentDialogWithTitle:(NSString * _Nonnull)title withMessage:(NSString * _Nonnull)message withActions:(NSArray * _Nullable)actionTitles cancelTitle:(NSString * _Nonnull)cancelTitle withActionCompletion:(OSDialogActionCompletion _Nullable)completion; +- (void)clearQueue; +@end + +@interface OSDialogInstanceManager : NSObject ++ (void)setSharedInstance:(NSObject *_Nonnull)instance; ++ (NSObject *_Nullable)sharedInstance; +@end diff --git a/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalCore.framework/Versions/A/Headers/OSInAppMessages.h b/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalCore.framework/Versions/A/Headers/OSInAppMessages.h new file mode 100644 index 000000000..ff7a084e1 --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalCore.framework/Versions/A/Headers/OSInAppMessages.h @@ -0,0 +1,142 @@ +/* + Modified MIT License + + Copyright 2023 OneSignal + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + 1. The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + 2. All copies of substantial portions of the Software may only be used in connection + with services provided by OneSignal. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + */ + +/** + Public API for the InAppMessages namespace. + */ + +@interface OSInAppMessage : NSObject + +@property (strong, nonatomic, nonnull) NSString *messageId; + +// Dictionary of properties available on OSInAppMessage only +- (NSDictionary *_Nonnull)jsonRepresentation; + +@end + + +@interface OSInAppMessageTag : NSObject + +@property (strong, nonatomic, nullable) NSDictionary *tagsToAdd; +@property (strong, nonatomic, nullable) NSArray *tagsToRemove; + +// Convert the class into a NSDictionary +- (NSDictionary *_Nonnull)jsonRepresentation; + +@end + +typedef NS_ENUM(NSUInteger, OSInAppMessageActionUrlType) { + OSInAppMessageActionUrlTypeSafari, + + OSInAppMessageActionUrlTypeWebview, + + OSInAppMessageActionUrlTypeReplaceContent +}; + +@interface OSInAppMessageClickResult : NSObject + +// The action name attached to the IAM action +@property (strong, nonatomic, nullable) NSString *actionId; + +// The URL (if any) that should be opened when the action occurs +@property (strong, nonatomic, nullable) NSString *url; + +// Whether or not the click action dismisses the message +@property (nonatomic) BOOL closingMessage; + +// Determines where the URL is loaded, ie. app opens a webview +@property (nonatomic) OSInAppMessageActionUrlType urlTarget; + +// Convert the class into a NSDictionary +- (NSDictionary *_Nonnull)jsonRepresentation; + +@end + +@interface OSInAppMessageWillDisplayEvent : NSObject +@property (nonatomic, readonly, nonnull) OSInAppMessage *message; +- (NSDictionary *_Nonnull)jsonRepresentation; +@end + +@interface OSInAppMessageDidDisplayEvent : NSObject +@property (nonatomic, readonly, nonnull) OSInAppMessage *message; +- (NSDictionary *_Nonnull)jsonRepresentation; +@end + +@interface OSInAppMessageWillDismissEvent : NSObject +@property (nonatomic, readonly, nonnull) OSInAppMessage *message; +- (NSDictionary *_Nonnull)jsonRepresentation; +@end + +@interface OSInAppMessageDidDismissEvent : NSObject +@property (nonatomic, readonly, nonnull) OSInAppMessage *message; +- (NSDictionary *_Nonnull)jsonRepresentation; +@end + +@interface OSInAppMessageClickEvent : NSObject +@property (nonatomic, readonly, nonnull) OSInAppMessage *message; +@property (nonatomic, readonly, nonnull) OSInAppMessageClickResult *result; +// Convert the class into a NSDictionary +- (NSDictionary *_Nonnull)jsonRepresentation; +@end + +@protocol OSInAppMessageClickListener +- (void)onClickInAppMessage:(OSInAppMessageClickEvent *_Nonnull)event +NS_SWIFT_NAME(onClick(event:)); +@end + +@protocol OSInAppMessageLifecycleListener +@optional +- (void)onWillDisplayInAppMessage:(OSInAppMessageWillDisplayEvent *_Nonnull)event +NS_SWIFT_NAME(onWillDisplay(event:)); +- (void)onDidDisplayInAppMessage:(OSInAppMessageDidDisplayEvent *_Nonnull)event +NS_SWIFT_NAME(onDidDisplay(event:)); +- (void)onWillDismissInAppMessage:(OSInAppMessageWillDismissEvent *_Nonnull)event +NS_SWIFT_NAME(onWillDismiss(event:)); +- (void)onDidDismissInAppMessage:(OSInAppMessageDidDismissEvent *_Nonnull)event +NS_SWIFT_NAME(onDidDismiss(event:)); +@end + +@protocol OSInAppMessages + ++ (void)addTrigger:(NSString * _Nonnull)key withValue:(NSString * _Nonnull)value; ++ (void)addTriggers:(NSDictionary * _Nonnull)triggers; ++ (void)removeTrigger:(NSString * _Nonnull)key; ++ (void)removeTriggers:(NSArray * _Nonnull)keys; ++ (void)clearTriggers; +// Allows Swift users to: OneSignal.InAppMessages.paused = true ++ (BOOL)paused NS_REFINED_FOR_SWIFT; ++ (void)paused:(BOOL)pause NS_REFINED_FOR_SWIFT; + ++ (void)addClickListener:(NSObject *_Nullable)listener NS_REFINED_FOR_SWIFT; ++ (void)removeClickListener:(NSObject *_Nullable)listener NS_REFINED_FOR_SWIFT; ++ (void)addLifecycleListener:(NSObject *_Nullable)listener NS_REFINED_FOR_SWIFT; ++ (void)removeLifecycleListener:(NSObject *_Nullable)listener NS_REFINED_FOR_SWIFT; +@end + +@interface OSStubInAppMessages : NSObject ++ (Class)InAppMessages; +@end diff --git a/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalCore.framework/Versions/A/Headers/OSJSONHandling.h b/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalCore.framework/Versions/A/Headers/OSJSONHandling.h index 0a565039a..2979b48e6 100644 --- a/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalCore.framework/Versions/A/Headers/OSJSONHandling.h +++ b/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalCore.framework/Versions/A/Headers/OSJSONHandling.h @@ -26,7 +26,7 @@ */ #import -#import "OSNotification.h" +#import @protocol OSJSONDecodable + (instancetype _Nullable)instanceWithData:(NSData * _Nonnull)data; diff --git a/iOS_SDK/OneSignalSDK/Source/OSUserStatePushSynchronizer.h b/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalCore.framework/Versions/A/Headers/OSLocation.h similarity index 77% rename from iOS_SDK/OneSignalSDK/Source/OSUserStatePushSynchronizer.h rename to iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalCore.framework/Versions/A/Headers/OSLocation.h index 1635ff491..a0a1eda40 100644 --- a/iOS_SDK/OneSignalSDK/Source/OSUserStatePushSynchronizer.h +++ b/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalCore.framework/Versions/A/Headers/OSLocation.h @@ -1,7 +1,7 @@ /** Modified MIT License -Copyright 2021 OneSignal +Copyright 2023 OneSignal Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -25,10 +25,16 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -#import "OSUserStateSynchronizer.h" - -@interface OSUserStatePushSynchronizer : OSUserStateSynchronizer - -- (instancetype)initWithSubscriptionState:(OSSubscriptionState *)subscriptionState; +/** + Public API for the Location namespace. + */ +@protocol OSLocation +// - Request and track user's location ++ (void)requestPermission; ++ (void)setShared:(BOOL)enable NS_REFINED_FOR_SWIFT; ++ (BOOL)isShared NS_REFINED_FOR_SWIFT; +@end +@interface OSStubLocation : NSObject ++ (Class)Location; @end diff --git a/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalCore.framework/Versions/A/Headers/OSNetworkingUtils.h b/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalCore.framework/Versions/A/Headers/OSNetworkingUtils.h new file mode 100644 index 000000000..795f87be5 --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalCore.framework/Versions/A/Headers/OSNetworkingUtils.h @@ -0,0 +1,47 @@ +/* + Modified MIT License + + Copyright 2022 OneSignal + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + 1. The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + 2. All copies of substantial portions of the Software may only be used in connection + with services provided by OneSignal. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + */ + +#import + +// NS_ASSUME_NONNULL_BEGIN + +typedef NS_ENUM(NSInteger, OSResponseStatusType) { + OSResponseStatusInvalid = 0, + OSResponseStatusRetryable, + OSResponseStatusUnauthorized, + OSResponseStatusMissing, + OSResponseStatusConflict +}; + +@interface OSNetworkingUtils : NSObject + ++ (NSNumber*)getNetType; ++ (OSResponseStatusType)getResponseStatusType:(NSInteger)statusCode; + +@end + +// NS_ASSUME_NONNULL_END diff --git a/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalCore.framework/Versions/A/Headers/OSNotification+Internal.h b/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalCore.framework/Versions/A/Headers/OSNotification+Internal.h index cdc43ea8e..44fc23e87 100644 --- a/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalCore.framework/Versions/A/Headers/OSNotification+Internal.h +++ b/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalCore.framework/Versions/A/Headers/OSNotification+Internal.h @@ -25,16 +25,12 @@ * THE SOFTWARE. */ -#import "OSNotificationClasses.h" +#import #ifndef OSNotification_Internal_h #define OSNotification_Internal_h @interface OSNotification(Internal) -+(instancetype _Nonnull )parseWithApns:(nonnull NSDictionary *)message; -- (void)setCompletionBlock:(OSNotificationDisplayResponse _Nonnull)completion; -- (void)startTimeoutTimer; -- (void)complete:(nullable OSNotification *)notification; @end #endif /* OSNotification_Internal_h */ diff --git a/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalCore.framework/Versions/A/Headers/OSNotificationClasses.h b/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalCore.framework/Versions/A/Headers/OSNotificationClasses.h index 2d8fed289..dd4a8ce18 100644 --- a/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalCore.framework/Versions/A/Headers/OSNotificationClasses.h +++ b/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalCore.framework/Versions/A/Headers/OSNotificationClasses.h @@ -25,7 +25,7 @@ * THE SOFTWARE. */ -#import "OSNotification.h" +#import // Pass in nil means a notification will not display typedef void (^OSNotificationDisplayResponse)(OSNotification* _Nullable notification); @@ -36,20 +36,17 @@ typedef NS_ENUM(NSUInteger, OSNotificationActionType) { OSNotificationActionTypeActionTaken }; -@interface OSNotificationAction : NSObject - -/* The type of the notification action */ -@property(readonly)OSNotificationActionType type; - +@interface OSNotificationClickResult : NSObject /* The ID associated with the button tapped. NULL when the actionType is NotificationTapped */ @property(readonly, nullable)NSString* actionId; +@property(readonly, nullable)NSString* url; @end -@interface OSNotificationOpenedResult : NSObject +@interface OSNotificationClickEvent : NSObject @property(readonly, nonnull)OSNotification* notification; -@property(readonly, nonnull)OSNotificationAction *action; +@property(readonly, nonnull)OSNotificationClickResult *result; /* Convert object into an NSString that can be convertible into a custom Dictionary / JSON Object */ - (NSString* _Nonnull)stringify; diff --git a/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalCore.framework/Versions/A/Headers/OSObservable.h b/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalCore.framework/Versions/A/Headers/OSObservable.h new file mode 100644 index 000000000..117041623 --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalCore.framework/Versions/A/Headers/OSObservable.h @@ -0,0 +1,52 @@ +/** + * Modified MIT License + * + * Copyright 2017 OneSignal + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * 1. The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * 2. All copies of substantial portions of the Software may only be used in connection + * with services provided by OneSignal. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#ifndef OSObservable_h +#define OSObservable_h + + +@protocol OSObserver +- (void)onChanged:(id)state; +@end + +@interface OSObservable<__covariant ObserverType, __covariant ObjectType> : NSObject +- (instancetype _Nonnull)initWithChangeSelector:(SEL)selector; +- (void)addObserver:(ObserverType)observer; +- (void)removeObserver:(ObserverType)observer; +- (BOOL)notifyChange:(ObjectType)state; +@end + +// OSBoolObservable is for BOOL states which OSObservable above does not work with + +@interface OSBoolObservable<__covariant ObserverType> : NSObject +- (instancetype _Nonnull)initWithChangeSelector:(SEL)selector; +- (void)addObserver:(ObserverType)observer; +- (void)removeObserver:(ObserverType)observer; +- (BOOL)notifyChange:(BOOL)state; +@end + +#endif /* OSObservable_h */ diff --git a/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalCore.framework/Versions/A/Headers/OSPrivacyConsentController.h b/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalCore.framework/Versions/A/Headers/OSPrivacyConsentController.h index 37c4f09e6..63f5beb56 100644 --- a/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalCore.framework/Versions/A/Headers/OSPrivacyConsentController.h +++ b/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalCore.framework/Versions/A/Headers/OSPrivacyConsentController.h @@ -29,5 +29,7 @@ THE SOFTWARE. @interface OSPrivacyConsentController : NSObject + (BOOL)requiresUserPrivacyConsent; + (void)consentGranted:(BOOL)granted; ++ (BOOL)getPrivacyConsent; + (BOOL)shouldLogMissingPrivacyConsentErrorWithMethodName:(NSString *)methodName; ++ (void)setRequiresPrivacyConsent:(BOOL)required; @end diff --git a/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalCore.framework/Versions/A/Headers/OSRemoteParamController.h b/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalCore.framework/Versions/A/Headers/OSRemoteParamController.h new file mode 100644 index 000000000..94df375af --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalCore.framework/Versions/A/Headers/OSRemoteParamController.h @@ -0,0 +1,48 @@ +/** +Modified MIT License + +Copyright 2020 OneSignal + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +1. The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +2. All copies of substantial portions of the Software may only be used in connection +with services provided by OneSignal. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. +*/ + +#ifndef OSRemoteParamController_h +#define OSRemoteParamController_h + +@interface OSRemoteParamController : NSObject + ++ (OSRemoteParamController *)sharedController; + +@property (strong, nonatomic, readonly, nonnull) NSDictionary *remoteParams; + +- (void)saveRemoteParams:(NSDictionary *_Nonnull)params; +- (BOOL)hasLocationKey; +- (BOOL)hasPrivacyConsentKey; + +- (BOOL)isLocationShared; +- (void)saveLocationShared:(BOOL)shared; +- (BOOL)isPrivacyConsentRequired; +- (void)savePrivacyConsentRequired:(BOOL)shared; + +@end + +#endif /* OSRemoteParamController_h */ diff --git a/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalCore.framework/Versions/A/Headers/OSRequests.h b/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalCore.framework/Versions/A/Headers/OSRequests.h index 43bf0348b..03e3a02a6 100644 --- a/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalCore.framework/Versions/A/Headers/OSRequests.h +++ b/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalCore.framework/Versions/A/Headers/OSRequests.h @@ -26,17 +26,13 @@ */ #import -#import "OneSignalRequest.h" +#import #ifndef OneSignalRequests_h #define OneSignalRequests_h NS_ASSUME_NONNULL_BEGIN -@interface OSRequestGetTags : OneSignalRequest -+ (instancetype)withUserId:(NSString *)userId appId:(NSString *)appId; -@end - @interface OSRequestGetIosParams : OneSignalRequest + (instancetype)withUserId:(NSString *)userId appId:(NSString *)appId; @end @@ -45,110 +41,26 @@ NS_ASSUME_NONNULL_BEGIN + (instancetype)withAppId:(NSString *)appId withJson:(NSMutableDictionary *)json; @end -@interface OSRequestUpdateNotificationTypes : OneSignalRequest -+ (instancetype)withUserId:(NSString *)userId appId:(NSString *)appId notificationTypes:(NSNumber *)notificationTypes; -@end - -@interface OSRequestSendPurchases : OneSignalRequest -+ (instancetype)withUserId:(NSString *)userId externalIdAuthToken:(NSString * _Nullable)externalIdAuthToken appId:(NSString *)appId withPurchases:(NSArray *)purchases; -+ (instancetype)withUserId:(NSString *)userId emailAuthToken:(NSString *)emailAuthToken appId:(NSString *)appId withPurchases:(NSArray *)purchases; -@end - @interface OSRequestSubmitNotificationOpened : OneSignalRequest + (instancetype)withUserId:(NSString *)userId appId:(NSString *)appId wasOpened:(BOOL)opened messageId:(NSString *)messageId withDeviceType:(NSNumber *)deviceType; @end -@interface OSRequestSyncHashedEmail : OneSignalRequest -+ (instancetype)withUserId:(NSString *)userId appId:(NSString *)appId email:(NSString *)email networkType:(NSNumber *)netType; -@end - NS_ASSUME_NONNULL_END -@interface OSRequestUpdateDeviceToken : OneSignalRequest -// Push channel update device token -+ (instancetype _Nonnull)withUserId:(NSString * _Nonnull)userId appId:(NSString * _Nonnull)appId deviceToken:(NSString * _Nullable)identifier notificationTypes:(NSNumber * _Nullable)notificationTypes externalIdAuthToken:(NSString * _Nullable)externalIdAuthToken; - -// Email channel update device token -+ (instancetype _Nonnull)withUserId:(NSString * _Nonnull)userId appId:(NSString * _Nonnull)appId deviceToken:(NSString * _Nullable)identifier withParentId:(NSString * _Nullable)parentId emailAuthToken:(NSString * _Nullable)emailAuthHash email:(NSString * _Nullable)email externalIdAuthToken:(NSString * _Nullable)externalIdAuthToken; - -// SMS channel update device token -+ (instancetype _Nonnull)withUserId:(NSString * _Nonnull)userId appId:(NSString * _Nonnull)appId deviceToken:(NSString * _Nullable)identifier smsAuthToken:(NSString * _Nullable)smsAuthToken externalIdAuthToken:(NSString * _Nullable)externalIdAuthToken; -@end - -@interface OSRequestRegisterUser : OneSignalRequest -+ (instancetype _Nonnull)withData:(NSDictionary * _Nonnull)registrationData userId:(NSString * _Nullable)userId; -@end - -@interface OSRequestCreateDevice : OneSignalRequest -+ (instancetype _Nonnull)withAppId:(NSString * _Nonnull)appId withDeviceType:(NSNumber * _Nonnull)deviceType withEmail:(NSString * _Nullable)email withPlayerId:(NSString * _Nullable)playerId withEmailAuthHash:(NSString * _Nullable)emailAuthHash withExternalUserId:(NSString * _Nullable)externalUserId withExternalIdAuthToken:(NSString * _Nullable)externalIdAuthToken; - -+ (instancetype _Nonnull)withAppId:(NSString * _Nonnull)appId withDeviceType:(NSNumber * _Nonnull)deviceType withSMSNumber:(NSString * _Nullable)smsNumber withPlayerId:(NSString * _Nullable)playerId withSMSAuthHash:(NSString * _Nullable)smsAuthHash withExternalUserId:(NSString * _Nullable)externalUserId withExternalIdAuthToken:(NSString * _Nullable)externalIdAuthToken; -@end - -@interface OSRequestLogoutEmail : OneSignalRequest -+ (instancetype _Nonnull)withAppId:(NSString * _Nonnull)appId emailPlayerId:(NSString * _Nonnull)emailPlayerId devicePlayerId:(NSString * _Nonnull)devicePlayerId emailAuthHash:(NSString * _Nullable)emailAuthHash; -@end - -@interface OSRequestLogoutSMS : OneSignalRequest -+ (instancetype _Nonnull)withAppId:(NSString * _Nonnull)appId smsPlayerId:(NSString * _Nonnull)smsPlayerId smsAuthHash:(NSString * _Nullable)smsAuthHash devicePlayerId:(NSString * _Nonnull)devicePlayerId; -@end - -@interface OSRequestSendTagsToServer : OneSignalRequest -+ (instancetype _Nonnull)withUserId:(NSString * _Nonnull)userId appId:(NSString * _Nonnull)appId tags:(NSDictionary * _Nonnull)tags networkType:(NSNumber * _Nonnull)netType withEmailAuthHashToken:(NSString * _Nullable)emailAuthToken withExternalIdAuthHashToken:(NSString * _Nullable)externalIdAuthToken; - -+ (instancetype _Nonnull)withUserId:(NSString * _Nonnull)userId appId:(NSString * _Nonnull)appId tags:(NSDictionary * _Nonnull)tags networkType:(NSNumber * _Nonnull)netType withSMSAuthHashToken:(NSString * _Nullable)smsAuthToken withExternalIdAuthHashToken:(NSString * _Nullable)externalIdAuthToken; -@end - -@interface OSRequestUpdateLanguage : OneSignalRequest -+ (instancetype _Nonnull)withUserId:(NSString * _Nonnull)userId - appId:(NSString * _Nonnull)appId - language:(NSString * _Nonnull)language - emailAuthToken:(NSString * _Nullable)emailAuthHash - externalIdAuthToken:(NSString * _Nullable)externalIdAuthToken; - -+ (instancetype _Nonnull)withUserId:(NSString * _Nonnull)userId - appId:(NSString * _Nonnull)appId - language:(NSString * _Nonnull)language - smsAuthToken:(NSString * _Nullable)smsAuthToken - externalIdAuthToken:(NSString * _Nullable)externalIdAuthToken; -@end - -@interface OSRequestBadgeCount : OneSignalRequest -+ (instancetype _Nonnull)withUserId:(NSString * _Nonnull)userId - appId:(NSString * _Nonnull)appId - badgeCount:(NSNumber * _Nonnull)badgeCount - emailAuthToken:(NSString * _Nullable)emailAuthHash - externalIdAuthToken:(NSString * _Nullable)externalIdAuthToken; - -+ (instancetype _Nonnull)withUserId:(NSString * _Nonnull)userId - appId:(NSString * _Nonnull)appId - badgeCount:(NSNumber * _Nonnull)badgeCount - smsAuthToken:(NSString * _Nullable)smsAuthToken - externalIdAuthToken:(NSString * _Nullable)externalIdAuthToken; -@end - -@interface OSRequestUpdateExternalUserId : OneSignalRequest -+ (instancetype _Nonnull)withUserId:(NSString * _Nullable)externalId withUserIdHashToken:(NSString * _Nullable)hashToken withOneSignalUserId:(NSString * _Nonnull)userId appId:(NSString * _Nonnull)appId; - -+ (instancetype _Nonnull)withUserId:(NSString * _Nullable)externalId withUserIdHashToken:(NSString * _Nullable)hashToken withOneSignalUserId:(NSString * _Nonnull)userId withEmailHashToken:(NSString * _Nullable)emailHashToken appId:(NSString * _Nonnull)appId; - -+ (instancetype _Nonnull)withUserId:(NSString * _Nullable)externalId withUserIdHashToken:(NSString * _Nullable)hashToken withOneSignalUserId:(NSString * _Nonnull)userId withSMSHashToken:(NSString * _Nullable)smsHashToken appId:(NSString * _Nonnull)appId; -@end - @interface OSRequestTrackV1 : OneSignalRequest + (instancetype _Nonnull)trackUsageData:(NSString * _Nonnull)osUsageData appId:(NSString * _Nonnull)appId; @end @interface OSRequestLiveActivityEnter: OneSignalRequest -+ (instancetype _Nonnull)withUserId:(NSString * _Nonnull)userId ++ (instancetype _Nonnull)withSubscriptionId:(NSString * _Nonnull)subscriptionId appId:(NSString * _Nonnull)appId activityId:(NSString * _Nonnull)activityId token:(NSString * _Nonnull)token; @end @interface OSRequestLiveActivityExit: OneSignalRequest -+ (instancetype _Nonnull)withUserId:(NSString * _Nonnull)userId ++ (instancetype _Nonnull)withSubscriptionId:(NSString * _Nonnull)subscriptionId appId:(NSString * _Nonnull)appId activityId:(NSString * _Nonnull)activityId; @end diff --git a/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalCore.framework/Versions/A/Headers/OneSignalClient.h b/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalCore.framework/Versions/A/Headers/OneSignalClient.h index 432a9abda..46f466add 100644 --- a/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalCore.framework/Versions/A/Headers/OneSignalClient.h +++ b/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalCore.framework/Versions/A/Headers/OneSignalClient.h @@ -26,7 +26,7 @@ */ #import -#import "OneSignalRequest.h" +#import #ifndef OneSignalClient_h #define OneSignalClient_h diff --git a/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalCore.framework/Versions/A/Headers/OneSignalCommonDefines.h b/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalCore.framework/Versions/A/Headers/OneSignalCommonDefines.h index d0d496869..ca7256cdf 100644 --- a/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalCore.framework/Versions/A/Headers/OneSignalCommonDefines.h +++ b/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalCore.framework/Versions/A/Headers/OneSignalCommonDefines.h @@ -46,7 +46,7 @@ // "*" in comment line ending comment means the string value has not been changed // App -#define ONESIGNAL_VERSION @"031207" +#define ONESIGNAL_VERSION @"050002" #define OSUD_APP_ID @"GT_APP_ID" // * OSUD_APP_ID #define OSUD_REGISTERED_WITH_APPLE @"GT_REGISTERED_WITH_APPLE" // * OSUD_REGISTERED_WITH_APPLE @@ -65,30 +65,14 @@ #define OSUD_PERMISSION_EPHEMERAL_FROM @"OSUD_PERMISSION_EPHEMERAL_FROM" // * OSUD_PERMISSION_EPHEMERAL_FROM #define OSUD_LANGUAGE @"OSUD_LANGUAGE" // * OSUD_LANGUAGE #define DEFAULT_LANGUAGE @"en" // * OSUD_LANGUAGE -// Player -#define OSUD_EXTERNAL_USER_ID @"OS_EXTERNAL_USER_ID" // * OSUD_EXTERNAL_USER_ID -#define OSUD_PLAYER_ID_TO @"GT_PLAYER_ID" // * OSUD_PLAYER_ID_TO -#define OSUD_PLAYER_ID_FROM @"GT_PLAYER_ID_LAST" // * OSUD_PLAYER_ID_FROM -#define OSUD_PUSH_TOKEN_TO @"GT_DEVICE_TOKEN" // * OSUD_PUSH_TOKEN_TO -#define OSUD_PUSH_TOKEN_FROM @"GT_DEVICE_TOKEN_LAST" // * OSUD_PUSH_TOKEN_FROM -#define OSUD_USER_SUBSCRIPTION_TO @"ONESIGNAL_SUBSCRIPTION" // * OSUD_USER_SUBSCRIPTION_TO -#define OSUD_USER_SUBSCRIPTION_FROM @"ONESIGNAL_SUBSCRIPTION_SETTING" // * OSUD_USER_SUBSCRIPTION_FROM -#define OSUD_EXTERNAL_ID_AUTH_CODE @"OSUD_EXTERNAL_ID_AUTH_CODE" -// Email -#define OSUD_EMAIL_ADDRESS @"EMAIL_ADDRESS" // * OSUD_EMAIL_ADDRESS -#define OSUD_EMAIL_PLAYER_ID @"GT_EMAIL_PLAYER_ID" // * OSUD_EMAIL_PLAYER_ID -#define OSUD_EMAIL_EXTERNAL_USER_ID @"OSUD_EMAIL_EXTERNAL_USER_ID" // OSUD_EMAIL_EXTERNAL_USER_ID -#define OSUD_REQUIRE_EMAIL_AUTH @"GT_REQUIRE_EMAIL_AUTH" // * OSUD_REQUIRE_EMAIL_AUTH -#define OSUD_EMAIL_AUTH_CODE @"GT_EMAIL_AUTH_CODE" // * OSUD_EMAIL_AUTH_CODE -// SMS -#define OSUD_SMS_NUMBER @"OSUD_SMS_NUMBER" -#define OSUD_SMS_PLAYER_ID @"OSUD_SMS_PLAYER_ID" -#define OSUD_SMS_EXTERNAL_USER_ID @"OSUD_SMS_EXTERNAL_USER_ID" -#define OSUD_REQUIRE_SMS_AUTH @"OSUD_REQUIRE_SMS_AUTH" -#define OSUD_SMS_AUTH_CODE @"OSUD_SMS_AUTH_CODE" + +/* Push Subscription */ +#define OSUD_LEGACY_PLAYER_ID @"GT_PLAYER_ID" // The legacy player ID from SDKs prior to 5.x.x +#define OSUD_PUSH_SUBSCRIPTION_ID @"OSUD_PUSH_SUBSCRIPTION_ID" +#define OSUD_PUSH_TOKEN @"GT_DEVICE_TOKEN" + // Notification #define OSUD_LAST_MESSAGE_OPENED @"GT_LAST_MESSAGE_OPENED_" // * OSUD_MOST_RECENT_NOTIFICATION_OPENED -#define OSUD_NOTIFICATION_OPEN_LAUNCH_URL @"ONESIGNAL_INAPP_LAUNCH_URL" // * OSUD_NOTIFICATION_OPEN_LAUNCH_URL #define OSUD_TEMP_CACHED_NOTIFICATION_MEDIA @"OSUD_TEMP_CACHED_NOTIFICATION_MEDIA" // OSUD_TEMP_CACHED_NOTIFICATION_MEDIA // Remote Params #define OSUD_LOCATION_ENABLED @"OSUD_LOCATION_ENABLED" @@ -118,8 +102,6 @@ #define OSUD_APP_LAST_CLOSED_TIME @"GT_LAST_CLOSED_TIME" // * OSUD_APP_LAST_CLOSED_TIME #define OSUD_UNSENT_ACTIVE_TIME @"GT_UNSENT_ACTIVE_TIME" // * OSUD_UNSENT_ACTIVE_TIME #define OSUD_UNSENT_ACTIVE_TIME_ATTRIBUTED @"GT_UNSENT_ACTIVE_TIME_ATTRIBUTED" // * OSUD_UNSENT_ACTIVE_TIME_ATTRIBUTED -#define OSUD_PLAYER_TAGS @"OSUD_PLAYER_TAGS" - // * OSUD_PLAYER_TAGS // Deprecated Selectors #define DEPRECATED_SELECTORS @[ @"application:didReceiveLocalNotification:", \ @@ -172,6 +154,7 @@ // APNS params #define ONESIGNAL_IAM_PREVIEW @"os_in_app_message_preview_id" +#define ONESIGNAL_POST_PREVIEW_IAM @"ONESIGNAL_POST_PREVIEW_IAM" #define ONESIGNAL_SUPPORTED_ATTACHMENT_TYPES @[@"aiff", @"wav", @"mp3", @"mp4", @"jpg", @"jpeg", @"png", @"gif", @"mpeg", @"mpg", @"avi", @"m4a", @"m4v"] @@ -200,6 +183,15 @@ typedef enum {BACKGROUND, END_SESSION} FocusEventType; typedef enum {ATTRIBUTED, NOT_ATTRIBUTED} FocusAttributionState; #define focusAttributionStateString(enum) [@[@"ATTRIBUTED", @"NOT_ATTRIBUTED"] objectAtIndex:enum] +// OneSignal Background Task Identifiers +#define ATTRIBUTED_FOCUS_TASK @"ATTRIBUTED_FOCUS_TASK" +#define UNATTRIBUTED_FOCUS_TASK @"UNATTRIBUTED_FOCUS_TASK" +#define SEND_SESSION_TIME_TO_USER_TASK @"SEND_SESSION_TIME_TO_USER_TASK" +#define OPERATION_REPO_BACKGROUND_TASK @"OPERATION_REPO_BACKGROUND_TASK" +#define IDENTITY_EXECUTOR_BACKGROUND_TASK @"IDENTITY_EXECUTOR_BACKGROUND_TASK_" +#define PROPERTIES_EXECUTOR_BACKGROUND_TASK @"PROPERTIES_EXECUTOR_BACKGROUND_TASK_" +#define SUBSCRIPTION_EXECUTOR_BACKGROUND_TASK @"SUBSCRIPTION_EXECUTOR_BACKGROUND_TASK_" + // OneSignal constants #define OS_PUSH @"push" #define OS_EMAIL @"email" @@ -209,8 +201,8 @@ typedef enum {ATTRIBUTED, NOT_ATTRIBUTED} FocusAttributionState; #define OS_CHANNELS @[OS_PUSH, OS_EMAIL, OS_SMS] // OneSignal API Client Defines -typedef enum {GET, POST, HEAD, PUT, DELETE, OPTIONS, CONNECT, TRACE} HTTPMethod; -#define OS_API_CLIENT_STRINGS @[@"GET", @"POST", @"HEAD", @"PUT", @"DELETE", @"OPTIONS", @"CONNECT", @"TRACE"] +typedef enum {GET, POST, HEAD, PUT, DELETE, OPTIONS, CONNECT, TRACE, PATCH} HTTPMethod; +#define OS_API_CLIENT_STRINGS @[@"GET", @"POST", @"HEAD", @"PUT", @"DELETE", @"OPTIONS", @"CONNECT", @"TRACE", @"PATCH"] #define httpMethodString(enum) [OS_API_CLIENT_STRINGS objectAtIndex:enum] // Notification types @@ -233,13 +225,6 @@ typedef enum {GET, POST, HEAD, PUT, DELETE, OPTIONS, CONNECT, TRACE} HTTPMethod; // 1 week in seconds #define WEEK_IN_SECONDS 604800.0 -// Registration delay -#define REGISTRATION_DELAY_SECONDS 30.0 - -// How long the SDK will wait for APNS to respond -// before registering the user anyways -#define APNS_TIMEOUT 25.0 - // The SDK saves a list of category ID's allowing multiple notifications // to have their own unique buttons/etc. #define SHARED_CATEGORY_LIST @"com.onesignal.shared_registered_categories" @@ -253,13 +238,10 @@ typedef enum {GET, POST, HEAD, PUT, DELETE, OPTIONS, CONNECT, TRACE} HTTPMethod; #ifndef OS_TEST // OneSignal API Client Defines - #define REATTEMPT_DELAY 30.0 + #define REATTEMPT_DELAY 5.0 #define REQUEST_TIMEOUT_REQUEST 120.0 //for most HTTP requests #define REQUEST_TIMEOUT_RESOURCE 120.0 //for loading a resource like an image - #define MAX_ATTEMPT_COUNT 3 - - // Send tags batch delay - #define SEND_TAGS_DELAY 5.0 + #define MAX_ATTEMPT_COUNT 5 // the max number of UNNotificationCategory ID's the SDK will register #define MAX_CATEGORIES_SIZE 128 @@ -276,9 +258,6 @@ typedef enum {GET, POST, HEAD, PUT, DELETE, OPTIONS, CONNECT, TRACE} HTTPMethod; #define REQUEST_TIMEOUT_RESOURCE 0.02 //for loading a resource like an image #define MAX_ATTEMPT_COUNT 3 - // Send tags batch delay - #define SEND_TAGS_DELAY 0.005 - // the max number of UNNotificationCategory ID's the SDK will register #define MAX_CATEGORIES_SIZE 5 @@ -301,4 +280,52 @@ typedef enum {GET, POST, HEAD, PUT, DELETE, OPTIONS, CONNECT, TRACE} HTTPMethod; #define MAX_NOTIFICATION_MEDIA_SIZE_BYTES 50000000 +#pragma mark User Model + +#define OS_ONESIGNAL_ID @"onesignal_id" +#define OS_EXTERNAL_ID @"external_id" + +#define OS_ON_USER_WILL_CHANGE @"OS_ON_USER_WILL_CHANGE" + +// Models and Model Stores +#define OS_IDENTITY_MODEL_KEY @"OS_IDENTITY_MODEL_KEY" +#define OS_IDENTITY_MODEL_STORE_KEY @"OS_IDENTITY_MODEL_STORE_KEY" +#define OS_PROPERTIES_MODEL_KEY @"OS_PROPERTIES_MODEL_KEY" +#define OS_PROPERTIES_MODEL_STORE_KEY @"OS_PROPERTIES_MODEL_STORE_KEY" +#define OS_PUSH_SUBSCRIPTION_MODEL_KEY @"OS_PUSH_SUBSCRIPTION_MODEL_KEY" +#define OS_PUSH_SUBSCRIPTION_MODEL_STORE_KEY @"OS_PUSH_SUBSCRIPTION_MODEL_STORE_KEY" +#define OS_SUBSCRIPTION_MODEL_STORE_KEY @"OS_SUBSCRIPTION_MODEL_STORE_KEY" + +// Deltas +#define OS_ADD_ALIAS_DELTA @"OS_ADD_ALIAS_DELTA" +#define OS_REMOVE_ALIAS_DELTA @"OS_REMOVE_ALIAS_DELTA" + +#define OS_UPDATE_PROPERTIES_DELTA @"OS_UPDATE_PROPERTIES_DELTA" + +#define OS_ADD_SUBSCRIPTION_DELTA @"OS_ADD_SUBSCRIPTION_DELTA" +#define OS_REMOVE_SUBSCRIPTION_DELTA @"OS_REMOVE_SUBSCRIPTION_DELTA" +#define OS_UPDATE_SUBSCRIPTION_DELTA @"OS_UPDATE_SUBSCRIPTION_DELTA" + +// Operation Repo +#define OS_OPERATION_REPO_DELTA_QUEUE_KEY @"OS_OPERATION_REPO_DELTA_QUEUE_KEY" + +// User Executor +#define OS_USER_EXECUTOR_USER_REQUEST_QUEUE_KEY @"OS_USER_EXECUTOR_USER_REQUEST_QUEUE_KEY" +#define OS_USER_EXECUTOR_TRANSFER_SUBSCRIPTION_REQUEST_QUEUE_KEY @"OS_USER_EXECUTOR_TRANSFER_SUBSCRIPTION_REQUEST_QUEUE_KEY" + +// Identity Executor +#define OS_IDENTITY_EXECUTOR_DELTA_QUEUE_KEY @"OS_IDENTITY_EXECUTOR_DELTA_QUEUE_KEY" +#define OS_IDENTITY_EXECUTOR_ADD_REQUEST_QUEUE_KEY @"OS_IDENTITY_EXECUTOR_ADD_REQUEST_QUEUE_KEY" +#define OS_IDENTITY_EXECUTOR_REMOVE_REQUEST_QUEUE_KEY @"OS_IDENTITY_EXECUTOR_REMOVE_REQUEST_QUEUE_KEY" + +// Property Executor +#define OS_PROPERTIES_EXECUTOR_DELTA_QUEUE_KEY @"OS_PROPERTIES_EXECUTOR_DELTA_QUEUE_KEY" +#define OS_PROPERTIES_EXECUTOR_UPDATE_REQUEST_QUEUE_KEY @"OS_PROPERTIES_EXECUTOR_UPDATE_REQUEST_QUEUE_KEY" + +// Subscription Executor +#define OS_SUBSCRIPTION_EXECUTOR_DELTA_QUEUE_KEY @"OS_SUBSCRIPTION_EXECUTOR_DELTA_QUEUE_KEY" +#define OS_SUBSCRIPTION_EXECUTOR_ADD_REQUEST_QUEUE_KEY @"OS_SUBSCRIPTION_EXECUTOR_ADD_REQUEST_QUEUE_KEY" +#define OS_SUBSCRIPTION_EXECUTOR_REMOVE_REQUEST_QUEUE_KEY @"OS_SUBSCRIPTION_EXECUTOR_REMOVE_REQUEST_QUEUE_KEY" +#define OS_SUBSCRIPTION_EXECUTOR_UPDATE_REQUEST_QUEUE_KEY @"OS_SUBSCRIPTION_EXECUTOR_UPDATE_REQUEST_QUEUE_KEY" + #endif /* OneSignalCommonDefines_h */ diff --git a/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalCore.framework/Versions/A/Headers/OneSignalConfigManager.h b/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalCore.framework/Versions/A/Headers/OneSignalConfigManager.h new file mode 100644 index 000000000..481b16eee --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalCore.framework/Versions/A/Headers/OneSignalConfigManager.h @@ -0,0 +1,36 @@ +/* + Modified MIT License + + Copyright 2022 OneSignal + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + 1. The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + 2. All copies of substantial portions of the Software may only be used in connection + with services provided by OneSignal. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + */ + +#import + +@interface OneSignalConfigManager : NSObject + ++ (void)setAppId:(NSString *)appId; ++ (NSString *_Nullable)getAppId; ++ (BOOL)shouldAwaitAppIdAndLogMissingPrivacyConsentForMethod:(NSString *)methodName; + +@end diff --git a/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalCore.framework/Versions/A/Headers/OneSignalCore.h b/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalCore.framework/Versions/A/Headers/OneSignalCore.h index 5d7cc7c88..966ea8fdc 100644 --- a/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalCore.framework/Versions/A/Headers/OneSignalCore.h +++ b/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalCore.framework/Versions/A/Headers/OneSignalCore.h @@ -27,24 +27,32 @@ #pragma clang diagnostic ignored "-Wnullability-completeness" #import -#import "OneSignalUserDefaults.h" -#import "OneSignalCommonDefines.h" -#import "OSNotification.h" -#import "OSNotification+Internal.h" -#import "OSNotificationClasses.h" -#import "OneSignalLog.h" -#import "NSURL+OneSignal.h" -#import "NSString+OneSignal.h" -#import "OSRequests.h" -#import "OneSignalRequest.h" -#import "OneSignalClient.h" -#import "OneSignalCoreHelper.h" -#import "OneSignalTrackFirebaseAnalytics.h" -#import "OSMacros.h" -#import "OSJSONHandling.h" -#import "OSPrivacyConsentController.h" - -@interface OneSignalCore : NSObject - -@end - +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import diff --git a/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalCore.framework/Versions/A/Headers/OneSignalCoreHelper.h b/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalCore.framework/Versions/A/Headers/OneSignalCoreHelper.h index 2a95e9c38..9194ead16 100644 --- a/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalCore.framework/Versions/A/Headers/OneSignalCoreHelper.h +++ b/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalCore.framework/Versions/A/Headers/OneSignalCoreHelper.h @@ -25,6 +25,7 @@ * THE SOFTWARE. */ +#import @interface OneSignalCoreHelper : NSObject #pragma clang diagnostic ignored "-Wstrict-prototypes" #pragma clang diagnostic ignored "-Wnullability-completeness" @@ -37,4 +38,33 @@ + (NSString*)hashUsingSha1:(NSString*)string; + (NSString*)hashUsingMD5:(NSString*)string; + (NSString*)trimURLSpacing:(NSString*)url; ++ (NSString*)parseNSErrorAsJsonString:(NSError*)error; ++ (BOOL)isOneSignalPayload:(NSDictionary *)payload; ++ (NSMutableDictionary*) formatApsPayloadIntoStandard:(NSDictionary*)remoteUserInfo identifier:(NSString*)identifier; ++ (BOOL)isRemoteSilentNotification:(NSDictionary*)msg; ++ (BOOL)isDisplayableNotification:(NSDictionary*)msg; ++ (NSString*)randomStringWithLength:(int)length; ++ (BOOL)verifyURL:(NSString *)urlString; ++ (BOOL)isWWWScheme:(NSURL*)url; + +// For NSInvocations. Use this when wanting to performSelector with more than 2 arguments ++(void)callSelector:(SEL)selector onObject:(id)object withArgs:(NSArray*)args; +// For NSInvocations. Use this when wanting to performSelector with a boolean argument ++(void)callSelector:(SEL)selector onObject:(id)object withArg:(BOOL)arg; +/* + A simplified enum for UIDeviceOrientation with just invalid, portrait, and landscape + */ +typedef NS_ENUM(NSInteger, ViewOrientation) { + OrientationInvalid, + OrientationPortrait, + OrientationLandscape, +}; + ++ (ViewOrientation)validateOrientation:(UIDeviceOrientation)orientation; + ++ (CGFloat)sizeToScale:(float)size; + ++ (CGRect)getScreenBounds; + ++ (float)getScreenScale; @end diff --git a/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalCore.framework/Versions/A/Headers/OneSignalLog.h b/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalCore.framework/Versions/A/Headers/OneSignalLog.h index 7f776f5fb..d5e72bcbe 100644 --- a/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalCore.framework/Versions/A/Headers/OneSignalLog.h +++ b/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalCore.framework/Versions/A/Headers/OneSignalLog.h @@ -26,8 +26,6 @@ */ #import -@interface OneSignalLog : NSObject -#pragma mark Logging typedef NS_ENUM(NSUInteger, ONE_S_LOG_LEVEL) { ONE_S_LL_NONE, ONE_S_LL_FATAL, @@ -38,8 +36,13 @@ typedef NS_ENUM(NSUInteger, ONE_S_LOG_LEVEL) { ONE_S_LL_VERBOSE }; +@protocol OSDebug + (void)setLogLevel:(ONE_S_LOG_LEVEL)logLevel; -+ (ONE_S_LOG_LEVEL)getLogLevel; -+ (void)onesignalLog:(ONE_S_LOG_LEVEL)logLevel message:(NSString* _Nonnull)message; ++ (void)setAlertLevel:(ONE_S_LOG_LEVEL)logLevel NS_REFINED_FOR_SWIFT; +@end +@interface OneSignalLog : NSObject ++ (Class)Debug; ++ (void)onesignalLog:(ONE_S_LOG_LEVEL)logLevel message:(NSString* _Nonnull)message; ++ (ONE_S_LOG_LEVEL)getLogLevel; @end diff --git a/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalCore.framework/Versions/A/Headers/OneSignalMobileProvision.h b/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalCore.framework/Versions/A/Headers/OneSignalMobileProvision.h new file mode 100644 index 000000000..b040ea114 --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalCore.framework/Versions/A/Headers/OneSignalMobileProvision.h @@ -0,0 +1,23 @@ +// +// OneSignalMobileProvision.h +// Renamed from UIApplication+BSMobileProvision.h to prevent conflicts +// +// Created by kaolin fire on 2013-06-24. +// Copyright (c) 2013 The Blindsight Corporation. All rights reserved. +// Released under the BSD 2-Clause License (see LICENSE) + +typedef NS_ENUM(NSInteger, OSUIApplicationReleaseMode) { + UIApplicationReleaseUnknown, + UIApplicationReleaseDev, + UIApplicationReleaseAdHoc, + UIApplicationReleaseWildcard, + UIApplicationReleaseAppStore, + UIApplicationReleaseSim, + UIApplicationReleaseEnterprise +}; + +@interface OneSignalMobileProvision : NSObject + ++ (OSUIApplicationReleaseMode) releaseMode; + +@end diff --git a/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalCore.framework/Versions/A/Headers/OneSignalRequest.h b/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalCore.framework/Versions/A/Headers/OneSignalRequest.h index 4e1b1fa82..be81332ed 100644 --- a/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalCore.framework/Versions/A/Headers/OneSignalRequest.h +++ b/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalCore.framework/Versions/A/Headers/OneSignalRequest.h @@ -28,7 +28,7 @@ #pragma clang diagnostic ignored "-Wnullability-completeness" #import -#import "OneSignalCommonDefines.h" +#import #ifndef OneSignalRequest_h @@ -47,6 +47,7 @@ typedef void (^OSFailureBlock)(NSError* error); @property (strong, nonatomic, nullable) NSDictionary *additionalHeaders; @property (nonatomic) int reattemptCount; @property (nonatomic) BOOL dataRequest; //false for JSON based requests +@property (nonatomic) NSDate *timestamp; -(BOOL)missingAppId; //for requests that don't require an appId parameter, the subclass should override this method and return false -(NSMutableURLRequest * _Nonnull )urlRequest; diff --git a/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalCore.framework/Versions/A/Headers/OneSignalSelectorHelpers.h b/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalCore.framework/Versions/A/Headers/OneSignalSelectorHelpers.h new file mode 100644 index 000000000..4cd8469c7 --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalCore.framework/Versions/A/Headers/OneSignalSelectorHelpers.h @@ -0,0 +1,34 @@ +/** + * Modified MIT License + * + * Copyright 2017 OneSignal + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * 1. The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * 2. All copies of substantial portions of the Software may only be used in connection + * with services provided by OneSignal. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#ifndef OneSignalSelectorHelpers_h +#define OneSignalSelectorHelpers_h + +// Functions to help sizzle methods. +BOOL injectSelector(Class targetClass, SEL targetSelector, Class myClass, SEL mySelector); + +#endif /* OneSignalSelectorHelpers_h */ diff --git a/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalCore.framework/Versions/A/Headers/OneSignalTrackFirebaseAnalytics.h b/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalCore.framework/Versions/A/Headers/OneSignalTrackFirebaseAnalytics.h index 7cc355975..948541aaf 100644 --- a/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalCore.framework/Versions/A/Headers/OneSignalTrackFirebaseAnalytics.h +++ b/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalCore.framework/Versions/A/Headers/OneSignalTrackFirebaseAnalytics.h @@ -26,14 +26,14 @@ */ #import -#import "OSNotificationClasses.h" +#import @interface OneSignalTrackFirebaseAnalytics : NSObject +(BOOL)libraryExists; +(void)init; +(void)updateFromDownloadParams:(NSDictionary*)params; -+(void)trackOpenEvent:(OSNotificationOpenedResult*)results; ++(void)trackOpenEvent:(OSNotificationClickEvent*)event; +(void)trackReceivedEvent:(OSNotification*)notification; +(void)trackInfluenceOpenEvent; @end diff --git a/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalCore.framework/Versions/A/Headers/OneSignalWrapper.h b/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalCore.framework/Versions/A/Headers/OneSignalWrapper.h new file mode 100644 index 000000000..8fbab577d --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalCore.framework/Versions/A/Headers/OneSignalWrapper.h @@ -0,0 +1,38 @@ +/* + Modified MIT License + + Copyright 2023 OneSignal + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + 1. The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + 2. All copies of substantial portions of the Software may only be used in connection + with services provided by OneSignal. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + */ + +#import + +@interface OneSignalWrapper : NSObject + +/* Type of Wrapper SDK such as "unity" */ +@property (class, nullable) NSString* sdkType; + +/* Version of Wrapper SDK in format "xxyyzz" */ +@property (class, nullable) NSString* sdkVersion; + +@end diff --git a/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalCore.framework/Versions/A/Headers/SwizzlingForwarder.h b/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalCore.framework/Versions/A/Headers/SwizzlingForwarder.h new file mode 100644 index 000000000..5559b52d1 --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalCore.framework/Versions/A/Headers/SwizzlingForwarder.h @@ -0,0 +1,38 @@ +#import + +NS_ASSUME_NONNULL_BEGIN + +/** + Use this in your swizzled methods implementations to ensure your swizzling + does not create side effects. + This is done by checking if there was an existing implementations and also if + the object has a forwardingTargetForSelector: setup. + */ +@interface SwizzlingForwarder : NSObject +/** + Constructor to setup this instance so you can call invokeWithArgs latter + to forward the call onto the correct selector and object so you swizzling does + create any cause side effects. + @param object Your object, normally you should pass in self. + @param yourSelector Your named selector. + @param originalSelector The original selector, the one you would call if + swizzling was out of the picture. + @return Always returns an instance. + */ +-(instancetype)initWithTarget:(id)object + withYourSelector:(SEL)yourSelector + withOriginalSelector:(SEL)originalSelector; + +/** + Optionally call before invokeWithArgs to know it will execute anything. + */ +-(BOOL)hasReceiver; + +/** + Must call this to call in your swizzled method somewhere to ensure the + original code is still run. + */ +-(void)invokeWithArgs:(NSArray*)args; +@end + +NS_ASSUME_NONNULL_END diff --git a/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalCore.framework/Versions/A/OneSignalCore b/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalCore.framework/Versions/A/OneSignalCore index 94e8b67ec..5e8d06ae1 100755 Binary files a/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalCore.framework/Versions/A/OneSignalCore and b/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalCore.framework/Versions/A/OneSignalCore differ diff --git a/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalCore.framework/Versions/A/Resources/Info.plist b/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalCore.framework/Versions/A/Resources/Info.plist index 685e99542..c4f04715d 100644 --- a/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalCore.framework/Versions/A/Resources/Info.plist +++ b/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalCore.framework/Versions/A/Resources/Info.plist @@ -3,7 +3,7 @@ BuildMachineOSBuild - 22G90 + 22G91 CFBundleDevelopmentRegion en CFBundleExecutable diff --git a/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalCore.framework/Versions/A/_CodeSignature/CodeResources b/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalCore.framework/Versions/A/_CodeSignature/CodeResources index 740c3a96d..fdc0c4a7b 100644 --- a/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalCore.framework/Versions/A/_CodeSignature/CodeResources +++ b/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalCore.framework/Versions/A/_CodeSignature/CodeResources @@ -6,11 +6,18 @@ Resources/Info.plist - fC8o3CKeXqnhmIqo+Rz5qNp0A/o= + d3iuCWvSuFxDajfFXrpbgp+pIBY= files2 + Headers/NSDateFormatter+OneSignal.h + + hash2 + + hn2vYW78u8AOY/ve3SKGul3cFrG350NV3Um0+EzhGHU= + + Headers/NSString+OneSignal.h hash2 @@ -25,11 +32,39 @@ DC9WcVr/94eTh7NHtwKhA8C2fPJVJfY0nn9A6fuHGhA= + Headers/OSDeviceUtils.h + + hash2 + + CJpM5If7vZz4m960lM+ulaOZohExs1bTVVH5q0zODe4= + + + Headers/OSDialogInstanceManager.h + + hash2 + + TZyL4I0k2RDNt3IPxABcOPcjrjywMJ0x1SZXMXeiqxA= + + + Headers/OSInAppMessages.h + + hash2 + + bqHvuK40s5I7ykwwB/ucIDu8LyZcKLMOGagHfuOpUKY= + + Headers/OSJSONHandling.h hash2 - kwMvLl1JtYBgIUz5NHRrummY0mdnyAPM2lP6HtOGETw= + s3NgkOLqd6fRlHYOq0qucoCdi9UhfSqxLGpl26BnNck= + + + Headers/OSLocation.h + + hash2 + + Ci2MC5dabTrUMJjPeBp9MLhuPzvSeMfGFLHdooZzTbc= Headers/OSMacros.h @@ -39,11 +74,18 @@ aKanW/TgpNzztpIpYJVbnxfUUFcNJAolzoX8n0+EwJc= + Headers/OSNetworkingUtils.h + + hash2 + + ZGA1WvJrfJUvBvSHYQC2gW9v2qpNNy33Dm9rbTNxWPM= + + Headers/OSNotification+Internal.h hash2 - bz9UK/DGxP8LAEzMdBiUj0l9UsfhSo11AUAW6X1NfNQ= + Tc1KYQDY1EeOl2QeL9dKZQU7KTeDLFWV8v+EOhkiw9Q= Headers/OSNotification.h @@ -57,70 +99,105 @@ hash2 - TfTvbYwUILlXsIfPJ92tgrhSS23UTibhhKt6j4Q984U= + FLr4F43qLlZCYpjFXeqgpCiheBKvOyBSrnUxl+64Sys= + + + Headers/OSObservable.h + + hash2 + + YSHpULg8LgM3KqieFsTXQ3IusHjt3KxhMuJm/nBEy4c= Headers/OSPrivacyConsentController.h hash2 - Nl0w50EzXPgal1ghTEM3QIoYLzOYHH195NTzq3Zlvmo= + ZbsLBZFACw0H6sd80zOvxaGw6Jq/0Sz1diu28fYUOZY= + + + Headers/OSRemoteParamController.h + + hash2 + + ksHXJtuz3uj948tfqdNMchzP74zrK8cUPqvAVUHa3tQ= Headers/OSRequests.h hash2 - YdFlpQOMH+9m9N627gcvPVwShSPrBzKvDm3E3FCYHvk= + IgxmAHnDmkedMwrgA9QzZfoahOsSjNJjysKwkzKpq00= Headers/OneSignalClient.h hash2 - cbF3Wa3Lqa0Wb2275ot3ploX1KXQ+znQBiBOu0TzV6M= + CSAZbyxJ1QBEtH5JYy/HwJiYsj+udPG1u4dhMFgkUtQ= Headers/OneSignalCommonDefines.h hash2 - eqM+JeBS7UHFUhH5+9VG9IniNho+Ty3RnfIngZcsDMY= + 1qNmj2Xi1nveKzdxur6CcYWRiJz8wgQlamdfr2EFJb4= + + + Headers/OneSignalConfigManager.h + + hash2 + + 6+sJzc6wU2Vd6ZJtouqBsA12C1qGLBjFS/ED/+he950= Headers/OneSignalCore.h hash2 - uLAWfHauq9MJASOHxa8O6emo1oXTfJcLShIdOAUxG88= + CZNtCCWsZDtT4qPjBwdved+ePMTZHxOiPePJe2wbheY= Headers/OneSignalCoreHelper.h hash2 - vK6D0j+ZbW5ycXiO3jb9aLvluPdvyYGxCSFl1gkVp14= + OMNqcRy39+beti7vT2rQki8JFnft65SbakA3QVQxHQQ= Headers/OneSignalLog.h hash2 - GajjtheSMz3cfqOsaWZFUEdWm75d/HAwr00JdpDcUp0= + mBG60JTXM7cBDv7D7ZdAWOJbwxvoG7s2bg5IPmg/ZZM= + + + Headers/OneSignalMobileProvision.h + + hash2 + + l0RcO5v+JFSsTR7XTKreN7doUQ28JwnxoHpQKZd00vU= Headers/OneSignalRequest.h hash2 - 69iw4bnJGwQNk11KAchyrRMPCM6Rf4C9Wvn+HMnTCXc= + b0DH58A5Q4B9Cj/lCH23eT3A6PqLAijRhgpNgm6nCbQ= + + + Headers/OneSignalSelectorHelpers.h + + hash2 + + FcuF30Rl2JdaHXFJ+B6tKmImZk5GiiEUtfmseHgsVO8= Headers/OneSignalTrackFirebaseAnalytics.h hash2 - VCgGIHlXYAQKerOcmqkIesJ+B+oWLXQya/3m1cYjnKc= + f8S2EXmRtv0a2KL8RoiLzMsuhMYEHNSZoywQelMGAYs= Headers/OneSignalUserDefaults.h @@ -130,6 +207,20 @@ QIYtzchiCKQguyJOSY6PEhV0H98JRi2PdXSBmZxxLN4= + Headers/OneSignalWrapper.h + + hash2 + + 9rcG3BS5U4BNIRWmGWNlhOqrxsdC9FulAIj+pruvlMo= + + + Headers/SwizzlingForwarder.h + + hash2 + + 9kEbEQebIgu9aMkeBUQpTkT17xgIRXd1EC50UYWEmL8= + + Modules/module.modulemap hash2 @@ -141,7 +232,7 @@ hash2 - L0ic4MrVM4+GwfMfaog9HOe9cddieyjoqCRtK1NoZ5I= + T88z4rwjD28es8P5shIbaSQ5pRwMQsmuEOjspd6ujYg= diff --git a/iOS_SDK/OneSignalSDK/Source/LanguageProviderAppDefined.h b/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64_x86_64-simulator/OneSignalCore.framework/Headers/NSDateFormatter+OneSignal.h similarity index 85% rename from iOS_SDK/OneSignalSDK/Source/LanguageProviderAppDefined.h rename to iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64_x86_64-simulator/OneSignalCore.framework/Headers/NSDateFormatter+OneSignal.h index 24deadbbc..eb40931a9 100644 --- a/iOS_SDK/OneSignalSDK/Source/LanguageProviderAppDefined.h +++ b/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64_x86_64-simulator/OneSignalCore.framework/Headers/NSDateFormatter+OneSignal.h @@ -1,7 +1,7 @@ /** * Modified MIT License * - * Copyright 2021 OneSignal + * Copyright 2020 OneSignal * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -26,14 +26,6 @@ */ #import -#import "LanguageProvider.h" - -NS_ASSUME_NONNULL_BEGIN - -@interface LanguageProviderAppDefined : NSObject - -@property (nonnull)NSString* language; - +@interface NSDateFormatter (OneSignal) ++ (instancetype)iso8601DateFormatter; @end - -NS_ASSUME_NONNULL_END diff --git a/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64_x86_64-simulator/OneSignalCore.framework/Headers/OSDeviceUtils.h b/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64_x86_64-simulator/OneSignalCore.framework/Headers/OSDeviceUtils.h new file mode 100644 index 000000000..e646d6d1d --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64_x86_64-simulator/OneSignalCore.framework/Headers/OSDeviceUtils.h @@ -0,0 +1,41 @@ +/* + Modified MIT License + + Copyright 2022 OneSignal + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + 1. The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + 2. All copies of substantial portions of the Software may only be used in connection + with services provided by OneSignal. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + */ + +#import + +// NS_ASSUME_NONNULL_BEGIN + +@interface OSDeviceUtils : NSObject + ++ (NSString *)getCurrentDeviceVersion; ++ (BOOL)isIOSVersionGreaterThanOrEqual:(NSString *)version; ++ (BOOL)isIOSVersionLessThan:(NSString *)version; ++ (NSString*)getDeviceVariant; + +@end + +// NS_ASSUME_NONNULL_END diff --git a/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64_x86_64-simulator/OneSignalCore.framework/Headers/OSDialogInstanceManager.h b/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64_x86_64-simulator/OneSignalCore.framework/Headers/OSDialogInstanceManager.h new file mode 100644 index 000000000..3c842a306 --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64_x86_64-simulator/OneSignalCore.framework/Headers/OSDialogInstanceManager.h @@ -0,0 +1,40 @@ +/* + Modified MIT License + + Copyright 2022 OneSignal + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + 1. The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + 2. All copies of substantial portions of the Software may only be used in connection + with services provided by OneSignal. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + */ + +#import + +typedef void (^OSDialogActionCompletion)(int tappedActionIndex); + +@protocol OSDialogPresenter +- (void)presentDialogWithTitle:(NSString * _Nonnull)title withMessage:(NSString * _Nonnull)message withActions:(NSArray * _Nullable)actionTitles cancelTitle:(NSString * _Nonnull)cancelTitle withActionCompletion:(OSDialogActionCompletion _Nullable)completion; +- (void)clearQueue; +@end + +@interface OSDialogInstanceManager : NSObject ++ (void)setSharedInstance:(NSObject *_Nonnull)instance; ++ (NSObject *_Nullable)sharedInstance; +@end diff --git a/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64_x86_64-simulator/OneSignalCore.framework/Headers/OSInAppMessages.h b/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64_x86_64-simulator/OneSignalCore.framework/Headers/OSInAppMessages.h new file mode 100644 index 000000000..ff7a084e1 --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64_x86_64-simulator/OneSignalCore.framework/Headers/OSInAppMessages.h @@ -0,0 +1,142 @@ +/* + Modified MIT License + + Copyright 2023 OneSignal + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + 1. The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + 2. All copies of substantial portions of the Software may only be used in connection + with services provided by OneSignal. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + */ + +/** + Public API for the InAppMessages namespace. + */ + +@interface OSInAppMessage : NSObject + +@property (strong, nonatomic, nonnull) NSString *messageId; + +// Dictionary of properties available on OSInAppMessage only +- (NSDictionary *_Nonnull)jsonRepresentation; + +@end + + +@interface OSInAppMessageTag : NSObject + +@property (strong, nonatomic, nullable) NSDictionary *tagsToAdd; +@property (strong, nonatomic, nullable) NSArray *tagsToRemove; + +// Convert the class into a NSDictionary +- (NSDictionary *_Nonnull)jsonRepresentation; + +@end + +typedef NS_ENUM(NSUInteger, OSInAppMessageActionUrlType) { + OSInAppMessageActionUrlTypeSafari, + + OSInAppMessageActionUrlTypeWebview, + + OSInAppMessageActionUrlTypeReplaceContent +}; + +@interface OSInAppMessageClickResult : NSObject + +// The action name attached to the IAM action +@property (strong, nonatomic, nullable) NSString *actionId; + +// The URL (if any) that should be opened when the action occurs +@property (strong, nonatomic, nullable) NSString *url; + +// Whether or not the click action dismisses the message +@property (nonatomic) BOOL closingMessage; + +// Determines where the URL is loaded, ie. app opens a webview +@property (nonatomic) OSInAppMessageActionUrlType urlTarget; + +// Convert the class into a NSDictionary +- (NSDictionary *_Nonnull)jsonRepresentation; + +@end + +@interface OSInAppMessageWillDisplayEvent : NSObject +@property (nonatomic, readonly, nonnull) OSInAppMessage *message; +- (NSDictionary *_Nonnull)jsonRepresentation; +@end + +@interface OSInAppMessageDidDisplayEvent : NSObject +@property (nonatomic, readonly, nonnull) OSInAppMessage *message; +- (NSDictionary *_Nonnull)jsonRepresentation; +@end + +@interface OSInAppMessageWillDismissEvent : NSObject +@property (nonatomic, readonly, nonnull) OSInAppMessage *message; +- (NSDictionary *_Nonnull)jsonRepresentation; +@end + +@interface OSInAppMessageDidDismissEvent : NSObject +@property (nonatomic, readonly, nonnull) OSInAppMessage *message; +- (NSDictionary *_Nonnull)jsonRepresentation; +@end + +@interface OSInAppMessageClickEvent : NSObject +@property (nonatomic, readonly, nonnull) OSInAppMessage *message; +@property (nonatomic, readonly, nonnull) OSInAppMessageClickResult *result; +// Convert the class into a NSDictionary +- (NSDictionary *_Nonnull)jsonRepresentation; +@end + +@protocol OSInAppMessageClickListener +- (void)onClickInAppMessage:(OSInAppMessageClickEvent *_Nonnull)event +NS_SWIFT_NAME(onClick(event:)); +@end + +@protocol OSInAppMessageLifecycleListener +@optional +- (void)onWillDisplayInAppMessage:(OSInAppMessageWillDisplayEvent *_Nonnull)event +NS_SWIFT_NAME(onWillDisplay(event:)); +- (void)onDidDisplayInAppMessage:(OSInAppMessageDidDisplayEvent *_Nonnull)event +NS_SWIFT_NAME(onDidDisplay(event:)); +- (void)onWillDismissInAppMessage:(OSInAppMessageWillDismissEvent *_Nonnull)event +NS_SWIFT_NAME(onWillDismiss(event:)); +- (void)onDidDismissInAppMessage:(OSInAppMessageDidDismissEvent *_Nonnull)event +NS_SWIFT_NAME(onDidDismiss(event:)); +@end + +@protocol OSInAppMessages + ++ (void)addTrigger:(NSString * _Nonnull)key withValue:(NSString * _Nonnull)value; ++ (void)addTriggers:(NSDictionary * _Nonnull)triggers; ++ (void)removeTrigger:(NSString * _Nonnull)key; ++ (void)removeTriggers:(NSArray * _Nonnull)keys; ++ (void)clearTriggers; +// Allows Swift users to: OneSignal.InAppMessages.paused = true ++ (BOOL)paused NS_REFINED_FOR_SWIFT; ++ (void)paused:(BOOL)pause NS_REFINED_FOR_SWIFT; + ++ (void)addClickListener:(NSObject *_Nullable)listener NS_REFINED_FOR_SWIFT; ++ (void)removeClickListener:(NSObject *_Nullable)listener NS_REFINED_FOR_SWIFT; ++ (void)addLifecycleListener:(NSObject *_Nullable)listener NS_REFINED_FOR_SWIFT; ++ (void)removeLifecycleListener:(NSObject *_Nullable)listener NS_REFINED_FOR_SWIFT; +@end + +@interface OSStubInAppMessages : NSObject ++ (Class)InAppMessages; +@end diff --git a/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64_x86_64-simulator/OneSignalCore.framework/Headers/OSJSONHandling.h b/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64_x86_64-simulator/OneSignalCore.framework/Headers/OSJSONHandling.h index 0a565039a..2979b48e6 100644 --- a/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64_x86_64-simulator/OneSignalCore.framework/Headers/OSJSONHandling.h +++ b/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64_x86_64-simulator/OneSignalCore.framework/Headers/OSJSONHandling.h @@ -26,7 +26,7 @@ */ #import -#import "OSNotification.h" +#import @protocol OSJSONDecodable + (instancetype _Nullable)instanceWithData:(NSData * _Nonnull)data; diff --git a/iOS_SDK/OneSignalSDK/Source/OSLocationState.h b/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64_x86_64-simulator/OneSignalCore.framework/Headers/OSLocation.h similarity index 74% rename from iOS_SDK/OneSignalSDK/Source/OSLocationState.h rename to iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64_x86_64-simulator/OneSignalCore.framework/Headers/OSLocation.h index 1ced37678..a0a1eda40 100644 --- a/iOS_SDK/OneSignalSDK/Source/OSLocationState.h +++ b/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64_x86_64-simulator/OneSignalCore.framework/Headers/OSLocation.h @@ -1,7 +1,7 @@ /** Modified MIT License -Copyright 2021 OneSignal +Copyright 2023 OneSignal Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -25,13 +25,16 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -@interface OSLocationState : NSObject - -@property (strong, nonatomic, readwrite, nullable) NSNumber *latitude; -@property (strong, nonatomic, readwrite, nullable) NSNumber *longitude; -@property (strong, nonatomic, readwrite, nullable) NSNumber *verticalAccuracy; -@property (strong, nonatomic, readwrite, nullable) NSNumber *accuracy; - -- (NSDictionary*_Nonnull)toDictionary; +/** + Public API for the Location namespace. + */ +@protocol OSLocation +// - Request and track user's location ++ (void)requestPermission; ++ (void)setShared:(BOOL)enable NS_REFINED_FOR_SWIFT; ++ (BOOL)isShared NS_REFINED_FOR_SWIFT; +@end +@interface OSStubLocation : NSObject ++ (Class)Location; @end diff --git a/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64_x86_64-simulator/OneSignalCore.framework/Headers/OSNetworkingUtils.h b/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64_x86_64-simulator/OneSignalCore.framework/Headers/OSNetworkingUtils.h new file mode 100644 index 000000000..795f87be5 --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64_x86_64-simulator/OneSignalCore.framework/Headers/OSNetworkingUtils.h @@ -0,0 +1,47 @@ +/* + Modified MIT License + + Copyright 2022 OneSignal + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + 1. The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + 2. All copies of substantial portions of the Software may only be used in connection + with services provided by OneSignal. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + */ + +#import + +// NS_ASSUME_NONNULL_BEGIN + +typedef NS_ENUM(NSInteger, OSResponseStatusType) { + OSResponseStatusInvalid = 0, + OSResponseStatusRetryable, + OSResponseStatusUnauthorized, + OSResponseStatusMissing, + OSResponseStatusConflict +}; + +@interface OSNetworkingUtils : NSObject + ++ (NSNumber*)getNetType; ++ (OSResponseStatusType)getResponseStatusType:(NSInteger)statusCode; + +@end + +// NS_ASSUME_NONNULL_END diff --git a/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64_x86_64-simulator/OneSignalCore.framework/Headers/OSNotification+Internal.h b/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64_x86_64-simulator/OneSignalCore.framework/Headers/OSNotification+Internal.h index cdc43ea8e..44fc23e87 100644 --- a/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64_x86_64-simulator/OneSignalCore.framework/Headers/OSNotification+Internal.h +++ b/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64_x86_64-simulator/OneSignalCore.framework/Headers/OSNotification+Internal.h @@ -25,16 +25,12 @@ * THE SOFTWARE. */ -#import "OSNotificationClasses.h" +#import #ifndef OSNotification_Internal_h #define OSNotification_Internal_h @interface OSNotification(Internal) -+(instancetype _Nonnull )parseWithApns:(nonnull NSDictionary *)message; -- (void)setCompletionBlock:(OSNotificationDisplayResponse _Nonnull)completion; -- (void)startTimeoutTimer; -- (void)complete:(nullable OSNotification *)notification; @end #endif /* OSNotification_Internal_h */ diff --git a/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64_x86_64-simulator/OneSignalCore.framework/Headers/OSNotificationClasses.h b/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64_x86_64-simulator/OneSignalCore.framework/Headers/OSNotificationClasses.h index 2d8fed289..dd4a8ce18 100644 --- a/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64_x86_64-simulator/OneSignalCore.framework/Headers/OSNotificationClasses.h +++ b/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64_x86_64-simulator/OneSignalCore.framework/Headers/OSNotificationClasses.h @@ -25,7 +25,7 @@ * THE SOFTWARE. */ -#import "OSNotification.h" +#import // Pass in nil means a notification will not display typedef void (^OSNotificationDisplayResponse)(OSNotification* _Nullable notification); @@ -36,20 +36,17 @@ typedef NS_ENUM(NSUInteger, OSNotificationActionType) { OSNotificationActionTypeActionTaken }; -@interface OSNotificationAction : NSObject - -/* The type of the notification action */ -@property(readonly)OSNotificationActionType type; - +@interface OSNotificationClickResult : NSObject /* The ID associated with the button tapped. NULL when the actionType is NotificationTapped */ @property(readonly, nullable)NSString* actionId; +@property(readonly, nullable)NSString* url; @end -@interface OSNotificationOpenedResult : NSObject +@interface OSNotificationClickEvent : NSObject @property(readonly, nonnull)OSNotification* notification; -@property(readonly, nonnull)OSNotificationAction *action; +@property(readonly, nonnull)OSNotificationClickResult *result; /* Convert object into an NSString that can be convertible into a custom Dictionary / JSON Object */ - (NSString* _Nonnull)stringify; diff --git a/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64_x86_64-simulator/OneSignalCore.framework/Headers/OSObservable.h b/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64_x86_64-simulator/OneSignalCore.framework/Headers/OSObservable.h new file mode 100644 index 000000000..117041623 --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64_x86_64-simulator/OneSignalCore.framework/Headers/OSObservable.h @@ -0,0 +1,52 @@ +/** + * Modified MIT License + * + * Copyright 2017 OneSignal + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * 1. The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * 2. All copies of substantial portions of the Software may only be used in connection + * with services provided by OneSignal. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#ifndef OSObservable_h +#define OSObservable_h + + +@protocol OSObserver +- (void)onChanged:(id)state; +@end + +@interface OSObservable<__covariant ObserverType, __covariant ObjectType> : NSObject +- (instancetype _Nonnull)initWithChangeSelector:(SEL)selector; +- (void)addObserver:(ObserverType)observer; +- (void)removeObserver:(ObserverType)observer; +- (BOOL)notifyChange:(ObjectType)state; +@end + +// OSBoolObservable is for BOOL states which OSObservable above does not work with + +@interface OSBoolObservable<__covariant ObserverType> : NSObject +- (instancetype _Nonnull)initWithChangeSelector:(SEL)selector; +- (void)addObserver:(ObserverType)observer; +- (void)removeObserver:(ObserverType)observer; +- (BOOL)notifyChange:(BOOL)state; +@end + +#endif /* OSObservable_h */ diff --git a/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64_x86_64-simulator/OneSignalCore.framework/Headers/OSPrivacyConsentController.h b/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64_x86_64-simulator/OneSignalCore.framework/Headers/OSPrivacyConsentController.h index 37c4f09e6..63f5beb56 100644 --- a/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64_x86_64-simulator/OneSignalCore.framework/Headers/OSPrivacyConsentController.h +++ b/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64_x86_64-simulator/OneSignalCore.framework/Headers/OSPrivacyConsentController.h @@ -29,5 +29,7 @@ THE SOFTWARE. @interface OSPrivacyConsentController : NSObject + (BOOL)requiresUserPrivacyConsent; + (void)consentGranted:(BOOL)granted; ++ (BOOL)getPrivacyConsent; + (BOOL)shouldLogMissingPrivacyConsentErrorWithMethodName:(NSString *)methodName; ++ (void)setRequiresPrivacyConsent:(BOOL)required; @end diff --git a/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64_x86_64-simulator/OneSignalCore.framework/Headers/OSRemoteParamController.h b/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64_x86_64-simulator/OneSignalCore.framework/Headers/OSRemoteParamController.h new file mode 100644 index 000000000..94df375af --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64_x86_64-simulator/OneSignalCore.framework/Headers/OSRemoteParamController.h @@ -0,0 +1,48 @@ +/** +Modified MIT License + +Copyright 2020 OneSignal + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +1. The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +2. All copies of substantial portions of the Software may only be used in connection +with services provided by OneSignal. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. +*/ + +#ifndef OSRemoteParamController_h +#define OSRemoteParamController_h + +@interface OSRemoteParamController : NSObject + ++ (OSRemoteParamController *)sharedController; + +@property (strong, nonatomic, readonly, nonnull) NSDictionary *remoteParams; + +- (void)saveRemoteParams:(NSDictionary *_Nonnull)params; +- (BOOL)hasLocationKey; +- (BOOL)hasPrivacyConsentKey; + +- (BOOL)isLocationShared; +- (void)saveLocationShared:(BOOL)shared; +- (BOOL)isPrivacyConsentRequired; +- (void)savePrivacyConsentRequired:(BOOL)shared; + +@end + +#endif /* OSRemoteParamController_h */ diff --git a/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64_x86_64-simulator/OneSignalCore.framework/Headers/OSRequests.h b/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64_x86_64-simulator/OneSignalCore.framework/Headers/OSRequests.h index 43bf0348b..03e3a02a6 100644 --- a/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64_x86_64-simulator/OneSignalCore.framework/Headers/OSRequests.h +++ b/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64_x86_64-simulator/OneSignalCore.framework/Headers/OSRequests.h @@ -26,17 +26,13 @@ */ #import -#import "OneSignalRequest.h" +#import #ifndef OneSignalRequests_h #define OneSignalRequests_h NS_ASSUME_NONNULL_BEGIN -@interface OSRequestGetTags : OneSignalRequest -+ (instancetype)withUserId:(NSString *)userId appId:(NSString *)appId; -@end - @interface OSRequestGetIosParams : OneSignalRequest + (instancetype)withUserId:(NSString *)userId appId:(NSString *)appId; @end @@ -45,110 +41,26 @@ NS_ASSUME_NONNULL_BEGIN + (instancetype)withAppId:(NSString *)appId withJson:(NSMutableDictionary *)json; @end -@interface OSRequestUpdateNotificationTypes : OneSignalRequest -+ (instancetype)withUserId:(NSString *)userId appId:(NSString *)appId notificationTypes:(NSNumber *)notificationTypes; -@end - -@interface OSRequestSendPurchases : OneSignalRequest -+ (instancetype)withUserId:(NSString *)userId externalIdAuthToken:(NSString * _Nullable)externalIdAuthToken appId:(NSString *)appId withPurchases:(NSArray *)purchases; -+ (instancetype)withUserId:(NSString *)userId emailAuthToken:(NSString *)emailAuthToken appId:(NSString *)appId withPurchases:(NSArray *)purchases; -@end - @interface OSRequestSubmitNotificationOpened : OneSignalRequest + (instancetype)withUserId:(NSString *)userId appId:(NSString *)appId wasOpened:(BOOL)opened messageId:(NSString *)messageId withDeviceType:(NSNumber *)deviceType; @end -@interface OSRequestSyncHashedEmail : OneSignalRequest -+ (instancetype)withUserId:(NSString *)userId appId:(NSString *)appId email:(NSString *)email networkType:(NSNumber *)netType; -@end - NS_ASSUME_NONNULL_END -@interface OSRequestUpdateDeviceToken : OneSignalRequest -// Push channel update device token -+ (instancetype _Nonnull)withUserId:(NSString * _Nonnull)userId appId:(NSString * _Nonnull)appId deviceToken:(NSString * _Nullable)identifier notificationTypes:(NSNumber * _Nullable)notificationTypes externalIdAuthToken:(NSString * _Nullable)externalIdAuthToken; - -// Email channel update device token -+ (instancetype _Nonnull)withUserId:(NSString * _Nonnull)userId appId:(NSString * _Nonnull)appId deviceToken:(NSString * _Nullable)identifier withParentId:(NSString * _Nullable)parentId emailAuthToken:(NSString * _Nullable)emailAuthHash email:(NSString * _Nullable)email externalIdAuthToken:(NSString * _Nullable)externalIdAuthToken; - -// SMS channel update device token -+ (instancetype _Nonnull)withUserId:(NSString * _Nonnull)userId appId:(NSString * _Nonnull)appId deviceToken:(NSString * _Nullable)identifier smsAuthToken:(NSString * _Nullable)smsAuthToken externalIdAuthToken:(NSString * _Nullable)externalIdAuthToken; -@end - -@interface OSRequestRegisterUser : OneSignalRequest -+ (instancetype _Nonnull)withData:(NSDictionary * _Nonnull)registrationData userId:(NSString * _Nullable)userId; -@end - -@interface OSRequestCreateDevice : OneSignalRequest -+ (instancetype _Nonnull)withAppId:(NSString * _Nonnull)appId withDeviceType:(NSNumber * _Nonnull)deviceType withEmail:(NSString * _Nullable)email withPlayerId:(NSString * _Nullable)playerId withEmailAuthHash:(NSString * _Nullable)emailAuthHash withExternalUserId:(NSString * _Nullable)externalUserId withExternalIdAuthToken:(NSString * _Nullable)externalIdAuthToken; - -+ (instancetype _Nonnull)withAppId:(NSString * _Nonnull)appId withDeviceType:(NSNumber * _Nonnull)deviceType withSMSNumber:(NSString * _Nullable)smsNumber withPlayerId:(NSString * _Nullable)playerId withSMSAuthHash:(NSString * _Nullable)smsAuthHash withExternalUserId:(NSString * _Nullable)externalUserId withExternalIdAuthToken:(NSString * _Nullable)externalIdAuthToken; -@end - -@interface OSRequestLogoutEmail : OneSignalRequest -+ (instancetype _Nonnull)withAppId:(NSString * _Nonnull)appId emailPlayerId:(NSString * _Nonnull)emailPlayerId devicePlayerId:(NSString * _Nonnull)devicePlayerId emailAuthHash:(NSString * _Nullable)emailAuthHash; -@end - -@interface OSRequestLogoutSMS : OneSignalRequest -+ (instancetype _Nonnull)withAppId:(NSString * _Nonnull)appId smsPlayerId:(NSString * _Nonnull)smsPlayerId smsAuthHash:(NSString * _Nullable)smsAuthHash devicePlayerId:(NSString * _Nonnull)devicePlayerId; -@end - -@interface OSRequestSendTagsToServer : OneSignalRequest -+ (instancetype _Nonnull)withUserId:(NSString * _Nonnull)userId appId:(NSString * _Nonnull)appId tags:(NSDictionary * _Nonnull)tags networkType:(NSNumber * _Nonnull)netType withEmailAuthHashToken:(NSString * _Nullable)emailAuthToken withExternalIdAuthHashToken:(NSString * _Nullable)externalIdAuthToken; - -+ (instancetype _Nonnull)withUserId:(NSString * _Nonnull)userId appId:(NSString * _Nonnull)appId tags:(NSDictionary * _Nonnull)tags networkType:(NSNumber * _Nonnull)netType withSMSAuthHashToken:(NSString * _Nullable)smsAuthToken withExternalIdAuthHashToken:(NSString * _Nullable)externalIdAuthToken; -@end - -@interface OSRequestUpdateLanguage : OneSignalRequest -+ (instancetype _Nonnull)withUserId:(NSString * _Nonnull)userId - appId:(NSString * _Nonnull)appId - language:(NSString * _Nonnull)language - emailAuthToken:(NSString * _Nullable)emailAuthHash - externalIdAuthToken:(NSString * _Nullable)externalIdAuthToken; - -+ (instancetype _Nonnull)withUserId:(NSString * _Nonnull)userId - appId:(NSString * _Nonnull)appId - language:(NSString * _Nonnull)language - smsAuthToken:(NSString * _Nullable)smsAuthToken - externalIdAuthToken:(NSString * _Nullable)externalIdAuthToken; -@end - -@interface OSRequestBadgeCount : OneSignalRequest -+ (instancetype _Nonnull)withUserId:(NSString * _Nonnull)userId - appId:(NSString * _Nonnull)appId - badgeCount:(NSNumber * _Nonnull)badgeCount - emailAuthToken:(NSString * _Nullable)emailAuthHash - externalIdAuthToken:(NSString * _Nullable)externalIdAuthToken; - -+ (instancetype _Nonnull)withUserId:(NSString * _Nonnull)userId - appId:(NSString * _Nonnull)appId - badgeCount:(NSNumber * _Nonnull)badgeCount - smsAuthToken:(NSString * _Nullable)smsAuthToken - externalIdAuthToken:(NSString * _Nullable)externalIdAuthToken; -@end - -@interface OSRequestUpdateExternalUserId : OneSignalRequest -+ (instancetype _Nonnull)withUserId:(NSString * _Nullable)externalId withUserIdHashToken:(NSString * _Nullable)hashToken withOneSignalUserId:(NSString * _Nonnull)userId appId:(NSString * _Nonnull)appId; - -+ (instancetype _Nonnull)withUserId:(NSString * _Nullable)externalId withUserIdHashToken:(NSString * _Nullable)hashToken withOneSignalUserId:(NSString * _Nonnull)userId withEmailHashToken:(NSString * _Nullable)emailHashToken appId:(NSString * _Nonnull)appId; - -+ (instancetype _Nonnull)withUserId:(NSString * _Nullable)externalId withUserIdHashToken:(NSString * _Nullable)hashToken withOneSignalUserId:(NSString * _Nonnull)userId withSMSHashToken:(NSString * _Nullable)smsHashToken appId:(NSString * _Nonnull)appId; -@end - @interface OSRequestTrackV1 : OneSignalRequest + (instancetype _Nonnull)trackUsageData:(NSString * _Nonnull)osUsageData appId:(NSString * _Nonnull)appId; @end @interface OSRequestLiveActivityEnter: OneSignalRequest -+ (instancetype _Nonnull)withUserId:(NSString * _Nonnull)userId ++ (instancetype _Nonnull)withSubscriptionId:(NSString * _Nonnull)subscriptionId appId:(NSString * _Nonnull)appId activityId:(NSString * _Nonnull)activityId token:(NSString * _Nonnull)token; @end @interface OSRequestLiveActivityExit: OneSignalRequest -+ (instancetype _Nonnull)withUserId:(NSString * _Nonnull)userId ++ (instancetype _Nonnull)withSubscriptionId:(NSString * _Nonnull)subscriptionId appId:(NSString * _Nonnull)appId activityId:(NSString * _Nonnull)activityId; @end diff --git a/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64_x86_64-simulator/OneSignalCore.framework/Headers/OneSignalClient.h b/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64_x86_64-simulator/OneSignalCore.framework/Headers/OneSignalClient.h index 432a9abda..46f466add 100644 --- a/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64_x86_64-simulator/OneSignalCore.framework/Headers/OneSignalClient.h +++ b/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64_x86_64-simulator/OneSignalCore.framework/Headers/OneSignalClient.h @@ -26,7 +26,7 @@ */ #import -#import "OneSignalRequest.h" +#import #ifndef OneSignalClient_h #define OneSignalClient_h diff --git a/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64_x86_64-simulator/OneSignalCore.framework/Headers/OneSignalCommonDefines.h b/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64_x86_64-simulator/OneSignalCore.framework/Headers/OneSignalCommonDefines.h index d0d496869..ca7256cdf 100644 --- a/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64_x86_64-simulator/OneSignalCore.framework/Headers/OneSignalCommonDefines.h +++ b/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64_x86_64-simulator/OneSignalCore.framework/Headers/OneSignalCommonDefines.h @@ -46,7 +46,7 @@ // "*" in comment line ending comment means the string value has not been changed // App -#define ONESIGNAL_VERSION @"031207" +#define ONESIGNAL_VERSION @"050002" #define OSUD_APP_ID @"GT_APP_ID" // * OSUD_APP_ID #define OSUD_REGISTERED_WITH_APPLE @"GT_REGISTERED_WITH_APPLE" // * OSUD_REGISTERED_WITH_APPLE @@ -65,30 +65,14 @@ #define OSUD_PERMISSION_EPHEMERAL_FROM @"OSUD_PERMISSION_EPHEMERAL_FROM" // * OSUD_PERMISSION_EPHEMERAL_FROM #define OSUD_LANGUAGE @"OSUD_LANGUAGE" // * OSUD_LANGUAGE #define DEFAULT_LANGUAGE @"en" // * OSUD_LANGUAGE -// Player -#define OSUD_EXTERNAL_USER_ID @"OS_EXTERNAL_USER_ID" // * OSUD_EXTERNAL_USER_ID -#define OSUD_PLAYER_ID_TO @"GT_PLAYER_ID" // * OSUD_PLAYER_ID_TO -#define OSUD_PLAYER_ID_FROM @"GT_PLAYER_ID_LAST" // * OSUD_PLAYER_ID_FROM -#define OSUD_PUSH_TOKEN_TO @"GT_DEVICE_TOKEN" // * OSUD_PUSH_TOKEN_TO -#define OSUD_PUSH_TOKEN_FROM @"GT_DEVICE_TOKEN_LAST" // * OSUD_PUSH_TOKEN_FROM -#define OSUD_USER_SUBSCRIPTION_TO @"ONESIGNAL_SUBSCRIPTION" // * OSUD_USER_SUBSCRIPTION_TO -#define OSUD_USER_SUBSCRIPTION_FROM @"ONESIGNAL_SUBSCRIPTION_SETTING" // * OSUD_USER_SUBSCRIPTION_FROM -#define OSUD_EXTERNAL_ID_AUTH_CODE @"OSUD_EXTERNAL_ID_AUTH_CODE" -// Email -#define OSUD_EMAIL_ADDRESS @"EMAIL_ADDRESS" // * OSUD_EMAIL_ADDRESS -#define OSUD_EMAIL_PLAYER_ID @"GT_EMAIL_PLAYER_ID" // * OSUD_EMAIL_PLAYER_ID -#define OSUD_EMAIL_EXTERNAL_USER_ID @"OSUD_EMAIL_EXTERNAL_USER_ID" // OSUD_EMAIL_EXTERNAL_USER_ID -#define OSUD_REQUIRE_EMAIL_AUTH @"GT_REQUIRE_EMAIL_AUTH" // * OSUD_REQUIRE_EMAIL_AUTH -#define OSUD_EMAIL_AUTH_CODE @"GT_EMAIL_AUTH_CODE" // * OSUD_EMAIL_AUTH_CODE -// SMS -#define OSUD_SMS_NUMBER @"OSUD_SMS_NUMBER" -#define OSUD_SMS_PLAYER_ID @"OSUD_SMS_PLAYER_ID" -#define OSUD_SMS_EXTERNAL_USER_ID @"OSUD_SMS_EXTERNAL_USER_ID" -#define OSUD_REQUIRE_SMS_AUTH @"OSUD_REQUIRE_SMS_AUTH" -#define OSUD_SMS_AUTH_CODE @"OSUD_SMS_AUTH_CODE" + +/* Push Subscription */ +#define OSUD_LEGACY_PLAYER_ID @"GT_PLAYER_ID" // The legacy player ID from SDKs prior to 5.x.x +#define OSUD_PUSH_SUBSCRIPTION_ID @"OSUD_PUSH_SUBSCRIPTION_ID" +#define OSUD_PUSH_TOKEN @"GT_DEVICE_TOKEN" + // Notification #define OSUD_LAST_MESSAGE_OPENED @"GT_LAST_MESSAGE_OPENED_" // * OSUD_MOST_RECENT_NOTIFICATION_OPENED -#define OSUD_NOTIFICATION_OPEN_LAUNCH_URL @"ONESIGNAL_INAPP_LAUNCH_URL" // * OSUD_NOTIFICATION_OPEN_LAUNCH_URL #define OSUD_TEMP_CACHED_NOTIFICATION_MEDIA @"OSUD_TEMP_CACHED_NOTIFICATION_MEDIA" // OSUD_TEMP_CACHED_NOTIFICATION_MEDIA // Remote Params #define OSUD_LOCATION_ENABLED @"OSUD_LOCATION_ENABLED" @@ -118,8 +102,6 @@ #define OSUD_APP_LAST_CLOSED_TIME @"GT_LAST_CLOSED_TIME" // * OSUD_APP_LAST_CLOSED_TIME #define OSUD_UNSENT_ACTIVE_TIME @"GT_UNSENT_ACTIVE_TIME" // * OSUD_UNSENT_ACTIVE_TIME #define OSUD_UNSENT_ACTIVE_TIME_ATTRIBUTED @"GT_UNSENT_ACTIVE_TIME_ATTRIBUTED" // * OSUD_UNSENT_ACTIVE_TIME_ATTRIBUTED -#define OSUD_PLAYER_TAGS @"OSUD_PLAYER_TAGS" - // * OSUD_PLAYER_TAGS // Deprecated Selectors #define DEPRECATED_SELECTORS @[ @"application:didReceiveLocalNotification:", \ @@ -172,6 +154,7 @@ // APNS params #define ONESIGNAL_IAM_PREVIEW @"os_in_app_message_preview_id" +#define ONESIGNAL_POST_PREVIEW_IAM @"ONESIGNAL_POST_PREVIEW_IAM" #define ONESIGNAL_SUPPORTED_ATTACHMENT_TYPES @[@"aiff", @"wav", @"mp3", @"mp4", @"jpg", @"jpeg", @"png", @"gif", @"mpeg", @"mpg", @"avi", @"m4a", @"m4v"] @@ -200,6 +183,15 @@ typedef enum {BACKGROUND, END_SESSION} FocusEventType; typedef enum {ATTRIBUTED, NOT_ATTRIBUTED} FocusAttributionState; #define focusAttributionStateString(enum) [@[@"ATTRIBUTED", @"NOT_ATTRIBUTED"] objectAtIndex:enum] +// OneSignal Background Task Identifiers +#define ATTRIBUTED_FOCUS_TASK @"ATTRIBUTED_FOCUS_TASK" +#define UNATTRIBUTED_FOCUS_TASK @"UNATTRIBUTED_FOCUS_TASK" +#define SEND_SESSION_TIME_TO_USER_TASK @"SEND_SESSION_TIME_TO_USER_TASK" +#define OPERATION_REPO_BACKGROUND_TASK @"OPERATION_REPO_BACKGROUND_TASK" +#define IDENTITY_EXECUTOR_BACKGROUND_TASK @"IDENTITY_EXECUTOR_BACKGROUND_TASK_" +#define PROPERTIES_EXECUTOR_BACKGROUND_TASK @"PROPERTIES_EXECUTOR_BACKGROUND_TASK_" +#define SUBSCRIPTION_EXECUTOR_BACKGROUND_TASK @"SUBSCRIPTION_EXECUTOR_BACKGROUND_TASK_" + // OneSignal constants #define OS_PUSH @"push" #define OS_EMAIL @"email" @@ -209,8 +201,8 @@ typedef enum {ATTRIBUTED, NOT_ATTRIBUTED} FocusAttributionState; #define OS_CHANNELS @[OS_PUSH, OS_EMAIL, OS_SMS] // OneSignal API Client Defines -typedef enum {GET, POST, HEAD, PUT, DELETE, OPTIONS, CONNECT, TRACE} HTTPMethod; -#define OS_API_CLIENT_STRINGS @[@"GET", @"POST", @"HEAD", @"PUT", @"DELETE", @"OPTIONS", @"CONNECT", @"TRACE"] +typedef enum {GET, POST, HEAD, PUT, DELETE, OPTIONS, CONNECT, TRACE, PATCH} HTTPMethod; +#define OS_API_CLIENT_STRINGS @[@"GET", @"POST", @"HEAD", @"PUT", @"DELETE", @"OPTIONS", @"CONNECT", @"TRACE", @"PATCH"] #define httpMethodString(enum) [OS_API_CLIENT_STRINGS objectAtIndex:enum] // Notification types @@ -233,13 +225,6 @@ typedef enum {GET, POST, HEAD, PUT, DELETE, OPTIONS, CONNECT, TRACE} HTTPMethod; // 1 week in seconds #define WEEK_IN_SECONDS 604800.0 -// Registration delay -#define REGISTRATION_DELAY_SECONDS 30.0 - -// How long the SDK will wait for APNS to respond -// before registering the user anyways -#define APNS_TIMEOUT 25.0 - // The SDK saves a list of category ID's allowing multiple notifications // to have their own unique buttons/etc. #define SHARED_CATEGORY_LIST @"com.onesignal.shared_registered_categories" @@ -253,13 +238,10 @@ typedef enum {GET, POST, HEAD, PUT, DELETE, OPTIONS, CONNECT, TRACE} HTTPMethod; #ifndef OS_TEST // OneSignal API Client Defines - #define REATTEMPT_DELAY 30.0 + #define REATTEMPT_DELAY 5.0 #define REQUEST_TIMEOUT_REQUEST 120.0 //for most HTTP requests #define REQUEST_TIMEOUT_RESOURCE 120.0 //for loading a resource like an image - #define MAX_ATTEMPT_COUNT 3 - - // Send tags batch delay - #define SEND_TAGS_DELAY 5.0 + #define MAX_ATTEMPT_COUNT 5 // the max number of UNNotificationCategory ID's the SDK will register #define MAX_CATEGORIES_SIZE 128 @@ -276,9 +258,6 @@ typedef enum {GET, POST, HEAD, PUT, DELETE, OPTIONS, CONNECT, TRACE} HTTPMethod; #define REQUEST_TIMEOUT_RESOURCE 0.02 //for loading a resource like an image #define MAX_ATTEMPT_COUNT 3 - // Send tags batch delay - #define SEND_TAGS_DELAY 0.005 - // the max number of UNNotificationCategory ID's the SDK will register #define MAX_CATEGORIES_SIZE 5 @@ -301,4 +280,52 @@ typedef enum {GET, POST, HEAD, PUT, DELETE, OPTIONS, CONNECT, TRACE} HTTPMethod; #define MAX_NOTIFICATION_MEDIA_SIZE_BYTES 50000000 +#pragma mark User Model + +#define OS_ONESIGNAL_ID @"onesignal_id" +#define OS_EXTERNAL_ID @"external_id" + +#define OS_ON_USER_WILL_CHANGE @"OS_ON_USER_WILL_CHANGE" + +// Models and Model Stores +#define OS_IDENTITY_MODEL_KEY @"OS_IDENTITY_MODEL_KEY" +#define OS_IDENTITY_MODEL_STORE_KEY @"OS_IDENTITY_MODEL_STORE_KEY" +#define OS_PROPERTIES_MODEL_KEY @"OS_PROPERTIES_MODEL_KEY" +#define OS_PROPERTIES_MODEL_STORE_KEY @"OS_PROPERTIES_MODEL_STORE_KEY" +#define OS_PUSH_SUBSCRIPTION_MODEL_KEY @"OS_PUSH_SUBSCRIPTION_MODEL_KEY" +#define OS_PUSH_SUBSCRIPTION_MODEL_STORE_KEY @"OS_PUSH_SUBSCRIPTION_MODEL_STORE_KEY" +#define OS_SUBSCRIPTION_MODEL_STORE_KEY @"OS_SUBSCRIPTION_MODEL_STORE_KEY" + +// Deltas +#define OS_ADD_ALIAS_DELTA @"OS_ADD_ALIAS_DELTA" +#define OS_REMOVE_ALIAS_DELTA @"OS_REMOVE_ALIAS_DELTA" + +#define OS_UPDATE_PROPERTIES_DELTA @"OS_UPDATE_PROPERTIES_DELTA" + +#define OS_ADD_SUBSCRIPTION_DELTA @"OS_ADD_SUBSCRIPTION_DELTA" +#define OS_REMOVE_SUBSCRIPTION_DELTA @"OS_REMOVE_SUBSCRIPTION_DELTA" +#define OS_UPDATE_SUBSCRIPTION_DELTA @"OS_UPDATE_SUBSCRIPTION_DELTA" + +// Operation Repo +#define OS_OPERATION_REPO_DELTA_QUEUE_KEY @"OS_OPERATION_REPO_DELTA_QUEUE_KEY" + +// User Executor +#define OS_USER_EXECUTOR_USER_REQUEST_QUEUE_KEY @"OS_USER_EXECUTOR_USER_REQUEST_QUEUE_KEY" +#define OS_USER_EXECUTOR_TRANSFER_SUBSCRIPTION_REQUEST_QUEUE_KEY @"OS_USER_EXECUTOR_TRANSFER_SUBSCRIPTION_REQUEST_QUEUE_KEY" + +// Identity Executor +#define OS_IDENTITY_EXECUTOR_DELTA_QUEUE_KEY @"OS_IDENTITY_EXECUTOR_DELTA_QUEUE_KEY" +#define OS_IDENTITY_EXECUTOR_ADD_REQUEST_QUEUE_KEY @"OS_IDENTITY_EXECUTOR_ADD_REQUEST_QUEUE_KEY" +#define OS_IDENTITY_EXECUTOR_REMOVE_REQUEST_QUEUE_KEY @"OS_IDENTITY_EXECUTOR_REMOVE_REQUEST_QUEUE_KEY" + +// Property Executor +#define OS_PROPERTIES_EXECUTOR_DELTA_QUEUE_KEY @"OS_PROPERTIES_EXECUTOR_DELTA_QUEUE_KEY" +#define OS_PROPERTIES_EXECUTOR_UPDATE_REQUEST_QUEUE_KEY @"OS_PROPERTIES_EXECUTOR_UPDATE_REQUEST_QUEUE_KEY" + +// Subscription Executor +#define OS_SUBSCRIPTION_EXECUTOR_DELTA_QUEUE_KEY @"OS_SUBSCRIPTION_EXECUTOR_DELTA_QUEUE_KEY" +#define OS_SUBSCRIPTION_EXECUTOR_ADD_REQUEST_QUEUE_KEY @"OS_SUBSCRIPTION_EXECUTOR_ADD_REQUEST_QUEUE_KEY" +#define OS_SUBSCRIPTION_EXECUTOR_REMOVE_REQUEST_QUEUE_KEY @"OS_SUBSCRIPTION_EXECUTOR_REMOVE_REQUEST_QUEUE_KEY" +#define OS_SUBSCRIPTION_EXECUTOR_UPDATE_REQUEST_QUEUE_KEY @"OS_SUBSCRIPTION_EXECUTOR_UPDATE_REQUEST_QUEUE_KEY" + #endif /* OneSignalCommonDefines_h */ diff --git a/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64_x86_64-simulator/OneSignalCore.framework/Headers/OneSignalConfigManager.h b/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64_x86_64-simulator/OneSignalCore.framework/Headers/OneSignalConfigManager.h new file mode 100644 index 000000000..481b16eee --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64_x86_64-simulator/OneSignalCore.framework/Headers/OneSignalConfigManager.h @@ -0,0 +1,36 @@ +/* + Modified MIT License + + Copyright 2022 OneSignal + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + 1. The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + 2. All copies of substantial portions of the Software may only be used in connection + with services provided by OneSignal. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + */ + +#import + +@interface OneSignalConfigManager : NSObject + ++ (void)setAppId:(NSString *)appId; ++ (NSString *_Nullable)getAppId; ++ (BOOL)shouldAwaitAppIdAndLogMissingPrivacyConsentForMethod:(NSString *)methodName; + +@end diff --git a/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64_x86_64-simulator/OneSignalCore.framework/Headers/OneSignalCore.h b/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64_x86_64-simulator/OneSignalCore.framework/Headers/OneSignalCore.h index 5d7cc7c88..966ea8fdc 100644 --- a/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64_x86_64-simulator/OneSignalCore.framework/Headers/OneSignalCore.h +++ b/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64_x86_64-simulator/OneSignalCore.framework/Headers/OneSignalCore.h @@ -27,24 +27,32 @@ #pragma clang diagnostic ignored "-Wnullability-completeness" #import -#import "OneSignalUserDefaults.h" -#import "OneSignalCommonDefines.h" -#import "OSNotification.h" -#import "OSNotification+Internal.h" -#import "OSNotificationClasses.h" -#import "OneSignalLog.h" -#import "NSURL+OneSignal.h" -#import "NSString+OneSignal.h" -#import "OSRequests.h" -#import "OneSignalRequest.h" -#import "OneSignalClient.h" -#import "OneSignalCoreHelper.h" -#import "OneSignalTrackFirebaseAnalytics.h" -#import "OSMacros.h" -#import "OSJSONHandling.h" -#import "OSPrivacyConsentController.h" - -@interface OneSignalCore : NSObject - -@end - +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import diff --git a/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64_x86_64-simulator/OneSignalCore.framework/Headers/OneSignalCoreHelper.h b/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64_x86_64-simulator/OneSignalCore.framework/Headers/OneSignalCoreHelper.h index 2a95e9c38..9194ead16 100644 --- a/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64_x86_64-simulator/OneSignalCore.framework/Headers/OneSignalCoreHelper.h +++ b/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64_x86_64-simulator/OneSignalCore.framework/Headers/OneSignalCoreHelper.h @@ -25,6 +25,7 @@ * THE SOFTWARE. */ +#import @interface OneSignalCoreHelper : NSObject #pragma clang diagnostic ignored "-Wstrict-prototypes" #pragma clang diagnostic ignored "-Wnullability-completeness" @@ -37,4 +38,33 @@ + (NSString*)hashUsingSha1:(NSString*)string; + (NSString*)hashUsingMD5:(NSString*)string; + (NSString*)trimURLSpacing:(NSString*)url; ++ (NSString*)parseNSErrorAsJsonString:(NSError*)error; ++ (BOOL)isOneSignalPayload:(NSDictionary *)payload; ++ (NSMutableDictionary*) formatApsPayloadIntoStandard:(NSDictionary*)remoteUserInfo identifier:(NSString*)identifier; ++ (BOOL)isRemoteSilentNotification:(NSDictionary*)msg; ++ (BOOL)isDisplayableNotification:(NSDictionary*)msg; ++ (NSString*)randomStringWithLength:(int)length; ++ (BOOL)verifyURL:(NSString *)urlString; ++ (BOOL)isWWWScheme:(NSURL*)url; + +// For NSInvocations. Use this when wanting to performSelector with more than 2 arguments ++(void)callSelector:(SEL)selector onObject:(id)object withArgs:(NSArray*)args; +// For NSInvocations. Use this when wanting to performSelector with a boolean argument ++(void)callSelector:(SEL)selector onObject:(id)object withArg:(BOOL)arg; +/* + A simplified enum for UIDeviceOrientation with just invalid, portrait, and landscape + */ +typedef NS_ENUM(NSInteger, ViewOrientation) { + OrientationInvalid, + OrientationPortrait, + OrientationLandscape, +}; + ++ (ViewOrientation)validateOrientation:(UIDeviceOrientation)orientation; + ++ (CGFloat)sizeToScale:(float)size; + ++ (CGRect)getScreenBounds; + ++ (float)getScreenScale; @end diff --git a/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64_x86_64-simulator/OneSignalCore.framework/Headers/OneSignalLog.h b/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64_x86_64-simulator/OneSignalCore.framework/Headers/OneSignalLog.h index 7f776f5fb..d5e72bcbe 100644 --- a/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64_x86_64-simulator/OneSignalCore.framework/Headers/OneSignalLog.h +++ b/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64_x86_64-simulator/OneSignalCore.framework/Headers/OneSignalLog.h @@ -26,8 +26,6 @@ */ #import -@interface OneSignalLog : NSObject -#pragma mark Logging typedef NS_ENUM(NSUInteger, ONE_S_LOG_LEVEL) { ONE_S_LL_NONE, ONE_S_LL_FATAL, @@ -38,8 +36,13 @@ typedef NS_ENUM(NSUInteger, ONE_S_LOG_LEVEL) { ONE_S_LL_VERBOSE }; +@protocol OSDebug + (void)setLogLevel:(ONE_S_LOG_LEVEL)logLevel; -+ (ONE_S_LOG_LEVEL)getLogLevel; -+ (void)onesignalLog:(ONE_S_LOG_LEVEL)logLevel message:(NSString* _Nonnull)message; ++ (void)setAlertLevel:(ONE_S_LOG_LEVEL)logLevel NS_REFINED_FOR_SWIFT; +@end +@interface OneSignalLog : NSObject ++ (Class)Debug; ++ (void)onesignalLog:(ONE_S_LOG_LEVEL)logLevel message:(NSString* _Nonnull)message; ++ (ONE_S_LOG_LEVEL)getLogLevel; @end diff --git a/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64_x86_64-simulator/OneSignalCore.framework/Headers/OneSignalMobileProvision.h b/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64_x86_64-simulator/OneSignalCore.framework/Headers/OneSignalMobileProvision.h new file mode 100644 index 000000000..b040ea114 --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64_x86_64-simulator/OneSignalCore.framework/Headers/OneSignalMobileProvision.h @@ -0,0 +1,23 @@ +// +// OneSignalMobileProvision.h +// Renamed from UIApplication+BSMobileProvision.h to prevent conflicts +// +// Created by kaolin fire on 2013-06-24. +// Copyright (c) 2013 The Blindsight Corporation. All rights reserved. +// Released under the BSD 2-Clause License (see LICENSE) + +typedef NS_ENUM(NSInteger, OSUIApplicationReleaseMode) { + UIApplicationReleaseUnknown, + UIApplicationReleaseDev, + UIApplicationReleaseAdHoc, + UIApplicationReleaseWildcard, + UIApplicationReleaseAppStore, + UIApplicationReleaseSim, + UIApplicationReleaseEnterprise +}; + +@interface OneSignalMobileProvision : NSObject + ++ (OSUIApplicationReleaseMode) releaseMode; + +@end diff --git a/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64_x86_64-simulator/OneSignalCore.framework/Headers/OneSignalRequest.h b/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64_x86_64-simulator/OneSignalCore.framework/Headers/OneSignalRequest.h index 4e1b1fa82..be81332ed 100644 --- a/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64_x86_64-simulator/OneSignalCore.framework/Headers/OneSignalRequest.h +++ b/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64_x86_64-simulator/OneSignalCore.framework/Headers/OneSignalRequest.h @@ -28,7 +28,7 @@ #pragma clang diagnostic ignored "-Wnullability-completeness" #import -#import "OneSignalCommonDefines.h" +#import #ifndef OneSignalRequest_h @@ -47,6 +47,7 @@ typedef void (^OSFailureBlock)(NSError* error); @property (strong, nonatomic, nullable) NSDictionary *additionalHeaders; @property (nonatomic) int reattemptCount; @property (nonatomic) BOOL dataRequest; //false for JSON based requests +@property (nonatomic) NSDate *timestamp; -(BOOL)missingAppId; //for requests that don't require an appId parameter, the subclass should override this method and return false -(NSMutableURLRequest * _Nonnull )urlRequest; diff --git a/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64_x86_64-simulator/OneSignalCore.framework/Headers/OneSignalSelectorHelpers.h b/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64_x86_64-simulator/OneSignalCore.framework/Headers/OneSignalSelectorHelpers.h new file mode 100644 index 000000000..4cd8469c7 --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64_x86_64-simulator/OneSignalCore.framework/Headers/OneSignalSelectorHelpers.h @@ -0,0 +1,34 @@ +/** + * Modified MIT License + * + * Copyright 2017 OneSignal + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * 1. The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * 2. All copies of substantial portions of the Software may only be used in connection + * with services provided by OneSignal. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#ifndef OneSignalSelectorHelpers_h +#define OneSignalSelectorHelpers_h + +// Functions to help sizzle methods. +BOOL injectSelector(Class targetClass, SEL targetSelector, Class myClass, SEL mySelector); + +#endif /* OneSignalSelectorHelpers_h */ diff --git a/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64_x86_64-simulator/OneSignalCore.framework/Headers/OneSignalTrackFirebaseAnalytics.h b/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64_x86_64-simulator/OneSignalCore.framework/Headers/OneSignalTrackFirebaseAnalytics.h index 7cc355975..948541aaf 100644 --- a/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64_x86_64-simulator/OneSignalCore.framework/Headers/OneSignalTrackFirebaseAnalytics.h +++ b/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64_x86_64-simulator/OneSignalCore.framework/Headers/OneSignalTrackFirebaseAnalytics.h @@ -26,14 +26,14 @@ */ #import -#import "OSNotificationClasses.h" +#import @interface OneSignalTrackFirebaseAnalytics : NSObject +(BOOL)libraryExists; +(void)init; +(void)updateFromDownloadParams:(NSDictionary*)params; -+(void)trackOpenEvent:(OSNotificationOpenedResult*)results; ++(void)trackOpenEvent:(OSNotificationClickEvent*)event; +(void)trackReceivedEvent:(OSNotification*)notification; +(void)trackInfluenceOpenEvent; @end diff --git a/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64_x86_64-simulator/OneSignalCore.framework/Headers/OneSignalWrapper.h b/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64_x86_64-simulator/OneSignalCore.framework/Headers/OneSignalWrapper.h new file mode 100644 index 000000000..8fbab577d --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64_x86_64-simulator/OneSignalCore.framework/Headers/OneSignalWrapper.h @@ -0,0 +1,38 @@ +/* + Modified MIT License + + Copyright 2023 OneSignal + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + 1. The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + 2. All copies of substantial portions of the Software may only be used in connection + with services provided by OneSignal. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + */ + +#import + +@interface OneSignalWrapper : NSObject + +/* Type of Wrapper SDK such as "unity" */ +@property (class, nullable) NSString* sdkType; + +/* Version of Wrapper SDK in format "xxyyzz" */ +@property (class, nullable) NSString* sdkVersion; + +@end diff --git a/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64_x86_64-simulator/OneSignalCore.framework/Headers/SwizzlingForwarder.h b/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64_x86_64-simulator/OneSignalCore.framework/Headers/SwizzlingForwarder.h new file mode 100644 index 000000000..5559b52d1 --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64_x86_64-simulator/OneSignalCore.framework/Headers/SwizzlingForwarder.h @@ -0,0 +1,38 @@ +#import + +NS_ASSUME_NONNULL_BEGIN + +/** + Use this in your swizzled methods implementations to ensure your swizzling + does not create side effects. + This is done by checking if there was an existing implementations and also if + the object has a forwardingTargetForSelector: setup. + */ +@interface SwizzlingForwarder : NSObject +/** + Constructor to setup this instance so you can call invokeWithArgs latter + to forward the call onto the correct selector and object so you swizzling does + create any cause side effects. + @param object Your object, normally you should pass in self. + @param yourSelector Your named selector. + @param originalSelector The original selector, the one you would call if + swizzling was out of the picture. + @return Always returns an instance. + */ +-(instancetype)initWithTarget:(id)object + withYourSelector:(SEL)yourSelector + withOriginalSelector:(SEL)originalSelector; + +/** + Optionally call before invokeWithArgs to know it will execute anything. + */ +-(BOOL)hasReceiver; + +/** + Must call this to call in your swizzled method somewhere to ensure the + original code is still run. + */ +-(void)invokeWithArgs:(NSArray*)args; +@end + +NS_ASSUME_NONNULL_END diff --git a/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64_x86_64-simulator/OneSignalCore.framework/Info.plist b/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64_x86_64-simulator/OneSignalCore.framework/Info.plist index 165f9ebf7..3b988fa23 100644 Binary files a/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64_x86_64-simulator/OneSignalCore.framework/Info.plist and b/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64_x86_64-simulator/OneSignalCore.framework/Info.plist differ diff --git a/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64_x86_64-simulator/OneSignalCore.framework/OneSignalCore b/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64_x86_64-simulator/OneSignalCore.framework/OneSignalCore index 68806301c..10f5a4fd5 100755 Binary files a/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64_x86_64-simulator/OneSignalCore.framework/OneSignalCore and b/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64_x86_64-simulator/OneSignalCore.framework/OneSignalCore differ diff --git a/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64_x86_64-simulator/OneSignalCore.framework/_CodeSignature/CodeResources b/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64_x86_64-simulator/OneSignalCore.framework/_CodeSignature/CodeResources index 3ea205f12..b3e98c502 100644 --- a/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64_x86_64-simulator/OneSignalCore.framework/_CodeSignature/CodeResources +++ b/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework/ios-arm64_x86_64-simulator/OneSignalCore.framework/_CodeSignature/CodeResources @@ -4,6 +4,10 @@ files + Headers/NSDateFormatter+OneSignal.h + + ifs8KRiBPsLi2tcZaH5fqH8jlNg= + Headers/NSString+OneSignal.h /HTg8wbY+rfIy9/kCShHF2Oev6Y= @@ -12,17 +16,37 @@ RUcvMsE7Pj+BUpa1H4SgBH/O/EQ= + Headers/OSDeviceUtils.h + + qZnSYyg9QxHCH9m743tw/0wlLEE= + + Headers/OSDialogInstanceManager.h + + e5mWq3a0PQfTjU5ei4329nYUfwc= + + Headers/OSInAppMessages.h + + IR0wqr+0bgd4ZnDqeU0WgCPaQTo= + Headers/OSJSONHandling.h - 91d8OZhU9KOTu2qY+EdAF+M47+E= + 4LPubo4CHRtzWQ0TUlW8TcnrpnA= + + Headers/OSLocation.h + + o5UrpkxGWvWryFw5cKA4uD6cYyw= Headers/OSMacros.h 7HmaM9ljZnw77iovX0v/wnb3bX0= + Headers/OSNetworkingUtils.h + + x0y2o36axCWvOHRlZxY5hsZ4jmw= + Headers/OSNotification+Internal.h - hwttm7oX6fN2cgP1Z4laQAKP49Q= + 86k7Huy5kc2mfWTUAhc90rEQjs4= Headers/OSNotification.h @@ -30,51 +54,79 @@ Headers/OSNotificationClasses.h - iNvshoGLl4IEMy2K1Lq2stVxdB4= + L6If5GOxRJg1EgpvI3912AAVD1M= + + Headers/OSObservable.h + + uxk6nXuqHiQSVAOp/BQL4OAArxA= Headers/OSPrivacyConsentController.h - //dQV0JwOyLrzhcfN4IkI2abbFM= + M+s6N3SgUW271aVJk0EYnL/UIAo= + + Headers/OSRemoteParamController.h + + vX2LZhQ43LmAjwjYp/La6Hloomc= Headers/OSRequests.h - MqtDyOupA+cu7c+vEvwpMBVA1b4= + J1Kk5zLcCjEXVkzVwqgbEN27Myk= Headers/OneSignalClient.h - TAYBk2YV4sw9wzS85jL0QtcAen0= + xP3ln1gkiz3rYTGL3cLbXxIleq4= Headers/OneSignalCommonDefines.h - 1eS5Ug1Qlv9xeX/u6irY7k1VOg4= + nCgqTW0JEq1hprpZG8HigWLrhIk= + + Headers/OneSignalConfigManager.h + + rs5am2kldk0oFRiHVIRnYiOwwfk= Headers/OneSignalCore.h - T109aNL3gpg8ZtBUTteB6+7IuQ8= + fEHoz2bZp9TOWw+VERtj2wWR2p4= Headers/OneSignalCoreHelper.h - xQeNeuYQWybV7qex/9h0H2mvUqI= + /jKV40WVBCZu0YXLa1+IE0moY+k= Headers/OneSignalLog.h - 8fVibMV9iMCVoj/I14R7AwCROpk= + o5RSmHYkpLQOk/hhVawytbfylUg= + + Headers/OneSignalMobileProvision.h + + 7ZQcyM590dEqGyz7BtLDG3YORL0= Headers/OneSignalRequest.h - /uBkuxddG/dPmbTbANavHELydCw= + MxsNsoartS9iesNGTQE5YZ5qp64= + + Headers/OneSignalSelectorHelpers.h + + 3CBAjr2xx3yz874iThgaAtmtaAo= Headers/OneSignalTrackFirebaseAnalytics.h - oUxC/1Bnj1fAEZ+hPm30tS5H+f0= + 4YsXpAcxdhsGDmyQVKWbUwj1Ifw= Headers/OneSignalUserDefaults.h ZvwZZD2HkwwG1wOkh8jGhnl2lTY= + Headers/OneSignalWrapper.h + + 85h+tJFMUS/hX3RieVOMzFs03oE= + + Headers/SwizzlingForwarder.h + + HfyVhL3eh5S045pKiGtUIUEbITU= + Info.plist - c3CTwSjDZqeyEB+lk9WpQHCwWK4= + g2WdN5g1BpzYcXAyQklBUbCetYI= Modules/module.modulemap @@ -83,6 +135,13 @@ files2 + Headers/NSDateFormatter+OneSignal.h + + hash2 + + hn2vYW78u8AOY/ve3SKGul3cFrG350NV3Um0+EzhGHU= + + Headers/NSString+OneSignal.h hash2 @@ -97,11 +156,39 @@ DC9WcVr/94eTh7NHtwKhA8C2fPJVJfY0nn9A6fuHGhA= + Headers/OSDeviceUtils.h + + hash2 + + CJpM5If7vZz4m960lM+ulaOZohExs1bTVVH5q0zODe4= + + + Headers/OSDialogInstanceManager.h + + hash2 + + TZyL4I0k2RDNt3IPxABcOPcjrjywMJ0x1SZXMXeiqxA= + + + Headers/OSInAppMessages.h + + hash2 + + bqHvuK40s5I7ykwwB/ucIDu8LyZcKLMOGagHfuOpUKY= + + Headers/OSJSONHandling.h hash2 - kwMvLl1JtYBgIUz5NHRrummY0mdnyAPM2lP6HtOGETw= + s3NgkOLqd6fRlHYOq0qucoCdi9UhfSqxLGpl26BnNck= + + + Headers/OSLocation.h + + hash2 + + Ci2MC5dabTrUMJjPeBp9MLhuPzvSeMfGFLHdooZzTbc= Headers/OSMacros.h @@ -111,11 +198,18 @@ aKanW/TgpNzztpIpYJVbnxfUUFcNJAolzoX8n0+EwJc= + Headers/OSNetworkingUtils.h + + hash2 + + ZGA1WvJrfJUvBvSHYQC2gW9v2qpNNy33Dm9rbTNxWPM= + + Headers/OSNotification+Internal.h hash2 - bz9UK/DGxP8LAEzMdBiUj0l9UsfhSo11AUAW6X1NfNQ= + Tc1KYQDY1EeOl2QeL9dKZQU7KTeDLFWV8v+EOhkiw9Q= Headers/OSNotification.h @@ -129,70 +223,105 @@ hash2 - TfTvbYwUILlXsIfPJ92tgrhSS23UTibhhKt6j4Q984U= + FLr4F43qLlZCYpjFXeqgpCiheBKvOyBSrnUxl+64Sys= + + + Headers/OSObservable.h + + hash2 + + YSHpULg8LgM3KqieFsTXQ3IusHjt3KxhMuJm/nBEy4c= Headers/OSPrivacyConsentController.h hash2 - Nl0w50EzXPgal1ghTEM3QIoYLzOYHH195NTzq3Zlvmo= + ZbsLBZFACw0H6sd80zOvxaGw6Jq/0Sz1diu28fYUOZY= + + + Headers/OSRemoteParamController.h + + hash2 + + ksHXJtuz3uj948tfqdNMchzP74zrK8cUPqvAVUHa3tQ= Headers/OSRequests.h hash2 - YdFlpQOMH+9m9N627gcvPVwShSPrBzKvDm3E3FCYHvk= + IgxmAHnDmkedMwrgA9QzZfoahOsSjNJjysKwkzKpq00= Headers/OneSignalClient.h hash2 - cbF3Wa3Lqa0Wb2275ot3ploX1KXQ+znQBiBOu0TzV6M= + CSAZbyxJ1QBEtH5JYy/HwJiYsj+udPG1u4dhMFgkUtQ= Headers/OneSignalCommonDefines.h hash2 - eqM+JeBS7UHFUhH5+9VG9IniNho+Ty3RnfIngZcsDMY= + 1qNmj2Xi1nveKzdxur6CcYWRiJz8wgQlamdfr2EFJb4= + + + Headers/OneSignalConfigManager.h + + hash2 + + 6+sJzc6wU2Vd6ZJtouqBsA12C1qGLBjFS/ED/+he950= Headers/OneSignalCore.h hash2 - uLAWfHauq9MJASOHxa8O6emo1oXTfJcLShIdOAUxG88= + CZNtCCWsZDtT4qPjBwdved+ePMTZHxOiPePJe2wbheY= Headers/OneSignalCoreHelper.h hash2 - vK6D0j+ZbW5ycXiO3jb9aLvluPdvyYGxCSFl1gkVp14= + OMNqcRy39+beti7vT2rQki8JFnft65SbakA3QVQxHQQ= Headers/OneSignalLog.h hash2 - GajjtheSMz3cfqOsaWZFUEdWm75d/HAwr00JdpDcUp0= + mBG60JTXM7cBDv7D7ZdAWOJbwxvoG7s2bg5IPmg/ZZM= + + + Headers/OneSignalMobileProvision.h + + hash2 + + l0RcO5v+JFSsTR7XTKreN7doUQ28JwnxoHpQKZd00vU= Headers/OneSignalRequest.h hash2 - 69iw4bnJGwQNk11KAchyrRMPCM6Rf4C9Wvn+HMnTCXc= + b0DH58A5Q4B9Cj/lCH23eT3A6PqLAijRhgpNgm6nCbQ= + + + Headers/OneSignalSelectorHelpers.h + + hash2 + + FcuF30Rl2JdaHXFJ+B6tKmImZk5GiiEUtfmseHgsVO8= Headers/OneSignalTrackFirebaseAnalytics.h hash2 - VCgGIHlXYAQKerOcmqkIesJ+B+oWLXQya/3m1cYjnKc= + f8S2EXmRtv0a2KL8RoiLzMsuhMYEHNSZoywQelMGAYs= Headers/OneSignalUserDefaults.h @@ -202,6 +331,20 @@ QIYtzchiCKQguyJOSY6PEhV0H98JRi2PdXSBmZxxLN4= + Headers/OneSignalWrapper.h + + hash2 + + 9rcG3BS5U4BNIRWmGWNlhOqrxsdC9FulAIj+pruvlMo= + + + Headers/SwizzlingForwarder.h + + hash2 + + 9kEbEQebIgu9aMkeBUQpTkT17xgIRXd1EC50UYWEmL8= + + Modules/module.modulemap hash2 diff --git a/iOS_SDK/OneSignalSDK/OneSignal_Extension/OneSignalExtension.xcframework.zip b/iOS_SDK/OneSignalSDK/OneSignal_Extension/OneSignalExtension.xcframework.zip index de39b60ef..bb53b6210 100644 Binary files a/iOS_SDK/OneSignalSDK/OneSignal_Extension/OneSignalExtension.xcframework.zip and b/iOS_SDK/OneSignalSDK/OneSignal_Extension/OneSignalExtension.xcframework.zip differ diff --git a/iOS_SDK/OneSignalSDK/OneSignal_Extension/OneSignalExtension.xcframework/Info.plist b/iOS_SDK/OneSignalSDK/OneSignal_Extension/OneSignalExtension.xcframework/Info.plist index 85948a5e0..1089e5894 100644 --- a/iOS_SDK/OneSignalSDK/OneSignal_Extension/OneSignalExtension.xcframework/Info.plist +++ b/iOS_SDK/OneSignalSDK/OneSignal_Extension/OneSignalExtension.xcframework/Info.plist @@ -6,7 +6,7 @@ LibraryIdentifier - ios-arm64_x86_64-maccatalyst + ios-arm64_x86_64-simulator LibraryPath OneSignalExtension.framework SupportedArchitectures @@ -17,34 +17,34 @@ SupportedPlatform ios SupportedPlatformVariant - maccatalyst + simulator LibraryIdentifier - ios-arm64 + ios-arm64_x86_64-maccatalyst LibraryPath OneSignalExtension.framework SupportedArchitectures arm64 + x86_64 SupportedPlatform ios + SupportedPlatformVariant + maccatalyst LibraryIdentifier - ios-arm64_x86_64-simulator + ios-arm64 LibraryPath OneSignalExtension.framework SupportedArchitectures arm64 - x86_64 SupportedPlatform ios - SupportedPlatformVariant - simulator CFBundlePackageType diff --git a/iOS_SDK/OneSignalSDK/OneSignal_Extension/OneSignalExtension.xcframework/ios-arm64/OneSignalExtension.framework/Headers/OneSignalExtension.h b/iOS_SDK/OneSignalSDK/OneSignal_Extension/OneSignalExtension.xcframework/ios-arm64/OneSignalExtension.framework/Headers/OneSignalExtension.h index ef76a2cea..9a0853efc 100644 --- a/iOS_SDK/OneSignalSDK/OneSignal_Extension/OneSignalExtension.xcframework/ios-arm64/OneSignalExtension.framework/Headers/OneSignalExtension.h +++ b/iOS_SDK/OneSignalSDK/OneSignal_Extension/OneSignalExtension.xcframework/ios-arm64/OneSignalExtension.framework/Headers/OneSignalExtension.h @@ -27,10 +27,10 @@ #import #import -#import "OneSignalAttachmentHandler.h" -#import "OneSignalExtensionBadgeHandler.h" -#import "OneSignalReceiveReceiptsController.h" -#import "OneSignalNotificationServiceExtensionHandler.h" +#import +#import +#import +#import @interface OneSignalExtension : NSObject #pragma mark NotificationService Extension diff --git a/iOS_SDK/OneSignalSDK/OneSignal_Extension/OneSignalExtension.xcframework/ios-arm64/OneSignalExtension.framework/Info.plist b/iOS_SDK/OneSignalSDK/OneSignal_Extension/OneSignalExtension.xcframework/ios-arm64/OneSignalExtension.framework/Info.plist index bfd652267..1264e748b 100644 Binary files a/iOS_SDK/OneSignalSDK/OneSignal_Extension/OneSignalExtension.xcframework/ios-arm64/OneSignalExtension.framework/Info.plist and b/iOS_SDK/OneSignalSDK/OneSignal_Extension/OneSignalExtension.xcframework/ios-arm64/OneSignalExtension.framework/Info.plist differ diff --git a/iOS_SDK/OneSignalSDK/OneSignal_Extension/OneSignalExtension.xcframework/ios-arm64/OneSignalExtension.framework/OneSignalExtension b/iOS_SDK/OneSignalSDK/OneSignal_Extension/OneSignalExtension.xcframework/ios-arm64/OneSignalExtension.framework/OneSignalExtension index 7c05518a6..734484b98 100755 Binary files a/iOS_SDK/OneSignalSDK/OneSignal_Extension/OneSignalExtension.xcframework/ios-arm64/OneSignalExtension.framework/OneSignalExtension and b/iOS_SDK/OneSignalSDK/OneSignal_Extension/OneSignalExtension.xcframework/ios-arm64/OneSignalExtension.framework/OneSignalExtension differ diff --git a/iOS_SDK/OneSignalSDK/OneSignal_Extension/OneSignalExtension.xcframework/ios-arm64/OneSignalExtension.framework/_CodeSignature/CodeResources b/iOS_SDK/OneSignalSDK/OneSignal_Extension/OneSignalExtension.xcframework/ios-arm64/OneSignalExtension.framework/_CodeSignature/CodeResources index 3435e9774..cae919016 100644 --- a/iOS_SDK/OneSignalSDK/OneSignal_Extension/OneSignalExtension.xcframework/ios-arm64/OneSignalExtension.framework/_CodeSignature/CodeResources +++ b/iOS_SDK/OneSignalSDK/OneSignal_Extension/OneSignalExtension.xcframework/ios-arm64/OneSignalExtension.framework/_CodeSignature/CodeResources @@ -10,7 +10,7 @@ Headers/OneSignalExtension.h - edpFiRa+RCtTJobW5Rf0OSLMC44= + xD9hBHTGgdB/REvVahfaCi1i15U= Headers/OneSignalExtensionBadgeHandler.h @@ -26,7 +26,7 @@ Info.plist - atgFqAaY9B+/4yHh+aLd993HYnc= + 6UtsF+45fPbwOVMb2qFcCCrH+6s= Modules/module.modulemap @@ -46,7 +46,7 @@ hash2 - n4H86fUHxM2+HPT5GfHt7NhJQpn0HM/r4TA/xwRONF4= + d70Tj0PSUiGB4l6QdbVsmZRuKHKFYscrQlOWTgXAC7Q= Headers/OneSignalExtensionBadgeHandler.h diff --git a/iOS_SDK/OneSignalSDK/OneSignal_Extension/OneSignalExtension.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalExtension.framework/Versions/A/Headers/OneSignalExtension.h b/iOS_SDK/OneSignalSDK/OneSignal_Extension/OneSignalExtension.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalExtension.framework/Versions/A/Headers/OneSignalExtension.h index ef76a2cea..9a0853efc 100644 --- a/iOS_SDK/OneSignalSDK/OneSignal_Extension/OneSignalExtension.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalExtension.framework/Versions/A/Headers/OneSignalExtension.h +++ b/iOS_SDK/OneSignalSDK/OneSignal_Extension/OneSignalExtension.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalExtension.framework/Versions/A/Headers/OneSignalExtension.h @@ -27,10 +27,10 @@ #import #import -#import "OneSignalAttachmentHandler.h" -#import "OneSignalExtensionBadgeHandler.h" -#import "OneSignalReceiveReceiptsController.h" -#import "OneSignalNotificationServiceExtensionHandler.h" +#import +#import +#import +#import @interface OneSignalExtension : NSObject #pragma mark NotificationService Extension diff --git a/iOS_SDK/OneSignalSDK/OneSignal_Extension/OneSignalExtension.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalExtension.framework/Versions/A/OneSignalExtension b/iOS_SDK/OneSignalSDK/OneSignal_Extension/OneSignalExtension.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalExtension.framework/Versions/A/OneSignalExtension index 710f14eec..7e6b12b1d 100755 Binary files a/iOS_SDK/OneSignalSDK/OneSignal_Extension/OneSignalExtension.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalExtension.framework/Versions/A/OneSignalExtension and b/iOS_SDK/OneSignalSDK/OneSignal_Extension/OneSignalExtension.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalExtension.framework/Versions/A/OneSignalExtension differ diff --git a/iOS_SDK/OneSignalSDK/OneSignal_Extension/OneSignalExtension.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalExtension.framework/Versions/A/Resources/Info.plist b/iOS_SDK/OneSignalSDK/OneSignal_Extension/OneSignalExtension.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalExtension.framework/Versions/A/Resources/Info.plist index a2dfa8c57..b6c488b73 100644 --- a/iOS_SDK/OneSignalSDK/OneSignal_Extension/OneSignalExtension.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalExtension.framework/Versions/A/Resources/Info.plist +++ b/iOS_SDK/OneSignalSDK/OneSignal_Extension/OneSignalExtension.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalExtension.framework/Versions/A/Resources/Info.plist @@ -3,7 +3,7 @@ BuildMachineOSBuild - 22G90 + 22G91 CFBundleDevelopmentRegion en CFBundleExecutable diff --git a/iOS_SDK/OneSignalSDK/OneSignal_Extension/OneSignalExtension.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalExtension.framework/Versions/A/_CodeSignature/CodeResources b/iOS_SDK/OneSignalSDK/OneSignal_Extension/OneSignalExtension.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalExtension.framework/Versions/A/_CodeSignature/CodeResources index 4192d5c7d..1b1fd81ab 100644 --- a/iOS_SDK/OneSignalSDK/OneSignal_Extension/OneSignalExtension.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalExtension.framework/Versions/A/_CodeSignature/CodeResources +++ b/iOS_SDK/OneSignalSDK/OneSignal_Extension/OneSignalExtension.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalExtension.framework/Versions/A/_CodeSignature/CodeResources @@ -6,7 +6,7 @@ Resources/Info.plist - XEYCgfuXSIf1o6VxN0+nM0VgMF0= + kziSCrMRJQiVmBwnQysmoiipCqE= files2 @@ -22,7 +22,7 @@ hash2 - n4H86fUHxM2+HPT5GfHt7NhJQpn0HM/r4TA/xwRONF4= + d70Tj0PSUiGB4l6QdbVsmZRuKHKFYscrQlOWTgXAC7Q= Headers/OneSignalExtensionBadgeHandler.h @@ -57,7 +57,7 @@ hash2 - zaEiroEo9IOqYZRXaiGR/ymX63MOdcHvHaf6ttEPmAA= + AeTDtam58sBu7JD5H5P6PRGOjU2N1u60WhM9WSCYTcE= diff --git a/iOS_SDK/OneSignalSDK/OneSignal_Extension/OneSignalExtension.xcframework/ios-arm64_x86_64-simulator/OneSignalExtension.framework/Headers/OneSignalExtension.h b/iOS_SDK/OneSignalSDK/OneSignal_Extension/OneSignalExtension.xcframework/ios-arm64_x86_64-simulator/OneSignalExtension.framework/Headers/OneSignalExtension.h index ef76a2cea..9a0853efc 100644 --- a/iOS_SDK/OneSignalSDK/OneSignal_Extension/OneSignalExtension.xcframework/ios-arm64_x86_64-simulator/OneSignalExtension.framework/Headers/OneSignalExtension.h +++ b/iOS_SDK/OneSignalSDK/OneSignal_Extension/OneSignalExtension.xcframework/ios-arm64_x86_64-simulator/OneSignalExtension.framework/Headers/OneSignalExtension.h @@ -27,10 +27,10 @@ #import #import -#import "OneSignalAttachmentHandler.h" -#import "OneSignalExtensionBadgeHandler.h" -#import "OneSignalReceiveReceiptsController.h" -#import "OneSignalNotificationServiceExtensionHandler.h" +#import +#import +#import +#import @interface OneSignalExtension : NSObject #pragma mark NotificationService Extension diff --git a/iOS_SDK/OneSignalSDK/OneSignal_Extension/OneSignalExtension.xcframework/ios-arm64_x86_64-simulator/OneSignalExtension.framework/Info.plist b/iOS_SDK/OneSignalSDK/OneSignal_Extension/OneSignalExtension.xcframework/ios-arm64_x86_64-simulator/OneSignalExtension.framework/Info.plist index ad0db786a..ac0187e3a 100644 Binary files a/iOS_SDK/OneSignalSDK/OneSignal_Extension/OneSignalExtension.xcframework/ios-arm64_x86_64-simulator/OneSignalExtension.framework/Info.plist and b/iOS_SDK/OneSignalSDK/OneSignal_Extension/OneSignalExtension.xcframework/ios-arm64_x86_64-simulator/OneSignalExtension.framework/Info.plist differ diff --git a/iOS_SDK/OneSignalSDK/OneSignal_Extension/OneSignalExtension.xcframework/ios-arm64_x86_64-simulator/OneSignalExtension.framework/OneSignalExtension b/iOS_SDK/OneSignalSDK/OneSignal_Extension/OneSignalExtension.xcframework/ios-arm64_x86_64-simulator/OneSignalExtension.framework/OneSignalExtension index 3fcd6ac8b..f6e96eca6 100755 Binary files a/iOS_SDK/OneSignalSDK/OneSignal_Extension/OneSignalExtension.xcframework/ios-arm64_x86_64-simulator/OneSignalExtension.framework/OneSignalExtension and b/iOS_SDK/OneSignalSDK/OneSignal_Extension/OneSignalExtension.xcframework/ios-arm64_x86_64-simulator/OneSignalExtension.framework/OneSignalExtension differ diff --git a/iOS_SDK/OneSignalSDK/OneSignal_Extension/OneSignalExtension.xcframework/ios-arm64_x86_64-simulator/OneSignalExtension.framework/_CodeSignature/CodeResources b/iOS_SDK/OneSignalSDK/OneSignal_Extension/OneSignalExtension.xcframework/ios-arm64_x86_64-simulator/OneSignalExtension.framework/_CodeSignature/CodeResources index 1b8c80714..b12c9a5aa 100644 --- a/iOS_SDK/OneSignalSDK/OneSignal_Extension/OneSignalExtension.xcframework/ios-arm64_x86_64-simulator/OneSignalExtension.framework/_CodeSignature/CodeResources +++ b/iOS_SDK/OneSignalSDK/OneSignal_Extension/OneSignalExtension.xcframework/ios-arm64_x86_64-simulator/OneSignalExtension.framework/_CodeSignature/CodeResources @@ -10,7 +10,7 @@ Headers/OneSignalExtension.h - edpFiRa+RCtTJobW5Rf0OSLMC44= + xD9hBHTGgdB/REvVahfaCi1i15U= Headers/OneSignalExtensionBadgeHandler.h @@ -26,7 +26,7 @@ Info.plist - 79ZZ/ZwVO8WVr0V8S6bCYP9IGa0= + 1JbUxLseNYdMOBdJAM0hc+wJgZk= Modules/module.modulemap @@ -46,7 +46,7 @@ hash2 - n4H86fUHxM2+HPT5GfHt7NhJQpn0HM/r4TA/xwRONF4= + d70Tj0PSUiGB4l6QdbVsmZRuKHKFYscrQlOWTgXAC7Q= Headers/OneSignalExtensionBadgeHandler.h diff --git a/iOS_SDK/OneSignalSDK/OneSignal_InAppMessages/OneSignalInAppMessages.xcframework.zip b/iOS_SDK/OneSignalSDK/OneSignal_InAppMessages/OneSignalInAppMessages.xcframework.zip new file mode 100644 index 000000000..a38bb8f02 Binary files /dev/null and b/iOS_SDK/OneSignalSDK/OneSignal_InAppMessages/OneSignalInAppMessages.xcframework.zip differ diff --git a/iOS_SDK/OneSignalSDK/OneSignal_InAppMessages/OneSignalInAppMessages.xcframework/Info.plist b/iOS_SDK/OneSignalSDK/OneSignal_InAppMessages/OneSignalInAppMessages.xcframework/Info.plist new file mode 100644 index 000000000..a379b3475 --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignal_InAppMessages/OneSignalInAppMessages.xcframework/Info.plist @@ -0,0 +1,55 @@ + + + + + AvailableLibraries + + + LibraryIdentifier + ios-arm64_x86_64-maccatalyst + LibraryPath + OneSignalInAppMessages.framework + SupportedArchitectures + + arm64 + x86_64 + + SupportedPlatform + ios + SupportedPlatformVariant + maccatalyst + + + LibraryIdentifier + ios-arm64_x86_64-simulator + LibraryPath + OneSignalInAppMessages.framework + SupportedArchitectures + + arm64 + x86_64 + + SupportedPlatform + ios + SupportedPlatformVariant + simulator + + + LibraryIdentifier + ios-arm64 + LibraryPath + OneSignalInAppMessages.framework + SupportedArchitectures + + arm64 + + SupportedPlatform + ios + + + CFBundlePackageType + XFWK + XCFrameworkFormatVersion + 1.0 + + diff --git a/iOS_SDK/OneSignalSDK/OneSignal_InAppMessages/OneSignalInAppMessages.xcframework/ios-arm64/OneSignalInAppMessages.framework/Headers/OneSignalInAppMessages.h b/iOS_SDK/OneSignalSDK/OneSignal_InAppMessages/OneSignalInAppMessages.xcframework/ios-arm64/OneSignalInAppMessages.framework/Headers/OneSignalInAppMessages.h new file mode 100644 index 000000000..11d0faa67 --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignal_InAppMessages/OneSignalInAppMessages.xcframework/ios-arm64/OneSignalInAppMessages.framework/Headers/OneSignalInAppMessages.h @@ -0,0 +1,38 @@ +/* + Modified MIT License + + Copyright 2022 OneSignal + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + 1. The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + 2. All copies of substantial portions of the Software may only be used in connection + with services provided by OneSignal. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + */ + +#import +#import + +@interface OneSignalInAppMessages : NSObject + ++ (Class_Nonnull)InAppMessages; ++ (void)start; ++ (void)getInAppMessagesFromServer:(NSString * _Nullable)subscriptionId; ++ (void)onApplicationDidBecomeActive; ++ (void)migrate; +@end diff --git a/iOS_SDK/OneSignalSDK/OneSignal_InAppMessages/OneSignalInAppMessages.xcframework/ios-arm64/OneSignalInAppMessages.framework/Info.plist b/iOS_SDK/OneSignalSDK/OneSignal_InAppMessages/OneSignalInAppMessages.xcframework/ios-arm64/OneSignalInAppMessages.framework/Info.plist new file mode 100644 index 000000000..895799252 Binary files /dev/null and b/iOS_SDK/OneSignalSDK/OneSignal_InAppMessages/OneSignalInAppMessages.xcframework/ios-arm64/OneSignalInAppMessages.framework/Info.plist differ diff --git a/iOS_SDK/OneSignalSDK/OneSignal_InAppMessages/OneSignalInAppMessages.xcframework/ios-arm64/OneSignalInAppMessages.framework/Modules/module.modulemap b/iOS_SDK/OneSignalSDK/OneSignal_InAppMessages/OneSignalInAppMessages.xcframework/ios-arm64/OneSignalInAppMessages.framework/Modules/module.modulemap new file mode 100644 index 000000000..252394aa0 --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignal_InAppMessages/OneSignalInAppMessages.xcframework/ios-arm64/OneSignalInAppMessages.framework/Modules/module.modulemap @@ -0,0 +1,6 @@ +framework module OneSignalInAppMessages { + umbrella header "OneSignalInAppMessages.h" + + export * + module * { export * } +} diff --git a/iOS_SDK/OneSignalSDK/OneSignal_InAppMessages/OneSignalInAppMessages.xcframework/ios-arm64/OneSignalInAppMessages.framework/OneSignalInAppMessages b/iOS_SDK/OneSignalSDK/OneSignal_InAppMessages/OneSignalInAppMessages.xcframework/ios-arm64/OneSignalInAppMessages.framework/OneSignalInAppMessages new file mode 100755 index 000000000..05ee82aaa Binary files /dev/null and b/iOS_SDK/OneSignalSDK/OneSignal_InAppMessages/OneSignalInAppMessages.xcframework/ios-arm64/OneSignalInAppMessages.framework/OneSignalInAppMessages differ diff --git a/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignal.xcframework/ios-arm64_x86_64-simulator/OneSignal.framework/_CodeSignature/CodeResources b/iOS_SDK/OneSignalSDK/OneSignal_InAppMessages/OneSignalInAppMessages.xcframework/ios-arm64/OneSignalInAppMessages.framework/_CodeSignature/CodeResources similarity index 87% rename from iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignal.xcframework/ios-arm64_x86_64-simulator/OneSignal.framework/_CodeSignature/CodeResources rename to iOS_SDK/OneSignalSDK/OneSignal_InAppMessages/OneSignalInAppMessages.xcframework/ios-arm64/OneSignalInAppMessages.framework/_CodeSignature/CodeResources index bb0d02ed5..e4515d6b2 100644 --- a/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignal.xcframework/ios-arm64_x86_64-simulator/OneSignal.framework/_CodeSignature/CodeResources +++ b/iOS_SDK/OneSignalSDK/OneSignal_InAppMessages/OneSignalInAppMessages.xcframework/ios-arm64/OneSignalInAppMessages.framework/_CodeSignature/CodeResources @@ -4,33 +4,33 @@ files - Headers/OneSignal.h + Headers/OneSignalInAppMessages.h - gcVwtG6FQnnTbAP09KZgVsg7kOY= + N2AWdkkchPbUNI6mY4qhM795Dmo= Info.plist - slIXDRVGR0mHfzZtzcBFAZZ1F2k= + HYbw5s7cu/MizXY14O2tM0OfwS8= Modules/module.modulemap - fJj0ATF9ohjya70dUZjH6i9w44o= + qkRaw9T3fibs5SQ8LS38p3onBik= files2 - Headers/OneSignal.h + Headers/OneSignalInAppMessages.h hash2 - ud8ClrxlKPZ7wfDJMrDUOIVFvFnyvp3J5DIuQAXndDQ= + SvV0jJvHodO0AB0WtgVFU7m9wxXW2Wflyk4O+TRIPD4= Modules/module.modulemap hash2 - Gn6ZaR3ERppbMM1cYIPVzhn7nRrRbOZoQYYdkOd4nJw= + mCT+FiO1TyrOf3TF3CZO2jZRQdFAdkvEP4VLVLYFCbU= diff --git a/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignal.xcframework/ios-arm64_x86_64-maccatalyst/OneSignal.framework/Headers b/iOS_SDK/OneSignalSDK/OneSignal_InAppMessages/OneSignalInAppMessages.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalInAppMessages.framework/Headers similarity index 100% rename from iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignal.xcframework/ios-arm64_x86_64-maccatalyst/OneSignal.framework/Headers rename to iOS_SDK/OneSignalSDK/OneSignal_InAppMessages/OneSignalInAppMessages.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalInAppMessages.framework/Headers diff --git a/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignal.xcframework/ios-arm64_x86_64-maccatalyst/OneSignal.framework/Modules b/iOS_SDK/OneSignalSDK/OneSignal_InAppMessages/OneSignalInAppMessages.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalInAppMessages.framework/Modules similarity index 100% rename from iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignal.xcframework/ios-arm64_x86_64-maccatalyst/OneSignal.framework/Modules rename to iOS_SDK/OneSignalSDK/OneSignal_InAppMessages/OneSignalInAppMessages.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalInAppMessages.framework/Modules diff --git a/iOS_SDK/OneSignalSDK/OneSignal_InAppMessages/OneSignalInAppMessages.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalInAppMessages.framework/OneSignalInAppMessages b/iOS_SDK/OneSignalSDK/OneSignal_InAppMessages/OneSignalInAppMessages.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalInAppMessages.framework/OneSignalInAppMessages new file mode 120000 index 000000000..0b06529ad --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignal_InAppMessages/OneSignalInAppMessages.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalInAppMessages.framework/OneSignalInAppMessages @@ -0,0 +1 @@ +Versions/Current/OneSignalInAppMessages \ No newline at end of file diff --git a/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignal.xcframework/ios-arm64_x86_64-maccatalyst/OneSignal.framework/Resources b/iOS_SDK/OneSignalSDK/OneSignal_InAppMessages/OneSignalInAppMessages.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalInAppMessages.framework/Resources similarity index 100% rename from iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignal.xcframework/ios-arm64_x86_64-maccatalyst/OneSignal.framework/Resources rename to iOS_SDK/OneSignalSDK/OneSignal_InAppMessages/OneSignalInAppMessages.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalInAppMessages.framework/Resources diff --git a/iOS_SDK/OneSignalSDK/OneSignal_InAppMessages/OneSignalInAppMessages.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalInAppMessages.framework/Versions/A/Headers/OneSignalInAppMessages.h b/iOS_SDK/OneSignalSDK/OneSignal_InAppMessages/OneSignalInAppMessages.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalInAppMessages.framework/Versions/A/Headers/OneSignalInAppMessages.h new file mode 100644 index 000000000..11d0faa67 --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignal_InAppMessages/OneSignalInAppMessages.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalInAppMessages.framework/Versions/A/Headers/OneSignalInAppMessages.h @@ -0,0 +1,38 @@ +/* + Modified MIT License + + Copyright 2022 OneSignal + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + 1. The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + 2. All copies of substantial portions of the Software may only be used in connection + with services provided by OneSignal. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + */ + +#import +#import + +@interface OneSignalInAppMessages : NSObject + ++ (Class_Nonnull)InAppMessages; ++ (void)start; ++ (void)getInAppMessagesFromServer:(NSString * _Nullable)subscriptionId; ++ (void)onApplicationDidBecomeActive; ++ (void)migrate; +@end diff --git a/iOS_SDK/OneSignalSDK/OneSignal_InAppMessages/OneSignalInAppMessages.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalInAppMessages.framework/Versions/A/Modules/module.modulemap b/iOS_SDK/OneSignalSDK/OneSignal_InAppMessages/OneSignalInAppMessages.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalInAppMessages.framework/Versions/A/Modules/module.modulemap new file mode 100644 index 000000000..252394aa0 --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignal_InAppMessages/OneSignalInAppMessages.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalInAppMessages.framework/Versions/A/Modules/module.modulemap @@ -0,0 +1,6 @@ +framework module OneSignalInAppMessages { + umbrella header "OneSignalInAppMessages.h" + + export * + module * { export * } +} diff --git a/iOS_SDK/OneSignalSDK/OneSignal_InAppMessages/OneSignalInAppMessages.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalInAppMessages.framework/Versions/A/OneSignalInAppMessages b/iOS_SDK/OneSignalSDK/OneSignal_InAppMessages/OneSignalInAppMessages.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalInAppMessages.framework/Versions/A/OneSignalInAppMessages new file mode 100755 index 000000000..a684d79ee Binary files /dev/null and b/iOS_SDK/OneSignalSDK/OneSignal_InAppMessages/OneSignalInAppMessages.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalInAppMessages.framework/Versions/A/OneSignalInAppMessages differ diff --git a/iOS_SDK/OneSignalSDK/OneSignal_InAppMessages/OneSignalInAppMessages.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalInAppMessages.framework/Versions/A/Resources/Info.plist b/iOS_SDK/OneSignalSDK/OneSignal_InAppMessages/OneSignalInAppMessages.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalInAppMessages.framework/Versions/A/Resources/Info.plist new file mode 100644 index 000000000..de0638fc1 --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignal_InAppMessages/OneSignalInAppMessages.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalInAppMessages.framework/Versions/A/Resources/Info.plist @@ -0,0 +1,50 @@ + + + + + BuildMachineOSBuild + 22G91 + CFBundleDevelopmentRegion + English + CFBundleExecutable + OneSignalInAppMessages + CFBundleIdentifier + com.onesignal.OneSignalInAppMessages + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + OneSignalInAppMessages + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0 + CFBundleSupportedPlatforms + + MacOSX + + CFBundleVersion + 1 + DTCompiler + com.apple.compilers.llvm.clang.1_0 + DTPlatformBuild + 14B47b + DTPlatformName + macosx + DTPlatformVersion + 13.0 + DTSDKBuild + 22A372 + DTSDKName + macosx13.0 + DTXcode + 1410 + DTXcodeBuild + 14B47b + LSMinimumSystemVersion + 10.15 + UIDeviceFamily + + 2 + + + diff --git a/iOS_SDK/OneSignalSDK/OneSignal_InAppMessages/OneSignalInAppMessages.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalInAppMessages.framework/Versions/A/_CodeSignature/CodeResources b/iOS_SDK/OneSignalSDK/OneSignal_InAppMessages/OneSignalInAppMessages.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalInAppMessages.framework/Versions/A/_CodeSignature/CodeResources new file mode 100644 index 000000000..e2781c187 --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignal_InAppMessages/OneSignalInAppMessages.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalInAppMessages.framework/Versions/A/_CodeSignature/CodeResources @@ -0,0 +1,142 @@ + + + + + files + + Resources/Info.plist + + kZPfV6K1gISFriaBPGJNFMoyfJU= + + + files2 + + Headers/OneSignalInAppMessages.h + + hash2 + + SvV0jJvHodO0AB0WtgVFU7m9wxXW2Wflyk4O+TRIPD4= + + + Modules/module.modulemap + + hash2 + + mCT+FiO1TyrOf3TF3CZO2jZRQdFAdkvEP4VLVLYFCbU= + + + Resources/Info.plist + + hash2 + + 6F5xpGHC1BapQycqD/8gCsd3Ed3fVzHsni8hpXd6wyE= + + + + rules + + ^Resources/ + + ^Resources/.*\.lproj/ + + optional + + weight + 1000 + + ^Resources/.*\.lproj/locversion.plist$ + + omit + + weight + 1100 + + ^Resources/Base\.lproj/ + + weight + 1010 + + ^version.plist$ + + + rules2 + + .*\.dSYM($|/) + + weight + 11 + + ^(.*/)?\.DS_Store$ + + omit + + weight + 2000 + + ^(Frameworks|SharedFrameworks|PlugIns|Plug-ins|XPCServices|Helpers|MacOS|Library/(Automator|Spotlight|LoginItems))/ + + nested + + weight + 10 + + ^.* + + ^Info\.plist$ + + omit + + weight + 20 + + ^PkgInfo$ + + omit + + weight + 20 + + ^Resources/ + + weight + 20 + + ^Resources/.*\.lproj/ + + optional + + weight + 1000 + + ^Resources/.*\.lproj/locversion.plist$ + + omit + + weight + 1100 + + ^Resources/Base\.lproj/ + + weight + 1010 + + ^[^/]+$ + + nested + + weight + 10 + + ^embedded\.provisionprofile$ + + weight + 20 + + ^version\.plist$ + + weight + 20 + + + + diff --git a/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignal.xcframework/ios-arm64_x86_64-maccatalyst/OneSignal.framework/Versions/Current b/iOS_SDK/OneSignalSDK/OneSignal_InAppMessages/OneSignalInAppMessages.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalInAppMessages.framework/Versions/Current similarity index 100% rename from iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignal.xcframework/ios-arm64_x86_64-maccatalyst/OneSignal.framework/Versions/Current rename to iOS_SDK/OneSignalSDK/OneSignal_InAppMessages/OneSignalInAppMessages.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalInAppMessages.framework/Versions/Current diff --git a/iOS_SDK/OneSignalSDK/OneSignal_InAppMessages/OneSignalInAppMessages.xcframework/ios-arm64_x86_64-simulator/OneSignalInAppMessages.framework/Headers/OneSignalInAppMessages.h b/iOS_SDK/OneSignalSDK/OneSignal_InAppMessages/OneSignalInAppMessages.xcframework/ios-arm64_x86_64-simulator/OneSignalInAppMessages.framework/Headers/OneSignalInAppMessages.h new file mode 100644 index 000000000..11d0faa67 --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignal_InAppMessages/OneSignalInAppMessages.xcframework/ios-arm64_x86_64-simulator/OneSignalInAppMessages.framework/Headers/OneSignalInAppMessages.h @@ -0,0 +1,38 @@ +/* + Modified MIT License + + Copyright 2022 OneSignal + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + 1. The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + 2. All copies of substantial portions of the Software may only be used in connection + with services provided by OneSignal. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + */ + +#import +#import + +@interface OneSignalInAppMessages : NSObject + ++ (Class_Nonnull)InAppMessages; ++ (void)start; ++ (void)getInAppMessagesFromServer:(NSString * _Nullable)subscriptionId; ++ (void)onApplicationDidBecomeActive; ++ (void)migrate; +@end diff --git a/iOS_SDK/OneSignalSDK/OneSignal_InAppMessages/OneSignalInAppMessages.xcframework/ios-arm64_x86_64-simulator/OneSignalInAppMessages.framework/Info.plist b/iOS_SDK/OneSignalSDK/OneSignal_InAppMessages/OneSignalInAppMessages.xcframework/ios-arm64_x86_64-simulator/OneSignalInAppMessages.framework/Info.plist new file mode 100644 index 000000000..01011d78c Binary files /dev/null and b/iOS_SDK/OneSignalSDK/OneSignal_InAppMessages/OneSignalInAppMessages.xcframework/ios-arm64_x86_64-simulator/OneSignalInAppMessages.framework/Info.plist differ diff --git a/iOS_SDK/OneSignalSDK/OneSignal_InAppMessages/OneSignalInAppMessages.xcframework/ios-arm64_x86_64-simulator/OneSignalInAppMessages.framework/Modules/module.modulemap b/iOS_SDK/OneSignalSDK/OneSignal_InAppMessages/OneSignalInAppMessages.xcframework/ios-arm64_x86_64-simulator/OneSignalInAppMessages.framework/Modules/module.modulemap new file mode 100644 index 000000000..252394aa0 --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignal_InAppMessages/OneSignalInAppMessages.xcframework/ios-arm64_x86_64-simulator/OneSignalInAppMessages.framework/Modules/module.modulemap @@ -0,0 +1,6 @@ +framework module OneSignalInAppMessages { + umbrella header "OneSignalInAppMessages.h" + + export * + module * { export * } +} diff --git a/iOS_SDK/OneSignalSDK/OneSignal_InAppMessages/OneSignalInAppMessages.xcframework/ios-arm64_x86_64-simulator/OneSignalInAppMessages.framework/OneSignalInAppMessages b/iOS_SDK/OneSignalSDK/OneSignal_InAppMessages/OneSignalInAppMessages.xcframework/ios-arm64_x86_64-simulator/OneSignalInAppMessages.framework/OneSignalInAppMessages new file mode 100755 index 000000000..5ec44e49d Binary files /dev/null and b/iOS_SDK/OneSignalSDK/OneSignal_InAppMessages/OneSignalInAppMessages.xcframework/ios-arm64_x86_64-simulator/OneSignalInAppMessages.framework/OneSignalInAppMessages differ diff --git a/iOS_SDK/OneSignalSDK/OneSignal_InAppMessages/OneSignalInAppMessages.xcframework/ios-arm64_x86_64-simulator/OneSignalInAppMessages.framework/_CodeSignature/CodeResources b/iOS_SDK/OneSignalSDK/OneSignal_InAppMessages/OneSignalInAppMessages.xcframework/ios-arm64_x86_64-simulator/OneSignalInAppMessages.framework/_CodeSignature/CodeResources new file mode 100644 index 000000000..814e57c6b --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignal_InAppMessages/OneSignalInAppMessages.xcframework/ios-arm64_x86_64-simulator/OneSignalInAppMessages.framework/_CodeSignature/CodeResources @@ -0,0 +1,124 @@ + + + + + files + + Headers/OneSignalInAppMessages.h + + N2AWdkkchPbUNI6mY4qhM795Dmo= + + Info.plist + + +qi5oiisDNwxZvqtnsoQos4fzf0= + + Modules/module.modulemap + + qkRaw9T3fibs5SQ8LS38p3onBik= + + + files2 + + Headers/OneSignalInAppMessages.h + + hash2 + + SvV0jJvHodO0AB0WtgVFU7m9wxXW2Wflyk4O+TRIPD4= + + + Modules/module.modulemap + + hash2 + + mCT+FiO1TyrOf3TF3CZO2jZRQdFAdkvEP4VLVLYFCbU= + + + + rules + + ^.* + + ^.*\.lproj/ + + optional + + weight + 1000 + + ^.*\.lproj/locversion.plist$ + + omit + + weight + 1100 + + ^Base\.lproj/ + + weight + 1010 + + ^version.plist$ + + + rules2 + + .*\.dSYM($|/) + + weight + 11 + + ^(.*/)?\.DS_Store$ + + omit + + weight + 2000 + + ^.* + + ^.*\.lproj/ + + optional + + weight + 1000 + + ^.*\.lproj/locversion.plist$ + + omit + + weight + 1100 + + ^Base\.lproj/ + + weight + 1010 + + ^Info\.plist$ + + omit + + weight + 20 + + ^PkgInfo$ + + omit + + weight + 20 + + ^embedded\.provisionprofile$ + + weight + 20 + + ^version\.plist$ + + weight + 20 + + + + diff --git a/iOS_SDK/OneSignalSDK/OneSignal_Location/OneSignalLocation.xcframework.zip b/iOS_SDK/OneSignalSDK/OneSignal_Location/OneSignalLocation.xcframework.zip new file mode 100644 index 000000000..b4145152e Binary files /dev/null and b/iOS_SDK/OneSignalSDK/OneSignal_Location/OneSignalLocation.xcframework.zip differ diff --git a/iOS_SDK/OneSignalSDK/OneSignal_Location/OneSignalLocation.xcframework/Info.plist b/iOS_SDK/OneSignalSDK/OneSignal_Location/OneSignalLocation.xcframework/Info.plist new file mode 100644 index 000000000..50747b9af --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignal_Location/OneSignalLocation.xcframework/Info.plist @@ -0,0 +1,55 @@ + + + + + AvailableLibraries + + + LibraryIdentifier + ios-arm64_x86_64-simulator + LibraryPath + OneSignalLocation.framework + SupportedArchitectures + + arm64 + x86_64 + + SupportedPlatform + ios + SupportedPlatformVariant + simulator + + + LibraryIdentifier + ios-arm64 + LibraryPath + OneSignalLocation.framework + SupportedArchitectures + + arm64 + + SupportedPlatform + ios + + + LibraryIdentifier + ios-arm64_x86_64-maccatalyst + LibraryPath + OneSignalLocation.framework + SupportedArchitectures + + arm64 + x86_64 + + SupportedPlatform + ios + SupportedPlatformVariant + maccatalyst + + + CFBundlePackageType + XFWK + XCFrameworkFormatVersion + 1.0 + + diff --git a/iOS_SDK/OneSignalSDK/Source/OneSignalViewHelper.h b/iOS_SDK/OneSignalSDK/OneSignal_Location/OneSignalLocation.xcframework/ios-arm64/OneSignalLocation.framework/Headers/OneSignalLocationManager.h similarity index 59% rename from iOS_SDK/OneSignalSDK/Source/OneSignalViewHelper.h rename to iOS_SDK/OneSignalSDK/OneSignal_Location/OneSignalLocation.xcframework/ios-arm64/OneSignalLocation.framework/Headers/OneSignalLocationManager.h index 90acb3e4f..20fdd69b9 100644 --- a/iOS_SDK/OneSignalSDK/Source/OneSignalViewHelper.h +++ b/iOS_SDK/OneSignalSDK/OneSignal_Location/OneSignalLocation.xcframework/ios-arm64/OneSignalLocation.framework/Headers/OneSignalLocationManager.h @@ -26,24 +26,32 @@ */ #import - -@interface OneSignalViewHelper : NSObject - -/* - A simplified enum for UIDeviceOrientation with just invalid, portrait, and landscape - */ -typedef NS_ENUM(NSInteger, ViewOrientation) { - OrientationInvalid, - OrientationPortrait, - OrientationLandscape, -}; - -+ (ViewOrientation)validateOrientation:(UIDeviceOrientation)orientation; - -+ (CGFloat)sizeToScale:(float)size; - -+ (CGRect)getScreenBounds; - -+ (float)getScreenScale; - +#import +#import +#import + +#ifndef OneSignalLocation_h +#define OneSignalLocation_h + +typedef struct os_location_coordinate { + double latitude; + double longitude; +} os_location_coordinate; + +typedef struct os_last_location { + os_location_coordinate cords; + double verticalAccuracy; + double horizontalAccuracy; +} os_last_location; +//rename to OneSignalLocationManager +@interface OneSignalLocationManager : NSObject ++ (Class)Location; ++ (OneSignalLocationManager*) sharedInstance; ++ (void)start; ++ (void)clearLastLocation; ++ (void)onFocus:(BOOL)isActive; ++ (void)startLocationSharedWithFlag:(BOOL)enable; ++ (void)promptLocationFallbackToSettings:(BOOL)fallback completionHandler:(void (^)(PromptActionResult result))completionHandler; @end + +#endif /* OneSignalLocation_h */ diff --git a/iOS_SDK/OneSignalSDK/OneSignal_Location/OneSignalLocation.xcframework/ios-arm64/OneSignalLocation.framework/Info.plist b/iOS_SDK/OneSignalSDK/OneSignal_Location/OneSignalLocation.xcframework/ios-arm64/OneSignalLocation.framework/Info.plist new file mode 100644 index 000000000..fdb935d6d Binary files /dev/null and b/iOS_SDK/OneSignalSDK/OneSignal_Location/OneSignalLocation.xcframework/ios-arm64/OneSignalLocation.framework/Info.plist differ diff --git a/iOS_SDK/OneSignalSDK/OneSignal_Location/OneSignalLocation.xcframework/ios-arm64/OneSignalLocation.framework/OneSignalLocation b/iOS_SDK/OneSignalSDK/OneSignal_Location/OneSignalLocation.xcframework/ios-arm64/OneSignalLocation.framework/OneSignalLocation new file mode 100755 index 000000000..3cf05bfb0 Binary files /dev/null and b/iOS_SDK/OneSignalSDK/OneSignal_Location/OneSignalLocation.xcframework/ios-arm64/OneSignalLocation.framework/OneSignalLocation differ diff --git a/iOS_SDK/OneSignalSDK/OneSignal_Location/OneSignalLocation.xcframework/ios-arm64/OneSignalLocation.framework/_CodeSignature/CodeResources b/iOS_SDK/OneSignalSDK/OneSignal_Location/OneSignalLocation.xcframework/ios-arm64/OneSignalLocation.framework/_CodeSignature/CodeResources new file mode 100644 index 000000000..887359e95 --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignal_Location/OneSignalLocation.xcframework/ios-arm64/OneSignalLocation.framework/_CodeSignature/CodeResources @@ -0,0 +1,113 @@ + + + + + files + + Headers/OneSignalLocationManager.h + + QIBxAhhw5j3057WcrXl1k+lGVgM= + + Info.plist + + 5eEwLiwvqa+owqaswADC4N+YlZM= + + + files2 + + Headers/OneSignalLocationManager.h + + hash2 + + J/S8/RBNaKqBGgKUEFY2fmf4YLIeEmnNiqyUiX40/N8= + + + + rules + + ^.* + + ^.*\.lproj/ + + optional + + weight + 1000 + + ^.*\.lproj/locversion.plist$ + + omit + + weight + 1100 + + ^Base\.lproj/ + + weight + 1010 + + ^version.plist$ + + + rules2 + + .*\.dSYM($|/) + + weight + 11 + + ^(.*/)?\.DS_Store$ + + omit + + weight + 2000 + + ^.* + + ^.*\.lproj/ + + optional + + weight + 1000 + + ^.*\.lproj/locversion.plist$ + + omit + + weight + 1100 + + ^Base\.lproj/ + + weight + 1010 + + ^Info\.plist$ + + omit + + weight + 20 + + ^PkgInfo$ + + omit + + weight + 20 + + ^embedded\.provisionprofile$ + + weight + 20 + + ^version\.plist$ + + weight + 20 + + + + diff --git a/iOS_SDK/OneSignalSDK/OneSignal_Location/OneSignalLocation.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalLocation.framework/Headers b/iOS_SDK/OneSignalSDK/OneSignal_Location/OneSignalLocation.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalLocation.framework/Headers new file mode 120000 index 000000000..a177d2a6b --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignal_Location/OneSignalLocation.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalLocation.framework/Headers @@ -0,0 +1 @@ +Versions/Current/Headers \ No newline at end of file diff --git a/iOS_SDK/OneSignalSDK/OneSignal_Location/OneSignalLocation.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalLocation.framework/OneSignalLocation b/iOS_SDK/OneSignalSDK/OneSignal_Location/OneSignalLocation.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalLocation.framework/OneSignalLocation new file mode 120000 index 000000000..a20cb8e8b --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignal_Location/OneSignalLocation.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalLocation.framework/OneSignalLocation @@ -0,0 +1 @@ +Versions/Current/OneSignalLocation \ No newline at end of file diff --git a/iOS_SDK/OneSignalSDK/OneSignal_Location/OneSignalLocation.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalLocation.framework/Resources b/iOS_SDK/OneSignalSDK/OneSignal_Location/OneSignalLocation.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalLocation.framework/Resources new file mode 120000 index 000000000..953ee36f3 --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignal_Location/OneSignalLocation.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalLocation.framework/Resources @@ -0,0 +1 @@ +Versions/Current/Resources \ No newline at end of file diff --git a/iOS_SDK/OneSignalSDK/OneSignal_Location/OneSignalLocation.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalLocation.framework/Versions/A/Headers/OneSignalLocationManager.h b/iOS_SDK/OneSignalSDK/OneSignal_Location/OneSignalLocation.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalLocation.framework/Versions/A/Headers/OneSignalLocationManager.h new file mode 100644 index 000000000..20fdd69b9 --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignal_Location/OneSignalLocation.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalLocation.framework/Versions/A/Headers/OneSignalLocationManager.h @@ -0,0 +1,57 @@ +/** + * Modified MIT License + * + * Copyright 2016 OneSignal + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * 1. The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * 2. All copies of substantial portions of the Software may only be used in connection + * with services provided by OneSignal. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#import +#import +#import +#import + +#ifndef OneSignalLocation_h +#define OneSignalLocation_h + +typedef struct os_location_coordinate { + double latitude; + double longitude; +} os_location_coordinate; + +typedef struct os_last_location { + os_location_coordinate cords; + double verticalAccuracy; + double horizontalAccuracy; +} os_last_location; +//rename to OneSignalLocationManager +@interface OneSignalLocationManager : NSObject ++ (Class)Location; ++ (OneSignalLocationManager*) sharedInstance; ++ (void)start; ++ (void)clearLastLocation; ++ (void)onFocus:(BOOL)isActive; ++ (void)startLocationSharedWithFlag:(BOOL)enable; ++ (void)promptLocationFallbackToSettings:(BOOL)fallback completionHandler:(void (^)(PromptActionResult result))completionHandler; +@end + +#endif /* OneSignalLocation_h */ diff --git a/iOS_SDK/OneSignalSDK/OneSignal_Location/OneSignalLocation.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalLocation.framework/Versions/A/OneSignalLocation b/iOS_SDK/OneSignalSDK/OneSignal_Location/OneSignalLocation.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalLocation.framework/Versions/A/OneSignalLocation new file mode 100755 index 000000000..88622a2a9 Binary files /dev/null and b/iOS_SDK/OneSignalSDK/OneSignal_Location/OneSignalLocation.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalLocation.framework/Versions/A/OneSignalLocation differ diff --git a/iOS_SDK/OneSignalSDK/OneSignal_Location/OneSignalLocation.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalLocation.framework/Versions/A/Resources/Info.plist b/iOS_SDK/OneSignalSDK/OneSignal_Location/OneSignalLocation.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalLocation.framework/Versions/A/Resources/Info.plist new file mode 100644 index 000000000..468921cef --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignal_Location/OneSignalLocation.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalLocation.framework/Versions/A/Resources/Info.plist @@ -0,0 +1,50 @@ + + + + + BuildMachineOSBuild + 22G91 + CFBundleDevelopmentRegion + English + CFBundleExecutable + OneSignalLocation + CFBundleIdentifier + com.onesignal.OneSignalLocation + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + OneSignalLocation + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0 + CFBundleSupportedPlatforms + + MacOSX + + CFBundleVersion + 1 + DTCompiler + com.apple.compilers.llvm.clang.1_0 + DTPlatformBuild + 14B47b + DTPlatformName + macosx + DTPlatformVersion + 13.0 + DTSDKBuild + 22A372 + DTSDKName + macosx13.0 + DTXcode + 1410 + DTXcodeBuild + 14B47b + LSMinimumSystemVersion + 10.15 + UIDeviceFamily + + 2 + + + diff --git a/iOS_SDK/OneSignalSDK/OneSignal_Location/OneSignalLocation.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalLocation.framework/Versions/A/_CodeSignature/CodeResources b/iOS_SDK/OneSignalSDK/OneSignal_Location/OneSignalLocation.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalLocation.framework/Versions/A/_CodeSignature/CodeResources new file mode 100644 index 000000000..213657247 --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignal_Location/OneSignalLocation.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalLocation.framework/Versions/A/_CodeSignature/CodeResources @@ -0,0 +1,135 @@ + + + + + files + + Resources/Info.plist + + HVYUfK6Xn+Wgnz3p/tTfoef/Sfg= + + + files2 + + Headers/OneSignalLocationManager.h + + hash2 + + J/S8/RBNaKqBGgKUEFY2fmf4YLIeEmnNiqyUiX40/N8= + + + Resources/Info.plist + + hash2 + + 9txYHE10HWWr9WVPaWg2pUlFMusBvZuskjRAOX+JRZA= + + + + rules + + ^Resources/ + + ^Resources/.*\.lproj/ + + optional + + weight + 1000 + + ^Resources/.*\.lproj/locversion.plist$ + + omit + + weight + 1100 + + ^Resources/Base\.lproj/ + + weight + 1010 + + ^version.plist$ + + + rules2 + + .*\.dSYM($|/) + + weight + 11 + + ^(.*/)?\.DS_Store$ + + omit + + weight + 2000 + + ^(Frameworks|SharedFrameworks|PlugIns|Plug-ins|XPCServices|Helpers|MacOS|Library/(Automator|Spotlight|LoginItems))/ + + nested + + weight + 10 + + ^.* + + ^Info\.plist$ + + omit + + weight + 20 + + ^PkgInfo$ + + omit + + weight + 20 + + ^Resources/ + + weight + 20 + + ^Resources/.*\.lproj/ + + optional + + weight + 1000 + + ^Resources/.*\.lproj/locversion.plist$ + + omit + + weight + 1100 + + ^Resources/Base\.lproj/ + + weight + 1010 + + ^[^/]+$ + + nested + + weight + 10 + + ^embedded\.provisionprofile$ + + weight + 20 + + ^version\.plist$ + + weight + 20 + + + + diff --git a/iOS_SDK/OneSignalSDK/OneSignal_Location/OneSignalLocation.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalLocation.framework/Versions/Current b/iOS_SDK/OneSignalSDK/OneSignal_Location/OneSignalLocation.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalLocation.framework/Versions/Current new file mode 120000 index 000000000..8c7e5a667 --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignal_Location/OneSignalLocation.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalLocation.framework/Versions/Current @@ -0,0 +1 @@ +A \ No newline at end of file diff --git a/iOS_SDK/OneSignalSDK/OneSignal_Location/OneSignalLocation.xcframework/ios-arm64_x86_64-simulator/OneSignalLocation.framework/Headers/OneSignalLocationManager.h b/iOS_SDK/OneSignalSDK/OneSignal_Location/OneSignalLocation.xcframework/ios-arm64_x86_64-simulator/OneSignalLocation.framework/Headers/OneSignalLocationManager.h new file mode 100644 index 000000000..20fdd69b9 --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignal_Location/OneSignalLocation.xcframework/ios-arm64_x86_64-simulator/OneSignalLocation.framework/Headers/OneSignalLocationManager.h @@ -0,0 +1,57 @@ +/** + * Modified MIT License + * + * Copyright 2016 OneSignal + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * 1. The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * 2. All copies of substantial portions of the Software may only be used in connection + * with services provided by OneSignal. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#import +#import +#import +#import + +#ifndef OneSignalLocation_h +#define OneSignalLocation_h + +typedef struct os_location_coordinate { + double latitude; + double longitude; +} os_location_coordinate; + +typedef struct os_last_location { + os_location_coordinate cords; + double verticalAccuracy; + double horizontalAccuracy; +} os_last_location; +//rename to OneSignalLocationManager +@interface OneSignalLocationManager : NSObject ++ (Class)Location; ++ (OneSignalLocationManager*) sharedInstance; ++ (void)start; ++ (void)clearLastLocation; ++ (void)onFocus:(BOOL)isActive; ++ (void)startLocationSharedWithFlag:(BOOL)enable; ++ (void)promptLocationFallbackToSettings:(BOOL)fallback completionHandler:(void (^)(PromptActionResult result))completionHandler; +@end + +#endif /* OneSignalLocation_h */ diff --git a/iOS_SDK/OneSignalSDK/OneSignal_Location/OneSignalLocation.xcframework/ios-arm64_x86_64-simulator/OneSignalLocation.framework/Info.plist b/iOS_SDK/OneSignalSDK/OneSignal_Location/OneSignalLocation.xcframework/ios-arm64_x86_64-simulator/OneSignalLocation.framework/Info.plist new file mode 100644 index 000000000..4edbd47e4 Binary files /dev/null and b/iOS_SDK/OneSignalSDK/OneSignal_Location/OneSignalLocation.xcframework/ios-arm64_x86_64-simulator/OneSignalLocation.framework/Info.plist differ diff --git a/iOS_SDK/OneSignalSDK/OneSignal_Location/OneSignalLocation.xcframework/ios-arm64_x86_64-simulator/OneSignalLocation.framework/OneSignalLocation b/iOS_SDK/OneSignalSDK/OneSignal_Location/OneSignalLocation.xcframework/ios-arm64_x86_64-simulator/OneSignalLocation.framework/OneSignalLocation new file mode 100755 index 000000000..8d36e99bc Binary files /dev/null and b/iOS_SDK/OneSignalSDK/OneSignal_Location/OneSignalLocation.xcframework/ios-arm64_x86_64-simulator/OneSignalLocation.framework/OneSignalLocation differ diff --git a/iOS_SDK/OneSignalSDK/OneSignal_Location/OneSignalLocation.xcframework/ios-arm64_x86_64-simulator/OneSignalLocation.framework/_CodeSignature/CodeResources b/iOS_SDK/OneSignalSDK/OneSignal_Location/OneSignalLocation.xcframework/ios-arm64_x86_64-simulator/OneSignalLocation.framework/_CodeSignature/CodeResources new file mode 100644 index 000000000..86b9e3892 --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignal_Location/OneSignalLocation.xcframework/ios-arm64_x86_64-simulator/OneSignalLocation.framework/_CodeSignature/CodeResources @@ -0,0 +1,113 @@ + + + + + files + + Headers/OneSignalLocationManager.h + + QIBxAhhw5j3057WcrXl1k+lGVgM= + + Info.plist + + JFh2clru/zBA2OOJWfNTWl9odRM= + + + files2 + + Headers/OneSignalLocationManager.h + + hash2 + + J/S8/RBNaKqBGgKUEFY2fmf4YLIeEmnNiqyUiX40/N8= + + + + rules + + ^.* + + ^.*\.lproj/ + + optional + + weight + 1000 + + ^.*\.lproj/locversion.plist$ + + omit + + weight + 1100 + + ^Base\.lproj/ + + weight + 1010 + + ^version.plist$ + + + rules2 + + .*\.dSYM($|/) + + weight + 11 + + ^(.*/)?\.DS_Store$ + + omit + + weight + 2000 + + ^.* + + ^.*\.lproj/ + + optional + + weight + 1000 + + ^.*\.lproj/locversion.plist$ + + omit + + weight + 1100 + + ^Base\.lproj/ + + weight + 1010 + + ^Info\.plist$ + + omit + + weight + 20 + + ^PkgInfo$ + + omit + + weight + 20 + + ^embedded\.provisionprofile$ + + weight + 20 + + ^version\.plist$ + + weight + 20 + + + + diff --git a/iOS_SDK/OneSignalSDK/OneSignal_Notifications/OneSignalNotifications.xcframework.zip b/iOS_SDK/OneSignalSDK/OneSignal_Notifications/OneSignalNotifications.xcframework.zip new file mode 100644 index 000000000..0bfdfda41 Binary files /dev/null and b/iOS_SDK/OneSignalSDK/OneSignal_Notifications/OneSignalNotifications.xcframework.zip differ diff --git a/iOS_SDK/OneSignalSDK/OneSignal_Notifications/OneSignalNotifications.xcframework/Info.plist b/iOS_SDK/OneSignalSDK/OneSignal_Notifications/OneSignalNotifications.xcframework/Info.plist new file mode 100644 index 000000000..3aade2209 --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignal_Notifications/OneSignalNotifications.xcframework/Info.plist @@ -0,0 +1,55 @@ + + + + + AvailableLibraries + + + LibraryIdentifier + ios-arm64_x86_64-simulator + LibraryPath + OneSignalNotifications.framework + SupportedArchitectures + + arm64 + x86_64 + + SupportedPlatform + ios + SupportedPlatformVariant + simulator + + + LibraryIdentifier + ios-arm64 + LibraryPath + OneSignalNotifications.framework + SupportedArchitectures + + arm64 + + SupportedPlatform + ios + + + LibraryIdentifier + ios-arm64_x86_64-maccatalyst + LibraryPath + OneSignalNotifications.framework + SupportedArchitectures + + arm64 + x86_64 + + SupportedPlatform + ios + SupportedPlatformVariant + maccatalyst + + + CFBundlePackageType + XFWK + XCFrameworkFormatVersion + 1.0 + + diff --git a/iOS_SDK/OneSignalSDK/Source/LanguageContext.h b/iOS_SDK/OneSignalSDK/OneSignal_Notifications/OneSignalNotifications.xcframework/ios-arm64/OneSignalNotifications.framework/Headers/OSNotification+OneSignal.h similarity index 83% rename from iOS_SDK/OneSignalSDK/Source/LanguageContext.h rename to iOS_SDK/OneSignalSDK/OneSignal_Notifications/OneSignalNotifications.xcframework/ios-arm64/OneSignalNotifications.framework/Headers/OSNotification+OneSignal.h index 8200d0a2b..09197167e 100644 --- a/iOS_SDK/OneSignalSDK/Source/LanguageContext.h +++ b/iOS_SDK/OneSignalSDK/OneSignal_Notifications/OneSignalNotifications.xcframework/ios-arm64/OneSignalNotifications.framework/Headers/OSNotification+OneSignal.h @@ -1,7 +1,7 @@ /** * Modified MIT License * - * Copyright 2021 OneSignal + * Copyright 2021OneSignal * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -25,17 +25,13 @@ * THE SOFTWARE. */ -#import -#import "LanguageProvider.h" - -NS_ASSUME_NONNULL_BEGIN - -@interface LanguageContext : NSObject - -- (void)setStrategy:(NSObject*)strategy; -@property (nonatomic, nonnull)NSString* language; +#import +#import +/** + Public interface used in the OSNotificationLifecycleListener's onWillDisplay event. + */ +@interface OSDisplayableNotification : OSNotification +- (void)display; @end - -NS_ASSUME_NONNULL_END diff --git a/iOS_SDK/OneSignalSDK/OneSignal_Notifications/OneSignalNotifications.xcframework/ios-arm64/OneSignalNotifications.framework/Headers/OSNotificationsManager.h b/iOS_SDK/OneSignalSDK/OneSignal_Notifications/OneSignalNotifications.xcframework/ios-arm64/OneSignalNotifications.framework/Headers/OSNotificationsManager.h new file mode 100644 index 000000000..cd973d8d6 --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignal_Notifications/OneSignalNotifications.xcframework/ios-arm64/OneSignalNotifications.framework/Headers/OSNotificationsManager.h @@ -0,0 +1,125 @@ +/* + Modified MIT License + + Copyright 2022 OneSignal + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + 1. The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + 2. All copies of substantial portions of the Software may only be used in connection + with services provided by OneSignal. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + */ + +#import +#import +#import +#import +#import +#import + +@protocol OSNotificationClickListener +- (void)onClickNotification:(OSNotificationClickEvent *_Nonnull)event +NS_SWIFT_NAME(onClick(event:)); +@end + +@interface OSNotificationWillDisplayEvent : NSObject + +@property (readonly, strong, nonatomic, nonnull) OSDisplayableNotification *notification; // TODO: strong? nonatomic? nullable? +- (void)preventDefault; + +@end + +@protocol OSNotificationLifecycleListener +- (void)onWillDisplayNotification:(OSNotificationWillDisplayEvent *_Nonnull)event NS_SWIFT_NAME(onWillDisplay(event:)); +@end + +/** + Public API for the Notifications namespace. + */ +@protocol OSNotifications ++ (BOOL)permission NS_REFINED_FOR_SWIFT; ++ (BOOL)canRequestPermission NS_REFINED_FOR_SWIFT; ++ (OSNotificationPermission)permissionNative NS_REFINED_FOR_SWIFT; ++ (void)addForegroundLifecycleListener:(NSObject *_Nullable)listener; ++ (void)removeForegroundLifecycleListener:(NSObject *_Nullable)listener; ++ (void)addClickListener:(NSObject*_Nonnull)listener NS_REFINED_FOR_SWIFT; ++ (void)removeClickListener:(NSObject*_Nonnull)listener NS_REFINED_FOR_SWIFT; ++ (void)requestPermission:(OSUserResponseBlock _Nullable )block; ++ (void)requestPermission:(OSUserResponseBlock _Nullable )block fallbackToSettings:(BOOL)fallback; ++ (void)registerForProvisionalAuthorization:(OSUserResponseBlock _Nullable )block NS_REFINED_FOR_SWIFT; ++ (void)addPermissionObserver:(NSObject*_Nonnull)observer NS_REFINED_FOR_SWIFT; ++ (void)removePermissionObserver:(NSObject*_Nonnull)observer NS_REFINED_FOR_SWIFT; ++ (void)clearAll; +@end + + +@protocol OneSignalNotificationsDelegate +// set delegate before user +// can check responds to selector +- (void)setNotificationTypes:(int)notificationTypes; +- (void)setPushToken:(NSString * _Nonnull)pushToken; + +@end + + +@interface OSNotificationsManager : NSObject + +@property (class, weak, nonatomic, nullable) id delegate; + ++ (Class _Nonnull)Notifications; ++ (void)start; ++ (void)setColdStartFromTapOnNotification:(BOOL)coldStartFromTapOnNotification; ++ (BOOL)getColdStartFromTapOnNotification; + +@property (class, readonly) OSPermissionStateInternal* _Nonnull currentPermissionState; +@property (class) OSPermissionStateInternal* _Nonnull lastPermissionState; + ++ (void)clearStatics; // Used by Unit Tests + +// Indicates if the app provides its own custom Notification customization settings UI +// To enable this, set kOSSettingsKeyProvidesAppNotificationSettings to true in init. ++ (BOOL)providesAppNotificationSettings; +/* Used to determine if the app is able to present it's own customized Notification Settings view (iOS 12+) */ ++ (void)setProvidesNotificationSettingsView:(BOOL)providesView; + ++ (BOOL)registerForAPNsToken; ++ (void)sendPushTokenToDelegate; + ++ (int)getNotificationTypes:(BOOL)pushDisabled; ++ (void)updateNotificationTypes:(int)notificationTypes; ++ (void)sendNotificationTypesUpdateToDelegate; + +// Used to manage observers added by the app developer. +@property (class, readonly) ObservablePermissionStateChangesType* _Nullable permissionStateChangesObserver; + +@property (class, readonly) OneSignalNotificationSettings* _Nonnull osNotificationSettings; + +// This is set by the user module ++ (void)setPushSubscriptionId:(NSString *_Nullable)pushSubscriptionId; + ++ (void)handleWillShowInForegroundForNotification:(OSNotification *_Nonnull)notification completion:(OSNotificationDisplayResponse _Nonnull)completion; ++ (void)handleNotificationActionWithUrl:(NSString* _Nullable)url actionID:(NSString* _Nonnull)actionID; ++ (BOOL)clearBadgeCount:(BOOL)fromNotifOpened; + ++ (BOOL)receiveRemoteNotification:(UIApplication* _Nonnull)application UserInfo:(NSDictionary* _Nonnull)userInfo completionHandler:(void (^_Nonnull)(UIBackgroundFetchResult))completionHandler; ++ (void)notificationReceived:(NSDictionary* _Nonnull)messageDict wasOpened:(BOOL)opened; ++ (void)handleWillPresentNotificationInForegroundWithPayload:(NSDictionary * _Nonnull)payload withCompletion:(OSNotificationDisplayResponse _Nonnull)completion; ++ (void)didRegisterForRemoteNotifications:(UIApplication *_Nonnull)app deviceToken:(NSData *_Nonnull)inDeviceToken; ++ (void)handleDidFailRegisterForRemoteNotification:(NSError*_Nonnull)err; ++ (void)checkProvisionalAuthorizationStatus; +@end diff --git a/iOS_SDK/OneSignalSDK/OneSignal_Notifications/OneSignalNotifications.xcframework/ios-arm64/OneSignalNotifications.framework/Headers/OSPermission.h b/iOS_SDK/OneSignalSDK/OneSignal_Notifications/OneSignalNotifications.xcframework/ios-arm64/OneSignalNotifications.framework/Headers/OSPermission.h new file mode 100644 index 000000000..5fd75c02b --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignal_Notifications/OneSignalNotifications.xcframework/ios-arm64/OneSignalNotifications.framework/Headers/OSPermission.h @@ -0,0 +1,102 @@ +/** + * Modified MIT License + * + * Copyright 2017 OneSignal + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * 1. The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * 2. All copies of substantial portions of the Software may only be used in connection + * with services provided by OneSignal. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#import + +#import + +typedef NS_ENUM(NSInteger, OSNotificationPermission) { + // The user has not yet made a choice regarding whether your app can show notifications. + OSNotificationPermissionNotDetermined = 0, + + // The application is not authorized to post user notifications. + OSNotificationPermissionDenied, + + // The application is authorized to post user notifications. + OSNotificationPermissionAuthorized, + + // the application is only authorized to post Provisional notifications (direct to history) + OSNotificationPermissionProvisional, + + // the application is authorized to send notifications for 8 hours. Only used by App Clips. + OSNotificationPermissionEphemeral +}; + +// Permission Classes + +// TODO: this object can be REMOVED now that permission is a boolean +@interface OSPermissionState : NSObject +@property (readonly, nonatomic) BOOL permission; +- (NSDictionary * _Nonnull)jsonRepresentation; +- (instancetype _Nonnull )initWithPermission:(BOOL)permission; +@end + +@protocol OSPermissionStateObserver +- (void)onChanged:(OSPermissionState * _Nonnull)state; +@end + +typedef OSObservable*, OSPermissionState*> ObservablePermissionStateType; + + +// Redefine OSPermissionState +@interface OSPermissionStateInternal : NSObject { +@protected BOOL _hasPrompted; +@protected BOOL _answeredPrompt; +} +@property (readwrite, nonatomic) BOOL hasPrompted; +@property (readwrite, nonatomic) BOOL providesAppNotificationSettings; +@property (readwrite, nonatomic) BOOL answeredPrompt; +@property (readwrite, nonatomic) BOOL accepted; +@property (readwrite, nonatomic) BOOL provisional; //internal flag +@property (readwrite, nonatomic) BOOL ephemeral; +@property (readwrite, nonatomic) BOOL reachable; +@property (readonly, nonatomic) OSNotificationPermission status; +@property int notificationTypes; + +@property (nonatomic) ObservablePermissionStateType * _Nonnull observable; + +- (void) persistAsFrom; + +- (instancetype _Nonnull )initAsTo; +- (instancetype _Nonnull )initAsFrom; + +- (OSPermissionState * _Nonnull)getExternalState; +- (NSDictionary * _Nonnull)jsonRepresentation; +@end + +@protocol OSNotificationPermissionObserver +- (void)onNotificationPermissionDidChange:(BOOL)permission; +@end + +typedef OSBoolObservable*> ObservablePermissionStateChangesType; + + +@interface OSPermissionChangedInternalObserver : NSObject ++ (void)fireChangesObserver:(OSPermissionStateInternal * _Nonnull)state; +@end + + diff --git a/iOS_SDK/OneSignalSDK/Source/OneSignalSetEmailParameters.h b/iOS_SDK/OneSignalSDK/OneSignal_Notifications/OneSignalNotifications.xcframework/ios-arm64/OneSignalNotifications.framework/Headers/OneSignalNotificationSettings.h similarity index 64% rename from iOS_SDK/OneSignalSDK/Source/OneSignalSetEmailParameters.h rename to iOS_SDK/OneSignalSDK/OneSignal_Notifications/OneSignalNotifications.xcframework/ios-arm64/OneSignalNotifications.framework/Headers/OneSignalNotificationSettings.h index 2682a79cd..6f4850b19 100644 --- a/iOS_SDK/OneSignalSDK/Source/OneSignalSetEmailParameters.h +++ b/iOS_SDK/OneSignalSDK/OneSignal_Notifications/OneSignalNotifications.xcframework/ios-arm64/OneSignalNotifications.framework/Headers/OneSignalNotificationSettings.h @@ -25,16 +25,24 @@ * THE SOFTWARE. */ +#ifndef OneSignalNotificationSettings_h +#define OneSignalNotificationSettings_h + #import -#import "OneSignal.h" +#import -@interface OneSignalSetEmailParameters : NSObject +typedef void(^OSUserResponseBlock)(BOOL accepted); -+ (instancetype)withEmail:(NSString *)email withAuthToken:(NSString *)authToken withSuccess:(OSResultSuccessBlock)success withFailure:(OSFailureBlock)failure; +@interface OneSignalNotificationSettings : NSObject +- (int) getNotificationTypes; +- (OSPermissionStateInternal*)getNotificationPermissionState; +- (void)getNotificationPermissionState:(void (^)(OSPermissionStateInternal *subscriptionState))completionHandler; +- (void)promptForNotifications:(OSUserResponseBlock)block; +- (void)registerForProvisionalAuthorization:(OSUserResponseBlock)block; +// Only used for iOS 9 +- (void)onNotificationPromptResponse:(int)notificationTypes; ++(dispatch_queue_t)getQueue; +@end -@property (strong, nonatomic) NSString *email; -@property (strong, nonatomic) NSString *authToken; -@property (nonatomic) OSResultSuccessBlock successBlock; -@property (nonatomic) OSFailureBlock failureBlock; -@end +#endif /* OneSignaNotificationSettings_h */ diff --git a/iOS_SDK/OneSignalSDK/OneSignal_Notifications/OneSignalNotifications.xcframework/ios-arm64/OneSignalNotifications.framework/Headers/OneSignalNotifications.h b/iOS_SDK/OneSignalSDK/OneSignal_Notifications/OneSignalNotifications.xcframework/ios-arm64/OneSignalNotifications.framework/Headers/OneSignalNotifications.h new file mode 100644 index 000000000..4e0368d99 --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignal_Notifications/OneSignalNotifications.xcframework/ios-arm64/OneSignalNotifications.framework/Headers/OneSignalNotifications.h @@ -0,0 +1,32 @@ +/* + Modified MIT License + + Copyright 2022 OneSignal + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + 1. The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + 2. All copies of substantial portions of the Software may only be used in connection + with services provided by OneSignal. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + */ + +#import + +#import +#import +#import diff --git a/iOS_SDK/OneSignalSDK/OneSignal_Notifications/OneSignalNotifications.xcframework/ios-arm64/OneSignalNotifications.framework/Info.plist b/iOS_SDK/OneSignalSDK/OneSignal_Notifications/OneSignalNotifications.xcframework/ios-arm64/OneSignalNotifications.framework/Info.plist new file mode 100644 index 000000000..7a9900492 Binary files /dev/null and b/iOS_SDK/OneSignalSDK/OneSignal_Notifications/OneSignalNotifications.xcframework/ios-arm64/OneSignalNotifications.framework/Info.plist differ diff --git a/iOS_SDK/OneSignalSDK/OneSignal_Notifications/OneSignalNotifications.xcframework/ios-arm64/OneSignalNotifications.framework/Modules/module.modulemap b/iOS_SDK/OneSignalSDK/OneSignal_Notifications/OneSignalNotifications.xcframework/ios-arm64/OneSignalNotifications.framework/Modules/module.modulemap new file mode 100644 index 000000000..263e7a4d3 --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignal_Notifications/OneSignalNotifications.xcframework/ios-arm64/OneSignalNotifications.framework/Modules/module.modulemap @@ -0,0 +1,6 @@ +framework module OneSignalNotifications { + umbrella header "OneSignalNotifications.h" + + export * + module * { export * } +} diff --git a/iOS_SDK/OneSignalSDK/OneSignal_Notifications/OneSignalNotifications.xcframework/ios-arm64/OneSignalNotifications.framework/OneSignalNotifications b/iOS_SDK/OneSignalSDK/OneSignal_Notifications/OneSignalNotifications.xcframework/ios-arm64/OneSignalNotifications.framework/OneSignalNotifications new file mode 100755 index 000000000..1f757da98 Binary files /dev/null and b/iOS_SDK/OneSignalSDK/OneSignal_Notifications/OneSignalNotifications.xcframework/ios-arm64/OneSignalNotifications.framework/OneSignalNotifications differ diff --git a/iOS_SDK/OneSignalSDK/OneSignal_Notifications/OneSignalNotifications.xcframework/ios-arm64/OneSignalNotifications.framework/_CodeSignature/CodeResources b/iOS_SDK/OneSignalSDK/OneSignal_Notifications/OneSignalNotifications.xcframework/ios-arm64/OneSignalNotifications.framework/_CodeSignature/CodeResources new file mode 100644 index 000000000..3900252d4 --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignal_Notifications/OneSignalNotifications.xcframework/ios-arm64/OneSignalNotifications.framework/_CodeSignature/CodeResources @@ -0,0 +1,168 @@ + + + + + files + + Headers/OSNotification+OneSignal.h + + Fbx0XEyM2xRwNCuzNnuMnHzMEQs= + + Headers/OSNotificationsManager.h + + gSmkZqdxvS9+JXOnoXKSt+4Jl1U= + + Headers/OSPermission.h + + ER0tEZTvaPjBUG+nK+Z32RA06vI= + + Headers/OneSignalNotificationSettings.h + + O0VW5U5ovJN56cmcc4RLErRjhCw= + + Headers/OneSignalNotifications.h + + jnNq248j4u8dwv+wvoMVf33zRUE= + + Info.plist + + zZTvzwWf7wS48KMvfePk11CkXD0= + + Modules/module.modulemap + + Nb2bgnv0pUFVZ6tSM+07dhyQT/I= + + + files2 + + Headers/OSNotification+OneSignal.h + + hash2 + + TjmMlUT2NwavUY9vmI1J/jKWNitH3BmnRhTFbxi/hFI= + + + Headers/OSNotificationsManager.h + + hash2 + + CHxsWa2GDl8vSRZDosajd+vfiMz4gLPCWFEnE+V3hh4= + + + Headers/OSPermission.h + + hash2 + + bVVspWwiLLui0t7V8zeUrgo3z76K4Tf39OMg1AyU8MY= + + + Headers/OneSignalNotificationSettings.h + + hash2 + + rJtIGSr7QHhlu2N4Spuo1ZjGKzAgOQAf+MN+wMIMCmc= + + + Headers/OneSignalNotifications.h + + hash2 + + F6ZjobsvISP/IwebMBdCy85sa8aUy9k8KerAPzHCnpk= + + + Modules/module.modulemap + + hash2 + + /PUDV/RfFn4t5ClXw6FR9EVxf2LUlWBf6oRKtqsv75w= + + + + rules + + ^.* + + ^.*\.lproj/ + + optional + + weight + 1000 + + ^.*\.lproj/locversion.plist$ + + omit + + weight + 1100 + + ^Base\.lproj/ + + weight + 1010 + + ^version.plist$ + + + rules2 + + .*\.dSYM($|/) + + weight + 11 + + ^(.*/)?\.DS_Store$ + + omit + + weight + 2000 + + ^.* + + ^.*\.lproj/ + + optional + + weight + 1000 + + ^.*\.lproj/locversion.plist$ + + omit + + weight + 1100 + + ^Base\.lproj/ + + weight + 1010 + + ^Info\.plist$ + + omit + + weight + 20 + + ^PkgInfo$ + + omit + + weight + 20 + + ^embedded\.provisionprofile$ + + weight + 20 + + ^version\.plist$ + + weight + 20 + + + + diff --git a/iOS_SDK/OneSignalSDK/OneSignal_Notifications/OneSignalNotifications.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalNotifications.framework/Headers b/iOS_SDK/OneSignalSDK/OneSignal_Notifications/OneSignalNotifications.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalNotifications.framework/Headers new file mode 120000 index 000000000..a177d2a6b --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignal_Notifications/OneSignalNotifications.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalNotifications.framework/Headers @@ -0,0 +1 @@ +Versions/Current/Headers \ No newline at end of file diff --git a/iOS_SDK/OneSignalSDK/OneSignal_Notifications/OneSignalNotifications.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalNotifications.framework/Modules b/iOS_SDK/OneSignalSDK/OneSignal_Notifications/OneSignalNotifications.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalNotifications.framework/Modules new file mode 120000 index 000000000..5736f3186 --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignal_Notifications/OneSignalNotifications.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalNotifications.framework/Modules @@ -0,0 +1 @@ +Versions/Current/Modules \ No newline at end of file diff --git a/iOS_SDK/OneSignalSDK/OneSignal_Notifications/OneSignalNotifications.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalNotifications.framework/OneSignalNotifications b/iOS_SDK/OneSignalSDK/OneSignal_Notifications/OneSignalNotifications.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalNotifications.framework/OneSignalNotifications new file mode 120000 index 000000000..9dbda0771 --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignal_Notifications/OneSignalNotifications.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalNotifications.framework/OneSignalNotifications @@ -0,0 +1 @@ +Versions/Current/OneSignalNotifications \ No newline at end of file diff --git a/iOS_SDK/OneSignalSDK/OneSignal_Notifications/OneSignalNotifications.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalNotifications.framework/Resources b/iOS_SDK/OneSignalSDK/OneSignal_Notifications/OneSignalNotifications.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalNotifications.framework/Resources new file mode 120000 index 000000000..953ee36f3 --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignal_Notifications/OneSignalNotifications.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalNotifications.framework/Resources @@ -0,0 +1 @@ +Versions/Current/Resources \ No newline at end of file diff --git a/iOS_SDK/OneSignalSDK/OneSignal_Notifications/OneSignalNotifications.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalNotifications.framework/Versions/A/Headers/OSNotification+OneSignal.h b/iOS_SDK/OneSignalSDK/OneSignal_Notifications/OneSignalNotifications.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalNotifications.framework/Versions/A/Headers/OSNotification+OneSignal.h new file mode 100644 index 000000000..09197167e --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignal_Notifications/OneSignalNotifications.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalNotifications.framework/Versions/A/Headers/OSNotification+OneSignal.h @@ -0,0 +1,37 @@ +/** + * Modified MIT License + * + * Copyright 2021OneSignal + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * 1. The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * 2. All copies of substantial portions of the Software may only be used in connection + * with services provided by OneSignal. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + + +#import +#import + +/** + Public interface used in the OSNotificationLifecycleListener's onWillDisplay event. + */ +@interface OSDisplayableNotification : OSNotification +- (void)display; +@end diff --git a/iOS_SDK/OneSignalSDK/OneSignal_Notifications/OneSignalNotifications.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalNotifications.framework/Versions/A/Headers/OSNotificationsManager.h b/iOS_SDK/OneSignalSDK/OneSignal_Notifications/OneSignalNotifications.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalNotifications.framework/Versions/A/Headers/OSNotificationsManager.h new file mode 100644 index 000000000..cd973d8d6 --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignal_Notifications/OneSignalNotifications.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalNotifications.framework/Versions/A/Headers/OSNotificationsManager.h @@ -0,0 +1,125 @@ +/* + Modified MIT License + + Copyright 2022 OneSignal + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + 1. The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + 2. All copies of substantial portions of the Software may only be used in connection + with services provided by OneSignal. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + */ + +#import +#import +#import +#import +#import +#import + +@protocol OSNotificationClickListener +- (void)onClickNotification:(OSNotificationClickEvent *_Nonnull)event +NS_SWIFT_NAME(onClick(event:)); +@end + +@interface OSNotificationWillDisplayEvent : NSObject + +@property (readonly, strong, nonatomic, nonnull) OSDisplayableNotification *notification; // TODO: strong? nonatomic? nullable? +- (void)preventDefault; + +@end + +@protocol OSNotificationLifecycleListener +- (void)onWillDisplayNotification:(OSNotificationWillDisplayEvent *_Nonnull)event NS_SWIFT_NAME(onWillDisplay(event:)); +@end + +/** + Public API for the Notifications namespace. + */ +@protocol OSNotifications ++ (BOOL)permission NS_REFINED_FOR_SWIFT; ++ (BOOL)canRequestPermission NS_REFINED_FOR_SWIFT; ++ (OSNotificationPermission)permissionNative NS_REFINED_FOR_SWIFT; ++ (void)addForegroundLifecycleListener:(NSObject *_Nullable)listener; ++ (void)removeForegroundLifecycleListener:(NSObject *_Nullable)listener; ++ (void)addClickListener:(NSObject*_Nonnull)listener NS_REFINED_FOR_SWIFT; ++ (void)removeClickListener:(NSObject*_Nonnull)listener NS_REFINED_FOR_SWIFT; ++ (void)requestPermission:(OSUserResponseBlock _Nullable )block; ++ (void)requestPermission:(OSUserResponseBlock _Nullable )block fallbackToSettings:(BOOL)fallback; ++ (void)registerForProvisionalAuthorization:(OSUserResponseBlock _Nullable )block NS_REFINED_FOR_SWIFT; ++ (void)addPermissionObserver:(NSObject*_Nonnull)observer NS_REFINED_FOR_SWIFT; ++ (void)removePermissionObserver:(NSObject*_Nonnull)observer NS_REFINED_FOR_SWIFT; ++ (void)clearAll; +@end + + +@protocol OneSignalNotificationsDelegate +// set delegate before user +// can check responds to selector +- (void)setNotificationTypes:(int)notificationTypes; +- (void)setPushToken:(NSString * _Nonnull)pushToken; + +@end + + +@interface OSNotificationsManager : NSObject + +@property (class, weak, nonatomic, nullable) id delegate; + ++ (Class _Nonnull)Notifications; ++ (void)start; ++ (void)setColdStartFromTapOnNotification:(BOOL)coldStartFromTapOnNotification; ++ (BOOL)getColdStartFromTapOnNotification; + +@property (class, readonly) OSPermissionStateInternal* _Nonnull currentPermissionState; +@property (class) OSPermissionStateInternal* _Nonnull lastPermissionState; + ++ (void)clearStatics; // Used by Unit Tests + +// Indicates if the app provides its own custom Notification customization settings UI +// To enable this, set kOSSettingsKeyProvidesAppNotificationSettings to true in init. ++ (BOOL)providesAppNotificationSettings; +/* Used to determine if the app is able to present it's own customized Notification Settings view (iOS 12+) */ ++ (void)setProvidesNotificationSettingsView:(BOOL)providesView; + ++ (BOOL)registerForAPNsToken; ++ (void)sendPushTokenToDelegate; + ++ (int)getNotificationTypes:(BOOL)pushDisabled; ++ (void)updateNotificationTypes:(int)notificationTypes; ++ (void)sendNotificationTypesUpdateToDelegate; + +// Used to manage observers added by the app developer. +@property (class, readonly) ObservablePermissionStateChangesType* _Nullable permissionStateChangesObserver; + +@property (class, readonly) OneSignalNotificationSettings* _Nonnull osNotificationSettings; + +// This is set by the user module ++ (void)setPushSubscriptionId:(NSString *_Nullable)pushSubscriptionId; + ++ (void)handleWillShowInForegroundForNotification:(OSNotification *_Nonnull)notification completion:(OSNotificationDisplayResponse _Nonnull)completion; ++ (void)handleNotificationActionWithUrl:(NSString* _Nullable)url actionID:(NSString* _Nonnull)actionID; ++ (BOOL)clearBadgeCount:(BOOL)fromNotifOpened; + ++ (BOOL)receiveRemoteNotification:(UIApplication* _Nonnull)application UserInfo:(NSDictionary* _Nonnull)userInfo completionHandler:(void (^_Nonnull)(UIBackgroundFetchResult))completionHandler; ++ (void)notificationReceived:(NSDictionary* _Nonnull)messageDict wasOpened:(BOOL)opened; ++ (void)handleWillPresentNotificationInForegroundWithPayload:(NSDictionary * _Nonnull)payload withCompletion:(OSNotificationDisplayResponse _Nonnull)completion; ++ (void)didRegisterForRemoteNotifications:(UIApplication *_Nonnull)app deviceToken:(NSData *_Nonnull)inDeviceToken; ++ (void)handleDidFailRegisterForRemoteNotification:(NSError*_Nonnull)err; ++ (void)checkProvisionalAuthorizationStatus; +@end diff --git a/iOS_SDK/OneSignalSDK/OneSignal_Notifications/OneSignalNotifications.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalNotifications.framework/Versions/A/Headers/OSPermission.h b/iOS_SDK/OneSignalSDK/OneSignal_Notifications/OneSignalNotifications.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalNotifications.framework/Versions/A/Headers/OSPermission.h new file mode 100644 index 000000000..5fd75c02b --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignal_Notifications/OneSignalNotifications.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalNotifications.framework/Versions/A/Headers/OSPermission.h @@ -0,0 +1,102 @@ +/** + * Modified MIT License + * + * Copyright 2017 OneSignal + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * 1. The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * 2. All copies of substantial portions of the Software may only be used in connection + * with services provided by OneSignal. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#import + +#import + +typedef NS_ENUM(NSInteger, OSNotificationPermission) { + // The user has not yet made a choice regarding whether your app can show notifications. + OSNotificationPermissionNotDetermined = 0, + + // The application is not authorized to post user notifications. + OSNotificationPermissionDenied, + + // The application is authorized to post user notifications. + OSNotificationPermissionAuthorized, + + // the application is only authorized to post Provisional notifications (direct to history) + OSNotificationPermissionProvisional, + + // the application is authorized to send notifications for 8 hours. Only used by App Clips. + OSNotificationPermissionEphemeral +}; + +// Permission Classes + +// TODO: this object can be REMOVED now that permission is a boolean +@interface OSPermissionState : NSObject +@property (readonly, nonatomic) BOOL permission; +- (NSDictionary * _Nonnull)jsonRepresentation; +- (instancetype _Nonnull )initWithPermission:(BOOL)permission; +@end + +@protocol OSPermissionStateObserver +- (void)onChanged:(OSPermissionState * _Nonnull)state; +@end + +typedef OSObservable*, OSPermissionState*> ObservablePermissionStateType; + + +// Redefine OSPermissionState +@interface OSPermissionStateInternal : NSObject { +@protected BOOL _hasPrompted; +@protected BOOL _answeredPrompt; +} +@property (readwrite, nonatomic) BOOL hasPrompted; +@property (readwrite, nonatomic) BOOL providesAppNotificationSettings; +@property (readwrite, nonatomic) BOOL answeredPrompt; +@property (readwrite, nonatomic) BOOL accepted; +@property (readwrite, nonatomic) BOOL provisional; //internal flag +@property (readwrite, nonatomic) BOOL ephemeral; +@property (readwrite, nonatomic) BOOL reachable; +@property (readonly, nonatomic) OSNotificationPermission status; +@property int notificationTypes; + +@property (nonatomic) ObservablePermissionStateType * _Nonnull observable; + +- (void) persistAsFrom; + +- (instancetype _Nonnull )initAsTo; +- (instancetype _Nonnull )initAsFrom; + +- (OSPermissionState * _Nonnull)getExternalState; +- (NSDictionary * _Nonnull)jsonRepresentation; +@end + +@protocol OSNotificationPermissionObserver +- (void)onNotificationPermissionDidChange:(BOOL)permission; +@end + +typedef OSBoolObservable*> ObservablePermissionStateChangesType; + + +@interface OSPermissionChangedInternalObserver : NSObject ++ (void)fireChangesObserver:(OSPermissionStateInternal * _Nonnull)state; +@end + + diff --git a/iOS_SDK/OneSignalSDK/Source/OneSignalNotificationSettingsIOS10.h b/iOS_SDK/OneSignalSDK/OneSignal_Notifications/OneSignalNotifications.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalNotifications.framework/Versions/A/Headers/OneSignalNotificationSettings.h similarity index 64% rename from iOS_SDK/OneSignalSDK/Source/OneSignalNotificationSettingsIOS10.h rename to iOS_SDK/OneSignalSDK/OneSignal_Notifications/OneSignalNotifications.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalNotifications.framework/Versions/A/Headers/OneSignalNotificationSettings.h index f76af7176..6f4850b19 100644 --- a/iOS_SDK/OneSignalSDK/Source/OneSignalNotificationSettingsIOS10.h +++ b/iOS_SDK/OneSignalSDK/OneSignal_Notifications/OneSignalNotifications.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalNotifications.framework/Versions/A/Headers/OneSignalNotificationSettings.h @@ -25,13 +25,24 @@ * THE SOFTWARE. */ -#ifndef OneSignalNotificationSettingsIOS10_h -#define OneSignalNotificationSettingsIOS10_h +#ifndef OneSignalNotificationSettings_h +#define OneSignalNotificationSettings_h -#import "OneSignalNotificationSettings.h" +#import +#import -@interface OneSignalNotificationSettingsIOS10 : NSObject +typedef void(^OSUserResponseBlock)(BOOL accepted); + +@interface OneSignalNotificationSettings : NSObject +- (int) getNotificationTypes; +- (OSPermissionStateInternal*)getNotificationPermissionState; +- (void)getNotificationPermissionState:(void (^)(OSPermissionStateInternal *subscriptionState))completionHandler; +- (void)promptForNotifications:(OSUserResponseBlock)block; +- (void)registerForProvisionalAuthorization:(OSUserResponseBlock)block; +// Only used for iOS 9 +- (void)onNotificationPromptResponse:(int)notificationTypes; +(dispatch_queue_t)getQueue; @end -#endif /* OneSignalNotificationSettingsIOS10_h */ + +#endif /* OneSignaNotificationSettings_h */ diff --git a/iOS_SDK/OneSignalSDK/OneSignal_Notifications/OneSignalNotifications.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalNotifications.framework/Versions/A/Headers/OneSignalNotifications.h b/iOS_SDK/OneSignalSDK/OneSignal_Notifications/OneSignalNotifications.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalNotifications.framework/Versions/A/Headers/OneSignalNotifications.h new file mode 100644 index 000000000..4e0368d99 --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignal_Notifications/OneSignalNotifications.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalNotifications.framework/Versions/A/Headers/OneSignalNotifications.h @@ -0,0 +1,32 @@ +/* + Modified MIT License + + Copyright 2022 OneSignal + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + 1. The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + 2. All copies of substantial portions of the Software may only be used in connection + with services provided by OneSignal. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + */ + +#import + +#import +#import +#import diff --git a/iOS_SDK/OneSignalSDK/OneSignal_Notifications/OneSignalNotifications.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalNotifications.framework/Versions/A/Modules/module.modulemap b/iOS_SDK/OneSignalSDK/OneSignal_Notifications/OneSignalNotifications.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalNotifications.framework/Versions/A/Modules/module.modulemap new file mode 100644 index 000000000..263e7a4d3 --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignal_Notifications/OneSignalNotifications.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalNotifications.framework/Versions/A/Modules/module.modulemap @@ -0,0 +1,6 @@ +framework module OneSignalNotifications { + umbrella header "OneSignalNotifications.h" + + export * + module * { export * } +} diff --git a/iOS_SDK/OneSignalSDK/OneSignal_Notifications/OneSignalNotifications.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalNotifications.framework/Versions/A/OneSignalNotifications b/iOS_SDK/OneSignalSDK/OneSignal_Notifications/OneSignalNotifications.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalNotifications.framework/Versions/A/OneSignalNotifications new file mode 100755 index 000000000..840206a81 Binary files /dev/null and b/iOS_SDK/OneSignalSDK/OneSignal_Notifications/OneSignalNotifications.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalNotifications.framework/Versions/A/OneSignalNotifications differ diff --git a/iOS_SDK/OneSignalSDK/OneSignal_Notifications/OneSignalNotifications.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalNotifications.framework/Versions/A/Resources/Info.plist b/iOS_SDK/OneSignalSDK/OneSignal_Notifications/OneSignalNotifications.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalNotifications.framework/Versions/A/Resources/Info.plist new file mode 100644 index 000000000..7b2b3fedd --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignal_Notifications/OneSignalNotifications.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalNotifications.framework/Versions/A/Resources/Info.plist @@ -0,0 +1,50 @@ + + + + + BuildMachineOSBuild + 22G91 + CFBundleDevelopmentRegion + English + CFBundleExecutable + OneSignalNotifications + CFBundleIdentifier + com.onesignal.OneSignalNotifications + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + OneSignalNotifications + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0 + CFBundleSupportedPlatforms + + MacOSX + + CFBundleVersion + 1 + DTCompiler + com.apple.compilers.llvm.clang.1_0 + DTPlatformBuild + 14B47b + DTPlatformName + macosx + DTPlatformVersion + 13.0 + DTSDKBuild + 22A372 + DTSDKName + macosx13.0 + DTXcode + 1410 + DTXcodeBuild + 14B47b + LSMinimumSystemVersion + 10.15 + UIDeviceFamily + + 2 + + + diff --git a/iOS_SDK/OneSignalSDK/OneSignal_Notifications/OneSignalNotifications.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalNotifications.framework/Versions/A/_CodeSignature/CodeResources b/iOS_SDK/OneSignalSDK/OneSignal_Notifications/OneSignalNotifications.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalNotifications.framework/Versions/A/_CodeSignature/CodeResources new file mode 100644 index 000000000..7a1498aee --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignal_Notifications/OneSignalNotifications.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalNotifications.framework/Versions/A/_CodeSignature/CodeResources @@ -0,0 +1,170 @@ + + + + + files + + Resources/Info.plist + + 8z1CVvmO4pqkEvL1P4cV1dZNiOQ= + + + files2 + + Headers/OSNotification+OneSignal.h + + hash2 + + TjmMlUT2NwavUY9vmI1J/jKWNitH3BmnRhTFbxi/hFI= + + + Headers/OSNotificationsManager.h + + hash2 + + CHxsWa2GDl8vSRZDosajd+vfiMz4gLPCWFEnE+V3hh4= + + + Headers/OSPermission.h + + hash2 + + bVVspWwiLLui0t7V8zeUrgo3z76K4Tf39OMg1AyU8MY= + + + Headers/OneSignalNotificationSettings.h + + hash2 + + rJtIGSr7QHhlu2N4Spuo1ZjGKzAgOQAf+MN+wMIMCmc= + + + Headers/OneSignalNotifications.h + + hash2 + + F6ZjobsvISP/IwebMBdCy85sa8aUy9k8KerAPzHCnpk= + + + Modules/module.modulemap + + hash2 + + /PUDV/RfFn4t5ClXw6FR9EVxf2LUlWBf6oRKtqsv75w= + + + Resources/Info.plist + + hash2 + + UKoof+OPk9SJyZbDFv0XIIEcT8/HPWGp3TLbOvT0MKc= + + + + rules + + ^Resources/ + + ^Resources/.*\.lproj/ + + optional + + weight + 1000 + + ^Resources/.*\.lproj/locversion.plist$ + + omit + + weight + 1100 + + ^Resources/Base\.lproj/ + + weight + 1010 + + ^version.plist$ + + + rules2 + + .*\.dSYM($|/) + + weight + 11 + + ^(.*/)?\.DS_Store$ + + omit + + weight + 2000 + + ^(Frameworks|SharedFrameworks|PlugIns|Plug-ins|XPCServices|Helpers|MacOS|Library/(Automator|Spotlight|LoginItems))/ + + nested + + weight + 10 + + ^.* + + ^Info\.plist$ + + omit + + weight + 20 + + ^PkgInfo$ + + omit + + weight + 20 + + ^Resources/ + + weight + 20 + + ^Resources/.*\.lproj/ + + optional + + weight + 1000 + + ^Resources/.*\.lproj/locversion.plist$ + + omit + + weight + 1100 + + ^Resources/Base\.lproj/ + + weight + 1010 + + ^[^/]+$ + + nested + + weight + 10 + + ^embedded\.provisionprofile$ + + weight + 20 + + ^version\.plist$ + + weight + 20 + + + + diff --git a/iOS_SDK/OneSignalSDK/OneSignal_Notifications/OneSignalNotifications.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalNotifications.framework/Versions/Current b/iOS_SDK/OneSignalSDK/OneSignal_Notifications/OneSignalNotifications.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalNotifications.framework/Versions/Current new file mode 120000 index 000000000..8c7e5a667 --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignal_Notifications/OneSignalNotifications.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalNotifications.framework/Versions/Current @@ -0,0 +1 @@ +A \ No newline at end of file diff --git a/iOS_SDK/OneSignalSDK/OneSignal_Notifications/OneSignalNotifications.xcframework/ios-arm64_x86_64-simulator/OneSignalNotifications.framework/Headers/OSNotification+OneSignal.h b/iOS_SDK/OneSignalSDK/OneSignal_Notifications/OneSignalNotifications.xcframework/ios-arm64_x86_64-simulator/OneSignalNotifications.framework/Headers/OSNotification+OneSignal.h new file mode 100644 index 000000000..09197167e --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignal_Notifications/OneSignalNotifications.xcframework/ios-arm64_x86_64-simulator/OneSignalNotifications.framework/Headers/OSNotification+OneSignal.h @@ -0,0 +1,37 @@ +/** + * Modified MIT License + * + * Copyright 2021OneSignal + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * 1. The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * 2. All copies of substantial portions of the Software may only be used in connection + * with services provided by OneSignal. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + + +#import +#import + +/** + Public interface used in the OSNotificationLifecycleListener's onWillDisplay event. + */ +@interface OSDisplayableNotification : OSNotification +- (void)display; +@end diff --git a/iOS_SDK/OneSignalSDK/OneSignal_Notifications/OneSignalNotifications.xcframework/ios-arm64_x86_64-simulator/OneSignalNotifications.framework/Headers/OSNotificationsManager.h b/iOS_SDK/OneSignalSDK/OneSignal_Notifications/OneSignalNotifications.xcframework/ios-arm64_x86_64-simulator/OneSignalNotifications.framework/Headers/OSNotificationsManager.h new file mode 100644 index 000000000..cd973d8d6 --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignal_Notifications/OneSignalNotifications.xcframework/ios-arm64_x86_64-simulator/OneSignalNotifications.framework/Headers/OSNotificationsManager.h @@ -0,0 +1,125 @@ +/* + Modified MIT License + + Copyright 2022 OneSignal + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + 1. The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + 2. All copies of substantial portions of the Software may only be used in connection + with services provided by OneSignal. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + */ + +#import +#import +#import +#import +#import +#import + +@protocol OSNotificationClickListener +- (void)onClickNotification:(OSNotificationClickEvent *_Nonnull)event +NS_SWIFT_NAME(onClick(event:)); +@end + +@interface OSNotificationWillDisplayEvent : NSObject + +@property (readonly, strong, nonatomic, nonnull) OSDisplayableNotification *notification; // TODO: strong? nonatomic? nullable? +- (void)preventDefault; + +@end + +@protocol OSNotificationLifecycleListener +- (void)onWillDisplayNotification:(OSNotificationWillDisplayEvent *_Nonnull)event NS_SWIFT_NAME(onWillDisplay(event:)); +@end + +/** + Public API for the Notifications namespace. + */ +@protocol OSNotifications ++ (BOOL)permission NS_REFINED_FOR_SWIFT; ++ (BOOL)canRequestPermission NS_REFINED_FOR_SWIFT; ++ (OSNotificationPermission)permissionNative NS_REFINED_FOR_SWIFT; ++ (void)addForegroundLifecycleListener:(NSObject *_Nullable)listener; ++ (void)removeForegroundLifecycleListener:(NSObject *_Nullable)listener; ++ (void)addClickListener:(NSObject*_Nonnull)listener NS_REFINED_FOR_SWIFT; ++ (void)removeClickListener:(NSObject*_Nonnull)listener NS_REFINED_FOR_SWIFT; ++ (void)requestPermission:(OSUserResponseBlock _Nullable )block; ++ (void)requestPermission:(OSUserResponseBlock _Nullable )block fallbackToSettings:(BOOL)fallback; ++ (void)registerForProvisionalAuthorization:(OSUserResponseBlock _Nullable )block NS_REFINED_FOR_SWIFT; ++ (void)addPermissionObserver:(NSObject*_Nonnull)observer NS_REFINED_FOR_SWIFT; ++ (void)removePermissionObserver:(NSObject*_Nonnull)observer NS_REFINED_FOR_SWIFT; ++ (void)clearAll; +@end + + +@protocol OneSignalNotificationsDelegate +// set delegate before user +// can check responds to selector +- (void)setNotificationTypes:(int)notificationTypes; +- (void)setPushToken:(NSString * _Nonnull)pushToken; + +@end + + +@interface OSNotificationsManager : NSObject + +@property (class, weak, nonatomic, nullable) id delegate; + ++ (Class _Nonnull)Notifications; ++ (void)start; ++ (void)setColdStartFromTapOnNotification:(BOOL)coldStartFromTapOnNotification; ++ (BOOL)getColdStartFromTapOnNotification; + +@property (class, readonly) OSPermissionStateInternal* _Nonnull currentPermissionState; +@property (class) OSPermissionStateInternal* _Nonnull lastPermissionState; + ++ (void)clearStatics; // Used by Unit Tests + +// Indicates if the app provides its own custom Notification customization settings UI +// To enable this, set kOSSettingsKeyProvidesAppNotificationSettings to true in init. ++ (BOOL)providesAppNotificationSettings; +/* Used to determine if the app is able to present it's own customized Notification Settings view (iOS 12+) */ ++ (void)setProvidesNotificationSettingsView:(BOOL)providesView; + ++ (BOOL)registerForAPNsToken; ++ (void)sendPushTokenToDelegate; + ++ (int)getNotificationTypes:(BOOL)pushDisabled; ++ (void)updateNotificationTypes:(int)notificationTypes; ++ (void)sendNotificationTypesUpdateToDelegate; + +// Used to manage observers added by the app developer. +@property (class, readonly) ObservablePermissionStateChangesType* _Nullable permissionStateChangesObserver; + +@property (class, readonly) OneSignalNotificationSettings* _Nonnull osNotificationSettings; + +// This is set by the user module ++ (void)setPushSubscriptionId:(NSString *_Nullable)pushSubscriptionId; + ++ (void)handleWillShowInForegroundForNotification:(OSNotification *_Nonnull)notification completion:(OSNotificationDisplayResponse _Nonnull)completion; ++ (void)handleNotificationActionWithUrl:(NSString* _Nullable)url actionID:(NSString* _Nonnull)actionID; ++ (BOOL)clearBadgeCount:(BOOL)fromNotifOpened; + ++ (BOOL)receiveRemoteNotification:(UIApplication* _Nonnull)application UserInfo:(NSDictionary* _Nonnull)userInfo completionHandler:(void (^_Nonnull)(UIBackgroundFetchResult))completionHandler; ++ (void)notificationReceived:(NSDictionary* _Nonnull)messageDict wasOpened:(BOOL)opened; ++ (void)handleWillPresentNotificationInForegroundWithPayload:(NSDictionary * _Nonnull)payload withCompletion:(OSNotificationDisplayResponse _Nonnull)completion; ++ (void)didRegisterForRemoteNotifications:(UIApplication *_Nonnull)app deviceToken:(NSData *_Nonnull)inDeviceToken; ++ (void)handleDidFailRegisterForRemoteNotification:(NSError*_Nonnull)err; ++ (void)checkProvisionalAuthorizationStatus; +@end diff --git a/iOS_SDK/OneSignalSDK/OneSignal_Notifications/OneSignalNotifications.xcframework/ios-arm64_x86_64-simulator/OneSignalNotifications.framework/Headers/OSPermission.h b/iOS_SDK/OneSignalSDK/OneSignal_Notifications/OneSignalNotifications.xcframework/ios-arm64_x86_64-simulator/OneSignalNotifications.framework/Headers/OSPermission.h new file mode 100644 index 000000000..5fd75c02b --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignal_Notifications/OneSignalNotifications.xcframework/ios-arm64_x86_64-simulator/OneSignalNotifications.framework/Headers/OSPermission.h @@ -0,0 +1,102 @@ +/** + * Modified MIT License + * + * Copyright 2017 OneSignal + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * 1. The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * 2. All copies of substantial portions of the Software may only be used in connection + * with services provided by OneSignal. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#import + +#import + +typedef NS_ENUM(NSInteger, OSNotificationPermission) { + // The user has not yet made a choice regarding whether your app can show notifications. + OSNotificationPermissionNotDetermined = 0, + + // The application is not authorized to post user notifications. + OSNotificationPermissionDenied, + + // The application is authorized to post user notifications. + OSNotificationPermissionAuthorized, + + // the application is only authorized to post Provisional notifications (direct to history) + OSNotificationPermissionProvisional, + + // the application is authorized to send notifications for 8 hours. Only used by App Clips. + OSNotificationPermissionEphemeral +}; + +// Permission Classes + +// TODO: this object can be REMOVED now that permission is a boolean +@interface OSPermissionState : NSObject +@property (readonly, nonatomic) BOOL permission; +- (NSDictionary * _Nonnull)jsonRepresentation; +- (instancetype _Nonnull )initWithPermission:(BOOL)permission; +@end + +@protocol OSPermissionStateObserver +- (void)onChanged:(OSPermissionState * _Nonnull)state; +@end + +typedef OSObservable*, OSPermissionState*> ObservablePermissionStateType; + + +// Redefine OSPermissionState +@interface OSPermissionStateInternal : NSObject { +@protected BOOL _hasPrompted; +@protected BOOL _answeredPrompt; +} +@property (readwrite, nonatomic) BOOL hasPrompted; +@property (readwrite, nonatomic) BOOL providesAppNotificationSettings; +@property (readwrite, nonatomic) BOOL answeredPrompt; +@property (readwrite, nonatomic) BOOL accepted; +@property (readwrite, nonatomic) BOOL provisional; //internal flag +@property (readwrite, nonatomic) BOOL ephemeral; +@property (readwrite, nonatomic) BOOL reachable; +@property (readonly, nonatomic) OSNotificationPermission status; +@property int notificationTypes; + +@property (nonatomic) ObservablePermissionStateType * _Nonnull observable; + +- (void) persistAsFrom; + +- (instancetype _Nonnull )initAsTo; +- (instancetype _Nonnull )initAsFrom; + +- (OSPermissionState * _Nonnull)getExternalState; +- (NSDictionary * _Nonnull)jsonRepresentation; +@end + +@protocol OSNotificationPermissionObserver +- (void)onNotificationPermissionDidChange:(BOOL)permission; +@end + +typedef OSBoolObservable*> ObservablePermissionStateChangesType; + + +@interface OSPermissionChangedInternalObserver : NSObject ++ (void)fireChangesObserver:(OSPermissionStateInternal * _Nonnull)state; +@end + + diff --git a/iOS_SDK/OneSignalSDK/OneSignal_Notifications/OneSignalNotifications.xcframework/ios-arm64_x86_64-simulator/OneSignalNotifications.framework/Headers/OneSignalNotificationSettings.h b/iOS_SDK/OneSignalSDK/OneSignal_Notifications/OneSignalNotifications.xcframework/ios-arm64_x86_64-simulator/OneSignalNotifications.framework/Headers/OneSignalNotificationSettings.h new file mode 100644 index 000000000..6f4850b19 --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignal_Notifications/OneSignalNotifications.xcframework/ios-arm64_x86_64-simulator/OneSignalNotifications.framework/Headers/OneSignalNotificationSettings.h @@ -0,0 +1,48 @@ +/** + * Modified MIT License + * + * Copyright 2017 OneSignal + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * 1. The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * 2. All copies of substantial portions of the Software may only be used in connection + * with services provided by OneSignal. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#ifndef OneSignalNotificationSettings_h +#define OneSignalNotificationSettings_h + +#import +#import + +typedef void(^OSUserResponseBlock)(BOOL accepted); + +@interface OneSignalNotificationSettings : NSObject +- (int) getNotificationTypes; +- (OSPermissionStateInternal*)getNotificationPermissionState; +- (void)getNotificationPermissionState:(void (^)(OSPermissionStateInternal *subscriptionState))completionHandler; +- (void)promptForNotifications:(OSUserResponseBlock)block; +- (void)registerForProvisionalAuthorization:(OSUserResponseBlock)block; +// Only used for iOS 9 +- (void)onNotificationPromptResponse:(int)notificationTypes; ++(dispatch_queue_t)getQueue; +@end + + +#endif /* OneSignaNotificationSettings_h */ diff --git a/iOS_SDK/OneSignalSDK/OneSignal_Notifications/OneSignalNotifications.xcframework/ios-arm64_x86_64-simulator/OneSignalNotifications.framework/Headers/OneSignalNotifications.h b/iOS_SDK/OneSignalSDK/OneSignal_Notifications/OneSignalNotifications.xcframework/ios-arm64_x86_64-simulator/OneSignalNotifications.framework/Headers/OneSignalNotifications.h new file mode 100644 index 000000000..4e0368d99 --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignal_Notifications/OneSignalNotifications.xcframework/ios-arm64_x86_64-simulator/OneSignalNotifications.framework/Headers/OneSignalNotifications.h @@ -0,0 +1,32 @@ +/* + Modified MIT License + + Copyright 2022 OneSignal + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + 1. The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + 2. All copies of substantial portions of the Software may only be used in connection + with services provided by OneSignal. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + */ + +#import + +#import +#import +#import diff --git a/iOS_SDK/OneSignalSDK/OneSignal_Notifications/OneSignalNotifications.xcframework/ios-arm64_x86_64-simulator/OneSignalNotifications.framework/Info.plist b/iOS_SDK/OneSignalSDK/OneSignal_Notifications/OneSignalNotifications.xcframework/ios-arm64_x86_64-simulator/OneSignalNotifications.framework/Info.plist new file mode 100644 index 000000000..db06f1110 Binary files /dev/null and b/iOS_SDK/OneSignalSDK/OneSignal_Notifications/OneSignalNotifications.xcframework/ios-arm64_x86_64-simulator/OneSignalNotifications.framework/Info.plist differ diff --git a/iOS_SDK/OneSignalSDK/OneSignal_Notifications/OneSignalNotifications.xcframework/ios-arm64_x86_64-simulator/OneSignalNotifications.framework/Modules/module.modulemap b/iOS_SDK/OneSignalSDK/OneSignal_Notifications/OneSignalNotifications.xcframework/ios-arm64_x86_64-simulator/OneSignalNotifications.framework/Modules/module.modulemap new file mode 100644 index 000000000..263e7a4d3 --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignal_Notifications/OneSignalNotifications.xcframework/ios-arm64_x86_64-simulator/OneSignalNotifications.framework/Modules/module.modulemap @@ -0,0 +1,6 @@ +framework module OneSignalNotifications { + umbrella header "OneSignalNotifications.h" + + export * + module * { export * } +} diff --git a/iOS_SDK/OneSignalSDK/OneSignal_Notifications/OneSignalNotifications.xcframework/ios-arm64_x86_64-simulator/OneSignalNotifications.framework/OneSignalNotifications b/iOS_SDK/OneSignalSDK/OneSignal_Notifications/OneSignalNotifications.xcframework/ios-arm64_x86_64-simulator/OneSignalNotifications.framework/OneSignalNotifications new file mode 100755 index 000000000..9d20a01ad Binary files /dev/null and b/iOS_SDK/OneSignalSDK/OneSignal_Notifications/OneSignalNotifications.xcframework/ios-arm64_x86_64-simulator/OneSignalNotifications.framework/OneSignalNotifications differ diff --git a/iOS_SDK/OneSignalSDK/OneSignal_Notifications/OneSignalNotifications.xcframework/ios-arm64_x86_64-simulator/OneSignalNotifications.framework/_CodeSignature/CodeResources b/iOS_SDK/OneSignalSDK/OneSignal_Notifications/OneSignalNotifications.xcframework/ios-arm64_x86_64-simulator/OneSignalNotifications.framework/_CodeSignature/CodeResources new file mode 100644 index 000000000..e78c17d4c --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignal_Notifications/OneSignalNotifications.xcframework/ios-arm64_x86_64-simulator/OneSignalNotifications.framework/_CodeSignature/CodeResources @@ -0,0 +1,168 @@ + + + + + files + + Headers/OSNotification+OneSignal.h + + Fbx0XEyM2xRwNCuzNnuMnHzMEQs= + + Headers/OSNotificationsManager.h + + gSmkZqdxvS9+JXOnoXKSt+4Jl1U= + + Headers/OSPermission.h + + ER0tEZTvaPjBUG+nK+Z32RA06vI= + + Headers/OneSignalNotificationSettings.h + + O0VW5U5ovJN56cmcc4RLErRjhCw= + + Headers/OneSignalNotifications.h + + jnNq248j4u8dwv+wvoMVf33zRUE= + + Info.plist + + D9ZSHHQwzVeVf05X8ov7stn1yYE= + + Modules/module.modulemap + + Nb2bgnv0pUFVZ6tSM+07dhyQT/I= + + + files2 + + Headers/OSNotification+OneSignal.h + + hash2 + + TjmMlUT2NwavUY9vmI1J/jKWNitH3BmnRhTFbxi/hFI= + + + Headers/OSNotificationsManager.h + + hash2 + + CHxsWa2GDl8vSRZDosajd+vfiMz4gLPCWFEnE+V3hh4= + + + Headers/OSPermission.h + + hash2 + + bVVspWwiLLui0t7V8zeUrgo3z76K4Tf39OMg1AyU8MY= + + + Headers/OneSignalNotificationSettings.h + + hash2 + + rJtIGSr7QHhlu2N4Spuo1ZjGKzAgOQAf+MN+wMIMCmc= + + + Headers/OneSignalNotifications.h + + hash2 + + F6ZjobsvISP/IwebMBdCy85sa8aUy9k8KerAPzHCnpk= + + + Modules/module.modulemap + + hash2 + + /PUDV/RfFn4t5ClXw6FR9EVxf2LUlWBf6oRKtqsv75w= + + + + rules + + ^.* + + ^.*\.lproj/ + + optional + + weight + 1000 + + ^.*\.lproj/locversion.plist$ + + omit + + weight + 1100 + + ^Base\.lproj/ + + weight + 1010 + + ^version.plist$ + + + rules2 + + .*\.dSYM($|/) + + weight + 11 + + ^(.*/)?\.DS_Store$ + + omit + + weight + 2000 + + ^.* + + ^.*\.lproj/ + + optional + + weight + 1000 + + ^.*\.lproj/locversion.plist$ + + omit + + weight + 1100 + + ^Base\.lproj/ + + weight + 1010 + + ^Info\.plist$ + + omit + + weight + 20 + + ^PkgInfo$ + + omit + + weight + 20 + + ^embedded\.provisionprofile$ + + weight + 20 + + ^version\.plist$ + + weight + 20 + + + + diff --git a/iOS_SDK/OneSignalSDK/OneSignal_OSCore/OneSignalOSCore.xcframework.zip b/iOS_SDK/OneSignalSDK/OneSignal_OSCore/OneSignalOSCore.xcframework.zip new file mode 100644 index 000000000..6b7f49193 Binary files /dev/null and b/iOS_SDK/OneSignalSDK/OneSignal_OSCore/OneSignalOSCore.xcframework.zip differ diff --git a/iOS_SDK/OneSignalSDK/OneSignal_OSCore/OneSignalOSCore.xcframework/Info.plist b/iOS_SDK/OneSignalSDK/OneSignal_OSCore/OneSignalOSCore.xcframework/Info.plist new file mode 100644 index 000000000..98346d7f9 --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignal_OSCore/OneSignalOSCore.xcframework/Info.plist @@ -0,0 +1,55 @@ + + + + + AvailableLibraries + + + LibraryIdentifier + ios-arm64_x86_64-simulator + LibraryPath + OneSignalOSCore.framework + SupportedArchitectures + + arm64 + x86_64 + + SupportedPlatform + ios + SupportedPlatformVariant + simulator + + + LibraryIdentifier + ios-arm64 + LibraryPath + OneSignalOSCore.framework + SupportedArchitectures + + arm64 + + SupportedPlatform + ios + + + LibraryIdentifier + ios-arm64_x86_64-maccatalyst + LibraryPath + OneSignalOSCore.framework + SupportedArchitectures + + arm64 + x86_64 + + SupportedPlatform + ios + SupportedPlatformVariant + maccatalyst + + + CFBundlePackageType + XFWK + XCFrameworkFormatVersion + 1.0 + + diff --git a/iOS_SDK/OneSignalSDK/OneSignal_OSCore/OneSignalOSCore.xcframework/ios-arm64/OneSignalOSCore.framework/Headers/OneSignalOSCore-Swift.h b/iOS_SDK/OneSignalSDK/OneSignal_OSCore/OneSignalOSCore.xcframework/ios-arm64/OneSignalOSCore.framework/Headers/OneSignalOSCore-Swift.h new file mode 100644 index 000000000..af1508feb --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignal_OSCore/OneSignalOSCore.xcframework/ios-arm64/OneSignalOSCore.framework/Headers/OneSignalOSCore-Swift.h @@ -0,0 +1,324 @@ +#if 0 +#elif defined(__arm64__) && __arm64__ +// Generated by Apple Swift version 5.7.1 (swiftlang-5.7.1.135.3 clang-1400.0.29.51) +#ifndef ONESIGNALOSCORE_SWIFT_H +#define ONESIGNALOSCORE_SWIFT_H +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wgcc-compat" + +#if !defined(__has_include) +# define __has_include(x) 0 +#endif +#if !defined(__has_attribute) +# define __has_attribute(x) 0 +#endif +#if !defined(__has_feature) +# define __has_feature(x) 0 +#endif +#if !defined(__has_warning) +# define __has_warning(x) 0 +#endif + +#if __has_include() +# include +#endif + +#pragma clang diagnostic ignored "-Wduplicate-method-match" +#pragma clang diagnostic ignored "-Wauto-import" +#if defined(__OBJC__) +#include +#endif +#if defined(__cplusplus) +#include +#include +#include +#else +#include +#include +#include +#endif + +#if !defined(SWIFT_TYPEDEFS) +# define SWIFT_TYPEDEFS 1 +# if __has_include() +# include +# elif !defined(__cplusplus) +typedef uint_least16_t char16_t; +typedef uint_least32_t char32_t; +# endif +typedef float swift_float2 __attribute__((__ext_vector_type__(2))); +typedef float swift_float3 __attribute__((__ext_vector_type__(3))); +typedef float swift_float4 __attribute__((__ext_vector_type__(4))); +typedef double swift_double2 __attribute__((__ext_vector_type__(2))); +typedef double swift_double3 __attribute__((__ext_vector_type__(3))); +typedef double swift_double4 __attribute__((__ext_vector_type__(4))); +typedef int swift_int2 __attribute__((__ext_vector_type__(2))); +typedef int swift_int3 __attribute__((__ext_vector_type__(3))); +typedef int swift_int4 __attribute__((__ext_vector_type__(4))); +typedef unsigned int swift_uint2 __attribute__((__ext_vector_type__(2))); +typedef unsigned int swift_uint3 __attribute__((__ext_vector_type__(3))); +typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4))); +#endif + +#if !defined(SWIFT_PASTE) +# define SWIFT_PASTE_HELPER(x, y) x##y +# define SWIFT_PASTE(x, y) SWIFT_PASTE_HELPER(x, y) +#endif +#if !defined(SWIFT_METATYPE) +# define SWIFT_METATYPE(X) Class +#endif +#if !defined(SWIFT_CLASS_PROPERTY) +# if __has_feature(objc_class_property) +# define SWIFT_CLASS_PROPERTY(...) __VA_ARGS__ +# else +# define SWIFT_CLASS_PROPERTY(...) +# endif +#endif + +#if __has_attribute(objc_runtime_name) +# define SWIFT_RUNTIME_NAME(X) __attribute__((objc_runtime_name(X))) +#else +# define SWIFT_RUNTIME_NAME(X) +#endif +#if __has_attribute(swift_name) +# define SWIFT_COMPILE_NAME(X) __attribute__((swift_name(X))) +#else +# define SWIFT_COMPILE_NAME(X) +#endif +#if __has_attribute(objc_method_family) +# define SWIFT_METHOD_FAMILY(X) __attribute__((objc_method_family(X))) +#else +# define SWIFT_METHOD_FAMILY(X) +#endif +#if __has_attribute(noescape) +# define SWIFT_NOESCAPE __attribute__((noescape)) +#else +# define SWIFT_NOESCAPE +#endif +#if __has_attribute(ns_consumed) +# define SWIFT_RELEASES_ARGUMENT __attribute__((ns_consumed)) +#else +# define SWIFT_RELEASES_ARGUMENT +#endif +#if __has_attribute(warn_unused_result) +# define SWIFT_WARN_UNUSED_RESULT __attribute__((warn_unused_result)) +#else +# define SWIFT_WARN_UNUSED_RESULT +#endif +#if __has_attribute(noreturn) +# define SWIFT_NORETURN __attribute__((noreturn)) +#else +# define SWIFT_NORETURN +#endif +#if !defined(SWIFT_CLASS_EXTRA) +# define SWIFT_CLASS_EXTRA +#endif +#if !defined(SWIFT_PROTOCOL_EXTRA) +# define SWIFT_PROTOCOL_EXTRA +#endif +#if !defined(SWIFT_ENUM_EXTRA) +# define SWIFT_ENUM_EXTRA +#endif +#if !defined(SWIFT_CLASS) +# if __has_attribute(objc_subclassing_restricted) +# define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_CLASS_EXTRA +# define SWIFT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA +# else +# define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA +# define SWIFT_CLASS_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA +# endif +#endif +#if !defined(SWIFT_RESILIENT_CLASS) +# if __has_attribute(objc_class_stub) +# define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME) __attribute__((objc_class_stub)) +# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_class_stub)) SWIFT_CLASS_NAMED(SWIFT_NAME) +# else +# define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME) +# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) SWIFT_CLASS_NAMED(SWIFT_NAME) +# endif +#endif + +#if !defined(SWIFT_PROTOCOL) +# define SWIFT_PROTOCOL(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA +# define SWIFT_PROTOCOL_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA +#endif + +#if !defined(SWIFT_EXTENSION) +# define SWIFT_EXTENSION(M) SWIFT_PASTE(M##_Swift_, __LINE__) +#endif + +#if !defined(OBJC_DESIGNATED_INITIALIZER) +# if __has_attribute(objc_designated_initializer) +# define OBJC_DESIGNATED_INITIALIZER __attribute__((objc_designated_initializer)) +# else +# define OBJC_DESIGNATED_INITIALIZER +# endif +#endif +#if !defined(SWIFT_ENUM_ATTR) +# if defined(__has_attribute) && __has_attribute(enum_extensibility) +# define SWIFT_ENUM_ATTR(_extensibility) __attribute__((enum_extensibility(_extensibility))) +# else +# define SWIFT_ENUM_ATTR(_extensibility) +# endif +#endif +#if !defined(SWIFT_ENUM) +# define SWIFT_ENUM(_type, _name, _extensibility) enum _name : _type _name; enum SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type +# if __has_feature(generalized_swift_name) +# define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) enum _name : _type _name SWIFT_COMPILE_NAME(SWIFT_NAME); enum SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type +# else +# define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) SWIFT_ENUM(_type, _name, _extensibility) +# endif +#endif +#if !defined(SWIFT_UNAVAILABLE) +# define SWIFT_UNAVAILABLE __attribute__((unavailable)) +#endif +#if !defined(SWIFT_UNAVAILABLE_MSG) +# define SWIFT_UNAVAILABLE_MSG(msg) __attribute__((unavailable(msg))) +#endif +#if !defined(SWIFT_AVAILABILITY) +# define SWIFT_AVAILABILITY(plat, ...) __attribute__((availability(plat, __VA_ARGS__))) +#endif +#if !defined(SWIFT_WEAK_IMPORT) +# define SWIFT_WEAK_IMPORT __attribute__((weak_import)) +#endif +#if !defined(SWIFT_DEPRECATED) +# define SWIFT_DEPRECATED __attribute__((deprecated)) +#endif +#if !defined(SWIFT_DEPRECATED_MSG) +# define SWIFT_DEPRECATED_MSG(...) __attribute__((deprecated(__VA_ARGS__))) +#endif +#if __has_feature(attribute_diagnose_if_objc) +# define SWIFT_DEPRECATED_OBJC(Msg) __attribute__((diagnose_if(1, Msg, "warning"))) +#else +# define SWIFT_DEPRECATED_OBJC(Msg) SWIFT_DEPRECATED_MSG(Msg) +#endif +#if defined(__OBJC__) +#if !defined(IBSegueAction) +# define IBSegueAction +#endif +#endif +#if !defined(SWIFT_EXTERN) +# if defined(__cplusplus) +# define SWIFT_EXTERN extern "C" +# else +# define SWIFT_EXTERN extern +# endif +#endif +#if !defined(SWIFT_CALL) +# define SWIFT_CALL __attribute__((swiftcall)) +#endif +#if defined(__cplusplus) +#if !defined(SWIFT_NOEXCEPT) +# define SWIFT_NOEXCEPT noexcept +#endif +#else +#if !defined(SWIFT_NOEXCEPT) +# define SWIFT_NOEXCEPT +#endif +#endif +#if defined(__cplusplus) +#if !defined(SWIFT_CXX_INT_DEFINED) +#define SWIFT_CXX_INT_DEFINED +namespace swift { +using Int = ptrdiff_t; +using UInt = size_t; +} +#endif +#endif +#if defined(__OBJC__) +#if __has_feature(modules) +#if __has_warning("-Watimport-in-framework-header") +#pragma clang diagnostic ignored "-Watimport-in-framework-header" +#endif +@import Foundation; +@import ObjectiveC; +#endif + +#endif +#pragma clang diagnostic ignored "-Wproperty-attribute-mismatch" +#pragma clang diagnostic ignored "-Wduplicate-method-arg" +#if __has_warning("-Wpragma-clang-attribute") +# pragma clang diagnostic ignored "-Wpragma-clang-attribute" +#endif +#pragma clang diagnostic ignored "-Wunknown-pragmas" +#pragma clang diagnostic ignored "-Wnullability" +#pragma clang diagnostic ignored "-Wdollar-in-identifier-extension" + +#if __has_attribute(external_source_symbol) +# pragma push_macro("any") +# undef any +# pragma clang attribute push(__attribute__((external_source_symbol(language="Swift", defined_in="OneSignalOSCore",generated_declaration))), apply_to=any(function,enum,objc_interface,objc_category,objc_protocol)) +# pragma pop_macro("any") +#endif + +#if defined(__OBJC__) +@class NSString; + +SWIFT_PROTOCOL("_TtP15OneSignalOSCore23OSBackgroundTaskHandler_") +@protocol OSBackgroundTaskHandler +- (void)beginBackgroundTask:(NSString * _Nonnull)taskIdentifier; +- (void)endBackgroundTask:(NSString * _Nonnull)taskIdentifier; +- (void)setTaskInvalid:(NSString * _Nonnull)taskIdentifier; +@end + + +SWIFT_CLASS("_TtC15OneSignalOSCore23OSBackgroundTaskManager") +@interface OSBackgroundTaskManager : NSObject +SWIFT_CLASS_PROPERTY(@property (nonatomic, class, strong) id _Nullable taskHandler;) ++ (id _Nullable)taskHandler SWIFT_WARN_UNUSED_RESULT; ++ (void)setTaskHandler:(id _Nullable)value; ++ (void)beginBackgroundTask:(NSString * _Nonnull)taskIdentifier; ++ (void)endBackgroundTask:(NSString * _Nonnull)taskIdentifier; ++ (void)setTaskInvalid:(NSString * _Nonnull)taskIdentifier; +- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER; +@end + +@class NSCoder; + +SWIFT_CLASS("_TtC15OneSignalOSCore7OSDelta") +@interface OSDelta : NSObject +@property (nonatomic, readonly, copy) NSString * _Nonnull description; +- (void)encodeWithCoder:(NSCoder * _Nonnull)coder; +- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)coder OBJC_DESIGNATED_INITIALIZER; +- (nonnull instancetype)init SWIFT_UNAVAILABLE; ++ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); +@end + + +SWIFT_CLASS("_TtC15OneSignalOSCore7OSModel") +@interface OSModel : NSObject +- (void)encodeWithCoder:(NSCoder * _Nonnull)coder; +- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)coder OBJC_DESIGNATED_INITIALIZER; +- (nonnull instancetype)init SWIFT_UNAVAILABLE; ++ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); +@end + + +SWIFT_CLASS("_TtC15OneSignalOSCore18OSModelChangedArgs") +@interface OSModelChangedArgs : NSObject +@property (nonatomic, readonly, copy) NSString * _Nonnull description; +- (nonnull instancetype)init SWIFT_UNAVAILABLE; ++ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); +@end + + +/// The OSOperationRepo is a static singleton. +/// OSDeltas are enqueued when model store observers observe changes to their models, and sorted to their appropriate executors. +SWIFT_CLASS("_TtC15OneSignalOSCore15OSOperationRepo") +@interface OSOperationRepo : NSObject +- (void)flushDeltaQueueInBackground:(BOOL)inBackground; +- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER; +@end + +#endif +#if defined(__cplusplus) +#endif +#if __has_attribute(external_source_symbol) +# pragma clang attribute pop +#endif +#pragma clang diagnostic pop +#endif + +#else +#error unsupported Swift architecture +#endif diff --git a/iOS_SDK/OneSignalSDK/OneSignal_OSCore/OneSignalOSCore.xcframework/ios-arm64/OneSignalOSCore.framework/Headers/OneSignalOSCore.h b/iOS_SDK/OneSignalSDK/OneSignal_OSCore/OneSignalOSCore.xcframework/ios-arm64/OneSignalOSCore.framework/Headers/OneSignalOSCore.h new file mode 100644 index 000000000..e1e4858b7 --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignal_OSCore/OneSignalOSCore.xcframework/ios-arm64/OneSignalOSCore.framework/Headers/OneSignalOSCore.h @@ -0,0 +1,34 @@ +/* + Modified MIT License + + Copyright 2022 OneSignal + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + 1. The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + 2. All copies of substantial portions of the Software may only be used in connection + with services provided by OneSignal. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + */ + +#import + +//! Project version number for OneSignalOSCore. +FOUNDATION_EXPORT double OneSignalOSCoreVersionNumber; + +//! Project version string for OneSignalOSCore. +FOUNDATION_EXPORT const unsigned char OneSignalOSCoreVersionString[]; diff --git a/iOS_SDK/OneSignalSDK/OneSignal_OSCore/OneSignalOSCore.xcframework/ios-arm64/OneSignalOSCore.framework/Info.plist b/iOS_SDK/OneSignalSDK/OneSignal_OSCore/OneSignalOSCore.xcframework/ios-arm64/OneSignalOSCore.framework/Info.plist new file mode 100644 index 000000000..c9e920927 Binary files /dev/null and b/iOS_SDK/OneSignalSDK/OneSignal_OSCore/OneSignalOSCore.xcframework/ios-arm64/OneSignalOSCore.framework/Info.plist differ diff --git a/iOS_SDK/OneSignalSDK/OneSignal_OSCore/OneSignalOSCore.xcframework/ios-arm64/OneSignalOSCore.framework/Modules/OneSignalOSCore.swiftmodule/arm64-apple-ios.abi.json b/iOS_SDK/OneSignalSDK/OneSignal_OSCore/OneSignalOSCore.xcframework/ios-arm64/OneSignalOSCore.framework/Modules/OneSignalOSCore.swiftmodule/arm64-apple-ios.abi.json new file mode 100644 index 000000000..6cf802ba3 --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignal_OSCore/OneSignalOSCore.xcframework/ios-arm64/OneSignalOSCore.framework/Modules/OneSignalOSCore.swiftmodule/arm64-apple-ios.abi.json @@ -0,0 +1,3662 @@ +{ + "ABIRoot": { + "kind": "Root", + "name": "TopLevel", + "printedName": "TopLevel", + "children": [ + { + "kind": "Import", + "name": "Foundation", + "printedName": "Foundation", + "declKind": "Import", + "moduleName": "OneSignalOSCore", + "declAttributes": [ + "RawDocComment" + ] + }, + { + "kind": "Import", + "name": "OneSignalCore", + "printedName": "OneSignalCore", + "declKind": "Import", + "moduleName": "OneSignalOSCore" + }, + { + "kind": "TypeDecl", + "name": "OSOperationRepo", + "printedName": "OSOperationRepo", + "children": [ + { + "kind": "Var", + "name": "sharedInstance", + "printedName": "sharedInstance", + "children": [ + { + "kind": "TypeNominal", + "name": "OSOperationRepo", + "printedName": "OneSignalOSCore.OSOperationRepo", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSOperationRepo" + } + ], + "declKind": "Var", + "usr": "s:15OneSignalOSCore15OSOperationRepoC14sharedInstanceACvpZ", + "mangledName": "$s15OneSignalOSCore15OSOperationRepoC14sharedInstanceACvpZ", + "moduleName": "OneSignalOSCore", + "static": true, + "declAttributes": [ + "HasInitialValue", + "Final", + "HasStorage", + "AccessControl" + ], + "isLet": true, + "hasStorage": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "OSOperationRepo", + "printedName": "OneSignalOSCore.OSOperationRepo", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSOperationRepo" + } + ], + "declKind": "Accessor", + "usr": "s:15OneSignalOSCore15OSOperationRepoC14sharedInstanceACvgZ", + "mangledName": "$s15OneSignalOSCore15OSOperationRepoC14sharedInstanceACvgZ", + "moduleName": "OneSignalOSCore", + "static": true, + "implicit": true, + "declAttributes": [ + "Final" + ], + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "paused", + "printedName": "paused", + "children": [ + { + "kind": "TypeNominal", + "name": "Bool", + "printedName": "Swift.Bool", + "usr": "s:Sb" + } + ], + "declKind": "Var", + "usr": "s:15OneSignalOSCore15OSOperationRepoC6pausedSbvp", + "mangledName": "$s15OneSignalOSCore15OSOperationRepoC6pausedSbvp", + "moduleName": "OneSignalOSCore", + "declAttributes": [ + "HasInitialValue", + "HasStorage", + "AccessControl" + ], + "hasStorage": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "Bool", + "printedName": "Swift.Bool", + "usr": "s:Sb" + } + ], + "declKind": "Accessor", + "usr": "s:15OneSignalOSCore15OSOperationRepoC6pausedSbvg", + "mangledName": "$s15OneSignalOSCore15OSOperationRepoC6pausedSbvg", + "moduleName": "OneSignalOSCore", + "implicit": true, + "accessorKind": "get" + }, + { + "kind": "Accessor", + "name": "Set", + "printedName": "Set()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "Bool", + "printedName": "Swift.Bool", + "usr": "s:Sb" + } + ], + "declKind": "Accessor", + "usr": "s:15OneSignalOSCore15OSOperationRepoC6pausedSbvs", + "mangledName": "$s15OneSignalOSCore15OSOperationRepoC6pausedSbvs", + "moduleName": "OneSignalOSCore", + "implicit": true, + "accessorKind": "set" + }, + { + "kind": "Accessor", + "name": "Modify", + "printedName": "Modify()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + } + ], + "declKind": "Accessor", + "usr": "s:15OneSignalOSCore15OSOperationRepoC6pausedSbvM", + "mangledName": "$s15OneSignalOSCore15OSOperationRepoC6pausedSbvM", + "moduleName": "OneSignalOSCore", + "implicit": true, + "accessorKind": "_modify" + } + ] + }, + { + "kind": "Function", + "name": "start", + "printedName": "start()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + } + ], + "declKind": "Func", + "usr": "s:15OneSignalOSCore15OSOperationRepoC5startyyF", + "mangledName": "$s15OneSignalOSCore15OSOperationRepoC5startyyF", + "moduleName": "OneSignalOSCore", + "declAttributes": [ + "AccessControl", + "RawDocComment" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "addExecutor", + "printedName": "addExecutor(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "OSOperationExecutor", + "printedName": "OneSignalOSCore.OSOperationExecutor", + "usr": "s:15OneSignalOSCore19OSOperationExecutorP" + } + ], + "declKind": "Func", + "usr": "s:15OneSignalOSCore15OSOperationRepoC11addExecutoryyAA0dG0_pF", + "mangledName": "$s15OneSignalOSCore15OSOperationRepoC11addExecutoryyAA0dG0_pF", + "moduleName": "OneSignalOSCore", + "declAttributes": [ + "AccessControl", + "RawDocComment" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "flushDeltaQueue", + "printedName": "flushDeltaQueue(inBackground:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "Bool", + "printedName": "Swift.Bool", + "hasDefaultArg": true, + "usr": "s:Sb" + } + ], + "declKind": "Func", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSOperationRepo(im)flushDeltaQueueInBackground:", + "mangledName": "$s15OneSignalOSCore15OSOperationRepoC15flushDeltaQueue12inBackgroundySb_tF", + "moduleName": "OneSignalOSCore", + "objc_name": "flushDeltaQueueInBackground:", + "declAttributes": [ + "AccessControl", + "ObjC" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Constructor", + "name": "init", + "printedName": "init()", + "children": [ + { + "kind": "TypeNominal", + "name": "OSOperationRepo", + "printedName": "OneSignalOSCore.OSOperationRepo", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSOperationRepo" + } + ], + "declKind": "Constructor", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSOperationRepo(im)init", + "mangledName": "$s15OneSignalOSCore15OSOperationRepoCACycfc", + "moduleName": "OneSignalOSCore", + "overriding": true, + "implicit": true, + "objc_name": "init", + "declAttributes": [ + "Dynamic", + "ObjC", + "Override" + ], + "init_kind": "Designated" + } + ], + "declKind": "Class", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSOperationRepo", + "mangledName": "$s15OneSignalOSCore15OSOperationRepoC", + "moduleName": "OneSignalOSCore", + "declAttributes": [ + "AccessControl", + "RawDocComment", + "ObjC" + ], + "superclassUsr": "c:objc(cs)NSObject", + "inheritsConvenienceInitializers": true, + "superclassNames": [ + "ObjectiveC.NSObject" + ], + "conformances": [ + { + "kind": "Conformance", + "name": "Equatable", + "printedName": "Equatable", + "usr": "s:SQ", + "mangledName": "$sSQ" + }, + { + "kind": "Conformance", + "name": "Hashable", + "printedName": "Hashable", + "usr": "s:SH", + "mangledName": "$sSH" + }, + { + "kind": "Conformance", + "name": "CVarArg", + "printedName": "CVarArg", + "usr": "s:s7CVarArgP", + "mangledName": "$ss7CVarArgP" + }, + { + "kind": "Conformance", + "name": "_KeyValueCodingAndObservingPublishing", + "printedName": "_KeyValueCodingAndObservingPublishing", + "usr": "s:10Foundation37_KeyValueCodingAndObservingPublishingP", + "mangledName": "$s10Foundation37_KeyValueCodingAndObservingPublishingP" + }, + { + "kind": "Conformance", + "name": "_KeyValueCodingAndObserving", + "printedName": "_KeyValueCodingAndObserving", + "usr": "s:10Foundation27_KeyValueCodingAndObservingP", + "mangledName": "$s10Foundation27_KeyValueCodingAndObservingP" + }, + { + "kind": "Conformance", + "name": "CustomStringConvertible", + "printedName": "CustomStringConvertible", + "usr": "s:s23CustomStringConvertibleP", + "mangledName": "$ss23CustomStringConvertibleP" + }, + { + "kind": "Conformance", + "name": "CustomDebugStringConvertible", + "printedName": "CustomDebugStringConvertible", + "usr": "s:s28CustomDebugStringConvertibleP", + "mangledName": "$ss28CustomDebugStringConvertibleP" + } + ] + }, + { + "kind": "Import", + "name": "Foundation", + "printedName": "Foundation", + "declKind": "Import", + "moduleName": "OneSignalOSCore", + "declAttributes": [ + "RawDocComment" + ] + }, + { + "kind": "Import", + "name": "OneSignalCore", + "printedName": "OneSignalCore", + "declKind": "Import", + "moduleName": "OneSignalOSCore" + }, + { + "kind": "TypeDecl", + "name": "OSEventProducer", + "printedName": "OSEventProducer", + "children": [ + { + "kind": "Function", + "name": "subscribe", + "printedName": "subscribe(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "GenericTypeParam", + "printedName": "τ_0_0" + } + ], + "declKind": "Func", + "usr": "s:15OneSignalOSCore15OSEventProducerC9subscribeyyxF", + "mangledName": "$s15OneSignalOSCore15OSEventProducerC9subscribeyyxF", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0>", + "sugared_genericSig": "", + "declAttributes": [ + "AccessControl" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "unsubscribe", + "printedName": "unsubscribe(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "GenericTypeParam", + "printedName": "τ_0_0" + } + ], + "declKind": "Func", + "usr": "s:15OneSignalOSCore15OSEventProducerC11unsubscribeyyxF", + "mangledName": "$s15OneSignalOSCore15OSEventProducerC11unsubscribeyyxF", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0>", + "sugared_genericSig": "", + "declAttributes": [ + "AccessControl" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "fire", + "printedName": "fire(callback:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeFunc", + "name": "Function", + "printedName": "(τ_0_0) -> ()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "GenericTypeParam", + "printedName": "τ_0_0" + } + ], + "typeAttributes": [ + "noescape" + ] + } + ], + "declKind": "Func", + "usr": "s:15OneSignalOSCore15OSEventProducerC4fire8callbackyyxXE_tF", + "mangledName": "$s15OneSignalOSCore15OSEventProducerC4fire8callbackyyxXE_tF", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0>", + "sugared_genericSig": "", + "declAttributes": [ + "AccessControl" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Constructor", + "name": "init", + "printedName": "init()", + "children": [ + { + "kind": "TypeNominal", + "name": "OSEventProducer", + "printedName": "OneSignalOSCore.OSEventProducer<τ_0_0>", + "children": [ + { + "kind": "TypeNominal", + "name": "GenericTypeParam", + "printedName": "τ_0_0" + } + ], + "usr": "s:15OneSignalOSCore15OSEventProducerC" + } + ], + "declKind": "Constructor", + "usr": "s:15OneSignalOSCore15OSEventProducerCACyxGycfc", + "mangledName": "$s15OneSignalOSCore15OSEventProducerCACyxGycfc", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0>", + "sugared_genericSig": "", + "overriding": true, + "implicit": true, + "objc_name": "init", + "declAttributes": [ + "Dynamic", + "ObjC", + "Override" + ], + "init_kind": "Designated" + } + ], + "declKind": "Class", + "usr": "s:15OneSignalOSCore15OSEventProducerC", + "mangledName": "$s15OneSignalOSCore15OSEventProducerC", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0>", + "sugared_genericSig": "", + "declAttributes": [ + "AccessControl" + ], + "superclassUsr": "c:objc(cs)NSObject", + "inheritsConvenienceInitializers": true, + "superclassNames": [ + "ObjectiveC.NSObject" + ], + "conformances": [ + { + "kind": "Conformance", + "name": "Equatable", + "printedName": "Equatable", + "usr": "s:SQ", + "mangledName": "$sSQ" + }, + { + "kind": "Conformance", + "name": "Hashable", + "printedName": "Hashable", + "usr": "s:SH", + "mangledName": "$sSH" + }, + { + "kind": "Conformance", + "name": "CVarArg", + "printedName": "CVarArg", + "usr": "s:s7CVarArgP", + "mangledName": "$ss7CVarArgP" + }, + { + "kind": "Conformance", + "name": "_KeyValueCodingAndObservingPublishing", + "printedName": "_KeyValueCodingAndObservingPublishing", + "usr": "s:10Foundation37_KeyValueCodingAndObservingPublishingP", + "mangledName": "$s10Foundation37_KeyValueCodingAndObservingPublishingP" + }, + { + "kind": "Conformance", + "name": "_KeyValueCodingAndObserving", + "printedName": "_KeyValueCodingAndObserving", + "usr": "s:10Foundation27_KeyValueCodingAndObservingP", + "mangledName": "$s10Foundation27_KeyValueCodingAndObservingP" + }, + { + "kind": "Conformance", + "name": "CustomStringConvertible", + "printedName": "CustomStringConvertible", + "usr": "s:s23CustomStringConvertibleP", + "mangledName": "$ss23CustomStringConvertibleP" + }, + { + "kind": "Conformance", + "name": "CustomDebugStringConvertible", + "printedName": "CustomDebugStringConvertible", + "usr": "s:s28CustomDebugStringConvertibleP", + "mangledName": "$ss28CustomDebugStringConvertibleP" + } + ] + }, + { + "kind": "Import", + "name": "OneSignalCore", + "printedName": "OneSignalCore", + "declKind": "Import", + "moduleName": "OneSignalOSCore", + "declAttributes": [ + "RawDocComment" + ] + }, + { + "kind": "TypeDecl", + "name": "OSModelStore", + "printedName": "OSModelStore", + "children": [ + { + "kind": "Constructor", + "name": "init", + "printedName": "init(changeSubscription:storeKey:)", + "children": [ + { + "kind": "TypeNominal", + "name": "OSModelStore", + "printedName": "OneSignalOSCore.OSModelStore<τ_0_0>", + "children": [ + { + "kind": "TypeNominal", + "name": "GenericTypeParam", + "printedName": "τ_0_0" + } + ], + "usr": "s:15OneSignalOSCore12OSModelStoreC" + }, + { + "kind": "TypeNominal", + "name": "OSEventProducer", + "printedName": "OneSignalOSCore.OSEventProducer", + "children": [ + { + "kind": "TypeNominal", + "name": "OSModelStoreChangedHandler", + "printedName": "OneSignalOSCore.OSModelStoreChangedHandler", + "usr": "s:15OneSignalOSCore26OSModelStoreChangedHandlerP" + } + ], + "usr": "s:15OneSignalOSCore15OSEventProducerC" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Constructor", + "usr": "s:15OneSignalOSCore12OSModelStoreC18changeSubscription8storeKeyACyxGAA15OSEventProducerCyAA0dE14ChangedHandler_pG_SStcfc", + "mangledName": "$s15OneSignalOSCore12OSModelStoreC18changeSubscription8storeKeyACyxGAA15OSEventProducerCyAA0dE14ChangedHandler_pG_SStcfc", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalOSCore.OSModel>", + "sugared_genericSig": "", + "declAttributes": [ + "AccessControl" + ], + "init_kind": "Designated" + }, + { + "kind": "Function", + "name": "registerAsUserObserver", + "printedName": "registerAsUserObserver()", + "children": [ + { + "kind": "TypeNominal", + "name": "OSModelStore", + "printedName": "OneSignalOSCore.OSModelStore<τ_0_0>", + "children": [ + { + "kind": "TypeNominal", + "name": "GenericTypeParam", + "printedName": "τ_0_0" + } + ], + "usr": "s:15OneSignalOSCore12OSModelStoreC" + } + ], + "declKind": "Func", + "usr": "s:15OneSignalOSCore12OSModelStoreC22registerAsUserObserverACyxGyF", + "mangledName": "$s15OneSignalOSCore12OSModelStoreC22registerAsUserObserverACyxGyF", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalOSCore.OSModel>", + "sugared_genericSig": "", + "declAttributes": [ + "AccessControl" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "getModel", + "printedName": "getModel(key:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "τ_0_0?", + "children": [ + { + "kind": "TypeNominal", + "name": "GenericTypeParam", + "printedName": "τ_0_0" + } + ], + "usr": "s:Sq" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Func", + "usr": "s:15OneSignalOSCore12OSModelStoreC8getModel3keyxSgSS_tF", + "mangledName": "$s15OneSignalOSCore12OSModelStoreC8getModel3keyxSgSS_tF", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalOSCore.OSModel>", + "sugared_genericSig": "", + "declAttributes": [ + "AccessControl", + "RawDocComment" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "getModel", + "printedName": "getModel(modelId:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "τ_0_0?", + "children": [ + { + "kind": "TypeNominal", + "name": "GenericTypeParam", + "printedName": "τ_0_0" + } + ], + "usr": "s:Sq" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Func", + "usr": "s:15OneSignalOSCore12OSModelStoreC8getModel7modelIdxSgSS_tF", + "mangledName": "$s15OneSignalOSCore12OSModelStoreC8getModel7modelIdxSgSS_tF", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalOSCore.OSModel>", + "sugared_genericSig": "", + "declAttributes": [ + "AccessControl", + "RawDocComment" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "getModels", + "printedName": "getModels()", + "children": [ + { + "kind": "TypeNominal", + "name": "Dictionary", + "printedName": "[Swift.String : τ_0_0]", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + }, + { + "kind": "TypeNominal", + "name": "GenericTypeParam", + "printedName": "τ_0_0" + } + ], + "usr": "s:SD" + } + ], + "declKind": "Func", + "usr": "s:15OneSignalOSCore12OSModelStoreC9getModelsSDySSxGyF", + "mangledName": "$s15OneSignalOSCore12OSModelStoreC9getModelsSDySSxGyF", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalOSCore.OSModel>", + "sugared_genericSig": "", + "declAttributes": [ + "AccessControl" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "add", + "printedName": "add(id:model:hydrating:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + }, + { + "kind": "TypeNominal", + "name": "GenericTypeParam", + "printedName": "τ_0_0" + }, + { + "kind": "TypeNominal", + "name": "Bool", + "printedName": "Swift.Bool", + "usr": "s:Sb" + } + ], + "declKind": "Func", + "usr": "s:15OneSignalOSCore12OSModelStoreC3add2id5model9hydratingySS_xSbtF", + "mangledName": "$s15OneSignalOSCore12OSModelStoreC3add2id5model9hydratingySS_xSbtF", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalOSCore.OSModel>", + "sugared_genericSig": "", + "declAttributes": [ + "AccessControl" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "remove", + "printedName": "remove(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Func", + "usr": "s:15OneSignalOSCore12OSModelStoreC6removeyySSF", + "mangledName": "$s15OneSignalOSCore12OSModelStoreC6removeyySSF", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalOSCore.OSModel>", + "sugared_genericSig": "", + "declAttributes": [ + "AccessControl", + "RawDocComment" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "clearModelsFromStore", + "printedName": "clearModelsFromStore()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + } + ], + "declKind": "Func", + "usr": "s:15OneSignalOSCore12OSModelStoreC015clearModelsFromE0yyF", + "mangledName": "$s15OneSignalOSCore12OSModelStoreC015clearModelsFromE0yyF", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalOSCore.OSModel>", + "sugared_genericSig": "", + "declAttributes": [ + "AccessControl", + "RawDocComment" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Constructor", + "name": "init", + "printedName": "init()", + "children": [ + { + "kind": "TypeNominal", + "name": "OSModelStore", + "printedName": "OneSignalOSCore.OSModelStore<τ_0_0>", + "children": [ + { + "kind": "TypeNominal", + "name": "GenericTypeParam", + "printedName": "τ_0_0" + } + ], + "usr": "s:15OneSignalOSCore12OSModelStoreC" + } + ], + "declKind": "Constructor", + "usr": "s:15OneSignalOSCore12OSModelStoreCACyxGycfc", + "mangledName": "$s15OneSignalOSCore12OSModelStoreCACyxGycfc", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalOSCore.OSModel>", + "sugared_genericSig": "", + "overriding": true, + "implicit": true, + "objc_name": "init", + "declAttributes": [ + "Dynamic", + "ObjC", + "Override" + ], + "init_kind": "Designated" + }, + { + "kind": "Function", + "name": "onModelUpdated", + "printedName": "onModelUpdated(args:hydrating:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "OSModelChangedArgs", + "printedName": "OneSignalOSCore.OSModelChangedArgs", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSModelChangedArgs" + }, + { + "kind": "TypeNominal", + "name": "Bool", + "printedName": "Swift.Bool", + "usr": "s:Sb" + } + ], + "declKind": "Func", + "usr": "s:15OneSignalOSCore12OSModelStoreC14onModelUpdated4args9hydratingyAA0D11ChangedArgsC_SbtF", + "mangledName": "$s15OneSignalOSCore12OSModelStoreC14onModelUpdated4args9hydratingyAA0D11ChangedArgsC_SbtF", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalOSCore.OSModel>", + "sugared_genericSig": "", + "declAttributes": [ + "AccessControl" + ], + "isFromExtension": true, + "funcSelfKind": "NonMutating" + } + ], + "declKind": "Class", + "usr": "s:15OneSignalOSCore12OSModelStoreC", + "mangledName": "$s15OneSignalOSCore12OSModelStoreC", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalOSCore.OSModel>", + "sugared_genericSig": "", + "isOpen": true, + "declAttributes": [ + "AccessControl" + ], + "superclassUsr": "c:objc(cs)NSObject", + "superclassNames": [ + "ObjectiveC.NSObject" + ], + "conformances": [ + { + "kind": "Conformance", + "name": "OSModelChangedHandler", + "printedName": "OSModelChangedHandler", + "usr": "s:15OneSignalOSCore21OSModelChangedHandlerP", + "mangledName": "$s15OneSignalOSCore21OSModelChangedHandlerP" + }, + { + "kind": "Conformance", + "name": "Equatable", + "printedName": "Equatable", + "usr": "s:SQ", + "mangledName": "$sSQ" + }, + { + "kind": "Conformance", + "name": "Hashable", + "printedName": "Hashable", + "usr": "s:SH", + "mangledName": "$sSH" + }, + { + "kind": "Conformance", + "name": "CVarArg", + "printedName": "CVarArg", + "usr": "s:s7CVarArgP", + "mangledName": "$ss7CVarArgP" + }, + { + "kind": "Conformance", + "name": "_KeyValueCodingAndObservingPublishing", + "printedName": "_KeyValueCodingAndObservingPublishing", + "usr": "s:10Foundation37_KeyValueCodingAndObservingPublishingP", + "mangledName": "$s10Foundation37_KeyValueCodingAndObservingPublishingP" + }, + { + "kind": "Conformance", + "name": "_KeyValueCodingAndObserving", + "printedName": "_KeyValueCodingAndObserving", + "usr": "s:10Foundation27_KeyValueCodingAndObservingP", + "mangledName": "$s10Foundation27_KeyValueCodingAndObservingP" + }, + { + "kind": "Conformance", + "name": "CustomStringConvertible", + "printedName": "CustomStringConvertible", + "usr": "s:s23CustomStringConvertibleP", + "mangledName": "$ss23CustomStringConvertibleP" + }, + { + "kind": "Conformance", + "name": "CustomDebugStringConvertible", + "printedName": "CustomDebugStringConvertible", + "usr": "s:s28CustomDebugStringConvertibleP", + "mangledName": "$ss28CustomDebugStringConvertibleP" + } + ] + }, + { + "kind": "Import", + "name": "Foundation", + "printedName": "Foundation", + "declKind": "Import", + "moduleName": "OneSignalOSCore", + "declAttributes": [ + "RawDocComment" + ] + }, + { + "kind": "TypeDecl", + "name": "OSModel", + "printedName": "OSModel", + "children": [ + { + "kind": "Var", + "name": "modelId", + "printedName": "modelId", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Var", + "usr": "s:15OneSignalOSCore7OSModelC7modelIdSSvp", + "mangledName": "$s15OneSignalOSCore7OSModelC7modelIdSSvp", + "moduleName": "OneSignalOSCore", + "declAttributes": [ + "Final", + "HasStorage", + "AccessControl" + ], + "isLet": true, + "hasStorage": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Accessor", + "usr": "s:15OneSignalOSCore7OSModelC7modelIdSSvg", + "mangledName": "$s15OneSignalOSCore7OSModelC7modelIdSSvg", + "moduleName": "OneSignalOSCore", + "implicit": true, + "declAttributes": [ + "Final" + ], + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "changeNotifier", + "printedName": "changeNotifier", + "children": [ + { + "kind": "TypeNominal", + "name": "OSEventProducer", + "printedName": "OneSignalOSCore.OSEventProducer", + "children": [ + { + "kind": "TypeNominal", + "name": "OSModelChangedHandler", + "printedName": "OneSignalOSCore.OSModelChangedHandler", + "usr": "s:15OneSignalOSCore21OSModelChangedHandlerP" + } + ], + "usr": "s:15OneSignalOSCore15OSEventProducerC" + } + ], + "declKind": "Var", + "usr": "s:15OneSignalOSCore7OSModelC14changeNotifierAA15OSEventProducerCyAA0D14ChangedHandler_pGvp", + "mangledName": "$s15OneSignalOSCore7OSModelC14changeNotifierAA15OSEventProducerCyAA0D14ChangedHandler_pGvp", + "moduleName": "OneSignalOSCore", + "declAttributes": [ + "HasStorage", + "AccessControl" + ], + "hasStorage": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "OSEventProducer", + "printedName": "OneSignalOSCore.OSEventProducer", + "children": [ + { + "kind": "TypeNominal", + "name": "OSModelChangedHandler", + "printedName": "OneSignalOSCore.OSModelChangedHandler", + "usr": "s:15OneSignalOSCore21OSModelChangedHandlerP" + } + ], + "usr": "s:15OneSignalOSCore15OSEventProducerC" + } + ], + "declKind": "Accessor", + "usr": "s:15OneSignalOSCore7OSModelC14changeNotifierAA15OSEventProducerCyAA0D14ChangedHandler_pGvg", + "mangledName": "$s15OneSignalOSCore7OSModelC14changeNotifierAA15OSEventProducerCyAA0D14ChangedHandler_pGvg", + "moduleName": "OneSignalOSCore", + "implicit": true, + "accessorKind": "get" + }, + { + "kind": "Accessor", + "name": "Set", + "printedName": "Set()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "OSEventProducer", + "printedName": "OneSignalOSCore.OSEventProducer", + "children": [ + { + "kind": "TypeNominal", + "name": "OSModelChangedHandler", + "printedName": "OneSignalOSCore.OSModelChangedHandler", + "usr": "s:15OneSignalOSCore21OSModelChangedHandlerP" + } + ], + "usr": "s:15OneSignalOSCore15OSEventProducerC" + } + ], + "declKind": "Accessor", + "usr": "s:15OneSignalOSCore7OSModelC14changeNotifierAA15OSEventProducerCyAA0D14ChangedHandler_pGvs", + "mangledName": "$s15OneSignalOSCore7OSModelC14changeNotifierAA15OSEventProducerCyAA0D14ChangedHandler_pGvs", + "moduleName": "OneSignalOSCore", + "implicit": true, + "accessorKind": "set" + }, + { + "kind": "Accessor", + "name": "Modify", + "printedName": "Modify()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + } + ], + "declKind": "Accessor", + "usr": "s:15OneSignalOSCore7OSModelC14changeNotifierAA15OSEventProducerCyAA0D14ChangedHandler_pGvM", + "mangledName": "$s15OneSignalOSCore7OSModelC14changeNotifierAA15OSEventProducerCyAA0D14ChangedHandler_pGvM", + "moduleName": "OneSignalOSCore", + "implicit": true, + "accessorKind": "_modify" + } + ] + }, + { + "kind": "Constructor", + "name": "init", + "printedName": "init(changeNotifier:)", + "children": [ + { + "kind": "TypeNominal", + "name": "OSModel", + "printedName": "OneSignalOSCore.OSModel", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSModel" + }, + { + "kind": "TypeNominal", + "name": "OSEventProducer", + "printedName": "OneSignalOSCore.OSEventProducer", + "children": [ + { + "kind": "TypeNominal", + "name": "OSModelChangedHandler", + "printedName": "OneSignalOSCore.OSModelChangedHandler", + "usr": "s:15OneSignalOSCore21OSModelChangedHandlerP" + } + ], + "usr": "s:15OneSignalOSCore15OSEventProducerC" + } + ], + "declKind": "Constructor", + "usr": "s:15OneSignalOSCore7OSModelC14changeNotifierAcA15OSEventProducerCyAA0D14ChangedHandler_pG_tcfc", + "mangledName": "$s15OneSignalOSCore7OSModelC14changeNotifierAcA15OSEventProducerCyAA0D14ChangedHandler_pG_tcfc", + "moduleName": "OneSignalOSCore", + "declAttributes": [ + "AccessControl", + "RawDocComment" + ], + "init_kind": "Designated" + }, + { + "kind": "Function", + "name": "encode", + "printedName": "encode(with:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "NSCoder", + "printedName": "Foundation.NSCoder", + "usr": "c:objc(cs)NSCoder" + } + ], + "declKind": "Func", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSModel(im)encodeWithCoder:", + "mangledName": "$s15OneSignalOSCore7OSModelC6encode4withySo7NSCoderC_tF", + "moduleName": "OneSignalOSCore", + "isOpen": true, + "objc_name": "encodeWithCoder:", + "declAttributes": [ + "ObjC", + "AccessControl" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Constructor", + "name": "init", + "printedName": "init(coder:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "OneSignalOSCore.OSModel?", + "children": [ + { + "kind": "TypeNominal", + "name": "OSModel", + "printedName": "OneSignalOSCore.OSModel", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSModel" + } + ], + "usr": "s:Sq" + }, + { + "kind": "TypeNominal", + "name": "NSCoder", + "printedName": "Foundation.NSCoder", + "usr": "c:objc(cs)NSCoder" + } + ], + "declKind": "Constructor", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSModel(im)initWithCoder:", + "mangledName": "$s15OneSignalOSCore7OSModelC5coderACSgSo7NSCoderC_tcfc", + "moduleName": "OneSignalOSCore", + "objc_name": "initWithCoder:", + "declAttributes": [ + "ObjC", + "Required", + "AccessControl" + ], + "init_kind": "Designated" + }, + { + "kind": "Function", + "name": "set", + "printedName": "set(property:newValue:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + }, + { + "kind": "TypeNominal", + "name": "GenericTypeParam", + "printedName": "τ_0_0" + } + ], + "declKind": "Func", + "usr": "s:15OneSignalOSCore7OSModelC3set8property8newValueySS_xtlF", + "mangledName": "$s15OneSignalOSCore7OSModelC3set8property8newValueySS_xtlF", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0>", + "sugared_genericSig": "", + "declAttributes": [ + "AccessControl", + "RawDocComment" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "hydrate", + "printedName": "hydrate(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "Dictionary", + "printedName": "[Swift.String : Any]", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + }, + { + "kind": "TypeNominal", + "name": "ProtocolComposition", + "printedName": "Any" + } + ], + "usr": "s:SD" + } + ], + "declKind": "Func", + "usr": "s:15OneSignalOSCore7OSModelC7hydrateyySDySSypGF", + "mangledName": "$s15OneSignalOSCore7OSModelC7hydrateyySDySSypGF", + "moduleName": "OneSignalOSCore", + "declAttributes": [ + "AccessControl", + "RawDocComment" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "hydrateModel", + "printedName": "hydrateModel(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "Dictionary", + "printedName": "[Swift.String : Any]", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + }, + { + "kind": "TypeNominal", + "name": "ProtocolComposition", + "printedName": "Any" + } + ], + "usr": "s:SD" + } + ], + "declKind": "Func", + "usr": "s:15OneSignalOSCore7OSModelC12hydrateModelyySDySSypGF", + "mangledName": "$s15OneSignalOSCore7OSModelC12hydrateModelyySDySSypGF", + "moduleName": "OneSignalOSCore", + "isOpen": true, + "declAttributes": [ + "AccessControl" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Constructor", + "name": "init", + "printedName": "init()", + "children": [ + { + "kind": "TypeNominal", + "name": "OSModel", + "printedName": "OneSignalOSCore.OSModel", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSModel" + } + ], + "declKind": "Constructor", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSModel(im)init", + "mangledName": "$s15OneSignalOSCore7OSModelCACycfc", + "moduleName": "OneSignalOSCore", + "overriding": true, + "implicit": true, + "objc_name": "init", + "declAttributes": [ + "Dynamic", + "ObjC", + "Override" + ], + "init_kind": "Designated" + } + ], + "declKind": "Class", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSModel", + "mangledName": "$s15OneSignalOSCore7OSModelC", + "moduleName": "OneSignalOSCore", + "isOpen": true, + "declAttributes": [ + "AccessControl", + "ObjC" + ], + "superclassUsr": "c:objc(cs)NSObject", + "superclassNames": [ + "ObjectiveC.NSObject" + ], + "conformances": [ + { + "kind": "Conformance", + "name": "Equatable", + "printedName": "Equatable", + "usr": "s:SQ", + "mangledName": "$sSQ" + }, + { + "kind": "Conformance", + "name": "Hashable", + "printedName": "Hashable", + "usr": "s:SH", + "mangledName": "$sSH" + }, + { + "kind": "Conformance", + "name": "CVarArg", + "printedName": "CVarArg", + "usr": "s:s7CVarArgP", + "mangledName": "$ss7CVarArgP" + }, + { + "kind": "Conformance", + "name": "_KeyValueCodingAndObservingPublishing", + "printedName": "_KeyValueCodingAndObservingPublishing", + "usr": "s:10Foundation37_KeyValueCodingAndObservingPublishingP", + "mangledName": "$s10Foundation37_KeyValueCodingAndObservingPublishingP" + }, + { + "kind": "Conformance", + "name": "_KeyValueCodingAndObserving", + "printedName": "_KeyValueCodingAndObserving", + "usr": "s:10Foundation27_KeyValueCodingAndObservingP", + "mangledName": "$s10Foundation27_KeyValueCodingAndObservingP" + }, + { + "kind": "Conformance", + "name": "CustomStringConvertible", + "printedName": "CustomStringConvertible", + "usr": "s:s23CustomStringConvertibleP", + "mangledName": "$ss23CustomStringConvertibleP" + }, + { + "kind": "Conformance", + "name": "CustomDebugStringConvertible", + "printedName": "CustomDebugStringConvertible", + "usr": "s:s28CustomDebugStringConvertibleP", + "mangledName": "$ss28CustomDebugStringConvertibleP" + } + ] + }, + { + "kind": "Import", + "name": "Foundation", + "printedName": "Foundation", + "declKind": "Import", + "moduleName": "OneSignalOSCore", + "declAttributes": [ + "RawDocComment" + ] + }, + { + "kind": "Import", + "name": "OneSignalCore", + "printedName": "OneSignalCore", + "declKind": "Import", + "moduleName": "OneSignalOSCore" + }, + { + "kind": "TypeDecl", + "name": "OSBackgroundTaskHandler", + "printedName": "OSBackgroundTaskHandler", + "children": [ + { + "kind": "Function", + "name": "beginBackgroundTask", + "printedName": "beginBackgroundTask(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Func", + "usr": "c:@M@OneSignalOSCore@objc(pl)OSBackgroundTaskHandler(im)beginBackgroundTask:", + "mangledName": "$s15OneSignalOSCore23OSBackgroundTaskHandlerP015beginBackgroundE0yySSF", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalOSCore.OSBackgroundTaskHandler>", + "sugared_genericSig": "", + "protocolReq": true, + "declAttributes": [ + "ObjC" + ], + "reqNewWitnessTableEntry": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "endBackgroundTask", + "printedName": "endBackgroundTask(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Func", + "usr": "c:@M@OneSignalOSCore@objc(pl)OSBackgroundTaskHandler(im)endBackgroundTask:", + "mangledName": "$s15OneSignalOSCore23OSBackgroundTaskHandlerP013endBackgroundE0yySSF", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalOSCore.OSBackgroundTaskHandler>", + "sugared_genericSig": "", + "protocolReq": true, + "declAttributes": [ + "ObjC" + ], + "reqNewWitnessTableEntry": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "setTaskInvalid", + "printedName": "setTaskInvalid(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Func", + "usr": "c:@M@OneSignalOSCore@objc(pl)OSBackgroundTaskHandler(im)setTaskInvalid:", + "mangledName": "$s15OneSignalOSCore23OSBackgroundTaskHandlerP03setE7InvalidyySSF", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalOSCore.OSBackgroundTaskHandler>", + "sugared_genericSig": "", + "protocolReq": true, + "declAttributes": [ + "ObjC" + ], + "reqNewWitnessTableEntry": true, + "funcSelfKind": "NonMutating" + } + ], + "declKind": "Protocol", + "usr": "c:@M@OneSignalOSCore@objc(pl)OSBackgroundTaskHandler", + "mangledName": "$s15OneSignalOSCore23OSBackgroundTaskHandlerP", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0 : AnyObject>", + "sugared_genericSig": "", + "declAttributes": [ + "AccessControl", + "ObjC" + ] + }, + { + "kind": "TypeDecl", + "name": "OSBackgroundTaskManager", + "printedName": "OSBackgroundTaskManager", + "children": [ + { + "kind": "Var", + "name": "taskHandler", + "printedName": "taskHandler", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "OneSignalOSCore.OSBackgroundTaskHandler?", + "children": [ + { + "kind": "TypeNominal", + "name": "OSBackgroundTaskHandler", + "printedName": "OneSignalOSCore.OSBackgroundTaskHandler", + "usr": "c:@M@OneSignalOSCore@objc(pl)OSBackgroundTaskHandler" + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Var", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSBackgroundTaskManager(cpy)taskHandler", + "mangledName": "$s15OneSignalOSCore23OSBackgroundTaskManagerC11taskHandlerAA0deH0_pSgvpZ", + "moduleName": "OneSignalOSCore", + "static": true, + "declAttributes": [ + "HasInitialValue", + "Final", + "HasStorage", + "AccessControl", + "ObjC" + ], + "hasStorage": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "OneSignalOSCore.OSBackgroundTaskHandler?", + "children": [ + { + "kind": "TypeNominal", + "name": "OSBackgroundTaskHandler", + "printedName": "OneSignalOSCore.OSBackgroundTaskHandler", + "usr": "c:@M@OneSignalOSCore@objc(pl)OSBackgroundTaskHandler" + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Accessor", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSBackgroundTaskManager(cm)taskHandler", + "mangledName": "$s15OneSignalOSCore23OSBackgroundTaskManagerC11taskHandlerAA0deH0_pSgvgZ", + "moduleName": "OneSignalOSCore", + "static": true, + "implicit": true, + "declAttributes": [ + "Final", + "ObjC" + ], + "accessorKind": "get" + }, + { + "kind": "Accessor", + "name": "Set", + "printedName": "Set()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "OneSignalOSCore.OSBackgroundTaskHandler?", + "children": [ + { + "kind": "TypeNominal", + "name": "OSBackgroundTaskHandler", + "printedName": "OneSignalOSCore.OSBackgroundTaskHandler", + "usr": "c:@M@OneSignalOSCore@objc(pl)OSBackgroundTaskHandler" + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Accessor", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSBackgroundTaskManager(cm)setTaskHandler:", + "mangledName": "$s15OneSignalOSCore23OSBackgroundTaskManagerC11taskHandlerAA0deH0_pSgvsZ", + "moduleName": "OneSignalOSCore", + "static": true, + "implicit": true, + "declAttributes": [ + "Final", + "ObjC" + ], + "accessorKind": "set" + }, + { + "kind": "Accessor", + "name": "Modify", + "printedName": "Modify()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + } + ], + "declKind": "Accessor", + "usr": "s:15OneSignalOSCore23OSBackgroundTaskManagerC11taskHandlerAA0deH0_pSgvMZ", + "mangledName": "$s15OneSignalOSCore23OSBackgroundTaskManagerC11taskHandlerAA0deH0_pSgvMZ", + "moduleName": "OneSignalOSCore", + "static": true, + "implicit": true, + "declAttributes": [ + "Final" + ], + "accessorKind": "_modify" + } + ] + }, + { + "kind": "Function", + "name": "beginBackgroundTask", + "printedName": "beginBackgroundTask(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Func", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSBackgroundTaskManager(cm)beginBackgroundTask:", + "mangledName": "$s15OneSignalOSCore23OSBackgroundTaskManagerC015beginBackgroundE0yySSFZ", + "moduleName": "OneSignalOSCore", + "static": true, + "declAttributes": [ + "Final", + "AccessControl", + "ObjC" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "endBackgroundTask", + "printedName": "endBackgroundTask(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Func", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSBackgroundTaskManager(cm)endBackgroundTask:", + "mangledName": "$s15OneSignalOSCore23OSBackgroundTaskManagerC013endBackgroundE0yySSFZ", + "moduleName": "OneSignalOSCore", + "static": true, + "declAttributes": [ + "Final", + "AccessControl", + "ObjC" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "setTaskInvalid", + "printedName": "setTaskInvalid(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Func", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSBackgroundTaskManager(cm)setTaskInvalid:", + "mangledName": "$s15OneSignalOSCore23OSBackgroundTaskManagerC03setE7InvalidyySSFZ", + "moduleName": "OneSignalOSCore", + "static": true, + "declAttributes": [ + "Final", + "AccessControl", + "ObjC" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Constructor", + "name": "init", + "printedName": "init()", + "children": [ + { + "kind": "TypeNominal", + "name": "OSBackgroundTaskManager", + "printedName": "OneSignalOSCore.OSBackgroundTaskManager", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSBackgroundTaskManager" + } + ], + "declKind": "Constructor", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSBackgroundTaskManager(im)init", + "mangledName": "$s15OneSignalOSCore23OSBackgroundTaskManagerCACycfc", + "moduleName": "OneSignalOSCore", + "overriding": true, + "implicit": true, + "objc_name": "init", + "declAttributes": [ + "Dynamic", + "ObjC", + "Override" + ], + "init_kind": "Designated" + } + ], + "declKind": "Class", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSBackgroundTaskManager", + "mangledName": "$s15OneSignalOSCore23OSBackgroundTaskManagerC", + "moduleName": "OneSignalOSCore", + "declAttributes": [ + "AccessControl", + "ObjC", + "RawDocComment" + ], + "superclassUsr": "c:objc(cs)NSObject", + "inheritsConvenienceInitializers": true, + "superclassNames": [ + "ObjectiveC.NSObject" + ], + "conformances": [ + { + "kind": "Conformance", + "name": "Equatable", + "printedName": "Equatable", + "usr": "s:SQ", + "mangledName": "$sSQ" + }, + { + "kind": "Conformance", + "name": "Hashable", + "printedName": "Hashable", + "usr": "s:SH", + "mangledName": "$sSH" + }, + { + "kind": "Conformance", + "name": "CVarArg", + "printedName": "CVarArg", + "usr": "s:s7CVarArgP", + "mangledName": "$ss7CVarArgP" + }, + { + "kind": "Conformance", + "name": "_KeyValueCodingAndObservingPublishing", + "printedName": "_KeyValueCodingAndObservingPublishing", + "usr": "s:10Foundation37_KeyValueCodingAndObservingPublishingP", + "mangledName": "$s10Foundation37_KeyValueCodingAndObservingPublishingP" + }, + { + "kind": "Conformance", + "name": "_KeyValueCodingAndObserving", + "printedName": "_KeyValueCodingAndObserving", + "usr": "s:10Foundation27_KeyValueCodingAndObservingP", + "mangledName": "$s10Foundation27_KeyValueCodingAndObservingP" + }, + { + "kind": "Conformance", + "name": "CustomStringConvertible", + "printedName": "CustomStringConvertible", + "usr": "s:s23CustomStringConvertibleP", + "mangledName": "$ss23CustomStringConvertibleP" + }, + { + "kind": "Conformance", + "name": "CustomDebugStringConvertible", + "printedName": "CustomDebugStringConvertible", + "usr": "s:s28CustomDebugStringConvertibleP", + "mangledName": "$ss28CustomDebugStringConvertibleP" + } + ] + }, + { + "kind": "Import", + "name": "Foundation", + "printedName": "Foundation", + "declKind": "Import", + "moduleName": "OneSignalOSCore", + "declAttributes": [ + "RawDocComment" + ] + }, + { + "kind": "Import", + "name": "OneSignalCore", + "printedName": "OneSignalCore", + "declKind": "Import", + "moduleName": "OneSignalOSCore" + }, + { + "kind": "TypeDecl", + "name": "OSModelStoreListener", + "printedName": "OSModelStoreListener", + "children": [ + { + "kind": "AssociatedType", + "name": "TModel", + "printedName": "TModel", + "declKind": "AssociatedType", + "usr": "s:15OneSignalOSCore20OSModelStoreListenerP6TModelQa", + "mangledName": "$s15OneSignalOSCore20OSModelStoreListenerP6TModelQa", + "moduleName": "OneSignalOSCore", + "protocolReq": true + }, + { + "kind": "Var", + "name": "store", + "printedName": "store", + "children": [ + { + "kind": "TypeNominal", + "name": "OSModelStore", + "printedName": "OneSignalOSCore.OSModelStore<τ_0_0.TModel>", + "children": [ + { + "kind": "TypeNominal", + "name": "DependentMember", + "printedName": "τ_0_0.TModel" + } + ], + "usr": "s:15OneSignalOSCore12OSModelStoreC" + } + ], + "declKind": "Var", + "usr": "s:15OneSignalOSCore20OSModelStoreListenerP5storeAA0dE0Cy6TModelQzGvp", + "mangledName": "$s15OneSignalOSCore20OSModelStoreListenerP5storeAA0dE0Cy6TModelQzGvp", + "moduleName": "OneSignalOSCore", + "protocolReq": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "OSModelStore", + "printedName": "OneSignalOSCore.OSModelStore<τ_0_0.TModel>", + "children": [ + { + "kind": "TypeNominal", + "name": "DependentMember", + "printedName": "τ_0_0.TModel" + } + ], + "usr": "s:15OneSignalOSCore12OSModelStoreC" + } + ], + "declKind": "Accessor", + "usr": "s:15OneSignalOSCore20OSModelStoreListenerP5storeAA0dE0Cy6TModelQzGvg", + "mangledName": "$s15OneSignalOSCore20OSModelStoreListenerP5storeAA0dE0Cy6TModelQzGvg", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalOSCore.OSModelStoreListener>", + "sugared_genericSig": "", + "protocolReq": true, + "reqNewWitnessTableEntry": true, + "accessorKind": "get" + } + ] + }, + { + "kind": "Constructor", + "name": "init", + "printedName": "init(store:)", + "children": [ + { + "kind": "TypeNominal", + "name": "GenericTypeParam", + "printedName": "τ_0_0" + }, + { + "kind": "TypeNominal", + "name": "OSModelStore", + "printedName": "OneSignalOSCore.OSModelStore<τ_0_0.TModel>", + "children": [ + { + "kind": "TypeNominal", + "name": "DependentMember", + "printedName": "τ_0_0.TModel" + } + ], + "usr": "s:15OneSignalOSCore12OSModelStoreC" + } + ], + "declKind": "Constructor", + "usr": "s:15OneSignalOSCore20OSModelStoreListenerP5storexAA0dE0Cy6TModelQzG_tcfc", + "mangledName": "$s15OneSignalOSCore20OSModelStoreListenerP5storexAA0dE0Cy6TModelQzG_tcfc", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalOSCore.OSModelStoreListener>", + "sugared_genericSig": "", + "protocolReq": true, + "reqNewWitnessTableEntry": true, + "init_kind": "Designated" + }, + { + "kind": "Function", + "name": "getAddModelDelta", + "printedName": "getAddModelDelta(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "OneSignalOSCore.OSDelta?", + "children": [ + { + "kind": "TypeNominal", + "name": "OSDelta", + "printedName": "OneSignalOSCore.OSDelta", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSDelta" + } + ], + "usr": "s:Sq" + }, + { + "kind": "TypeNominal", + "name": "DependentMember", + "printedName": "τ_0_0.TModel" + } + ], + "declKind": "Func", + "usr": "s:15OneSignalOSCore20OSModelStoreListenerP16getAddModelDeltayAA7OSDeltaCSg6TModelQzF", + "mangledName": "$s15OneSignalOSCore20OSModelStoreListenerP16getAddModelDeltayAA7OSDeltaCSg6TModelQzF", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalOSCore.OSModelStoreListener>", + "sugared_genericSig": "", + "protocolReq": true, + "reqNewWitnessTableEntry": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "getRemoveModelDelta", + "printedName": "getRemoveModelDelta(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "OneSignalOSCore.OSDelta?", + "children": [ + { + "kind": "TypeNominal", + "name": "OSDelta", + "printedName": "OneSignalOSCore.OSDelta", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSDelta" + } + ], + "usr": "s:Sq" + }, + { + "kind": "TypeNominal", + "name": "DependentMember", + "printedName": "τ_0_0.TModel" + } + ], + "declKind": "Func", + "usr": "s:15OneSignalOSCore20OSModelStoreListenerP19getRemoveModelDeltayAA7OSDeltaCSg6TModelQzF", + "mangledName": "$s15OneSignalOSCore20OSModelStoreListenerP19getRemoveModelDeltayAA7OSDeltaCSg6TModelQzF", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalOSCore.OSModelStoreListener>", + "sugared_genericSig": "", + "protocolReq": true, + "reqNewWitnessTableEntry": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "getUpdateModelDelta", + "printedName": "getUpdateModelDelta(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "OneSignalOSCore.OSDelta?", + "children": [ + { + "kind": "TypeNominal", + "name": "OSDelta", + "printedName": "OneSignalOSCore.OSDelta", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSDelta" + } + ], + "usr": "s:Sq" + }, + { + "kind": "TypeNominal", + "name": "OSModelChangedArgs", + "printedName": "OneSignalOSCore.OSModelChangedArgs", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSModelChangedArgs" + } + ], + "declKind": "Func", + "usr": "s:15OneSignalOSCore20OSModelStoreListenerP19getUpdateModelDeltayAA7OSDeltaCSgAA0D11ChangedArgsCF", + "mangledName": "$s15OneSignalOSCore20OSModelStoreListenerP19getUpdateModelDeltayAA7OSDeltaCSgAA0D11ChangedArgsCF", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalOSCore.OSModelStoreListener>", + "sugared_genericSig": "", + "protocolReq": true, + "reqNewWitnessTableEntry": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "start", + "printedName": "start()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + } + ], + "declKind": "Func", + "usr": "s:15OneSignalOSCore20OSModelStoreListenerPAAE5startyyF", + "mangledName": "$s15OneSignalOSCore20OSModelStoreListenerPAAE5startyyF", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalOSCore.OSModelStoreListener>", + "sugared_genericSig": "", + "declAttributes": [ + "AccessControl" + ], + "isFromExtension": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "onAdded", + "printedName": "onAdded(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "OSModel", + "printedName": "OneSignalOSCore.OSModel", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSModel" + } + ], + "declKind": "Func", + "usr": "s:15OneSignalOSCore20OSModelStoreListenerPAAE7onAddedyyAA0D0CF", + "mangledName": "$s15OneSignalOSCore20OSModelStoreListenerPAAE7onAddedyyAA0D0CF", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalOSCore.OSModelStoreListener>", + "sugared_genericSig": "", + "declAttributes": [ + "AccessControl" + ], + "isFromExtension": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "onUpdated", + "printedName": "onUpdated(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "OSModelChangedArgs", + "printedName": "OneSignalOSCore.OSModelChangedArgs", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSModelChangedArgs" + } + ], + "declKind": "Func", + "usr": "s:15OneSignalOSCore20OSModelStoreListenerPAAE9onUpdatedyyAA0D11ChangedArgsCF", + "mangledName": "$s15OneSignalOSCore20OSModelStoreListenerPAAE9onUpdatedyyAA0D11ChangedArgsCF", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalOSCore.OSModelStoreListener>", + "sugared_genericSig": "", + "declAttributes": [ + "AccessControl" + ], + "isFromExtension": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "onRemoved", + "printedName": "onRemoved(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "OSModel", + "printedName": "OneSignalOSCore.OSModel", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSModel" + } + ], + "declKind": "Func", + "usr": "s:15OneSignalOSCore20OSModelStoreListenerPAAE9onRemovedyyAA0D0CF", + "mangledName": "$s15OneSignalOSCore20OSModelStoreListenerPAAE9onRemovedyyAA0D0CF", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalOSCore.OSModelStoreListener>", + "sugared_genericSig": "", + "declAttributes": [ + "AccessControl" + ], + "isFromExtension": true, + "funcSelfKind": "NonMutating" + } + ], + "declKind": "Protocol", + "usr": "s:15OneSignalOSCore20OSModelStoreListenerP", + "mangledName": "$s15OneSignalOSCore20OSModelStoreListenerP", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0 : OneSignalOSCore.OSModelStoreChangedHandler, τ_0_0.TModel : OneSignalOSCore.OSModel>", + "sugared_genericSig": "", + "declAttributes": [ + "AccessControl" + ], + "conformances": [ + { + "kind": "Conformance", + "name": "OSModelStoreChangedHandler", + "printedName": "OSModelStoreChangedHandler", + "usr": "s:15OneSignalOSCore26OSModelStoreChangedHandlerP", + "mangledName": "$s15OneSignalOSCore26OSModelStoreChangedHandlerP" + } + ] + }, + { + "kind": "Import", + "name": "Foundation", + "printedName": "Foundation", + "declKind": "Import", + "moduleName": "OneSignalOSCore", + "declAttributes": [ + "RawDocComment" + ] + }, + { + "kind": "TypeDecl", + "name": "OSModelStoreChangedHandler", + "printedName": "OSModelStoreChangedHandler", + "children": [ + { + "kind": "Function", + "name": "onAdded", + "printedName": "onAdded(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "OSModel", + "printedName": "OneSignalOSCore.OSModel", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSModel" + } + ], + "declKind": "Func", + "usr": "s:15OneSignalOSCore26OSModelStoreChangedHandlerP7onAddedyyAA0D0CF", + "mangledName": "$s15OneSignalOSCore26OSModelStoreChangedHandlerP7onAddedyyAA0D0CF", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalOSCore.OSModelStoreChangedHandler>", + "sugared_genericSig": "", + "protocolReq": true, + "declAttributes": [ + "RawDocComment" + ], + "reqNewWitnessTableEntry": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "onUpdated", + "printedName": "onUpdated(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "OSModelChangedArgs", + "printedName": "OneSignalOSCore.OSModelChangedArgs", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSModelChangedArgs" + } + ], + "declKind": "Func", + "usr": "s:15OneSignalOSCore26OSModelStoreChangedHandlerP9onUpdatedyyAA0dF4ArgsCF", + "mangledName": "$s15OneSignalOSCore26OSModelStoreChangedHandlerP9onUpdatedyyAA0dF4ArgsCF", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalOSCore.OSModelStoreChangedHandler>", + "sugared_genericSig": "", + "protocolReq": true, + "declAttributes": [ + "RawDocComment" + ], + "reqNewWitnessTableEntry": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "onRemoved", + "printedName": "onRemoved(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "OSModel", + "printedName": "OneSignalOSCore.OSModel", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSModel" + } + ], + "declKind": "Func", + "usr": "s:15OneSignalOSCore26OSModelStoreChangedHandlerP9onRemovedyyAA0D0CF", + "mangledName": "$s15OneSignalOSCore26OSModelStoreChangedHandlerP9onRemovedyyAA0D0CF", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalOSCore.OSModelStoreChangedHandler>", + "sugared_genericSig": "", + "protocolReq": true, + "declAttributes": [ + "RawDocComment" + ], + "reqNewWitnessTableEntry": true, + "funcSelfKind": "NonMutating" + } + ], + "declKind": "Protocol", + "usr": "s:15OneSignalOSCore26OSModelStoreChangedHandlerP", + "mangledName": "$s15OneSignalOSCore26OSModelStoreChangedHandlerP", + "moduleName": "OneSignalOSCore", + "declAttributes": [ + "AccessControl", + "RawDocComment" + ] + }, + { + "kind": "Import", + "name": "Foundation", + "printedName": "Foundation", + "declKind": "Import", + "moduleName": "OneSignalOSCore", + "declAttributes": [ + "RawDocComment" + ] + }, + { + "kind": "TypeDecl", + "name": "OSDelta", + "printedName": "OSDelta", + "children": [ + { + "kind": "Var", + "name": "name", + "printedName": "name", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Var", + "usr": "s:15OneSignalOSCore7OSDeltaC4nameSSvp", + "mangledName": "$s15OneSignalOSCore7OSDeltaC4nameSSvp", + "moduleName": "OneSignalOSCore", + "declAttributes": [ + "Final", + "HasStorage", + "AccessControl" + ], + "isLet": true, + "hasStorage": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Accessor", + "usr": "s:15OneSignalOSCore7OSDeltaC4nameSSvg", + "mangledName": "$s15OneSignalOSCore7OSDeltaC4nameSSvg", + "moduleName": "OneSignalOSCore", + "implicit": true, + "declAttributes": [ + "Final" + ], + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "deltaId", + "printedName": "deltaId", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Var", + "usr": "s:15OneSignalOSCore7OSDeltaC7deltaIdSSvp", + "mangledName": "$s15OneSignalOSCore7OSDeltaC7deltaIdSSvp", + "moduleName": "OneSignalOSCore", + "declAttributes": [ + "Final", + "HasStorage", + "AccessControl" + ], + "isLet": true, + "hasStorage": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Accessor", + "usr": "s:15OneSignalOSCore7OSDeltaC7deltaIdSSvg", + "mangledName": "$s15OneSignalOSCore7OSDeltaC7deltaIdSSvg", + "moduleName": "OneSignalOSCore", + "implicit": true, + "declAttributes": [ + "Final" + ], + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "timestamp", + "printedName": "timestamp", + "children": [ + { + "kind": "TypeNominal", + "name": "Date", + "printedName": "Foundation.Date", + "usr": "s:10Foundation4DateV" + } + ], + "declKind": "Var", + "usr": "s:15OneSignalOSCore7OSDeltaC9timestamp10Foundation4DateVvp", + "mangledName": "$s15OneSignalOSCore7OSDeltaC9timestamp10Foundation4DateVvp", + "moduleName": "OneSignalOSCore", + "declAttributes": [ + "Final", + "HasStorage", + "AccessControl" + ], + "isLet": true, + "hasStorage": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "Date", + "printedName": "Foundation.Date", + "usr": "s:10Foundation4DateV" + } + ], + "declKind": "Accessor", + "usr": "s:15OneSignalOSCore7OSDeltaC9timestamp10Foundation4DateVvg", + "mangledName": "$s15OneSignalOSCore7OSDeltaC9timestamp10Foundation4DateVvg", + "moduleName": "OneSignalOSCore", + "implicit": true, + "declAttributes": [ + "Final" + ], + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "model", + "printedName": "model", + "children": [ + { + "kind": "TypeNominal", + "name": "OSModel", + "printedName": "OneSignalOSCore.OSModel", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSModel" + } + ], + "declKind": "Var", + "usr": "s:15OneSignalOSCore7OSDeltaC5modelAA7OSModelCvp", + "mangledName": "$s15OneSignalOSCore7OSDeltaC5modelAA7OSModelCvp", + "moduleName": "OneSignalOSCore", + "declAttributes": [ + "HasStorage", + "AccessControl" + ], + "hasStorage": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "OSModel", + "printedName": "OneSignalOSCore.OSModel", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSModel" + } + ], + "declKind": "Accessor", + "usr": "s:15OneSignalOSCore7OSDeltaC5modelAA7OSModelCvg", + "mangledName": "$s15OneSignalOSCore7OSDeltaC5modelAA7OSModelCvg", + "moduleName": "OneSignalOSCore", + "implicit": true, + "accessorKind": "get" + }, + { + "kind": "Accessor", + "name": "Set", + "printedName": "Set()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "OSModel", + "printedName": "OneSignalOSCore.OSModel", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSModel" + } + ], + "declKind": "Accessor", + "usr": "s:15OneSignalOSCore7OSDeltaC5modelAA7OSModelCvs", + "mangledName": "$s15OneSignalOSCore7OSDeltaC5modelAA7OSModelCvs", + "moduleName": "OneSignalOSCore", + "implicit": true, + "accessorKind": "set" + }, + { + "kind": "Accessor", + "name": "Modify", + "printedName": "Modify()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + } + ], + "declKind": "Accessor", + "usr": "s:15OneSignalOSCore7OSDeltaC5modelAA7OSModelCvM", + "mangledName": "$s15OneSignalOSCore7OSDeltaC5modelAA7OSModelCvM", + "moduleName": "OneSignalOSCore", + "implicit": true, + "accessorKind": "_modify" + } + ] + }, + { + "kind": "Var", + "name": "property", + "printedName": "property", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Var", + "usr": "s:15OneSignalOSCore7OSDeltaC8propertySSvp", + "mangledName": "$s15OneSignalOSCore7OSDeltaC8propertySSvp", + "moduleName": "OneSignalOSCore", + "declAttributes": [ + "Final", + "HasStorage", + "AccessControl" + ], + "isLet": true, + "hasStorage": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Accessor", + "usr": "s:15OneSignalOSCore7OSDeltaC8propertySSvg", + "mangledName": "$s15OneSignalOSCore7OSDeltaC8propertySSvg", + "moduleName": "OneSignalOSCore", + "implicit": true, + "declAttributes": [ + "Final" + ], + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "value", + "printedName": "value", + "children": [ + { + "kind": "TypeNominal", + "name": "ProtocolComposition", + "printedName": "Any" + } + ], + "declKind": "Var", + "usr": "s:15OneSignalOSCore7OSDeltaC5valueypvp", + "mangledName": "$s15OneSignalOSCore7OSDeltaC5valueypvp", + "moduleName": "OneSignalOSCore", + "declAttributes": [ + "Final", + "HasStorage", + "AccessControl" + ], + "isLet": true, + "hasStorage": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "ProtocolComposition", + "printedName": "Any" + } + ], + "declKind": "Accessor", + "usr": "s:15OneSignalOSCore7OSDeltaC5valueypvg", + "mangledName": "$s15OneSignalOSCore7OSDeltaC5valueypvg", + "moduleName": "OneSignalOSCore", + "implicit": true, + "declAttributes": [ + "Final" + ], + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "description", + "printedName": "description", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Var", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSDelta(py)description", + "mangledName": "$s15OneSignalOSCore7OSDeltaC11descriptionSSvp", + "moduleName": "OneSignalOSCore", + "overriding": true, + "isOpen": true, + "objc_name": "description", + "declAttributes": [ + "Dynamic", + "ObjC", + "AccessControl", + "Override" + ], + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Accessor", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSDelta(im)description", + "mangledName": "$s15OneSignalOSCore7OSDeltaC11descriptionSSvg", + "moduleName": "OneSignalOSCore", + "overriding": true, + "isOpen": true, + "objc_name": "description", + "declAttributes": [ + "Dynamic", + "ObjC" + ], + "accessorKind": "get" + } + ] + }, + { + "kind": "Constructor", + "name": "init", + "printedName": "init(name:model:property:value:)", + "children": [ + { + "kind": "TypeNominal", + "name": "OSDelta", + "printedName": "OneSignalOSCore.OSDelta", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSDelta" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + }, + { + "kind": "TypeNominal", + "name": "OSModel", + "printedName": "OneSignalOSCore.OSModel", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSModel" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + }, + { + "kind": "TypeNominal", + "name": "ProtocolComposition", + "printedName": "Any" + } + ], + "declKind": "Constructor", + "usr": "s:15OneSignalOSCore7OSDeltaC4name5model8property5valueACSS_AA7OSModelCSSyptcfc", + "mangledName": "$s15OneSignalOSCore7OSDeltaC4name5model8property5valueACSS_AA7OSModelCSSyptcfc", + "moduleName": "OneSignalOSCore", + "declAttributes": [ + "AccessControl" + ], + "init_kind": "Designated" + }, + { + "kind": "Function", + "name": "encode", + "printedName": "encode(with:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "NSCoder", + "printedName": "Foundation.NSCoder", + "usr": "c:objc(cs)NSCoder" + } + ], + "declKind": "Func", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSDelta(im)encodeWithCoder:", + "mangledName": "$s15OneSignalOSCore7OSDeltaC6encode4withySo7NSCoderC_tF", + "moduleName": "OneSignalOSCore", + "objc_name": "encodeWithCoder:", + "declAttributes": [ + "ObjC", + "AccessControl" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Constructor", + "name": "init", + "printedName": "init(coder:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "OneSignalOSCore.OSDelta?", + "children": [ + { + "kind": "TypeNominal", + "name": "OSDelta", + "printedName": "OneSignalOSCore.OSDelta", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSDelta" + } + ], + "usr": "s:Sq" + }, + { + "kind": "TypeNominal", + "name": "NSCoder", + "printedName": "Foundation.NSCoder", + "usr": "c:objc(cs)NSCoder" + } + ], + "declKind": "Constructor", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSDelta(im)initWithCoder:", + "mangledName": "$s15OneSignalOSCore7OSDeltaC5coderACSgSo7NSCoderC_tcfc", + "moduleName": "OneSignalOSCore", + "objc_name": "initWithCoder:", + "declAttributes": [ + "ObjC", + "Required", + "AccessControl" + ], + "init_kind": "Designated" + }, + { + "kind": "Constructor", + "name": "init", + "printedName": "init()", + "children": [ + { + "kind": "TypeNominal", + "name": "OSDelta", + "printedName": "OneSignalOSCore.OSDelta", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSDelta" + } + ], + "declKind": "Constructor", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSDelta(im)init", + "mangledName": "$s15OneSignalOSCore7OSDeltaCACycfc", + "moduleName": "OneSignalOSCore", + "overriding": true, + "implicit": true, + "objc_name": "init", + "declAttributes": [ + "Dynamic", + "ObjC", + "Override" + ], + "init_kind": "Designated" + } + ], + "declKind": "Class", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSDelta", + "mangledName": "$s15OneSignalOSCore7OSDeltaC", + "moduleName": "OneSignalOSCore", + "isOpen": true, + "declAttributes": [ + "AccessControl", + "RawDocComment", + "ObjC" + ], + "superclassUsr": "c:objc(cs)NSObject", + "superclassNames": [ + "ObjectiveC.NSObject" + ], + "conformances": [ + { + "kind": "Conformance", + "name": "Equatable", + "printedName": "Equatable", + "usr": "s:SQ", + "mangledName": "$sSQ" + }, + { + "kind": "Conformance", + "name": "Hashable", + "printedName": "Hashable", + "usr": "s:SH", + "mangledName": "$sSH" + }, + { + "kind": "Conformance", + "name": "CVarArg", + "printedName": "CVarArg", + "usr": "s:s7CVarArgP", + "mangledName": "$ss7CVarArgP" + }, + { + "kind": "Conformance", + "name": "_KeyValueCodingAndObservingPublishing", + "printedName": "_KeyValueCodingAndObservingPublishing", + "usr": "s:10Foundation37_KeyValueCodingAndObservingPublishingP", + "mangledName": "$s10Foundation37_KeyValueCodingAndObservingPublishingP" + }, + { + "kind": "Conformance", + "name": "_KeyValueCodingAndObserving", + "printedName": "_KeyValueCodingAndObserving", + "usr": "s:10Foundation27_KeyValueCodingAndObservingP", + "mangledName": "$s10Foundation27_KeyValueCodingAndObservingP" + }, + { + "kind": "Conformance", + "name": "CustomStringConvertible", + "printedName": "CustomStringConvertible", + "usr": "s:s23CustomStringConvertibleP", + "mangledName": "$ss23CustomStringConvertibleP" + }, + { + "kind": "Conformance", + "name": "CustomDebugStringConvertible", + "printedName": "CustomDebugStringConvertible", + "usr": "s:s28CustomDebugStringConvertibleP", + "mangledName": "$ss28CustomDebugStringConvertibleP" + } + ] + }, + { + "kind": "Import", + "name": "Foundation", + "printedName": "Foundation", + "declKind": "Import", + "moduleName": "OneSignalOSCore", + "declAttributes": [ + "RawDocComment" + ] + }, + { + "kind": "TypeDecl", + "name": "OSModelChangedArgs", + "printedName": "OSModelChangedArgs", + "children": [ + { + "kind": "Var", + "name": "model", + "printedName": "model", + "children": [ + { + "kind": "TypeNominal", + "name": "OSModel", + "printedName": "OneSignalOSCore.OSModel", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSModel" + } + ], + "declKind": "Var", + "usr": "s:15OneSignalOSCore18OSModelChangedArgsC5modelAA0D0Cvp", + "mangledName": "$s15OneSignalOSCore18OSModelChangedArgsC5modelAA0D0Cvp", + "moduleName": "OneSignalOSCore", + "declAttributes": [ + "Final", + "HasStorage", + "AccessControl", + "RawDocComment" + ], + "isLet": true, + "hasStorage": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "OSModel", + "printedName": "OneSignalOSCore.OSModel", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSModel" + } + ], + "declKind": "Accessor", + "usr": "s:15OneSignalOSCore18OSModelChangedArgsC5modelAA0D0Cvg", + "mangledName": "$s15OneSignalOSCore18OSModelChangedArgsC5modelAA0D0Cvg", + "moduleName": "OneSignalOSCore", + "implicit": true, + "declAttributes": [ + "Final" + ], + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "property", + "printedName": "property", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Var", + "usr": "s:15OneSignalOSCore18OSModelChangedArgsC8propertySSvp", + "mangledName": "$s15OneSignalOSCore18OSModelChangedArgsC8propertySSvp", + "moduleName": "OneSignalOSCore", + "declAttributes": [ + "Final", + "HasStorage", + "AccessControl", + "RawDocComment" + ], + "isLet": true, + "hasStorage": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Accessor", + "usr": "s:15OneSignalOSCore18OSModelChangedArgsC8propertySSvg", + "mangledName": "$s15OneSignalOSCore18OSModelChangedArgsC8propertySSvg", + "moduleName": "OneSignalOSCore", + "implicit": true, + "declAttributes": [ + "Final" + ], + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "newValue", + "printedName": "newValue", + "children": [ + { + "kind": "TypeNominal", + "name": "ProtocolComposition", + "printedName": "Any" + } + ], + "declKind": "Var", + "usr": "s:15OneSignalOSCore18OSModelChangedArgsC8newValueypvp", + "mangledName": "$s15OneSignalOSCore18OSModelChangedArgsC8newValueypvp", + "moduleName": "OneSignalOSCore", + "declAttributes": [ + "Final", + "HasStorage", + "AccessControl", + "RawDocComment" + ], + "isLet": true, + "hasStorage": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "ProtocolComposition", + "printedName": "Any" + } + ], + "declKind": "Accessor", + "usr": "s:15OneSignalOSCore18OSModelChangedArgsC8newValueypvg", + "mangledName": "$s15OneSignalOSCore18OSModelChangedArgsC8newValueypvg", + "moduleName": "OneSignalOSCore", + "implicit": true, + "declAttributes": [ + "Final" + ], + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "description", + "printedName": "description", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Var", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSModelChangedArgs(py)description", + "mangledName": "$s15OneSignalOSCore18OSModelChangedArgsC11descriptionSSvp", + "moduleName": "OneSignalOSCore", + "overriding": true, + "objc_name": "description", + "declAttributes": [ + "Dynamic", + "ObjC", + "AccessControl", + "Override" + ], + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Accessor", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSModelChangedArgs(im)description", + "mangledName": "$s15OneSignalOSCore18OSModelChangedArgsC11descriptionSSvg", + "moduleName": "OneSignalOSCore", + "overriding": true, + "objc_name": "description", + "declAttributes": [ + "Dynamic", + "ObjC" + ], + "accessorKind": "get" + } + ] + }, + { + "kind": "Constructor", + "name": "init", + "printedName": "init()", + "children": [ + { + "kind": "TypeNominal", + "name": "OSModelChangedArgs", + "printedName": "OneSignalOSCore.OSModelChangedArgs", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSModelChangedArgs" + } + ], + "declKind": "Constructor", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSModelChangedArgs(im)init", + "mangledName": "$s15OneSignalOSCore18OSModelChangedArgsCACycfc", + "moduleName": "OneSignalOSCore", + "overriding": true, + "implicit": true, + "objc_name": "init", + "declAttributes": [ + "Dynamic", + "ObjC", + "Override" + ], + "init_kind": "Designated" + } + ], + "declKind": "Class", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSModelChangedArgs", + "mangledName": "$s15OneSignalOSCore18OSModelChangedArgsC", + "moduleName": "OneSignalOSCore", + "declAttributes": [ + "AccessControl", + "ObjC" + ], + "superclassUsr": "c:objc(cs)NSObject", + "hasMissingDesignatedInitializers": true, + "superclassNames": [ + "ObjectiveC.NSObject" + ], + "conformances": [ + { + "kind": "Conformance", + "name": "Equatable", + "printedName": "Equatable", + "usr": "s:SQ", + "mangledName": "$sSQ" + }, + { + "kind": "Conformance", + "name": "Hashable", + "printedName": "Hashable", + "usr": "s:SH", + "mangledName": "$sSH" + }, + { + "kind": "Conformance", + "name": "CVarArg", + "printedName": "CVarArg", + "usr": "s:s7CVarArgP", + "mangledName": "$ss7CVarArgP" + }, + { + "kind": "Conformance", + "name": "_KeyValueCodingAndObservingPublishing", + "printedName": "_KeyValueCodingAndObservingPublishing", + "usr": "s:10Foundation37_KeyValueCodingAndObservingPublishingP", + "mangledName": "$s10Foundation37_KeyValueCodingAndObservingPublishingP" + }, + { + "kind": "Conformance", + "name": "_KeyValueCodingAndObserving", + "printedName": "_KeyValueCodingAndObserving", + "usr": "s:10Foundation27_KeyValueCodingAndObservingP", + "mangledName": "$s10Foundation27_KeyValueCodingAndObservingP" + }, + { + "kind": "Conformance", + "name": "CustomStringConvertible", + "printedName": "CustomStringConvertible", + "usr": "s:s23CustomStringConvertibleP", + "mangledName": "$ss23CustomStringConvertibleP" + }, + { + "kind": "Conformance", + "name": "CustomDebugStringConvertible", + "printedName": "CustomDebugStringConvertible", + "usr": "s:s28CustomDebugStringConvertibleP", + "mangledName": "$ss28CustomDebugStringConvertibleP" + } + ] + }, + { + "kind": "TypeDecl", + "name": "OSModelChangedHandler", + "printedName": "OSModelChangedHandler", + "children": [ + { + "kind": "Function", + "name": "onModelUpdated", + "printedName": "onModelUpdated(args:hydrating:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "OSModelChangedArgs", + "printedName": "OneSignalOSCore.OSModelChangedArgs", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSModelChangedArgs" + }, + { + "kind": "TypeNominal", + "name": "Bool", + "printedName": "Swift.Bool", + "usr": "s:Sb" + } + ], + "declKind": "Func", + "usr": "s:15OneSignalOSCore21OSModelChangedHandlerP14onModelUpdated4args9hydratingyAA0dE4ArgsC_SbtF", + "mangledName": "$s15OneSignalOSCore21OSModelChangedHandlerP14onModelUpdated4args9hydratingyAA0dE4ArgsC_SbtF", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalOSCore.OSModelChangedHandler>", + "sugared_genericSig": "", + "protocolReq": true, + "reqNewWitnessTableEntry": true, + "funcSelfKind": "NonMutating" + } + ], + "declKind": "Protocol", + "usr": "s:15OneSignalOSCore21OSModelChangedHandlerP", + "mangledName": "$s15OneSignalOSCore21OSModelChangedHandlerP", + "moduleName": "OneSignalOSCore", + "declAttributes": [ + "AccessControl" + ] + }, + { + "kind": "Import", + "name": "OneSignalCore", + "printedName": "OneSignalCore", + "declKind": "Import", + "moduleName": "OneSignalOSCore", + "declAttributes": [ + "RawDocComment" + ] + }, + { + "kind": "TypeDecl", + "name": "OSOperationExecutor", + "printedName": "OSOperationExecutor", + "children": [ + { + "kind": "Var", + "name": "supportedDeltas", + "printedName": "supportedDeltas", + "children": [ + { + "kind": "TypeNominal", + "name": "Array", + "printedName": "[Swift.String]", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:Sa" + } + ], + "declKind": "Var", + "usr": "s:15OneSignalOSCore19OSOperationExecutorP15supportedDeltasSaySSGvp", + "mangledName": "$s15OneSignalOSCore19OSOperationExecutorP15supportedDeltasSaySSGvp", + "moduleName": "OneSignalOSCore", + "protocolReq": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "Array", + "printedName": "[Swift.String]", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:Sa" + } + ], + "declKind": "Accessor", + "usr": "s:15OneSignalOSCore19OSOperationExecutorP15supportedDeltasSaySSGvg", + "mangledName": "$s15OneSignalOSCore19OSOperationExecutorP15supportedDeltasSaySSGvg", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalOSCore.OSOperationExecutor>", + "sugared_genericSig": "", + "protocolReq": true, + "reqNewWitnessTableEntry": true, + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "deltaQueue", + "printedName": "deltaQueue", + "children": [ + { + "kind": "TypeNominal", + "name": "Array", + "printedName": "[OneSignalOSCore.OSDelta]", + "children": [ + { + "kind": "TypeNominal", + "name": "OSDelta", + "printedName": "OneSignalOSCore.OSDelta", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSDelta" + } + ], + "usr": "s:Sa" + } + ], + "declKind": "Var", + "usr": "s:15OneSignalOSCore19OSOperationExecutorP10deltaQueueSayAA7OSDeltaCGvp", + "mangledName": "$s15OneSignalOSCore19OSOperationExecutorP10deltaQueueSayAA7OSDeltaCGvp", + "moduleName": "OneSignalOSCore", + "protocolReq": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "Array", + "printedName": "[OneSignalOSCore.OSDelta]", + "children": [ + { + "kind": "TypeNominal", + "name": "OSDelta", + "printedName": "OneSignalOSCore.OSDelta", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSDelta" + } + ], + "usr": "s:Sa" + } + ], + "declKind": "Accessor", + "usr": "s:15OneSignalOSCore19OSOperationExecutorP10deltaQueueSayAA7OSDeltaCGvg", + "mangledName": "$s15OneSignalOSCore19OSOperationExecutorP10deltaQueueSayAA7OSDeltaCGvg", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalOSCore.OSOperationExecutor>", + "sugared_genericSig": "", + "protocolReq": true, + "reqNewWitnessTableEntry": true, + "accessorKind": "get" + } + ] + }, + { + "kind": "Function", + "name": "enqueueDelta", + "printedName": "enqueueDelta(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "OSDelta", + "printedName": "OneSignalOSCore.OSDelta", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSDelta" + } + ], + "declKind": "Func", + "usr": "s:15OneSignalOSCore19OSOperationExecutorP12enqueueDeltayyAA7OSDeltaCF", + "mangledName": "$s15OneSignalOSCore19OSOperationExecutorP12enqueueDeltayyAA7OSDeltaCF", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalOSCore.OSOperationExecutor>", + "sugared_genericSig": "", + "protocolReq": true, + "reqNewWitnessTableEntry": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "cacheDeltaQueue", + "printedName": "cacheDeltaQueue()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + } + ], + "declKind": "Func", + "usr": "s:15OneSignalOSCore19OSOperationExecutorP15cacheDeltaQueueyyF", + "mangledName": "$s15OneSignalOSCore19OSOperationExecutorP15cacheDeltaQueueyyF", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalOSCore.OSOperationExecutor>", + "sugared_genericSig": "", + "protocolReq": true, + "reqNewWitnessTableEntry": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "processDeltaQueue", + "printedName": "processDeltaQueue(inBackground:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "Bool", + "printedName": "Swift.Bool", + "usr": "s:Sb" + } + ], + "declKind": "Func", + "usr": "s:15OneSignalOSCore19OSOperationExecutorP17processDeltaQueue12inBackgroundySb_tF", + "mangledName": "$s15OneSignalOSCore19OSOperationExecutorP17processDeltaQueue12inBackgroundySb_tF", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalOSCore.OSOperationExecutor>", + "sugared_genericSig": "", + "protocolReq": true, + "reqNewWitnessTableEntry": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "processRequestQueue", + "printedName": "processRequestQueue(inBackground:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "Bool", + "printedName": "Swift.Bool", + "usr": "s:Sb" + } + ], + "declKind": "Func", + "usr": "s:15OneSignalOSCore19OSOperationExecutorP19processRequestQueue12inBackgroundySb_tF", + "mangledName": "$s15OneSignalOSCore19OSOperationExecutorP19processRequestQueue12inBackgroundySb_tF", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalOSCore.OSOperationExecutor>", + "sugared_genericSig": "", + "protocolReq": true, + "reqNewWitnessTableEntry": true, + "funcSelfKind": "NonMutating" + } + ], + "declKind": "Protocol", + "usr": "s:15OneSignalOSCore19OSOperationExecutorP", + "mangledName": "$s15OneSignalOSCore19OSOperationExecutorP", + "moduleName": "OneSignalOSCore", + "declAttributes": [ + "AccessControl", + "RawDocComment" + ] + } + ], + "json_format_version": 8 + }, + "ConstValues": [ + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalOSCore\/Source\/OSOperationRepo.swift", + "kind": "BooleanLiteral", + "offset": 1573, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalOSCore\/Source\/OSOperationRepo.swift", + "kind": "Dictionary", + "offset": 1711, + "length": 3, + "value": "[]" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalOSCore\/Source\/OSOperationRepo.swift", + "kind": "Array", + "offset": 1758, + "length": 2, + "value": "[]" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalOSCore\/Source\/OSOperationRepo.swift", + "kind": "Array", + "offset": 1793, + "length": 2, + "value": "[]" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalOSCore\/Source\/OSOperationRepo.swift", + "kind": "IntegerLiteral", + "offset": 1901, + "length": 1, + "value": "5" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalOSCore\/Source\/OSOperationRepo.swift", + "kind": "BooleanLiteral", + "offset": 1927, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalOSCore\/Source\/OSOperationRepo.swift", + "kind": "BooleanLiteral", + "offset": 4475, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalOSCore\/Source\/OSModelStore.swift", + "kind": "StringLiteral", + "offset": 1257, + "length": 12, + "value": "\"OneSignalOSCore.OSModelStore\"" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalOSCore\/Source\/OSModel.swift", + "kind": "BooleanLiteral", + "offset": 1419, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalOSCore\/Source\/OSModel.swift", + "kind": "StringLiteral", + "offset": 1260, + "length": 7, + "value": "\"OneSignalOSCore.OSModel\"" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalOSCore\/Source\/OSDelta.swift", + "kind": "StringLiteral", + "offset": 1455, + "length": 7, + "value": "\"OneSignalOSCore.OSDelta\"" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalOSCore\/Source\/OSModelChangedHandler.swift", + "kind": "StringLiteral", + "offset": 1256, + "length": 18, + "value": "\"OneSignalOSCore.OSModelChangedArgs\"" + } + ] +} \ No newline at end of file diff --git a/iOS_SDK/OneSignalSDK/OneSignal_OSCore/OneSignalOSCore.xcframework/ios-arm64/OneSignalOSCore.framework/Modules/OneSignalOSCore.swiftmodule/arm64-apple-ios.private.swiftinterface b/iOS_SDK/OneSignalSDK/OneSignal_OSCore/OneSignalOSCore.xcframework/ios-arm64/OneSignalOSCore.framework/Modules/OneSignalOSCore.swiftmodule/arm64-apple-ios.private.swiftinterface new file mode 100644 index 000000000..de496853b --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignal_OSCore/OneSignalOSCore.xcframework/ios-arm64/OneSignalOSCore.framework/Modules/OneSignalOSCore.swiftmodule/arm64-apple-ios.private.swiftinterface @@ -0,0 +1,118 @@ +// swift-interface-format-version: 1.0 +// swift-compiler-version: Apple Swift version 5.7.1 (swiftlang-5.7.1.135.3 clang-1400.0.29.51) +// swift-module-flags: -target arm64-apple-ios11.0 -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -O -module-name OneSignalOSCore +// swift-module-flags-ignorable: -enable-bare-slash-regex +import Foundation +import OneSignalCore +@_exported import OneSignalOSCore +import Swift +import _Concurrency +import _StringProcessing +@objc @_inheritsConvenienceInitializers public class OSOperationRepo : ObjectiveC.NSObject { + public static let sharedInstance: OneSignalOSCore.OSOperationRepo + public var paused: Swift.Bool + public func start() + public func addExecutor(_ executor: OneSignalOSCore.OSOperationExecutor) + @objc public func flushDeltaQueue(inBackground: Swift.Bool = false) + @objc override dynamic public init() + @objc deinit +} +@_inheritsConvenienceInitializers public class OSEventProducer : ObjectiveC.NSObject { + public func subscribe(_ handler: THandler) + public func unsubscribe(_ handler: THandler) + public func fire(callback: (THandler) -> Swift.Void) + @objc override dynamic public init() + @objc deinit +} +open class OSModelStore : ObjectiveC.NSObject where TModel : OneSignalOSCore.OSModel { + public init(changeSubscription: OneSignalOSCore.OSEventProducer, storeKey: Swift.String) + public func registerAsUserObserver() -> OneSignalOSCore.OSModelStore + @objc deinit + public func getModel(key: Swift.String) -> TModel? + public func getModel(modelId: Swift.String) -> TModel? + public func getModels() -> [Swift.String : TModel] + public func add(id: Swift.String, model: TModel, hydrating: Swift.Bool) + public func remove(_ id: Swift.String) + public func clearModelsFromStore() +} +extension OneSignalOSCore.OSModelStore : OneSignalOSCore.OSModelChangedHandler { + public func onModelUpdated(args: OneSignalOSCore.OSModelChangedArgs, hydrating: Swift.Bool) +} +@objc open class OSModel : ObjectiveC.NSObject, Foundation.NSCoding { + final public let modelId: Swift.String + public var changeNotifier: OneSignalOSCore.OSEventProducer + public init(changeNotifier: OneSignalOSCore.OSEventProducer) + @objc open func encode(with coder: Foundation.NSCoder) + @objc required public init?(coder: Foundation.NSCoder) + public func set(property: Swift.String, newValue: T) + public func hydrate(_ response: [Swift.String : Any]) + open func hydrateModel(_ response: [Swift.String : Any]) + @objc deinit +} +@objc public protocol OSBackgroundTaskHandler { + @objc func beginBackgroundTask(_ taskIdentifier: Swift.String) + @objc func endBackgroundTask(_ taskIdentifier: Swift.String) + @objc func setTaskInvalid(_ taskIdentifier: Swift.String) +} +@_inheritsConvenienceInitializers @objc public class OSBackgroundTaskManager : ObjectiveC.NSObject { + @objc public static var taskHandler: OneSignalOSCore.OSBackgroundTaskHandler? + @objc public static func beginBackgroundTask(_ taskIdentifier: Swift.String) + @objc public static func endBackgroundTask(_ taskIdentifier: Swift.String) + @objc public static func setTaskInvalid(_ taskIdentifier: Swift.String) + @objc override dynamic public init() + @objc deinit +} +public protocol OSModelStoreListener : OneSignalOSCore.OSModelStoreChangedHandler { + associatedtype TModel : OneSignalOSCore.OSModel + var store: OneSignalOSCore.OSModelStore { get } + init(store: OneSignalOSCore.OSModelStore) + func getAddModelDelta(_ model: Self.TModel) -> OneSignalOSCore.OSDelta? + func getRemoveModelDelta(_ model: Self.TModel) -> OneSignalOSCore.OSDelta? + func getUpdateModelDelta(_ args: OneSignalOSCore.OSModelChangedArgs) -> OneSignalOSCore.OSDelta? +} +extension OneSignalOSCore.OSModelStoreListener { + public func start() + public func onAdded(_ model: OneSignalOSCore.OSModel) + public func onUpdated(_ args: OneSignalOSCore.OSModelChangedArgs) + public func onRemoved(_ model: OneSignalOSCore.OSModel) +} +public protocol OSModelStoreChangedHandler { + func onAdded(_ model: OneSignalOSCore.OSModel) + func onUpdated(_ args: OneSignalOSCore.OSModelChangedArgs) + func onRemoved(_ model: OneSignalOSCore.OSModel) +} +@objc open class OSDelta : ObjectiveC.NSObject, Foundation.NSCoding { + final public let name: Swift.String + final public let deltaId: Swift.String + final public let timestamp: Foundation.Date + public var model: OneSignalOSCore.OSModel + final public let property: Swift.String + final public let value: Any + @objc override dynamic open var description: Swift.String { + @objc get + } + public init(name: Swift.String, model: OneSignalOSCore.OSModel, property: Swift.String, value: Any) + @objc public func encode(with coder: Foundation.NSCoder) + @objc required public init?(coder: Foundation.NSCoder) + @objc deinit +} +@objc @_hasMissingDesignatedInitializers public class OSModelChangedArgs : ObjectiveC.NSObject { + final public let model: OneSignalOSCore.OSModel + final public let property: Swift.String + final public let newValue: Any + @objc override dynamic public var description: Swift.String { + @objc get + } + @objc deinit +} +public protocol OSModelChangedHandler { + func onModelUpdated(args: OneSignalOSCore.OSModelChangedArgs, hydrating: Swift.Bool) +} +public protocol OSOperationExecutor { + var supportedDeltas: [Swift.String] { get } + var deltaQueue: [OneSignalOSCore.OSDelta] { get } + func enqueueDelta(_ delta: OneSignalOSCore.OSDelta) + func cacheDeltaQueue() + func processDeltaQueue(inBackground: Swift.Bool) + func processRequestQueue(inBackground: Swift.Bool) +} diff --git a/iOS_SDK/OneSignalSDK/OneSignal_OSCore/OneSignalOSCore.xcframework/ios-arm64/OneSignalOSCore.framework/Modules/OneSignalOSCore.swiftmodule/arm64-apple-ios.swiftdoc b/iOS_SDK/OneSignalSDK/OneSignal_OSCore/OneSignalOSCore.xcframework/ios-arm64/OneSignalOSCore.framework/Modules/OneSignalOSCore.swiftmodule/arm64-apple-ios.swiftdoc new file mode 100644 index 000000000..1f8477ecc Binary files /dev/null and b/iOS_SDK/OneSignalSDK/OneSignal_OSCore/OneSignalOSCore.xcframework/ios-arm64/OneSignalOSCore.framework/Modules/OneSignalOSCore.swiftmodule/arm64-apple-ios.swiftdoc differ diff --git a/iOS_SDK/OneSignalSDK/OneSignal_OSCore/OneSignalOSCore.xcframework/ios-arm64/OneSignalOSCore.framework/Modules/OneSignalOSCore.swiftmodule/arm64-apple-ios.swiftinterface b/iOS_SDK/OneSignalSDK/OneSignal_OSCore/OneSignalOSCore.xcframework/ios-arm64/OneSignalOSCore.framework/Modules/OneSignalOSCore.swiftmodule/arm64-apple-ios.swiftinterface new file mode 100644 index 000000000..de496853b --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignal_OSCore/OneSignalOSCore.xcframework/ios-arm64/OneSignalOSCore.framework/Modules/OneSignalOSCore.swiftmodule/arm64-apple-ios.swiftinterface @@ -0,0 +1,118 @@ +// swift-interface-format-version: 1.0 +// swift-compiler-version: Apple Swift version 5.7.1 (swiftlang-5.7.1.135.3 clang-1400.0.29.51) +// swift-module-flags: -target arm64-apple-ios11.0 -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -O -module-name OneSignalOSCore +// swift-module-flags-ignorable: -enable-bare-slash-regex +import Foundation +import OneSignalCore +@_exported import OneSignalOSCore +import Swift +import _Concurrency +import _StringProcessing +@objc @_inheritsConvenienceInitializers public class OSOperationRepo : ObjectiveC.NSObject { + public static let sharedInstance: OneSignalOSCore.OSOperationRepo + public var paused: Swift.Bool + public func start() + public func addExecutor(_ executor: OneSignalOSCore.OSOperationExecutor) + @objc public func flushDeltaQueue(inBackground: Swift.Bool = false) + @objc override dynamic public init() + @objc deinit +} +@_inheritsConvenienceInitializers public class OSEventProducer : ObjectiveC.NSObject { + public func subscribe(_ handler: THandler) + public func unsubscribe(_ handler: THandler) + public func fire(callback: (THandler) -> Swift.Void) + @objc override dynamic public init() + @objc deinit +} +open class OSModelStore : ObjectiveC.NSObject where TModel : OneSignalOSCore.OSModel { + public init(changeSubscription: OneSignalOSCore.OSEventProducer, storeKey: Swift.String) + public func registerAsUserObserver() -> OneSignalOSCore.OSModelStore + @objc deinit + public func getModel(key: Swift.String) -> TModel? + public func getModel(modelId: Swift.String) -> TModel? + public func getModels() -> [Swift.String : TModel] + public func add(id: Swift.String, model: TModel, hydrating: Swift.Bool) + public func remove(_ id: Swift.String) + public func clearModelsFromStore() +} +extension OneSignalOSCore.OSModelStore : OneSignalOSCore.OSModelChangedHandler { + public func onModelUpdated(args: OneSignalOSCore.OSModelChangedArgs, hydrating: Swift.Bool) +} +@objc open class OSModel : ObjectiveC.NSObject, Foundation.NSCoding { + final public let modelId: Swift.String + public var changeNotifier: OneSignalOSCore.OSEventProducer + public init(changeNotifier: OneSignalOSCore.OSEventProducer) + @objc open func encode(with coder: Foundation.NSCoder) + @objc required public init?(coder: Foundation.NSCoder) + public func set(property: Swift.String, newValue: T) + public func hydrate(_ response: [Swift.String : Any]) + open func hydrateModel(_ response: [Swift.String : Any]) + @objc deinit +} +@objc public protocol OSBackgroundTaskHandler { + @objc func beginBackgroundTask(_ taskIdentifier: Swift.String) + @objc func endBackgroundTask(_ taskIdentifier: Swift.String) + @objc func setTaskInvalid(_ taskIdentifier: Swift.String) +} +@_inheritsConvenienceInitializers @objc public class OSBackgroundTaskManager : ObjectiveC.NSObject { + @objc public static var taskHandler: OneSignalOSCore.OSBackgroundTaskHandler? + @objc public static func beginBackgroundTask(_ taskIdentifier: Swift.String) + @objc public static func endBackgroundTask(_ taskIdentifier: Swift.String) + @objc public static func setTaskInvalid(_ taskIdentifier: Swift.String) + @objc override dynamic public init() + @objc deinit +} +public protocol OSModelStoreListener : OneSignalOSCore.OSModelStoreChangedHandler { + associatedtype TModel : OneSignalOSCore.OSModel + var store: OneSignalOSCore.OSModelStore { get } + init(store: OneSignalOSCore.OSModelStore) + func getAddModelDelta(_ model: Self.TModel) -> OneSignalOSCore.OSDelta? + func getRemoveModelDelta(_ model: Self.TModel) -> OneSignalOSCore.OSDelta? + func getUpdateModelDelta(_ args: OneSignalOSCore.OSModelChangedArgs) -> OneSignalOSCore.OSDelta? +} +extension OneSignalOSCore.OSModelStoreListener { + public func start() + public func onAdded(_ model: OneSignalOSCore.OSModel) + public func onUpdated(_ args: OneSignalOSCore.OSModelChangedArgs) + public func onRemoved(_ model: OneSignalOSCore.OSModel) +} +public protocol OSModelStoreChangedHandler { + func onAdded(_ model: OneSignalOSCore.OSModel) + func onUpdated(_ args: OneSignalOSCore.OSModelChangedArgs) + func onRemoved(_ model: OneSignalOSCore.OSModel) +} +@objc open class OSDelta : ObjectiveC.NSObject, Foundation.NSCoding { + final public let name: Swift.String + final public let deltaId: Swift.String + final public let timestamp: Foundation.Date + public var model: OneSignalOSCore.OSModel + final public let property: Swift.String + final public let value: Any + @objc override dynamic open var description: Swift.String { + @objc get + } + public init(name: Swift.String, model: OneSignalOSCore.OSModel, property: Swift.String, value: Any) + @objc public func encode(with coder: Foundation.NSCoder) + @objc required public init?(coder: Foundation.NSCoder) + @objc deinit +} +@objc @_hasMissingDesignatedInitializers public class OSModelChangedArgs : ObjectiveC.NSObject { + final public let model: OneSignalOSCore.OSModel + final public let property: Swift.String + final public let newValue: Any + @objc override dynamic public var description: Swift.String { + @objc get + } + @objc deinit +} +public protocol OSModelChangedHandler { + func onModelUpdated(args: OneSignalOSCore.OSModelChangedArgs, hydrating: Swift.Bool) +} +public protocol OSOperationExecutor { + var supportedDeltas: [Swift.String] { get } + var deltaQueue: [OneSignalOSCore.OSDelta] { get } + func enqueueDelta(_ delta: OneSignalOSCore.OSDelta) + func cacheDeltaQueue() + func processDeltaQueue(inBackground: Swift.Bool) + func processRequestQueue(inBackground: Swift.Bool) +} diff --git a/iOS_SDK/OneSignalSDK/OneSignal_OSCore/OneSignalOSCore.xcframework/ios-arm64/OneSignalOSCore.framework/Modules/module.modulemap b/iOS_SDK/OneSignalSDK/OneSignal_OSCore/OneSignalOSCore.xcframework/ios-arm64/OneSignalOSCore.framework/Modules/module.modulemap new file mode 100644 index 000000000..efd705b1d --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignal_OSCore/OneSignalOSCore.xcframework/ios-arm64/OneSignalOSCore.framework/Modules/module.modulemap @@ -0,0 +1,11 @@ +framework module OneSignalOSCore { + umbrella header "OneSignalOSCore.h" + + export * + module * { export * } +} + +module OneSignalOSCore.Swift { + header "OneSignalOSCore-Swift.h" + requires objc +} diff --git a/iOS_SDK/OneSignalSDK/OneSignal_OSCore/OneSignalOSCore.xcframework/ios-arm64/OneSignalOSCore.framework/OneSignalOSCore b/iOS_SDK/OneSignalSDK/OneSignal_OSCore/OneSignalOSCore.xcframework/ios-arm64/OneSignalOSCore.framework/OneSignalOSCore new file mode 100755 index 000000000..e32127cc7 Binary files /dev/null and b/iOS_SDK/OneSignalSDK/OneSignal_OSCore/OneSignalOSCore.xcframework/ios-arm64/OneSignalOSCore.framework/OneSignalOSCore differ diff --git a/iOS_SDK/OneSignalSDK/OneSignal_OSCore/OneSignalOSCore.xcframework/ios-arm64/OneSignalOSCore.framework/_CodeSignature/CodeResources b/iOS_SDK/OneSignalSDK/OneSignal_OSCore/OneSignalOSCore.xcframework/ios-arm64/OneSignalOSCore.framework/_CodeSignature/CodeResources new file mode 100644 index 000000000..8af10bd27 --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignal_OSCore/OneSignalOSCore.xcframework/ios-arm64/OneSignalOSCore.framework/_CodeSignature/CodeResources @@ -0,0 +1,190 @@ + + + + + files + + Headers/OneSignalOSCore-Swift.h + + vcuzpm3yPTvKD3eaiJ9Zh6vN6KU= + + Headers/OneSignalOSCore.h + + NPNe/ZRA14AwHLWAugk3qv0+YqQ= + + Info.plist + + NvwgFxDE2/g7QdF3s8XSo15M01Q= + + Modules/OneSignalOSCore.swiftmodule/arm64-apple-ios.abi.json + + J1nOVoscLfC7NFDlVBrjPhd0ZoE= + + Modules/OneSignalOSCore.swiftmodule/arm64-apple-ios.private.swiftinterface + + KtC7av0cWXT/ZdpyhMHzPZrc7Ao= + + Modules/OneSignalOSCore.swiftmodule/arm64-apple-ios.swiftdoc + + I9rNsae8xR8i8gtsiUho0ItFQE8= + + Modules/OneSignalOSCore.swiftmodule/arm64-apple-ios.swiftinterface + + KtC7av0cWXT/ZdpyhMHzPZrc7Ao= + + Modules/OneSignalOSCore.swiftmodule/arm64-apple-ios.swiftmodule + + 4icRfFTJVWhOAPp7JwsgcKl3Okk= + + Modules/module.modulemap + + 2Kj2K1hz5KUjSlkdSNvCqAGr0Xg= + + + files2 + + Headers/OneSignalOSCore-Swift.h + + hash2 + + OYH3xZzcg/qBwbnpURg0qS3D4jW4cFUMuapIeJIf51o= + + + Headers/OneSignalOSCore.h + + hash2 + + MsJrzFE2HsCHUBJgwVudBxIOtUFFRPJU9Vq9bsNV27A= + + + Modules/OneSignalOSCore.swiftmodule/arm64-apple-ios.abi.json + + hash2 + + d0MU7egJtbg5SGxs89SF+IoAkZRr6TFINtvxvBvXBJc= + + + Modules/OneSignalOSCore.swiftmodule/arm64-apple-ios.private.swiftinterface + + hash2 + + bbG51rW3JwQPve2QF+0JXvadMRPcGLXGVmlaQUoaCLc= + + + Modules/OneSignalOSCore.swiftmodule/arm64-apple-ios.swiftdoc + + hash2 + + F+oWZrSwvhD7deK3iQ1J7E9np7OGvfTaA13SJliU/qE= + + + Modules/OneSignalOSCore.swiftmodule/arm64-apple-ios.swiftinterface + + hash2 + + bbG51rW3JwQPve2QF+0JXvadMRPcGLXGVmlaQUoaCLc= + + + Modules/OneSignalOSCore.swiftmodule/arm64-apple-ios.swiftmodule + + hash2 + + RZQwDvBLNjUf6TBSu/ycgRmt//E961B599Ys2R39RTQ= + + + Modules/module.modulemap + + hash2 + + x91khB5nqURf4ltg1dva7WEuxxdOwv8OyWtDKvlKnYg= + + + + rules + + ^.* + + ^.*\.lproj/ + + optional + + weight + 1000 + + ^.*\.lproj/locversion.plist$ + + omit + + weight + 1100 + + ^Base\.lproj/ + + weight + 1010 + + ^version.plist$ + + + rules2 + + .*\.dSYM($|/) + + weight + 11 + + ^(.*/)?\.DS_Store$ + + omit + + weight + 2000 + + ^.* + + ^.*\.lproj/ + + optional + + weight + 1000 + + ^.*\.lproj/locversion.plist$ + + omit + + weight + 1100 + + ^Base\.lproj/ + + weight + 1010 + + ^Info\.plist$ + + omit + + weight + 20 + + ^PkgInfo$ + + omit + + weight + 20 + + ^embedded\.provisionprofile$ + + weight + 20 + + ^version\.plist$ + + weight + 20 + + + + diff --git a/iOS_SDK/OneSignalSDK/OneSignal_OSCore/OneSignalOSCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalOSCore.framework/Headers b/iOS_SDK/OneSignalSDK/OneSignal_OSCore/OneSignalOSCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalOSCore.framework/Headers new file mode 120000 index 000000000..a177d2a6b --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignal_OSCore/OneSignalOSCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalOSCore.framework/Headers @@ -0,0 +1 @@ +Versions/Current/Headers \ No newline at end of file diff --git a/iOS_SDK/OneSignalSDK/OneSignal_OSCore/OneSignalOSCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalOSCore.framework/Modules b/iOS_SDK/OneSignalSDK/OneSignal_OSCore/OneSignalOSCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalOSCore.framework/Modules new file mode 120000 index 000000000..5736f3186 --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignal_OSCore/OneSignalOSCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalOSCore.framework/Modules @@ -0,0 +1 @@ +Versions/Current/Modules \ No newline at end of file diff --git a/iOS_SDK/OneSignalSDK/OneSignal_OSCore/OneSignalOSCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalOSCore.framework/OneSignalOSCore b/iOS_SDK/OneSignalSDK/OneSignal_OSCore/OneSignalOSCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalOSCore.framework/OneSignalOSCore new file mode 120000 index 000000000..b74928a50 --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignal_OSCore/OneSignalOSCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalOSCore.framework/OneSignalOSCore @@ -0,0 +1 @@ +Versions/Current/OneSignalOSCore \ No newline at end of file diff --git a/iOS_SDK/OneSignalSDK/OneSignal_OSCore/OneSignalOSCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalOSCore.framework/Resources b/iOS_SDK/OneSignalSDK/OneSignal_OSCore/OneSignalOSCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalOSCore.framework/Resources new file mode 120000 index 000000000..953ee36f3 --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignal_OSCore/OneSignalOSCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalOSCore.framework/Resources @@ -0,0 +1 @@ +Versions/Current/Resources \ No newline at end of file diff --git a/iOS_SDK/OneSignalSDK/OneSignal_OSCore/OneSignalOSCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalOSCore.framework/Versions/A/Headers/OneSignalOSCore-Swift.h b/iOS_SDK/OneSignalSDK/OneSignal_OSCore/OneSignalOSCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalOSCore.framework/Versions/A/Headers/OneSignalOSCore-Swift.h new file mode 100644 index 000000000..3609a7278 --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignal_OSCore/OneSignalOSCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalOSCore.framework/Versions/A/Headers/OneSignalOSCore-Swift.h @@ -0,0 +1,644 @@ +#if 0 +#elif defined(__arm64__) && __arm64__ +// Generated by Apple Swift version 5.7.1 (swiftlang-5.7.1.135.3 clang-1400.0.29.51) +#ifndef ONESIGNALOSCORE_SWIFT_H +#define ONESIGNALOSCORE_SWIFT_H +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wgcc-compat" + +#if !defined(__has_include) +# define __has_include(x) 0 +#endif +#if !defined(__has_attribute) +# define __has_attribute(x) 0 +#endif +#if !defined(__has_feature) +# define __has_feature(x) 0 +#endif +#if !defined(__has_warning) +# define __has_warning(x) 0 +#endif + +#if __has_include() +# include +#endif + +#pragma clang diagnostic ignored "-Wduplicate-method-match" +#pragma clang diagnostic ignored "-Wauto-import" +#if defined(__OBJC__) +#include +#endif +#if defined(__cplusplus) +#include +#include +#include +#else +#include +#include +#include +#endif + +#if !defined(SWIFT_TYPEDEFS) +# define SWIFT_TYPEDEFS 1 +# if __has_include() +# include +# elif !defined(__cplusplus) +typedef uint_least16_t char16_t; +typedef uint_least32_t char32_t; +# endif +typedef float swift_float2 __attribute__((__ext_vector_type__(2))); +typedef float swift_float3 __attribute__((__ext_vector_type__(3))); +typedef float swift_float4 __attribute__((__ext_vector_type__(4))); +typedef double swift_double2 __attribute__((__ext_vector_type__(2))); +typedef double swift_double3 __attribute__((__ext_vector_type__(3))); +typedef double swift_double4 __attribute__((__ext_vector_type__(4))); +typedef int swift_int2 __attribute__((__ext_vector_type__(2))); +typedef int swift_int3 __attribute__((__ext_vector_type__(3))); +typedef int swift_int4 __attribute__((__ext_vector_type__(4))); +typedef unsigned int swift_uint2 __attribute__((__ext_vector_type__(2))); +typedef unsigned int swift_uint3 __attribute__((__ext_vector_type__(3))); +typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4))); +#endif + +#if !defined(SWIFT_PASTE) +# define SWIFT_PASTE_HELPER(x, y) x##y +# define SWIFT_PASTE(x, y) SWIFT_PASTE_HELPER(x, y) +#endif +#if !defined(SWIFT_METATYPE) +# define SWIFT_METATYPE(X) Class +#endif +#if !defined(SWIFT_CLASS_PROPERTY) +# if __has_feature(objc_class_property) +# define SWIFT_CLASS_PROPERTY(...) __VA_ARGS__ +# else +# define SWIFT_CLASS_PROPERTY(...) +# endif +#endif + +#if __has_attribute(objc_runtime_name) +# define SWIFT_RUNTIME_NAME(X) __attribute__((objc_runtime_name(X))) +#else +# define SWIFT_RUNTIME_NAME(X) +#endif +#if __has_attribute(swift_name) +# define SWIFT_COMPILE_NAME(X) __attribute__((swift_name(X))) +#else +# define SWIFT_COMPILE_NAME(X) +#endif +#if __has_attribute(objc_method_family) +# define SWIFT_METHOD_FAMILY(X) __attribute__((objc_method_family(X))) +#else +# define SWIFT_METHOD_FAMILY(X) +#endif +#if __has_attribute(noescape) +# define SWIFT_NOESCAPE __attribute__((noescape)) +#else +# define SWIFT_NOESCAPE +#endif +#if __has_attribute(ns_consumed) +# define SWIFT_RELEASES_ARGUMENT __attribute__((ns_consumed)) +#else +# define SWIFT_RELEASES_ARGUMENT +#endif +#if __has_attribute(warn_unused_result) +# define SWIFT_WARN_UNUSED_RESULT __attribute__((warn_unused_result)) +#else +# define SWIFT_WARN_UNUSED_RESULT +#endif +#if __has_attribute(noreturn) +# define SWIFT_NORETURN __attribute__((noreturn)) +#else +# define SWIFT_NORETURN +#endif +#if !defined(SWIFT_CLASS_EXTRA) +# define SWIFT_CLASS_EXTRA +#endif +#if !defined(SWIFT_PROTOCOL_EXTRA) +# define SWIFT_PROTOCOL_EXTRA +#endif +#if !defined(SWIFT_ENUM_EXTRA) +# define SWIFT_ENUM_EXTRA +#endif +#if !defined(SWIFT_CLASS) +# if __has_attribute(objc_subclassing_restricted) +# define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_CLASS_EXTRA +# define SWIFT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA +# else +# define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA +# define SWIFT_CLASS_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA +# endif +#endif +#if !defined(SWIFT_RESILIENT_CLASS) +# if __has_attribute(objc_class_stub) +# define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME) __attribute__((objc_class_stub)) +# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_class_stub)) SWIFT_CLASS_NAMED(SWIFT_NAME) +# else +# define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME) +# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) SWIFT_CLASS_NAMED(SWIFT_NAME) +# endif +#endif + +#if !defined(SWIFT_PROTOCOL) +# define SWIFT_PROTOCOL(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA +# define SWIFT_PROTOCOL_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA +#endif + +#if !defined(SWIFT_EXTENSION) +# define SWIFT_EXTENSION(M) SWIFT_PASTE(M##_Swift_, __LINE__) +#endif + +#if !defined(OBJC_DESIGNATED_INITIALIZER) +# if __has_attribute(objc_designated_initializer) +# define OBJC_DESIGNATED_INITIALIZER __attribute__((objc_designated_initializer)) +# else +# define OBJC_DESIGNATED_INITIALIZER +# endif +#endif +#if !defined(SWIFT_ENUM_ATTR) +# if defined(__has_attribute) && __has_attribute(enum_extensibility) +# define SWIFT_ENUM_ATTR(_extensibility) __attribute__((enum_extensibility(_extensibility))) +# else +# define SWIFT_ENUM_ATTR(_extensibility) +# endif +#endif +#if !defined(SWIFT_ENUM) +# define SWIFT_ENUM(_type, _name, _extensibility) enum _name : _type _name; enum SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type +# if __has_feature(generalized_swift_name) +# define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) enum _name : _type _name SWIFT_COMPILE_NAME(SWIFT_NAME); enum SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type +# else +# define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) SWIFT_ENUM(_type, _name, _extensibility) +# endif +#endif +#if !defined(SWIFT_UNAVAILABLE) +# define SWIFT_UNAVAILABLE __attribute__((unavailable)) +#endif +#if !defined(SWIFT_UNAVAILABLE_MSG) +# define SWIFT_UNAVAILABLE_MSG(msg) __attribute__((unavailable(msg))) +#endif +#if !defined(SWIFT_AVAILABILITY) +# define SWIFT_AVAILABILITY(plat, ...) __attribute__((availability(plat, __VA_ARGS__))) +#endif +#if !defined(SWIFT_WEAK_IMPORT) +# define SWIFT_WEAK_IMPORT __attribute__((weak_import)) +#endif +#if !defined(SWIFT_DEPRECATED) +# define SWIFT_DEPRECATED __attribute__((deprecated)) +#endif +#if !defined(SWIFT_DEPRECATED_MSG) +# define SWIFT_DEPRECATED_MSG(...) __attribute__((deprecated(__VA_ARGS__))) +#endif +#if __has_feature(attribute_diagnose_if_objc) +# define SWIFT_DEPRECATED_OBJC(Msg) __attribute__((diagnose_if(1, Msg, "warning"))) +#else +# define SWIFT_DEPRECATED_OBJC(Msg) SWIFT_DEPRECATED_MSG(Msg) +#endif +#if defined(__OBJC__) +#if !defined(IBSegueAction) +# define IBSegueAction +#endif +#endif +#if !defined(SWIFT_EXTERN) +# if defined(__cplusplus) +# define SWIFT_EXTERN extern "C" +# else +# define SWIFT_EXTERN extern +# endif +#endif +#if !defined(SWIFT_CALL) +# define SWIFT_CALL __attribute__((swiftcall)) +#endif +#if defined(__cplusplus) +#if !defined(SWIFT_NOEXCEPT) +# define SWIFT_NOEXCEPT noexcept +#endif +#else +#if !defined(SWIFT_NOEXCEPT) +# define SWIFT_NOEXCEPT +#endif +#endif +#if defined(__cplusplus) +#if !defined(SWIFT_CXX_INT_DEFINED) +#define SWIFT_CXX_INT_DEFINED +namespace swift { +using Int = ptrdiff_t; +using UInt = size_t; +} +#endif +#endif +#if defined(__OBJC__) +#if __has_feature(modules) +#if __has_warning("-Watimport-in-framework-header") +#pragma clang diagnostic ignored "-Watimport-in-framework-header" +#endif +@import Foundation; +@import ObjectiveC; +#endif + +#endif +#pragma clang diagnostic ignored "-Wproperty-attribute-mismatch" +#pragma clang diagnostic ignored "-Wduplicate-method-arg" +#if __has_warning("-Wpragma-clang-attribute") +# pragma clang diagnostic ignored "-Wpragma-clang-attribute" +#endif +#pragma clang diagnostic ignored "-Wunknown-pragmas" +#pragma clang diagnostic ignored "-Wnullability" +#pragma clang diagnostic ignored "-Wdollar-in-identifier-extension" + +#if __has_attribute(external_source_symbol) +# pragma push_macro("any") +# undef any +# pragma clang attribute push(__attribute__((external_source_symbol(language="Swift", defined_in="OneSignalOSCore",generated_declaration))), apply_to=any(function,enum,objc_interface,objc_category,objc_protocol)) +# pragma pop_macro("any") +#endif + +#if defined(__OBJC__) +@class NSString; + +SWIFT_PROTOCOL("_TtP15OneSignalOSCore23OSBackgroundTaskHandler_") +@protocol OSBackgroundTaskHandler +- (void)beginBackgroundTask:(NSString * _Nonnull)taskIdentifier; +- (void)endBackgroundTask:(NSString * _Nonnull)taskIdentifier; +- (void)setTaskInvalid:(NSString * _Nonnull)taskIdentifier; +@end + + +SWIFT_CLASS("_TtC15OneSignalOSCore23OSBackgroundTaskManager") +@interface OSBackgroundTaskManager : NSObject +SWIFT_CLASS_PROPERTY(@property (nonatomic, class, strong) id _Nullable taskHandler;) ++ (id _Nullable)taskHandler SWIFT_WARN_UNUSED_RESULT; ++ (void)setTaskHandler:(id _Nullable)value; ++ (void)beginBackgroundTask:(NSString * _Nonnull)taskIdentifier; ++ (void)endBackgroundTask:(NSString * _Nonnull)taskIdentifier; ++ (void)setTaskInvalid:(NSString * _Nonnull)taskIdentifier; +- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER; +@end + +@class NSCoder; + +SWIFT_CLASS("_TtC15OneSignalOSCore7OSDelta") +@interface OSDelta : NSObject +@property (nonatomic, readonly, copy) NSString * _Nonnull description; +- (void)encodeWithCoder:(NSCoder * _Nonnull)coder; +- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)coder OBJC_DESIGNATED_INITIALIZER; +- (nonnull instancetype)init SWIFT_UNAVAILABLE; ++ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); +@end + + +SWIFT_CLASS("_TtC15OneSignalOSCore7OSModel") +@interface OSModel : NSObject +- (void)encodeWithCoder:(NSCoder * _Nonnull)coder; +- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)coder OBJC_DESIGNATED_INITIALIZER; +- (nonnull instancetype)init SWIFT_UNAVAILABLE; ++ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); +@end + + +SWIFT_CLASS("_TtC15OneSignalOSCore18OSModelChangedArgs") +@interface OSModelChangedArgs : NSObject +@property (nonatomic, readonly, copy) NSString * _Nonnull description; +- (nonnull instancetype)init SWIFT_UNAVAILABLE; ++ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); +@end + + +/// The OSOperationRepo is a static singleton. +/// OSDeltas are enqueued when model store observers observe changes to their models, and sorted to their appropriate executors. +SWIFT_CLASS("_TtC15OneSignalOSCore15OSOperationRepo") +@interface OSOperationRepo : NSObject +- (void)flushDeltaQueueInBackground:(BOOL)inBackground; +- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER; +@end + +#endif +#if defined(__cplusplus) +#endif +#if __has_attribute(external_source_symbol) +# pragma clang attribute pop +#endif +#pragma clang diagnostic pop +#endif + +#elif defined(__x86_64__) && __x86_64__ +// Generated by Apple Swift version 5.7.1 (swiftlang-5.7.1.135.3 clang-1400.0.29.51) +#ifndef ONESIGNALOSCORE_SWIFT_H +#define ONESIGNALOSCORE_SWIFT_H +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wgcc-compat" + +#if !defined(__has_include) +# define __has_include(x) 0 +#endif +#if !defined(__has_attribute) +# define __has_attribute(x) 0 +#endif +#if !defined(__has_feature) +# define __has_feature(x) 0 +#endif +#if !defined(__has_warning) +# define __has_warning(x) 0 +#endif + +#if __has_include() +# include +#endif + +#pragma clang diagnostic ignored "-Wduplicate-method-match" +#pragma clang diagnostic ignored "-Wauto-import" +#if defined(__OBJC__) +#include +#endif +#if defined(__cplusplus) +#include +#include +#include +#else +#include +#include +#include +#endif + +#if !defined(SWIFT_TYPEDEFS) +# define SWIFT_TYPEDEFS 1 +# if __has_include() +# include +# elif !defined(__cplusplus) +typedef uint_least16_t char16_t; +typedef uint_least32_t char32_t; +# endif +typedef float swift_float2 __attribute__((__ext_vector_type__(2))); +typedef float swift_float3 __attribute__((__ext_vector_type__(3))); +typedef float swift_float4 __attribute__((__ext_vector_type__(4))); +typedef double swift_double2 __attribute__((__ext_vector_type__(2))); +typedef double swift_double3 __attribute__((__ext_vector_type__(3))); +typedef double swift_double4 __attribute__((__ext_vector_type__(4))); +typedef int swift_int2 __attribute__((__ext_vector_type__(2))); +typedef int swift_int3 __attribute__((__ext_vector_type__(3))); +typedef int swift_int4 __attribute__((__ext_vector_type__(4))); +typedef unsigned int swift_uint2 __attribute__((__ext_vector_type__(2))); +typedef unsigned int swift_uint3 __attribute__((__ext_vector_type__(3))); +typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4))); +#endif + +#if !defined(SWIFT_PASTE) +# define SWIFT_PASTE_HELPER(x, y) x##y +# define SWIFT_PASTE(x, y) SWIFT_PASTE_HELPER(x, y) +#endif +#if !defined(SWIFT_METATYPE) +# define SWIFT_METATYPE(X) Class +#endif +#if !defined(SWIFT_CLASS_PROPERTY) +# if __has_feature(objc_class_property) +# define SWIFT_CLASS_PROPERTY(...) __VA_ARGS__ +# else +# define SWIFT_CLASS_PROPERTY(...) +# endif +#endif + +#if __has_attribute(objc_runtime_name) +# define SWIFT_RUNTIME_NAME(X) __attribute__((objc_runtime_name(X))) +#else +# define SWIFT_RUNTIME_NAME(X) +#endif +#if __has_attribute(swift_name) +# define SWIFT_COMPILE_NAME(X) __attribute__((swift_name(X))) +#else +# define SWIFT_COMPILE_NAME(X) +#endif +#if __has_attribute(objc_method_family) +# define SWIFT_METHOD_FAMILY(X) __attribute__((objc_method_family(X))) +#else +# define SWIFT_METHOD_FAMILY(X) +#endif +#if __has_attribute(noescape) +# define SWIFT_NOESCAPE __attribute__((noescape)) +#else +# define SWIFT_NOESCAPE +#endif +#if __has_attribute(ns_consumed) +# define SWIFT_RELEASES_ARGUMENT __attribute__((ns_consumed)) +#else +# define SWIFT_RELEASES_ARGUMENT +#endif +#if __has_attribute(warn_unused_result) +# define SWIFT_WARN_UNUSED_RESULT __attribute__((warn_unused_result)) +#else +# define SWIFT_WARN_UNUSED_RESULT +#endif +#if __has_attribute(noreturn) +# define SWIFT_NORETURN __attribute__((noreturn)) +#else +# define SWIFT_NORETURN +#endif +#if !defined(SWIFT_CLASS_EXTRA) +# define SWIFT_CLASS_EXTRA +#endif +#if !defined(SWIFT_PROTOCOL_EXTRA) +# define SWIFT_PROTOCOL_EXTRA +#endif +#if !defined(SWIFT_ENUM_EXTRA) +# define SWIFT_ENUM_EXTRA +#endif +#if !defined(SWIFT_CLASS) +# if __has_attribute(objc_subclassing_restricted) +# define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_CLASS_EXTRA +# define SWIFT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA +# else +# define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA +# define SWIFT_CLASS_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA +# endif +#endif +#if !defined(SWIFT_RESILIENT_CLASS) +# if __has_attribute(objc_class_stub) +# define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME) __attribute__((objc_class_stub)) +# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_class_stub)) SWIFT_CLASS_NAMED(SWIFT_NAME) +# else +# define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME) +# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) SWIFT_CLASS_NAMED(SWIFT_NAME) +# endif +#endif + +#if !defined(SWIFT_PROTOCOL) +# define SWIFT_PROTOCOL(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA +# define SWIFT_PROTOCOL_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA +#endif + +#if !defined(SWIFT_EXTENSION) +# define SWIFT_EXTENSION(M) SWIFT_PASTE(M##_Swift_, __LINE__) +#endif + +#if !defined(OBJC_DESIGNATED_INITIALIZER) +# if __has_attribute(objc_designated_initializer) +# define OBJC_DESIGNATED_INITIALIZER __attribute__((objc_designated_initializer)) +# else +# define OBJC_DESIGNATED_INITIALIZER +# endif +#endif +#if !defined(SWIFT_ENUM_ATTR) +# if defined(__has_attribute) && __has_attribute(enum_extensibility) +# define SWIFT_ENUM_ATTR(_extensibility) __attribute__((enum_extensibility(_extensibility))) +# else +# define SWIFT_ENUM_ATTR(_extensibility) +# endif +#endif +#if !defined(SWIFT_ENUM) +# define SWIFT_ENUM(_type, _name, _extensibility) enum _name : _type _name; enum SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type +# if __has_feature(generalized_swift_name) +# define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) enum _name : _type _name SWIFT_COMPILE_NAME(SWIFT_NAME); enum SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type +# else +# define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) SWIFT_ENUM(_type, _name, _extensibility) +# endif +#endif +#if !defined(SWIFT_UNAVAILABLE) +# define SWIFT_UNAVAILABLE __attribute__((unavailable)) +#endif +#if !defined(SWIFT_UNAVAILABLE_MSG) +# define SWIFT_UNAVAILABLE_MSG(msg) __attribute__((unavailable(msg))) +#endif +#if !defined(SWIFT_AVAILABILITY) +# define SWIFT_AVAILABILITY(plat, ...) __attribute__((availability(plat, __VA_ARGS__))) +#endif +#if !defined(SWIFT_WEAK_IMPORT) +# define SWIFT_WEAK_IMPORT __attribute__((weak_import)) +#endif +#if !defined(SWIFT_DEPRECATED) +# define SWIFT_DEPRECATED __attribute__((deprecated)) +#endif +#if !defined(SWIFT_DEPRECATED_MSG) +# define SWIFT_DEPRECATED_MSG(...) __attribute__((deprecated(__VA_ARGS__))) +#endif +#if __has_feature(attribute_diagnose_if_objc) +# define SWIFT_DEPRECATED_OBJC(Msg) __attribute__((diagnose_if(1, Msg, "warning"))) +#else +# define SWIFT_DEPRECATED_OBJC(Msg) SWIFT_DEPRECATED_MSG(Msg) +#endif +#if defined(__OBJC__) +#if !defined(IBSegueAction) +# define IBSegueAction +#endif +#endif +#if !defined(SWIFT_EXTERN) +# if defined(__cplusplus) +# define SWIFT_EXTERN extern "C" +# else +# define SWIFT_EXTERN extern +# endif +#endif +#if !defined(SWIFT_CALL) +# define SWIFT_CALL __attribute__((swiftcall)) +#endif +#if defined(__cplusplus) +#if !defined(SWIFT_NOEXCEPT) +# define SWIFT_NOEXCEPT noexcept +#endif +#else +#if !defined(SWIFT_NOEXCEPT) +# define SWIFT_NOEXCEPT +#endif +#endif +#if defined(__cplusplus) +#if !defined(SWIFT_CXX_INT_DEFINED) +#define SWIFT_CXX_INT_DEFINED +namespace swift { +using Int = ptrdiff_t; +using UInt = size_t; +} +#endif +#endif +#if defined(__OBJC__) +#if __has_feature(modules) +#if __has_warning("-Watimport-in-framework-header") +#pragma clang diagnostic ignored "-Watimport-in-framework-header" +#endif +@import Foundation; +@import ObjectiveC; +#endif + +#endif +#pragma clang diagnostic ignored "-Wproperty-attribute-mismatch" +#pragma clang diagnostic ignored "-Wduplicate-method-arg" +#if __has_warning("-Wpragma-clang-attribute") +# pragma clang diagnostic ignored "-Wpragma-clang-attribute" +#endif +#pragma clang diagnostic ignored "-Wunknown-pragmas" +#pragma clang diagnostic ignored "-Wnullability" +#pragma clang diagnostic ignored "-Wdollar-in-identifier-extension" + +#if __has_attribute(external_source_symbol) +# pragma push_macro("any") +# undef any +# pragma clang attribute push(__attribute__((external_source_symbol(language="Swift", defined_in="OneSignalOSCore",generated_declaration))), apply_to=any(function,enum,objc_interface,objc_category,objc_protocol)) +# pragma pop_macro("any") +#endif + +#if defined(__OBJC__) +@class NSString; + +SWIFT_PROTOCOL("_TtP15OneSignalOSCore23OSBackgroundTaskHandler_") +@protocol OSBackgroundTaskHandler +- (void)beginBackgroundTask:(NSString * _Nonnull)taskIdentifier; +- (void)endBackgroundTask:(NSString * _Nonnull)taskIdentifier; +- (void)setTaskInvalid:(NSString * _Nonnull)taskIdentifier; +@end + + +SWIFT_CLASS("_TtC15OneSignalOSCore23OSBackgroundTaskManager") +@interface OSBackgroundTaskManager : NSObject +SWIFT_CLASS_PROPERTY(@property (nonatomic, class, strong) id _Nullable taskHandler;) ++ (id _Nullable)taskHandler SWIFT_WARN_UNUSED_RESULT; ++ (void)setTaskHandler:(id _Nullable)value; ++ (void)beginBackgroundTask:(NSString * _Nonnull)taskIdentifier; ++ (void)endBackgroundTask:(NSString * _Nonnull)taskIdentifier; ++ (void)setTaskInvalid:(NSString * _Nonnull)taskIdentifier; +- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER; +@end + +@class NSCoder; + +SWIFT_CLASS("_TtC15OneSignalOSCore7OSDelta") +@interface OSDelta : NSObject +@property (nonatomic, readonly, copy) NSString * _Nonnull description; +- (void)encodeWithCoder:(NSCoder * _Nonnull)coder; +- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)coder OBJC_DESIGNATED_INITIALIZER; +- (nonnull instancetype)init SWIFT_UNAVAILABLE; ++ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); +@end + + +SWIFT_CLASS("_TtC15OneSignalOSCore7OSModel") +@interface OSModel : NSObject +- (void)encodeWithCoder:(NSCoder * _Nonnull)coder; +- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)coder OBJC_DESIGNATED_INITIALIZER; +- (nonnull instancetype)init SWIFT_UNAVAILABLE; ++ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); +@end + + +SWIFT_CLASS("_TtC15OneSignalOSCore18OSModelChangedArgs") +@interface OSModelChangedArgs : NSObject +@property (nonatomic, readonly, copy) NSString * _Nonnull description; +- (nonnull instancetype)init SWIFT_UNAVAILABLE; ++ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); +@end + + +/// The OSOperationRepo is a static singleton. +/// OSDeltas are enqueued when model store observers observe changes to their models, and sorted to their appropriate executors. +SWIFT_CLASS("_TtC15OneSignalOSCore15OSOperationRepo") +@interface OSOperationRepo : NSObject +- (void)flushDeltaQueueInBackground:(BOOL)inBackground; +- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER; +@end + +#endif +#if defined(__cplusplus) +#endif +#if __has_attribute(external_source_symbol) +# pragma clang attribute pop +#endif +#pragma clang diagnostic pop +#endif + +#else +#error unsupported Swift architecture +#endif diff --git a/iOS_SDK/OneSignalSDK/OneSignal_OSCore/OneSignalOSCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalOSCore.framework/Versions/A/Headers/OneSignalOSCore.h b/iOS_SDK/OneSignalSDK/OneSignal_OSCore/OneSignalOSCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalOSCore.framework/Versions/A/Headers/OneSignalOSCore.h new file mode 100644 index 000000000..e1e4858b7 --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignal_OSCore/OneSignalOSCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalOSCore.framework/Versions/A/Headers/OneSignalOSCore.h @@ -0,0 +1,34 @@ +/* + Modified MIT License + + Copyright 2022 OneSignal + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + 1. The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + 2. All copies of substantial portions of the Software may only be used in connection + with services provided by OneSignal. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + */ + +#import + +//! Project version number for OneSignalOSCore. +FOUNDATION_EXPORT double OneSignalOSCoreVersionNumber; + +//! Project version string for OneSignalOSCore. +FOUNDATION_EXPORT const unsigned char OneSignalOSCoreVersionString[]; diff --git a/iOS_SDK/OneSignalSDK/OneSignal_OSCore/OneSignalOSCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalOSCore.framework/Versions/A/Modules/OneSignalOSCore.swiftmodule/arm64-apple-ios-macabi.abi.json b/iOS_SDK/OneSignalSDK/OneSignal_OSCore/OneSignalOSCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalOSCore.framework/Versions/A/Modules/OneSignalOSCore.swiftmodule/arm64-apple-ios-macabi.abi.json new file mode 100644 index 000000000..6cf802ba3 --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignal_OSCore/OneSignalOSCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalOSCore.framework/Versions/A/Modules/OneSignalOSCore.swiftmodule/arm64-apple-ios-macabi.abi.json @@ -0,0 +1,3662 @@ +{ + "ABIRoot": { + "kind": "Root", + "name": "TopLevel", + "printedName": "TopLevel", + "children": [ + { + "kind": "Import", + "name": "Foundation", + "printedName": "Foundation", + "declKind": "Import", + "moduleName": "OneSignalOSCore", + "declAttributes": [ + "RawDocComment" + ] + }, + { + "kind": "Import", + "name": "OneSignalCore", + "printedName": "OneSignalCore", + "declKind": "Import", + "moduleName": "OneSignalOSCore" + }, + { + "kind": "TypeDecl", + "name": "OSOperationRepo", + "printedName": "OSOperationRepo", + "children": [ + { + "kind": "Var", + "name": "sharedInstance", + "printedName": "sharedInstance", + "children": [ + { + "kind": "TypeNominal", + "name": "OSOperationRepo", + "printedName": "OneSignalOSCore.OSOperationRepo", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSOperationRepo" + } + ], + "declKind": "Var", + "usr": "s:15OneSignalOSCore15OSOperationRepoC14sharedInstanceACvpZ", + "mangledName": "$s15OneSignalOSCore15OSOperationRepoC14sharedInstanceACvpZ", + "moduleName": "OneSignalOSCore", + "static": true, + "declAttributes": [ + "HasInitialValue", + "Final", + "HasStorage", + "AccessControl" + ], + "isLet": true, + "hasStorage": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "OSOperationRepo", + "printedName": "OneSignalOSCore.OSOperationRepo", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSOperationRepo" + } + ], + "declKind": "Accessor", + "usr": "s:15OneSignalOSCore15OSOperationRepoC14sharedInstanceACvgZ", + "mangledName": "$s15OneSignalOSCore15OSOperationRepoC14sharedInstanceACvgZ", + "moduleName": "OneSignalOSCore", + "static": true, + "implicit": true, + "declAttributes": [ + "Final" + ], + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "paused", + "printedName": "paused", + "children": [ + { + "kind": "TypeNominal", + "name": "Bool", + "printedName": "Swift.Bool", + "usr": "s:Sb" + } + ], + "declKind": "Var", + "usr": "s:15OneSignalOSCore15OSOperationRepoC6pausedSbvp", + "mangledName": "$s15OneSignalOSCore15OSOperationRepoC6pausedSbvp", + "moduleName": "OneSignalOSCore", + "declAttributes": [ + "HasInitialValue", + "HasStorage", + "AccessControl" + ], + "hasStorage": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "Bool", + "printedName": "Swift.Bool", + "usr": "s:Sb" + } + ], + "declKind": "Accessor", + "usr": "s:15OneSignalOSCore15OSOperationRepoC6pausedSbvg", + "mangledName": "$s15OneSignalOSCore15OSOperationRepoC6pausedSbvg", + "moduleName": "OneSignalOSCore", + "implicit": true, + "accessorKind": "get" + }, + { + "kind": "Accessor", + "name": "Set", + "printedName": "Set()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "Bool", + "printedName": "Swift.Bool", + "usr": "s:Sb" + } + ], + "declKind": "Accessor", + "usr": "s:15OneSignalOSCore15OSOperationRepoC6pausedSbvs", + "mangledName": "$s15OneSignalOSCore15OSOperationRepoC6pausedSbvs", + "moduleName": "OneSignalOSCore", + "implicit": true, + "accessorKind": "set" + }, + { + "kind": "Accessor", + "name": "Modify", + "printedName": "Modify()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + } + ], + "declKind": "Accessor", + "usr": "s:15OneSignalOSCore15OSOperationRepoC6pausedSbvM", + "mangledName": "$s15OneSignalOSCore15OSOperationRepoC6pausedSbvM", + "moduleName": "OneSignalOSCore", + "implicit": true, + "accessorKind": "_modify" + } + ] + }, + { + "kind": "Function", + "name": "start", + "printedName": "start()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + } + ], + "declKind": "Func", + "usr": "s:15OneSignalOSCore15OSOperationRepoC5startyyF", + "mangledName": "$s15OneSignalOSCore15OSOperationRepoC5startyyF", + "moduleName": "OneSignalOSCore", + "declAttributes": [ + "AccessControl", + "RawDocComment" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "addExecutor", + "printedName": "addExecutor(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "OSOperationExecutor", + "printedName": "OneSignalOSCore.OSOperationExecutor", + "usr": "s:15OneSignalOSCore19OSOperationExecutorP" + } + ], + "declKind": "Func", + "usr": "s:15OneSignalOSCore15OSOperationRepoC11addExecutoryyAA0dG0_pF", + "mangledName": "$s15OneSignalOSCore15OSOperationRepoC11addExecutoryyAA0dG0_pF", + "moduleName": "OneSignalOSCore", + "declAttributes": [ + "AccessControl", + "RawDocComment" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "flushDeltaQueue", + "printedName": "flushDeltaQueue(inBackground:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "Bool", + "printedName": "Swift.Bool", + "hasDefaultArg": true, + "usr": "s:Sb" + } + ], + "declKind": "Func", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSOperationRepo(im)flushDeltaQueueInBackground:", + "mangledName": "$s15OneSignalOSCore15OSOperationRepoC15flushDeltaQueue12inBackgroundySb_tF", + "moduleName": "OneSignalOSCore", + "objc_name": "flushDeltaQueueInBackground:", + "declAttributes": [ + "AccessControl", + "ObjC" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Constructor", + "name": "init", + "printedName": "init()", + "children": [ + { + "kind": "TypeNominal", + "name": "OSOperationRepo", + "printedName": "OneSignalOSCore.OSOperationRepo", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSOperationRepo" + } + ], + "declKind": "Constructor", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSOperationRepo(im)init", + "mangledName": "$s15OneSignalOSCore15OSOperationRepoCACycfc", + "moduleName": "OneSignalOSCore", + "overriding": true, + "implicit": true, + "objc_name": "init", + "declAttributes": [ + "Dynamic", + "ObjC", + "Override" + ], + "init_kind": "Designated" + } + ], + "declKind": "Class", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSOperationRepo", + "mangledName": "$s15OneSignalOSCore15OSOperationRepoC", + "moduleName": "OneSignalOSCore", + "declAttributes": [ + "AccessControl", + "RawDocComment", + "ObjC" + ], + "superclassUsr": "c:objc(cs)NSObject", + "inheritsConvenienceInitializers": true, + "superclassNames": [ + "ObjectiveC.NSObject" + ], + "conformances": [ + { + "kind": "Conformance", + "name": "Equatable", + "printedName": "Equatable", + "usr": "s:SQ", + "mangledName": "$sSQ" + }, + { + "kind": "Conformance", + "name": "Hashable", + "printedName": "Hashable", + "usr": "s:SH", + "mangledName": "$sSH" + }, + { + "kind": "Conformance", + "name": "CVarArg", + "printedName": "CVarArg", + "usr": "s:s7CVarArgP", + "mangledName": "$ss7CVarArgP" + }, + { + "kind": "Conformance", + "name": "_KeyValueCodingAndObservingPublishing", + "printedName": "_KeyValueCodingAndObservingPublishing", + "usr": "s:10Foundation37_KeyValueCodingAndObservingPublishingP", + "mangledName": "$s10Foundation37_KeyValueCodingAndObservingPublishingP" + }, + { + "kind": "Conformance", + "name": "_KeyValueCodingAndObserving", + "printedName": "_KeyValueCodingAndObserving", + "usr": "s:10Foundation27_KeyValueCodingAndObservingP", + "mangledName": "$s10Foundation27_KeyValueCodingAndObservingP" + }, + { + "kind": "Conformance", + "name": "CustomStringConvertible", + "printedName": "CustomStringConvertible", + "usr": "s:s23CustomStringConvertibleP", + "mangledName": "$ss23CustomStringConvertibleP" + }, + { + "kind": "Conformance", + "name": "CustomDebugStringConvertible", + "printedName": "CustomDebugStringConvertible", + "usr": "s:s28CustomDebugStringConvertibleP", + "mangledName": "$ss28CustomDebugStringConvertibleP" + } + ] + }, + { + "kind": "Import", + "name": "Foundation", + "printedName": "Foundation", + "declKind": "Import", + "moduleName": "OneSignalOSCore", + "declAttributes": [ + "RawDocComment" + ] + }, + { + "kind": "Import", + "name": "OneSignalCore", + "printedName": "OneSignalCore", + "declKind": "Import", + "moduleName": "OneSignalOSCore" + }, + { + "kind": "TypeDecl", + "name": "OSEventProducer", + "printedName": "OSEventProducer", + "children": [ + { + "kind": "Function", + "name": "subscribe", + "printedName": "subscribe(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "GenericTypeParam", + "printedName": "τ_0_0" + } + ], + "declKind": "Func", + "usr": "s:15OneSignalOSCore15OSEventProducerC9subscribeyyxF", + "mangledName": "$s15OneSignalOSCore15OSEventProducerC9subscribeyyxF", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0>", + "sugared_genericSig": "", + "declAttributes": [ + "AccessControl" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "unsubscribe", + "printedName": "unsubscribe(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "GenericTypeParam", + "printedName": "τ_0_0" + } + ], + "declKind": "Func", + "usr": "s:15OneSignalOSCore15OSEventProducerC11unsubscribeyyxF", + "mangledName": "$s15OneSignalOSCore15OSEventProducerC11unsubscribeyyxF", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0>", + "sugared_genericSig": "", + "declAttributes": [ + "AccessControl" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "fire", + "printedName": "fire(callback:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeFunc", + "name": "Function", + "printedName": "(τ_0_0) -> ()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "GenericTypeParam", + "printedName": "τ_0_0" + } + ], + "typeAttributes": [ + "noescape" + ] + } + ], + "declKind": "Func", + "usr": "s:15OneSignalOSCore15OSEventProducerC4fire8callbackyyxXE_tF", + "mangledName": "$s15OneSignalOSCore15OSEventProducerC4fire8callbackyyxXE_tF", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0>", + "sugared_genericSig": "", + "declAttributes": [ + "AccessControl" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Constructor", + "name": "init", + "printedName": "init()", + "children": [ + { + "kind": "TypeNominal", + "name": "OSEventProducer", + "printedName": "OneSignalOSCore.OSEventProducer<τ_0_0>", + "children": [ + { + "kind": "TypeNominal", + "name": "GenericTypeParam", + "printedName": "τ_0_0" + } + ], + "usr": "s:15OneSignalOSCore15OSEventProducerC" + } + ], + "declKind": "Constructor", + "usr": "s:15OneSignalOSCore15OSEventProducerCACyxGycfc", + "mangledName": "$s15OneSignalOSCore15OSEventProducerCACyxGycfc", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0>", + "sugared_genericSig": "", + "overriding": true, + "implicit": true, + "objc_name": "init", + "declAttributes": [ + "Dynamic", + "ObjC", + "Override" + ], + "init_kind": "Designated" + } + ], + "declKind": "Class", + "usr": "s:15OneSignalOSCore15OSEventProducerC", + "mangledName": "$s15OneSignalOSCore15OSEventProducerC", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0>", + "sugared_genericSig": "", + "declAttributes": [ + "AccessControl" + ], + "superclassUsr": "c:objc(cs)NSObject", + "inheritsConvenienceInitializers": true, + "superclassNames": [ + "ObjectiveC.NSObject" + ], + "conformances": [ + { + "kind": "Conformance", + "name": "Equatable", + "printedName": "Equatable", + "usr": "s:SQ", + "mangledName": "$sSQ" + }, + { + "kind": "Conformance", + "name": "Hashable", + "printedName": "Hashable", + "usr": "s:SH", + "mangledName": "$sSH" + }, + { + "kind": "Conformance", + "name": "CVarArg", + "printedName": "CVarArg", + "usr": "s:s7CVarArgP", + "mangledName": "$ss7CVarArgP" + }, + { + "kind": "Conformance", + "name": "_KeyValueCodingAndObservingPublishing", + "printedName": "_KeyValueCodingAndObservingPublishing", + "usr": "s:10Foundation37_KeyValueCodingAndObservingPublishingP", + "mangledName": "$s10Foundation37_KeyValueCodingAndObservingPublishingP" + }, + { + "kind": "Conformance", + "name": "_KeyValueCodingAndObserving", + "printedName": "_KeyValueCodingAndObserving", + "usr": "s:10Foundation27_KeyValueCodingAndObservingP", + "mangledName": "$s10Foundation27_KeyValueCodingAndObservingP" + }, + { + "kind": "Conformance", + "name": "CustomStringConvertible", + "printedName": "CustomStringConvertible", + "usr": "s:s23CustomStringConvertibleP", + "mangledName": "$ss23CustomStringConvertibleP" + }, + { + "kind": "Conformance", + "name": "CustomDebugStringConvertible", + "printedName": "CustomDebugStringConvertible", + "usr": "s:s28CustomDebugStringConvertibleP", + "mangledName": "$ss28CustomDebugStringConvertibleP" + } + ] + }, + { + "kind": "Import", + "name": "OneSignalCore", + "printedName": "OneSignalCore", + "declKind": "Import", + "moduleName": "OneSignalOSCore", + "declAttributes": [ + "RawDocComment" + ] + }, + { + "kind": "TypeDecl", + "name": "OSModelStore", + "printedName": "OSModelStore", + "children": [ + { + "kind": "Constructor", + "name": "init", + "printedName": "init(changeSubscription:storeKey:)", + "children": [ + { + "kind": "TypeNominal", + "name": "OSModelStore", + "printedName": "OneSignalOSCore.OSModelStore<τ_0_0>", + "children": [ + { + "kind": "TypeNominal", + "name": "GenericTypeParam", + "printedName": "τ_0_0" + } + ], + "usr": "s:15OneSignalOSCore12OSModelStoreC" + }, + { + "kind": "TypeNominal", + "name": "OSEventProducer", + "printedName": "OneSignalOSCore.OSEventProducer", + "children": [ + { + "kind": "TypeNominal", + "name": "OSModelStoreChangedHandler", + "printedName": "OneSignalOSCore.OSModelStoreChangedHandler", + "usr": "s:15OneSignalOSCore26OSModelStoreChangedHandlerP" + } + ], + "usr": "s:15OneSignalOSCore15OSEventProducerC" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Constructor", + "usr": "s:15OneSignalOSCore12OSModelStoreC18changeSubscription8storeKeyACyxGAA15OSEventProducerCyAA0dE14ChangedHandler_pG_SStcfc", + "mangledName": "$s15OneSignalOSCore12OSModelStoreC18changeSubscription8storeKeyACyxGAA15OSEventProducerCyAA0dE14ChangedHandler_pG_SStcfc", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalOSCore.OSModel>", + "sugared_genericSig": "", + "declAttributes": [ + "AccessControl" + ], + "init_kind": "Designated" + }, + { + "kind": "Function", + "name": "registerAsUserObserver", + "printedName": "registerAsUserObserver()", + "children": [ + { + "kind": "TypeNominal", + "name": "OSModelStore", + "printedName": "OneSignalOSCore.OSModelStore<τ_0_0>", + "children": [ + { + "kind": "TypeNominal", + "name": "GenericTypeParam", + "printedName": "τ_0_0" + } + ], + "usr": "s:15OneSignalOSCore12OSModelStoreC" + } + ], + "declKind": "Func", + "usr": "s:15OneSignalOSCore12OSModelStoreC22registerAsUserObserverACyxGyF", + "mangledName": "$s15OneSignalOSCore12OSModelStoreC22registerAsUserObserverACyxGyF", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalOSCore.OSModel>", + "sugared_genericSig": "", + "declAttributes": [ + "AccessControl" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "getModel", + "printedName": "getModel(key:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "τ_0_0?", + "children": [ + { + "kind": "TypeNominal", + "name": "GenericTypeParam", + "printedName": "τ_0_0" + } + ], + "usr": "s:Sq" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Func", + "usr": "s:15OneSignalOSCore12OSModelStoreC8getModel3keyxSgSS_tF", + "mangledName": "$s15OneSignalOSCore12OSModelStoreC8getModel3keyxSgSS_tF", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalOSCore.OSModel>", + "sugared_genericSig": "", + "declAttributes": [ + "AccessControl", + "RawDocComment" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "getModel", + "printedName": "getModel(modelId:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "τ_0_0?", + "children": [ + { + "kind": "TypeNominal", + "name": "GenericTypeParam", + "printedName": "τ_0_0" + } + ], + "usr": "s:Sq" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Func", + "usr": "s:15OneSignalOSCore12OSModelStoreC8getModel7modelIdxSgSS_tF", + "mangledName": "$s15OneSignalOSCore12OSModelStoreC8getModel7modelIdxSgSS_tF", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalOSCore.OSModel>", + "sugared_genericSig": "", + "declAttributes": [ + "AccessControl", + "RawDocComment" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "getModels", + "printedName": "getModels()", + "children": [ + { + "kind": "TypeNominal", + "name": "Dictionary", + "printedName": "[Swift.String : τ_0_0]", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + }, + { + "kind": "TypeNominal", + "name": "GenericTypeParam", + "printedName": "τ_0_0" + } + ], + "usr": "s:SD" + } + ], + "declKind": "Func", + "usr": "s:15OneSignalOSCore12OSModelStoreC9getModelsSDySSxGyF", + "mangledName": "$s15OneSignalOSCore12OSModelStoreC9getModelsSDySSxGyF", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalOSCore.OSModel>", + "sugared_genericSig": "", + "declAttributes": [ + "AccessControl" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "add", + "printedName": "add(id:model:hydrating:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + }, + { + "kind": "TypeNominal", + "name": "GenericTypeParam", + "printedName": "τ_0_0" + }, + { + "kind": "TypeNominal", + "name": "Bool", + "printedName": "Swift.Bool", + "usr": "s:Sb" + } + ], + "declKind": "Func", + "usr": "s:15OneSignalOSCore12OSModelStoreC3add2id5model9hydratingySS_xSbtF", + "mangledName": "$s15OneSignalOSCore12OSModelStoreC3add2id5model9hydratingySS_xSbtF", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalOSCore.OSModel>", + "sugared_genericSig": "", + "declAttributes": [ + "AccessControl" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "remove", + "printedName": "remove(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Func", + "usr": "s:15OneSignalOSCore12OSModelStoreC6removeyySSF", + "mangledName": "$s15OneSignalOSCore12OSModelStoreC6removeyySSF", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalOSCore.OSModel>", + "sugared_genericSig": "", + "declAttributes": [ + "AccessControl", + "RawDocComment" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "clearModelsFromStore", + "printedName": "clearModelsFromStore()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + } + ], + "declKind": "Func", + "usr": "s:15OneSignalOSCore12OSModelStoreC015clearModelsFromE0yyF", + "mangledName": "$s15OneSignalOSCore12OSModelStoreC015clearModelsFromE0yyF", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalOSCore.OSModel>", + "sugared_genericSig": "", + "declAttributes": [ + "AccessControl", + "RawDocComment" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Constructor", + "name": "init", + "printedName": "init()", + "children": [ + { + "kind": "TypeNominal", + "name": "OSModelStore", + "printedName": "OneSignalOSCore.OSModelStore<τ_0_0>", + "children": [ + { + "kind": "TypeNominal", + "name": "GenericTypeParam", + "printedName": "τ_0_0" + } + ], + "usr": "s:15OneSignalOSCore12OSModelStoreC" + } + ], + "declKind": "Constructor", + "usr": "s:15OneSignalOSCore12OSModelStoreCACyxGycfc", + "mangledName": "$s15OneSignalOSCore12OSModelStoreCACyxGycfc", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalOSCore.OSModel>", + "sugared_genericSig": "", + "overriding": true, + "implicit": true, + "objc_name": "init", + "declAttributes": [ + "Dynamic", + "ObjC", + "Override" + ], + "init_kind": "Designated" + }, + { + "kind": "Function", + "name": "onModelUpdated", + "printedName": "onModelUpdated(args:hydrating:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "OSModelChangedArgs", + "printedName": "OneSignalOSCore.OSModelChangedArgs", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSModelChangedArgs" + }, + { + "kind": "TypeNominal", + "name": "Bool", + "printedName": "Swift.Bool", + "usr": "s:Sb" + } + ], + "declKind": "Func", + "usr": "s:15OneSignalOSCore12OSModelStoreC14onModelUpdated4args9hydratingyAA0D11ChangedArgsC_SbtF", + "mangledName": "$s15OneSignalOSCore12OSModelStoreC14onModelUpdated4args9hydratingyAA0D11ChangedArgsC_SbtF", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalOSCore.OSModel>", + "sugared_genericSig": "", + "declAttributes": [ + "AccessControl" + ], + "isFromExtension": true, + "funcSelfKind": "NonMutating" + } + ], + "declKind": "Class", + "usr": "s:15OneSignalOSCore12OSModelStoreC", + "mangledName": "$s15OneSignalOSCore12OSModelStoreC", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalOSCore.OSModel>", + "sugared_genericSig": "", + "isOpen": true, + "declAttributes": [ + "AccessControl" + ], + "superclassUsr": "c:objc(cs)NSObject", + "superclassNames": [ + "ObjectiveC.NSObject" + ], + "conformances": [ + { + "kind": "Conformance", + "name": "OSModelChangedHandler", + "printedName": "OSModelChangedHandler", + "usr": "s:15OneSignalOSCore21OSModelChangedHandlerP", + "mangledName": "$s15OneSignalOSCore21OSModelChangedHandlerP" + }, + { + "kind": "Conformance", + "name": "Equatable", + "printedName": "Equatable", + "usr": "s:SQ", + "mangledName": "$sSQ" + }, + { + "kind": "Conformance", + "name": "Hashable", + "printedName": "Hashable", + "usr": "s:SH", + "mangledName": "$sSH" + }, + { + "kind": "Conformance", + "name": "CVarArg", + "printedName": "CVarArg", + "usr": "s:s7CVarArgP", + "mangledName": "$ss7CVarArgP" + }, + { + "kind": "Conformance", + "name": "_KeyValueCodingAndObservingPublishing", + "printedName": "_KeyValueCodingAndObservingPublishing", + "usr": "s:10Foundation37_KeyValueCodingAndObservingPublishingP", + "mangledName": "$s10Foundation37_KeyValueCodingAndObservingPublishingP" + }, + { + "kind": "Conformance", + "name": "_KeyValueCodingAndObserving", + "printedName": "_KeyValueCodingAndObserving", + "usr": "s:10Foundation27_KeyValueCodingAndObservingP", + "mangledName": "$s10Foundation27_KeyValueCodingAndObservingP" + }, + { + "kind": "Conformance", + "name": "CustomStringConvertible", + "printedName": "CustomStringConvertible", + "usr": "s:s23CustomStringConvertibleP", + "mangledName": "$ss23CustomStringConvertibleP" + }, + { + "kind": "Conformance", + "name": "CustomDebugStringConvertible", + "printedName": "CustomDebugStringConvertible", + "usr": "s:s28CustomDebugStringConvertibleP", + "mangledName": "$ss28CustomDebugStringConvertibleP" + } + ] + }, + { + "kind": "Import", + "name": "Foundation", + "printedName": "Foundation", + "declKind": "Import", + "moduleName": "OneSignalOSCore", + "declAttributes": [ + "RawDocComment" + ] + }, + { + "kind": "TypeDecl", + "name": "OSModel", + "printedName": "OSModel", + "children": [ + { + "kind": "Var", + "name": "modelId", + "printedName": "modelId", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Var", + "usr": "s:15OneSignalOSCore7OSModelC7modelIdSSvp", + "mangledName": "$s15OneSignalOSCore7OSModelC7modelIdSSvp", + "moduleName": "OneSignalOSCore", + "declAttributes": [ + "Final", + "HasStorage", + "AccessControl" + ], + "isLet": true, + "hasStorage": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Accessor", + "usr": "s:15OneSignalOSCore7OSModelC7modelIdSSvg", + "mangledName": "$s15OneSignalOSCore7OSModelC7modelIdSSvg", + "moduleName": "OneSignalOSCore", + "implicit": true, + "declAttributes": [ + "Final" + ], + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "changeNotifier", + "printedName": "changeNotifier", + "children": [ + { + "kind": "TypeNominal", + "name": "OSEventProducer", + "printedName": "OneSignalOSCore.OSEventProducer", + "children": [ + { + "kind": "TypeNominal", + "name": "OSModelChangedHandler", + "printedName": "OneSignalOSCore.OSModelChangedHandler", + "usr": "s:15OneSignalOSCore21OSModelChangedHandlerP" + } + ], + "usr": "s:15OneSignalOSCore15OSEventProducerC" + } + ], + "declKind": "Var", + "usr": "s:15OneSignalOSCore7OSModelC14changeNotifierAA15OSEventProducerCyAA0D14ChangedHandler_pGvp", + "mangledName": "$s15OneSignalOSCore7OSModelC14changeNotifierAA15OSEventProducerCyAA0D14ChangedHandler_pGvp", + "moduleName": "OneSignalOSCore", + "declAttributes": [ + "HasStorage", + "AccessControl" + ], + "hasStorage": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "OSEventProducer", + "printedName": "OneSignalOSCore.OSEventProducer", + "children": [ + { + "kind": "TypeNominal", + "name": "OSModelChangedHandler", + "printedName": "OneSignalOSCore.OSModelChangedHandler", + "usr": "s:15OneSignalOSCore21OSModelChangedHandlerP" + } + ], + "usr": "s:15OneSignalOSCore15OSEventProducerC" + } + ], + "declKind": "Accessor", + "usr": "s:15OneSignalOSCore7OSModelC14changeNotifierAA15OSEventProducerCyAA0D14ChangedHandler_pGvg", + "mangledName": "$s15OneSignalOSCore7OSModelC14changeNotifierAA15OSEventProducerCyAA0D14ChangedHandler_pGvg", + "moduleName": "OneSignalOSCore", + "implicit": true, + "accessorKind": "get" + }, + { + "kind": "Accessor", + "name": "Set", + "printedName": "Set()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "OSEventProducer", + "printedName": "OneSignalOSCore.OSEventProducer", + "children": [ + { + "kind": "TypeNominal", + "name": "OSModelChangedHandler", + "printedName": "OneSignalOSCore.OSModelChangedHandler", + "usr": "s:15OneSignalOSCore21OSModelChangedHandlerP" + } + ], + "usr": "s:15OneSignalOSCore15OSEventProducerC" + } + ], + "declKind": "Accessor", + "usr": "s:15OneSignalOSCore7OSModelC14changeNotifierAA15OSEventProducerCyAA0D14ChangedHandler_pGvs", + "mangledName": "$s15OneSignalOSCore7OSModelC14changeNotifierAA15OSEventProducerCyAA0D14ChangedHandler_pGvs", + "moduleName": "OneSignalOSCore", + "implicit": true, + "accessorKind": "set" + }, + { + "kind": "Accessor", + "name": "Modify", + "printedName": "Modify()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + } + ], + "declKind": "Accessor", + "usr": "s:15OneSignalOSCore7OSModelC14changeNotifierAA15OSEventProducerCyAA0D14ChangedHandler_pGvM", + "mangledName": "$s15OneSignalOSCore7OSModelC14changeNotifierAA15OSEventProducerCyAA0D14ChangedHandler_pGvM", + "moduleName": "OneSignalOSCore", + "implicit": true, + "accessorKind": "_modify" + } + ] + }, + { + "kind": "Constructor", + "name": "init", + "printedName": "init(changeNotifier:)", + "children": [ + { + "kind": "TypeNominal", + "name": "OSModel", + "printedName": "OneSignalOSCore.OSModel", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSModel" + }, + { + "kind": "TypeNominal", + "name": "OSEventProducer", + "printedName": "OneSignalOSCore.OSEventProducer", + "children": [ + { + "kind": "TypeNominal", + "name": "OSModelChangedHandler", + "printedName": "OneSignalOSCore.OSModelChangedHandler", + "usr": "s:15OneSignalOSCore21OSModelChangedHandlerP" + } + ], + "usr": "s:15OneSignalOSCore15OSEventProducerC" + } + ], + "declKind": "Constructor", + "usr": "s:15OneSignalOSCore7OSModelC14changeNotifierAcA15OSEventProducerCyAA0D14ChangedHandler_pG_tcfc", + "mangledName": "$s15OneSignalOSCore7OSModelC14changeNotifierAcA15OSEventProducerCyAA0D14ChangedHandler_pG_tcfc", + "moduleName": "OneSignalOSCore", + "declAttributes": [ + "AccessControl", + "RawDocComment" + ], + "init_kind": "Designated" + }, + { + "kind": "Function", + "name": "encode", + "printedName": "encode(with:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "NSCoder", + "printedName": "Foundation.NSCoder", + "usr": "c:objc(cs)NSCoder" + } + ], + "declKind": "Func", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSModel(im)encodeWithCoder:", + "mangledName": "$s15OneSignalOSCore7OSModelC6encode4withySo7NSCoderC_tF", + "moduleName": "OneSignalOSCore", + "isOpen": true, + "objc_name": "encodeWithCoder:", + "declAttributes": [ + "ObjC", + "AccessControl" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Constructor", + "name": "init", + "printedName": "init(coder:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "OneSignalOSCore.OSModel?", + "children": [ + { + "kind": "TypeNominal", + "name": "OSModel", + "printedName": "OneSignalOSCore.OSModel", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSModel" + } + ], + "usr": "s:Sq" + }, + { + "kind": "TypeNominal", + "name": "NSCoder", + "printedName": "Foundation.NSCoder", + "usr": "c:objc(cs)NSCoder" + } + ], + "declKind": "Constructor", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSModel(im)initWithCoder:", + "mangledName": "$s15OneSignalOSCore7OSModelC5coderACSgSo7NSCoderC_tcfc", + "moduleName": "OneSignalOSCore", + "objc_name": "initWithCoder:", + "declAttributes": [ + "ObjC", + "Required", + "AccessControl" + ], + "init_kind": "Designated" + }, + { + "kind": "Function", + "name": "set", + "printedName": "set(property:newValue:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + }, + { + "kind": "TypeNominal", + "name": "GenericTypeParam", + "printedName": "τ_0_0" + } + ], + "declKind": "Func", + "usr": "s:15OneSignalOSCore7OSModelC3set8property8newValueySS_xtlF", + "mangledName": "$s15OneSignalOSCore7OSModelC3set8property8newValueySS_xtlF", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0>", + "sugared_genericSig": "", + "declAttributes": [ + "AccessControl", + "RawDocComment" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "hydrate", + "printedName": "hydrate(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "Dictionary", + "printedName": "[Swift.String : Any]", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + }, + { + "kind": "TypeNominal", + "name": "ProtocolComposition", + "printedName": "Any" + } + ], + "usr": "s:SD" + } + ], + "declKind": "Func", + "usr": "s:15OneSignalOSCore7OSModelC7hydrateyySDySSypGF", + "mangledName": "$s15OneSignalOSCore7OSModelC7hydrateyySDySSypGF", + "moduleName": "OneSignalOSCore", + "declAttributes": [ + "AccessControl", + "RawDocComment" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "hydrateModel", + "printedName": "hydrateModel(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "Dictionary", + "printedName": "[Swift.String : Any]", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + }, + { + "kind": "TypeNominal", + "name": "ProtocolComposition", + "printedName": "Any" + } + ], + "usr": "s:SD" + } + ], + "declKind": "Func", + "usr": "s:15OneSignalOSCore7OSModelC12hydrateModelyySDySSypGF", + "mangledName": "$s15OneSignalOSCore7OSModelC12hydrateModelyySDySSypGF", + "moduleName": "OneSignalOSCore", + "isOpen": true, + "declAttributes": [ + "AccessControl" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Constructor", + "name": "init", + "printedName": "init()", + "children": [ + { + "kind": "TypeNominal", + "name": "OSModel", + "printedName": "OneSignalOSCore.OSModel", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSModel" + } + ], + "declKind": "Constructor", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSModel(im)init", + "mangledName": "$s15OneSignalOSCore7OSModelCACycfc", + "moduleName": "OneSignalOSCore", + "overriding": true, + "implicit": true, + "objc_name": "init", + "declAttributes": [ + "Dynamic", + "ObjC", + "Override" + ], + "init_kind": "Designated" + } + ], + "declKind": "Class", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSModel", + "mangledName": "$s15OneSignalOSCore7OSModelC", + "moduleName": "OneSignalOSCore", + "isOpen": true, + "declAttributes": [ + "AccessControl", + "ObjC" + ], + "superclassUsr": "c:objc(cs)NSObject", + "superclassNames": [ + "ObjectiveC.NSObject" + ], + "conformances": [ + { + "kind": "Conformance", + "name": "Equatable", + "printedName": "Equatable", + "usr": "s:SQ", + "mangledName": "$sSQ" + }, + { + "kind": "Conformance", + "name": "Hashable", + "printedName": "Hashable", + "usr": "s:SH", + "mangledName": "$sSH" + }, + { + "kind": "Conformance", + "name": "CVarArg", + "printedName": "CVarArg", + "usr": "s:s7CVarArgP", + "mangledName": "$ss7CVarArgP" + }, + { + "kind": "Conformance", + "name": "_KeyValueCodingAndObservingPublishing", + "printedName": "_KeyValueCodingAndObservingPublishing", + "usr": "s:10Foundation37_KeyValueCodingAndObservingPublishingP", + "mangledName": "$s10Foundation37_KeyValueCodingAndObservingPublishingP" + }, + { + "kind": "Conformance", + "name": "_KeyValueCodingAndObserving", + "printedName": "_KeyValueCodingAndObserving", + "usr": "s:10Foundation27_KeyValueCodingAndObservingP", + "mangledName": "$s10Foundation27_KeyValueCodingAndObservingP" + }, + { + "kind": "Conformance", + "name": "CustomStringConvertible", + "printedName": "CustomStringConvertible", + "usr": "s:s23CustomStringConvertibleP", + "mangledName": "$ss23CustomStringConvertibleP" + }, + { + "kind": "Conformance", + "name": "CustomDebugStringConvertible", + "printedName": "CustomDebugStringConvertible", + "usr": "s:s28CustomDebugStringConvertibleP", + "mangledName": "$ss28CustomDebugStringConvertibleP" + } + ] + }, + { + "kind": "Import", + "name": "Foundation", + "printedName": "Foundation", + "declKind": "Import", + "moduleName": "OneSignalOSCore", + "declAttributes": [ + "RawDocComment" + ] + }, + { + "kind": "Import", + "name": "OneSignalCore", + "printedName": "OneSignalCore", + "declKind": "Import", + "moduleName": "OneSignalOSCore" + }, + { + "kind": "TypeDecl", + "name": "OSBackgroundTaskHandler", + "printedName": "OSBackgroundTaskHandler", + "children": [ + { + "kind": "Function", + "name": "beginBackgroundTask", + "printedName": "beginBackgroundTask(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Func", + "usr": "c:@M@OneSignalOSCore@objc(pl)OSBackgroundTaskHandler(im)beginBackgroundTask:", + "mangledName": "$s15OneSignalOSCore23OSBackgroundTaskHandlerP015beginBackgroundE0yySSF", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalOSCore.OSBackgroundTaskHandler>", + "sugared_genericSig": "", + "protocolReq": true, + "declAttributes": [ + "ObjC" + ], + "reqNewWitnessTableEntry": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "endBackgroundTask", + "printedName": "endBackgroundTask(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Func", + "usr": "c:@M@OneSignalOSCore@objc(pl)OSBackgroundTaskHandler(im)endBackgroundTask:", + "mangledName": "$s15OneSignalOSCore23OSBackgroundTaskHandlerP013endBackgroundE0yySSF", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalOSCore.OSBackgroundTaskHandler>", + "sugared_genericSig": "", + "protocolReq": true, + "declAttributes": [ + "ObjC" + ], + "reqNewWitnessTableEntry": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "setTaskInvalid", + "printedName": "setTaskInvalid(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Func", + "usr": "c:@M@OneSignalOSCore@objc(pl)OSBackgroundTaskHandler(im)setTaskInvalid:", + "mangledName": "$s15OneSignalOSCore23OSBackgroundTaskHandlerP03setE7InvalidyySSF", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalOSCore.OSBackgroundTaskHandler>", + "sugared_genericSig": "", + "protocolReq": true, + "declAttributes": [ + "ObjC" + ], + "reqNewWitnessTableEntry": true, + "funcSelfKind": "NonMutating" + } + ], + "declKind": "Protocol", + "usr": "c:@M@OneSignalOSCore@objc(pl)OSBackgroundTaskHandler", + "mangledName": "$s15OneSignalOSCore23OSBackgroundTaskHandlerP", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0 : AnyObject>", + "sugared_genericSig": "", + "declAttributes": [ + "AccessControl", + "ObjC" + ] + }, + { + "kind": "TypeDecl", + "name": "OSBackgroundTaskManager", + "printedName": "OSBackgroundTaskManager", + "children": [ + { + "kind": "Var", + "name": "taskHandler", + "printedName": "taskHandler", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "OneSignalOSCore.OSBackgroundTaskHandler?", + "children": [ + { + "kind": "TypeNominal", + "name": "OSBackgroundTaskHandler", + "printedName": "OneSignalOSCore.OSBackgroundTaskHandler", + "usr": "c:@M@OneSignalOSCore@objc(pl)OSBackgroundTaskHandler" + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Var", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSBackgroundTaskManager(cpy)taskHandler", + "mangledName": "$s15OneSignalOSCore23OSBackgroundTaskManagerC11taskHandlerAA0deH0_pSgvpZ", + "moduleName": "OneSignalOSCore", + "static": true, + "declAttributes": [ + "HasInitialValue", + "Final", + "HasStorage", + "AccessControl", + "ObjC" + ], + "hasStorage": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "OneSignalOSCore.OSBackgroundTaskHandler?", + "children": [ + { + "kind": "TypeNominal", + "name": "OSBackgroundTaskHandler", + "printedName": "OneSignalOSCore.OSBackgroundTaskHandler", + "usr": "c:@M@OneSignalOSCore@objc(pl)OSBackgroundTaskHandler" + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Accessor", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSBackgroundTaskManager(cm)taskHandler", + "mangledName": "$s15OneSignalOSCore23OSBackgroundTaskManagerC11taskHandlerAA0deH0_pSgvgZ", + "moduleName": "OneSignalOSCore", + "static": true, + "implicit": true, + "declAttributes": [ + "Final", + "ObjC" + ], + "accessorKind": "get" + }, + { + "kind": "Accessor", + "name": "Set", + "printedName": "Set()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "OneSignalOSCore.OSBackgroundTaskHandler?", + "children": [ + { + "kind": "TypeNominal", + "name": "OSBackgroundTaskHandler", + "printedName": "OneSignalOSCore.OSBackgroundTaskHandler", + "usr": "c:@M@OneSignalOSCore@objc(pl)OSBackgroundTaskHandler" + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Accessor", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSBackgroundTaskManager(cm)setTaskHandler:", + "mangledName": "$s15OneSignalOSCore23OSBackgroundTaskManagerC11taskHandlerAA0deH0_pSgvsZ", + "moduleName": "OneSignalOSCore", + "static": true, + "implicit": true, + "declAttributes": [ + "Final", + "ObjC" + ], + "accessorKind": "set" + }, + { + "kind": "Accessor", + "name": "Modify", + "printedName": "Modify()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + } + ], + "declKind": "Accessor", + "usr": "s:15OneSignalOSCore23OSBackgroundTaskManagerC11taskHandlerAA0deH0_pSgvMZ", + "mangledName": "$s15OneSignalOSCore23OSBackgroundTaskManagerC11taskHandlerAA0deH0_pSgvMZ", + "moduleName": "OneSignalOSCore", + "static": true, + "implicit": true, + "declAttributes": [ + "Final" + ], + "accessorKind": "_modify" + } + ] + }, + { + "kind": "Function", + "name": "beginBackgroundTask", + "printedName": "beginBackgroundTask(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Func", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSBackgroundTaskManager(cm)beginBackgroundTask:", + "mangledName": "$s15OneSignalOSCore23OSBackgroundTaskManagerC015beginBackgroundE0yySSFZ", + "moduleName": "OneSignalOSCore", + "static": true, + "declAttributes": [ + "Final", + "AccessControl", + "ObjC" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "endBackgroundTask", + "printedName": "endBackgroundTask(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Func", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSBackgroundTaskManager(cm)endBackgroundTask:", + "mangledName": "$s15OneSignalOSCore23OSBackgroundTaskManagerC013endBackgroundE0yySSFZ", + "moduleName": "OneSignalOSCore", + "static": true, + "declAttributes": [ + "Final", + "AccessControl", + "ObjC" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "setTaskInvalid", + "printedName": "setTaskInvalid(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Func", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSBackgroundTaskManager(cm)setTaskInvalid:", + "mangledName": "$s15OneSignalOSCore23OSBackgroundTaskManagerC03setE7InvalidyySSFZ", + "moduleName": "OneSignalOSCore", + "static": true, + "declAttributes": [ + "Final", + "AccessControl", + "ObjC" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Constructor", + "name": "init", + "printedName": "init()", + "children": [ + { + "kind": "TypeNominal", + "name": "OSBackgroundTaskManager", + "printedName": "OneSignalOSCore.OSBackgroundTaskManager", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSBackgroundTaskManager" + } + ], + "declKind": "Constructor", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSBackgroundTaskManager(im)init", + "mangledName": "$s15OneSignalOSCore23OSBackgroundTaskManagerCACycfc", + "moduleName": "OneSignalOSCore", + "overriding": true, + "implicit": true, + "objc_name": "init", + "declAttributes": [ + "Dynamic", + "ObjC", + "Override" + ], + "init_kind": "Designated" + } + ], + "declKind": "Class", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSBackgroundTaskManager", + "mangledName": "$s15OneSignalOSCore23OSBackgroundTaskManagerC", + "moduleName": "OneSignalOSCore", + "declAttributes": [ + "AccessControl", + "ObjC", + "RawDocComment" + ], + "superclassUsr": "c:objc(cs)NSObject", + "inheritsConvenienceInitializers": true, + "superclassNames": [ + "ObjectiveC.NSObject" + ], + "conformances": [ + { + "kind": "Conformance", + "name": "Equatable", + "printedName": "Equatable", + "usr": "s:SQ", + "mangledName": "$sSQ" + }, + { + "kind": "Conformance", + "name": "Hashable", + "printedName": "Hashable", + "usr": "s:SH", + "mangledName": "$sSH" + }, + { + "kind": "Conformance", + "name": "CVarArg", + "printedName": "CVarArg", + "usr": "s:s7CVarArgP", + "mangledName": "$ss7CVarArgP" + }, + { + "kind": "Conformance", + "name": "_KeyValueCodingAndObservingPublishing", + "printedName": "_KeyValueCodingAndObservingPublishing", + "usr": "s:10Foundation37_KeyValueCodingAndObservingPublishingP", + "mangledName": "$s10Foundation37_KeyValueCodingAndObservingPublishingP" + }, + { + "kind": "Conformance", + "name": "_KeyValueCodingAndObserving", + "printedName": "_KeyValueCodingAndObserving", + "usr": "s:10Foundation27_KeyValueCodingAndObservingP", + "mangledName": "$s10Foundation27_KeyValueCodingAndObservingP" + }, + { + "kind": "Conformance", + "name": "CustomStringConvertible", + "printedName": "CustomStringConvertible", + "usr": "s:s23CustomStringConvertibleP", + "mangledName": "$ss23CustomStringConvertibleP" + }, + { + "kind": "Conformance", + "name": "CustomDebugStringConvertible", + "printedName": "CustomDebugStringConvertible", + "usr": "s:s28CustomDebugStringConvertibleP", + "mangledName": "$ss28CustomDebugStringConvertibleP" + } + ] + }, + { + "kind": "Import", + "name": "Foundation", + "printedName": "Foundation", + "declKind": "Import", + "moduleName": "OneSignalOSCore", + "declAttributes": [ + "RawDocComment" + ] + }, + { + "kind": "Import", + "name": "OneSignalCore", + "printedName": "OneSignalCore", + "declKind": "Import", + "moduleName": "OneSignalOSCore" + }, + { + "kind": "TypeDecl", + "name": "OSModelStoreListener", + "printedName": "OSModelStoreListener", + "children": [ + { + "kind": "AssociatedType", + "name": "TModel", + "printedName": "TModel", + "declKind": "AssociatedType", + "usr": "s:15OneSignalOSCore20OSModelStoreListenerP6TModelQa", + "mangledName": "$s15OneSignalOSCore20OSModelStoreListenerP6TModelQa", + "moduleName": "OneSignalOSCore", + "protocolReq": true + }, + { + "kind": "Var", + "name": "store", + "printedName": "store", + "children": [ + { + "kind": "TypeNominal", + "name": "OSModelStore", + "printedName": "OneSignalOSCore.OSModelStore<τ_0_0.TModel>", + "children": [ + { + "kind": "TypeNominal", + "name": "DependentMember", + "printedName": "τ_0_0.TModel" + } + ], + "usr": "s:15OneSignalOSCore12OSModelStoreC" + } + ], + "declKind": "Var", + "usr": "s:15OneSignalOSCore20OSModelStoreListenerP5storeAA0dE0Cy6TModelQzGvp", + "mangledName": "$s15OneSignalOSCore20OSModelStoreListenerP5storeAA0dE0Cy6TModelQzGvp", + "moduleName": "OneSignalOSCore", + "protocolReq": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "OSModelStore", + "printedName": "OneSignalOSCore.OSModelStore<τ_0_0.TModel>", + "children": [ + { + "kind": "TypeNominal", + "name": "DependentMember", + "printedName": "τ_0_0.TModel" + } + ], + "usr": "s:15OneSignalOSCore12OSModelStoreC" + } + ], + "declKind": "Accessor", + "usr": "s:15OneSignalOSCore20OSModelStoreListenerP5storeAA0dE0Cy6TModelQzGvg", + "mangledName": "$s15OneSignalOSCore20OSModelStoreListenerP5storeAA0dE0Cy6TModelQzGvg", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalOSCore.OSModelStoreListener>", + "sugared_genericSig": "", + "protocolReq": true, + "reqNewWitnessTableEntry": true, + "accessorKind": "get" + } + ] + }, + { + "kind": "Constructor", + "name": "init", + "printedName": "init(store:)", + "children": [ + { + "kind": "TypeNominal", + "name": "GenericTypeParam", + "printedName": "τ_0_0" + }, + { + "kind": "TypeNominal", + "name": "OSModelStore", + "printedName": "OneSignalOSCore.OSModelStore<τ_0_0.TModel>", + "children": [ + { + "kind": "TypeNominal", + "name": "DependentMember", + "printedName": "τ_0_0.TModel" + } + ], + "usr": "s:15OneSignalOSCore12OSModelStoreC" + } + ], + "declKind": "Constructor", + "usr": "s:15OneSignalOSCore20OSModelStoreListenerP5storexAA0dE0Cy6TModelQzG_tcfc", + "mangledName": "$s15OneSignalOSCore20OSModelStoreListenerP5storexAA0dE0Cy6TModelQzG_tcfc", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalOSCore.OSModelStoreListener>", + "sugared_genericSig": "", + "protocolReq": true, + "reqNewWitnessTableEntry": true, + "init_kind": "Designated" + }, + { + "kind": "Function", + "name": "getAddModelDelta", + "printedName": "getAddModelDelta(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "OneSignalOSCore.OSDelta?", + "children": [ + { + "kind": "TypeNominal", + "name": "OSDelta", + "printedName": "OneSignalOSCore.OSDelta", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSDelta" + } + ], + "usr": "s:Sq" + }, + { + "kind": "TypeNominal", + "name": "DependentMember", + "printedName": "τ_0_0.TModel" + } + ], + "declKind": "Func", + "usr": "s:15OneSignalOSCore20OSModelStoreListenerP16getAddModelDeltayAA7OSDeltaCSg6TModelQzF", + "mangledName": "$s15OneSignalOSCore20OSModelStoreListenerP16getAddModelDeltayAA7OSDeltaCSg6TModelQzF", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalOSCore.OSModelStoreListener>", + "sugared_genericSig": "", + "protocolReq": true, + "reqNewWitnessTableEntry": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "getRemoveModelDelta", + "printedName": "getRemoveModelDelta(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "OneSignalOSCore.OSDelta?", + "children": [ + { + "kind": "TypeNominal", + "name": "OSDelta", + "printedName": "OneSignalOSCore.OSDelta", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSDelta" + } + ], + "usr": "s:Sq" + }, + { + "kind": "TypeNominal", + "name": "DependentMember", + "printedName": "τ_0_0.TModel" + } + ], + "declKind": "Func", + "usr": "s:15OneSignalOSCore20OSModelStoreListenerP19getRemoveModelDeltayAA7OSDeltaCSg6TModelQzF", + "mangledName": "$s15OneSignalOSCore20OSModelStoreListenerP19getRemoveModelDeltayAA7OSDeltaCSg6TModelQzF", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalOSCore.OSModelStoreListener>", + "sugared_genericSig": "", + "protocolReq": true, + "reqNewWitnessTableEntry": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "getUpdateModelDelta", + "printedName": "getUpdateModelDelta(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "OneSignalOSCore.OSDelta?", + "children": [ + { + "kind": "TypeNominal", + "name": "OSDelta", + "printedName": "OneSignalOSCore.OSDelta", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSDelta" + } + ], + "usr": "s:Sq" + }, + { + "kind": "TypeNominal", + "name": "OSModelChangedArgs", + "printedName": "OneSignalOSCore.OSModelChangedArgs", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSModelChangedArgs" + } + ], + "declKind": "Func", + "usr": "s:15OneSignalOSCore20OSModelStoreListenerP19getUpdateModelDeltayAA7OSDeltaCSgAA0D11ChangedArgsCF", + "mangledName": "$s15OneSignalOSCore20OSModelStoreListenerP19getUpdateModelDeltayAA7OSDeltaCSgAA0D11ChangedArgsCF", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalOSCore.OSModelStoreListener>", + "sugared_genericSig": "", + "protocolReq": true, + "reqNewWitnessTableEntry": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "start", + "printedName": "start()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + } + ], + "declKind": "Func", + "usr": "s:15OneSignalOSCore20OSModelStoreListenerPAAE5startyyF", + "mangledName": "$s15OneSignalOSCore20OSModelStoreListenerPAAE5startyyF", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalOSCore.OSModelStoreListener>", + "sugared_genericSig": "", + "declAttributes": [ + "AccessControl" + ], + "isFromExtension": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "onAdded", + "printedName": "onAdded(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "OSModel", + "printedName": "OneSignalOSCore.OSModel", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSModel" + } + ], + "declKind": "Func", + "usr": "s:15OneSignalOSCore20OSModelStoreListenerPAAE7onAddedyyAA0D0CF", + "mangledName": "$s15OneSignalOSCore20OSModelStoreListenerPAAE7onAddedyyAA0D0CF", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalOSCore.OSModelStoreListener>", + "sugared_genericSig": "", + "declAttributes": [ + "AccessControl" + ], + "isFromExtension": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "onUpdated", + "printedName": "onUpdated(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "OSModelChangedArgs", + "printedName": "OneSignalOSCore.OSModelChangedArgs", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSModelChangedArgs" + } + ], + "declKind": "Func", + "usr": "s:15OneSignalOSCore20OSModelStoreListenerPAAE9onUpdatedyyAA0D11ChangedArgsCF", + "mangledName": "$s15OneSignalOSCore20OSModelStoreListenerPAAE9onUpdatedyyAA0D11ChangedArgsCF", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalOSCore.OSModelStoreListener>", + "sugared_genericSig": "", + "declAttributes": [ + "AccessControl" + ], + "isFromExtension": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "onRemoved", + "printedName": "onRemoved(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "OSModel", + "printedName": "OneSignalOSCore.OSModel", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSModel" + } + ], + "declKind": "Func", + "usr": "s:15OneSignalOSCore20OSModelStoreListenerPAAE9onRemovedyyAA0D0CF", + "mangledName": "$s15OneSignalOSCore20OSModelStoreListenerPAAE9onRemovedyyAA0D0CF", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalOSCore.OSModelStoreListener>", + "sugared_genericSig": "", + "declAttributes": [ + "AccessControl" + ], + "isFromExtension": true, + "funcSelfKind": "NonMutating" + } + ], + "declKind": "Protocol", + "usr": "s:15OneSignalOSCore20OSModelStoreListenerP", + "mangledName": "$s15OneSignalOSCore20OSModelStoreListenerP", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0 : OneSignalOSCore.OSModelStoreChangedHandler, τ_0_0.TModel : OneSignalOSCore.OSModel>", + "sugared_genericSig": "", + "declAttributes": [ + "AccessControl" + ], + "conformances": [ + { + "kind": "Conformance", + "name": "OSModelStoreChangedHandler", + "printedName": "OSModelStoreChangedHandler", + "usr": "s:15OneSignalOSCore26OSModelStoreChangedHandlerP", + "mangledName": "$s15OneSignalOSCore26OSModelStoreChangedHandlerP" + } + ] + }, + { + "kind": "Import", + "name": "Foundation", + "printedName": "Foundation", + "declKind": "Import", + "moduleName": "OneSignalOSCore", + "declAttributes": [ + "RawDocComment" + ] + }, + { + "kind": "TypeDecl", + "name": "OSModelStoreChangedHandler", + "printedName": "OSModelStoreChangedHandler", + "children": [ + { + "kind": "Function", + "name": "onAdded", + "printedName": "onAdded(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "OSModel", + "printedName": "OneSignalOSCore.OSModel", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSModel" + } + ], + "declKind": "Func", + "usr": "s:15OneSignalOSCore26OSModelStoreChangedHandlerP7onAddedyyAA0D0CF", + "mangledName": "$s15OneSignalOSCore26OSModelStoreChangedHandlerP7onAddedyyAA0D0CF", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalOSCore.OSModelStoreChangedHandler>", + "sugared_genericSig": "", + "protocolReq": true, + "declAttributes": [ + "RawDocComment" + ], + "reqNewWitnessTableEntry": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "onUpdated", + "printedName": "onUpdated(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "OSModelChangedArgs", + "printedName": "OneSignalOSCore.OSModelChangedArgs", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSModelChangedArgs" + } + ], + "declKind": "Func", + "usr": "s:15OneSignalOSCore26OSModelStoreChangedHandlerP9onUpdatedyyAA0dF4ArgsCF", + "mangledName": "$s15OneSignalOSCore26OSModelStoreChangedHandlerP9onUpdatedyyAA0dF4ArgsCF", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalOSCore.OSModelStoreChangedHandler>", + "sugared_genericSig": "", + "protocolReq": true, + "declAttributes": [ + "RawDocComment" + ], + "reqNewWitnessTableEntry": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "onRemoved", + "printedName": "onRemoved(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "OSModel", + "printedName": "OneSignalOSCore.OSModel", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSModel" + } + ], + "declKind": "Func", + "usr": "s:15OneSignalOSCore26OSModelStoreChangedHandlerP9onRemovedyyAA0D0CF", + "mangledName": "$s15OneSignalOSCore26OSModelStoreChangedHandlerP9onRemovedyyAA0D0CF", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalOSCore.OSModelStoreChangedHandler>", + "sugared_genericSig": "", + "protocolReq": true, + "declAttributes": [ + "RawDocComment" + ], + "reqNewWitnessTableEntry": true, + "funcSelfKind": "NonMutating" + } + ], + "declKind": "Protocol", + "usr": "s:15OneSignalOSCore26OSModelStoreChangedHandlerP", + "mangledName": "$s15OneSignalOSCore26OSModelStoreChangedHandlerP", + "moduleName": "OneSignalOSCore", + "declAttributes": [ + "AccessControl", + "RawDocComment" + ] + }, + { + "kind": "Import", + "name": "Foundation", + "printedName": "Foundation", + "declKind": "Import", + "moduleName": "OneSignalOSCore", + "declAttributes": [ + "RawDocComment" + ] + }, + { + "kind": "TypeDecl", + "name": "OSDelta", + "printedName": "OSDelta", + "children": [ + { + "kind": "Var", + "name": "name", + "printedName": "name", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Var", + "usr": "s:15OneSignalOSCore7OSDeltaC4nameSSvp", + "mangledName": "$s15OneSignalOSCore7OSDeltaC4nameSSvp", + "moduleName": "OneSignalOSCore", + "declAttributes": [ + "Final", + "HasStorage", + "AccessControl" + ], + "isLet": true, + "hasStorage": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Accessor", + "usr": "s:15OneSignalOSCore7OSDeltaC4nameSSvg", + "mangledName": "$s15OneSignalOSCore7OSDeltaC4nameSSvg", + "moduleName": "OneSignalOSCore", + "implicit": true, + "declAttributes": [ + "Final" + ], + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "deltaId", + "printedName": "deltaId", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Var", + "usr": "s:15OneSignalOSCore7OSDeltaC7deltaIdSSvp", + "mangledName": "$s15OneSignalOSCore7OSDeltaC7deltaIdSSvp", + "moduleName": "OneSignalOSCore", + "declAttributes": [ + "Final", + "HasStorage", + "AccessControl" + ], + "isLet": true, + "hasStorage": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Accessor", + "usr": "s:15OneSignalOSCore7OSDeltaC7deltaIdSSvg", + "mangledName": "$s15OneSignalOSCore7OSDeltaC7deltaIdSSvg", + "moduleName": "OneSignalOSCore", + "implicit": true, + "declAttributes": [ + "Final" + ], + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "timestamp", + "printedName": "timestamp", + "children": [ + { + "kind": "TypeNominal", + "name": "Date", + "printedName": "Foundation.Date", + "usr": "s:10Foundation4DateV" + } + ], + "declKind": "Var", + "usr": "s:15OneSignalOSCore7OSDeltaC9timestamp10Foundation4DateVvp", + "mangledName": "$s15OneSignalOSCore7OSDeltaC9timestamp10Foundation4DateVvp", + "moduleName": "OneSignalOSCore", + "declAttributes": [ + "Final", + "HasStorage", + "AccessControl" + ], + "isLet": true, + "hasStorage": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "Date", + "printedName": "Foundation.Date", + "usr": "s:10Foundation4DateV" + } + ], + "declKind": "Accessor", + "usr": "s:15OneSignalOSCore7OSDeltaC9timestamp10Foundation4DateVvg", + "mangledName": "$s15OneSignalOSCore7OSDeltaC9timestamp10Foundation4DateVvg", + "moduleName": "OneSignalOSCore", + "implicit": true, + "declAttributes": [ + "Final" + ], + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "model", + "printedName": "model", + "children": [ + { + "kind": "TypeNominal", + "name": "OSModel", + "printedName": "OneSignalOSCore.OSModel", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSModel" + } + ], + "declKind": "Var", + "usr": "s:15OneSignalOSCore7OSDeltaC5modelAA7OSModelCvp", + "mangledName": "$s15OneSignalOSCore7OSDeltaC5modelAA7OSModelCvp", + "moduleName": "OneSignalOSCore", + "declAttributes": [ + "HasStorage", + "AccessControl" + ], + "hasStorage": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "OSModel", + "printedName": "OneSignalOSCore.OSModel", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSModel" + } + ], + "declKind": "Accessor", + "usr": "s:15OneSignalOSCore7OSDeltaC5modelAA7OSModelCvg", + "mangledName": "$s15OneSignalOSCore7OSDeltaC5modelAA7OSModelCvg", + "moduleName": "OneSignalOSCore", + "implicit": true, + "accessorKind": "get" + }, + { + "kind": "Accessor", + "name": "Set", + "printedName": "Set()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "OSModel", + "printedName": "OneSignalOSCore.OSModel", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSModel" + } + ], + "declKind": "Accessor", + "usr": "s:15OneSignalOSCore7OSDeltaC5modelAA7OSModelCvs", + "mangledName": "$s15OneSignalOSCore7OSDeltaC5modelAA7OSModelCvs", + "moduleName": "OneSignalOSCore", + "implicit": true, + "accessorKind": "set" + }, + { + "kind": "Accessor", + "name": "Modify", + "printedName": "Modify()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + } + ], + "declKind": "Accessor", + "usr": "s:15OneSignalOSCore7OSDeltaC5modelAA7OSModelCvM", + "mangledName": "$s15OneSignalOSCore7OSDeltaC5modelAA7OSModelCvM", + "moduleName": "OneSignalOSCore", + "implicit": true, + "accessorKind": "_modify" + } + ] + }, + { + "kind": "Var", + "name": "property", + "printedName": "property", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Var", + "usr": "s:15OneSignalOSCore7OSDeltaC8propertySSvp", + "mangledName": "$s15OneSignalOSCore7OSDeltaC8propertySSvp", + "moduleName": "OneSignalOSCore", + "declAttributes": [ + "Final", + "HasStorage", + "AccessControl" + ], + "isLet": true, + "hasStorage": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Accessor", + "usr": "s:15OneSignalOSCore7OSDeltaC8propertySSvg", + "mangledName": "$s15OneSignalOSCore7OSDeltaC8propertySSvg", + "moduleName": "OneSignalOSCore", + "implicit": true, + "declAttributes": [ + "Final" + ], + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "value", + "printedName": "value", + "children": [ + { + "kind": "TypeNominal", + "name": "ProtocolComposition", + "printedName": "Any" + } + ], + "declKind": "Var", + "usr": "s:15OneSignalOSCore7OSDeltaC5valueypvp", + "mangledName": "$s15OneSignalOSCore7OSDeltaC5valueypvp", + "moduleName": "OneSignalOSCore", + "declAttributes": [ + "Final", + "HasStorage", + "AccessControl" + ], + "isLet": true, + "hasStorage": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "ProtocolComposition", + "printedName": "Any" + } + ], + "declKind": "Accessor", + "usr": "s:15OneSignalOSCore7OSDeltaC5valueypvg", + "mangledName": "$s15OneSignalOSCore7OSDeltaC5valueypvg", + "moduleName": "OneSignalOSCore", + "implicit": true, + "declAttributes": [ + "Final" + ], + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "description", + "printedName": "description", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Var", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSDelta(py)description", + "mangledName": "$s15OneSignalOSCore7OSDeltaC11descriptionSSvp", + "moduleName": "OneSignalOSCore", + "overriding": true, + "isOpen": true, + "objc_name": "description", + "declAttributes": [ + "Dynamic", + "ObjC", + "AccessControl", + "Override" + ], + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Accessor", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSDelta(im)description", + "mangledName": "$s15OneSignalOSCore7OSDeltaC11descriptionSSvg", + "moduleName": "OneSignalOSCore", + "overriding": true, + "isOpen": true, + "objc_name": "description", + "declAttributes": [ + "Dynamic", + "ObjC" + ], + "accessorKind": "get" + } + ] + }, + { + "kind": "Constructor", + "name": "init", + "printedName": "init(name:model:property:value:)", + "children": [ + { + "kind": "TypeNominal", + "name": "OSDelta", + "printedName": "OneSignalOSCore.OSDelta", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSDelta" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + }, + { + "kind": "TypeNominal", + "name": "OSModel", + "printedName": "OneSignalOSCore.OSModel", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSModel" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + }, + { + "kind": "TypeNominal", + "name": "ProtocolComposition", + "printedName": "Any" + } + ], + "declKind": "Constructor", + "usr": "s:15OneSignalOSCore7OSDeltaC4name5model8property5valueACSS_AA7OSModelCSSyptcfc", + "mangledName": "$s15OneSignalOSCore7OSDeltaC4name5model8property5valueACSS_AA7OSModelCSSyptcfc", + "moduleName": "OneSignalOSCore", + "declAttributes": [ + "AccessControl" + ], + "init_kind": "Designated" + }, + { + "kind": "Function", + "name": "encode", + "printedName": "encode(with:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "NSCoder", + "printedName": "Foundation.NSCoder", + "usr": "c:objc(cs)NSCoder" + } + ], + "declKind": "Func", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSDelta(im)encodeWithCoder:", + "mangledName": "$s15OneSignalOSCore7OSDeltaC6encode4withySo7NSCoderC_tF", + "moduleName": "OneSignalOSCore", + "objc_name": "encodeWithCoder:", + "declAttributes": [ + "ObjC", + "AccessControl" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Constructor", + "name": "init", + "printedName": "init(coder:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "OneSignalOSCore.OSDelta?", + "children": [ + { + "kind": "TypeNominal", + "name": "OSDelta", + "printedName": "OneSignalOSCore.OSDelta", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSDelta" + } + ], + "usr": "s:Sq" + }, + { + "kind": "TypeNominal", + "name": "NSCoder", + "printedName": "Foundation.NSCoder", + "usr": "c:objc(cs)NSCoder" + } + ], + "declKind": "Constructor", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSDelta(im)initWithCoder:", + "mangledName": "$s15OneSignalOSCore7OSDeltaC5coderACSgSo7NSCoderC_tcfc", + "moduleName": "OneSignalOSCore", + "objc_name": "initWithCoder:", + "declAttributes": [ + "ObjC", + "Required", + "AccessControl" + ], + "init_kind": "Designated" + }, + { + "kind": "Constructor", + "name": "init", + "printedName": "init()", + "children": [ + { + "kind": "TypeNominal", + "name": "OSDelta", + "printedName": "OneSignalOSCore.OSDelta", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSDelta" + } + ], + "declKind": "Constructor", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSDelta(im)init", + "mangledName": "$s15OneSignalOSCore7OSDeltaCACycfc", + "moduleName": "OneSignalOSCore", + "overriding": true, + "implicit": true, + "objc_name": "init", + "declAttributes": [ + "Dynamic", + "ObjC", + "Override" + ], + "init_kind": "Designated" + } + ], + "declKind": "Class", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSDelta", + "mangledName": "$s15OneSignalOSCore7OSDeltaC", + "moduleName": "OneSignalOSCore", + "isOpen": true, + "declAttributes": [ + "AccessControl", + "RawDocComment", + "ObjC" + ], + "superclassUsr": "c:objc(cs)NSObject", + "superclassNames": [ + "ObjectiveC.NSObject" + ], + "conformances": [ + { + "kind": "Conformance", + "name": "Equatable", + "printedName": "Equatable", + "usr": "s:SQ", + "mangledName": "$sSQ" + }, + { + "kind": "Conformance", + "name": "Hashable", + "printedName": "Hashable", + "usr": "s:SH", + "mangledName": "$sSH" + }, + { + "kind": "Conformance", + "name": "CVarArg", + "printedName": "CVarArg", + "usr": "s:s7CVarArgP", + "mangledName": "$ss7CVarArgP" + }, + { + "kind": "Conformance", + "name": "_KeyValueCodingAndObservingPublishing", + "printedName": "_KeyValueCodingAndObservingPublishing", + "usr": "s:10Foundation37_KeyValueCodingAndObservingPublishingP", + "mangledName": "$s10Foundation37_KeyValueCodingAndObservingPublishingP" + }, + { + "kind": "Conformance", + "name": "_KeyValueCodingAndObserving", + "printedName": "_KeyValueCodingAndObserving", + "usr": "s:10Foundation27_KeyValueCodingAndObservingP", + "mangledName": "$s10Foundation27_KeyValueCodingAndObservingP" + }, + { + "kind": "Conformance", + "name": "CustomStringConvertible", + "printedName": "CustomStringConvertible", + "usr": "s:s23CustomStringConvertibleP", + "mangledName": "$ss23CustomStringConvertibleP" + }, + { + "kind": "Conformance", + "name": "CustomDebugStringConvertible", + "printedName": "CustomDebugStringConvertible", + "usr": "s:s28CustomDebugStringConvertibleP", + "mangledName": "$ss28CustomDebugStringConvertibleP" + } + ] + }, + { + "kind": "Import", + "name": "Foundation", + "printedName": "Foundation", + "declKind": "Import", + "moduleName": "OneSignalOSCore", + "declAttributes": [ + "RawDocComment" + ] + }, + { + "kind": "TypeDecl", + "name": "OSModelChangedArgs", + "printedName": "OSModelChangedArgs", + "children": [ + { + "kind": "Var", + "name": "model", + "printedName": "model", + "children": [ + { + "kind": "TypeNominal", + "name": "OSModel", + "printedName": "OneSignalOSCore.OSModel", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSModel" + } + ], + "declKind": "Var", + "usr": "s:15OneSignalOSCore18OSModelChangedArgsC5modelAA0D0Cvp", + "mangledName": "$s15OneSignalOSCore18OSModelChangedArgsC5modelAA0D0Cvp", + "moduleName": "OneSignalOSCore", + "declAttributes": [ + "Final", + "HasStorage", + "AccessControl", + "RawDocComment" + ], + "isLet": true, + "hasStorage": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "OSModel", + "printedName": "OneSignalOSCore.OSModel", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSModel" + } + ], + "declKind": "Accessor", + "usr": "s:15OneSignalOSCore18OSModelChangedArgsC5modelAA0D0Cvg", + "mangledName": "$s15OneSignalOSCore18OSModelChangedArgsC5modelAA0D0Cvg", + "moduleName": "OneSignalOSCore", + "implicit": true, + "declAttributes": [ + "Final" + ], + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "property", + "printedName": "property", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Var", + "usr": "s:15OneSignalOSCore18OSModelChangedArgsC8propertySSvp", + "mangledName": "$s15OneSignalOSCore18OSModelChangedArgsC8propertySSvp", + "moduleName": "OneSignalOSCore", + "declAttributes": [ + "Final", + "HasStorage", + "AccessControl", + "RawDocComment" + ], + "isLet": true, + "hasStorage": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Accessor", + "usr": "s:15OneSignalOSCore18OSModelChangedArgsC8propertySSvg", + "mangledName": "$s15OneSignalOSCore18OSModelChangedArgsC8propertySSvg", + "moduleName": "OneSignalOSCore", + "implicit": true, + "declAttributes": [ + "Final" + ], + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "newValue", + "printedName": "newValue", + "children": [ + { + "kind": "TypeNominal", + "name": "ProtocolComposition", + "printedName": "Any" + } + ], + "declKind": "Var", + "usr": "s:15OneSignalOSCore18OSModelChangedArgsC8newValueypvp", + "mangledName": "$s15OneSignalOSCore18OSModelChangedArgsC8newValueypvp", + "moduleName": "OneSignalOSCore", + "declAttributes": [ + "Final", + "HasStorage", + "AccessControl", + "RawDocComment" + ], + "isLet": true, + "hasStorage": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "ProtocolComposition", + "printedName": "Any" + } + ], + "declKind": "Accessor", + "usr": "s:15OneSignalOSCore18OSModelChangedArgsC8newValueypvg", + "mangledName": "$s15OneSignalOSCore18OSModelChangedArgsC8newValueypvg", + "moduleName": "OneSignalOSCore", + "implicit": true, + "declAttributes": [ + "Final" + ], + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "description", + "printedName": "description", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Var", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSModelChangedArgs(py)description", + "mangledName": "$s15OneSignalOSCore18OSModelChangedArgsC11descriptionSSvp", + "moduleName": "OneSignalOSCore", + "overriding": true, + "objc_name": "description", + "declAttributes": [ + "Dynamic", + "ObjC", + "AccessControl", + "Override" + ], + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Accessor", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSModelChangedArgs(im)description", + "mangledName": "$s15OneSignalOSCore18OSModelChangedArgsC11descriptionSSvg", + "moduleName": "OneSignalOSCore", + "overriding": true, + "objc_name": "description", + "declAttributes": [ + "Dynamic", + "ObjC" + ], + "accessorKind": "get" + } + ] + }, + { + "kind": "Constructor", + "name": "init", + "printedName": "init()", + "children": [ + { + "kind": "TypeNominal", + "name": "OSModelChangedArgs", + "printedName": "OneSignalOSCore.OSModelChangedArgs", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSModelChangedArgs" + } + ], + "declKind": "Constructor", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSModelChangedArgs(im)init", + "mangledName": "$s15OneSignalOSCore18OSModelChangedArgsCACycfc", + "moduleName": "OneSignalOSCore", + "overriding": true, + "implicit": true, + "objc_name": "init", + "declAttributes": [ + "Dynamic", + "ObjC", + "Override" + ], + "init_kind": "Designated" + } + ], + "declKind": "Class", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSModelChangedArgs", + "mangledName": "$s15OneSignalOSCore18OSModelChangedArgsC", + "moduleName": "OneSignalOSCore", + "declAttributes": [ + "AccessControl", + "ObjC" + ], + "superclassUsr": "c:objc(cs)NSObject", + "hasMissingDesignatedInitializers": true, + "superclassNames": [ + "ObjectiveC.NSObject" + ], + "conformances": [ + { + "kind": "Conformance", + "name": "Equatable", + "printedName": "Equatable", + "usr": "s:SQ", + "mangledName": "$sSQ" + }, + { + "kind": "Conformance", + "name": "Hashable", + "printedName": "Hashable", + "usr": "s:SH", + "mangledName": "$sSH" + }, + { + "kind": "Conformance", + "name": "CVarArg", + "printedName": "CVarArg", + "usr": "s:s7CVarArgP", + "mangledName": "$ss7CVarArgP" + }, + { + "kind": "Conformance", + "name": "_KeyValueCodingAndObservingPublishing", + "printedName": "_KeyValueCodingAndObservingPublishing", + "usr": "s:10Foundation37_KeyValueCodingAndObservingPublishingP", + "mangledName": "$s10Foundation37_KeyValueCodingAndObservingPublishingP" + }, + { + "kind": "Conformance", + "name": "_KeyValueCodingAndObserving", + "printedName": "_KeyValueCodingAndObserving", + "usr": "s:10Foundation27_KeyValueCodingAndObservingP", + "mangledName": "$s10Foundation27_KeyValueCodingAndObservingP" + }, + { + "kind": "Conformance", + "name": "CustomStringConvertible", + "printedName": "CustomStringConvertible", + "usr": "s:s23CustomStringConvertibleP", + "mangledName": "$ss23CustomStringConvertibleP" + }, + { + "kind": "Conformance", + "name": "CustomDebugStringConvertible", + "printedName": "CustomDebugStringConvertible", + "usr": "s:s28CustomDebugStringConvertibleP", + "mangledName": "$ss28CustomDebugStringConvertibleP" + } + ] + }, + { + "kind": "TypeDecl", + "name": "OSModelChangedHandler", + "printedName": "OSModelChangedHandler", + "children": [ + { + "kind": "Function", + "name": "onModelUpdated", + "printedName": "onModelUpdated(args:hydrating:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "OSModelChangedArgs", + "printedName": "OneSignalOSCore.OSModelChangedArgs", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSModelChangedArgs" + }, + { + "kind": "TypeNominal", + "name": "Bool", + "printedName": "Swift.Bool", + "usr": "s:Sb" + } + ], + "declKind": "Func", + "usr": "s:15OneSignalOSCore21OSModelChangedHandlerP14onModelUpdated4args9hydratingyAA0dE4ArgsC_SbtF", + "mangledName": "$s15OneSignalOSCore21OSModelChangedHandlerP14onModelUpdated4args9hydratingyAA0dE4ArgsC_SbtF", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalOSCore.OSModelChangedHandler>", + "sugared_genericSig": "", + "protocolReq": true, + "reqNewWitnessTableEntry": true, + "funcSelfKind": "NonMutating" + } + ], + "declKind": "Protocol", + "usr": "s:15OneSignalOSCore21OSModelChangedHandlerP", + "mangledName": "$s15OneSignalOSCore21OSModelChangedHandlerP", + "moduleName": "OneSignalOSCore", + "declAttributes": [ + "AccessControl" + ] + }, + { + "kind": "Import", + "name": "OneSignalCore", + "printedName": "OneSignalCore", + "declKind": "Import", + "moduleName": "OneSignalOSCore", + "declAttributes": [ + "RawDocComment" + ] + }, + { + "kind": "TypeDecl", + "name": "OSOperationExecutor", + "printedName": "OSOperationExecutor", + "children": [ + { + "kind": "Var", + "name": "supportedDeltas", + "printedName": "supportedDeltas", + "children": [ + { + "kind": "TypeNominal", + "name": "Array", + "printedName": "[Swift.String]", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:Sa" + } + ], + "declKind": "Var", + "usr": "s:15OneSignalOSCore19OSOperationExecutorP15supportedDeltasSaySSGvp", + "mangledName": "$s15OneSignalOSCore19OSOperationExecutorP15supportedDeltasSaySSGvp", + "moduleName": "OneSignalOSCore", + "protocolReq": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "Array", + "printedName": "[Swift.String]", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:Sa" + } + ], + "declKind": "Accessor", + "usr": "s:15OneSignalOSCore19OSOperationExecutorP15supportedDeltasSaySSGvg", + "mangledName": "$s15OneSignalOSCore19OSOperationExecutorP15supportedDeltasSaySSGvg", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalOSCore.OSOperationExecutor>", + "sugared_genericSig": "", + "protocolReq": true, + "reqNewWitnessTableEntry": true, + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "deltaQueue", + "printedName": "deltaQueue", + "children": [ + { + "kind": "TypeNominal", + "name": "Array", + "printedName": "[OneSignalOSCore.OSDelta]", + "children": [ + { + "kind": "TypeNominal", + "name": "OSDelta", + "printedName": "OneSignalOSCore.OSDelta", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSDelta" + } + ], + "usr": "s:Sa" + } + ], + "declKind": "Var", + "usr": "s:15OneSignalOSCore19OSOperationExecutorP10deltaQueueSayAA7OSDeltaCGvp", + "mangledName": "$s15OneSignalOSCore19OSOperationExecutorP10deltaQueueSayAA7OSDeltaCGvp", + "moduleName": "OneSignalOSCore", + "protocolReq": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "Array", + "printedName": "[OneSignalOSCore.OSDelta]", + "children": [ + { + "kind": "TypeNominal", + "name": "OSDelta", + "printedName": "OneSignalOSCore.OSDelta", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSDelta" + } + ], + "usr": "s:Sa" + } + ], + "declKind": "Accessor", + "usr": "s:15OneSignalOSCore19OSOperationExecutorP10deltaQueueSayAA7OSDeltaCGvg", + "mangledName": "$s15OneSignalOSCore19OSOperationExecutorP10deltaQueueSayAA7OSDeltaCGvg", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalOSCore.OSOperationExecutor>", + "sugared_genericSig": "", + "protocolReq": true, + "reqNewWitnessTableEntry": true, + "accessorKind": "get" + } + ] + }, + { + "kind": "Function", + "name": "enqueueDelta", + "printedName": "enqueueDelta(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "OSDelta", + "printedName": "OneSignalOSCore.OSDelta", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSDelta" + } + ], + "declKind": "Func", + "usr": "s:15OneSignalOSCore19OSOperationExecutorP12enqueueDeltayyAA7OSDeltaCF", + "mangledName": "$s15OneSignalOSCore19OSOperationExecutorP12enqueueDeltayyAA7OSDeltaCF", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalOSCore.OSOperationExecutor>", + "sugared_genericSig": "", + "protocolReq": true, + "reqNewWitnessTableEntry": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "cacheDeltaQueue", + "printedName": "cacheDeltaQueue()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + } + ], + "declKind": "Func", + "usr": "s:15OneSignalOSCore19OSOperationExecutorP15cacheDeltaQueueyyF", + "mangledName": "$s15OneSignalOSCore19OSOperationExecutorP15cacheDeltaQueueyyF", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalOSCore.OSOperationExecutor>", + "sugared_genericSig": "", + "protocolReq": true, + "reqNewWitnessTableEntry": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "processDeltaQueue", + "printedName": "processDeltaQueue(inBackground:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "Bool", + "printedName": "Swift.Bool", + "usr": "s:Sb" + } + ], + "declKind": "Func", + "usr": "s:15OneSignalOSCore19OSOperationExecutorP17processDeltaQueue12inBackgroundySb_tF", + "mangledName": "$s15OneSignalOSCore19OSOperationExecutorP17processDeltaQueue12inBackgroundySb_tF", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalOSCore.OSOperationExecutor>", + "sugared_genericSig": "", + "protocolReq": true, + "reqNewWitnessTableEntry": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "processRequestQueue", + "printedName": "processRequestQueue(inBackground:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "Bool", + "printedName": "Swift.Bool", + "usr": "s:Sb" + } + ], + "declKind": "Func", + "usr": "s:15OneSignalOSCore19OSOperationExecutorP19processRequestQueue12inBackgroundySb_tF", + "mangledName": "$s15OneSignalOSCore19OSOperationExecutorP19processRequestQueue12inBackgroundySb_tF", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalOSCore.OSOperationExecutor>", + "sugared_genericSig": "", + "protocolReq": true, + "reqNewWitnessTableEntry": true, + "funcSelfKind": "NonMutating" + } + ], + "declKind": "Protocol", + "usr": "s:15OneSignalOSCore19OSOperationExecutorP", + "mangledName": "$s15OneSignalOSCore19OSOperationExecutorP", + "moduleName": "OneSignalOSCore", + "declAttributes": [ + "AccessControl", + "RawDocComment" + ] + } + ], + "json_format_version": 8 + }, + "ConstValues": [ + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalOSCore\/Source\/OSOperationRepo.swift", + "kind": "BooleanLiteral", + "offset": 1573, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalOSCore\/Source\/OSOperationRepo.swift", + "kind": "Dictionary", + "offset": 1711, + "length": 3, + "value": "[]" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalOSCore\/Source\/OSOperationRepo.swift", + "kind": "Array", + "offset": 1758, + "length": 2, + "value": "[]" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalOSCore\/Source\/OSOperationRepo.swift", + "kind": "Array", + "offset": 1793, + "length": 2, + "value": "[]" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalOSCore\/Source\/OSOperationRepo.swift", + "kind": "IntegerLiteral", + "offset": 1901, + "length": 1, + "value": "5" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalOSCore\/Source\/OSOperationRepo.swift", + "kind": "BooleanLiteral", + "offset": 1927, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalOSCore\/Source\/OSOperationRepo.swift", + "kind": "BooleanLiteral", + "offset": 4475, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalOSCore\/Source\/OSModelStore.swift", + "kind": "StringLiteral", + "offset": 1257, + "length": 12, + "value": "\"OneSignalOSCore.OSModelStore\"" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalOSCore\/Source\/OSModel.swift", + "kind": "BooleanLiteral", + "offset": 1419, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalOSCore\/Source\/OSModel.swift", + "kind": "StringLiteral", + "offset": 1260, + "length": 7, + "value": "\"OneSignalOSCore.OSModel\"" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalOSCore\/Source\/OSDelta.swift", + "kind": "StringLiteral", + "offset": 1455, + "length": 7, + "value": "\"OneSignalOSCore.OSDelta\"" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalOSCore\/Source\/OSModelChangedHandler.swift", + "kind": "StringLiteral", + "offset": 1256, + "length": 18, + "value": "\"OneSignalOSCore.OSModelChangedArgs\"" + } + ] +} \ No newline at end of file diff --git a/iOS_SDK/OneSignalSDK/OneSignal_OSCore/OneSignalOSCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalOSCore.framework/Versions/A/Modules/OneSignalOSCore.swiftmodule/arm64-apple-ios-macabi.private.swiftinterface b/iOS_SDK/OneSignalSDK/OneSignal_OSCore/OneSignalOSCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalOSCore.framework/Versions/A/Modules/OneSignalOSCore.swiftmodule/arm64-apple-ios-macabi.private.swiftinterface new file mode 100644 index 000000000..318d8fcf6 --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignal_OSCore/OneSignalOSCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalOSCore.framework/Versions/A/Modules/OneSignalOSCore.swiftmodule/arm64-apple-ios-macabi.private.swiftinterface @@ -0,0 +1,118 @@ +// swift-interface-format-version: 1.0 +// swift-compiler-version: Apple Swift version 5.7.1 (swiftlang-5.7.1.135.3 clang-1400.0.29.51) +// swift-module-flags: -target arm64-apple-ios13.1-macabi -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -O -module-name OneSignalOSCore +// swift-module-flags-ignorable: -enable-bare-slash-regex +import Foundation +import OneSignalCore +@_exported import OneSignalOSCore +import Swift +import _Concurrency +import _StringProcessing +@objc @_inheritsConvenienceInitializers public class OSOperationRepo : ObjectiveC.NSObject { + public static let sharedInstance: OneSignalOSCore.OSOperationRepo + public var paused: Swift.Bool + public func start() + public func addExecutor(_ executor: OneSignalOSCore.OSOperationExecutor) + @objc public func flushDeltaQueue(inBackground: Swift.Bool = false) + @objc override dynamic public init() + @objc deinit +} +@_inheritsConvenienceInitializers public class OSEventProducer : ObjectiveC.NSObject { + public func subscribe(_ handler: THandler) + public func unsubscribe(_ handler: THandler) + public func fire(callback: (THandler) -> Swift.Void) + @objc override dynamic public init() + @objc deinit +} +open class OSModelStore : ObjectiveC.NSObject where TModel : OneSignalOSCore.OSModel { + public init(changeSubscription: OneSignalOSCore.OSEventProducer, storeKey: Swift.String) + public func registerAsUserObserver() -> OneSignalOSCore.OSModelStore + @objc deinit + public func getModel(key: Swift.String) -> TModel? + public func getModel(modelId: Swift.String) -> TModel? + public func getModels() -> [Swift.String : TModel] + public func add(id: Swift.String, model: TModel, hydrating: Swift.Bool) + public func remove(_ id: Swift.String) + public func clearModelsFromStore() +} +extension OneSignalOSCore.OSModelStore : OneSignalOSCore.OSModelChangedHandler { + public func onModelUpdated(args: OneSignalOSCore.OSModelChangedArgs, hydrating: Swift.Bool) +} +@objc open class OSModel : ObjectiveC.NSObject, Foundation.NSCoding { + final public let modelId: Swift.String + public var changeNotifier: OneSignalOSCore.OSEventProducer + public init(changeNotifier: OneSignalOSCore.OSEventProducer) + @objc open func encode(with coder: Foundation.NSCoder) + @objc required public init?(coder: Foundation.NSCoder) + public func set(property: Swift.String, newValue: T) + public func hydrate(_ response: [Swift.String : Any]) + open func hydrateModel(_ response: [Swift.String : Any]) + @objc deinit +} +@objc public protocol OSBackgroundTaskHandler { + @objc func beginBackgroundTask(_ taskIdentifier: Swift.String) + @objc func endBackgroundTask(_ taskIdentifier: Swift.String) + @objc func setTaskInvalid(_ taskIdentifier: Swift.String) +} +@_inheritsConvenienceInitializers @objc public class OSBackgroundTaskManager : ObjectiveC.NSObject { + @objc public static var taskHandler: OneSignalOSCore.OSBackgroundTaskHandler? + @objc public static func beginBackgroundTask(_ taskIdentifier: Swift.String) + @objc public static func endBackgroundTask(_ taskIdentifier: Swift.String) + @objc public static func setTaskInvalid(_ taskIdentifier: Swift.String) + @objc override dynamic public init() + @objc deinit +} +public protocol OSModelStoreListener : OneSignalOSCore.OSModelStoreChangedHandler { + associatedtype TModel : OneSignalOSCore.OSModel + var store: OneSignalOSCore.OSModelStore { get } + init(store: OneSignalOSCore.OSModelStore) + func getAddModelDelta(_ model: Self.TModel) -> OneSignalOSCore.OSDelta? + func getRemoveModelDelta(_ model: Self.TModel) -> OneSignalOSCore.OSDelta? + func getUpdateModelDelta(_ args: OneSignalOSCore.OSModelChangedArgs) -> OneSignalOSCore.OSDelta? +} +extension OneSignalOSCore.OSModelStoreListener { + public func start() + public func onAdded(_ model: OneSignalOSCore.OSModel) + public func onUpdated(_ args: OneSignalOSCore.OSModelChangedArgs) + public func onRemoved(_ model: OneSignalOSCore.OSModel) +} +public protocol OSModelStoreChangedHandler { + func onAdded(_ model: OneSignalOSCore.OSModel) + func onUpdated(_ args: OneSignalOSCore.OSModelChangedArgs) + func onRemoved(_ model: OneSignalOSCore.OSModel) +} +@objc open class OSDelta : ObjectiveC.NSObject, Foundation.NSCoding { + final public let name: Swift.String + final public let deltaId: Swift.String + final public let timestamp: Foundation.Date + public var model: OneSignalOSCore.OSModel + final public let property: Swift.String + final public let value: Any + @objc override dynamic open var description: Swift.String { + @objc get + } + public init(name: Swift.String, model: OneSignalOSCore.OSModel, property: Swift.String, value: Any) + @objc public func encode(with coder: Foundation.NSCoder) + @objc required public init?(coder: Foundation.NSCoder) + @objc deinit +} +@objc @_hasMissingDesignatedInitializers public class OSModelChangedArgs : ObjectiveC.NSObject { + final public let model: OneSignalOSCore.OSModel + final public let property: Swift.String + final public let newValue: Any + @objc override dynamic public var description: Swift.String { + @objc get + } + @objc deinit +} +public protocol OSModelChangedHandler { + func onModelUpdated(args: OneSignalOSCore.OSModelChangedArgs, hydrating: Swift.Bool) +} +public protocol OSOperationExecutor { + var supportedDeltas: [Swift.String] { get } + var deltaQueue: [OneSignalOSCore.OSDelta] { get } + func enqueueDelta(_ delta: OneSignalOSCore.OSDelta) + func cacheDeltaQueue() + func processDeltaQueue(inBackground: Swift.Bool) + func processRequestQueue(inBackground: Swift.Bool) +} diff --git a/iOS_SDK/OneSignalSDK/OneSignal_OSCore/OneSignalOSCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalOSCore.framework/Versions/A/Modules/OneSignalOSCore.swiftmodule/arm64-apple-ios-macabi.swiftdoc b/iOS_SDK/OneSignalSDK/OneSignal_OSCore/OneSignalOSCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalOSCore.framework/Versions/A/Modules/OneSignalOSCore.swiftmodule/arm64-apple-ios-macabi.swiftdoc new file mode 100644 index 000000000..38a3d82f2 Binary files /dev/null and b/iOS_SDK/OneSignalSDK/OneSignal_OSCore/OneSignalOSCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalOSCore.framework/Versions/A/Modules/OneSignalOSCore.swiftmodule/arm64-apple-ios-macabi.swiftdoc differ diff --git a/iOS_SDK/OneSignalSDK/OneSignal_OSCore/OneSignalOSCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalOSCore.framework/Versions/A/Modules/OneSignalOSCore.swiftmodule/arm64-apple-ios-macabi.swiftinterface b/iOS_SDK/OneSignalSDK/OneSignal_OSCore/OneSignalOSCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalOSCore.framework/Versions/A/Modules/OneSignalOSCore.swiftmodule/arm64-apple-ios-macabi.swiftinterface new file mode 100644 index 000000000..318d8fcf6 --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignal_OSCore/OneSignalOSCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalOSCore.framework/Versions/A/Modules/OneSignalOSCore.swiftmodule/arm64-apple-ios-macabi.swiftinterface @@ -0,0 +1,118 @@ +// swift-interface-format-version: 1.0 +// swift-compiler-version: Apple Swift version 5.7.1 (swiftlang-5.7.1.135.3 clang-1400.0.29.51) +// swift-module-flags: -target arm64-apple-ios13.1-macabi -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -O -module-name OneSignalOSCore +// swift-module-flags-ignorable: -enable-bare-slash-regex +import Foundation +import OneSignalCore +@_exported import OneSignalOSCore +import Swift +import _Concurrency +import _StringProcessing +@objc @_inheritsConvenienceInitializers public class OSOperationRepo : ObjectiveC.NSObject { + public static let sharedInstance: OneSignalOSCore.OSOperationRepo + public var paused: Swift.Bool + public func start() + public func addExecutor(_ executor: OneSignalOSCore.OSOperationExecutor) + @objc public func flushDeltaQueue(inBackground: Swift.Bool = false) + @objc override dynamic public init() + @objc deinit +} +@_inheritsConvenienceInitializers public class OSEventProducer : ObjectiveC.NSObject { + public func subscribe(_ handler: THandler) + public func unsubscribe(_ handler: THandler) + public func fire(callback: (THandler) -> Swift.Void) + @objc override dynamic public init() + @objc deinit +} +open class OSModelStore : ObjectiveC.NSObject where TModel : OneSignalOSCore.OSModel { + public init(changeSubscription: OneSignalOSCore.OSEventProducer, storeKey: Swift.String) + public func registerAsUserObserver() -> OneSignalOSCore.OSModelStore + @objc deinit + public func getModel(key: Swift.String) -> TModel? + public func getModel(modelId: Swift.String) -> TModel? + public func getModels() -> [Swift.String : TModel] + public func add(id: Swift.String, model: TModel, hydrating: Swift.Bool) + public func remove(_ id: Swift.String) + public func clearModelsFromStore() +} +extension OneSignalOSCore.OSModelStore : OneSignalOSCore.OSModelChangedHandler { + public func onModelUpdated(args: OneSignalOSCore.OSModelChangedArgs, hydrating: Swift.Bool) +} +@objc open class OSModel : ObjectiveC.NSObject, Foundation.NSCoding { + final public let modelId: Swift.String + public var changeNotifier: OneSignalOSCore.OSEventProducer + public init(changeNotifier: OneSignalOSCore.OSEventProducer) + @objc open func encode(with coder: Foundation.NSCoder) + @objc required public init?(coder: Foundation.NSCoder) + public func set(property: Swift.String, newValue: T) + public func hydrate(_ response: [Swift.String : Any]) + open func hydrateModel(_ response: [Swift.String : Any]) + @objc deinit +} +@objc public protocol OSBackgroundTaskHandler { + @objc func beginBackgroundTask(_ taskIdentifier: Swift.String) + @objc func endBackgroundTask(_ taskIdentifier: Swift.String) + @objc func setTaskInvalid(_ taskIdentifier: Swift.String) +} +@_inheritsConvenienceInitializers @objc public class OSBackgroundTaskManager : ObjectiveC.NSObject { + @objc public static var taskHandler: OneSignalOSCore.OSBackgroundTaskHandler? + @objc public static func beginBackgroundTask(_ taskIdentifier: Swift.String) + @objc public static func endBackgroundTask(_ taskIdentifier: Swift.String) + @objc public static func setTaskInvalid(_ taskIdentifier: Swift.String) + @objc override dynamic public init() + @objc deinit +} +public protocol OSModelStoreListener : OneSignalOSCore.OSModelStoreChangedHandler { + associatedtype TModel : OneSignalOSCore.OSModel + var store: OneSignalOSCore.OSModelStore { get } + init(store: OneSignalOSCore.OSModelStore) + func getAddModelDelta(_ model: Self.TModel) -> OneSignalOSCore.OSDelta? + func getRemoveModelDelta(_ model: Self.TModel) -> OneSignalOSCore.OSDelta? + func getUpdateModelDelta(_ args: OneSignalOSCore.OSModelChangedArgs) -> OneSignalOSCore.OSDelta? +} +extension OneSignalOSCore.OSModelStoreListener { + public func start() + public func onAdded(_ model: OneSignalOSCore.OSModel) + public func onUpdated(_ args: OneSignalOSCore.OSModelChangedArgs) + public func onRemoved(_ model: OneSignalOSCore.OSModel) +} +public protocol OSModelStoreChangedHandler { + func onAdded(_ model: OneSignalOSCore.OSModel) + func onUpdated(_ args: OneSignalOSCore.OSModelChangedArgs) + func onRemoved(_ model: OneSignalOSCore.OSModel) +} +@objc open class OSDelta : ObjectiveC.NSObject, Foundation.NSCoding { + final public let name: Swift.String + final public let deltaId: Swift.String + final public let timestamp: Foundation.Date + public var model: OneSignalOSCore.OSModel + final public let property: Swift.String + final public let value: Any + @objc override dynamic open var description: Swift.String { + @objc get + } + public init(name: Swift.String, model: OneSignalOSCore.OSModel, property: Swift.String, value: Any) + @objc public func encode(with coder: Foundation.NSCoder) + @objc required public init?(coder: Foundation.NSCoder) + @objc deinit +} +@objc @_hasMissingDesignatedInitializers public class OSModelChangedArgs : ObjectiveC.NSObject { + final public let model: OneSignalOSCore.OSModel + final public let property: Swift.String + final public let newValue: Any + @objc override dynamic public var description: Swift.String { + @objc get + } + @objc deinit +} +public protocol OSModelChangedHandler { + func onModelUpdated(args: OneSignalOSCore.OSModelChangedArgs, hydrating: Swift.Bool) +} +public protocol OSOperationExecutor { + var supportedDeltas: [Swift.String] { get } + var deltaQueue: [OneSignalOSCore.OSDelta] { get } + func enqueueDelta(_ delta: OneSignalOSCore.OSDelta) + func cacheDeltaQueue() + func processDeltaQueue(inBackground: Swift.Bool) + func processRequestQueue(inBackground: Swift.Bool) +} diff --git a/iOS_SDK/OneSignalSDK/OneSignal_OSCore/OneSignalOSCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalOSCore.framework/Versions/A/Modules/OneSignalOSCore.swiftmodule/x86_64-apple-ios-macabi.abi.json b/iOS_SDK/OneSignalSDK/OneSignal_OSCore/OneSignalOSCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalOSCore.framework/Versions/A/Modules/OneSignalOSCore.swiftmodule/x86_64-apple-ios-macabi.abi.json new file mode 100644 index 000000000..6cf802ba3 --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignal_OSCore/OneSignalOSCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalOSCore.framework/Versions/A/Modules/OneSignalOSCore.swiftmodule/x86_64-apple-ios-macabi.abi.json @@ -0,0 +1,3662 @@ +{ + "ABIRoot": { + "kind": "Root", + "name": "TopLevel", + "printedName": "TopLevel", + "children": [ + { + "kind": "Import", + "name": "Foundation", + "printedName": "Foundation", + "declKind": "Import", + "moduleName": "OneSignalOSCore", + "declAttributes": [ + "RawDocComment" + ] + }, + { + "kind": "Import", + "name": "OneSignalCore", + "printedName": "OneSignalCore", + "declKind": "Import", + "moduleName": "OneSignalOSCore" + }, + { + "kind": "TypeDecl", + "name": "OSOperationRepo", + "printedName": "OSOperationRepo", + "children": [ + { + "kind": "Var", + "name": "sharedInstance", + "printedName": "sharedInstance", + "children": [ + { + "kind": "TypeNominal", + "name": "OSOperationRepo", + "printedName": "OneSignalOSCore.OSOperationRepo", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSOperationRepo" + } + ], + "declKind": "Var", + "usr": "s:15OneSignalOSCore15OSOperationRepoC14sharedInstanceACvpZ", + "mangledName": "$s15OneSignalOSCore15OSOperationRepoC14sharedInstanceACvpZ", + "moduleName": "OneSignalOSCore", + "static": true, + "declAttributes": [ + "HasInitialValue", + "Final", + "HasStorage", + "AccessControl" + ], + "isLet": true, + "hasStorage": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "OSOperationRepo", + "printedName": "OneSignalOSCore.OSOperationRepo", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSOperationRepo" + } + ], + "declKind": "Accessor", + "usr": "s:15OneSignalOSCore15OSOperationRepoC14sharedInstanceACvgZ", + "mangledName": "$s15OneSignalOSCore15OSOperationRepoC14sharedInstanceACvgZ", + "moduleName": "OneSignalOSCore", + "static": true, + "implicit": true, + "declAttributes": [ + "Final" + ], + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "paused", + "printedName": "paused", + "children": [ + { + "kind": "TypeNominal", + "name": "Bool", + "printedName": "Swift.Bool", + "usr": "s:Sb" + } + ], + "declKind": "Var", + "usr": "s:15OneSignalOSCore15OSOperationRepoC6pausedSbvp", + "mangledName": "$s15OneSignalOSCore15OSOperationRepoC6pausedSbvp", + "moduleName": "OneSignalOSCore", + "declAttributes": [ + "HasInitialValue", + "HasStorage", + "AccessControl" + ], + "hasStorage": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "Bool", + "printedName": "Swift.Bool", + "usr": "s:Sb" + } + ], + "declKind": "Accessor", + "usr": "s:15OneSignalOSCore15OSOperationRepoC6pausedSbvg", + "mangledName": "$s15OneSignalOSCore15OSOperationRepoC6pausedSbvg", + "moduleName": "OneSignalOSCore", + "implicit": true, + "accessorKind": "get" + }, + { + "kind": "Accessor", + "name": "Set", + "printedName": "Set()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "Bool", + "printedName": "Swift.Bool", + "usr": "s:Sb" + } + ], + "declKind": "Accessor", + "usr": "s:15OneSignalOSCore15OSOperationRepoC6pausedSbvs", + "mangledName": "$s15OneSignalOSCore15OSOperationRepoC6pausedSbvs", + "moduleName": "OneSignalOSCore", + "implicit": true, + "accessorKind": "set" + }, + { + "kind": "Accessor", + "name": "Modify", + "printedName": "Modify()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + } + ], + "declKind": "Accessor", + "usr": "s:15OneSignalOSCore15OSOperationRepoC6pausedSbvM", + "mangledName": "$s15OneSignalOSCore15OSOperationRepoC6pausedSbvM", + "moduleName": "OneSignalOSCore", + "implicit": true, + "accessorKind": "_modify" + } + ] + }, + { + "kind": "Function", + "name": "start", + "printedName": "start()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + } + ], + "declKind": "Func", + "usr": "s:15OneSignalOSCore15OSOperationRepoC5startyyF", + "mangledName": "$s15OneSignalOSCore15OSOperationRepoC5startyyF", + "moduleName": "OneSignalOSCore", + "declAttributes": [ + "AccessControl", + "RawDocComment" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "addExecutor", + "printedName": "addExecutor(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "OSOperationExecutor", + "printedName": "OneSignalOSCore.OSOperationExecutor", + "usr": "s:15OneSignalOSCore19OSOperationExecutorP" + } + ], + "declKind": "Func", + "usr": "s:15OneSignalOSCore15OSOperationRepoC11addExecutoryyAA0dG0_pF", + "mangledName": "$s15OneSignalOSCore15OSOperationRepoC11addExecutoryyAA0dG0_pF", + "moduleName": "OneSignalOSCore", + "declAttributes": [ + "AccessControl", + "RawDocComment" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "flushDeltaQueue", + "printedName": "flushDeltaQueue(inBackground:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "Bool", + "printedName": "Swift.Bool", + "hasDefaultArg": true, + "usr": "s:Sb" + } + ], + "declKind": "Func", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSOperationRepo(im)flushDeltaQueueInBackground:", + "mangledName": "$s15OneSignalOSCore15OSOperationRepoC15flushDeltaQueue12inBackgroundySb_tF", + "moduleName": "OneSignalOSCore", + "objc_name": "flushDeltaQueueInBackground:", + "declAttributes": [ + "AccessControl", + "ObjC" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Constructor", + "name": "init", + "printedName": "init()", + "children": [ + { + "kind": "TypeNominal", + "name": "OSOperationRepo", + "printedName": "OneSignalOSCore.OSOperationRepo", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSOperationRepo" + } + ], + "declKind": "Constructor", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSOperationRepo(im)init", + "mangledName": "$s15OneSignalOSCore15OSOperationRepoCACycfc", + "moduleName": "OneSignalOSCore", + "overriding": true, + "implicit": true, + "objc_name": "init", + "declAttributes": [ + "Dynamic", + "ObjC", + "Override" + ], + "init_kind": "Designated" + } + ], + "declKind": "Class", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSOperationRepo", + "mangledName": "$s15OneSignalOSCore15OSOperationRepoC", + "moduleName": "OneSignalOSCore", + "declAttributes": [ + "AccessControl", + "RawDocComment", + "ObjC" + ], + "superclassUsr": "c:objc(cs)NSObject", + "inheritsConvenienceInitializers": true, + "superclassNames": [ + "ObjectiveC.NSObject" + ], + "conformances": [ + { + "kind": "Conformance", + "name": "Equatable", + "printedName": "Equatable", + "usr": "s:SQ", + "mangledName": "$sSQ" + }, + { + "kind": "Conformance", + "name": "Hashable", + "printedName": "Hashable", + "usr": "s:SH", + "mangledName": "$sSH" + }, + { + "kind": "Conformance", + "name": "CVarArg", + "printedName": "CVarArg", + "usr": "s:s7CVarArgP", + "mangledName": "$ss7CVarArgP" + }, + { + "kind": "Conformance", + "name": "_KeyValueCodingAndObservingPublishing", + "printedName": "_KeyValueCodingAndObservingPublishing", + "usr": "s:10Foundation37_KeyValueCodingAndObservingPublishingP", + "mangledName": "$s10Foundation37_KeyValueCodingAndObservingPublishingP" + }, + { + "kind": "Conformance", + "name": "_KeyValueCodingAndObserving", + "printedName": "_KeyValueCodingAndObserving", + "usr": "s:10Foundation27_KeyValueCodingAndObservingP", + "mangledName": "$s10Foundation27_KeyValueCodingAndObservingP" + }, + { + "kind": "Conformance", + "name": "CustomStringConvertible", + "printedName": "CustomStringConvertible", + "usr": "s:s23CustomStringConvertibleP", + "mangledName": "$ss23CustomStringConvertibleP" + }, + { + "kind": "Conformance", + "name": "CustomDebugStringConvertible", + "printedName": "CustomDebugStringConvertible", + "usr": "s:s28CustomDebugStringConvertibleP", + "mangledName": "$ss28CustomDebugStringConvertibleP" + } + ] + }, + { + "kind": "Import", + "name": "Foundation", + "printedName": "Foundation", + "declKind": "Import", + "moduleName": "OneSignalOSCore", + "declAttributes": [ + "RawDocComment" + ] + }, + { + "kind": "Import", + "name": "OneSignalCore", + "printedName": "OneSignalCore", + "declKind": "Import", + "moduleName": "OneSignalOSCore" + }, + { + "kind": "TypeDecl", + "name": "OSEventProducer", + "printedName": "OSEventProducer", + "children": [ + { + "kind": "Function", + "name": "subscribe", + "printedName": "subscribe(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "GenericTypeParam", + "printedName": "τ_0_0" + } + ], + "declKind": "Func", + "usr": "s:15OneSignalOSCore15OSEventProducerC9subscribeyyxF", + "mangledName": "$s15OneSignalOSCore15OSEventProducerC9subscribeyyxF", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0>", + "sugared_genericSig": "", + "declAttributes": [ + "AccessControl" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "unsubscribe", + "printedName": "unsubscribe(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "GenericTypeParam", + "printedName": "τ_0_0" + } + ], + "declKind": "Func", + "usr": "s:15OneSignalOSCore15OSEventProducerC11unsubscribeyyxF", + "mangledName": "$s15OneSignalOSCore15OSEventProducerC11unsubscribeyyxF", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0>", + "sugared_genericSig": "", + "declAttributes": [ + "AccessControl" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "fire", + "printedName": "fire(callback:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeFunc", + "name": "Function", + "printedName": "(τ_0_0) -> ()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "GenericTypeParam", + "printedName": "τ_0_0" + } + ], + "typeAttributes": [ + "noescape" + ] + } + ], + "declKind": "Func", + "usr": "s:15OneSignalOSCore15OSEventProducerC4fire8callbackyyxXE_tF", + "mangledName": "$s15OneSignalOSCore15OSEventProducerC4fire8callbackyyxXE_tF", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0>", + "sugared_genericSig": "", + "declAttributes": [ + "AccessControl" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Constructor", + "name": "init", + "printedName": "init()", + "children": [ + { + "kind": "TypeNominal", + "name": "OSEventProducer", + "printedName": "OneSignalOSCore.OSEventProducer<τ_0_0>", + "children": [ + { + "kind": "TypeNominal", + "name": "GenericTypeParam", + "printedName": "τ_0_0" + } + ], + "usr": "s:15OneSignalOSCore15OSEventProducerC" + } + ], + "declKind": "Constructor", + "usr": "s:15OneSignalOSCore15OSEventProducerCACyxGycfc", + "mangledName": "$s15OneSignalOSCore15OSEventProducerCACyxGycfc", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0>", + "sugared_genericSig": "", + "overriding": true, + "implicit": true, + "objc_name": "init", + "declAttributes": [ + "Dynamic", + "ObjC", + "Override" + ], + "init_kind": "Designated" + } + ], + "declKind": "Class", + "usr": "s:15OneSignalOSCore15OSEventProducerC", + "mangledName": "$s15OneSignalOSCore15OSEventProducerC", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0>", + "sugared_genericSig": "", + "declAttributes": [ + "AccessControl" + ], + "superclassUsr": "c:objc(cs)NSObject", + "inheritsConvenienceInitializers": true, + "superclassNames": [ + "ObjectiveC.NSObject" + ], + "conformances": [ + { + "kind": "Conformance", + "name": "Equatable", + "printedName": "Equatable", + "usr": "s:SQ", + "mangledName": "$sSQ" + }, + { + "kind": "Conformance", + "name": "Hashable", + "printedName": "Hashable", + "usr": "s:SH", + "mangledName": "$sSH" + }, + { + "kind": "Conformance", + "name": "CVarArg", + "printedName": "CVarArg", + "usr": "s:s7CVarArgP", + "mangledName": "$ss7CVarArgP" + }, + { + "kind": "Conformance", + "name": "_KeyValueCodingAndObservingPublishing", + "printedName": "_KeyValueCodingAndObservingPublishing", + "usr": "s:10Foundation37_KeyValueCodingAndObservingPublishingP", + "mangledName": "$s10Foundation37_KeyValueCodingAndObservingPublishingP" + }, + { + "kind": "Conformance", + "name": "_KeyValueCodingAndObserving", + "printedName": "_KeyValueCodingAndObserving", + "usr": "s:10Foundation27_KeyValueCodingAndObservingP", + "mangledName": "$s10Foundation27_KeyValueCodingAndObservingP" + }, + { + "kind": "Conformance", + "name": "CustomStringConvertible", + "printedName": "CustomStringConvertible", + "usr": "s:s23CustomStringConvertibleP", + "mangledName": "$ss23CustomStringConvertibleP" + }, + { + "kind": "Conformance", + "name": "CustomDebugStringConvertible", + "printedName": "CustomDebugStringConvertible", + "usr": "s:s28CustomDebugStringConvertibleP", + "mangledName": "$ss28CustomDebugStringConvertibleP" + } + ] + }, + { + "kind": "Import", + "name": "OneSignalCore", + "printedName": "OneSignalCore", + "declKind": "Import", + "moduleName": "OneSignalOSCore", + "declAttributes": [ + "RawDocComment" + ] + }, + { + "kind": "TypeDecl", + "name": "OSModelStore", + "printedName": "OSModelStore", + "children": [ + { + "kind": "Constructor", + "name": "init", + "printedName": "init(changeSubscription:storeKey:)", + "children": [ + { + "kind": "TypeNominal", + "name": "OSModelStore", + "printedName": "OneSignalOSCore.OSModelStore<τ_0_0>", + "children": [ + { + "kind": "TypeNominal", + "name": "GenericTypeParam", + "printedName": "τ_0_0" + } + ], + "usr": "s:15OneSignalOSCore12OSModelStoreC" + }, + { + "kind": "TypeNominal", + "name": "OSEventProducer", + "printedName": "OneSignalOSCore.OSEventProducer", + "children": [ + { + "kind": "TypeNominal", + "name": "OSModelStoreChangedHandler", + "printedName": "OneSignalOSCore.OSModelStoreChangedHandler", + "usr": "s:15OneSignalOSCore26OSModelStoreChangedHandlerP" + } + ], + "usr": "s:15OneSignalOSCore15OSEventProducerC" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Constructor", + "usr": "s:15OneSignalOSCore12OSModelStoreC18changeSubscription8storeKeyACyxGAA15OSEventProducerCyAA0dE14ChangedHandler_pG_SStcfc", + "mangledName": "$s15OneSignalOSCore12OSModelStoreC18changeSubscription8storeKeyACyxGAA15OSEventProducerCyAA0dE14ChangedHandler_pG_SStcfc", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalOSCore.OSModel>", + "sugared_genericSig": "", + "declAttributes": [ + "AccessControl" + ], + "init_kind": "Designated" + }, + { + "kind": "Function", + "name": "registerAsUserObserver", + "printedName": "registerAsUserObserver()", + "children": [ + { + "kind": "TypeNominal", + "name": "OSModelStore", + "printedName": "OneSignalOSCore.OSModelStore<τ_0_0>", + "children": [ + { + "kind": "TypeNominal", + "name": "GenericTypeParam", + "printedName": "τ_0_0" + } + ], + "usr": "s:15OneSignalOSCore12OSModelStoreC" + } + ], + "declKind": "Func", + "usr": "s:15OneSignalOSCore12OSModelStoreC22registerAsUserObserverACyxGyF", + "mangledName": "$s15OneSignalOSCore12OSModelStoreC22registerAsUserObserverACyxGyF", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalOSCore.OSModel>", + "sugared_genericSig": "", + "declAttributes": [ + "AccessControl" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "getModel", + "printedName": "getModel(key:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "τ_0_0?", + "children": [ + { + "kind": "TypeNominal", + "name": "GenericTypeParam", + "printedName": "τ_0_0" + } + ], + "usr": "s:Sq" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Func", + "usr": "s:15OneSignalOSCore12OSModelStoreC8getModel3keyxSgSS_tF", + "mangledName": "$s15OneSignalOSCore12OSModelStoreC8getModel3keyxSgSS_tF", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalOSCore.OSModel>", + "sugared_genericSig": "", + "declAttributes": [ + "AccessControl", + "RawDocComment" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "getModel", + "printedName": "getModel(modelId:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "τ_0_0?", + "children": [ + { + "kind": "TypeNominal", + "name": "GenericTypeParam", + "printedName": "τ_0_0" + } + ], + "usr": "s:Sq" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Func", + "usr": "s:15OneSignalOSCore12OSModelStoreC8getModel7modelIdxSgSS_tF", + "mangledName": "$s15OneSignalOSCore12OSModelStoreC8getModel7modelIdxSgSS_tF", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalOSCore.OSModel>", + "sugared_genericSig": "", + "declAttributes": [ + "AccessControl", + "RawDocComment" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "getModels", + "printedName": "getModels()", + "children": [ + { + "kind": "TypeNominal", + "name": "Dictionary", + "printedName": "[Swift.String : τ_0_0]", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + }, + { + "kind": "TypeNominal", + "name": "GenericTypeParam", + "printedName": "τ_0_0" + } + ], + "usr": "s:SD" + } + ], + "declKind": "Func", + "usr": "s:15OneSignalOSCore12OSModelStoreC9getModelsSDySSxGyF", + "mangledName": "$s15OneSignalOSCore12OSModelStoreC9getModelsSDySSxGyF", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalOSCore.OSModel>", + "sugared_genericSig": "", + "declAttributes": [ + "AccessControl" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "add", + "printedName": "add(id:model:hydrating:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + }, + { + "kind": "TypeNominal", + "name": "GenericTypeParam", + "printedName": "τ_0_0" + }, + { + "kind": "TypeNominal", + "name": "Bool", + "printedName": "Swift.Bool", + "usr": "s:Sb" + } + ], + "declKind": "Func", + "usr": "s:15OneSignalOSCore12OSModelStoreC3add2id5model9hydratingySS_xSbtF", + "mangledName": "$s15OneSignalOSCore12OSModelStoreC3add2id5model9hydratingySS_xSbtF", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalOSCore.OSModel>", + "sugared_genericSig": "", + "declAttributes": [ + "AccessControl" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "remove", + "printedName": "remove(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Func", + "usr": "s:15OneSignalOSCore12OSModelStoreC6removeyySSF", + "mangledName": "$s15OneSignalOSCore12OSModelStoreC6removeyySSF", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalOSCore.OSModel>", + "sugared_genericSig": "", + "declAttributes": [ + "AccessControl", + "RawDocComment" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "clearModelsFromStore", + "printedName": "clearModelsFromStore()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + } + ], + "declKind": "Func", + "usr": "s:15OneSignalOSCore12OSModelStoreC015clearModelsFromE0yyF", + "mangledName": "$s15OneSignalOSCore12OSModelStoreC015clearModelsFromE0yyF", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalOSCore.OSModel>", + "sugared_genericSig": "", + "declAttributes": [ + "AccessControl", + "RawDocComment" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Constructor", + "name": "init", + "printedName": "init()", + "children": [ + { + "kind": "TypeNominal", + "name": "OSModelStore", + "printedName": "OneSignalOSCore.OSModelStore<τ_0_0>", + "children": [ + { + "kind": "TypeNominal", + "name": "GenericTypeParam", + "printedName": "τ_0_0" + } + ], + "usr": "s:15OneSignalOSCore12OSModelStoreC" + } + ], + "declKind": "Constructor", + "usr": "s:15OneSignalOSCore12OSModelStoreCACyxGycfc", + "mangledName": "$s15OneSignalOSCore12OSModelStoreCACyxGycfc", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalOSCore.OSModel>", + "sugared_genericSig": "", + "overriding": true, + "implicit": true, + "objc_name": "init", + "declAttributes": [ + "Dynamic", + "ObjC", + "Override" + ], + "init_kind": "Designated" + }, + { + "kind": "Function", + "name": "onModelUpdated", + "printedName": "onModelUpdated(args:hydrating:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "OSModelChangedArgs", + "printedName": "OneSignalOSCore.OSModelChangedArgs", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSModelChangedArgs" + }, + { + "kind": "TypeNominal", + "name": "Bool", + "printedName": "Swift.Bool", + "usr": "s:Sb" + } + ], + "declKind": "Func", + "usr": "s:15OneSignalOSCore12OSModelStoreC14onModelUpdated4args9hydratingyAA0D11ChangedArgsC_SbtF", + "mangledName": "$s15OneSignalOSCore12OSModelStoreC14onModelUpdated4args9hydratingyAA0D11ChangedArgsC_SbtF", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalOSCore.OSModel>", + "sugared_genericSig": "", + "declAttributes": [ + "AccessControl" + ], + "isFromExtension": true, + "funcSelfKind": "NonMutating" + } + ], + "declKind": "Class", + "usr": "s:15OneSignalOSCore12OSModelStoreC", + "mangledName": "$s15OneSignalOSCore12OSModelStoreC", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalOSCore.OSModel>", + "sugared_genericSig": "", + "isOpen": true, + "declAttributes": [ + "AccessControl" + ], + "superclassUsr": "c:objc(cs)NSObject", + "superclassNames": [ + "ObjectiveC.NSObject" + ], + "conformances": [ + { + "kind": "Conformance", + "name": "OSModelChangedHandler", + "printedName": "OSModelChangedHandler", + "usr": "s:15OneSignalOSCore21OSModelChangedHandlerP", + "mangledName": "$s15OneSignalOSCore21OSModelChangedHandlerP" + }, + { + "kind": "Conformance", + "name": "Equatable", + "printedName": "Equatable", + "usr": "s:SQ", + "mangledName": "$sSQ" + }, + { + "kind": "Conformance", + "name": "Hashable", + "printedName": "Hashable", + "usr": "s:SH", + "mangledName": "$sSH" + }, + { + "kind": "Conformance", + "name": "CVarArg", + "printedName": "CVarArg", + "usr": "s:s7CVarArgP", + "mangledName": "$ss7CVarArgP" + }, + { + "kind": "Conformance", + "name": "_KeyValueCodingAndObservingPublishing", + "printedName": "_KeyValueCodingAndObservingPublishing", + "usr": "s:10Foundation37_KeyValueCodingAndObservingPublishingP", + "mangledName": "$s10Foundation37_KeyValueCodingAndObservingPublishingP" + }, + { + "kind": "Conformance", + "name": "_KeyValueCodingAndObserving", + "printedName": "_KeyValueCodingAndObserving", + "usr": "s:10Foundation27_KeyValueCodingAndObservingP", + "mangledName": "$s10Foundation27_KeyValueCodingAndObservingP" + }, + { + "kind": "Conformance", + "name": "CustomStringConvertible", + "printedName": "CustomStringConvertible", + "usr": "s:s23CustomStringConvertibleP", + "mangledName": "$ss23CustomStringConvertibleP" + }, + { + "kind": "Conformance", + "name": "CustomDebugStringConvertible", + "printedName": "CustomDebugStringConvertible", + "usr": "s:s28CustomDebugStringConvertibleP", + "mangledName": "$ss28CustomDebugStringConvertibleP" + } + ] + }, + { + "kind": "Import", + "name": "Foundation", + "printedName": "Foundation", + "declKind": "Import", + "moduleName": "OneSignalOSCore", + "declAttributes": [ + "RawDocComment" + ] + }, + { + "kind": "TypeDecl", + "name": "OSModel", + "printedName": "OSModel", + "children": [ + { + "kind": "Var", + "name": "modelId", + "printedName": "modelId", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Var", + "usr": "s:15OneSignalOSCore7OSModelC7modelIdSSvp", + "mangledName": "$s15OneSignalOSCore7OSModelC7modelIdSSvp", + "moduleName": "OneSignalOSCore", + "declAttributes": [ + "Final", + "HasStorage", + "AccessControl" + ], + "isLet": true, + "hasStorage": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Accessor", + "usr": "s:15OneSignalOSCore7OSModelC7modelIdSSvg", + "mangledName": "$s15OneSignalOSCore7OSModelC7modelIdSSvg", + "moduleName": "OneSignalOSCore", + "implicit": true, + "declAttributes": [ + "Final" + ], + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "changeNotifier", + "printedName": "changeNotifier", + "children": [ + { + "kind": "TypeNominal", + "name": "OSEventProducer", + "printedName": "OneSignalOSCore.OSEventProducer", + "children": [ + { + "kind": "TypeNominal", + "name": "OSModelChangedHandler", + "printedName": "OneSignalOSCore.OSModelChangedHandler", + "usr": "s:15OneSignalOSCore21OSModelChangedHandlerP" + } + ], + "usr": "s:15OneSignalOSCore15OSEventProducerC" + } + ], + "declKind": "Var", + "usr": "s:15OneSignalOSCore7OSModelC14changeNotifierAA15OSEventProducerCyAA0D14ChangedHandler_pGvp", + "mangledName": "$s15OneSignalOSCore7OSModelC14changeNotifierAA15OSEventProducerCyAA0D14ChangedHandler_pGvp", + "moduleName": "OneSignalOSCore", + "declAttributes": [ + "HasStorage", + "AccessControl" + ], + "hasStorage": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "OSEventProducer", + "printedName": "OneSignalOSCore.OSEventProducer", + "children": [ + { + "kind": "TypeNominal", + "name": "OSModelChangedHandler", + "printedName": "OneSignalOSCore.OSModelChangedHandler", + "usr": "s:15OneSignalOSCore21OSModelChangedHandlerP" + } + ], + "usr": "s:15OneSignalOSCore15OSEventProducerC" + } + ], + "declKind": "Accessor", + "usr": "s:15OneSignalOSCore7OSModelC14changeNotifierAA15OSEventProducerCyAA0D14ChangedHandler_pGvg", + "mangledName": "$s15OneSignalOSCore7OSModelC14changeNotifierAA15OSEventProducerCyAA0D14ChangedHandler_pGvg", + "moduleName": "OneSignalOSCore", + "implicit": true, + "accessorKind": "get" + }, + { + "kind": "Accessor", + "name": "Set", + "printedName": "Set()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "OSEventProducer", + "printedName": "OneSignalOSCore.OSEventProducer", + "children": [ + { + "kind": "TypeNominal", + "name": "OSModelChangedHandler", + "printedName": "OneSignalOSCore.OSModelChangedHandler", + "usr": "s:15OneSignalOSCore21OSModelChangedHandlerP" + } + ], + "usr": "s:15OneSignalOSCore15OSEventProducerC" + } + ], + "declKind": "Accessor", + "usr": "s:15OneSignalOSCore7OSModelC14changeNotifierAA15OSEventProducerCyAA0D14ChangedHandler_pGvs", + "mangledName": "$s15OneSignalOSCore7OSModelC14changeNotifierAA15OSEventProducerCyAA0D14ChangedHandler_pGvs", + "moduleName": "OneSignalOSCore", + "implicit": true, + "accessorKind": "set" + }, + { + "kind": "Accessor", + "name": "Modify", + "printedName": "Modify()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + } + ], + "declKind": "Accessor", + "usr": "s:15OneSignalOSCore7OSModelC14changeNotifierAA15OSEventProducerCyAA0D14ChangedHandler_pGvM", + "mangledName": "$s15OneSignalOSCore7OSModelC14changeNotifierAA15OSEventProducerCyAA0D14ChangedHandler_pGvM", + "moduleName": "OneSignalOSCore", + "implicit": true, + "accessorKind": "_modify" + } + ] + }, + { + "kind": "Constructor", + "name": "init", + "printedName": "init(changeNotifier:)", + "children": [ + { + "kind": "TypeNominal", + "name": "OSModel", + "printedName": "OneSignalOSCore.OSModel", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSModel" + }, + { + "kind": "TypeNominal", + "name": "OSEventProducer", + "printedName": "OneSignalOSCore.OSEventProducer", + "children": [ + { + "kind": "TypeNominal", + "name": "OSModelChangedHandler", + "printedName": "OneSignalOSCore.OSModelChangedHandler", + "usr": "s:15OneSignalOSCore21OSModelChangedHandlerP" + } + ], + "usr": "s:15OneSignalOSCore15OSEventProducerC" + } + ], + "declKind": "Constructor", + "usr": "s:15OneSignalOSCore7OSModelC14changeNotifierAcA15OSEventProducerCyAA0D14ChangedHandler_pG_tcfc", + "mangledName": "$s15OneSignalOSCore7OSModelC14changeNotifierAcA15OSEventProducerCyAA0D14ChangedHandler_pG_tcfc", + "moduleName": "OneSignalOSCore", + "declAttributes": [ + "AccessControl", + "RawDocComment" + ], + "init_kind": "Designated" + }, + { + "kind": "Function", + "name": "encode", + "printedName": "encode(with:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "NSCoder", + "printedName": "Foundation.NSCoder", + "usr": "c:objc(cs)NSCoder" + } + ], + "declKind": "Func", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSModel(im)encodeWithCoder:", + "mangledName": "$s15OneSignalOSCore7OSModelC6encode4withySo7NSCoderC_tF", + "moduleName": "OneSignalOSCore", + "isOpen": true, + "objc_name": "encodeWithCoder:", + "declAttributes": [ + "ObjC", + "AccessControl" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Constructor", + "name": "init", + "printedName": "init(coder:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "OneSignalOSCore.OSModel?", + "children": [ + { + "kind": "TypeNominal", + "name": "OSModel", + "printedName": "OneSignalOSCore.OSModel", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSModel" + } + ], + "usr": "s:Sq" + }, + { + "kind": "TypeNominal", + "name": "NSCoder", + "printedName": "Foundation.NSCoder", + "usr": "c:objc(cs)NSCoder" + } + ], + "declKind": "Constructor", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSModel(im)initWithCoder:", + "mangledName": "$s15OneSignalOSCore7OSModelC5coderACSgSo7NSCoderC_tcfc", + "moduleName": "OneSignalOSCore", + "objc_name": "initWithCoder:", + "declAttributes": [ + "ObjC", + "Required", + "AccessControl" + ], + "init_kind": "Designated" + }, + { + "kind": "Function", + "name": "set", + "printedName": "set(property:newValue:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + }, + { + "kind": "TypeNominal", + "name": "GenericTypeParam", + "printedName": "τ_0_0" + } + ], + "declKind": "Func", + "usr": "s:15OneSignalOSCore7OSModelC3set8property8newValueySS_xtlF", + "mangledName": "$s15OneSignalOSCore7OSModelC3set8property8newValueySS_xtlF", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0>", + "sugared_genericSig": "", + "declAttributes": [ + "AccessControl", + "RawDocComment" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "hydrate", + "printedName": "hydrate(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "Dictionary", + "printedName": "[Swift.String : Any]", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + }, + { + "kind": "TypeNominal", + "name": "ProtocolComposition", + "printedName": "Any" + } + ], + "usr": "s:SD" + } + ], + "declKind": "Func", + "usr": "s:15OneSignalOSCore7OSModelC7hydrateyySDySSypGF", + "mangledName": "$s15OneSignalOSCore7OSModelC7hydrateyySDySSypGF", + "moduleName": "OneSignalOSCore", + "declAttributes": [ + "AccessControl", + "RawDocComment" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "hydrateModel", + "printedName": "hydrateModel(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "Dictionary", + "printedName": "[Swift.String : Any]", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + }, + { + "kind": "TypeNominal", + "name": "ProtocolComposition", + "printedName": "Any" + } + ], + "usr": "s:SD" + } + ], + "declKind": "Func", + "usr": "s:15OneSignalOSCore7OSModelC12hydrateModelyySDySSypGF", + "mangledName": "$s15OneSignalOSCore7OSModelC12hydrateModelyySDySSypGF", + "moduleName": "OneSignalOSCore", + "isOpen": true, + "declAttributes": [ + "AccessControl" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Constructor", + "name": "init", + "printedName": "init()", + "children": [ + { + "kind": "TypeNominal", + "name": "OSModel", + "printedName": "OneSignalOSCore.OSModel", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSModel" + } + ], + "declKind": "Constructor", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSModel(im)init", + "mangledName": "$s15OneSignalOSCore7OSModelCACycfc", + "moduleName": "OneSignalOSCore", + "overriding": true, + "implicit": true, + "objc_name": "init", + "declAttributes": [ + "Dynamic", + "ObjC", + "Override" + ], + "init_kind": "Designated" + } + ], + "declKind": "Class", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSModel", + "mangledName": "$s15OneSignalOSCore7OSModelC", + "moduleName": "OneSignalOSCore", + "isOpen": true, + "declAttributes": [ + "AccessControl", + "ObjC" + ], + "superclassUsr": "c:objc(cs)NSObject", + "superclassNames": [ + "ObjectiveC.NSObject" + ], + "conformances": [ + { + "kind": "Conformance", + "name": "Equatable", + "printedName": "Equatable", + "usr": "s:SQ", + "mangledName": "$sSQ" + }, + { + "kind": "Conformance", + "name": "Hashable", + "printedName": "Hashable", + "usr": "s:SH", + "mangledName": "$sSH" + }, + { + "kind": "Conformance", + "name": "CVarArg", + "printedName": "CVarArg", + "usr": "s:s7CVarArgP", + "mangledName": "$ss7CVarArgP" + }, + { + "kind": "Conformance", + "name": "_KeyValueCodingAndObservingPublishing", + "printedName": "_KeyValueCodingAndObservingPublishing", + "usr": "s:10Foundation37_KeyValueCodingAndObservingPublishingP", + "mangledName": "$s10Foundation37_KeyValueCodingAndObservingPublishingP" + }, + { + "kind": "Conformance", + "name": "_KeyValueCodingAndObserving", + "printedName": "_KeyValueCodingAndObserving", + "usr": "s:10Foundation27_KeyValueCodingAndObservingP", + "mangledName": "$s10Foundation27_KeyValueCodingAndObservingP" + }, + { + "kind": "Conformance", + "name": "CustomStringConvertible", + "printedName": "CustomStringConvertible", + "usr": "s:s23CustomStringConvertibleP", + "mangledName": "$ss23CustomStringConvertibleP" + }, + { + "kind": "Conformance", + "name": "CustomDebugStringConvertible", + "printedName": "CustomDebugStringConvertible", + "usr": "s:s28CustomDebugStringConvertibleP", + "mangledName": "$ss28CustomDebugStringConvertibleP" + } + ] + }, + { + "kind": "Import", + "name": "Foundation", + "printedName": "Foundation", + "declKind": "Import", + "moduleName": "OneSignalOSCore", + "declAttributes": [ + "RawDocComment" + ] + }, + { + "kind": "Import", + "name": "OneSignalCore", + "printedName": "OneSignalCore", + "declKind": "Import", + "moduleName": "OneSignalOSCore" + }, + { + "kind": "TypeDecl", + "name": "OSBackgroundTaskHandler", + "printedName": "OSBackgroundTaskHandler", + "children": [ + { + "kind": "Function", + "name": "beginBackgroundTask", + "printedName": "beginBackgroundTask(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Func", + "usr": "c:@M@OneSignalOSCore@objc(pl)OSBackgroundTaskHandler(im)beginBackgroundTask:", + "mangledName": "$s15OneSignalOSCore23OSBackgroundTaskHandlerP015beginBackgroundE0yySSF", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalOSCore.OSBackgroundTaskHandler>", + "sugared_genericSig": "", + "protocolReq": true, + "declAttributes": [ + "ObjC" + ], + "reqNewWitnessTableEntry": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "endBackgroundTask", + "printedName": "endBackgroundTask(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Func", + "usr": "c:@M@OneSignalOSCore@objc(pl)OSBackgroundTaskHandler(im)endBackgroundTask:", + "mangledName": "$s15OneSignalOSCore23OSBackgroundTaskHandlerP013endBackgroundE0yySSF", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalOSCore.OSBackgroundTaskHandler>", + "sugared_genericSig": "", + "protocolReq": true, + "declAttributes": [ + "ObjC" + ], + "reqNewWitnessTableEntry": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "setTaskInvalid", + "printedName": "setTaskInvalid(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Func", + "usr": "c:@M@OneSignalOSCore@objc(pl)OSBackgroundTaskHandler(im)setTaskInvalid:", + "mangledName": "$s15OneSignalOSCore23OSBackgroundTaskHandlerP03setE7InvalidyySSF", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalOSCore.OSBackgroundTaskHandler>", + "sugared_genericSig": "", + "protocolReq": true, + "declAttributes": [ + "ObjC" + ], + "reqNewWitnessTableEntry": true, + "funcSelfKind": "NonMutating" + } + ], + "declKind": "Protocol", + "usr": "c:@M@OneSignalOSCore@objc(pl)OSBackgroundTaskHandler", + "mangledName": "$s15OneSignalOSCore23OSBackgroundTaskHandlerP", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0 : AnyObject>", + "sugared_genericSig": "", + "declAttributes": [ + "AccessControl", + "ObjC" + ] + }, + { + "kind": "TypeDecl", + "name": "OSBackgroundTaskManager", + "printedName": "OSBackgroundTaskManager", + "children": [ + { + "kind": "Var", + "name": "taskHandler", + "printedName": "taskHandler", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "OneSignalOSCore.OSBackgroundTaskHandler?", + "children": [ + { + "kind": "TypeNominal", + "name": "OSBackgroundTaskHandler", + "printedName": "OneSignalOSCore.OSBackgroundTaskHandler", + "usr": "c:@M@OneSignalOSCore@objc(pl)OSBackgroundTaskHandler" + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Var", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSBackgroundTaskManager(cpy)taskHandler", + "mangledName": "$s15OneSignalOSCore23OSBackgroundTaskManagerC11taskHandlerAA0deH0_pSgvpZ", + "moduleName": "OneSignalOSCore", + "static": true, + "declAttributes": [ + "HasInitialValue", + "Final", + "HasStorage", + "AccessControl", + "ObjC" + ], + "hasStorage": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "OneSignalOSCore.OSBackgroundTaskHandler?", + "children": [ + { + "kind": "TypeNominal", + "name": "OSBackgroundTaskHandler", + "printedName": "OneSignalOSCore.OSBackgroundTaskHandler", + "usr": "c:@M@OneSignalOSCore@objc(pl)OSBackgroundTaskHandler" + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Accessor", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSBackgroundTaskManager(cm)taskHandler", + "mangledName": "$s15OneSignalOSCore23OSBackgroundTaskManagerC11taskHandlerAA0deH0_pSgvgZ", + "moduleName": "OneSignalOSCore", + "static": true, + "implicit": true, + "declAttributes": [ + "Final", + "ObjC" + ], + "accessorKind": "get" + }, + { + "kind": "Accessor", + "name": "Set", + "printedName": "Set()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "OneSignalOSCore.OSBackgroundTaskHandler?", + "children": [ + { + "kind": "TypeNominal", + "name": "OSBackgroundTaskHandler", + "printedName": "OneSignalOSCore.OSBackgroundTaskHandler", + "usr": "c:@M@OneSignalOSCore@objc(pl)OSBackgroundTaskHandler" + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Accessor", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSBackgroundTaskManager(cm)setTaskHandler:", + "mangledName": "$s15OneSignalOSCore23OSBackgroundTaskManagerC11taskHandlerAA0deH0_pSgvsZ", + "moduleName": "OneSignalOSCore", + "static": true, + "implicit": true, + "declAttributes": [ + "Final", + "ObjC" + ], + "accessorKind": "set" + }, + { + "kind": "Accessor", + "name": "Modify", + "printedName": "Modify()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + } + ], + "declKind": "Accessor", + "usr": "s:15OneSignalOSCore23OSBackgroundTaskManagerC11taskHandlerAA0deH0_pSgvMZ", + "mangledName": "$s15OneSignalOSCore23OSBackgroundTaskManagerC11taskHandlerAA0deH0_pSgvMZ", + "moduleName": "OneSignalOSCore", + "static": true, + "implicit": true, + "declAttributes": [ + "Final" + ], + "accessorKind": "_modify" + } + ] + }, + { + "kind": "Function", + "name": "beginBackgroundTask", + "printedName": "beginBackgroundTask(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Func", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSBackgroundTaskManager(cm)beginBackgroundTask:", + "mangledName": "$s15OneSignalOSCore23OSBackgroundTaskManagerC015beginBackgroundE0yySSFZ", + "moduleName": "OneSignalOSCore", + "static": true, + "declAttributes": [ + "Final", + "AccessControl", + "ObjC" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "endBackgroundTask", + "printedName": "endBackgroundTask(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Func", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSBackgroundTaskManager(cm)endBackgroundTask:", + "mangledName": "$s15OneSignalOSCore23OSBackgroundTaskManagerC013endBackgroundE0yySSFZ", + "moduleName": "OneSignalOSCore", + "static": true, + "declAttributes": [ + "Final", + "AccessControl", + "ObjC" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "setTaskInvalid", + "printedName": "setTaskInvalid(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Func", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSBackgroundTaskManager(cm)setTaskInvalid:", + "mangledName": "$s15OneSignalOSCore23OSBackgroundTaskManagerC03setE7InvalidyySSFZ", + "moduleName": "OneSignalOSCore", + "static": true, + "declAttributes": [ + "Final", + "AccessControl", + "ObjC" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Constructor", + "name": "init", + "printedName": "init()", + "children": [ + { + "kind": "TypeNominal", + "name": "OSBackgroundTaskManager", + "printedName": "OneSignalOSCore.OSBackgroundTaskManager", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSBackgroundTaskManager" + } + ], + "declKind": "Constructor", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSBackgroundTaskManager(im)init", + "mangledName": "$s15OneSignalOSCore23OSBackgroundTaskManagerCACycfc", + "moduleName": "OneSignalOSCore", + "overriding": true, + "implicit": true, + "objc_name": "init", + "declAttributes": [ + "Dynamic", + "ObjC", + "Override" + ], + "init_kind": "Designated" + } + ], + "declKind": "Class", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSBackgroundTaskManager", + "mangledName": "$s15OneSignalOSCore23OSBackgroundTaskManagerC", + "moduleName": "OneSignalOSCore", + "declAttributes": [ + "AccessControl", + "ObjC", + "RawDocComment" + ], + "superclassUsr": "c:objc(cs)NSObject", + "inheritsConvenienceInitializers": true, + "superclassNames": [ + "ObjectiveC.NSObject" + ], + "conformances": [ + { + "kind": "Conformance", + "name": "Equatable", + "printedName": "Equatable", + "usr": "s:SQ", + "mangledName": "$sSQ" + }, + { + "kind": "Conformance", + "name": "Hashable", + "printedName": "Hashable", + "usr": "s:SH", + "mangledName": "$sSH" + }, + { + "kind": "Conformance", + "name": "CVarArg", + "printedName": "CVarArg", + "usr": "s:s7CVarArgP", + "mangledName": "$ss7CVarArgP" + }, + { + "kind": "Conformance", + "name": "_KeyValueCodingAndObservingPublishing", + "printedName": "_KeyValueCodingAndObservingPublishing", + "usr": "s:10Foundation37_KeyValueCodingAndObservingPublishingP", + "mangledName": "$s10Foundation37_KeyValueCodingAndObservingPublishingP" + }, + { + "kind": "Conformance", + "name": "_KeyValueCodingAndObserving", + "printedName": "_KeyValueCodingAndObserving", + "usr": "s:10Foundation27_KeyValueCodingAndObservingP", + "mangledName": "$s10Foundation27_KeyValueCodingAndObservingP" + }, + { + "kind": "Conformance", + "name": "CustomStringConvertible", + "printedName": "CustomStringConvertible", + "usr": "s:s23CustomStringConvertibleP", + "mangledName": "$ss23CustomStringConvertibleP" + }, + { + "kind": "Conformance", + "name": "CustomDebugStringConvertible", + "printedName": "CustomDebugStringConvertible", + "usr": "s:s28CustomDebugStringConvertibleP", + "mangledName": "$ss28CustomDebugStringConvertibleP" + } + ] + }, + { + "kind": "Import", + "name": "Foundation", + "printedName": "Foundation", + "declKind": "Import", + "moduleName": "OneSignalOSCore", + "declAttributes": [ + "RawDocComment" + ] + }, + { + "kind": "Import", + "name": "OneSignalCore", + "printedName": "OneSignalCore", + "declKind": "Import", + "moduleName": "OneSignalOSCore" + }, + { + "kind": "TypeDecl", + "name": "OSModelStoreListener", + "printedName": "OSModelStoreListener", + "children": [ + { + "kind": "AssociatedType", + "name": "TModel", + "printedName": "TModel", + "declKind": "AssociatedType", + "usr": "s:15OneSignalOSCore20OSModelStoreListenerP6TModelQa", + "mangledName": "$s15OneSignalOSCore20OSModelStoreListenerP6TModelQa", + "moduleName": "OneSignalOSCore", + "protocolReq": true + }, + { + "kind": "Var", + "name": "store", + "printedName": "store", + "children": [ + { + "kind": "TypeNominal", + "name": "OSModelStore", + "printedName": "OneSignalOSCore.OSModelStore<τ_0_0.TModel>", + "children": [ + { + "kind": "TypeNominal", + "name": "DependentMember", + "printedName": "τ_0_0.TModel" + } + ], + "usr": "s:15OneSignalOSCore12OSModelStoreC" + } + ], + "declKind": "Var", + "usr": "s:15OneSignalOSCore20OSModelStoreListenerP5storeAA0dE0Cy6TModelQzGvp", + "mangledName": "$s15OneSignalOSCore20OSModelStoreListenerP5storeAA0dE0Cy6TModelQzGvp", + "moduleName": "OneSignalOSCore", + "protocolReq": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "OSModelStore", + "printedName": "OneSignalOSCore.OSModelStore<τ_0_0.TModel>", + "children": [ + { + "kind": "TypeNominal", + "name": "DependentMember", + "printedName": "τ_0_0.TModel" + } + ], + "usr": "s:15OneSignalOSCore12OSModelStoreC" + } + ], + "declKind": "Accessor", + "usr": "s:15OneSignalOSCore20OSModelStoreListenerP5storeAA0dE0Cy6TModelQzGvg", + "mangledName": "$s15OneSignalOSCore20OSModelStoreListenerP5storeAA0dE0Cy6TModelQzGvg", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalOSCore.OSModelStoreListener>", + "sugared_genericSig": "", + "protocolReq": true, + "reqNewWitnessTableEntry": true, + "accessorKind": "get" + } + ] + }, + { + "kind": "Constructor", + "name": "init", + "printedName": "init(store:)", + "children": [ + { + "kind": "TypeNominal", + "name": "GenericTypeParam", + "printedName": "τ_0_0" + }, + { + "kind": "TypeNominal", + "name": "OSModelStore", + "printedName": "OneSignalOSCore.OSModelStore<τ_0_0.TModel>", + "children": [ + { + "kind": "TypeNominal", + "name": "DependentMember", + "printedName": "τ_0_0.TModel" + } + ], + "usr": "s:15OneSignalOSCore12OSModelStoreC" + } + ], + "declKind": "Constructor", + "usr": "s:15OneSignalOSCore20OSModelStoreListenerP5storexAA0dE0Cy6TModelQzG_tcfc", + "mangledName": "$s15OneSignalOSCore20OSModelStoreListenerP5storexAA0dE0Cy6TModelQzG_tcfc", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalOSCore.OSModelStoreListener>", + "sugared_genericSig": "", + "protocolReq": true, + "reqNewWitnessTableEntry": true, + "init_kind": "Designated" + }, + { + "kind": "Function", + "name": "getAddModelDelta", + "printedName": "getAddModelDelta(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "OneSignalOSCore.OSDelta?", + "children": [ + { + "kind": "TypeNominal", + "name": "OSDelta", + "printedName": "OneSignalOSCore.OSDelta", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSDelta" + } + ], + "usr": "s:Sq" + }, + { + "kind": "TypeNominal", + "name": "DependentMember", + "printedName": "τ_0_0.TModel" + } + ], + "declKind": "Func", + "usr": "s:15OneSignalOSCore20OSModelStoreListenerP16getAddModelDeltayAA7OSDeltaCSg6TModelQzF", + "mangledName": "$s15OneSignalOSCore20OSModelStoreListenerP16getAddModelDeltayAA7OSDeltaCSg6TModelQzF", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalOSCore.OSModelStoreListener>", + "sugared_genericSig": "", + "protocolReq": true, + "reqNewWitnessTableEntry": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "getRemoveModelDelta", + "printedName": "getRemoveModelDelta(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "OneSignalOSCore.OSDelta?", + "children": [ + { + "kind": "TypeNominal", + "name": "OSDelta", + "printedName": "OneSignalOSCore.OSDelta", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSDelta" + } + ], + "usr": "s:Sq" + }, + { + "kind": "TypeNominal", + "name": "DependentMember", + "printedName": "τ_0_0.TModel" + } + ], + "declKind": "Func", + "usr": "s:15OneSignalOSCore20OSModelStoreListenerP19getRemoveModelDeltayAA7OSDeltaCSg6TModelQzF", + "mangledName": "$s15OneSignalOSCore20OSModelStoreListenerP19getRemoveModelDeltayAA7OSDeltaCSg6TModelQzF", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalOSCore.OSModelStoreListener>", + "sugared_genericSig": "", + "protocolReq": true, + "reqNewWitnessTableEntry": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "getUpdateModelDelta", + "printedName": "getUpdateModelDelta(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "OneSignalOSCore.OSDelta?", + "children": [ + { + "kind": "TypeNominal", + "name": "OSDelta", + "printedName": "OneSignalOSCore.OSDelta", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSDelta" + } + ], + "usr": "s:Sq" + }, + { + "kind": "TypeNominal", + "name": "OSModelChangedArgs", + "printedName": "OneSignalOSCore.OSModelChangedArgs", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSModelChangedArgs" + } + ], + "declKind": "Func", + "usr": "s:15OneSignalOSCore20OSModelStoreListenerP19getUpdateModelDeltayAA7OSDeltaCSgAA0D11ChangedArgsCF", + "mangledName": "$s15OneSignalOSCore20OSModelStoreListenerP19getUpdateModelDeltayAA7OSDeltaCSgAA0D11ChangedArgsCF", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalOSCore.OSModelStoreListener>", + "sugared_genericSig": "", + "protocolReq": true, + "reqNewWitnessTableEntry": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "start", + "printedName": "start()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + } + ], + "declKind": "Func", + "usr": "s:15OneSignalOSCore20OSModelStoreListenerPAAE5startyyF", + "mangledName": "$s15OneSignalOSCore20OSModelStoreListenerPAAE5startyyF", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalOSCore.OSModelStoreListener>", + "sugared_genericSig": "", + "declAttributes": [ + "AccessControl" + ], + "isFromExtension": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "onAdded", + "printedName": "onAdded(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "OSModel", + "printedName": "OneSignalOSCore.OSModel", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSModel" + } + ], + "declKind": "Func", + "usr": "s:15OneSignalOSCore20OSModelStoreListenerPAAE7onAddedyyAA0D0CF", + "mangledName": "$s15OneSignalOSCore20OSModelStoreListenerPAAE7onAddedyyAA0D0CF", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalOSCore.OSModelStoreListener>", + "sugared_genericSig": "", + "declAttributes": [ + "AccessControl" + ], + "isFromExtension": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "onUpdated", + "printedName": "onUpdated(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "OSModelChangedArgs", + "printedName": "OneSignalOSCore.OSModelChangedArgs", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSModelChangedArgs" + } + ], + "declKind": "Func", + "usr": "s:15OneSignalOSCore20OSModelStoreListenerPAAE9onUpdatedyyAA0D11ChangedArgsCF", + "mangledName": "$s15OneSignalOSCore20OSModelStoreListenerPAAE9onUpdatedyyAA0D11ChangedArgsCF", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalOSCore.OSModelStoreListener>", + "sugared_genericSig": "", + "declAttributes": [ + "AccessControl" + ], + "isFromExtension": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "onRemoved", + "printedName": "onRemoved(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "OSModel", + "printedName": "OneSignalOSCore.OSModel", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSModel" + } + ], + "declKind": "Func", + "usr": "s:15OneSignalOSCore20OSModelStoreListenerPAAE9onRemovedyyAA0D0CF", + "mangledName": "$s15OneSignalOSCore20OSModelStoreListenerPAAE9onRemovedyyAA0D0CF", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalOSCore.OSModelStoreListener>", + "sugared_genericSig": "", + "declAttributes": [ + "AccessControl" + ], + "isFromExtension": true, + "funcSelfKind": "NonMutating" + } + ], + "declKind": "Protocol", + "usr": "s:15OneSignalOSCore20OSModelStoreListenerP", + "mangledName": "$s15OneSignalOSCore20OSModelStoreListenerP", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0 : OneSignalOSCore.OSModelStoreChangedHandler, τ_0_0.TModel : OneSignalOSCore.OSModel>", + "sugared_genericSig": "", + "declAttributes": [ + "AccessControl" + ], + "conformances": [ + { + "kind": "Conformance", + "name": "OSModelStoreChangedHandler", + "printedName": "OSModelStoreChangedHandler", + "usr": "s:15OneSignalOSCore26OSModelStoreChangedHandlerP", + "mangledName": "$s15OneSignalOSCore26OSModelStoreChangedHandlerP" + } + ] + }, + { + "kind": "Import", + "name": "Foundation", + "printedName": "Foundation", + "declKind": "Import", + "moduleName": "OneSignalOSCore", + "declAttributes": [ + "RawDocComment" + ] + }, + { + "kind": "TypeDecl", + "name": "OSModelStoreChangedHandler", + "printedName": "OSModelStoreChangedHandler", + "children": [ + { + "kind": "Function", + "name": "onAdded", + "printedName": "onAdded(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "OSModel", + "printedName": "OneSignalOSCore.OSModel", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSModel" + } + ], + "declKind": "Func", + "usr": "s:15OneSignalOSCore26OSModelStoreChangedHandlerP7onAddedyyAA0D0CF", + "mangledName": "$s15OneSignalOSCore26OSModelStoreChangedHandlerP7onAddedyyAA0D0CF", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalOSCore.OSModelStoreChangedHandler>", + "sugared_genericSig": "", + "protocolReq": true, + "declAttributes": [ + "RawDocComment" + ], + "reqNewWitnessTableEntry": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "onUpdated", + "printedName": "onUpdated(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "OSModelChangedArgs", + "printedName": "OneSignalOSCore.OSModelChangedArgs", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSModelChangedArgs" + } + ], + "declKind": "Func", + "usr": "s:15OneSignalOSCore26OSModelStoreChangedHandlerP9onUpdatedyyAA0dF4ArgsCF", + "mangledName": "$s15OneSignalOSCore26OSModelStoreChangedHandlerP9onUpdatedyyAA0dF4ArgsCF", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalOSCore.OSModelStoreChangedHandler>", + "sugared_genericSig": "", + "protocolReq": true, + "declAttributes": [ + "RawDocComment" + ], + "reqNewWitnessTableEntry": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "onRemoved", + "printedName": "onRemoved(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "OSModel", + "printedName": "OneSignalOSCore.OSModel", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSModel" + } + ], + "declKind": "Func", + "usr": "s:15OneSignalOSCore26OSModelStoreChangedHandlerP9onRemovedyyAA0D0CF", + "mangledName": "$s15OneSignalOSCore26OSModelStoreChangedHandlerP9onRemovedyyAA0D0CF", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalOSCore.OSModelStoreChangedHandler>", + "sugared_genericSig": "", + "protocolReq": true, + "declAttributes": [ + "RawDocComment" + ], + "reqNewWitnessTableEntry": true, + "funcSelfKind": "NonMutating" + } + ], + "declKind": "Protocol", + "usr": "s:15OneSignalOSCore26OSModelStoreChangedHandlerP", + "mangledName": "$s15OneSignalOSCore26OSModelStoreChangedHandlerP", + "moduleName": "OneSignalOSCore", + "declAttributes": [ + "AccessControl", + "RawDocComment" + ] + }, + { + "kind": "Import", + "name": "Foundation", + "printedName": "Foundation", + "declKind": "Import", + "moduleName": "OneSignalOSCore", + "declAttributes": [ + "RawDocComment" + ] + }, + { + "kind": "TypeDecl", + "name": "OSDelta", + "printedName": "OSDelta", + "children": [ + { + "kind": "Var", + "name": "name", + "printedName": "name", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Var", + "usr": "s:15OneSignalOSCore7OSDeltaC4nameSSvp", + "mangledName": "$s15OneSignalOSCore7OSDeltaC4nameSSvp", + "moduleName": "OneSignalOSCore", + "declAttributes": [ + "Final", + "HasStorage", + "AccessControl" + ], + "isLet": true, + "hasStorage": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Accessor", + "usr": "s:15OneSignalOSCore7OSDeltaC4nameSSvg", + "mangledName": "$s15OneSignalOSCore7OSDeltaC4nameSSvg", + "moduleName": "OneSignalOSCore", + "implicit": true, + "declAttributes": [ + "Final" + ], + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "deltaId", + "printedName": "deltaId", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Var", + "usr": "s:15OneSignalOSCore7OSDeltaC7deltaIdSSvp", + "mangledName": "$s15OneSignalOSCore7OSDeltaC7deltaIdSSvp", + "moduleName": "OneSignalOSCore", + "declAttributes": [ + "Final", + "HasStorage", + "AccessControl" + ], + "isLet": true, + "hasStorage": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Accessor", + "usr": "s:15OneSignalOSCore7OSDeltaC7deltaIdSSvg", + "mangledName": "$s15OneSignalOSCore7OSDeltaC7deltaIdSSvg", + "moduleName": "OneSignalOSCore", + "implicit": true, + "declAttributes": [ + "Final" + ], + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "timestamp", + "printedName": "timestamp", + "children": [ + { + "kind": "TypeNominal", + "name": "Date", + "printedName": "Foundation.Date", + "usr": "s:10Foundation4DateV" + } + ], + "declKind": "Var", + "usr": "s:15OneSignalOSCore7OSDeltaC9timestamp10Foundation4DateVvp", + "mangledName": "$s15OneSignalOSCore7OSDeltaC9timestamp10Foundation4DateVvp", + "moduleName": "OneSignalOSCore", + "declAttributes": [ + "Final", + "HasStorage", + "AccessControl" + ], + "isLet": true, + "hasStorage": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "Date", + "printedName": "Foundation.Date", + "usr": "s:10Foundation4DateV" + } + ], + "declKind": "Accessor", + "usr": "s:15OneSignalOSCore7OSDeltaC9timestamp10Foundation4DateVvg", + "mangledName": "$s15OneSignalOSCore7OSDeltaC9timestamp10Foundation4DateVvg", + "moduleName": "OneSignalOSCore", + "implicit": true, + "declAttributes": [ + "Final" + ], + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "model", + "printedName": "model", + "children": [ + { + "kind": "TypeNominal", + "name": "OSModel", + "printedName": "OneSignalOSCore.OSModel", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSModel" + } + ], + "declKind": "Var", + "usr": "s:15OneSignalOSCore7OSDeltaC5modelAA7OSModelCvp", + "mangledName": "$s15OneSignalOSCore7OSDeltaC5modelAA7OSModelCvp", + "moduleName": "OneSignalOSCore", + "declAttributes": [ + "HasStorage", + "AccessControl" + ], + "hasStorage": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "OSModel", + "printedName": "OneSignalOSCore.OSModel", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSModel" + } + ], + "declKind": "Accessor", + "usr": "s:15OneSignalOSCore7OSDeltaC5modelAA7OSModelCvg", + "mangledName": "$s15OneSignalOSCore7OSDeltaC5modelAA7OSModelCvg", + "moduleName": "OneSignalOSCore", + "implicit": true, + "accessorKind": "get" + }, + { + "kind": "Accessor", + "name": "Set", + "printedName": "Set()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "OSModel", + "printedName": "OneSignalOSCore.OSModel", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSModel" + } + ], + "declKind": "Accessor", + "usr": "s:15OneSignalOSCore7OSDeltaC5modelAA7OSModelCvs", + "mangledName": "$s15OneSignalOSCore7OSDeltaC5modelAA7OSModelCvs", + "moduleName": "OneSignalOSCore", + "implicit": true, + "accessorKind": "set" + }, + { + "kind": "Accessor", + "name": "Modify", + "printedName": "Modify()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + } + ], + "declKind": "Accessor", + "usr": "s:15OneSignalOSCore7OSDeltaC5modelAA7OSModelCvM", + "mangledName": "$s15OneSignalOSCore7OSDeltaC5modelAA7OSModelCvM", + "moduleName": "OneSignalOSCore", + "implicit": true, + "accessorKind": "_modify" + } + ] + }, + { + "kind": "Var", + "name": "property", + "printedName": "property", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Var", + "usr": "s:15OneSignalOSCore7OSDeltaC8propertySSvp", + "mangledName": "$s15OneSignalOSCore7OSDeltaC8propertySSvp", + "moduleName": "OneSignalOSCore", + "declAttributes": [ + "Final", + "HasStorage", + "AccessControl" + ], + "isLet": true, + "hasStorage": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Accessor", + "usr": "s:15OneSignalOSCore7OSDeltaC8propertySSvg", + "mangledName": "$s15OneSignalOSCore7OSDeltaC8propertySSvg", + "moduleName": "OneSignalOSCore", + "implicit": true, + "declAttributes": [ + "Final" + ], + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "value", + "printedName": "value", + "children": [ + { + "kind": "TypeNominal", + "name": "ProtocolComposition", + "printedName": "Any" + } + ], + "declKind": "Var", + "usr": "s:15OneSignalOSCore7OSDeltaC5valueypvp", + "mangledName": "$s15OneSignalOSCore7OSDeltaC5valueypvp", + "moduleName": "OneSignalOSCore", + "declAttributes": [ + "Final", + "HasStorage", + "AccessControl" + ], + "isLet": true, + "hasStorage": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "ProtocolComposition", + "printedName": "Any" + } + ], + "declKind": "Accessor", + "usr": "s:15OneSignalOSCore7OSDeltaC5valueypvg", + "mangledName": "$s15OneSignalOSCore7OSDeltaC5valueypvg", + "moduleName": "OneSignalOSCore", + "implicit": true, + "declAttributes": [ + "Final" + ], + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "description", + "printedName": "description", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Var", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSDelta(py)description", + "mangledName": "$s15OneSignalOSCore7OSDeltaC11descriptionSSvp", + "moduleName": "OneSignalOSCore", + "overriding": true, + "isOpen": true, + "objc_name": "description", + "declAttributes": [ + "Dynamic", + "ObjC", + "AccessControl", + "Override" + ], + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Accessor", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSDelta(im)description", + "mangledName": "$s15OneSignalOSCore7OSDeltaC11descriptionSSvg", + "moduleName": "OneSignalOSCore", + "overriding": true, + "isOpen": true, + "objc_name": "description", + "declAttributes": [ + "Dynamic", + "ObjC" + ], + "accessorKind": "get" + } + ] + }, + { + "kind": "Constructor", + "name": "init", + "printedName": "init(name:model:property:value:)", + "children": [ + { + "kind": "TypeNominal", + "name": "OSDelta", + "printedName": "OneSignalOSCore.OSDelta", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSDelta" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + }, + { + "kind": "TypeNominal", + "name": "OSModel", + "printedName": "OneSignalOSCore.OSModel", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSModel" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + }, + { + "kind": "TypeNominal", + "name": "ProtocolComposition", + "printedName": "Any" + } + ], + "declKind": "Constructor", + "usr": "s:15OneSignalOSCore7OSDeltaC4name5model8property5valueACSS_AA7OSModelCSSyptcfc", + "mangledName": "$s15OneSignalOSCore7OSDeltaC4name5model8property5valueACSS_AA7OSModelCSSyptcfc", + "moduleName": "OneSignalOSCore", + "declAttributes": [ + "AccessControl" + ], + "init_kind": "Designated" + }, + { + "kind": "Function", + "name": "encode", + "printedName": "encode(with:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "NSCoder", + "printedName": "Foundation.NSCoder", + "usr": "c:objc(cs)NSCoder" + } + ], + "declKind": "Func", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSDelta(im)encodeWithCoder:", + "mangledName": "$s15OneSignalOSCore7OSDeltaC6encode4withySo7NSCoderC_tF", + "moduleName": "OneSignalOSCore", + "objc_name": "encodeWithCoder:", + "declAttributes": [ + "ObjC", + "AccessControl" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Constructor", + "name": "init", + "printedName": "init(coder:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "OneSignalOSCore.OSDelta?", + "children": [ + { + "kind": "TypeNominal", + "name": "OSDelta", + "printedName": "OneSignalOSCore.OSDelta", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSDelta" + } + ], + "usr": "s:Sq" + }, + { + "kind": "TypeNominal", + "name": "NSCoder", + "printedName": "Foundation.NSCoder", + "usr": "c:objc(cs)NSCoder" + } + ], + "declKind": "Constructor", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSDelta(im)initWithCoder:", + "mangledName": "$s15OneSignalOSCore7OSDeltaC5coderACSgSo7NSCoderC_tcfc", + "moduleName": "OneSignalOSCore", + "objc_name": "initWithCoder:", + "declAttributes": [ + "ObjC", + "Required", + "AccessControl" + ], + "init_kind": "Designated" + }, + { + "kind": "Constructor", + "name": "init", + "printedName": "init()", + "children": [ + { + "kind": "TypeNominal", + "name": "OSDelta", + "printedName": "OneSignalOSCore.OSDelta", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSDelta" + } + ], + "declKind": "Constructor", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSDelta(im)init", + "mangledName": "$s15OneSignalOSCore7OSDeltaCACycfc", + "moduleName": "OneSignalOSCore", + "overriding": true, + "implicit": true, + "objc_name": "init", + "declAttributes": [ + "Dynamic", + "ObjC", + "Override" + ], + "init_kind": "Designated" + } + ], + "declKind": "Class", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSDelta", + "mangledName": "$s15OneSignalOSCore7OSDeltaC", + "moduleName": "OneSignalOSCore", + "isOpen": true, + "declAttributes": [ + "AccessControl", + "RawDocComment", + "ObjC" + ], + "superclassUsr": "c:objc(cs)NSObject", + "superclassNames": [ + "ObjectiveC.NSObject" + ], + "conformances": [ + { + "kind": "Conformance", + "name": "Equatable", + "printedName": "Equatable", + "usr": "s:SQ", + "mangledName": "$sSQ" + }, + { + "kind": "Conformance", + "name": "Hashable", + "printedName": "Hashable", + "usr": "s:SH", + "mangledName": "$sSH" + }, + { + "kind": "Conformance", + "name": "CVarArg", + "printedName": "CVarArg", + "usr": "s:s7CVarArgP", + "mangledName": "$ss7CVarArgP" + }, + { + "kind": "Conformance", + "name": "_KeyValueCodingAndObservingPublishing", + "printedName": "_KeyValueCodingAndObservingPublishing", + "usr": "s:10Foundation37_KeyValueCodingAndObservingPublishingP", + "mangledName": "$s10Foundation37_KeyValueCodingAndObservingPublishingP" + }, + { + "kind": "Conformance", + "name": "_KeyValueCodingAndObserving", + "printedName": "_KeyValueCodingAndObserving", + "usr": "s:10Foundation27_KeyValueCodingAndObservingP", + "mangledName": "$s10Foundation27_KeyValueCodingAndObservingP" + }, + { + "kind": "Conformance", + "name": "CustomStringConvertible", + "printedName": "CustomStringConvertible", + "usr": "s:s23CustomStringConvertibleP", + "mangledName": "$ss23CustomStringConvertibleP" + }, + { + "kind": "Conformance", + "name": "CustomDebugStringConvertible", + "printedName": "CustomDebugStringConvertible", + "usr": "s:s28CustomDebugStringConvertibleP", + "mangledName": "$ss28CustomDebugStringConvertibleP" + } + ] + }, + { + "kind": "Import", + "name": "Foundation", + "printedName": "Foundation", + "declKind": "Import", + "moduleName": "OneSignalOSCore", + "declAttributes": [ + "RawDocComment" + ] + }, + { + "kind": "TypeDecl", + "name": "OSModelChangedArgs", + "printedName": "OSModelChangedArgs", + "children": [ + { + "kind": "Var", + "name": "model", + "printedName": "model", + "children": [ + { + "kind": "TypeNominal", + "name": "OSModel", + "printedName": "OneSignalOSCore.OSModel", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSModel" + } + ], + "declKind": "Var", + "usr": "s:15OneSignalOSCore18OSModelChangedArgsC5modelAA0D0Cvp", + "mangledName": "$s15OneSignalOSCore18OSModelChangedArgsC5modelAA0D0Cvp", + "moduleName": "OneSignalOSCore", + "declAttributes": [ + "Final", + "HasStorage", + "AccessControl", + "RawDocComment" + ], + "isLet": true, + "hasStorage": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "OSModel", + "printedName": "OneSignalOSCore.OSModel", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSModel" + } + ], + "declKind": "Accessor", + "usr": "s:15OneSignalOSCore18OSModelChangedArgsC5modelAA0D0Cvg", + "mangledName": "$s15OneSignalOSCore18OSModelChangedArgsC5modelAA0D0Cvg", + "moduleName": "OneSignalOSCore", + "implicit": true, + "declAttributes": [ + "Final" + ], + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "property", + "printedName": "property", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Var", + "usr": "s:15OneSignalOSCore18OSModelChangedArgsC8propertySSvp", + "mangledName": "$s15OneSignalOSCore18OSModelChangedArgsC8propertySSvp", + "moduleName": "OneSignalOSCore", + "declAttributes": [ + "Final", + "HasStorage", + "AccessControl", + "RawDocComment" + ], + "isLet": true, + "hasStorage": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Accessor", + "usr": "s:15OneSignalOSCore18OSModelChangedArgsC8propertySSvg", + "mangledName": "$s15OneSignalOSCore18OSModelChangedArgsC8propertySSvg", + "moduleName": "OneSignalOSCore", + "implicit": true, + "declAttributes": [ + "Final" + ], + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "newValue", + "printedName": "newValue", + "children": [ + { + "kind": "TypeNominal", + "name": "ProtocolComposition", + "printedName": "Any" + } + ], + "declKind": "Var", + "usr": "s:15OneSignalOSCore18OSModelChangedArgsC8newValueypvp", + "mangledName": "$s15OneSignalOSCore18OSModelChangedArgsC8newValueypvp", + "moduleName": "OneSignalOSCore", + "declAttributes": [ + "Final", + "HasStorage", + "AccessControl", + "RawDocComment" + ], + "isLet": true, + "hasStorage": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "ProtocolComposition", + "printedName": "Any" + } + ], + "declKind": "Accessor", + "usr": "s:15OneSignalOSCore18OSModelChangedArgsC8newValueypvg", + "mangledName": "$s15OneSignalOSCore18OSModelChangedArgsC8newValueypvg", + "moduleName": "OneSignalOSCore", + "implicit": true, + "declAttributes": [ + "Final" + ], + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "description", + "printedName": "description", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Var", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSModelChangedArgs(py)description", + "mangledName": "$s15OneSignalOSCore18OSModelChangedArgsC11descriptionSSvp", + "moduleName": "OneSignalOSCore", + "overriding": true, + "objc_name": "description", + "declAttributes": [ + "Dynamic", + "ObjC", + "AccessControl", + "Override" + ], + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Accessor", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSModelChangedArgs(im)description", + "mangledName": "$s15OneSignalOSCore18OSModelChangedArgsC11descriptionSSvg", + "moduleName": "OneSignalOSCore", + "overriding": true, + "objc_name": "description", + "declAttributes": [ + "Dynamic", + "ObjC" + ], + "accessorKind": "get" + } + ] + }, + { + "kind": "Constructor", + "name": "init", + "printedName": "init()", + "children": [ + { + "kind": "TypeNominal", + "name": "OSModelChangedArgs", + "printedName": "OneSignalOSCore.OSModelChangedArgs", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSModelChangedArgs" + } + ], + "declKind": "Constructor", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSModelChangedArgs(im)init", + "mangledName": "$s15OneSignalOSCore18OSModelChangedArgsCACycfc", + "moduleName": "OneSignalOSCore", + "overriding": true, + "implicit": true, + "objc_name": "init", + "declAttributes": [ + "Dynamic", + "ObjC", + "Override" + ], + "init_kind": "Designated" + } + ], + "declKind": "Class", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSModelChangedArgs", + "mangledName": "$s15OneSignalOSCore18OSModelChangedArgsC", + "moduleName": "OneSignalOSCore", + "declAttributes": [ + "AccessControl", + "ObjC" + ], + "superclassUsr": "c:objc(cs)NSObject", + "hasMissingDesignatedInitializers": true, + "superclassNames": [ + "ObjectiveC.NSObject" + ], + "conformances": [ + { + "kind": "Conformance", + "name": "Equatable", + "printedName": "Equatable", + "usr": "s:SQ", + "mangledName": "$sSQ" + }, + { + "kind": "Conformance", + "name": "Hashable", + "printedName": "Hashable", + "usr": "s:SH", + "mangledName": "$sSH" + }, + { + "kind": "Conformance", + "name": "CVarArg", + "printedName": "CVarArg", + "usr": "s:s7CVarArgP", + "mangledName": "$ss7CVarArgP" + }, + { + "kind": "Conformance", + "name": "_KeyValueCodingAndObservingPublishing", + "printedName": "_KeyValueCodingAndObservingPublishing", + "usr": "s:10Foundation37_KeyValueCodingAndObservingPublishingP", + "mangledName": "$s10Foundation37_KeyValueCodingAndObservingPublishingP" + }, + { + "kind": "Conformance", + "name": "_KeyValueCodingAndObserving", + "printedName": "_KeyValueCodingAndObserving", + "usr": "s:10Foundation27_KeyValueCodingAndObservingP", + "mangledName": "$s10Foundation27_KeyValueCodingAndObservingP" + }, + { + "kind": "Conformance", + "name": "CustomStringConvertible", + "printedName": "CustomStringConvertible", + "usr": "s:s23CustomStringConvertibleP", + "mangledName": "$ss23CustomStringConvertibleP" + }, + { + "kind": "Conformance", + "name": "CustomDebugStringConvertible", + "printedName": "CustomDebugStringConvertible", + "usr": "s:s28CustomDebugStringConvertibleP", + "mangledName": "$ss28CustomDebugStringConvertibleP" + } + ] + }, + { + "kind": "TypeDecl", + "name": "OSModelChangedHandler", + "printedName": "OSModelChangedHandler", + "children": [ + { + "kind": "Function", + "name": "onModelUpdated", + "printedName": "onModelUpdated(args:hydrating:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "OSModelChangedArgs", + "printedName": "OneSignalOSCore.OSModelChangedArgs", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSModelChangedArgs" + }, + { + "kind": "TypeNominal", + "name": "Bool", + "printedName": "Swift.Bool", + "usr": "s:Sb" + } + ], + "declKind": "Func", + "usr": "s:15OneSignalOSCore21OSModelChangedHandlerP14onModelUpdated4args9hydratingyAA0dE4ArgsC_SbtF", + "mangledName": "$s15OneSignalOSCore21OSModelChangedHandlerP14onModelUpdated4args9hydratingyAA0dE4ArgsC_SbtF", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalOSCore.OSModelChangedHandler>", + "sugared_genericSig": "", + "protocolReq": true, + "reqNewWitnessTableEntry": true, + "funcSelfKind": "NonMutating" + } + ], + "declKind": "Protocol", + "usr": "s:15OneSignalOSCore21OSModelChangedHandlerP", + "mangledName": "$s15OneSignalOSCore21OSModelChangedHandlerP", + "moduleName": "OneSignalOSCore", + "declAttributes": [ + "AccessControl" + ] + }, + { + "kind": "Import", + "name": "OneSignalCore", + "printedName": "OneSignalCore", + "declKind": "Import", + "moduleName": "OneSignalOSCore", + "declAttributes": [ + "RawDocComment" + ] + }, + { + "kind": "TypeDecl", + "name": "OSOperationExecutor", + "printedName": "OSOperationExecutor", + "children": [ + { + "kind": "Var", + "name": "supportedDeltas", + "printedName": "supportedDeltas", + "children": [ + { + "kind": "TypeNominal", + "name": "Array", + "printedName": "[Swift.String]", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:Sa" + } + ], + "declKind": "Var", + "usr": "s:15OneSignalOSCore19OSOperationExecutorP15supportedDeltasSaySSGvp", + "mangledName": "$s15OneSignalOSCore19OSOperationExecutorP15supportedDeltasSaySSGvp", + "moduleName": "OneSignalOSCore", + "protocolReq": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "Array", + "printedName": "[Swift.String]", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:Sa" + } + ], + "declKind": "Accessor", + "usr": "s:15OneSignalOSCore19OSOperationExecutorP15supportedDeltasSaySSGvg", + "mangledName": "$s15OneSignalOSCore19OSOperationExecutorP15supportedDeltasSaySSGvg", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalOSCore.OSOperationExecutor>", + "sugared_genericSig": "", + "protocolReq": true, + "reqNewWitnessTableEntry": true, + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "deltaQueue", + "printedName": "deltaQueue", + "children": [ + { + "kind": "TypeNominal", + "name": "Array", + "printedName": "[OneSignalOSCore.OSDelta]", + "children": [ + { + "kind": "TypeNominal", + "name": "OSDelta", + "printedName": "OneSignalOSCore.OSDelta", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSDelta" + } + ], + "usr": "s:Sa" + } + ], + "declKind": "Var", + "usr": "s:15OneSignalOSCore19OSOperationExecutorP10deltaQueueSayAA7OSDeltaCGvp", + "mangledName": "$s15OneSignalOSCore19OSOperationExecutorP10deltaQueueSayAA7OSDeltaCGvp", + "moduleName": "OneSignalOSCore", + "protocolReq": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "Array", + "printedName": "[OneSignalOSCore.OSDelta]", + "children": [ + { + "kind": "TypeNominal", + "name": "OSDelta", + "printedName": "OneSignalOSCore.OSDelta", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSDelta" + } + ], + "usr": "s:Sa" + } + ], + "declKind": "Accessor", + "usr": "s:15OneSignalOSCore19OSOperationExecutorP10deltaQueueSayAA7OSDeltaCGvg", + "mangledName": "$s15OneSignalOSCore19OSOperationExecutorP10deltaQueueSayAA7OSDeltaCGvg", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalOSCore.OSOperationExecutor>", + "sugared_genericSig": "", + "protocolReq": true, + "reqNewWitnessTableEntry": true, + "accessorKind": "get" + } + ] + }, + { + "kind": "Function", + "name": "enqueueDelta", + "printedName": "enqueueDelta(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "OSDelta", + "printedName": "OneSignalOSCore.OSDelta", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSDelta" + } + ], + "declKind": "Func", + "usr": "s:15OneSignalOSCore19OSOperationExecutorP12enqueueDeltayyAA7OSDeltaCF", + "mangledName": "$s15OneSignalOSCore19OSOperationExecutorP12enqueueDeltayyAA7OSDeltaCF", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalOSCore.OSOperationExecutor>", + "sugared_genericSig": "", + "protocolReq": true, + "reqNewWitnessTableEntry": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "cacheDeltaQueue", + "printedName": "cacheDeltaQueue()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + } + ], + "declKind": "Func", + "usr": "s:15OneSignalOSCore19OSOperationExecutorP15cacheDeltaQueueyyF", + "mangledName": "$s15OneSignalOSCore19OSOperationExecutorP15cacheDeltaQueueyyF", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalOSCore.OSOperationExecutor>", + "sugared_genericSig": "", + "protocolReq": true, + "reqNewWitnessTableEntry": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "processDeltaQueue", + "printedName": "processDeltaQueue(inBackground:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "Bool", + "printedName": "Swift.Bool", + "usr": "s:Sb" + } + ], + "declKind": "Func", + "usr": "s:15OneSignalOSCore19OSOperationExecutorP17processDeltaQueue12inBackgroundySb_tF", + "mangledName": "$s15OneSignalOSCore19OSOperationExecutorP17processDeltaQueue12inBackgroundySb_tF", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalOSCore.OSOperationExecutor>", + "sugared_genericSig": "", + "protocolReq": true, + "reqNewWitnessTableEntry": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "processRequestQueue", + "printedName": "processRequestQueue(inBackground:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "Bool", + "printedName": "Swift.Bool", + "usr": "s:Sb" + } + ], + "declKind": "Func", + "usr": "s:15OneSignalOSCore19OSOperationExecutorP19processRequestQueue12inBackgroundySb_tF", + "mangledName": "$s15OneSignalOSCore19OSOperationExecutorP19processRequestQueue12inBackgroundySb_tF", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalOSCore.OSOperationExecutor>", + "sugared_genericSig": "", + "protocolReq": true, + "reqNewWitnessTableEntry": true, + "funcSelfKind": "NonMutating" + } + ], + "declKind": "Protocol", + "usr": "s:15OneSignalOSCore19OSOperationExecutorP", + "mangledName": "$s15OneSignalOSCore19OSOperationExecutorP", + "moduleName": "OneSignalOSCore", + "declAttributes": [ + "AccessControl", + "RawDocComment" + ] + } + ], + "json_format_version": 8 + }, + "ConstValues": [ + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalOSCore\/Source\/OSOperationRepo.swift", + "kind": "BooleanLiteral", + "offset": 1573, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalOSCore\/Source\/OSOperationRepo.swift", + "kind": "Dictionary", + "offset": 1711, + "length": 3, + "value": "[]" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalOSCore\/Source\/OSOperationRepo.swift", + "kind": "Array", + "offset": 1758, + "length": 2, + "value": "[]" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalOSCore\/Source\/OSOperationRepo.swift", + "kind": "Array", + "offset": 1793, + "length": 2, + "value": "[]" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalOSCore\/Source\/OSOperationRepo.swift", + "kind": "IntegerLiteral", + "offset": 1901, + "length": 1, + "value": "5" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalOSCore\/Source\/OSOperationRepo.swift", + "kind": "BooleanLiteral", + "offset": 1927, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalOSCore\/Source\/OSOperationRepo.swift", + "kind": "BooleanLiteral", + "offset": 4475, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalOSCore\/Source\/OSModelStore.swift", + "kind": "StringLiteral", + "offset": 1257, + "length": 12, + "value": "\"OneSignalOSCore.OSModelStore\"" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalOSCore\/Source\/OSModel.swift", + "kind": "BooleanLiteral", + "offset": 1419, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalOSCore\/Source\/OSModel.swift", + "kind": "StringLiteral", + "offset": 1260, + "length": 7, + "value": "\"OneSignalOSCore.OSModel\"" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalOSCore\/Source\/OSDelta.swift", + "kind": "StringLiteral", + "offset": 1455, + "length": 7, + "value": "\"OneSignalOSCore.OSDelta\"" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalOSCore\/Source\/OSModelChangedHandler.swift", + "kind": "StringLiteral", + "offset": 1256, + "length": 18, + "value": "\"OneSignalOSCore.OSModelChangedArgs\"" + } + ] +} \ No newline at end of file diff --git a/iOS_SDK/OneSignalSDK/OneSignal_OSCore/OneSignalOSCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalOSCore.framework/Versions/A/Modules/OneSignalOSCore.swiftmodule/x86_64-apple-ios-macabi.private.swiftinterface b/iOS_SDK/OneSignalSDK/OneSignal_OSCore/OneSignalOSCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalOSCore.framework/Versions/A/Modules/OneSignalOSCore.swiftmodule/x86_64-apple-ios-macabi.private.swiftinterface new file mode 100644 index 000000000..35ef37adb --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignal_OSCore/OneSignalOSCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalOSCore.framework/Versions/A/Modules/OneSignalOSCore.swiftmodule/x86_64-apple-ios-macabi.private.swiftinterface @@ -0,0 +1,118 @@ +// swift-interface-format-version: 1.0 +// swift-compiler-version: Apple Swift version 5.7.1 (swiftlang-5.7.1.135.3 clang-1400.0.29.51) +// swift-module-flags: -target x86_64-apple-ios13.1-macabi -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -O -module-name OneSignalOSCore +// swift-module-flags-ignorable: -enable-bare-slash-regex +import Foundation +import OneSignalCore +@_exported import OneSignalOSCore +import Swift +import _Concurrency +import _StringProcessing +@objc @_inheritsConvenienceInitializers public class OSOperationRepo : ObjectiveC.NSObject { + public static let sharedInstance: OneSignalOSCore.OSOperationRepo + public var paused: Swift.Bool + public func start() + public func addExecutor(_ executor: OneSignalOSCore.OSOperationExecutor) + @objc public func flushDeltaQueue(inBackground: Swift.Bool = false) + @objc override dynamic public init() + @objc deinit +} +@_inheritsConvenienceInitializers public class OSEventProducer : ObjectiveC.NSObject { + public func subscribe(_ handler: THandler) + public func unsubscribe(_ handler: THandler) + public func fire(callback: (THandler) -> Swift.Void) + @objc override dynamic public init() + @objc deinit +} +open class OSModelStore : ObjectiveC.NSObject where TModel : OneSignalOSCore.OSModel { + public init(changeSubscription: OneSignalOSCore.OSEventProducer, storeKey: Swift.String) + public func registerAsUserObserver() -> OneSignalOSCore.OSModelStore + @objc deinit + public func getModel(key: Swift.String) -> TModel? + public func getModel(modelId: Swift.String) -> TModel? + public func getModels() -> [Swift.String : TModel] + public func add(id: Swift.String, model: TModel, hydrating: Swift.Bool) + public func remove(_ id: Swift.String) + public func clearModelsFromStore() +} +extension OneSignalOSCore.OSModelStore : OneSignalOSCore.OSModelChangedHandler { + public func onModelUpdated(args: OneSignalOSCore.OSModelChangedArgs, hydrating: Swift.Bool) +} +@objc open class OSModel : ObjectiveC.NSObject, Foundation.NSCoding { + final public let modelId: Swift.String + public var changeNotifier: OneSignalOSCore.OSEventProducer + public init(changeNotifier: OneSignalOSCore.OSEventProducer) + @objc open func encode(with coder: Foundation.NSCoder) + @objc required public init?(coder: Foundation.NSCoder) + public func set(property: Swift.String, newValue: T) + public func hydrate(_ response: [Swift.String : Any]) + open func hydrateModel(_ response: [Swift.String : Any]) + @objc deinit +} +@objc public protocol OSBackgroundTaskHandler { + @objc func beginBackgroundTask(_ taskIdentifier: Swift.String) + @objc func endBackgroundTask(_ taskIdentifier: Swift.String) + @objc func setTaskInvalid(_ taskIdentifier: Swift.String) +} +@_inheritsConvenienceInitializers @objc public class OSBackgroundTaskManager : ObjectiveC.NSObject { + @objc public static var taskHandler: OneSignalOSCore.OSBackgroundTaskHandler? + @objc public static func beginBackgroundTask(_ taskIdentifier: Swift.String) + @objc public static func endBackgroundTask(_ taskIdentifier: Swift.String) + @objc public static func setTaskInvalid(_ taskIdentifier: Swift.String) + @objc override dynamic public init() + @objc deinit +} +public protocol OSModelStoreListener : OneSignalOSCore.OSModelStoreChangedHandler { + associatedtype TModel : OneSignalOSCore.OSModel + var store: OneSignalOSCore.OSModelStore { get } + init(store: OneSignalOSCore.OSModelStore) + func getAddModelDelta(_ model: Self.TModel) -> OneSignalOSCore.OSDelta? + func getRemoveModelDelta(_ model: Self.TModel) -> OneSignalOSCore.OSDelta? + func getUpdateModelDelta(_ args: OneSignalOSCore.OSModelChangedArgs) -> OneSignalOSCore.OSDelta? +} +extension OneSignalOSCore.OSModelStoreListener { + public func start() + public func onAdded(_ model: OneSignalOSCore.OSModel) + public func onUpdated(_ args: OneSignalOSCore.OSModelChangedArgs) + public func onRemoved(_ model: OneSignalOSCore.OSModel) +} +public protocol OSModelStoreChangedHandler { + func onAdded(_ model: OneSignalOSCore.OSModel) + func onUpdated(_ args: OneSignalOSCore.OSModelChangedArgs) + func onRemoved(_ model: OneSignalOSCore.OSModel) +} +@objc open class OSDelta : ObjectiveC.NSObject, Foundation.NSCoding { + final public let name: Swift.String + final public let deltaId: Swift.String + final public let timestamp: Foundation.Date + public var model: OneSignalOSCore.OSModel + final public let property: Swift.String + final public let value: Any + @objc override dynamic open var description: Swift.String { + @objc get + } + public init(name: Swift.String, model: OneSignalOSCore.OSModel, property: Swift.String, value: Any) + @objc public func encode(with coder: Foundation.NSCoder) + @objc required public init?(coder: Foundation.NSCoder) + @objc deinit +} +@objc @_hasMissingDesignatedInitializers public class OSModelChangedArgs : ObjectiveC.NSObject { + final public let model: OneSignalOSCore.OSModel + final public let property: Swift.String + final public let newValue: Any + @objc override dynamic public var description: Swift.String { + @objc get + } + @objc deinit +} +public protocol OSModelChangedHandler { + func onModelUpdated(args: OneSignalOSCore.OSModelChangedArgs, hydrating: Swift.Bool) +} +public protocol OSOperationExecutor { + var supportedDeltas: [Swift.String] { get } + var deltaQueue: [OneSignalOSCore.OSDelta] { get } + func enqueueDelta(_ delta: OneSignalOSCore.OSDelta) + func cacheDeltaQueue() + func processDeltaQueue(inBackground: Swift.Bool) + func processRequestQueue(inBackground: Swift.Bool) +} diff --git a/iOS_SDK/OneSignalSDK/OneSignal_OSCore/OneSignalOSCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalOSCore.framework/Versions/A/Modules/OneSignalOSCore.swiftmodule/x86_64-apple-ios-macabi.swiftdoc b/iOS_SDK/OneSignalSDK/OneSignal_OSCore/OneSignalOSCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalOSCore.framework/Versions/A/Modules/OneSignalOSCore.swiftmodule/x86_64-apple-ios-macabi.swiftdoc new file mode 100644 index 000000000..05b726ca0 Binary files /dev/null and b/iOS_SDK/OneSignalSDK/OneSignal_OSCore/OneSignalOSCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalOSCore.framework/Versions/A/Modules/OneSignalOSCore.swiftmodule/x86_64-apple-ios-macabi.swiftdoc differ diff --git a/iOS_SDK/OneSignalSDK/OneSignal_OSCore/OneSignalOSCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalOSCore.framework/Versions/A/Modules/OneSignalOSCore.swiftmodule/x86_64-apple-ios-macabi.swiftinterface b/iOS_SDK/OneSignalSDK/OneSignal_OSCore/OneSignalOSCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalOSCore.framework/Versions/A/Modules/OneSignalOSCore.swiftmodule/x86_64-apple-ios-macabi.swiftinterface new file mode 100644 index 000000000..35ef37adb --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignal_OSCore/OneSignalOSCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalOSCore.framework/Versions/A/Modules/OneSignalOSCore.swiftmodule/x86_64-apple-ios-macabi.swiftinterface @@ -0,0 +1,118 @@ +// swift-interface-format-version: 1.0 +// swift-compiler-version: Apple Swift version 5.7.1 (swiftlang-5.7.1.135.3 clang-1400.0.29.51) +// swift-module-flags: -target x86_64-apple-ios13.1-macabi -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -O -module-name OneSignalOSCore +// swift-module-flags-ignorable: -enable-bare-slash-regex +import Foundation +import OneSignalCore +@_exported import OneSignalOSCore +import Swift +import _Concurrency +import _StringProcessing +@objc @_inheritsConvenienceInitializers public class OSOperationRepo : ObjectiveC.NSObject { + public static let sharedInstance: OneSignalOSCore.OSOperationRepo + public var paused: Swift.Bool + public func start() + public func addExecutor(_ executor: OneSignalOSCore.OSOperationExecutor) + @objc public func flushDeltaQueue(inBackground: Swift.Bool = false) + @objc override dynamic public init() + @objc deinit +} +@_inheritsConvenienceInitializers public class OSEventProducer : ObjectiveC.NSObject { + public func subscribe(_ handler: THandler) + public func unsubscribe(_ handler: THandler) + public func fire(callback: (THandler) -> Swift.Void) + @objc override dynamic public init() + @objc deinit +} +open class OSModelStore : ObjectiveC.NSObject where TModel : OneSignalOSCore.OSModel { + public init(changeSubscription: OneSignalOSCore.OSEventProducer, storeKey: Swift.String) + public func registerAsUserObserver() -> OneSignalOSCore.OSModelStore + @objc deinit + public func getModel(key: Swift.String) -> TModel? + public func getModel(modelId: Swift.String) -> TModel? + public func getModels() -> [Swift.String : TModel] + public func add(id: Swift.String, model: TModel, hydrating: Swift.Bool) + public func remove(_ id: Swift.String) + public func clearModelsFromStore() +} +extension OneSignalOSCore.OSModelStore : OneSignalOSCore.OSModelChangedHandler { + public func onModelUpdated(args: OneSignalOSCore.OSModelChangedArgs, hydrating: Swift.Bool) +} +@objc open class OSModel : ObjectiveC.NSObject, Foundation.NSCoding { + final public let modelId: Swift.String + public var changeNotifier: OneSignalOSCore.OSEventProducer + public init(changeNotifier: OneSignalOSCore.OSEventProducer) + @objc open func encode(with coder: Foundation.NSCoder) + @objc required public init?(coder: Foundation.NSCoder) + public func set(property: Swift.String, newValue: T) + public func hydrate(_ response: [Swift.String : Any]) + open func hydrateModel(_ response: [Swift.String : Any]) + @objc deinit +} +@objc public protocol OSBackgroundTaskHandler { + @objc func beginBackgroundTask(_ taskIdentifier: Swift.String) + @objc func endBackgroundTask(_ taskIdentifier: Swift.String) + @objc func setTaskInvalid(_ taskIdentifier: Swift.String) +} +@_inheritsConvenienceInitializers @objc public class OSBackgroundTaskManager : ObjectiveC.NSObject { + @objc public static var taskHandler: OneSignalOSCore.OSBackgroundTaskHandler? + @objc public static func beginBackgroundTask(_ taskIdentifier: Swift.String) + @objc public static func endBackgroundTask(_ taskIdentifier: Swift.String) + @objc public static func setTaskInvalid(_ taskIdentifier: Swift.String) + @objc override dynamic public init() + @objc deinit +} +public protocol OSModelStoreListener : OneSignalOSCore.OSModelStoreChangedHandler { + associatedtype TModel : OneSignalOSCore.OSModel + var store: OneSignalOSCore.OSModelStore { get } + init(store: OneSignalOSCore.OSModelStore) + func getAddModelDelta(_ model: Self.TModel) -> OneSignalOSCore.OSDelta? + func getRemoveModelDelta(_ model: Self.TModel) -> OneSignalOSCore.OSDelta? + func getUpdateModelDelta(_ args: OneSignalOSCore.OSModelChangedArgs) -> OneSignalOSCore.OSDelta? +} +extension OneSignalOSCore.OSModelStoreListener { + public func start() + public func onAdded(_ model: OneSignalOSCore.OSModel) + public func onUpdated(_ args: OneSignalOSCore.OSModelChangedArgs) + public func onRemoved(_ model: OneSignalOSCore.OSModel) +} +public protocol OSModelStoreChangedHandler { + func onAdded(_ model: OneSignalOSCore.OSModel) + func onUpdated(_ args: OneSignalOSCore.OSModelChangedArgs) + func onRemoved(_ model: OneSignalOSCore.OSModel) +} +@objc open class OSDelta : ObjectiveC.NSObject, Foundation.NSCoding { + final public let name: Swift.String + final public let deltaId: Swift.String + final public let timestamp: Foundation.Date + public var model: OneSignalOSCore.OSModel + final public let property: Swift.String + final public let value: Any + @objc override dynamic open var description: Swift.String { + @objc get + } + public init(name: Swift.String, model: OneSignalOSCore.OSModel, property: Swift.String, value: Any) + @objc public func encode(with coder: Foundation.NSCoder) + @objc required public init?(coder: Foundation.NSCoder) + @objc deinit +} +@objc @_hasMissingDesignatedInitializers public class OSModelChangedArgs : ObjectiveC.NSObject { + final public let model: OneSignalOSCore.OSModel + final public let property: Swift.String + final public let newValue: Any + @objc override dynamic public var description: Swift.String { + @objc get + } + @objc deinit +} +public protocol OSModelChangedHandler { + func onModelUpdated(args: OneSignalOSCore.OSModelChangedArgs, hydrating: Swift.Bool) +} +public protocol OSOperationExecutor { + var supportedDeltas: [Swift.String] { get } + var deltaQueue: [OneSignalOSCore.OSDelta] { get } + func enqueueDelta(_ delta: OneSignalOSCore.OSDelta) + func cacheDeltaQueue() + func processDeltaQueue(inBackground: Swift.Bool) + func processRequestQueue(inBackground: Swift.Bool) +} diff --git a/iOS_SDK/OneSignalSDK/OneSignal_OSCore/OneSignalOSCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalOSCore.framework/Versions/A/Modules/module.modulemap b/iOS_SDK/OneSignalSDK/OneSignal_OSCore/OneSignalOSCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalOSCore.framework/Versions/A/Modules/module.modulemap new file mode 100644 index 000000000..efd705b1d --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignal_OSCore/OneSignalOSCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalOSCore.framework/Versions/A/Modules/module.modulemap @@ -0,0 +1,11 @@ +framework module OneSignalOSCore { + umbrella header "OneSignalOSCore.h" + + export * + module * { export * } +} + +module OneSignalOSCore.Swift { + header "OneSignalOSCore-Swift.h" + requires objc +} diff --git a/iOS_SDK/OneSignalSDK/OneSignal_OSCore/OneSignalOSCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalOSCore.framework/Versions/A/OneSignalOSCore b/iOS_SDK/OneSignalSDK/OneSignal_OSCore/OneSignalOSCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalOSCore.framework/Versions/A/OneSignalOSCore new file mode 100755 index 000000000..3fb4c7d11 Binary files /dev/null and b/iOS_SDK/OneSignalSDK/OneSignal_OSCore/OneSignalOSCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalOSCore.framework/Versions/A/OneSignalOSCore differ diff --git a/iOS_SDK/OneSignalSDK/OneSignal_OSCore/OneSignalOSCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalOSCore.framework/Versions/A/Resources/Info.plist b/iOS_SDK/OneSignalSDK/OneSignal_OSCore/OneSignalOSCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalOSCore.framework/Versions/A/Resources/Info.plist new file mode 100644 index 000000000..055face0d --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignal_OSCore/OneSignalOSCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalOSCore.framework/Versions/A/Resources/Info.plist @@ -0,0 +1,52 @@ + + + + + BuildMachineOSBuild + 22G91 + CFBundleDevelopmentRegion + English + CFBundleExecutable + OneSignalOSCore + CFBundleIdentifier + com.onesignal.OneSignalOSCore + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + OneSignalOSCore + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0 + CFBundleSupportedPlatforms + + MacOSX + + CFBundleVersion + 1 + DTCompiler + com.apple.compilers.llvm.clang.1_0 + DTPlatformBuild + 14B47b + DTPlatformName + macosx + DTPlatformVersion + 13.0 + DTSDKBuild + 22A372 + DTSDKName + macosx13.0 + DTXcode + 1410 + DTXcodeBuild + 14B47b + LSMinimumSystemVersion + 10.15 + NSHumanReadableCopyright + Copyright © 2022 Hiptic. All rights reserved. + UIDeviceFamily + + 2 + + + diff --git a/iOS_SDK/OneSignalSDK/OneSignal_OSCore/OneSignalOSCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalOSCore.framework/Versions/A/_CodeSignature/CodeResources b/iOS_SDK/OneSignalSDK/OneSignal_OSCore/OneSignalOSCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalOSCore.framework/Versions/A/_CodeSignature/CodeResources new file mode 100644 index 000000000..599b49b09 --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignal_OSCore/OneSignalOSCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalOSCore.framework/Versions/A/_CodeSignature/CodeResources @@ -0,0 +1,219 @@ + + + + + files + + Resources/Info.plist + + Qj53MmnuE0pIR0abrzqtp0H9vBI= + + + files2 + + Headers/OneSignalOSCore-Swift.h + + hash2 + + OqiVJNxnXO4oHG4J4rGHsik/Rhs+4yprPu07GPOrhH8= + + + Headers/OneSignalOSCore.h + + hash2 + + MsJrzFE2HsCHUBJgwVudBxIOtUFFRPJU9Vq9bsNV27A= + + + Modules/OneSignalOSCore.swiftmodule/arm64-apple-ios-macabi.abi.json + + hash2 + + d0MU7egJtbg5SGxs89SF+IoAkZRr6TFINtvxvBvXBJc= + + + Modules/OneSignalOSCore.swiftmodule/arm64-apple-ios-macabi.private.swiftinterface + + hash2 + + tvrU0xHHgVZt0cV8H8GjWBUJXjl1PoRzY81Cg0Op/xM= + + + Modules/OneSignalOSCore.swiftmodule/arm64-apple-ios-macabi.swiftdoc + + hash2 + + lss1qqM5lb1oyOcY0fbC6KS1ti6xMmhhYV40qf3+vOU= + + + Modules/OneSignalOSCore.swiftmodule/arm64-apple-ios-macabi.swiftinterface + + hash2 + + tvrU0xHHgVZt0cV8H8GjWBUJXjl1PoRzY81Cg0Op/xM= + + + Modules/OneSignalOSCore.swiftmodule/arm64-apple-ios-macabi.swiftmodule + + hash2 + + yzrvV5NJxc7y+t+Jnl2CwfiDsJPYHesCJlu5gw5Imnc= + + + Modules/OneSignalOSCore.swiftmodule/x86_64-apple-ios-macabi.abi.json + + hash2 + + d0MU7egJtbg5SGxs89SF+IoAkZRr6TFINtvxvBvXBJc= + + + Modules/OneSignalOSCore.swiftmodule/x86_64-apple-ios-macabi.private.swiftinterface + + hash2 + + 3xX9632A7tSEGaEpw62zGoMhfnuraEyYg4lpETVgT34= + + + Modules/OneSignalOSCore.swiftmodule/x86_64-apple-ios-macabi.swiftdoc + + hash2 + + yrJiejCpPpB2g/Mb9+RMMxY+ZC5ucLgS28YK9ARFm20= + + + Modules/OneSignalOSCore.swiftmodule/x86_64-apple-ios-macabi.swiftinterface + + hash2 + + 3xX9632A7tSEGaEpw62zGoMhfnuraEyYg4lpETVgT34= + + + Modules/OneSignalOSCore.swiftmodule/x86_64-apple-ios-macabi.swiftmodule + + hash2 + + aEKXxmw8gsUc+RTJ1dVI/ljupKOD9sn62uYYl/A9vWU= + + + Modules/module.modulemap + + hash2 + + x91khB5nqURf4ltg1dva7WEuxxdOwv8OyWtDKvlKnYg= + + + Resources/Info.plist + + hash2 + + O9Re5BdaS4dK66DwwVa+D1h7TW9PLVEkkOrlDDP3ZSs= + + + + rules + + ^Resources/ + + ^Resources/.*\.lproj/ + + optional + + weight + 1000 + + ^Resources/.*\.lproj/locversion.plist$ + + omit + + weight + 1100 + + ^Resources/Base\.lproj/ + + weight + 1010 + + ^version.plist$ + + + rules2 + + .*\.dSYM($|/) + + weight + 11 + + ^(.*/)?\.DS_Store$ + + omit + + weight + 2000 + + ^(Frameworks|SharedFrameworks|PlugIns|Plug-ins|XPCServices|Helpers|MacOS|Library/(Automator|Spotlight|LoginItems))/ + + nested + + weight + 10 + + ^.* + + ^Info\.plist$ + + omit + + weight + 20 + + ^PkgInfo$ + + omit + + weight + 20 + + ^Resources/ + + weight + 20 + + ^Resources/.*\.lproj/ + + optional + + weight + 1000 + + ^Resources/.*\.lproj/locversion.plist$ + + omit + + weight + 1100 + + ^Resources/Base\.lproj/ + + weight + 1010 + + ^[^/]+$ + + nested + + weight + 10 + + ^embedded\.provisionprofile$ + + weight + 20 + + ^version\.plist$ + + weight + 20 + + + + diff --git a/iOS_SDK/OneSignalSDK/OneSignal_OSCore/OneSignalOSCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalOSCore.framework/Versions/Current b/iOS_SDK/OneSignalSDK/OneSignal_OSCore/OneSignalOSCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalOSCore.framework/Versions/Current new file mode 120000 index 000000000..8c7e5a667 --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignal_OSCore/OneSignalOSCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalOSCore.framework/Versions/Current @@ -0,0 +1 @@ +A \ No newline at end of file diff --git a/iOS_SDK/OneSignalSDK/OneSignal_OSCore/OneSignalOSCore.xcframework/ios-arm64_x86_64-simulator/OneSignalOSCore.framework/Headers/OneSignalOSCore-Swift.h b/iOS_SDK/OneSignalSDK/OneSignal_OSCore/OneSignalOSCore.xcframework/ios-arm64_x86_64-simulator/OneSignalOSCore.framework/Headers/OneSignalOSCore-Swift.h new file mode 100644 index 000000000..3609a7278 --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignal_OSCore/OneSignalOSCore.xcframework/ios-arm64_x86_64-simulator/OneSignalOSCore.framework/Headers/OneSignalOSCore-Swift.h @@ -0,0 +1,644 @@ +#if 0 +#elif defined(__arm64__) && __arm64__ +// Generated by Apple Swift version 5.7.1 (swiftlang-5.7.1.135.3 clang-1400.0.29.51) +#ifndef ONESIGNALOSCORE_SWIFT_H +#define ONESIGNALOSCORE_SWIFT_H +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wgcc-compat" + +#if !defined(__has_include) +# define __has_include(x) 0 +#endif +#if !defined(__has_attribute) +# define __has_attribute(x) 0 +#endif +#if !defined(__has_feature) +# define __has_feature(x) 0 +#endif +#if !defined(__has_warning) +# define __has_warning(x) 0 +#endif + +#if __has_include() +# include +#endif + +#pragma clang diagnostic ignored "-Wduplicate-method-match" +#pragma clang diagnostic ignored "-Wauto-import" +#if defined(__OBJC__) +#include +#endif +#if defined(__cplusplus) +#include +#include +#include +#else +#include +#include +#include +#endif + +#if !defined(SWIFT_TYPEDEFS) +# define SWIFT_TYPEDEFS 1 +# if __has_include() +# include +# elif !defined(__cplusplus) +typedef uint_least16_t char16_t; +typedef uint_least32_t char32_t; +# endif +typedef float swift_float2 __attribute__((__ext_vector_type__(2))); +typedef float swift_float3 __attribute__((__ext_vector_type__(3))); +typedef float swift_float4 __attribute__((__ext_vector_type__(4))); +typedef double swift_double2 __attribute__((__ext_vector_type__(2))); +typedef double swift_double3 __attribute__((__ext_vector_type__(3))); +typedef double swift_double4 __attribute__((__ext_vector_type__(4))); +typedef int swift_int2 __attribute__((__ext_vector_type__(2))); +typedef int swift_int3 __attribute__((__ext_vector_type__(3))); +typedef int swift_int4 __attribute__((__ext_vector_type__(4))); +typedef unsigned int swift_uint2 __attribute__((__ext_vector_type__(2))); +typedef unsigned int swift_uint3 __attribute__((__ext_vector_type__(3))); +typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4))); +#endif + +#if !defined(SWIFT_PASTE) +# define SWIFT_PASTE_HELPER(x, y) x##y +# define SWIFT_PASTE(x, y) SWIFT_PASTE_HELPER(x, y) +#endif +#if !defined(SWIFT_METATYPE) +# define SWIFT_METATYPE(X) Class +#endif +#if !defined(SWIFT_CLASS_PROPERTY) +# if __has_feature(objc_class_property) +# define SWIFT_CLASS_PROPERTY(...) __VA_ARGS__ +# else +# define SWIFT_CLASS_PROPERTY(...) +# endif +#endif + +#if __has_attribute(objc_runtime_name) +# define SWIFT_RUNTIME_NAME(X) __attribute__((objc_runtime_name(X))) +#else +# define SWIFT_RUNTIME_NAME(X) +#endif +#if __has_attribute(swift_name) +# define SWIFT_COMPILE_NAME(X) __attribute__((swift_name(X))) +#else +# define SWIFT_COMPILE_NAME(X) +#endif +#if __has_attribute(objc_method_family) +# define SWIFT_METHOD_FAMILY(X) __attribute__((objc_method_family(X))) +#else +# define SWIFT_METHOD_FAMILY(X) +#endif +#if __has_attribute(noescape) +# define SWIFT_NOESCAPE __attribute__((noescape)) +#else +# define SWIFT_NOESCAPE +#endif +#if __has_attribute(ns_consumed) +# define SWIFT_RELEASES_ARGUMENT __attribute__((ns_consumed)) +#else +# define SWIFT_RELEASES_ARGUMENT +#endif +#if __has_attribute(warn_unused_result) +# define SWIFT_WARN_UNUSED_RESULT __attribute__((warn_unused_result)) +#else +# define SWIFT_WARN_UNUSED_RESULT +#endif +#if __has_attribute(noreturn) +# define SWIFT_NORETURN __attribute__((noreturn)) +#else +# define SWIFT_NORETURN +#endif +#if !defined(SWIFT_CLASS_EXTRA) +# define SWIFT_CLASS_EXTRA +#endif +#if !defined(SWIFT_PROTOCOL_EXTRA) +# define SWIFT_PROTOCOL_EXTRA +#endif +#if !defined(SWIFT_ENUM_EXTRA) +# define SWIFT_ENUM_EXTRA +#endif +#if !defined(SWIFT_CLASS) +# if __has_attribute(objc_subclassing_restricted) +# define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_CLASS_EXTRA +# define SWIFT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA +# else +# define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA +# define SWIFT_CLASS_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA +# endif +#endif +#if !defined(SWIFT_RESILIENT_CLASS) +# if __has_attribute(objc_class_stub) +# define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME) __attribute__((objc_class_stub)) +# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_class_stub)) SWIFT_CLASS_NAMED(SWIFT_NAME) +# else +# define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME) +# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) SWIFT_CLASS_NAMED(SWIFT_NAME) +# endif +#endif + +#if !defined(SWIFT_PROTOCOL) +# define SWIFT_PROTOCOL(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA +# define SWIFT_PROTOCOL_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA +#endif + +#if !defined(SWIFT_EXTENSION) +# define SWIFT_EXTENSION(M) SWIFT_PASTE(M##_Swift_, __LINE__) +#endif + +#if !defined(OBJC_DESIGNATED_INITIALIZER) +# if __has_attribute(objc_designated_initializer) +# define OBJC_DESIGNATED_INITIALIZER __attribute__((objc_designated_initializer)) +# else +# define OBJC_DESIGNATED_INITIALIZER +# endif +#endif +#if !defined(SWIFT_ENUM_ATTR) +# if defined(__has_attribute) && __has_attribute(enum_extensibility) +# define SWIFT_ENUM_ATTR(_extensibility) __attribute__((enum_extensibility(_extensibility))) +# else +# define SWIFT_ENUM_ATTR(_extensibility) +# endif +#endif +#if !defined(SWIFT_ENUM) +# define SWIFT_ENUM(_type, _name, _extensibility) enum _name : _type _name; enum SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type +# if __has_feature(generalized_swift_name) +# define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) enum _name : _type _name SWIFT_COMPILE_NAME(SWIFT_NAME); enum SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type +# else +# define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) SWIFT_ENUM(_type, _name, _extensibility) +# endif +#endif +#if !defined(SWIFT_UNAVAILABLE) +# define SWIFT_UNAVAILABLE __attribute__((unavailable)) +#endif +#if !defined(SWIFT_UNAVAILABLE_MSG) +# define SWIFT_UNAVAILABLE_MSG(msg) __attribute__((unavailable(msg))) +#endif +#if !defined(SWIFT_AVAILABILITY) +# define SWIFT_AVAILABILITY(plat, ...) __attribute__((availability(plat, __VA_ARGS__))) +#endif +#if !defined(SWIFT_WEAK_IMPORT) +# define SWIFT_WEAK_IMPORT __attribute__((weak_import)) +#endif +#if !defined(SWIFT_DEPRECATED) +# define SWIFT_DEPRECATED __attribute__((deprecated)) +#endif +#if !defined(SWIFT_DEPRECATED_MSG) +# define SWIFT_DEPRECATED_MSG(...) __attribute__((deprecated(__VA_ARGS__))) +#endif +#if __has_feature(attribute_diagnose_if_objc) +# define SWIFT_DEPRECATED_OBJC(Msg) __attribute__((diagnose_if(1, Msg, "warning"))) +#else +# define SWIFT_DEPRECATED_OBJC(Msg) SWIFT_DEPRECATED_MSG(Msg) +#endif +#if defined(__OBJC__) +#if !defined(IBSegueAction) +# define IBSegueAction +#endif +#endif +#if !defined(SWIFT_EXTERN) +# if defined(__cplusplus) +# define SWIFT_EXTERN extern "C" +# else +# define SWIFT_EXTERN extern +# endif +#endif +#if !defined(SWIFT_CALL) +# define SWIFT_CALL __attribute__((swiftcall)) +#endif +#if defined(__cplusplus) +#if !defined(SWIFT_NOEXCEPT) +# define SWIFT_NOEXCEPT noexcept +#endif +#else +#if !defined(SWIFT_NOEXCEPT) +# define SWIFT_NOEXCEPT +#endif +#endif +#if defined(__cplusplus) +#if !defined(SWIFT_CXX_INT_DEFINED) +#define SWIFT_CXX_INT_DEFINED +namespace swift { +using Int = ptrdiff_t; +using UInt = size_t; +} +#endif +#endif +#if defined(__OBJC__) +#if __has_feature(modules) +#if __has_warning("-Watimport-in-framework-header") +#pragma clang diagnostic ignored "-Watimport-in-framework-header" +#endif +@import Foundation; +@import ObjectiveC; +#endif + +#endif +#pragma clang diagnostic ignored "-Wproperty-attribute-mismatch" +#pragma clang diagnostic ignored "-Wduplicate-method-arg" +#if __has_warning("-Wpragma-clang-attribute") +# pragma clang diagnostic ignored "-Wpragma-clang-attribute" +#endif +#pragma clang diagnostic ignored "-Wunknown-pragmas" +#pragma clang diagnostic ignored "-Wnullability" +#pragma clang diagnostic ignored "-Wdollar-in-identifier-extension" + +#if __has_attribute(external_source_symbol) +# pragma push_macro("any") +# undef any +# pragma clang attribute push(__attribute__((external_source_symbol(language="Swift", defined_in="OneSignalOSCore",generated_declaration))), apply_to=any(function,enum,objc_interface,objc_category,objc_protocol)) +# pragma pop_macro("any") +#endif + +#if defined(__OBJC__) +@class NSString; + +SWIFT_PROTOCOL("_TtP15OneSignalOSCore23OSBackgroundTaskHandler_") +@protocol OSBackgroundTaskHandler +- (void)beginBackgroundTask:(NSString * _Nonnull)taskIdentifier; +- (void)endBackgroundTask:(NSString * _Nonnull)taskIdentifier; +- (void)setTaskInvalid:(NSString * _Nonnull)taskIdentifier; +@end + + +SWIFT_CLASS("_TtC15OneSignalOSCore23OSBackgroundTaskManager") +@interface OSBackgroundTaskManager : NSObject +SWIFT_CLASS_PROPERTY(@property (nonatomic, class, strong) id _Nullable taskHandler;) ++ (id _Nullable)taskHandler SWIFT_WARN_UNUSED_RESULT; ++ (void)setTaskHandler:(id _Nullable)value; ++ (void)beginBackgroundTask:(NSString * _Nonnull)taskIdentifier; ++ (void)endBackgroundTask:(NSString * _Nonnull)taskIdentifier; ++ (void)setTaskInvalid:(NSString * _Nonnull)taskIdentifier; +- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER; +@end + +@class NSCoder; + +SWIFT_CLASS("_TtC15OneSignalOSCore7OSDelta") +@interface OSDelta : NSObject +@property (nonatomic, readonly, copy) NSString * _Nonnull description; +- (void)encodeWithCoder:(NSCoder * _Nonnull)coder; +- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)coder OBJC_DESIGNATED_INITIALIZER; +- (nonnull instancetype)init SWIFT_UNAVAILABLE; ++ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); +@end + + +SWIFT_CLASS("_TtC15OneSignalOSCore7OSModel") +@interface OSModel : NSObject +- (void)encodeWithCoder:(NSCoder * _Nonnull)coder; +- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)coder OBJC_DESIGNATED_INITIALIZER; +- (nonnull instancetype)init SWIFT_UNAVAILABLE; ++ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); +@end + + +SWIFT_CLASS("_TtC15OneSignalOSCore18OSModelChangedArgs") +@interface OSModelChangedArgs : NSObject +@property (nonatomic, readonly, copy) NSString * _Nonnull description; +- (nonnull instancetype)init SWIFT_UNAVAILABLE; ++ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); +@end + + +/// The OSOperationRepo is a static singleton. +/// OSDeltas are enqueued when model store observers observe changes to their models, and sorted to their appropriate executors. +SWIFT_CLASS("_TtC15OneSignalOSCore15OSOperationRepo") +@interface OSOperationRepo : NSObject +- (void)flushDeltaQueueInBackground:(BOOL)inBackground; +- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER; +@end + +#endif +#if defined(__cplusplus) +#endif +#if __has_attribute(external_source_symbol) +# pragma clang attribute pop +#endif +#pragma clang diagnostic pop +#endif + +#elif defined(__x86_64__) && __x86_64__ +// Generated by Apple Swift version 5.7.1 (swiftlang-5.7.1.135.3 clang-1400.0.29.51) +#ifndef ONESIGNALOSCORE_SWIFT_H +#define ONESIGNALOSCORE_SWIFT_H +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wgcc-compat" + +#if !defined(__has_include) +# define __has_include(x) 0 +#endif +#if !defined(__has_attribute) +# define __has_attribute(x) 0 +#endif +#if !defined(__has_feature) +# define __has_feature(x) 0 +#endif +#if !defined(__has_warning) +# define __has_warning(x) 0 +#endif + +#if __has_include() +# include +#endif + +#pragma clang diagnostic ignored "-Wduplicate-method-match" +#pragma clang diagnostic ignored "-Wauto-import" +#if defined(__OBJC__) +#include +#endif +#if defined(__cplusplus) +#include +#include +#include +#else +#include +#include +#include +#endif + +#if !defined(SWIFT_TYPEDEFS) +# define SWIFT_TYPEDEFS 1 +# if __has_include() +# include +# elif !defined(__cplusplus) +typedef uint_least16_t char16_t; +typedef uint_least32_t char32_t; +# endif +typedef float swift_float2 __attribute__((__ext_vector_type__(2))); +typedef float swift_float3 __attribute__((__ext_vector_type__(3))); +typedef float swift_float4 __attribute__((__ext_vector_type__(4))); +typedef double swift_double2 __attribute__((__ext_vector_type__(2))); +typedef double swift_double3 __attribute__((__ext_vector_type__(3))); +typedef double swift_double4 __attribute__((__ext_vector_type__(4))); +typedef int swift_int2 __attribute__((__ext_vector_type__(2))); +typedef int swift_int3 __attribute__((__ext_vector_type__(3))); +typedef int swift_int4 __attribute__((__ext_vector_type__(4))); +typedef unsigned int swift_uint2 __attribute__((__ext_vector_type__(2))); +typedef unsigned int swift_uint3 __attribute__((__ext_vector_type__(3))); +typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4))); +#endif + +#if !defined(SWIFT_PASTE) +# define SWIFT_PASTE_HELPER(x, y) x##y +# define SWIFT_PASTE(x, y) SWIFT_PASTE_HELPER(x, y) +#endif +#if !defined(SWIFT_METATYPE) +# define SWIFT_METATYPE(X) Class +#endif +#if !defined(SWIFT_CLASS_PROPERTY) +# if __has_feature(objc_class_property) +# define SWIFT_CLASS_PROPERTY(...) __VA_ARGS__ +# else +# define SWIFT_CLASS_PROPERTY(...) +# endif +#endif + +#if __has_attribute(objc_runtime_name) +# define SWIFT_RUNTIME_NAME(X) __attribute__((objc_runtime_name(X))) +#else +# define SWIFT_RUNTIME_NAME(X) +#endif +#if __has_attribute(swift_name) +# define SWIFT_COMPILE_NAME(X) __attribute__((swift_name(X))) +#else +# define SWIFT_COMPILE_NAME(X) +#endif +#if __has_attribute(objc_method_family) +# define SWIFT_METHOD_FAMILY(X) __attribute__((objc_method_family(X))) +#else +# define SWIFT_METHOD_FAMILY(X) +#endif +#if __has_attribute(noescape) +# define SWIFT_NOESCAPE __attribute__((noescape)) +#else +# define SWIFT_NOESCAPE +#endif +#if __has_attribute(ns_consumed) +# define SWIFT_RELEASES_ARGUMENT __attribute__((ns_consumed)) +#else +# define SWIFT_RELEASES_ARGUMENT +#endif +#if __has_attribute(warn_unused_result) +# define SWIFT_WARN_UNUSED_RESULT __attribute__((warn_unused_result)) +#else +# define SWIFT_WARN_UNUSED_RESULT +#endif +#if __has_attribute(noreturn) +# define SWIFT_NORETURN __attribute__((noreturn)) +#else +# define SWIFT_NORETURN +#endif +#if !defined(SWIFT_CLASS_EXTRA) +# define SWIFT_CLASS_EXTRA +#endif +#if !defined(SWIFT_PROTOCOL_EXTRA) +# define SWIFT_PROTOCOL_EXTRA +#endif +#if !defined(SWIFT_ENUM_EXTRA) +# define SWIFT_ENUM_EXTRA +#endif +#if !defined(SWIFT_CLASS) +# if __has_attribute(objc_subclassing_restricted) +# define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_CLASS_EXTRA +# define SWIFT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA +# else +# define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA +# define SWIFT_CLASS_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA +# endif +#endif +#if !defined(SWIFT_RESILIENT_CLASS) +# if __has_attribute(objc_class_stub) +# define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME) __attribute__((objc_class_stub)) +# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_class_stub)) SWIFT_CLASS_NAMED(SWIFT_NAME) +# else +# define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME) +# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) SWIFT_CLASS_NAMED(SWIFT_NAME) +# endif +#endif + +#if !defined(SWIFT_PROTOCOL) +# define SWIFT_PROTOCOL(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA +# define SWIFT_PROTOCOL_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA +#endif + +#if !defined(SWIFT_EXTENSION) +# define SWIFT_EXTENSION(M) SWIFT_PASTE(M##_Swift_, __LINE__) +#endif + +#if !defined(OBJC_DESIGNATED_INITIALIZER) +# if __has_attribute(objc_designated_initializer) +# define OBJC_DESIGNATED_INITIALIZER __attribute__((objc_designated_initializer)) +# else +# define OBJC_DESIGNATED_INITIALIZER +# endif +#endif +#if !defined(SWIFT_ENUM_ATTR) +# if defined(__has_attribute) && __has_attribute(enum_extensibility) +# define SWIFT_ENUM_ATTR(_extensibility) __attribute__((enum_extensibility(_extensibility))) +# else +# define SWIFT_ENUM_ATTR(_extensibility) +# endif +#endif +#if !defined(SWIFT_ENUM) +# define SWIFT_ENUM(_type, _name, _extensibility) enum _name : _type _name; enum SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type +# if __has_feature(generalized_swift_name) +# define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) enum _name : _type _name SWIFT_COMPILE_NAME(SWIFT_NAME); enum SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type +# else +# define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) SWIFT_ENUM(_type, _name, _extensibility) +# endif +#endif +#if !defined(SWIFT_UNAVAILABLE) +# define SWIFT_UNAVAILABLE __attribute__((unavailable)) +#endif +#if !defined(SWIFT_UNAVAILABLE_MSG) +# define SWIFT_UNAVAILABLE_MSG(msg) __attribute__((unavailable(msg))) +#endif +#if !defined(SWIFT_AVAILABILITY) +# define SWIFT_AVAILABILITY(plat, ...) __attribute__((availability(plat, __VA_ARGS__))) +#endif +#if !defined(SWIFT_WEAK_IMPORT) +# define SWIFT_WEAK_IMPORT __attribute__((weak_import)) +#endif +#if !defined(SWIFT_DEPRECATED) +# define SWIFT_DEPRECATED __attribute__((deprecated)) +#endif +#if !defined(SWIFT_DEPRECATED_MSG) +# define SWIFT_DEPRECATED_MSG(...) __attribute__((deprecated(__VA_ARGS__))) +#endif +#if __has_feature(attribute_diagnose_if_objc) +# define SWIFT_DEPRECATED_OBJC(Msg) __attribute__((diagnose_if(1, Msg, "warning"))) +#else +# define SWIFT_DEPRECATED_OBJC(Msg) SWIFT_DEPRECATED_MSG(Msg) +#endif +#if defined(__OBJC__) +#if !defined(IBSegueAction) +# define IBSegueAction +#endif +#endif +#if !defined(SWIFT_EXTERN) +# if defined(__cplusplus) +# define SWIFT_EXTERN extern "C" +# else +# define SWIFT_EXTERN extern +# endif +#endif +#if !defined(SWIFT_CALL) +# define SWIFT_CALL __attribute__((swiftcall)) +#endif +#if defined(__cplusplus) +#if !defined(SWIFT_NOEXCEPT) +# define SWIFT_NOEXCEPT noexcept +#endif +#else +#if !defined(SWIFT_NOEXCEPT) +# define SWIFT_NOEXCEPT +#endif +#endif +#if defined(__cplusplus) +#if !defined(SWIFT_CXX_INT_DEFINED) +#define SWIFT_CXX_INT_DEFINED +namespace swift { +using Int = ptrdiff_t; +using UInt = size_t; +} +#endif +#endif +#if defined(__OBJC__) +#if __has_feature(modules) +#if __has_warning("-Watimport-in-framework-header") +#pragma clang diagnostic ignored "-Watimport-in-framework-header" +#endif +@import Foundation; +@import ObjectiveC; +#endif + +#endif +#pragma clang diagnostic ignored "-Wproperty-attribute-mismatch" +#pragma clang diagnostic ignored "-Wduplicate-method-arg" +#if __has_warning("-Wpragma-clang-attribute") +# pragma clang diagnostic ignored "-Wpragma-clang-attribute" +#endif +#pragma clang diagnostic ignored "-Wunknown-pragmas" +#pragma clang diagnostic ignored "-Wnullability" +#pragma clang diagnostic ignored "-Wdollar-in-identifier-extension" + +#if __has_attribute(external_source_symbol) +# pragma push_macro("any") +# undef any +# pragma clang attribute push(__attribute__((external_source_symbol(language="Swift", defined_in="OneSignalOSCore",generated_declaration))), apply_to=any(function,enum,objc_interface,objc_category,objc_protocol)) +# pragma pop_macro("any") +#endif + +#if defined(__OBJC__) +@class NSString; + +SWIFT_PROTOCOL("_TtP15OneSignalOSCore23OSBackgroundTaskHandler_") +@protocol OSBackgroundTaskHandler +- (void)beginBackgroundTask:(NSString * _Nonnull)taskIdentifier; +- (void)endBackgroundTask:(NSString * _Nonnull)taskIdentifier; +- (void)setTaskInvalid:(NSString * _Nonnull)taskIdentifier; +@end + + +SWIFT_CLASS("_TtC15OneSignalOSCore23OSBackgroundTaskManager") +@interface OSBackgroundTaskManager : NSObject +SWIFT_CLASS_PROPERTY(@property (nonatomic, class, strong) id _Nullable taskHandler;) ++ (id _Nullable)taskHandler SWIFT_WARN_UNUSED_RESULT; ++ (void)setTaskHandler:(id _Nullable)value; ++ (void)beginBackgroundTask:(NSString * _Nonnull)taskIdentifier; ++ (void)endBackgroundTask:(NSString * _Nonnull)taskIdentifier; ++ (void)setTaskInvalid:(NSString * _Nonnull)taskIdentifier; +- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER; +@end + +@class NSCoder; + +SWIFT_CLASS("_TtC15OneSignalOSCore7OSDelta") +@interface OSDelta : NSObject +@property (nonatomic, readonly, copy) NSString * _Nonnull description; +- (void)encodeWithCoder:(NSCoder * _Nonnull)coder; +- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)coder OBJC_DESIGNATED_INITIALIZER; +- (nonnull instancetype)init SWIFT_UNAVAILABLE; ++ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); +@end + + +SWIFT_CLASS("_TtC15OneSignalOSCore7OSModel") +@interface OSModel : NSObject +- (void)encodeWithCoder:(NSCoder * _Nonnull)coder; +- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)coder OBJC_DESIGNATED_INITIALIZER; +- (nonnull instancetype)init SWIFT_UNAVAILABLE; ++ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); +@end + + +SWIFT_CLASS("_TtC15OneSignalOSCore18OSModelChangedArgs") +@interface OSModelChangedArgs : NSObject +@property (nonatomic, readonly, copy) NSString * _Nonnull description; +- (nonnull instancetype)init SWIFT_UNAVAILABLE; ++ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); +@end + + +/// The OSOperationRepo is a static singleton. +/// OSDeltas are enqueued when model store observers observe changes to their models, and sorted to their appropriate executors. +SWIFT_CLASS("_TtC15OneSignalOSCore15OSOperationRepo") +@interface OSOperationRepo : NSObject +- (void)flushDeltaQueueInBackground:(BOOL)inBackground; +- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER; +@end + +#endif +#if defined(__cplusplus) +#endif +#if __has_attribute(external_source_symbol) +# pragma clang attribute pop +#endif +#pragma clang diagnostic pop +#endif + +#else +#error unsupported Swift architecture +#endif diff --git a/iOS_SDK/OneSignalSDK/OneSignal_OSCore/OneSignalOSCore.xcframework/ios-arm64_x86_64-simulator/OneSignalOSCore.framework/Headers/OneSignalOSCore.h b/iOS_SDK/OneSignalSDK/OneSignal_OSCore/OneSignalOSCore.xcframework/ios-arm64_x86_64-simulator/OneSignalOSCore.framework/Headers/OneSignalOSCore.h new file mode 100644 index 000000000..e1e4858b7 --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignal_OSCore/OneSignalOSCore.xcframework/ios-arm64_x86_64-simulator/OneSignalOSCore.framework/Headers/OneSignalOSCore.h @@ -0,0 +1,34 @@ +/* + Modified MIT License + + Copyright 2022 OneSignal + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + 1. The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + 2. All copies of substantial portions of the Software may only be used in connection + with services provided by OneSignal. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + */ + +#import + +//! Project version number for OneSignalOSCore. +FOUNDATION_EXPORT double OneSignalOSCoreVersionNumber; + +//! Project version string for OneSignalOSCore. +FOUNDATION_EXPORT const unsigned char OneSignalOSCoreVersionString[]; diff --git a/iOS_SDK/OneSignalSDK/OneSignal_OSCore/OneSignalOSCore.xcframework/ios-arm64_x86_64-simulator/OneSignalOSCore.framework/Info.plist b/iOS_SDK/OneSignalSDK/OneSignal_OSCore/OneSignalOSCore.xcframework/ios-arm64_x86_64-simulator/OneSignalOSCore.framework/Info.plist new file mode 100644 index 000000000..0282d1366 Binary files /dev/null and b/iOS_SDK/OneSignalSDK/OneSignal_OSCore/OneSignalOSCore.xcframework/ios-arm64_x86_64-simulator/OneSignalOSCore.framework/Info.plist differ diff --git a/iOS_SDK/OneSignalSDK/OneSignal_OSCore/OneSignalOSCore.xcframework/ios-arm64_x86_64-simulator/OneSignalOSCore.framework/Modules/OneSignalOSCore.swiftmodule/arm64-apple-ios-simulator.abi.json b/iOS_SDK/OneSignalSDK/OneSignal_OSCore/OneSignalOSCore.xcframework/ios-arm64_x86_64-simulator/OneSignalOSCore.framework/Modules/OneSignalOSCore.swiftmodule/arm64-apple-ios-simulator.abi.json new file mode 100644 index 000000000..6cf802ba3 --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignal_OSCore/OneSignalOSCore.xcframework/ios-arm64_x86_64-simulator/OneSignalOSCore.framework/Modules/OneSignalOSCore.swiftmodule/arm64-apple-ios-simulator.abi.json @@ -0,0 +1,3662 @@ +{ + "ABIRoot": { + "kind": "Root", + "name": "TopLevel", + "printedName": "TopLevel", + "children": [ + { + "kind": "Import", + "name": "Foundation", + "printedName": "Foundation", + "declKind": "Import", + "moduleName": "OneSignalOSCore", + "declAttributes": [ + "RawDocComment" + ] + }, + { + "kind": "Import", + "name": "OneSignalCore", + "printedName": "OneSignalCore", + "declKind": "Import", + "moduleName": "OneSignalOSCore" + }, + { + "kind": "TypeDecl", + "name": "OSOperationRepo", + "printedName": "OSOperationRepo", + "children": [ + { + "kind": "Var", + "name": "sharedInstance", + "printedName": "sharedInstance", + "children": [ + { + "kind": "TypeNominal", + "name": "OSOperationRepo", + "printedName": "OneSignalOSCore.OSOperationRepo", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSOperationRepo" + } + ], + "declKind": "Var", + "usr": "s:15OneSignalOSCore15OSOperationRepoC14sharedInstanceACvpZ", + "mangledName": "$s15OneSignalOSCore15OSOperationRepoC14sharedInstanceACvpZ", + "moduleName": "OneSignalOSCore", + "static": true, + "declAttributes": [ + "HasInitialValue", + "Final", + "HasStorage", + "AccessControl" + ], + "isLet": true, + "hasStorage": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "OSOperationRepo", + "printedName": "OneSignalOSCore.OSOperationRepo", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSOperationRepo" + } + ], + "declKind": "Accessor", + "usr": "s:15OneSignalOSCore15OSOperationRepoC14sharedInstanceACvgZ", + "mangledName": "$s15OneSignalOSCore15OSOperationRepoC14sharedInstanceACvgZ", + "moduleName": "OneSignalOSCore", + "static": true, + "implicit": true, + "declAttributes": [ + "Final" + ], + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "paused", + "printedName": "paused", + "children": [ + { + "kind": "TypeNominal", + "name": "Bool", + "printedName": "Swift.Bool", + "usr": "s:Sb" + } + ], + "declKind": "Var", + "usr": "s:15OneSignalOSCore15OSOperationRepoC6pausedSbvp", + "mangledName": "$s15OneSignalOSCore15OSOperationRepoC6pausedSbvp", + "moduleName": "OneSignalOSCore", + "declAttributes": [ + "HasInitialValue", + "HasStorage", + "AccessControl" + ], + "hasStorage": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "Bool", + "printedName": "Swift.Bool", + "usr": "s:Sb" + } + ], + "declKind": "Accessor", + "usr": "s:15OneSignalOSCore15OSOperationRepoC6pausedSbvg", + "mangledName": "$s15OneSignalOSCore15OSOperationRepoC6pausedSbvg", + "moduleName": "OneSignalOSCore", + "implicit": true, + "accessorKind": "get" + }, + { + "kind": "Accessor", + "name": "Set", + "printedName": "Set()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "Bool", + "printedName": "Swift.Bool", + "usr": "s:Sb" + } + ], + "declKind": "Accessor", + "usr": "s:15OneSignalOSCore15OSOperationRepoC6pausedSbvs", + "mangledName": "$s15OneSignalOSCore15OSOperationRepoC6pausedSbvs", + "moduleName": "OneSignalOSCore", + "implicit": true, + "accessorKind": "set" + }, + { + "kind": "Accessor", + "name": "Modify", + "printedName": "Modify()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + } + ], + "declKind": "Accessor", + "usr": "s:15OneSignalOSCore15OSOperationRepoC6pausedSbvM", + "mangledName": "$s15OneSignalOSCore15OSOperationRepoC6pausedSbvM", + "moduleName": "OneSignalOSCore", + "implicit": true, + "accessorKind": "_modify" + } + ] + }, + { + "kind": "Function", + "name": "start", + "printedName": "start()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + } + ], + "declKind": "Func", + "usr": "s:15OneSignalOSCore15OSOperationRepoC5startyyF", + "mangledName": "$s15OneSignalOSCore15OSOperationRepoC5startyyF", + "moduleName": "OneSignalOSCore", + "declAttributes": [ + "AccessControl", + "RawDocComment" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "addExecutor", + "printedName": "addExecutor(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "OSOperationExecutor", + "printedName": "OneSignalOSCore.OSOperationExecutor", + "usr": "s:15OneSignalOSCore19OSOperationExecutorP" + } + ], + "declKind": "Func", + "usr": "s:15OneSignalOSCore15OSOperationRepoC11addExecutoryyAA0dG0_pF", + "mangledName": "$s15OneSignalOSCore15OSOperationRepoC11addExecutoryyAA0dG0_pF", + "moduleName": "OneSignalOSCore", + "declAttributes": [ + "AccessControl", + "RawDocComment" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "flushDeltaQueue", + "printedName": "flushDeltaQueue(inBackground:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "Bool", + "printedName": "Swift.Bool", + "hasDefaultArg": true, + "usr": "s:Sb" + } + ], + "declKind": "Func", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSOperationRepo(im)flushDeltaQueueInBackground:", + "mangledName": "$s15OneSignalOSCore15OSOperationRepoC15flushDeltaQueue12inBackgroundySb_tF", + "moduleName": "OneSignalOSCore", + "objc_name": "flushDeltaQueueInBackground:", + "declAttributes": [ + "AccessControl", + "ObjC" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Constructor", + "name": "init", + "printedName": "init()", + "children": [ + { + "kind": "TypeNominal", + "name": "OSOperationRepo", + "printedName": "OneSignalOSCore.OSOperationRepo", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSOperationRepo" + } + ], + "declKind": "Constructor", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSOperationRepo(im)init", + "mangledName": "$s15OneSignalOSCore15OSOperationRepoCACycfc", + "moduleName": "OneSignalOSCore", + "overriding": true, + "implicit": true, + "objc_name": "init", + "declAttributes": [ + "Dynamic", + "ObjC", + "Override" + ], + "init_kind": "Designated" + } + ], + "declKind": "Class", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSOperationRepo", + "mangledName": "$s15OneSignalOSCore15OSOperationRepoC", + "moduleName": "OneSignalOSCore", + "declAttributes": [ + "AccessControl", + "RawDocComment", + "ObjC" + ], + "superclassUsr": "c:objc(cs)NSObject", + "inheritsConvenienceInitializers": true, + "superclassNames": [ + "ObjectiveC.NSObject" + ], + "conformances": [ + { + "kind": "Conformance", + "name": "Equatable", + "printedName": "Equatable", + "usr": "s:SQ", + "mangledName": "$sSQ" + }, + { + "kind": "Conformance", + "name": "Hashable", + "printedName": "Hashable", + "usr": "s:SH", + "mangledName": "$sSH" + }, + { + "kind": "Conformance", + "name": "CVarArg", + "printedName": "CVarArg", + "usr": "s:s7CVarArgP", + "mangledName": "$ss7CVarArgP" + }, + { + "kind": "Conformance", + "name": "_KeyValueCodingAndObservingPublishing", + "printedName": "_KeyValueCodingAndObservingPublishing", + "usr": "s:10Foundation37_KeyValueCodingAndObservingPublishingP", + "mangledName": "$s10Foundation37_KeyValueCodingAndObservingPublishingP" + }, + { + "kind": "Conformance", + "name": "_KeyValueCodingAndObserving", + "printedName": "_KeyValueCodingAndObserving", + "usr": "s:10Foundation27_KeyValueCodingAndObservingP", + "mangledName": "$s10Foundation27_KeyValueCodingAndObservingP" + }, + { + "kind": "Conformance", + "name": "CustomStringConvertible", + "printedName": "CustomStringConvertible", + "usr": "s:s23CustomStringConvertibleP", + "mangledName": "$ss23CustomStringConvertibleP" + }, + { + "kind": "Conformance", + "name": "CustomDebugStringConvertible", + "printedName": "CustomDebugStringConvertible", + "usr": "s:s28CustomDebugStringConvertibleP", + "mangledName": "$ss28CustomDebugStringConvertibleP" + } + ] + }, + { + "kind": "Import", + "name": "Foundation", + "printedName": "Foundation", + "declKind": "Import", + "moduleName": "OneSignalOSCore", + "declAttributes": [ + "RawDocComment" + ] + }, + { + "kind": "Import", + "name": "OneSignalCore", + "printedName": "OneSignalCore", + "declKind": "Import", + "moduleName": "OneSignalOSCore" + }, + { + "kind": "TypeDecl", + "name": "OSEventProducer", + "printedName": "OSEventProducer", + "children": [ + { + "kind": "Function", + "name": "subscribe", + "printedName": "subscribe(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "GenericTypeParam", + "printedName": "τ_0_0" + } + ], + "declKind": "Func", + "usr": "s:15OneSignalOSCore15OSEventProducerC9subscribeyyxF", + "mangledName": "$s15OneSignalOSCore15OSEventProducerC9subscribeyyxF", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0>", + "sugared_genericSig": "", + "declAttributes": [ + "AccessControl" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "unsubscribe", + "printedName": "unsubscribe(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "GenericTypeParam", + "printedName": "τ_0_0" + } + ], + "declKind": "Func", + "usr": "s:15OneSignalOSCore15OSEventProducerC11unsubscribeyyxF", + "mangledName": "$s15OneSignalOSCore15OSEventProducerC11unsubscribeyyxF", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0>", + "sugared_genericSig": "", + "declAttributes": [ + "AccessControl" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "fire", + "printedName": "fire(callback:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeFunc", + "name": "Function", + "printedName": "(τ_0_0) -> ()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "GenericTypeParam", + "printedName": "τ_0_0" + } + ], + "typeAttributes": [ + "noescape" + ] + } + ], + "declKind": "Func", + "usr": "s:15OneSignalOSCore15OSEventProducerC4fire8callbackyyxXE_tF", + "mangledName": "$s15OneSignalOSCore15OSEventProducerC4fire8callbackyyxXE_tF", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0>", + "sugared_genericSig": "", + "declAttributes": [ + "AccessControl" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Constructor", + "name": "init", + "printedName": "init()", + "children": [ + { + "kind": "TypeNominal", + "name": "OSEventProducer", + "printedName": "OneSignalOSCore.OSEventProducer<τ_0_0>", + "children": [ + { + "kind": "TypeNominal", + "name": "GenericTypeParam", + "printedName": "τ_0_0" + } + ], + "usr": "s:15OneSignalOSCore15OSEventProducerC" + } + ], + "declKind": "Constructor", + "usr": "s:15OneSignalOSCore15OSEventProducerCACyxGycfc", + "mangledName": "$s15OneSignalOSCore15OSEventProducerCACyxGycfc", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0>", + "sugared_genericSig": "", + "overriding": true, + "implicit": true, + "objc_name": "init", + "declAttributes": [ + "Dynamic", + "ObjC", + "Override" + ], + "init_kind": "Designated" + } + ], + "declKind": "Class", + "usr": "s:15OneSignalOSCore15OSEventProducerC", + "mangledName": "$s15OneSignalOSCore15OSEventProducerC", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0>", + "sugared_genericSig": "", + "declAttributes": [ + "AccessControl" + ], + "superclassUsr": "c:objc(cs)NSObject", + "inheritsConvenienceInitializers": true, + "superclassNames": [ + "ObjectiveC.NSObject" + ], + "conformances": [ + { + "kind": "Conformance", + "name": "Equatable", + "printedName": "Equatable", + "usr": "s:SQ", + "mangledName": "$sSQ" + }, + { + "kind": "Conformance", + "name": "Hashable", + "printedName": "Hashable", + "usr": "s:SH", + "mangledName": "$sSH" + }, + { + "kind": "Conformance", + "name": "CVarArg", + "printedName": "CVarArg", + "usr": "s:s7CVarArgP", + "mangledName": "$ss7CVarArgP" + }, + { + "kind": "Conformance", + "name": "_KeyValueCodingAndObservingPublishing", + "printedName": "_KeyValueCodingAndObservingPublishing", + "usr": "s:10Foundation37_KeyValueCodingAndObservingPublishingP", + "mangledName": "$s10Foundation37_KeyValueCodingAndObservingPublishingP" + }, + { + "kind": "Conformance", + "name": "_KeyValueCodingAndObserving", + "printedName": "_KeyValueCodingAndObserving", + "usr": "s:10Foundation27_KeyValueCodingAndObservingP", + "mangledName": "$s10Foundation27_KeyValueCodingAndObservingP" + }, + { + "kind": "Conformance", + "name": "CustomStringConvertible", + "printedName": "CustomStringConvertible", + "usr": "s:s23CustomStringConvertibleP", + "mangledName": "$ss23CustomStringConvertibleP" + }, + { + "kind": "Conformance", + "name": "CustomDebugStringConvertible", + "printedName": "CustomDebugStringConvertible", + "usr": "s:s28CustomDebugStringConvertibleP", + "mangledName": "$ss28CustomDebugStringConvertibleP" + } + ] + }, + { + "kind": "Import", + "name": "OneSignalCore", + "printedName": "OneSignalCore", + "declKind": "Import", + "moduleName": "OneSignalOSCore", + "declAttributes": [ + "RawDocComment" + ] + }, + { + "kind": "TypeDecl", + "name": "OSModelStore", + "printedName": "OSModelStore", + "children": [ + { + "kind": "Constructor", + "name": "init", + "printedName": "init(changeSubscription:storeKey:)", + "children": [ + { + "kind": "TypeNominal", + "name": "OSModelStore", + "printedName": "OneSignalOSCore.OSModelStore<τ_0_0>", + "children": [ + { + "kind": "TypeNominal", + "name": "GenericTypeParam", + "printedName": "τ_0_0" + } + ], + "usr": "s:15OneSignalOSCore12OSModelStoreC" + }, + { + "kind": "TypeNominal", + "name": "OSEventProducer", + "printedName": "OneSignalOSCore.OSEventProducer", + "children": [ + { + "kind": "TypeNominal", + "name": "OSModelStoreChangedHandler", + "printedName": "OneSignalOSCore.OSModelStoreChangedHandler", + "usr": "s:15OneSignalOSCore26OSModelStoreChangedHandlerP" + } + ], + "usr": "s:15OneSignalOSCore15OSEventProducerC" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Constructor", + "usr": "s:15OneSignalOSCore12OSModelStoreC18changeSubscription8storeKeyACyxGAA15OSEventProducerCyAA0dE14ChangedHandler_pG_SStcfc", + "mangledName": "$s15OneSignalOSCore12OSModelStoreC18changeSubscription8storeKeyACyxGAA15OSEventProducerCyAA0dE14ChangedHandler_pG_SStcfc", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalOSCore.OSModel>", + "sugared_genericSig": "", + "declAttributes": [ + "AccessControl" + ], + "init_kind": "Designated" + }, + { + "kind": "Function", + "name": "registerAsUserObserver", + "printedName": "registerAsUserObserver()", + "children": [ + { + "kind": "TypeNominal", + "name": "OSModelStore", + "printedName": "OneSignalOSCore.OSModelStore<τ_0_0>", + "children": [ + { + "kind": "TypeNominal", + "name": "GenericTypeParam", + "printedName": "τ_0_0" + } + ], + "usr": "s:15OneSignalOSCore12OSModelStoreC" + } + ], + "declKind": "Func", + "usr": "s:15OneSignalOSCore12OSModelStoreC22registerAsUserObserverACyxGyF", + "mangledName": "$s15OneSignalOSCore12OSModelStoreC22registerAsUserObserverACyxGyF", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalOSCore.OSModel>", + "sugared_genericSig": "", + "declAttributes": [ + "AccessControl" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "getModel", + "printedName": "getModel(key:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "τ_0_0?", + "children": [ + { + "kind": "TypeNominal", + "name": "GenericTypeParam", + "printedName": "τ_0_0" + } + ], + "usr": "s:Sq" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Func", + "usr": "s:15OneSignalOSCore12OSModelStoreC8getModel3keyxSgSS_tF", + "mangledName": "$s15OneSignalOSCore12OSModelStoreC8getModel3keyxSgSS_tF", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalOSCore.OSModel>", + "sugared_genericSig": "", + "declAttributes": [ + "AccessControl", + "RawDocComment" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "getModel", + "printedName": "getModel(modelId:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "τ_0_0?", + "children": [ + { + "kind": "TypeNominal", + "name": "GenericTypeParam", + "printedName": "τ_0_0" + } + ], + "usr": "s:Sq" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Func", + "usr": "s:15OneSignalOSCore12OSModelStoreC8getModel7modelIdxSgSS_tF", + "mangledName": "$s15OneSignalOSCore12OSModelStoreC8getModel7modelIdxSgSS_tF", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalOSCore.OSModel>", + "sugared_genericSig": "", + "declAttributes": [ + "AccessControl", + "RawDocComment" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "getModels", + "printedName": "getModels()", + "children": [ + { + "kind": "TypeNominal", + "name": "Dictionary", + "printedName": "[Swift.String : τ_0_0]", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + }, + { + "kind": "TypeNominal", + "name": "GenericTypeParam", + "printedName": "τ_0_0" + } + ], + "usr": "s:SD" + } + ], + "declKind": "Func", + "usr": "s:15OneSignalOSCore12OSModelStoreC9getModelsSDySSxGyF", + "mangledName": "$s15OneSignalOSCore12OSModelStoreC9getModelsSDySSxGyF", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalOSCore.OSModel>", + "sugared_genericSig": "", + "declAttributes": [ + "AccessControl" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "add", + "printedName": "add(id:model:hydrating:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + }, + { + "kind": "TypeNominal", + "name": "GenericTypeParam", + "printedName": "τ_0_0" + }, + { + "kind": "TypeNominal", + "name": "Bool", + "printedName": "Swift.Bool", + "usr": "s:Sb" + } + ], + "declKind": "Func", + "usr": "s:15OneSignalOSCore12OSModelStoreC3add2id5model9hydratingySS_xSbtF", + "mangledName": "$s15OneSignalOSCore12OSModelStoreC3add2id5model9hydratingySS_xSbtF", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalOSCore.OSModel>", + "sugared_genericSig": "", + "declAttributes": [ + "AccessControl" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "remove", + "printedName": "remove(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Func", + "usr": "s:15OneSignalOSCore12OSModelStoreC6removeyySSF", + "mangledName": "$s15OneSignalOSCore12OSModelStoreC6removeyySSF", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalOSCore.OSModel>", + "sugared_genericSig": "", + "declAttributes": [ + "AccessControl", + "RawDocComment" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "clearModelsFromStore", + "printedName": "clearModelsFromStore()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + } + ], + "declKind": "Func", + "usr": "s:15OneSignalOSCore12OSModelStoreC015clearModelsFromE0yyF", + "mangledName": "$s15OneSignalOSCore12OSModelStoreC015clearModelsFromE0yyF", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalOSCore.OSModel>", + "sugared_genericSig": "", + "declAttributes": [ + "AccessControl", + "RawDocComment" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Constructor", + "name": "init", + "printedName": "init()", + "children": [ + { + "kind": "TypeNominal", + "name": "OSModelStore", + "printedName": "OneSignalOSCore.OSModelStore<τ_0_0>", + "children": [ + { + "kind": "TypeNominal", + "name": "GenericTypeParam", + "printedName": "τ_0_0" + } + ], + "usr": "s:15OneSignalOSCore12OSModelStoreC" + } + ], + "declKind": "Constructor", + "usr": "s:15OneSignalOSCore12OSModelStoreCACyxGycfc", + "mangledName": "$s15OneSignalOSCore12OSModelStoreCACyxGycfc", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalOSCore.OSModel>", + "sugared_genericSig": "", + "overriding": true, + "implicit": true, + "objc_name": "init", + "declAttributes": [ + "Dynamic", + "ObjC", + "Override" + ], + "init_kind": "Designated" + }, + { + "kind": "Function", + "name": "onModelUpdated", + "printedName": "onModelUpdated(args:hydrating:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "OSModelChangedArgs", + "printedName": "OneSignalOSCore.OSModelChangedArgs", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSModelChangedArgs" + }, + { + "kind": "TypeNominal", + "name": "Bool", + "printedName": "Swift.Bool", + "usr": "s:Sb" + } + ], + "declKind": "Func", + "usr": "s:15OneSignalOSCore12OSModelStoreC14onModelUpdated4args9hydratingyAA0D11ChangedArgsC_SbtF", + "mangledName": "$s15OneSignalOSCore12OSModelStoreC14onModelUpdated4args9hydratingyAA0D11ChangedArgsC_SbtF", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalOSCore.OSModel>", + "sugared_genericSig": "", + "declAttributes": [ + "AccessControl" + ], + "isFromExtension": true, + "funcSelfKind": "NonMutating" + } + ], + "declKind": "Class", + "usr": "s:15OneSignalOSCore12OSModelStoreC", + "mangledName": "$s15OneSignalOSCore12OSModelStoreC", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalOSCore.OSModel>", + "sugared_genericSig": "", + "isOpen": true, + "declAttributes": [ + "AccessControl" + ], + "superclassUsr": "c:objc(cs)NSObject", + "superclassNames": [ + "ObjectiveC.NSObject" + ], + "conformances": [ + { + "kind": "Conformance", + "name": "OSModelChangedHandler", + "printedName": "OSModelChangedHandler", + "usr": "s:15OneSignalOSCore21OSModelChangedHandlerP", + "mangledName": "$s15OneSignalOSCore21OSModelChangedHandlerP" + }, + { + "kind": "Conformance", + "name": "Equatable", + "printedName": "Equatable", + "usr": "s:SQ", + "mangledName": "$sSQ" + }, + { + "kind": "Conformance", + "name": "Hashable", + "printedName": "Hashable", + "usr": "s:SH", + "mangledName": "$sSH" + }, + { + "kind": "Conformance", + "name": "CVarArg", + "printedName": "CVarArg", + "usr": "s:s7CVarArgP", + "mangledName": "$ss7CVarArgP" + }, + { + "kind": "Conformance", + "name": "_KeyValueCodingAndObservingPublishing", + "printedName": "_KeyValueCodingAndObservingPublishing", + "usr": "s:10Foundation37_KeyValueCodingAndObservingPublishingP", + "mangledName": "$s10Foundation37_KeyValueCodingAndObservingPublishingP" + }, + { + "kind": "Conformance", + "name": "_KeyValueCodingAndObserving", + "printedName": "_KeyValueCodingAndObserving", + "usr": "s:10Foundation27_KeyValueCodingAndObservingP", + "mangledName": "$s10Foundation27_KeyValueCodingAndObservingP" + }, + { + "kind": "Conformance", + "name": "CustomStringConvertible", + "printedName": "CustomStringConvertible", + "usr": "s:s23CustomStringConvertibleP", + "mangledName": "$ss23CustomStringConvertibleP" + }, + { + "kind": "Conformance", + "name": "CustomDebugStringConvertible", + "printedName": "CustomDebugStringConvertible", + "usr": "s:s28CustomDebugStringConvertibleP", + "mangledName": "$ss28CustomDebugStringConvertibleP" + } + ] + }, + { + "kind": "Import", + "name": "Foundation", + "printedName": "Foundation", + "declKind": "Import", + "moduleName": "OneSignalOSCore", + "declAttributes": [ + "RawDocComment" + ] + }, + { + "kind": "TypeDecl", + "name": "OSModel", + "printedName": "OSModel", + "children": [ + { + "kind": "Var", + "name": "modelId", + "printedName": "modelId", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Var", + "usr": "s:15OneSignalOSCore7OSModelC7modelIdSSvp", + "mangledName": "$s15OneSignalOSCore7OSModelC7modelIdSSvp", + "moduleName": "OneSignalOSCore", + "declAttributes": [ + "Final", + "HasStorage", + "AccessControl" + ], + "isLet": true, + "hasStorage": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Accessor", + "usr": "s:15OneSignalOSCore7OSModelC7modelIdSSvg", + "mangledName": "$s15OneSignalOSCore7OSModelC7modelIdSSvg", + "moduleName": "OneSignalOSCore", + "implicit": true, + "declAttributes": [ + "Final" + ], + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "changeNotifier", + "printedName": "changeNotifier", + "children": [ + { + "kind": "TypeNominal", + "name": "OSEventProducer", + "printedName": "OneSignalOSCore.OSEventProducer", + "children": [ + { + "kind": "TypeNominal", + "name": "OSModelChangedHandler", + "printedName": "OneSignalOSCore.OSModelChangedHandler", + "usr": "s:15OneSignalOSCore21OSModelChangedHandlerP" + } + ], + "usr": "s:15OneSignalOSCore15OSEventProducerC" + } + ], + "declKind": "Var", + "usr": "s:15OneSignalOSCore7OSModelC14changeNotifierAA15OSEventProducerCyAA0D14ChangedHandler_pGvp", + "mangledName": "$s15OneSignalOSCore7OSModelC14changeNotifierAA15OSEventProducerCyAA0D14ChangedHandler_pGvp", + "moduleName": "OneSignalOSCore", + "declAttributes": [ + "HasStorage", + "AccessControl" + ], + "hasStorage": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "OSEventProducer", + "printedName": "OneSignalOSCore.OSEventProducer", + "children": [ + { + "kind": "TypeNominal", + "name": "OSModelChangedHandler", + "printedName": "OneSignalOSCore.OSModelChangedHandler", + "usr": "s:15OneSignalOSCore21OSModelChangedHandlerP" + } + ], + "usr": "s:15OneSignalOSCore15OSEventProducerC" + } + ], + "declKind": "Accessor", + "usr": "s:15OneSignalOSCore7OSModelC14changeNotifierAA15OSEventProducerCyAA0D14ChangedHandler_pGvg", + "mangledName": "$s15OneSignalOSCore7OSModelC14changeNotifierAA15OSEventProducerCyAA0D14ChangedHandler_pGvg", + "moduleName": "OneSignalOSCore", + "implicit": true, + "accessorKind": "get" + }, + { + "kind": "Accessor", + "name": "Set", + "printedName": "Set()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "OSEventProducer", + "printedName": "OneSignalOSCore.OSEventProducer", + "children": [ + { + "kind": "TypeNominal", + "name": "OSModelChangedHandler", + "printedName": "OneSignalOSCore.OSModelChangedHandler", + "usr": "s:15OneSignalOSCore21OSModelChangedHandlerP" + } + ], + "usr": "s:15OneSignalOSCore15OSEventProducerC" + } + ], + "declKind": "Accessor", + "usr": "s:15OneSignalOSCore7OSModelC14changeNotifierAA15OSEventProducerCyAA0D14ChangedHandler_pGvs", + "mangledName": "$s15OneSignalOSCore7OSModelC14changeNotifierAA15OSEventProducerCyAA0D14ChangedHandler_pGvs", + "moduleName": "OneSignalOSCore", + "implicit": true, + "accessorKind": "set" + }, + { + "kind": "Accessor", + "name": "Modify", + "printedName": "Modify()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + } + ], + "declKind": "Accessor", + "usr": "s:15OneSignalOSCore7OSModelC14changeNotifierAA15OSEventProducerCyAA0D14ChangedHandler_pGvM", + "mangledName": "$s15OneSignalOSCore7OSModelC14changeNotifierAA15OSEventProducerCyAA0D14ChangedHandler_pGvM", + "moduleName": "OneSignalOSCore", + "implicit": true, + "accessorKind": "_modify" + } + ] + }, + { + "kind": "Constructor", + "name": "init", + "printedName": "init(changeNotifier:)", + "children": [ + { + "kind": "TypeNominal", + "name": "OSModel", + "printedName": "OneSignalOSCore.OSModel", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSModel" + }, + { + "kind": "TypeNominal", + "name": "OSEventProducer", + "printedName": "OneSignalOSCore.OSEventProducer", + "children": [ + { + "kind": "TypeNominal", + "name": "OSModelChangedHandler", + "printedName": "OneSignalOSCore.OSModelChangedHandler", + "usr": "s:15OneSignalOSCore21OSModelChangedHandlerP" + } + ], + "usr": "s:15OneSignalOSCore15OSEventProducerC" + } + ], + "declKind": "Constructor", + "usr": "s:15OneSignalOSCore7OSModelC14changeNotifierAcA15OSEventProducerCyAA0D14ChangedHandler_pG_tcfc", + "mangledName": "$s15OneSignalOSCore7OSModelC14changeNotifierAcA15OSEventProducerCyAA0D14ChangedHandler_pG_tcfc", + "moduleName": "OneSignalOSCore", + "declAttributes": [ + "AccessControl", + "RawDocComment" + ], + "init_kind": "Designated" + }, + { + "kind": "Function", + "name": "encode", + "printedName": "encode(with:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "NSCoder", + "printedName": "Foundation.NSCoder", + "usr": "c:objc(cs)NSCoder" + } + ], + "declKind": "Func", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSModel(im)encodeWithCoder:", + "mangledName": "$s15OneSignalOSCore7OSModelC6encode4withySo7NSCoderC_tF", + "moduleName": "OneSignalOSCore", + "isOpen": true, + "objc_name": "encodeWithCoder:", + "declAttributes": [ + "ObjC", + "AccessControl" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Constructor", + "name": "init", + "printedName": "init(coder:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "OneSignalOSCore.OSModel?", + "children": [ + { + "kind": "TypeNominal", + "name": "OSModel", + "printedName": "OneSignalOSCore.OSModel", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSModel" + } + ], + "usr": "s:Sq" + }, + { + "kind": "TypeNominal", + "name": "NSCoder", + "printedName": "Foundation.NSCoder", + "usr": "c:objc(cs)NSCoder" + } + ], + "declKind": "Constructor", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSModel(im)initWithCoder:", + "mangledName": "$s15OneSignalOSCore7OSModelC5coderACSgSo7NSCoderC_tcfc", + "moduleName": "OneSignalOSCore", + "objc_name": "initWithCoder:", + "declAttributes": [ + "ObjC", + "Required", + "AccessControl" + ], + "init_kind": "Designated" + }, + { + "kind": "Function", + "name": "set", + "printedName": "set(property:newValue:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + }, + { + "kind": "TypeNominal", + "name": "GenericTypeParam", + "printedName": "τ_0_0" + } + ], + "declKind": "Func", + "usr": "s:15OneSignalOSCore7OSModelC3set8property8newValueySS_xtlF", + "mangledName": "$s15OneSignalOSCore7OSModelC3set8property8newValueySS_xtlF", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0>", + "sugared_genericSig": "", + "declAttributes": [ + "AccessControl", + "RawDocComment" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "hydrate", + "printedName": "hydrate(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "Dictionary", + "printedName": "[Swift.String : Any]", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + }, + { + "kind": "TypeNominal", + "name": "ProtocolComposition", + "printedName": "Any" + } + ], + "usr": "s:SD" + } + ], + "declKind": "Func", + "usr": "s:15OneSignalOSCore7OSModelC7hydrateyySDySSypGF", + "mangledName": "$s15OneSignalOSCore7OSModelC7hydrateyySDySSypGF", + "moduleName": "OneSignalOSCore", + "declAttributes": [ + "AccessControl", + "RawDocComment" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "hydrateModel", + "printedName": "hydrateModel(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "Dictionary", + "printedName": "[Swift.String : Any]", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + }, + { + "kind": "TypeNominal", + "name": "ProtocolComposition", + "printedName": "Any" + } + ], + "usr": "s:SD" + } + ], + "declKind": "Func", + "usr": "s:15OneSignalOSCore7OSModelC12hydrateModelyySDySSypGF", + "mangledName": "$s15OneSignalOSCore7OSModelC12hydrateModelyySDySSypGF", + "moduleName": "OneSignalOSCore", + "isOpen": true, + "declAttributes": [ + "AccessControl" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Constructor", + "name": "init", + "printedName": "init()", + "children": [ + { + "kind": "TypeNominal", + "name": "OSModel", + "printedName": "OneSignalOSCore.OSModel", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSModel" + } + ], + "declKind": "Constructor", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSModel(im)init", + "mangledName": "$s15OneSignalOSCore7OSModelCACycfc", + "moduleName": "OneSignalOSCore", + "overriding": true, + "implicit": true, + "objc_name": "init", + "declAttributes": [ + "Dynamic", + "ObjC", + "Override" + ], + "init_kind": "Designated" + } + ], + "declKind": "Class", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSModel", + "mangledName": "$s15OneSignalOSCore7OSModelC", + "moduleName": "OneSignalOSCore", + "isOpen": true, + "declAttributes": [ + "AccessControl", + "ObjC" + ], + "superclassUsr": "c:objc(cs)NSObject", + "superclassNames": [ + "ObjectiveC.NSObject" + ], + "conformances": [ + { + "kind": "Conformance", + "name": "Equatable", + "printedName": "Equatable", + "usr": "s:SQ", + "mangledName": "$sSQ" + }, + { + "kind": "Conformance", + "name": "Hashable", + "printedName": "Hashable", + "usr": "s:SH", + "mangledName": "$sSH" + }, + { + "kind": "Conformance", + "name": "CVarArg", + "printedName": "CVarArg", + "usr": "s:s7CVarArgP", + "mangledName": "$ss7CVarArgP" + }, + { + "kind": "Conformance", + "name": "_KeyValueCodingAndObservingPublishing", + "printedName": "_KeyValueCodingAndObservingPublishing", + "usr": "s:10Foundation37_KeyValueCodingAndObservingPublishingP", + "mangledName": "$s10Foundation37_KeyValueCodingAndObservingPublishingP" + }, + { + "kind": "Conformance", + "name": "_KeyValueCodingAndObserving", + "printedName": "_KeyValueCodingAndObserving", + "usr": "s:10Foundation27_KeyValueCodingAndObservingP", + "mangledName": "$s10Foundation27_KeyValueCodingAndObservingP" + }, + { + "kind": "Conformance", + "name": "CustomStringConvertible", + "printedName": "CustomStringConvertible", + "usr": "s:s23CustomStringConvertibleP", + "mangledName": "$ss23CustomStringConvertibleP" + }, + { + "kind": "Conformance", + "name": "CustomDebugStringConvertible", + "printedName": "CustomDebugStringConvertible", + "usr": "s:s28CustomDebugStringConvertibleP", + "mangledName": "$ss28CustomDebugStringConvertibleP" + } + ] + }, + { + "kind": "Import", + "name": "Foundation", + "printedName": "Foundation", + "declKind": "Import", + "moduleName": "OneSignalOSCore", + "declAttributes": [ + "RawDocComment" + ] + }, + { + "kind": "Import", + "name": "OneSignalCore", + "printedName": "OneSignalCore", + "declKind": "Import", + "moduleName": "OneSignalOSCore" + }, + { + "kind": "TypeDecl", + "name": "OSBackgroundTaskHandler", + "printedName": "OSBackgroundTaskHandler", + "children": [ + { + "kind": "Function", + "name": "beginBackgroundTask", + "printedName": "beginBackgroundTask(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Func", + "usr": "c:@M@OneSignalOSCore@objc(pl)OSBackgroundTaskHandler(im)beginBackgroundTask:", + "mangledName": "$s15OneSignalOSCore23OSBackgroundTaskHandlerP015beginBackgroundE0yySSF", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalOSCore.OSBackgroundTaskHandler>", + "sugared_genericSig": "", + "protocolReq": true, + "declAttributes": [ + "ObjC" + ], + "reqNewWitnessTableEntry": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "endBackgroundTask", + "printedName": "endBackgroundTask(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Func", + "usr": "c:@M@OneSignalOSCore@objc(pl)OSBackgroundTaskHandler(im)endBackgroundTask:", + "mangledName": "$s15OneSignalOSCore23OSBackgroundTaskHandlerP013endBackgroundE0yySSF", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalOSCore.OSBackgroundTaskHandler>", + "sugared_genericSig": "", + "protocolReq": true, + "declAttributes": [ + "ObjC" + ], + "reqNewWitnessTableEntry": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "setTaskInvalid", + "printedName": "setTaskInvalid(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Func", + "usr": "c:@M@OneSignalOSCore@objc(pl)OSBackgroundTaskHandler(im)setTaskInvalid:", + "mangledName": "$s15OneSignalOSCore23OSBackgroundTaskHandlerP03setE7InvalidyySSF", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalOSCore.OSBackgroundTaskHandler>", + "sugared_genericSig": "", + "protocolReq": true, + "declAttributes": [ + "ObjC" + ], + "reqNewWitnessTableEntry": true, + "funcSelfKind": "NonMutating" + } + ], + "declKind": "Protocol", + "usr": "c:@M@OneSignalOSCore@objc(pl)OSBackgroundTaskHandler", + "mangledName": "$s15OneSignalOSCore23OSBackgroundTaskHandlerP", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0 : AnyObject>", + "sugared_genericSig": "", + "declAttributes": [ + "AccessControl", + "ObjC" + ] + }, + { + "kind": "TypeDecl", + "name": "OSBackgroundTaskManager", + "printedName": "OSBackgroundTaskManager", + "children": [ + { + "kind": "Var", + "name": "taskHandler", + "printedName": "taskHandler", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "OneSignalOSCore.OSBackgroundTaskHandler?", + "children": [ + { + "kind": "TypeNominal", + "name": "OSBackgroundTaskHandler", + "printedName": "OneSignalOSCore.OSBackgroundTaskHandler", + "usr": "c:@M@OneSignalOSCore@objc(pl)OSBackgroundTaskHandler" + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Var", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSBackgroundTaskManager(cpy)taskHandler", + "mangledName": "$s15OneSignalOSCore23OSBackgroundTaskManagerC11taskHandlerAA0deH0_pSgvpZ", + "moduleName": "OneSignalOSCore", + "static": true, + "declAttributes": [ + "HasInitialValue", + "Final", + "HasStorage", + "AccessControl", + "ObjC" + ], + "hasStorage": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "OneSignalOSCore.OSBackgroundTaskHandler?", + "children": [ + { + "kind": "TypeNominal", + "name": "OSBackgroundTaskHandler", + "printedName": "OneSignalOSCore.OSBackgroundTaskHandler", + "usr": "c:@M@OneSignalOSCore@objc(pl)OSBackgroundTaskHandler" + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Accessor", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSBackgroundTaskManager(cm)taskHandler", + "mangledName": "$s15OneSignalOSCore23OSBackgroundTaskManagerC11taskHandlerAA0deH0_pSgvgZ", + "moduleName": "OneSignalOSCore", + "static": true, + "implicit": true, + "declAttributes": [ + "Final", + "ObjC" + ], + "accessorKind": "get" + }, + { + "kind": "Accessor", + "name": "Set", + "printedName": "Set()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "OneSignalOSCore.OSBackgroundTaskHandler?", + "children": [ + { + "kind": "TypeNominal", + "name": "OSBackgroundTaskHandler", + "printedName": "OneSignalOSCore.OSBackgroundTaskHandler", + "usr": "c:@M@OneSignalOSCore@objc(pl)OSBackgroundTaskHandler" + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Accessor", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSBackgroundTaskManager(cm)setTaskHandler:", + "mangledName": "$s15OneSignalOSCore23OSBackgroundTaskManagerC11taskHandlerAA0deH0_pSgvsZ", + "moduleName": "OneSignalOSCore", + "static": true, + "implicit": true, + "declAttributes": [ + "Final", + "ObjC" + ], + "accessorKind": "set" + }, + { + "kind": "Accessor", + "name": "Modify", + "printedName": "Modify()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + } + ], + "declKind": "Accessor", + "usr": "s:15OneSignalOSCore23OSBackgroundTaskManagerC11taskHandlerAA0deH0_pSgvMZ", + "mangledName": "$s15OneSignalOSCore23OSBackgroundTaskManagerC11taskHandlerAA0deH0_pSgvMZ", + "moduleName": "OneSignalOSCore", + "static": true, + "implicit": true, + "declAttributes": [ + "Final" + ], + "accessorKind": "_modify" + } + ] + }, + { + "kind": "Function", + "name": "beginBackgroundTask", + "printedName": "beginBackgroundTask(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Func", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSBackgroundTaskManager(cm)beginBackgroundTask:", + "mangledName": "$s15OneSignalOSCore23OSBackgroundTaskManagerC015beginBackgroundE0yySSFZ", + "moduleName": "OneSignalOSCore", + "static": true, + "declAttributes": [ + "Final", + "AccessControl", + "ObjC" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "endBackgroundTask", + "printedName": "endBackgroundTask(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Func", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSBackgroundTaskManager(cm)endBackgroundTask:", + "mangledName": "$s15OneSignalOSCore23OSBackgroundTaskManagerC013endBackgroundE0yySSFZ", + "moduleName": "OneSignalOSCore", + "static": true, + "declAttributes": [ + "Final", + "AccessControl", + "ObjC" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "setTaskInvalid", + "printedName": "setTaskInvalid(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Func", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSBackgroundTaskManager(cm)setTaskInvalid:", + "mangledName": "$s15OneSignalOSCore23OSBackgroundTaskManagerC03setE7InvalidyySSFZ", + "moduleName": "OneSignalOSCore", + "static": true, + "declAttributes": [ + "Final", + "AccessControl", + "ObjC" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Constructor", + "name": "init", + "printedName": "init()", + "children": [ + { + "kind": "TypeNominal", + "name": "OSBackgroundTaskManager", + "printedName": "OneSignalOSCore.OSBackgroundTaskManager", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSBackgroundTaskManager" + } + ], + "declKind": "Constructor", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSBackgroundTaskManager(im)init", + "mangledName": "$s15OneSignalOSCore23OSBackgroundTaskManagerCACycfc", + "moduleName": "OneSignalOSCore", + "overriding": true, + "implicit": true, + "objc_name": "init", + "declAttributes": [ + "Dynamic", + "ObjC", + "Override" + ], + "init_kind": "Designated" + } + ], + "declKind": "Class", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSBackgroundTaskManager", + "mangledName": "$s15OneSignalOSCore23OSBackgroundTaskManagerC", + "moduleName": "OneSignalOSCore", + "declAttributes": [ + "AccessControl", + "ObjC", + "RawDocComment" + ], + "superclassUsr": "c:objc(cs)NSObject", + "inheritsConvenienceInitializers": true, + "superclassNames": [ + "ObjectiveC.NSObject" + ], + "conformances": [ + { + "kind": "Conformance", + "name": "Equatable", + "printedName": "Equatable", + "usr": "s:SQ", + "mangledName": "$sSQ" + }, + { + "kind": "Conformance", + "name": "Hashable", + "printedName": "Hashable", + "usr": "s:SH", + "mangledName": "$sSH" + }, + { + "kind": "Conformance", + "name": "CVarArg", + "printedName": "CVarArg", + "usr": "s:s7CVarArgP", + "mangledName": "$ss7CVarArgP" + }, + { + "kind": "Conformance", + "name": "_KeyValueCodingAndObservingPublishing", + "printedName": "_KeyValueCodingAndObservingPublishing", + "usr": "s:10Foundation37_KeyValueCodingAndObservingPublishingP", + "mangledName": "$s10Foundation37_KeyValueCodingAndObservingPublishingP" + }, + { + "kind": "Conformance", + "name": "_KeyValueCodingAndObserving", + "printedName": "_KeyValueCodingAndObserving", + "usr": "s:10Foundation27_KeyValueCodingAndObservingP", + "mangledName": "$s10Foundation27_KeyValueCodingAndObservingP" + }, + { + "kind": "Conformance", + "name": "CustomStringConvertible", + "printedName": "CustomStringConvertible", + "usr": "s:s23CustomStringConvertibleP", + "mangledName": "$ss23CustomStringConvertibleP" + }, + { + "kind": "Conformance", + "name": "CustomDebugStringConvertible", + "printedName": "CustomDebugStringConvertible", + "usr": "s:s28CustomDebugStringConvertibleP", + "mangledName": "$ss28CustomDebugStringConvertibleP" + } + ] + }, + { + "kind": "Import", + "name": "Foundation", + "printedName": "Foundation", + "declKind": "Import", + "moduleName": "OneSignalOSCore", + "declAttributes": [ + "RawDocComment" + ] + }, + { + "kind": "Import", + "name": "OneSignalCore", + "printedName": "OneSignalCore", + "declKind": "Import", + "moduleName": "OneSignalOSCore" + }, + { + "kind": "TypeDecl", + "name": "OSModelStoreListener", + "printedName": "OSModelStoreListener", + "children": [ + { + "kind": "AssociatedType", + "name": "TModel", + "printedName": "TModel", + "declKind": "AssociatedType", + "usr": "s:15OneSignalOSCore20OSModelStoreListenerP6TModelQa", + "mangledName": "$s15OneSignalOSCore20OSModelStoreListenerP6TModelQa", + "moduleName": "OneSignalOSCore", + "protocolReq": true + }, + { + "kind": "Var", + "name": "store", + "printedName": "store", + "children": [ + { + "kind": "TypeNominal", + "name": "OSModelStore", + "printedName": "OneSignalOSCore.OSModelStore<τ_0_0.TModel>", + "children": [ + { + "kind": "TypeNominal", + "name": "DependentMember", + "printedName": "τ_0_0.TModel" + } + ], + "usr": "s:15OneSignalOSCore12OSModelStoreC" + } + ], + "declKind": "Var", + "usr": "s:15OneSignalOSCore20OSModelStoreListenerP5storeAA0dE0Cy6TModelQzGvp", + "mangledName": "$s15OneSignalOSCore20OSModelStoreListenerP5storeAA0dE0Cy6TModelQzGvp", + "moduleName": "OneSignalOSCore", + "protocolReq": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "OSModelStore", + "printedName": "OneSignalOSCore.OSModelStore<τ_0_0.TModel>", + "children": [ + { + "kind": "TypeNominal", + "name": "DependentMember", + "printedName": "τ_0_0.TModel" + } + ], + "usr": "s:15OneSignalOSCore12OSModelStoreC" + } + ], + "declKind": "Accessor", + "usr": "s:15OneSignalOSCore20OSModelStoreListenerP5storeAA0dE0Cy6TModelQzGvg", + "mangledName": "$s15OneSignalOSCore20OSModelStoreListenerP5storeAA0dE0Cy6TModelQzGvg", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalOSCore.OSModelStoreListener>", + "sugared_genericSig": "", + "protocolReq": true, + "reqNewWitnessTableEntry": true, + "accessorKind": "get" + } + ] + }, + { + "kind": "Constructor", + "name": "init", + "printedName": "init(store:)", + "children": [ + { + "kind": "TypeNominal", + "name": "GenericTypeParam", + "printedName": "τ_0_0" + }, + { + "kind": "TypeNominal", + "name": "OSModelStore", + "printedName": "OneSignalOSCore.OSModelStore<τ_0_0.TModel>", + "children": [ + { + "kind": "TypeNominal", + "name": "DependentMember", + "printedName": "τ_0_0.TModel" + } + ], + "usr": "s:15OneSignalOSCore12OSModelStoreC" + } + ], + "declKind": "Constructor", + "usr": "s:15OneSignalOSCore20OSModelStoreListenerP5storexAA0dE0Cy6TModelQzG_tcfc", + "mangledName": "$s15OneSignalOSCore20OSModelStoreListenerP5storexAA0dE0Cy6TModelQzG_tcfc", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalOSCore.OSModelStoreListener>", + "sugared_genericSig": "", + "protocolReq": true, + "reqNewWitnessTableEntry": true, + "init_kind": "Designated" + }, + { + "kind": "Function", + "name": "getAddModelDelta", + "printedName": "getAddModelDelta(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "OneSignalOSCore.OSDelta?", + "children": [ + { + "kind": "TypeNominal", + "name": "OSDelta", + "printedName": "OneSignalOSCore.OSDelta", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSDelta" + } + ], + "usr": "s:Sq" + }, + { + "kind": "TypeNominal", + "name": "DependentMember", + "printedName": "τ_0_0.TModel" + } + ], + "declKind": "Func", + "usr": "s:15OneSignalOSCore20OSModelStoreListenerP16getAddModelDeltayAA7OSDeltaCSg6TModelQzF", + "mangledName": "$s15OneSignalOSCore20OSModelStoreListenerP16getAddModelDeltayAA7OSDeltaCSg6TModelQzF", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalOSCore.OSModelStoreListener>", + "sugared_genericSig": "", + "protocolReq": true, + "reqNewWitnessTableEntry": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "getRemoveModelDelta", + "printedName": "getRemoveModelDelta(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "OneSignalOSCore.OSDelta?", + "children": [ + { + "kind": "TypeNominal", + "name": "OSDelta", + "printedName": "OneSignalOSCore.OSDelta", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSDelta" + } + ], + "usr": "s:Sq" + }, + { + "kind": "TypeNominal", + "name": "DependentMember", + "printedName": "τ_0_0.TModel" + } + ], + "declKind": "Func", + "usr": "s:15OneSignalOSCore20OSModelStoreListenerP19getRemoveModelDeltayAA7OSDeltaCSg6TModelQzF", + "mangledName": "$s15OneSignalOSCore20OSModelStoreListenerP19getRemoveModelDeltayAA7OSDeltaCSg6TModelQzF", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalOSCore.OSModelStoreListener>", + "sugared_genericSig": "", + "protocolReq": true, + "reqNewWitnessTableEntry": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "getUpdateModelDelta", + "printedName": "getUpdateModelDelta(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "OneSignalOSCore.OSDelta?", + "children": [ + { + "kind": "TypeNominal", + "name": "OSDelta", + "printedName": "OneSignalOSCore.OSDelta", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSDelta" + } + ], + "usr": "s:Sq" + }, + { + "kind": "TypeNominal", + "name": "OSModelChangedArgs", + "printedName": "OneSignalOSCore.OSModelChangedArgs", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSModelChangedArgs" + } + ], + "declKind": "Func", + "usr": "s:15OneSignalOSCore20OSModelStoreListenerP19getUpdateModelDeltayAA7OSDeltaCSgAA0D11ChangedArgsCF", + "mangledName": "$s15OneSignalOSCore20OSModelStoreListenerP19getUpdateModelDeltayAA7OSDeltaCSgAA0D11ChangedArgsCF", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalOSCore.OSModelStoreListener>", + "sugared_genericSig": "", + "protocolReq": true, + "reqNewWitnessTableEntry": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "start", + "printedName": "start()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + } + ], + "declKind": "Func", + "usr": "s:15OneSignalOSCore20OSModelStoreListenerPAAE5startyyF", + "mangledName": "$s15OneSignalOSCore20OSModelStoreListenerPAAE5startyyF", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalOSCore.OSModelStoreListener>", + "sugared_genericSig": "", + "declAttributes": [ + "AccessControl" + ], + "isFromExtension": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "onAdded", + "printedName": "onAdded(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "OSModel", + "printedName": "OneSignalOSCore.OSModel", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSModel" + } + ], + "declKind": "Func", + "usr": "s:15OneSignalOSCore20OSModelStoreListenerPAAE7onAddedyyAA0D0CF", + "mangledName": "$s15OneSignalOSCore20OSModelStoreListenerPAAE7onAddedyyAA0D0CF", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalOSCore.OSModelStoreListener>", + "sugared_genericSig": "", + "declAttributes": [ + "AccessControl" + ], + "isFromExtension": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "onUpdated", + "printedName": "onUpdated(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "OSModelChangedArgs", + "printedName": "OneSignalOSCore.OSModelChangedArgs", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSModelChangedArgs" + } + ], + "declKind": "Func", + "usr": "s:15OneSignalOSCore20OSModelStoreListenerPAAE9onUpdatedyyAA0D11ChangedArgsCF", + "mangledName": "$s15OneSignalOSCore20OSModelStoreListenerPAAE9onUpdatedyyAA0D11ChangedArgsCF", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalOSCore.OSModelStoreListener>", + "sugared_genericSig": "", + "declAttributes": [ + "AccessControl" + ], + "isFromExtension": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "onRemoved", + "printedName": "onRemoved(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "OSModel", + "printedName": "OneSignalOSCore.OSModel", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSModel" + } + ], + "declKind": "Func", + "usr": "s:15OneSignalOSCore20OSModelStoreListenerPAAE9onRemovedyyAA0D0CF", + "mangledName": "$s15OneSignalOSCore20OSModelStoreListenerPAAE9onRemovedyyAA0D0CF", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalOSCore.OSModelStoreListener>", + "sugared_genericSig": "", + "declAttributes": [ + "AccessControl" + ], + "isFromExtension": true, + "funcSelfKind": "NonMutating" + } + ], + "declKind": "Protocol", + "usr": "s:15OneSignalOSCore20OSModelStoreListenerP", + "mangledName": "$s15OneSignalOSCore20OSModelStoreListenerP", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0 : OneSignalOSCore.OSModelStoreChangedHandler, τ_0_0.TModel : OneSignalOSCore.OSModel>", + "sugared_genericSig": "", + "declAttributes": [ + "AccessControl" + ], + "conformances": [ + { + "kind": "Conformance", + "name": "OSModelStoreChangedHandler", + "printedName": "OSModelStoreChangedHandler", + "usr": "s:15OneSignalOSCore26OSModelStoreChangedHandlerP", + "mangledName": "$s15OneSignalOSCore26OSModelStoreChangedHandlerP" + } + ] + }, + { + "kind": "Import", + "name": "Foundation", + "printedName": "Foundation", + "declKind": "Import", + "moduleName": "OneSignalOSCore", + "declAttributes": [ + "RawDocComment" + ] + }, + { + "kind": "TypeDecl", + "name": "OSModelStoreChangedHandler", + "printedName": "OSModelStoreChangedHandler", + "children": [ + { + "kind": "Function", + "name": "onAdded", + "printedName": "onAdded(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "OSModel", + "printedName": "OneSignalOSCore.OSModel", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSModel" + } + ], + "declKind": "Func", + "usr": "s:15OneSignalOSCore26OSModelStoreChangedHandlerP7onAddedyyAA0D0CF", + "mangledName": "$s15OneSignalOSCore26OSModelStoreChangedHandlerP7onAddedyyAA0D0CF", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalOSCore.OSModelStoreChangedHandler>", + "sugared_genericSig": "", + "protocolReq": true, + "declAttributes": [ + "RawDocComment" + ], + "reqNewWitnessTableEntry": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "onUpdated", + "printedName": "onUpdated(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "OSModelChangedArgs", + "printedName": "OneSignalOSCore.OSModelChangedArgs", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSModelChangedArgs" + } + ], + "declKind": "Func", + "usr": "s:15OneSignalOSCore26OSModelStoreChangedHandlerP9onUpdatedyyAA0dF4ArgsCF", + "mangledName": "$s15OneSignalOSCore26OSModelStoreChangedHandlerP9onUpdatedyyAA0dF4ArgsCF", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalOSCore.OSModelStoreChangedHandler>", + "sugared_genericSig": "", + "protocolReq": true, + "declAttributes": [ + "RawDocComment" + ], + "reqNewWitnessTableEntry": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "onRemoved", + "printedName": "onRemoved(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "OSModel", + "printedName": "OneSignalOSCore.OSModel", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSModel" + } + ], + "declKind": "Func", + "usr": "s:15OneSignalOSCore26OSModelStoreChangedHandlerP9onRemovedyyAA0D0CF", + "mangledName": "$s15OneSignalOSCore26OSModelStoreChangedHandlerP9onRemovedyyAA0D0CF", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalOSCore.OSModelStoreChangedHandler>", + "sugared_genericSig": "", + "protocolReq": true, + "declAttributes": [ + "RawDocComment" + ], + "reqNewWitnessTableEntry": true, + "funcSelfKind": "NonMutating" + } + ], + "declKind": "Protocol", + "usr": "s:15OneSignalOSCore26OSModelStoreChangedHandlerP", + "mangledName": "$s15OneSignalOSCore26OSModelStoreChangedHandlerP", + "moduleName": "OneSignalOSCore", + "declAttributes": [ + "AccessControl", + "RawDocComment" + ] + }, + { + "kind": "Import", + "name": "Foundation", + "printedName": "Foundation", + "declKind": "Import", + "moduleName": "OneSignalOSCore", + "declAttributes": [ + "RawDocComment" + ] + }, + { + "kind": "TypeDecl", + "name": "OSDelta", + "printedName": "OSDelta", + "children": [ + { + "kind": "Var", + "name": "name", + "printedName": "name", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Var", + "usr": "s:15OneSignalOSCore7OSDeltaC4nameSSvp", + "mangledName": "$s15OneSignalOSCore7OSDeltaC4nameSSvp", + "moduleName": "OneSignalOSCore", + "declAttributes": [ + "Final", + "HasStorage", + "AccessControl" + ], + "isLet": true, + "hasStorage": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Accessor", + "usr": "s:15OneSignalOSCore7OSDeltaC4nameSSvg", + "mangledName": "$s15OneSignalOSCore7OSDeltaC4nameSSvg", + "moduleName": "OneSignalOSCore", + "implicit": true, + "declAttributes": [ + "Final" + ], + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "deltaId", + "printedName": "deltaId", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Var", + "usr": "s:15OneSignalOSCore7OSDeltaC7deltaIdSSvp", + "mangledName": "$s15OneSignalOSCore7OSDeltaC7deltaIdSSvp", + "moduleName": "OneSignalOSCore", + "declAttributes": [ + "Final", + "HasStorage", + "AccessControl" + ], + "isLet": true, + "hasStorage": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Accessor", + "usr": "s:15OneSignalOSCore7OSDeltaC7deltaIdSSvg", + "mangledName": "$s15OneSignalOSCore7OSDeltaC7deltaIdSSvg", + "moduleName": "OneSignalOSCore", + "implicit": true, + "declAttributes": [ + "Final" + ], + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "timestamp", + "printedName": "timestamp", + "children": [ + { + "kind": "TypeNominal", + "name": "Date", + "printedName": "Foundation.Date", + "usr": "s:10Foundation4DateV" + } + ], + "declKind": "Var", + "usr": "s:15OneSignalOSCore7OSDeltaC9timestamp10Foundation4DateVvp", + "mangledName": "$s15OneSignalOSCore7OSDeltaC9timestamp10Foundation4DateVvp", + "moduleName": "OneSignalOSCore", + "declAttributes": [ + "Final", + "HasStorage", + "AccessControl" + ], + "isLet": true, + "hasStorage": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "Date", + "printedName": "Foundation.Date", + "usr": "s:10Foundation4DateV" + } + ], + "declKind": "Accessor", + "usr": "s:15OneSignalOSCore7OSDeltaC9timestamp10Foundation4DateVvg", + "mangledName": "$s15OneSignalOSCore7OSDeltaC9timestamp10Foundation4DateVvg", + "moduleName": "OneSignalOSCore", + "implicit": true, + "declAttributes": [ + "Final" + ], + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "model", + "printedName": "model", + "children": [ + { + "kind": "TypeNominal", + "name": "OSModel", + "printedName": "OneSignalOSCore.OSModel", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSModel" + } + ], + "declKind": "Var", + "usr": "s:15OneSignalOSCore7OSDeltaC5modelAA7OSModelCvp", + "mangledName": "$s15OneSignalOSCore7OSDeltaC5modelAA7OSModelCvp", + "moduleName": "OneSignalOSCore", + "declAttributes": [ + "HasStorage", + "AccessControl" + ], + "hasStorage": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "OSModel", + "printedName": "OneSignalOSCore.OSModel", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSModel" + } + ], + "declKind": "Accessor", + "usr": "s:15OneSignalOSCore7OSDeltaC5modelAA7OSModelCvg", + "mangledName": "$s15OneSignalOSCore7OSDeltaC5modelAA7OSModelCvg", + "moduleName": "OneSignalOSCore", + "implicit": true, + "accessorKind": "get" + }, + { + "kind": "Accessor", + "name": "Set", + "printedName": "Set()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "OSModel", + "printedName": "OneSignalOSCore.OSModel", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSModel" + } + ], + "declKind": "Accessor", + "usr": "s:15OneSignalOSCore7OSDeltaC5modelAA7OSModelCvs", + "mangledName": "$s15OneSignalOSCore7OSDeltaC5modelAA7OSModelCvs", + "moduleName": "OneSignalOSCore", + "implicit": true, + "accessorKind": "set" + }, + { + "kind": "Accessor", + "name": "Modify", + "printedName": "Modify()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + } + ], + "declKind": "Accessor", + "usr": "s:15OneSignalOSCore7OSDeltaC5modelAA7OSModelCvM", + "mangledName": "$s15OneSignalOSCore7OSDeltaC5modelAA7OSModelCvM", + "moduleName": "OneSignalOSCore", + "implicit": true, + "accessorKind": "_modify" + } + ] + }, + { + "kind": "Var", + "name": "property", + "printedName": "property", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Var", + "usr": "s:15OneSignalOSCore7OSDeltaC8propertySSvp", + "mangledName": "$s15OneSignalOSCore7OSDeltaC8propertySSvp", + "moduleName": "OneSignalOSCore", + "declAttributes": [ + "Final", + "HasStorage", + "AccessControl" + ], + "isLet": true, + "hasStorage": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Accessor", + "usr": "s:15OneSignalOSCore7OSDeltaC8propertySSvg", + "mangledName": "$s15OneSignalOSCore7OSDeltaC8propertySSvg", + "moduleName": "OneSignalOSCore", + "implicit": true, + "declAttributes": [ + "Final" + ], + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "value", + "printedName": "value", + "children": [ + { + "kind": "TypeNominal", + "name": "ProtocolComposition", + "printedName": "Any" + } + ], + "declKind": "Var", + "usr": "s:15OneSignalOSCore7OSDeltaC5valueypvp", + "mangledName": "$s15OneSignalOSCore7OSDeltaC5valueypvp", + "moduleName": "OneSignalOSCore", + "declAttributes": [ + "Final", + "HasStorage", + "AccessControl" + ], + "isLet": true, + "hasStorage": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "ProtocolComposition", + "printedName": "Any" + } + ], + "declKind": "Accessor", + "usr": "s:15OneSignalOSCore7OSDeltaC5valueypvg", + "mangledName": "$s15OneSignalOSCore7OSDeltaC5valueypvg", + "moduleName": "OneSignalOSCore", + "implicit": true, + "declAttributes": [ + "Final" + ], + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "description", + "printedName": "description", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Var", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSDelta(py)description", + "mangledName": "$s15OneSignalOSCore7OSDeltaC11descriptionSSvp", + "moduleName": "OneSignalOSCore", + "overriding": true, + "isOpen": true, + "objc_name": "description", + "declAttributes": [ + "Dynamic", + "ObjC", + "AccessControl", + "Override" + ], + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Accessor", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSDelta(im)description", + "mangledName": "$s15OneSignalOSCore7OSDeltaC11descriptionSSvg", + "moduleName": "OneSignalOSCore", + "overriding": true, + "isOpen": true, + "objc_name": "description", + "declAttributes": [ + "Dynamic", + "ObjC" + ], + "accessorKind": "get" + } + ] + }, + { + "kind": "Constructor", + "name": "init", + "printedName": "init(name:model:property:value:)", + "children": [ + { + "kind": "TypeNominal", + "name": "OSDelta", + "printedName": "OneSignalOSCore.OSDelta", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSDelta" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + }, + { + "kind": "TypeNominal", + "name": "OSModel", + "printedName": "OneSignalOSCore.OSModel", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSModel" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + }, + { + "kind": "TypeNominal", + "name": "ProtocolComposition", + "printedName": "Any" + } + ], + "declKind": "Constructor", + "usr": "s:15OneSignalOSCore7OSDeltaC4name5model8property5valueACSS_AA7OSModelCSSyptcfc", + "mangledName": "$s15OneSignalOSCore7OSDeltaC4name5model8property5valueACSS_AA7OSModelCSSyptcfc", + "moduleName": "OneSignalOSCore", + "declAttributes": [ + "AccessControl" + ], + "init_kind": "Designated" + }, + { + "kind": "Function", + "name": "encode", + "printedName": "encode(with:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "NSCoder", + "printedName": "Foundation.NSCoder", + "usr": "c:objc(cs)NSCoder" + } + ], + "declKind": "Func", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSDelta(im)encodeWithCoder:", + "mangledName": "$s15OneSignalOSCore7OSDeltaC6encode4withySo7NSCoderC_tF", + "moduleName": "OneSignalOSCore", + "objc_name": "encodeWithCoder:", + "declAttributes": [ + "ObjC", + "AccessControl" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Constructor", + "name": "init", + "printedName": "init(coder:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "OneSignalOSCore.OSDelta?", + "children": [ + { + "kind": "TypeNominal", + "name": "OSDelta", + "printedName": "OneSignalOSCore.OSDelta", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSDelta" + } + ], + "usr": "s:Sq" + }, + { + "kind": "TypeNominal", + "name": "NSCoder", + "printedName": "Foundation.NSCoder", + "usr": "c:objc(cs)NSCoder" + } + ], + "declKind": "Constructor", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSDelta(im)initWithCoder:", + "mangledName": "$s15OneSignalOSCore7OSDeltaC5coderACSgSo7NSCoderC_tcfc", + "moduleName": "OneSignalOSCore", + "objc_name": "initWithCoder:", + "declAttributes": [ + "ObjC", + "Required", + "AccessControl" + ], + "init_kind": "Designated" + }, + { + "kind": "Constructor", + "name": "init", + "printedName": "init()", + "children": [ + { + "kind": "TypeNominal", + "name": "OSDelta", + "printedName": "OneSignalOSCore.OSDelta", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSDelta" + } + ], + "declKind": "Constructor", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSDelta(im)init", + "mangledName": "$s15OneSignalOSCore7OSDeltaCACycfc", + "moduleName": "OneSignalOSCore", + "overriding": true, + "implicit": true, + "objc_name": "init", + "declAttributes": [ + "Dynamic", + "ObjC", + "Override" + ], + "init_kind": "Designated" + } + ], + "declKind": "Class", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSDelta", + "mangledName": "$s15OneSignalOSCore7OSDeltaC", + "moduleName": "OneSignalOSCore", + "isOpen": true, + "declAttributes": [ + "AccessControl", + "RawDocComment", + "ObjC" + ], + "superclassUsr": "c:objc(cs)NSObject", + "superclassNames": [ + "ObjectiveC.NSObject" + ], + "conformances": [ + { + "kind": "Conformance", + "name": "Equatable", + "printedName": "Equatable", + "usr": "s:SQ", + "mangledName": "$sSQ" + }, + { + "kind": "Conformance", + "name": "Hashable", + "printedName": "Hashable", + "usr": "s:SH", + "mangledName": "$sSH" + }, + { + "kind": "Conformance", + "name": "CVarArg", + "printedName": "CVarArg", + "usr": "s:s7CVarArgP", + "mangledName": "$ss7CVarArgP" + }, + { + "kind": "Conformance", + "name": "_KeyValueCodingAndObservingPublishing", + "printedName": "_KeyValueCodingAndObservingPublishing", + "usr": "s:10Foundation37_KeyValueCodingAndObservingPublishingP", + "mangledName": "$s10Foundation37_KeyValueCodingAndObservingPublishingP" + }, + { + "kind": "Conformance", + "name": "_KeyValueCodingAndObserving", + "printedName": "_KeyValueCodingAndObserving", + "usr": "s:10Foundation27_KeyValueCodingAndObservingP", + "mangledName": "$s10Foundation27_KeyValueCodingAndObservingP" + }, + { + "kind": "Conformance", + "name": "CustomStringConvertible", + "printedName": "CustomStringConvertible", + "usr": "s:s23CustomStringConvertibleP", + "mangledName": "$ss23CustomStringConvertibleP" + }, + { + "kind": "Conformance", + "name": "CustomDebugStringConvertible", + "printedName": "CustomDebugStringConvertible", + "usr": "s:s28CustomDebugStringConvertibleP", + "mangledName": "$ss28CustomDebugStringConvertibleP" + } + ] + }, + { + "kind": "Import", + "name": "Foundation", + "printedName": "Foundation", + "declKind": "Import", + "moduleName": "OneSignalOSCore", + "declAttributes": [ + "RawDocComment" + ] + }, + { + "kind": "TypeDecl", + "name": "OSModelChangedArgs", + "printedName": "OSModelChangedArgs", + "children": [ + { + "kind": "Var", + "name": "model", + "printedName": "model", + "children": [ + { + "kind": "TypeNominal", + "name": "OSModel", + "printedName": "OneSignalOSCore.OSModel", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSModel" + } + ], + "declKind": "Var", + "usr": "s:15OneSignalOSCore18OSModelChangedArgsC5modelAA0D0Cvp", + "mangledName": "$s15OneSignalOSCore18OSModelChangedArgsC5modelAA0D0Cvp", + "moduleName": "OneSignalOSCore", + "declAttributes": [ + "Final", + "HasStorage", + "AccessControl", + "RawDocComment" + ], + "isLet": true, + "hasStorage": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "OSModel", + "printedName": "OneSignalOSCore.OSModel", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSModel" + } + ], + "declKind": "Accessor", + "usr": "s:15OneSignalOSCore18OSModelChangedArgsC5modelAA0D0Cvg", + "mangledName": "$s15OneSignalOSCore18OSModelChangedArgsC5modelAA0D0Cvg", + "moduleName": "OneSignalOSCore", + "implicit": true, + "declAttributes": [ + "Final" + ], + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "property", + "printedName": "property", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Var", + "usr": "s:15OneSignalOSCore18OSModelChangedArgsC8propertySSvp", + "mangledName": "$s15OneSignalOSCore18OSModelChangedArgsC8propertySSvp", + "moduleName": "OneSignalOSCore", + "declAttributes": [ + "Final", + "HasStorage", + "AccessControl", + "RawDocComment" + ], + "isLet": true, + "hasStorage": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Accessor", + "usr": "s:15OneSignalOSCore18OSModelChangedArgsC8propertySSvg", + "mangledName": "$s15OneSignalOSCore18OSModelChangedArgsC8propertySSvg", + "moduleName": "OneSignalOSCore", + "implicit": true, + "declAttributes": [ + "Final" + ], + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "newValue", + "printedName": "newValue", + "children": [ + { + "kind": "TypeNominal", + "name": "ProtocolComposition", + "printedName": "Any" + } + ], + "declKind": "Var", + "usr": "s:15OneSignalOSCore18OSModelChangedArgsC8newValueypvp", + "mangledName": "$s15OneSignalOSCore18OSModelChangedArgsC8newValueypvp", + "moduleName": "OneSignalOSCore", + "declAttributes": [ + "Final", + "HasStorage", + "AccessControl", + "RawDocComment" + ], + "isLet": true, + "hasStorage": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "ProtocolComposition", + "printedName": "Any" + } + ], + "declKind": "Accessor", + "usr": "s:15OneSignalOSCore18OSModelChangedArgsC8newValueypvg", + "mangledName": "$s15OneSignalOSCore18OSModelChangedArgsC8newValueypvg", + "moduleName": "OneSignalOSCore", + "implicit": true, + "declAttributes": [ + "Final" + ], + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "description", + "printedName": "description", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Var", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSModelChangedArgs(py)description", + "mangledName": "$s15OneSignalOSCore18OSModelChangedArgsC11descriptionSSvp", + "moduleName": "OneSignalOSCore", + "overriding": true, + "objc_name": "description", + "declAttributes": [ + "Dynamic", + "ObjC", + "AccessControl", + "Override" + ], + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Accessor", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSModelChangedArgs(im)description", + "mangledName": "$s15OneSignalOSCore18OSModelChangedArgsC11descriptionSSvg", + "moduleName": "OneSignalOSCore", + "overriding": true, + "objc_name": "description", + "declAttributes": [ + "Dynamic", + "ObjC" + ], + "accessorKind": "get" + } + ] + }, + { + "kind": "Constructor", + "name": "init", + "printedName": "init()", + "children": [ + { + "kind": "TypeNominal", + "name": "OSModelChangedArgs", + "printedName": "OneSignalOSCore.OSModelChangedArgs", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSModelChangedArgs" + } + ], + "declKind": "Constructor", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSModelChangedArgs(im)init", + "mangledName": "$s15OneSignalOSCore18OSModelChangedArgsCACycfc", + "moduleName": "OneSignalOSCore", + "overriding": true, + "implicit": true, + "objc_name": "init", + "declAttributes": [ + "Dynamic", + "ObjC", + "Override" + ], + "init_kind": "Designated" + } + ], + "declKind": "Class", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSModelChangedArgs", + "mangledName": "$s15OneSignalOSCore18OSModelChangedArgsC", + "moduleName": "OneSignalOSCore", + "declAttributes": [ + "AccessControl", + "ObjC" + ], + "superclassUsr": "c:objc(cs)NSObject", + "hasMissingDesignatedInitializers": true, + "superclassNames": [ + "ObjectiveC.NSObject" + ], + "conformances": [ + { + "kind": "Conformance", + "name": "Equatable", + "printedName": "Equatable", + "usr": "s:SQ", + "mangledName": "$sSQ" + }, + { + "kind": "Conformance", + "name": "Hashable", + "printedName": "Hashable", + "usr": "s:SH", + "mangledName": "$sSH" + }, + { + "kind": "Conformance", + "name": "CVarArg", + "printedName": "CVarArg", + "usr": "s:s7CVarArgP", + "mangledName": "$ss7CVarArgP" + }, + { + "kind": "Conformance", + "name": "_KeyValueCodingAndObservingPublishing", + "printedName": "_KeyValueCodingAndObservingPublishing", + "usr": "s:10Foundation37_KeyValueCodingAndObservingPublishingP", + "mangledName": "$s10Foundation37_KeyValueCodingAndObservingPublishingP" + }, + { + "kind": "Conformance", + "name": "_KeyValueCodingAndObserving", + "printedName": "_KeyValueCodingAndObserving", + "usr": "s:10Foundation27_KeyValueCodingAndObservingP", + "mangledName": "$s10Foundation27_KeyValueCodingAndObservingP" + }, + { + "kind": "Conformance", + "name": "CustomStringConvertible", + "printedName": "CustomStringConvertible", + "usr": "s:s23CustomStringConvertibleP", + "mangledName": "$ss23CustomStringConvertibleP" + }, + { + "kind": "Conformance", + "name": "CustomDebugStringConvertible", + "printedName": "CustomDebugStringConvertible", + "usr": "s:s28CustomDebugStringConvertibleP", + "mangledName": "$ss28CustomDebugStringConvertibleP" + } + ] + }, + { + "kind": "TypeDecl", + "name": "OSModelChangedHandler", + "printedName": "OSModelChangedHandler", + "children": [ + { + "kind": "Function", + "name": "onModelUpdated", + "printedName": "onModelUpdated(args:hydrating:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "OSModelChangedArgs", + "printedName": "OneSignalOSCore.OSModelChangedArgs", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSModelChangedArgs" + }, + { + "kind": "TypeNominal", + "name": "Bool", + "printedName": "Swift.Bool", + "usr": "s:Sb" + } + ], + "declKind": "Func", + "usr": "s:15OneSignalOSCore21OSModelChangedHandlerP14onModelUpdated4args9hydratingyAA0dE4ArgsC_SbtF", + "mangledName": "$s15OneSignalOSCore21OSModelChangedHandlerP14onModelUpdated4args9hydratingyAA0dE4ArgsC_SbtF", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalOSCore.OSModelChangedHandler>", + "sugared_genericSig": "", + "protocolReq": true, + "reqNewWitnessTableEntry": true, + "funcSelfKind": "NonMutating" + } + ], + "declKind": "Protocol", + "usr": "s:15OneSignalOSCore21OSModelChangedHandlerP", + "mangledName": "$s15OneSignalOSCore21OSModelChangedHandlerP", + "moduleName": "OneSignalOSCore", + "declAttributes": [ + "AccessControl" + ] + }, + { + "kind": "Import", + "name": "OneSignalCore", + "printedName": "OneSignalCore", + "declKind": "Import", + "moduleName": "OneSignalOSCore", + "declAttributes": [ + "RawDocComment" + ] + }, + { + "kind": "TypeDecl", + "name": "OSOperationExecutor", + "printedName": "OSOperationExecutor", + "children": [ + { + "kind": "Var", + "name": "supportedDeltas", + "printedName": "supportedDeltas", + "children": [ + { + "kind": "TypeNominal", + "name": "Array", + "printedName": "[Swift.String]", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:Sa" + } + ], + "declKind": "Var", + "usr": "s:15OneSignalOSCore19OSOperationExecutorP15supportedDeltasSaySSGvp", + "mangledName": "$s15OneSignalOSCore19OSOperationExecutorP15supportedDeltasSaySSGvp", + "moduleName": "OneSignalOSCore", + "protocolReq": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "Array", + "printedName": "[Swift.String]", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:Sa" + } + ], + "declKind": "Accessor", + "usr": "s:15OneSignalOSCore19OSOperationExecutorP15supportedDeltasSaySSGvg", + "mangledName": "$s15OneSignalOSCore19OSOperationExecutorP15supportedDeltasSaySSGvg", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalOSCore.OSOperationExecutor>", + "sugared_genericSig": "", + "protocolReq": true, + "reqNewWitnessTableEntry": true, + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "deltaQueue", + "printedName": "deltaQueue", + "children": [ + { + "kind": "TypeNominal", + "name": "Array", + "printedName": "[OneSignalOSCore.OSDelta]", + "children": [ + { + "kind": "TypeNominal", + "name": "OSDelta", + "printedName": "OneSignalOSCore.OSDelta", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSDelta" + } + ], + "usr": "s:Sa" + } + ], + "declKind": "Var", + "usr": "s:15OneSignalOSCore19OSOperationExecutorP10deltaQueueSayAA7OSDeltaCGvp", + "mangledName": "$s15OneSignalOSCore19OSOperationExecutorP10deltaQueueSayAA7OSDeltaCGvp", + "moduleName": "OneSignalOSCore", + "protocolReq": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "Array", + "printedName": "[OneSignalOSCore.OSDelta]", + "children": [ + { + "kind": "TypeNominal", + "name": "OSDelta", + "printedName": "OneSignalOSCore.OSDelta", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSDelta" + } + ], + "usr": "s:Sa" + } + ], + "declKind": "Accessor", + "usr": "s:15OneSignalOSCore19OSOperationExecutorP10deltaQueueSayAA7OSDeltaCGvg", + "mangledName": "$s15OneSignalOSCore19OSOperationExecutorP10deltaQueueSayAA7OSDeltaCGvg", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalOSCore.OSOperationExecutor>", + "sugared_genericSig": "", + "protocolReq": true, + "reqNewWitnessTableEntry": true, + "accessorKind": "get" + } + ] + }, + { + "kind": "Function", + "name": "enqueueDelta", + "printedName": "enqueueDelta(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "OSDelta", + "printedName": "OneSignalOSCore.OSDelta", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSDelta" + } + ], + "declKind": "Func", + "usr": "s:15OneSignalOSCore19OSOperationExecutorP12enqueueDeltayyAA7OSDeltaCF", + "mangledName": "$s15OneSignalOSCore19OSOperationExecutorP12enqueueDeltayyAA7OSDeltaCF", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalOSCore.OSOperationExecutor>", + "sugared_genericSig": "", + "protocolReq": true, + "reqNewWitnessTableEntry": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "cacheDeltaQueue", + "printedName": "cacheDeltaQueue()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + } + ], + "declKind": "Func", + "usr": "s:15OneSignalOSCore19OSOperationExecutorP15cacheDeltaQueueyyF", + "mangledName": "$s15OneSignalOSCore19OSOperationExecutorP15cacheDeltaQueueyyF", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalOSCore.OSOperationExecutor>", + "sugared_genericSig": "", + "protocolReq": true, + "reqNewWitnessTableEntry": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "processDeltaQueue", + "printedName": "processDeltaQueue(inBackground:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "Bool", + "printedName": "Swift.Bool", + "usr": "s:Sb" + } + ], + "declKind": "Func", + "usr": "s:15OneSignalOSCore19OSOperationExecutorP17processDeltaQueue12inBackgroundySb_tF", + "mangledName": "$s15OneSignalOSCore19OSOperationExecutorP17processDeltaQueue12inBackgroundySb_tF", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalOSCore.OSOperationExecutor>", + "sugared_genericSig": "", + "protocolReq": true, + "reqNewWitnessTableEntry": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "processRequestQueue", + "printedName": "processRequestQueue(inBackground:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "Bool", + "printedName": "Swift.Bool", + "usr": "s:Sb" + } + ], + "declKind": "Func", + "usr": "s:15OneSignalOSCore19OSOperationExecutorP19processRequestQueue12inBackgroundySb_tF", + "mangledName": "$s15OneSignalOSCore19OSOperationExecutorP19processRequestQueue12inBackgroundySb_tF", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalOSCore.OSOperationExecutor>", + "sugared_genericSig": "", + "protocolReq": true, + "reqNewWitnessTableEntry": true, + "funcSelfKind": "NonMutating" + } + ], + "declKind": "Protocol", + "usr": "s:15OneSignalOSCore19OSOperationExecutorP", + "mangledName": "$s15OneSignalOSCore19OSOperationExecutorP", + "moduleName": "OneSignalOSCore", + "declAttributes": [ + "AccessControl", + "RawDocComment" + ] + } + ], + "json_format_version": 8 + }, + "ConstValues": [ + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalOSCore\/Source\/OSOperationRepo.swift", + "kind": "BooleanLiteral", + "offset": 1573, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalOSCore\/Source\/OSOperationRepo.swift", + "kind": "Dictionary", + "offset": 1711, + "length": 3, + "value": "[]" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalOSCore\/Source\/OSOperationRepo.swift", + "kind": "Array", + "offset": 1758, + "length": 2, + "value": "[]" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalOSCore\/Source\/OSOperationRepo.swift", + "kind": "Array", + "offset": 1793, + "length": 2, + "value": "[]" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalOSCore\/Source\/OSOperationRepo.swift", + "kind": "IntegerLiteral", + "offset": 1901, + "length": 1, + "value": "5" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalOSCore\/Source\/OSOperationRepo.swift", + "kind": "BooleanLiteral", + "offset": 1927, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalOSCore\/Source\/OSOperationRepo.swift", + "kind": "BooleanLiteral", + "offset": 4475, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalOSCore\/Source\/OSModelStore.swift", + "kind": "StringLiteral", + "offset": 1257, + "length": 12, + "value": "\"OneSignalOSCore.OSModelStore\"" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalOSCore\/Source\/OSModel.swift", + "kind": "BooleanLiteral", + "offset": 1419, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalOSCore\/Source\/OSModel.swift", + "kind": "StringLiteral", + "offset": 1260, + "length": 7, + "value": "\"OneSignalOSCore.OSModel\"" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalOSCore\/Source\/OSDelta.swift", + "kind": "StringLiteral", + "offset": 1455, + "length": 7, + "value": "\"OneSignalOSCore.OSDelta\"" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalOSCore\/Source\/OSModelChangedHandler.swift", + "kind": "StringLiteral", + "offset": 1256, + "length": 18, + "value": "\"OneSignalOSCore.OSModelChangedArgs\"" + } + ] +} \ No newline at end of file diff --git a/iOS_SDK/OneSignalSDK/OneSignal_OSCore/OneSignalOSCore.xcframework/ios-arm64_x86_64-simulator/OneSignalOSCore.framework/Modules/OneSignalOSCore.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface b/iOS_SDK/OneSignalSDK/OneSignal_OSCore/OneSignalOSCore.xcframework/ios-arm64_x86_64-simulator/OneSignalOSCore.framework/Modules/OneSignalOSCore.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface new file mode 100644 index 000000000..8375d9b5c --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignal_OSCore/OneSignalOSCore.xcframework/ios-arm64_x86_64-simulator/OneSignalOSCore.framework/Modules/OneSignalOSCore.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface @@ -0,0 +1,118 @@ +// swift-interface-format-version: 1.0 +// swift-compiler-version: Apple Swift version 5.7.1 (swiftlang-5.7.1.135.3 clang-1400.0.29.51) +// swift-module-flags: -target arm64-apple-ios11.0-simulator -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -O -module-name OneSignalOSCore +// swift-module-flags-ignorable: -enable-bare-slash-regex +import Foundation +import OneSignalCore +@_exported import OneSignalOSCore +import Swift +import _Concurrency +import _StringProcessing +@objc @_inheritsConvenienceInitializers public class OSOperationRepo : ObjectiveC.NSObject { + public static let sharedInstance: OneSignalOSCore.OSOperationRepo + public var paused: Swift.Bool + public func start() + public func addExecutor(_ executor: OneSignalOSCore.OSOperationExecutor) + @objc public func flushDeltaQueue(inBackground: Swift.Bool = false) + @objc override dynamic public init() + @objc deinit +} +@_inheritsConvenienceInitializers public class OSEventProducer : ObjectiveC.NSObject { + public func subscribe(_ handler: THandler) + public func unsubscribe(_ handler: THandler) + public func fire(callback: (THandler) -> Swift.Void) + @objc override dynamic public init() + @objc deinit +} +open class OSModelStore : ObjectiveC.NSObject where TModel : OneSignalOSCore.OSModel { + public init(changeSubscription: OneSignalOSCore.OSEventProducer, storeKey: Swift.String) + public func registerAsUserObserver() -> OneSignalOSCore.OSModelStore + @objc deinit + public func getModel(key: Swift.String) -> TModel? + public func getModel(modelId: Swift.String) -> TModel? + public func getModels() -> [Swift.String : TModel] + public func add(id: Swift.String, model: TModel, hydrating: Swift.Bool) + public func remove(_ id: Swift.String) + public func clearModelsFromStore() +} +extension OneSignalOSCore.OSModelStore : OneSignalOSCore.OSModelChangedHandler { + public func onModelUpdated(args: OneSignalOSCore.OSModelChangedArgs, hydrating: Swift.Bool) +} +@objc open class OSModel : ObjectiveC.NSObject, Foundation.NSCoding { + final public let modelId: Swift.String + public var changeNotifier: OneSignalOSCore.OSEventProducer + public init(changeNotifier: OneSignalOSCore.OSEventProducer) + @objc open func encode(with coder: Foundation.NSCoder) + @objc required public init?(coder: Foundation.NSCoder) + public func set(property: Swift.String, newValue: T) + public func hydrate(_ response: [Swift.String : Any]) + open func hydrateModel(_ response: [Swift.String : Any]) + @objc deinit +} +@objc public protocol OSBackgroundTaskHandler { + @objc func beginBackgroundTask(_ taskIdentifier: Swift.String) + @objc func endBackgroundTask(_ taskIdentifier: Swift.String) + @objc func setTaskInvalid(_ taskIdentifier: Swift.String) +} +@_inheritsConvenienceInitializers @objc public class OSBackgroundTaskManager : ObjectiveC.NSObject { + @objc public static var taskHandler: OneSignalOSCore.OSBackgroundTaskHandler? + @objc public static func beginBackgroundTask(_ taskIdentifier: Swift.String) + @objc public static func endBackgroundTask(_ taskIdentifier: Swift.String) + @objc public static func setTaskInvalid(_ taskIdentifier: Swift.String) + @objc override dynamic public init() + @objc deinit +} +public protocol OSModelStoreListener : OneSignalOSCore.OSModelStoreChangedHandler { + associatedtype TModel : OneSignalOSCore.OSModel + var store: OneSignalOSCore.OSModelStore { get } + init(store: OneSignalOSCore.OSModelStore) + func getAddModelDelta(_ model: Self.TModel) -> OneSignalOSCore.OSDelta? + func getRemoveModelDelta(_ model: Self.TModel) -> OneSignalOSCore.OSDelta? + func getUpdateModelDelta(_ args: OneSignalOSCore.OSModelChangedArgs) -> OneSignalOSCore.OSDelta? +} +extension OneSignalOSCore.OSModelStoreListener { + public func start() + public func onAdded(_ model: OneSignalOSCore.OSModel) + public func onUpdated(_ args: OneSignalOSCore.OSModelChangedArgs) + public func onRemoved(_ model: OneSignalOSCore.OSModel) +} +public protocol OSModelStoreChangedHandler { + func onAdded(_ model: OneSignalOSCore.OSModel) + func onUpdated(_ args: OneSignalOSCore.OSModelChangedArgs) + func onRemoved(_ model: OneSignalOSCore.OSModel) +} +@objc open class OSDelta : ObjectiveC.NSObject, Foundation.NSCoding { + final public let name: Swift.String + final public let deltaId: Swift.String + final public let timestamp: Foundation.Date + public var model: OneSignalOSCore.OSModel + final public let property: Swift.String + final public let value: Any + @objc override dynamic open var description: Swift.String { + @objc get + } + public init(name: Swift.String, model: OneSignalOSCore.OSModel, property: Swift.String, value: Any) + @objc public func encode(with coder: Foundation.NSCoder) + @objc required public init?(coder: Foundation.NSCoder) + @objc deinit +} +@objc @_hasMissingDesignatedInitializers public class OSModelChangedArgs : ObjectiveC.NSObject { + final public let model: OneSignalOSCore.OSModel + final public let property: Swift.String + final public let newValue: Any + @objc override dynamic public var description: Swift.String { + @objc get + } + @objc deinit +} +public protocol OSModelChangedHandler { + func onModelUpdated(args: OneSignalOSCore.OSModelChangedArgs, hydrating: Swift.Bool) +} +public protocol OSOperationExecutor { + var supportedDeltas: [Swift.String] { get } + var deltaQueue: [OneSignalOSCore.OSDelta] { get } + func enqueueDelta(_ delta: OneSignalOSCore.OSDelta) + func cacheDeltaQueue() + func processDeltaQueue(inBackground: Swift.Bool) + func processRequestQueue(inBackground: Swift.Bool) +} diff --git a/iOS_SDK/OneSignalSDK/OneSignal_OSCore/OneSignalOSCore.xcframework/ios-arm64_x86_64-simulator/OneSignalOSCore.framework/Modules/OneSignalOSCore.swiftmodule/arm64-apple-ios-simulator.swiftdoc b/iOS_SDK/OneSignalSDK/OneSignal_OSCore/OneSignalOSCore.xcframework/ios-arm64_x86_64-simulator/OneSignalOSCore.framework/Modules/OneSignalOSCore.swiftmodule/arm64-apple-ios-simulator.swiftdoc new file mode 100644 index 000000000..028c46738 Binary files /dev/null and b/iOS_SDK/OneSignalSDK/OneSignal_OSCore/OneSignalOSCore.xcframework/ios-arm64_x86_64-simulator/OneSignalOSCore.framework/Modules/OneSignalOSCore.swiftmodule/arm64-apple-ios-simulator.swiftdoc differ diff --git a/iOS_SDK/OneSignalSDK/OneSignal_OSCore/OneSignalOSCore.xcframework/ios-arm64_x86_64-simulator/OneSignalOSCore.framework/Modules/OneSignalOSCore.swiftmodule/arm64-apple-ios-simulator.swiftinterface b/iOS_SDK/OneSignalSDK/OneSignal_OSCore/OneSignalOSCore.xcframework/ios-arm64_x86_64-simulator/OneSignalOSCore.framework/Modules/OneSignalOSCore.swiftmodule/arm64-apple-ios-simulator.swiftinterface new file mode 100644 index 000000000..8375d9b5c --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignal_OSCore/OneSignalOSCore.xcframework/ios-arm64_x86_64-simulator/OneSignalOSCore.framework/Modules/OneSignalOSCore.swiftmodule/arm64-apple-ios-simulator.swiftinterface @@ -0,0 +1,118 @@ +// swift-interface-format-version: 1.0 +// swift-compiler-version: Apple Swift version 5.7.1 (swiftlang-5.7.1.135.3 clang-1400.0.29.51) +// swift-module-flags: -target arm64-apple-ios11.0-simulator -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -O -module-name OneSignalOSCore +// swift-module-flags-ignorable: -enable-bare-slash-regex +import Foundation +import OneSignalCore +@_exported import OneSignalOSCore +import Swift +import _Concurrency +import _StringProcessing +@objc @_inheritsConvenienceInitializers public class OSOperationRepo : ObjectiveC.NSObject { + public static let sharedInstance: OneSignalOSCore.OSOperationRepo + public var paused: Swift.Bool + public func start() + public func addExecutor(_ executor: OneSignalOSCore.OSOperationExecutor) + @objc public func flushDeltaQueue(inBackground: Swift.Bool = false) + @objc override dynamic public init() + @objc deinit +} +@_inheritsConvenienceInitializers public class OSEventProducer : ObjectiveC.NSObject { + public func subscribe(_ handler: THandler) + public func unsubscribe(_ handler: THandler) + public func fire(callback: (THandler) -> Swift.Void) + @objc override dynamic public init() + @objc deinit +} +open class OSModelStore : ObjectiveC.NSObject where TModel : OneSignalOSCore.OSModel { + public init(changeSubscription: OneSignalOSCore.OSEventProducer, storeKey: Swift.String) + public func registerAsUserObserver() -> OneSignalOSCore.OSModelStore + @objc deinit + public func getModel(key: Swift.String) -> TModel? + public func getModel(modelId: Swift.String) -> TModel? + public func getModels() -> [Swift.String : TModel] + public func add(id: Swift.String, model: TModel, hydrating: Swift.Bool) + public func remove(_ id: Swift.String) + public func clearModelsFromStore() +} +extension OneSignalOSCore.OSModelStore : OneSignalOSCore.OSModelChangedHandler { + public func onModelUpdated(args: OneSignalOSCore.OSModelChangedArgs, hydrating: Swift.Bool) +} +@objc open class OSModel : ObjectiveC.NSObject, Foundation.NSCoding { + final public let modelId: Swift.String + public var changeNotifier: OneSignalOSCore.OSEventProducer + public init(changeNotifier: OneSignalOSCore.OSEventProducer) + @objc open func encode(with coder: Foundation.NSCoder) + @objc required public init?(coder: Foundation.NSCoder) + public func set(property: Swift.String, newValue: T) + public func hydrate(_ response: [Swift.String : Any]) + open func hydrateModel(_ response: [Swift.String : Any]) + @objc deinit +} +@objc public protocol OSBackgroundTaskHandler { + @objc func beginBackgroundTask(_ taskIdentifier: Swift.String) + @objc func endBackgroundTask(_ taskIdentifier: Swift.String) + @objc func setTaskInvalid(_ taskIdentifier: Swift.String) +} +@_inheritsConvenienceInitializers @objc public class OSBackgroundTaskManager : ObjectiveC.NSObject { + @objc public static var taskHandler: OneSignalOSCore.OSBackgroundTaskHandler? + @objc public static func beginBackgroundTask(_ taskIdentifier: Swift.String) + @objc public static func endBackgroundTask(_ taskIdentifier: Swift.String) + @objc public static func setTaskInvalid(_ taskIdentifier: Swift.String) + @objc override dynamic public init() + @objc deinit +} +public protocol OSModelStoreListener : OneSignalOSCore.OSModelStoreChangedHandler { + associatedtype TModel : OneSignalOSCore.OSModel + var store: OneSignalOSCore.OSModelStore { get } + init(store: OneSignalOSCore.OSModelStore) + func getAddModelDelta(_ model: Self.TModel) -> OneSignalOSCore.OSDelta? + func getRemoveModelDelta(_ model: Self.TModel) -> OneSignalOSCore.OSDelta? + func getUpdateModelDelta(_ args: OneSignalOSCore.OSModelChangedArgs) -> OneSignalOSCore.OSDelta? +} +extension OneSignalOSCore.OSModelStoreListener { + public func start() + public func onAdded(_ model: OneSignalOSCore.OSModel) + public func onUpdated(_ args: OneSignalOSCore.OSModelChangedArgs) + public func onRemoved(_ model: OneSignalOSCore.OSModel) +} +public protocol OSModelStoreChangedHandler { + func onAdded(_ model: OneSignalOSCore.OSModel) + func onUpdated(_ args: OneSignalOSCore.OSModelChangedArgs) + func onRemoved(_ model: OneSignalOSCore.OSModel) +} +@objc open class OSDelta : ObjectiveC.NSObject, Foundation.NSCoding { + final public let name: Swift.String + final public let deltaId: Swift.String + final public let timestamp: Foundation.Date + public var model: OneSignalOSCore.OSModel + final public let property: Swift.String + final public let value: Any + @objc override dynamic open var description: Swift.String { + @objc get + } + public init(name: Swift.String, model: OneSignalOSCore.OSModel, property: Swift.String, value: Any) + @objc public func encode(with coder: Foundation.NSCoder) + @objc required public init?(coder: Foundation.NSCoder) + @objc deinit +} +@objc @_hasMissingDesignatedInitializers public class OSModelChangedArgs : ObjectiveC.NSObject { + final public let model: OneSignalOSCore.OSModel + final public let property: Swift.String + final public let newValue: Any + @objc override dynamic public var description: Swift.String { + @objc get + } + @objc deinit +} +public protocol OSModelChangedHandler { + func onModelUpdated(args: OneSignalOSCore.OSModelChangedArgs, hydrating: Swift.Bool) +} +public protocol OSOperationExecutor { + var supportedDeltas: [Swift.String] { get } + var deltaQueue: [OneSignalOSCore.OSDelta] { get } + func enqueueDelta(_ delta: OneSignalOSCore.OSDelta) + func cacheDeltaQueue() + func processDeltaQueue(inBackground: Swift.Bool) + func processRequestQueue(inBackground: Swift.Bool) +} diff --git a/iOS_SDK/OneSignalSDK/OneSignal_OSCore/OneSignalOSCore.xcframework/ios-arm64_x86_64-simulator/OneSignalOSCore.framework/Modules/OneSignalOSCore.swiftmodule/x86_64-apple-ios-simulator.abi.json b/iOS_SDK/OneSignalSDK/OneSignal_OSCore/OneSignalOSCore.xcframework/ios-arm64_x86_64-simulator/OneSignalOSCore.framework/Modules/OneSignalOSCore.swiftmodule/x86_64-apple-ios-simulator.abi.json new file mode 100644 index 000000000..6cf802ba3 --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignal_OSCore/OneSignalOSCore.xcframework/ios-arm64_x86_64-simulator/OneSignalOSCore.framework/Modules/OneSignalOSCore.swiftmodule/x86_64-apple-ios-simulator.abi.json @@ -0,0 +1,3662 @@ +{ + "ABIRoot": { + "kind": "Root", + "name": "TopLevel", + "printedName": "TopLevel", + "children": [ + { + "kind": "Import", + "name": "Foundation", + "printedName": "Foundation", + "declKind": "Import", + "moduleName": "OneSignalOSCore", + "declAttributes": [ + "RawDocComment" + ] + }, + { + "kind": "Import", + "name": "OneSignalCore", + "printedName": "OneSignalCore", + "declKind": "Import", + "moduleName": "OneSignalOSCore" + }, + { + "kind": "TypeDecl", + "name": "OSOperationRepo", + "printedName": "OSOperationRepo", + "children": [ + { + "kind": "Var", + "name": "sharedInstance", + "printedName": "sharedInstance", + "children": [ + { + "kind": "TypeNominal", + "name": "OSOperationRepo", + "printedName": "OneSignalOSCore.OSOperationRepo", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSOperationRepo" + } + ], + "declKind": "Var", + "usr": "s:15OneSignalOSCore15OSOperationRepoC14sharedInstanceACvpZ", + "mangledName": "$s15OneSignalOSCore15OSOperationRepoC14sharedInstanceACvpZ", + "moduleName": "OneSignalOSCore", + "static": true, + "declAttributes": [ + "HasInitialValue", + "Final", + "HasStorage", + "AccessControl" + ], + "isLet": true, + "hasStorage": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "OSOperationRepo", + "printedName": "OneSignalOSCore.OSOperationRepo", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSOperationRepo" + } + ], + "declKind": "Accessor", + "usr": "s:15OneSignalOSCore15OSOperationRepoC14sharedInstanceACvgZ", + "mangledName": "$s15OneSignalOSCore15OSOperationRepoC14sharedInstanceACvgZ", + "moduleName": "OneSignalOSCore", + "static": true, + "implicit": true, + "declAttributes": [ + "Final" + ], + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "paused", + "printedName": "paused", + "children": [ + { + "kind": "TypeNominal", + "name": "Bool", + "printedName": "Swift.Bool", + "usr": "s:Sb" + } + ], + "declKind": "Var", + "usr": "s:15OneSignalOSCore15OSOperationRepoC6pausedSbvp", + "mangledName": "$s15OneSignalOSCore15OSOperationRepoC6pausedSbvp", + "moduleName": "OneSignalOSCore", + "declAttributes": [ + "HasInitialValue", + "HasStorage", + "AccessControl" + ], + "hasStorage": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "Bool", + "printedName": "Swift.Bool", + "usr": "s:Sb" + } + ], + "declKind": "Accessor", + "usr": "s:15OneSignalOSCore15OSOperationRepoC6pausedSbvg", + "mangledName": "$s15OneSignalOSCore15OSOperationRepoC6pausedSbvg", + "moduleName": "OneSignalOSCore", + "implicit": true, + "accessorKind": "get" + }, + { + "kind": "Accessor", + "name": "Set", + "printedName": "Set()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "Bool", + "printedName": "Swift.Bool", + "usr": "s:Sb" + } + ], + "declKind": "Accessor", + "usr": "s:15OneSignalOSCore15OSOperationRepoC6pausedSbvs", + "mangledName": "$s15OneSignalOSCore15OSOperationRepoC6pausedSbvs", + "moduleName": "OneSignalOSCore", + "implicit": true, + "accessorKind": "set" + }, + { + "kind": "Accessor", + "name": "Modify", + "printedName": "Modify()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + } + ], + "declKind": "Accessor", + "usr": "s:15OneSignalOSCore15OSOperationRepoC6pausedSbvM", + "mangledName": "$s15OneSignalOSCore15OSOperationRepoC6pausedSbvM", + "moduleName": "OneSignalOSCore", + "implicit": true, + "accessorKind": "_modify" + } + ] + }, + { + "kind": "Function", + "name": "start", + "printedName": "start()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + } + ], + "declKind": "Func", + "usr": "s:15OneSignalOSCore15OSOperationRepoC5startyyF", + "mangledName": "$s15OneSignalOSCore15OSOperationRepoC5startyyF", + "moduleName": "OneSignalOSCore", + "declAttributes": [ + "AccessControl", + "RawDocComment" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "addExecutor", + "printedName": "addExecutor(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "OSOperationExecutor", + "printedName": "OneSignalOSCore.OSOperationExecutor", + "usr": "s:15OneSignalOSCore19OSOperationExecutorP" + } + ], + "declKind": "Func", + "usr": "s:15OneSignalOSCore15OSOperationRepoC11addExecutoryyAA0dG0_pF", + "mangledName": "$s15OneSignalOSCore15OSOperationRepoC11addExecutoryyAA0dG0_pF", + "moduleName": "OneSignalOSCore", + "declAttributes": [ + "AccessControl", + "RawDocComment" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "flushDeltaQueue", + "printedName": "flushDeltaQueue(inBackground:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "Bool", + "printedName": "Swift.Bool", + "hasDefaultArg": true, + "usr": "s:Sb" + } + ], + "declKind": "Func", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSOperationRepo(im)flushDeltaQueueInBackground:", + "mangledName": "$s15OneSignalOSCore15OSOperationRepoC15flushDeltaQueue12inBackgroundySb_tF", + "moduleName": "OneSignalOSCore", + "objc_name": "flushDeltaQueueInBackground:", + "declAttributes": [ + "AccessControl", + "ObjC" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Constructor", + "name": "init", + "printedName": "init()", + "children": [ + { + "kind": "TypeNominal", + "name": "OSOperationRepo", + "printedName": "OneSignalOSCore.OSOperationRepo", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSOperationRepo" + } + ], + "declKind": "Constructor", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSOperationRepo(im)init", + "mangledName": "$s15OneSignalOSCore15OSOperationRepoCACycfc", + "moduleName": "OneSignalOSCore", + "overriding": true, + "implicit": true, + "objc_name": "init", + "declAttributes": [ + "Dynamic", + "ObjC", + "Override" + ], + "init_kind": "Designated" + } + ], + "declKind": "Class", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSOperationRepo", + "mangledName": "$s15OneSignalOSCore15OSOperationRepoC", + "moduleName": "OneSignalOSCore", + "declAttributes": [ + "AccessControl", + "RawDocComment", + "ObjC" + ], + "superclassUsr": "c:objc(cs)NSObject", + "inheritsConvenienceInitializers": true, + "superclassNames": [ + "ObjectiveC.NSObject" + ], + "conformances": [ + { + "kind": "Conformance", + "name": "Equatable", + "printedName": "Equatable", + "usr": "s:SQ", + "mangledName": "$sSQ" + }, + { + "kind": "Conformance", + "name": "Hashable", + "printedName": "Hashable", + "usr": "s:SH", + "mangledName": "$sSH" + }, + { + "kind": "Conformance", + "name": "CVarArg", + "printedName": "CVarArg", + "usr": "s:s7CVarArgP", + "mangledName": "$ss7CVarArgP" + }, + { + "kind": "Conformance", + "name": "_KeyValueCodingAndObservingPublishing", + "printedName": "_KeyValueCodingAndObservingPublishing", + "usr": "s:10Foundation37_KeyValueCodingAndObservingPublishingP", + "mangledName": "$s10Foundation37_KeyValueCodingAndObservingPublishingP" + }, + { + "kind": "Conformance", + "name": "_KeyValueCodingAndObserving", + "printedName": "_KeyValueCodingAndObserving", + "usr": "s:10Foundation27_KeyValueCodingAndObservingP", + "mangledName": "$s10Foundation27_KeyValueCodingAndObservingP" + }, + { + "kind": "Conformance", + "name": "CustomStringConvertible", + "printedName": "CustomStringConvertible", + "usr": "s:s23CustomStringConvertibleP", + "mangledName": "$ss23CustomStringConvertibleP" + }, + { + "kind": "Conformance", + "name": "CustomDebugStringConvertible", + "printedName": "CustomDebugStringConvertible", + "usr": "s:s28CustomDebugStringConvertibleP", + "mangledName": "$ss28CustomDebugStringConvertibleP" + } + ] + }, + { + "kind": "Import", + "name": "Foundation", + "printedName": "Foundation", + "declKind": "Import", + "moduleName": "OneSignalOSCore", + "declAttributes": [ + "RawDocComment" + ] + }, + { + "kind": "Import", + "name": "OneSignalCore", + "printedName": "OneSignalCore", + "declKind": "Import", + "moduleName": "OneSignalOSCore" + }, + { + "kind": "TypeDecl", + "name": "OSEventProducer", + "printedName": "OSEventProducer", + "children": [ + { + "kind": "Function", + "name": "subscribe", + "printedName": "subscribe(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "GenericTypeParam", + "printedName": "τ_0_0" + } + ], + "declKind": "Func", + "usr": "s:15OneSignalOSCore15OSEventProducerC9subscribeyyxF", + "mangledName": "$s15OneSignalOSCore15OSEventProducerC9subscribeyyxF", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0>", + "sugared_genericSig": "", + "declAttributes": [ + "AccessControl" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "unsubscribe", + "printedName": "unsubscribe(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "GenericTypeParam", + "printedName": "τ_0_0" + } + ], + "declKind": "Func", + "usr": "s:15OneSignalOSCore15OSEventProducerC11unsubscribeyyxF", + "mangledName": "$s15OneSignalOSCore15OSEventProducerC11unsubscribeyyxF", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0>", + "sugared_genericSig": "", + "declAttributes": [ + "AccessControl" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "fire", + "printedName": "fire(callback:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeFunc", + "name": "Function", + "printedName": "(τ_0_0) -> ()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "GenericTypeParam", + "printedName": "τ_0_0" + } + ], + "typeAttributes": [ + "noescape" + ] + } + ], + "declKind": "Func", + "usr": "s:15OneSignalOSCore15OSEventProducerC4fire8callbackyyxXE_tF", + "mangledName": "$s15OneSignalOSCore15OSEventProducerC4fire8callbackyyxXE_tF", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0>", + "sugared_genericSig": "", + "declAttributes": [ + "AccessControl" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Constructor", + "name": "init", + "printedName": "init()", + "children": [ + { + "kind": "TypeNominal", + "name": "OSEventProducer", + "printedName": "OneSignalOSCore.OSEventProducer<τ_0_0>", + "children": [ + { + "kind": "TypeNominal", + "name": "GenericTypeParam", + "printedName": "τ_0_0" + } + ], + "usr": "s:15OneSignalOSCore15OSEventProducerC" + } + ], + "declKind": "Constructor", + "usr": "s:15OneSignalOSCore15OSEventProducerCACyxGycfc", + "mangledName": "$s15OneSignalOSCore15OSEventProducerCACyxGycfc", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0>", + "sugared_genericSig": "", + "overriding": true, + "implicit": true, + "objc_name": "init", + "declAttributes": [ + "Dynamic", + "ObjC", + "Override" + ], + "init_kind": "Designated" + } + ], + "declKind": "Class", + "usr": "s:15OneSignalOSCore15OSEventProducerC", + "mangledName": "$s15OneSignalOSCore15OSEventProducerC", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0>", + "sugared_genericSig": "", + "declAttributes": [ + "AccessControl" + ], + "superclassUsr": "c:objc(cs)NSObject", + "inheritsConvenienceInitializers": true, + "superclassNames": [ + "ObjectiveC.NSObject" + ], + "conformances": [ + { + "kind": "Conformance", + "name": "Equatable", + "printedName": "Equatable", + "usr": "s:SQ", + "mangledName": "$sSQ" + }, + { + "kind": "Conformance", + "name": "Hashable", + "printedName": "Hashable", + "usr": "s:SH", + "mangledName": "$sSH" + }, + { + "kind": "Conformance", + "name": "CVarArg", + "printedName": "CVarArg", + "usr": "s:s7CVarArgP", + "mangledName": "$ss7CVarArgP" + }, + { + "kind": "Conformance", + "name": "_KeyValueCodingAndObservingPublishing", + "printedName": "_KeyValueCodingAndObservingPublishing", + "usr": "s:10Foundation37_KeyValueCodingAndObservingPublishingP", + "mangledName": "$s10Foundation37_KeyValueCodingAndObservingPublishingP" + }, + { + "kind": "Conformance", + "name": "_KeyValueCodingAndObserving", + "printedName": "_KeyValueCodingAndObserving", + "usr": "s:10Foundation27_KeyValueCodingAndObservingP", + "mangledName": "$s10Foundation27_KeyValueCodingAndObservingP" + }, + { + "kind": "Conformance", + "name": "CustomStringConvertible", + "printedName": "CustomStringConvertible", + "usr": "s:s23CustomStringConvertibleP", + "mangledName": "$ss23CustomStringConvertibleP" + }, + { + "kind": "Conformance", + "name": "CustomDebugStringConvertible", + "printedName": "CustomDebugStringConvertible", + "usr": "s:s28CustomDebugStringConvertibleP", + "mangledName": "$ss28CustomDebugStringConvertibleP" + } + ] + }, + { + "kind": "Import", + "name": "OneSignalCore", + "printedName": "OneSignalCore", + "declKind": "Import", + "moduleName": "OneSignalOSCore", + "declAttributes": [ + "RawDocComment" + ] + }, + { + "kind": "TypeDecl", + "name": "OSModelStore", + "printedName": "OSModelStore", + "children": [ + { + "kind": "Constructor", + "name": "init", + "printedName": "init(changeSubscription:storeKey:)", + "children": [ + { + "kind": "TypeNominal", + "name": "OSModelStore", + "printedName": "OneSignalOSCore.OSModelStore<τ_0_0>", + "children": [ + { + "kind": "TypeNominal", + "name": "GenericTypeParam", + "printedName": "τ_0_0" + } + ], + "usr": "s:15OneSignalOSCore12OSModelStoreC" + }, + { + "kind": "TypeNominal", + "name": "OSEventProducer", + "printedName": "OneSignalOSCore.OSEventProducer", + "children": [ + { + "kind": "TypeNominal", + "name": "OSModelStoreChangedHandler", + "printedName": "OneSignalOSCore.OSModelStoreChangedHandler", + "usr": "s:15OneSignalOSCore26OSModelStoreChangedHandlerP" + } + ], + "usr": "s:15OneSignalOSCore15OSEventProducerC" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Constructor", + "usr": "s:15OneSignalOSCore12OSModelStoreC18changeSubscription8storeKeyACyxGAA15OSEventProducerCyAA0dE14ChangedHandler_pG_SStcfc", + "mangledName": "$s15OneSignalOSCore12OSModelStoreC18changeSubscription8storeKeyACyxGAA15OSEventProducerCyAA0dE14ChangedHandler_pG_SStcfc", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalOSCore.OSModel>", + "sugared_genericSig": "", + "declAttributes": [ + "AccessControl" + ], + "init_kind": "Designated" + }, + { + "kind": "Function", + "name": "registerAsUserObserver", + "printedName": "registerAsUserObserver()", + "children": [ + { + "kind": "TypeNominal", + "name": "OSModelStore", + "printedName": "OneSignalOSCore.OSModelStore<τ_0_0>", + "children": [ + { + "kind": "TypeNominal", + "name": "GenericTypeParam", + "printedName": "τ_0_0" + } + ], + "usr": "s:15OneSignalOSCore12OSModelStoreC" + } + ], + "declKind": "Func", + "usr": "s:15OneSignalOSCore12OSModelStoreC22registerAsUserObserverACyxGyF", + "mangledName": "$s15OneSignalOSCore12OSModelStoreC22registerAsUserObserverACyxGyF", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalOSCore.OSModel>", + "sugared_genericSig": "", + "declAttributes": [ + "AccessControl" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "getModel", + "printedName": "getModel(key:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "τ_0_0?", + "children": [ + { + "kind": "TypeNominal", + "name": "GenericTypeParam", + "printedName": "τ_0_0" + } + ], + "usr": "s:Sq" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Func", + "usr": "s:15OneSignalOSCore12OSModelStoreC8getModel3keyxSgSS_tF", + "mangledName": "$s15OneSignalOSCore12OSModelStoreC8getModel3keyxSgSS_tF", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalOSCore.OSModel>", + "sugared_genericSig": "", + "declAttributes": [ + "AccessControl", + "RawDocComment" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "getModel", + "printedName": "getModel(modelId:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "τ_0_0?", + "children": [ + { + "kind": "TypeNominal", + "name": "GenericTypeParam", + "printedName": "τ_0_0" + } + ], + "usr": "s:Sq" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Func", + "usr": "s:15OneSignalOSCore12OSModelStoreC8getModel7modelIdxSgSS_tF", + "mangledName": "$s15OneSignalOSCore12OSModelStoreC8getModel7modelIdxSgSS_tF", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalOSCore.OSModel>", + "sugared_genericSig": "", + "declAttributes": [ + "AccessControl", + "RawDocComment" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "getModels", + "printedName": "getModels()", + "children": [ + { + "kind": "TypeNominal", + "name": "Dictionary", + "printedName": "[Swift.String : τ_0_0]", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + }, + { + "kind": "TypeNominal", + "name": "GenericTypeParam", + "printedName": "τ_0_0" + } + ], + "usr": "s:SD" + } + ], + "declKind": "Func", + "usr": "s:15OneSignalOSCore12OSModelStoreC9getModelsSDySSxGyF", + "mangledName": "$s15OneSignalOSCore12OSModelStoreC9getModelsSDySSxGyF", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalOSCore.OSModel>", + "sugared_genericSig": "", + "declAttributes": [ + "AccessControl" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "add", + "printedName": "add(id:model:hydrating:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + }, + { + "kind": "TypeNominal", + "name": "GenericTypeParam", + "printedName": "τ_0_0" + }, + { + "kind": "TypeNominal", + "name": "Bool", + "printedName": "Swift.Bool", + "usr": "s:Sb" + } + ], + "declKind": "Func", + "usr": "s:15OneSignalOSCore12OSModelStoreC3add2id5model9hydratingySS_xSbtF", + "mangledName": "$s15OneSignalOSCore12OSModelStoreC3add2id5model9hydratingySS_xSbtF", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalOSCore.OSModel>", + "sugared_genericSig": "", + "declAttributes": [ + "AccessControl" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "remove", + "printedName": "remove(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Func", + "usr": "s:15OneSignalOSCore12OSModelStoreC6removeyySSF", + "mangledName": "$s15OneSignalOSCore12OSModelStoreC6removeyySSF", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalOSCore.OSModel>", + "sugared_genericSig": "", + "declAttributes": [ + "AccessControl", + "RawDocComment" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "clearModelsFromStore", + "printedName": "clearModelsFromStore()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + } + ], + "declKind": "Func", + "usr": "s:15OneSignalOSCore12OSModelStoreC015clearModelsFromE0yyF", + "mangledName": "$s15OneSignalOSCore12OSModelStoreC015clearModelsFromE0yyF", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalOSCore.OSModel>", + "sugared_genericSig": "", + "declAttributes": [ + "AccessControl", + "RawDocComment" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Constructor", + "name": "init", + "printedName": "init()", + "children": [ + { + "kind": "TypeNominal", + "name": "OSModelStore", + "printedName": "OneSignalOSCore.OSModelStore<τ_0_0>", + "children": [ + { + "kind": "TypeNominal", + "name": "GenericTypeParam", + "printedName": "τ_0_0" + } + ], + "usr": "s:15OneSignalOSCore12OSModelStoreC" + } + ], + "declKind": "Constructor", + "usr": "s:15OneSignalOSCore12OSModelStoreCACyxGycfc", + "mangledName": "$s15OneSignalOSCore12OSModelStoreCACyxGycfc", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalOSCore.OSModel>", + "sugared_genericSig": "", + "overriding": true, + "implicit": true, + "objc_name": "init", + "declAttributes": [ + "Dynamic", + "ObjC", + "Override" + ], + "init_kind": "Designated" + }, + { + "kind": "Function", + "name": "onModelUpdated", + "printedName": "onModelUpdated(args:hydrating:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "OSModelChangedArgs", + "printedName": "OneSignalOSCore.OSModelChangedArgs", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSModelChangedArgs" + }, + { + "kind": "TypeNominal", + "name": "Bool", + "printedName": "Swift.Bool", + "usr": "s:Sb" + } + ], + "declKind": "Func", + "usr": "s:15OneSignalOSCore12OSModelStoreC14onModelUpdated4args9hydratingyAA0D11ChangedArgsC_SbtF", + "mangledName": "$s15OneSignalOSCore12OSModelStoreC14onModelUpdated4args9hydratingyAA0D11ChangedArgsC_SbtF", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalOSCore.OSModel>", + "sugared_genericSig": "", + "declAttributes": [ + "AccessControl" + ], + "isFromExtension": true, + "funcSelfKind": "NonMutating" + } + ], + "declKind": "Class", + "usr": "s:15OneSignalOSCore12OSModelStoreC", + "mangledName": "$s15OneSignalOSCore12OSModelStoreC", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalOSCore.OSModel>", + "sugared_genericSig": "", + "isOpen": true, + "declAttributes": [ + "AccessControl" + ], + "superclassUsr": "c:objc(cs)NSObject", + "superclassNames": [ + "ObjectiveC.NSObject" + ], + "conformances": [ + { + "kind": "Conformance", + "name": "OSModelChangedHandler", + "printedName": "OSModelChangedHandler", + "usr": "s:15OneSignalOSCore21OSModelChangedHandlerP", + "mangledName": "$s15OneSignalOSCore21OSModelChangedHandlerP" + }, + { + "kind": "Conformance", + "name": "Equatable", + "printedName": "Equatable", + "usr": "s:SQ", + "mangledName": "$sSQ" + }, + { + "kind": "Conformance", + "name": "Hashable", + "printedName": "Hashable", + "usr": "s:SH", + "mangledName": "$sSH" + }, + { + "kind": "Conformance", + "name": "CVarArg", + "printedName": "CVarArg", + "usr": "s:s7CVarArgP", + "mangledName": "$ss7CVarArgP" + }, + { + "kind": "Conformance", + "name": "_KeyValueCodingAndObservingPublishing", + "printedName": "_KeyValueCodingAndObservingPublishing", + "usr": "s:10Foundation37_KeyValueCodingAndObservingPublishingP", + "mangledName": "$s10Foundation37_KeyValueCodingAndObservingPublishingP" + }, + { + "kind": "Conformance", + "name": "_KeyValueCodingAndObserving", + "printedName": "_KeyValueCodingAndObserving", + "usr": "s:10Foundation27_KeyValueCodingAndObservingP", + "mangledName": "$s10Foundation27_KeyValueCodingAndObservingP" + }, + { + "kind": "Conformance", + "name": "CustomStringConvertible", + "printedName": "CustomStringConvertible", + "usr": "s:s23CustomStringConvertibleP", + "mangledName": "$ss23CustomStringConvertibleP" + }, + { + "kind": "Conformance", + "name": "CustomDebugStringConvertible", + "printedName": "CustomDebugStringConvertible", + "usr": "s:s28CustomDebugStringConvertibleP", + "mangledName": "$ss28CustomDebugStringConvertibleP" + } + ] + }, + { + "kind": "Import", + "name": "Foundation", + "printedName": "Foundation", + "declKind": "Import", + "moduleName": "OneSignalOSCore", + "declAttributes": [ + "RawDocComment" + ] + }, + { + "kind": "TypeDecl", + "name": "OSModel", + "printedName": "OSModel", + "children": [ + { + "kind": "Var", + "name": "modelId", + "printedName": "modelId", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Var", + "usr": "s:15OneSignalOSCore7OSModelC7modelIdSSvp", + "mangledName": "$s15OneSignalOSCore7OSModelC7modelIdSSvp", + "moduleName": "OneSignalOSCore", + "declAttributes": [ + "Final", + "HasStorage", + "AccessControl" + ], + "isLet": true, + "hasStorage": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Accessor", + "usr": "s:15OneSignalOSCore7OSModelC7modelIdSSvg", + "mangledName": "$s15OneSignalOSCore7OSModelC7modelIdSSvg", + "moduleName": "OneSignalOSCore", + "implicit": true, + "declAttributes": [ + "Final" + ], + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "changeNotifier", + "printedName": "changeNotifier", + "children": [ + { + "kind": "TypeNominal", + "name": "OSEventProducer", + "printedName": "OneSignalOSCore.OSEventProducer", + "children": [ + { + "kind": "TypeNominal", + "name": "OSModelChangedHandler", + "printedName": "OneSignalOSCore.OSModelChangedHandler", + "usr": "s:15OneSignalOSCore21OSModelChangedHandlerP" + } + ], + "usr": "s:15OneSignalOSCore15OSEventProducerC" + } + ], + "declKind": "Var", + "usr": "s:15OneSignalOSCore7OSModelC14changeNotifierAA15OSEventProducerCyAA0D14ChangedHandler_pGvp", + "mangledName": "$s15OneSignalOSCore7OSModelC14changeNotifierAA15OSEventProducerCyAA0D14ChangedHandler_pGvp", + "moduleName": "OneSignalOSCore", + "declAttributes": [ + "HasStorage", + "AccessControl" + ], + "hasStorage": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "OSEventProducer", + "printedName": "OneSignalOSCore.OSEventProducer", + "children": [ + { + "kind": "TypeNominal", + "name": "OSModelChangedHandler", + "printedName": "OneSignalOSCore.OSModelChangedHandler", + "usr": "s:15OneSignalOSCore21OSModelChangedHandlerP" + } + ], + "usr": "s:15OneSignalOSCore15OSEventProducerC" + } + ], + "declKind": "Accessor", + "usr": "s:15OneSignalOSCore7OSModelC14changeNotifierAA15OSEventProducerCyAA0D14ChangedHandler_pGvg", + "mangledName": "$s15OneSignalOSCore7OSModelC14changeNotifierAA15OSEventProducerCyAA0D14ChangedHandler_pGvg", + "moduleName": "OneSignalOSCore", + "implicit": true, + "accessorKind": "get" + }, + { + "kind": "Accessor", + "name": "Set", + "printedName": "Set()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "OSEventProducer", + "printedName": "OneSignalOSCore.OSEventProducer", + "children": [ + { + "kind": "TypeNominal", + "name": "OSModelChangedHandler", + "printedName": "OneSignalOSCore.OSModelChangedHandler", + "usr": "s:15OneSignalOSCore21OSModelChangedHandlerP" + } + ], + "usr": "s:15OneSignalOSCore15OSEventProducerC" + } + ], + "declKind": "Accessor", + "usr": "s:15OneSignalOSCore7OSModelC14changeNotifierAA15OSEventProducerCyAA0D14ChangedHandler_pGvs", + "mangledName": "$s15OneSignalOSCore7OSModelC14changeNotifierAA15OSEventProducerCyAA0D14ChangedHandler_pGvs", + "moduleName": "OneSignalOSCore", + "implicit": true, + "accessorKind": "set" + }, + { + "kind": "Accessor", + "name": "Modify", + "printedName": "Modify()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + } + ], + "declKind": "Accessor", + "usr": "s:15OneSignalOSCore7OSModelC14changeNotifierAA15OSEventProducerCyAA0D14ChangedHandler_pGvM", + "mangledName": "$s15OneSignalOSCore7OSModelC14changeNotifierAA15OSEventProducerCyAA0D14ChangedHandler_pGvM", + "moduleName": "OneSignalOSCore", + "implicit": true, + "accessorKind": "_modify" + } + ] + }, + { + "kind": "Constructor", + "name": "init", + "printedName": "init(changeNotifier:)", + "children": [ + { + "kind": "TypeNominal", + "name": "OSModel", + "printedName": "OneSignalOSCore.OSModel", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSModel" + }, + { + "kind": "TypeNominal", + "name": "OSEventProducer", + "printedName": "OneSignalOSCore.OSEventProducer", + "children": [ + { + "kind": "TypeNominal", + "name": "OSModelChangedHandler", + "printedName": "OneSignalOSCore.OSModelChangedHandler", + "usr": "s:15OneSignalOSCore21OSModelChangedHandlerP" + } + ], + "usr": "s:15OneSignalOSCore15OSEventProducerC" + } + ], + "declKind": "Constructor", + "usr": "s:15OneSignalOSCore7OSModelC14changeNotifierAcA15OSEventProducerCyAA0D14ChangedHandler_pG_tcfc", + "mangledName": "$s15OneSignalOSCore7OSModelC14changeNotifierAcA15OSEventProducerCyAA0D14ChangedHandler_pG_tcfc", + "moduleName": "OneSignalOSCore", + "declAttributes": [ + "AccessControl", + "RawDocComment" + ], + "init_kind": "Designated" + }, + { + "kind": "Function", + "name": "encode", + "printedName": "encode(with:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "NSCoder", + "printedName": "Foundation.NSCoder", + "usr": "c:objc(cs)NSCoder" + } + ], + "declKind": "Func", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSModel(im)encodeWithCoder:", + "mangledName": "$s15OneSignalOSCore7OSModelC6encode4withySo7NSCoderC_tF", + "moduleName": "OneSignalOSCore", + "isOpen": true, + "objc_name": "encodeWithCoder:", + "declAttributes": [ + "ObjC", + "AccessControl" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Constructor", + "name": "init", + "printedName": "init(coder:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "OneSignalOSCore.OSModel?", + "children": [ + { + "kind": "TypeNominal", + "name": "OSModel", + "printedName": "OneSignalOSCore.OSModel", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSModel" + } + ], + "usr": "s:Sq" + }, + { + "kind": "TypeNominal", + "name": "NSCoder", + "printedName": "Foundation.NSCoder", + "usr": "c:objc(cs)NSCoder" + } + ], + "declKind": "Constructor", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSModel(im)initWithCoder:", + "mangledName": "$s15OneSignalOSCore7OSModelC5coderACSgSo7NSCoderC_tcfc", + "moduleName": "OneSignalOSCore", + "objc_name": "initWithCoder:", + "declAttributes": [ + "ObjC", + "Required", + "AccessControl" + ], + "init_kind": "Designated" + }, + { + "kind": "Function", + "name": "set", + "printedName": "set(property:newValue:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + }, + { + "kind": "TypeNominal", + "name": "GenericTypeParam", + "printedName": "τ_0_0" + } + ], + "declKind": "Func", + "usr": "s:15OneSignalOSCore7OSModelC3set8property8newValueySS_xtlF", + "mangledName": "$s15OneSignalOSCore7OSModelC3set8property8newValueySS_xtlF", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0>", + "sugared_genericSig": "", + "declAttributes": [ + "AccessControl", + "RawDocComment" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "hydrate", + "printedName": "hydrate(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "Dictionary", + "printedName": "[Swift.String : Any]", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + }, + { + "kind": "TypeNominal", + "name": "ProtocolComposition", + "printedName": "Any" + } + ], + "usr": "s:SD" + } + ], + "declKind": "Func", + "usr": "s:15OneSignalOSCore7OSModelC7hydrateyySDySSypGF", + "mangledName": "$s15OneSignalOSCore7OSModelC7hydrateyySDySSypGF", + "moduleName": "OneSignalOSCore", + "declAttributes": [ + "AccessControl", + "RawDocComment" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "hydrateModel", + "printedName": "hydrateModel(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "Dictionary", + "printedName": "[Swift.String : Any]", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + }, + { + "kind": "TypeNominal", + "name": "ProtocolComposition", + "printedName": "Any" + } + ], + "usr": "s:SD" + } + ], + "declKind": "Func", + "usr": "s:15OneSignalOSCore7OSModelC12hydrateModelyySDySSypGF", + "mangledName": "$s15OneSignalOSCore7OSModelC12hydrateModelyySDySSypGF", + "moduleName": "OneSignalOSCore", + "isOpen": true, + "declAttributes": [ + "AccessControl" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Constructor", + "name": "init", + "printedName": "init()", + "children": [ + { + "kind": "TypeNominal", + "name": "OSModel", + "printedName": "OneSignalOSCore.OSModel", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSModel" + } + ], + "declKind": "Constructor", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSModel(im)init", + "mangledName": "$s15OneSignalOSCore7OSModelCACycfc", + "moduleName": "OneSignalOSCore", + "overriding": true, + "implicit": true, + "objc_name": "init", + "declAttributes": [ + "Dynamic", + "ObjC", + "Override" + ], + "init_kind": "Designated" + } + ], + "declKind": "Class", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSModel", + "mangledName": "$s15OneSignalOSCore7OSModelC", + "moduleName": "OneSignalOSCore", + "isOpen": true, + "declAttributes": [ + "AccessControl", + "ObjC" + ], + "superclassUsr": "c:objc(cs)NSObject", + "superclassNames": [ + "ObjectiveC.NSObject" + ], + "conformances": [ + { + "kind": "Conformance", + "name": "Equatable", + "printedName": "Equatable", + "usr": "s:SQ", + "mangledName": "$sSQ" + }, + { + "kind": "Conformance", + "name": "Hashable", + "printedName": "Hashable", + "usr": "s:SH", + "mangledName": "$sSH" + }, + { + "kind": "Conformance", + "name": "CVarArg", + "printedName": "CVarArg", + "usr": "s:s7CVarArgP", + "mangledName": "$ss7CVarArgP" + }, + { + "kind": "Conformance", + "name": "_KeyValueCodingAndObservingPublishing", + "printedName": "_KeyValueCodingAndObservingPublishing", + "usr": "s:10Foundation37_KeyValueCodingAndObservingPublishingP", + "mangledName": "$s10Foundation37_KeyValueCodingAndObservingPublishingP" + }, + { + "kind": "Conformance", + "name": "_KeyValueCodingAndObserving", + "printedName": "_KeyValueCodingAndObserving", + "usr": "s:10Foundation27_KeyValueCodingAndObservingP", + "mangledName": "$s10Foundation27_KeyValueCodingAndObservingP" + }, + { + "kind": "Conformance", + "name": "CustomStringConvertible", + "printedName": "CustomStringConvertible", + "usr": "s:s23CustomStringConvertibleP", + "mangledName": "$ss23CustomStringConvertibleP" + }, + { + "kind": "Conformance", + "name": "CustomDebugStringConvertible", + "printedName": "CustomDebugStringConvertible", + "usr": "s:s28CustomDebugStringConvertibleP", + "mangledName": "$ss28CustomDebugStringConvertibleP" + } + ] + }, + { + "kind": "Import", + "name": "Foundation", + "printedName": "Foundation", + "declKind": "Import", + "moduleName": "OneSignalOSCore", + "declAttributes": [ + "RawDocComment" + ] + }, + { + "kind": "Import", + "name": "OneSignalCore", + "printedName": "OneSignalCore", + "declKind": "Import", + "moduleName": "OneSignalOSCore" + }, + { + "kind": "TypeDecl", + "name": "OSBackgroundTaskHandler", + "printedName": "OSBackgroundTaskHandler", + "children": [ + { + "kind": "Function", + "name": "beginBackgroundTask", + "printedName": "beginBackgroundTask(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Func", + "usr": "c:@M@OneSignalOSCore@objc(pl)OSBackgroundTaskHandler(im)beginBackgroundTask:", + "mangledName": "$s15OneSignalOSCore23OSBackgroundTaskHandlerP015beginBackgroundE0yySSF", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalOSCore.OSBackgroundTaskHandler>", + "sugared_genericSig": "", + "protocolReq": true, + "declAttributes": [ + "ObjC" + ], + "reqNewWitnessTableEntry": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "endBackgroundTask", + "printedName": "endBackgroundTask(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Func", + "usr": "c:@M@OneSignalOSCore@objc(pl)OSBackgroundTaskHandler(im)endBackgroundTask:", + "mangledName": "$s15OneSignalOSCore23OSBackgroundTaskHandlerP013endBackgroundE0yySSF", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalOSCore.OSBackgroundTaskHandler>", + "sugared_genericSig": "", + "protocolReq": true, + "declAttributes": [ + "ObjC" + ], + "reqNewWitnessTableEntry": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "setTaskInvalid", + "printedName": "setTaskInvalid(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Func", + "usr": "c:@M@OneSignalOSCore@objc(pl)OSBackgroundTaskHandler(im)setTaskInvalid:", + "mangledName": "$s15OneSignalOSCore23OSBackgroundTaskHandlerP03setE7InvalidyySSF", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalOSCore.OSBackgroundTaskHandler>", + "sugared_genericSig": "", + "protocolReq": true, + "declAttributes": [ + "ObjC" + ], + "reqNewWitnessTableEntry": true, + "funcSelfKind": "NonMutating" + } + ], + "declKind": "Protocol", + "usr": "c:@M@OneSignalOSCore@objc(pl)OSBackgroundTaskHandler", + "mangledName": "$s15OneSignalOSCore23OSBackgroundTaskHandlerP", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0 : AnyObject>", + "sugared_genericSig": "", + "declAttributes": [ + "AccessControl", + "ObjC" + ] + }, + { + "kind": "TypeDecl", + "name": "OSBackgroundTaskManager", + "printedName": "OSBackgroundTaskManager", + "children": [ + { + "kind": "Var", + "name": "taskHandler", + "printedName": "taskHandler", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "OneSignalOSCore.OSBackgroundTaskHandler?", + "children": [ + { + "kind": "TypeNominal", + "name": "OSBackgroundTaskHandler", + "printedName": "OneSignalOSCore.OSBackgroundTaskHandler", + "usr": "c:@M@OneSignalOSCore@objc(pl)OSBackgroundTaskHandler" + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Var", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSBackgroundTaskManager(cpy)taskHandler", + "mangledName": "$s15OneSignalOSCore23OSBackgroundTaskManagerC11taskHandlerAA0deH0_pSgvpZ", + "moduleName": "OneSignalOSCore", + "static": true, + "declAttributes": [ + "HasInitialValue", + "Final", + "HasStorage", + "AccessControl", + "ObjC" + ], + "hasStorage": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "OneSignalOSCore.OSBackgroundTaskHandler?", + "children": [ + { + "kind": "TypeNominal", + "name": "OSBackgroundTaskHandler", + "printedName": "OneSignalOSCore.OSBackgroundTaskHandler", + "usr": "c:@M@OneSignalOSCore@objc(pl)OSBackgroundTaskHandler" + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Accessor", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSBackgroundTaskManager(cm)taskHandler", + "mangledName": "$s15OneSignalOSCore23OSBackgroundTaskManagerC11taskHandlerAA0deH0_pSgvgZ", + "moduleName": "OneSignalOSCore", + "static": true, + "implicit": true, + "declAttributes": [ + "Final", + "ObjC" + ], + "accessorKind": "get" + }, + { + "kind": "Accessor", + "name": "Set", + "printedName": "Set()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "OneSignalOSCore.OSBackgroundTaskHandler?", + "children": [ + { + "kind": "TypeNominal", + "name": "OSBackgroundTaskHandler", + "printedName": "OneSignalOSCore.OSBackgroundTaskHandler", + "usr": "c:@M@OneSignalOSCore@objc(pl)OSBackgroundTaskHandler" + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Accessor", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSBackgroundTaskManager(cm)setTaskHandler:", + "mangledName": "$s15OneSignalOSCore23OSBackgroundTaskManagerC11taskHandlerAA0deH0_pSgvsZ", + "moduleName": "OneSignalOSCore", + "static": true, + "implicit": true, + "declAttributes": [ + "Final", + "ObjC" + ], + "accessorKind": "set" + }, + { + "kind": "Accessor", + "name": "Modify", + "printedName": "Modify()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + } + ], + "declKind": "Accessor", + "usr": "s:15OneSignalOSCore23OSBackgroundTaskManagerC11taskHandlerAA0deH0_pSgvMZ", + "mangledName": "$s15OneSignalOSCore23OSBackgroundTaskManagerC11taskHandlerAA0deH0_pSgvMZ", + "moduleName": "OneSignalOSCore", + "static": true, + "implicit": true, + "declAttributes": [ + "Final" + ], + "accessorKind": "_modify" + } + ] + }, + { + "kind": "Function", + "name": "beginBackgroundTask", + "printedName": "beginBackgroundTask(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Func", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSBackgroundTaskManager(cm)beginBackgroundTask:", + "mangledName": "$s15OneSignalOSCore23OSBackgroundTaskManagerC015beginBackgroundE0yySSFZ", + "moduleName": "OneSignalOSCore", + "static": true, + "declAttributes": [ + "Final", + "AccessControl", + "ObjC" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "endBackgroundTask", + "printedName": "endBackgroundTask(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Func", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSBackgroundTaskManager(cm)endBackgroundTask:", + "mangledName": "$s15OneSignalOSCore23OSBackgroundTaskManagerC013endBackgroundE0yySSFZ", + "moduleName": "OneSignalOSCore", + "static": true, + "declAttributes": [ + "Final", + "AccessControl", + "ObjC" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "setTaskInvalid", + "printedName": "setTaskInvalid(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Func", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSBackgroundTaskManager(cm)setTaskInvalid:", + "mangledName": "$s15OneSignalOSCore23OSBackgroundTaskManagerC03setE7InvalidyySSFZ", + "moduleName": "OneSignalOSCore", + "static": true, + "declAttributes": [ + "Final", + "AccessControl", + "ObjC" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Constructor", + "name": "init", + "printedName": "init()", + "children": [ + { + "kind": "TypeNominal", + "name": "OSBackgroundTaskManager", + "printedName": "OneSignalOSCore.OSBackgroundTaskManager", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSBackgroundTaskManager" + } + ], + "declKind": "Constructor", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSBackgroundTaskManager(im)init", + "mangledName": "$s15OneSignalOSCore23OSBackgroundTaskManagerCACycfc", + "moduleName": "OneSignalOSCore", + "overriding": true, + "implicit": true, + "objc_name": "init", + "declAttributes": [ + "Dynamic", + "ObjC", + "Override" + ], + "init_kind": "Designated" + } + ], + "declKind": "Class", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSBackgroundTaskManager", + "mangledName": "$s15OneSignalOSCore23OSBackgroundTaskManagerC", + "moduleName": "OneSignalOSCore", + "declAttributes": [ + "AccessControl", + "ObjC", + "RawDocComment" + ], + "superclassUsr": "c:objc(cs)NSObject", + "inheritsConvenienceInitializers": true, + "superclassNames": [ + "ObjectiveC.NSObject" + ], + "conformances": [ + { + "kind": "Conformance", + "name": "Equatable", + "printedName": "Equatable", + "usr": "s:SQ", + "mangledName": "$sSQ" + }, + { + "kind": "Conformance", + "name": "Hashable", + "printedName": "Hashable", + "usr": "s:SH", + "mangledName": "$sSH" + }, + { + "kind": "Conformance", + "name": "CVarArg", + "printedName": "CVarArg", + "usr": "s:s7CVarArgP", + "mangledName": "$ss7CVarArgP" + }, + { + "kind": "Conformance", + "name": "_KeyValueCodingAndObservingPublishing", + "printedName": "_KeyValueCodingAndObservingPublishing", + "usr": "s:10Foundation37_KeyValueCodingAndObservingPublishingP", + "mangledName": "$s10Foundation37_KeyValueCodingAndObservingPublishingP" + }, + { + "kind": "Conformance", + "name": "_KeyValueCodingAndObserving", + "printedName": "_KeyValueCodingAndObserving", + "usr": "s:10Foundation27_KeyValueCodingAndObservingP", + "mangledName": "$s10Foundation27_KeyValueCodingAndObservingP" + }, + { + "kind": "Conformance", + "name": "CustomStringConvertible", + "printedName": "CustomStringConvertible", + "usr": "s:s23CustomStringConvertibleP", + "mangledName": "$ss23CustomStringConvertibleP" + }, + { + "kind": "Conformance", + "name": "CustomDebugStringConvertible", + "printedName": "CustomDebugStringConvertible", + "usr": "s:s28CustomDebugStringConvertibleP", + "mangledName": "$ss28CustomDebugStringConvertibleP" + } + ] + }, + { + "kind": "Import", + "name": "Foundation", + "printedName": "Foundation", + "declKind": "Import", + "moduleName": "OneSignalOSCore", + "declAttributes": [ + "RawDocComment" + ] + }, + { + "kind": "Import", + "name": "OneSignalCore", + "printedName": "OneSignalCore", + "declKind": "Import", + "moduleName": "OneSignalOSCore" + }, + { + "kind": "TypeDecl", + "name": "OSModelStoreListener", + "printedName": "OSModelStoreListener", + "children": [ + { + "kind": "AssociatedType", + "name": "TModel", + "printedName": "TModel", + "declKind": "AssociatedType", + "usr": "s:15OneSignalOSCore20OSModelStoreListenerP6TModelQa", + "mangledName": "$s15OneSignalOSCore20OSModelStoreListenerP6TModelQa", + "moduleName": "OneSignalOSCore", + "protocolReq": true + }, + { + "kind": "Var", + "name": "store", + "printedName": "store", + "children": [ + { + "kind": "TypeNominal", + "name": "OSModelStore", + "printedName": "OneSignalOSCore.OSModelStore<τ_0_0.TModel>", + "children": [ + { + "kind": "TypeNominal", + "name": "DependentMember", + "printedName": "τ_0_0.TModel" + } + ], + "usr": "s:15OneSignalOSCore12OSModelStoreC" + } + ], + "declKind": "Var", + "usr": "s:15OneSignalOSCore20OSModelStoreListenerP5storeAA0dE0Cy6TModelQzGvp", + "mangledName": "$s15OneSignalOSCore20OSModelStoreListenerP5storeAA0dE0Cy6TModelQzGvp", + "moduleName": "OneSignalOSCore", + "protocolReq": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "OSModelStore", + "printedName": "OneSignalOSCore.OSModelStore<τ_0_0.TModel>", + "children": [ + { + "kind": "TypeNominal", + "name": "DependentMember", + "printedName": "τ_0_0.TModel" + } + ], + "usr": "s:15OneSignalOSCore12OSModelStoreC" + } + ], + "declKind": "Accessor", + "usr": "s:15OneSignalOSCore20OSModelStoreListenerP5storeAA0dE0Cy6TModelQzGvg", + "mangledName": "$s15OneSignalOSCore20OSModelStoreListenerP5storeAA0dE0Cy6TModelQzGvg", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalOSCore.OSModelStoreListener>", + "sugared_genericSig": "", + "protocolReq": true, + "reqNewWitnessTableEntry": true, + "accessorKind": "get" + } + ] + }, + { + "kind": "Constructor", + "name": "init", + "printedName": "init(store:)", + "children": [ + { + "kind": "TypeNominal", + "name": "GenericTypeParam", + "printedName": "τ_0_0" + }, + { + "kind": "TypeNominal", + "name": "OSModelStore", + "printedName": "OneSignalOSCore.OSModelStore<τ_0_0.TModel>", + "children": [ + { + "kind": "TypeNominal", + "name": "DependentMember", + "printedName": "τ_0_0.TModel" + } + ], + "usr": "s:15OneSignalOSCore12OSModelStoreC" + } + ], + "declKind": "Constructor", + "usr": "s:15OneSignalOSCore20OSModelStoreListenerP5storexAA0dE0Cy6TModelQzG_tcfc", + "mangledName": "$s15OneSignalOSCore20OSModelStoreListenerP5storexAA0dE0Cy6TModelQzG_tcfc", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalOSCore.OSModelStoreListener>", + "sugared_genericSig": "", + "protocolReq": true, + "reqNewWitnessTableEntry": true, + "init_kind": "Designated" + }, + { + "kind": "Function", + "name": "getAddModelDelta", + "printedName": "getAddModelDelta(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "OneSignalOSCore.OSDelta?", + "children": [ + { + "kind": "TypeNominal", + "name": "OSDelta", + "printedName": "OneSignalOSCore.OSDelta", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSDelta" + } + ], + "usr": "s:Sq" + }, + { + "kind": "TypeNominal", + "name": "DependentMember", + "printedName": "τ_0_0.TModel" + } + ], + "declKind": "Func", + "usr": "s:15OneSignalOSCore20OSModelStoreListenerP16getAddModelDeltayAA7OSDeltaCSg6TModelQzF", + "mangledName": "$s15OneSignalOSCore20OSModelStoreListenerP16getAddModelDeltayAA7OSDeltaCSg6TModelQzF", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalOSCore.OSModelStoreListener>", + "sugared_genericSig": "", + "protocolReq": true, + "reqNewWitnessTableEntry": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "getRemoveModelDelta", + "printedName": "getRemoveModelDelta(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "OneSignalOSCore.OSDelta?", + "children": [ + { + "kind": "TypeNominal", + "name": "OSDelta", + "printedName": "OneSignalOSCore.OSDelta", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSDelta" + } + ], + "usr": "s:Sq" + }, + { + "kind": "TypeNominal", + "name": "DependentMember", + "printedName": "τ_0_0.TModel" + } + ], + "declKind": "Func", + "usr": "s:15OneSignalOSCore20OSModelStoreListenerP19getRemoveModelDeltayAA7OSDeltaCSg6TModelQzF", + "mangledName": "$s15OneSignalOSCore20OSModelStoreListenerP19getRemoveModelDeltayAA7OSDeltaCSg6TModelQzF", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalOSCore.OSModelStoreListener>", + "sugared_genericSig": "", + "protocolReq": true, + "reqNewWitnessTableEntry": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "getUpdateModelDelta", + "printedName": "getUpdateModelDelta(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "OneSignalOSCore.OSDelta?", + "children": [ + { + "kind": "TypeNominal", + "name": "OSDelta", + "printedName": "OneSignalOSCore.OSDelta", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSDelta" + } + ], + "usr": "s:Sq" + }, + { + "kind": "TypeNominal", + "name": "OSModelChangedArgs", + "printedName": "OneSignalOSCore.OSModelChangedArgs", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSModelChangedArgs" + } + ], + "declKind": "Func", + "usr": "s:15OneSignalOSCore20OSModelStoreListenerP19getUpdateModelDeltayAA7OSDeltaCSgAA0D11ChangedArgsCF", + "mangledName": "$s15OneSignalOSCore20OSModelStoreListenerP19getUpdateModelDeltayAA7OSDeltaCSgAA0D11ChangedArgsCF", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalOSCore.OSModelStoreListener>", + "sugared_genericSig": "", + "protocolReq": true, + "reqNewWitnessTableEntry": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "start", + "printedName": "start()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + } + ], + "declKind": "Func", + "usr": "s:15OneSignalOSCore20OSModelStoreListenerPAAE5startyyF", + "mangledName": "$s15OneSignalOSCore20OSModelStoreListenerPAAE5startyyF", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalOSCore.OSModelStoreListener>", + "sugared_genericSig": "", + "declAttributes": [ + "AccessControl" + ], + "isFromExtension": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "onAdded", + "printedName": "onAdded(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "OSModel", + "printedName": "OneSignalOSCore.OSModel", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSModel" + } + ], + "declKind": "Func", + "usr": "s:15OneSignalOSCore20OSModelStoreListenerPAAE7onAddedyyAA0D0CF", + "mangledName": "$s15OneSignalOSCore20OSModelStoreListenerPAAE7onAddedyyAA0D0CF", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalOSCore.OSModelStoreListener>", + "sugared_genericSig": "", + "declAttributes": [ + "AccessControl" + ], + "isFromExtension": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "onUpdated", + "printedName": "onUpdated(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "OSModelChangedArgs", + "printedName": "OneSignalOSCore.OSModelChangedArgs", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSModelChangedArgs" + } + ], + "declKind": "Func", + "usr": "s:15OneSignalOSCore20OSModelStoreListenerPAAE9onUpdatedyyAA0D11ChangedArgsCF", + "mangledName": "$s15OneSignalOSCore20OSModelStoreListenerPAAE9onUpdatedyyAA0D11ChangedArgsCF", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalOSCore.OSModelStoreListener>", + "sugared_genericSig": "", + "declAttributes": [ + "AccessControl" + ], + "isFromExtension": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "onRemoved", + "printedName": "onRemoved(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "OSModel", + "printedName": "OneSignalOSCore.OSModel", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSModel" + } + ], + "declKind": "Func", + "usr": "s:15OneSignalOSCore20OSModelStoreListenerPAAE9onRemovedyyAA0D0CF", + "mangledName": "$s15OneSignalOSCore20OSModelStoreListenerPAAE9onRemovedyyAA0D0CF", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalOSCore.OSModelStoreListener>", + "sugared_genericSig": "", + "declAttributes": [ + "AccessControl" + ], + "isFromExtension": true, + "funcSelfKind": "NonMutating" + } + ], + "declKind": "Protocol", + "usr": "s:15OneSignalOSCore20OSModelStoreListenerP", + "mangledName": "$s15OneSignalOSCore20OSModelStoreListenerP", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0 : OneSignalOSCore.OSModelStoreChangedHandler, τ_0_0.TModel : OneSignalOSCore.OSModel>", + "sugared_genericSig": "", + "declAttributes": [ + "AccessControl" + ], + "conformances": [ + { + "kind": "Conformance", + "name": "OSModelStoreChangedHandler", + "printedName": "OSModelStoreChangedHandler", + "usr": "s:15OneSignalOSCore26OSModelStoreChangedHandlerP", + "mangledName": "$s15OneSignalOSCore26OSModelStoreChangedHandlerP" + } + ] + }, + { + "kind": "Import", + "name": "Foundation", + "printedName": "Foundation", + "declKind": "Import", + "moduleName": "OneSignalOSCore", + "declAttributes": [ + "RawDocComment" + ] + }, + { + "kind": "TypeDecl", + "name": "OSModelStoreChangedHandler", + "printedName": "OSModelStoreChangedHandler", + "children": [ + { + "kind": "Function", + "name": "onAdded", + "printedName": "onAdded(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "OSModel", + "printedName": "OneSignalOSCore.OSModel", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSModel" + } + ], + "declKind": "Func", + "usr": "s:15OneSignalOSCore26OSModelStoreChangedHandlerP7onAddedyyAA0D0CF", + "mangledName": "$s15OneSignalOSCore26OSModelStoreChangedHandlerP7onAddedyyAA0D0CF", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalOSCore.OSModelStoreChangedHandler>", + "sugared_genericSig": "", + "protocolReq": true, + "declAttributes": [ + "RawDocComment" + ], + "reqNewWitnessTableEntry": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "onUpdated", + "printedName": "onUpdated(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "OSModelChangedArgs", + "printedName": "OneSignalOSCore.OSModelChangedArgs", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSModelChangedArgs" + } + ], + "declKind": "Func", + "usr": "s:15OneSignalOSCore26OSModelStoreChangedHandlerP9onUpdatedyyAA0dF4ArgsCF", + "mangledName": "$s15OneSignalOSCore26OSModelStoreChangedHandlerP9onUpdatedyyAA0dF4ArgsCF", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalOSCore.OSModelStoreChangedHandler>", + "sugared_genericSig": "", + "protocolReq": true, + "declAttributes": [ + "RawDocComment" + ], + "reqNewWitnessTableEntry": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "onRemoved", + "printedName": "onRemoved(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "OSModel", + "printedName": "OneSignalOSCore.OSModel", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSModel" + } + ], + "declKind": "Func", + "usr": "s:15OneSignalOSCore26OSModelStoreChangedHandlerP9onRemovedyyAA0D0CF", + "mangledName": "$s15OneSignalOSCore26OSModelStoreChangedHandlerP9onRemovedyyAA0D0CF", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalOSCore.OSModelStoreChangedHandler>", + "sugared_genericSig": "", + "protocolReq": true, + "declAttributes": [ + "RawDocComment" + ], + "reqNewWitnessTableEntry": true, + "funcSelfKind": "NonMutating" + } + ], + "declKind": "Protocol", + "usr": "s:15OneSignalOSCore26OSModelStoreChangedHandlerP", + "mangledName": "$s15OneSignalOSCore26OSModelStoreChangedHandlerP", + "moduleName": "OneSignalOSCore", + "declAttributes": [ + "AccessControl", + "RawDocComment" + ] + }, + { + "kind": "Import", + "name": "Foundation", + "printedName": "Foundation", + "declKind": "Import", + "moduleName": "OneSignalOSCore", + "declAttributes": [ + "RawDocComment" + ] + }, + { + "kind": "TypeDecl", + "name": "OSDelta", + "printedName": "OSDelta", + "children": [ + { + "kind": "Var", + "name": "name", + "printedName": "name", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Var", + "usr": "s:15OneSignalOSCore7OSDeltaC4nameSSvp", + "mangledName": "$s15OneSignalOSCore7OSDeltaC4nameSSvp", + "moduleName": "OneSignalOSCore", + "declAttributes": [ + "Final", + "HasStorage", + "AccessControl" + ], + "isLet": true, + "hasStorage": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Accessor", + "usr": "s:15OneSignalOSCore7OSDeltaC4nameSSvg", + "mangledName": "$s15OneSignalOSCore7OSDeltaC4nameSSvg", + "moduleName": "OneSignalOSCore", + "implicit": true, + "declAttributes": [ + "Final" + ], + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "deltaId", + "printedName": "deltaId", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Var", + "usr": "s:15OneSignalOSCore7OSDeltaC7deltaIdSSvp", + "mangledName": "$s15OneSignalOSCore7OSDeltaC7deltaIdSSvp", + "moduleName": "OneSignalOSCore", + "declAttributes": [ + "Final", + "HasStorage", + "AccessControl" + ], + "isLet": true, + "hasStorage": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Accessor", + "usr": "s:15OneSignalOSCore7OSDeltaC7deltaIdSSvg", + "mangledName": "$s15OneSignalOSCore7OSDeltaC7deltaIdSSvg", + "moduleName": "OneSignalOSCore", + "implicit": true, + "declAttributes": [ + "Final" + ], + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "timestamp", + "printedName": "timestamp", + "children": [ + { + "kind": "TypeNominal", + "name": "Date", + "printedName": "Foundation.Date", + "usr": "s:10Foundation4DateV" + } + ], + "declKind": "Var", + "usr": "s:15OneSignalOSCore7OSDeltaC9timestamp10Foundation4DateVvp", + "mangledName": "$s15OneSignalOSCore7OSDeltaC9timestamp10Foundation4DateVvp", + "moduleName": "OneSignalOSCore", + "declAttributes": [ + "Final", + "HasStorage", + "AccessControl" + ], + "isLet": true, + "hasStorage": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "Date", + "printedName": "Foundation.Date", + "usr": "s:10Foundation4DateV" + } + ], + "declKind": "Accessor", + "usr": "s:15OneSignalOSCore7OSDeltaC9timestamp10Foundation4DateVvg", + "mangledName": "$s15OneSignalOSCore7OSDeltaC9timestamp10Foundation4DateVvg", + "moduleName": "OneSignalOSCore", + "implicit": true, + "declAttributes": [ + "Final" + ], + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "model", + "printedName": "model", + "children": [ + { + "kind": "TypeNominal", + "name": "OSModel", + "printedName": "OneSignalOSCore.OSModel", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSModel" + } + ], + "declKind": "Var", + "usr": "s:15OneSignalOSCore7OSDeltaC5modelAA7OSModelCvp", + "mangledName": "$s15OneSignalOSCore7OSDeltaC5modelAA7OSModelCvp", + "moduleName": "OneSignalOSCore", + "declAttributes": [ + "HasStorage", + "AccessControl" + ], + "hasStorage": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "OSModel", + "printedName": "OneSignalOSCore.OSModel", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSModel" + } + ], + "declKind": "Accessor", + "usr": "s:15OneSignalOSCore7OSDeltaC5modelAA7OSModelCvg", + "mangledName": "$s15OneSignalOSCore7OSDeltaC5modelAA7OSModelCvg", + "moduleName": "OneSignalOSCore", + "implicit": true, + "accessorKind": "get" + }, + { + "kind": "Accessor", + "name": "Set", + "printedName": "Set()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "OSModel", + "printedName": "OneSignalOSCore.OSModel", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSModel" + } + ], + "declKind": "Accessor", + "usr": "s:15OneSignalOSCore7OSDeltaC5modelAA7OSModelCvs", + "mangledName": "$s15OneSignalOSCore7OSDeltaC5modelAA7OSModelCvs", + "moduleName": "OneSignalOSCore", + "implicit": true, + "accessorKind": "set" + }, + { + "kind": "Accessor", + "name": "Modify", + "printedName": "Modify()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + } + ], + "declKind": "Accessor", + "usr": "s:15OneSignalOSCore7OSDeltaC5modelAA7OSModelCvM", + "mangledName": "$s15OneSignalOSCore7OSDeltaC5modelAA7OSModelCvM", + "moduleName": "OneSignalOSCore", + "implicit": true, + "accessorKind": "_modify" + } + ] + }, + { + "kind": "Var", + "name": "property", + "printedName": "property", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Var", + "usr": "s:15OneSignalOSCore7OSDeltaC8propertySSvp", + "mangledName": "$s15OneSignalOSCore7OSDeltaC8propertySSvp", + "moduleName": "OneSignalOSCore", + "declAttributes": [ + "Final", + "HasStorage", + "AccessControl" + ], + "isLet": true, + "hasStorage": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Accessor", + "usr": "s:15OneSignalOSCore7OSDeltaC8propertySSvg", + "mangledName": "$s15OneSignalOSCore7OSDeltaC8propertySSvg", + "moduleName": "OneSignalOSCore", + "implicit": true, + "declAttributes": [ + "Final" + ], + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "value", + "printedName": "value", + "children": [ + { + "kind": "TypeNominal", + "name": "ProtocolComposition", + "printedName": "Any" + } + ], + "declKind": "Var", + "usr": "s:15OneSignalOSCore7OSDeltaC5valueypvp", + "mangledName": "$s15OneSignalOSCore7OSDeltaC5valueypvp", + "moduleName": "OneSignalOSCore", + "declAttributes": [ + "Final", + "HasStorage", + "AccessControl" + ], + "isLet": true, + "hasStorage": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "ProtocolComposition", + "printedName": "Any" + } + ], + "declKind": "Accessor", + "usr": "s:15OneSignalOSCore7OSDeltaC5valueypvg", + "mangledName": "$s15OneSignalOSCore7OSDeltaC5valueypvg", + "moduleName": "OneSignalOSCore", + "implicit": true, + "declAttributes": [ + "Final" + ], + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "description", + "printedName": "description", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Var", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSDelta(py)description", + "mangledName": "$s15OneSignalOSCore7OSDeltaC11descriptionSSvp", + "moduleName": "OneSignalOSCore", + "overriding": true, + "isOpen": true, + "objc_name": "description", + "declAttributes": [ + "Dynamic", + "ObjC", + "AccessControl", + "Override" + ], + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Accessor", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSDelta(im)description", + "mangledName": "$s15OneSignalOSCore7OSDeltaC11descriptionSSvg", + "moduleName": "OneSignalOSCore", + "overriding": true, + "isOpen": true, + "objc_name": "description", + "declAttributes": [ + "Dynamic", + "ObjC" + ], + "accessorKind": "get" + } + ] + }, + { + "kind": "Constructor", + "name": "init", + "printedName": "init(name:model:property:value:)", + "children": [ + { + "kind": "TypeNominal", + "name": "OSDelta", + "printedName": "OneSignalOSCore.OSDelta", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSDelta" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + }, + { + "kind": "TypeNominal", + "name": "OSModel", + "printedName": "OneSignalOSCore.OSModel", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSModel" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + }, + { + "kind": "TypeNominal", + "name": "ProtocolComposition", + "printedName": "Any" + } + ], + "declKind": "Constructor", + "usr": "s:15OneSignalOSCore7OSDeltaC4name5model8property5valueACSS_AA7OSModelCSSyptcfc", + "mangledName": "$s15OneSignalOSCore7OSDeltaC4name5model8property5valueACSS_AA7OSModelCSSyptcfc", + "moduleName": "OneSignalOSCore", + "declAttributes": [ + "AccessControl" + ], + "init_kind": "Designated" + }, + { + "kind": "Function", + "name": "encode", + "printedName": "encode(with:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "NSCoder", + "printedName": "Foundation.NSCoder", + "usr": "c:objc(cs)NSCoder" + } + ], + "declKind": "Func", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSDelta(im)encodeWithCoder:", + "mangledName": "$s15OneSignalOSCore7OSDeltaC6encode4withySo7NSCoderC_tF", + "moduleName": "OneSignalOSCore", + "objc_name": "encodeWithCoder:", + "declAttributes": [ + "ObjC", + "AccessControl" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Constructor", + "name": "init", + "printedName": "init(coder:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "OneSignalOSCore.OSDelta?", + "children": [ + { + "kind": "TypeNominal", + "name": "OSDelta", + "printedName": "OneSignalOSCore.OSDelta", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSDelta" + } + ], + "usr": "s:Sq" + }, + { + "kind": "TypeNominal", + "name": "NSCoder", + "printedName": "Foundation.NSCoder", + "usr": "c:objc(cs)NSCoder" + } + ], + "declKind": "Constructor", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSDelta(im)initWithCoder:", + "mangledName": "$s15OneSignalOSCore7OSDeltaC5coderACSgSo7NSCoderC_tcfc", + "moduleName": "OneSignalOSCore", + "objc_name": "initWithCoder:", + "declAttributes": [ + "ObjC", + "Required", + "AccessControl" + ], + "init_kind": "Designated" + }, + { + "kind": "Constructor", + "name": "init", + "printedName": "init()", + "children": [ + { + "kind": "TypeNominal", + "name": "OSDelta", + "printedName": "OneSignalOSCore.OSDelta", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSDelta" + } + ], + "declKind": "Constructor", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSDelta(im)init", + "mangledName": "$s15OneSignalOSCore7OSDeltaCACycfc", + "moduleName": "OneSignalOSCore", + "overriding": true, + "implicit": true, + "objc_name": "init", + "declAttributes": [ + "Dynamic", + "ObjC", + "Override" + ], + "init_kind": "Designated" + } + ], + "declKind": "Class", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSDelta", + "mangledName": "$s15OneSignalOSCore7OSDeltaC", + "moduleName": "OneSignalOSCore", + "isOpen": true, + "declAttributes": [ + "AccessControl", + "RawDocComment", + "ObjC" + ], + "superclassUsr": "c:objc(cs)NSObject", + "superclassNames": [ + "ObjectiveC.NSObject" + ], + "conformances": [ + { + "kind": "Conformance", + "name": "Equatable", + "printedName": "Equatable", + "usr": "s:SQ", + "mangledName": "$sSQ" + }, + { + "kind": "Conformance", + "name": "Hashable", + "printedName": "Hashable", + "usr": "s:SH", + "mangledName": "$sSH" + }, + { + "kind": "Conformance", + "name": "CVarArg", + "printedName": "CVarArg", + "usr": "s:s7CVarArgP", + "mangledName": "$ss7CVarArgP" + }, + { + "kind": "Conformance", + "name": "_KeyValueCodingAndObservingPublishing", + "printedName": "_KeyValueCodingAndObservingPublishing", + "usr": "s:10Foundation37_KeyValueCodingAndObservingPublishingP", + "mangledName": "$s10Foundation37_KeyValueCodingAndObservingPublishingP" + }, + { + "kind": "Conformance", + "name": "_KeyValueCodingAndObserving", + "printedName": "_KeyValueCodingAndObserving", + "usr": "s:10Foundation27_KeyValueCodingAndObservingP", + "mangledName": "$s10Foundation27_KeyValueCodingAndObservingP" + }, + { + "kind": "Conformance", + "name": "CustomStringConvertible", + "printedName": "CustomStringConvertible", + "usr": "s:s23CustomStringConvertibleP", + "mangledName": "$ss23CustomStringConvertibleP" + }, + { + "kind": "Conformance", + "name": "CustomDebugStringConvertible", + "printedName": "CustomDebugStringConvertible", + "usr": "s:s28CustomDebugStringConvertibleP", + "mangledName": "$ss28CustomDebugStringConvertibleP" + } + ] + }, + { + "kind": "Import", + "name": "Foundation", + "printedName": "Foundation", + "declKind": "Import", + "moduleName": "OneSignalOSCore", + "declAttributes": [ + "RawDocComment" + ] + }, + { + "kind": "TypeDecl", + "name": "OSModelChangedArgs", + "printedName": "OSModelChangedArgs", + "children": [ + { + "kind": "Var", + "name": "model", + "printedName": "model", + "children": [ + { + "kind": "TypeNominal", + "name": "OSModel", + "printedName": "OneSignalOSCore.OSModel", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSModel" + } + ], + "declKind": "Var", + "usr": "s:15OneSignalOSCore18OSModelChangedArgsC5modelAA0D0Cvp", + "mangledName": "$s15OneSignalOSCore18OSModelChangedArgsC5modelAA0D0Cvp", + "moduleName": "OneSignalOSCore", + "declAttributes": [ + "Final", + "HasStorage", + "AccessControl", + "RawDocComment" + ], + "isLet": true, + "hasStorage": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "OSModel", + "printedName": "OneSignalOSCore.OSModel", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSModel" + } + ], + "declKind": "Accessor", + "usr": "s:15OneSignalOSCore18OSModelChangedArgsC5modelAA0D0Cvg", + "mangledName": "$s15OneSignalOSCore18OSModelChangedArgsC5modelAA0D0Cvg", + "moduleName": "OneSignalOSCore", + "implicit": true, + "declAttributes": [ + "Final" + ], + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "property", + "printedName": "property", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Var", + "usr": "s:15OneSignalOSCore18OSModelChangedArgsC8propertySSvp", + "mangledName": "$s15OneSignalOSCore18OSModelChangedArgsC8propertySSvp", + "moduleName": "OneSignalOSCore", + "declAttributes": [ + "Final", + "HasStorage", + "AccessControl", + "RawDocComment" + ], + "isLet": true, + "hasStorage": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Accessor", + "usr": "s:15OneSignalOSCore18OSModelChangedArgsC8propertySSvg", + "mangledName": "$s15OneSignalOSCore18OSModelChangedArgsC8propertySSvg", + "moduleName": "OneSignalOSCore", + "implicit": true, + "declAttributes": [ + "Final" + ], + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "newValue", + "printedName": "newValue", + "children": [ + { + "kind": "TypeNominal", + "name": "ProtocolComposition", + "printedName": "Any" + } + ], + "declKind": "Var", + "usr": "s:15OneSignalOSCore18OSModelChangedArgsC8newValueypvp", + "mangledName": "$s15OneSignalOSCore18OSModelChangedArgsC8newValueypvp", + "moduleName": "OneSignalOSCore", + "declAttributes": [ + "Final", + "HasStorage", + "AccessControl", + "RawDocComment" + ], + "isLet": true, + "hasStorage": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "ProtocolComposition", + "printedName": "Any" + } + ], + "declKind": "Accessor", + "usr": "s:15OneSignalOSCore18OSModelChangedArgsC8newValueypvg", + "mangledName": "$s15OneSignalOSCore18OSModelChangedArgsC8newValueypvg", + "moduleName": "OneSignalOSCore", + "implicit": true, + "declAttributes": [ + "Final" + ], + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "description", + "printedName": "description", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Var", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSModelChangedArgs(py)description", + "mangledName": "$s15OneSignalOSCore18OSModelChangedArgsC11descriptionSSvp", + "moduleName": "OneSignalOSCore", + "overriding": true, + "objc_name": "description", + "declAttributes": [ + "Dynamic", + "ObjC", + "AccessControl", + "Override" + ], + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Accessor", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSModelChangedArgs(im)description", + "mangledName": "$s15OneSignalOSCore18OSModelChangedArgsC11descriptionSSvg", + "moduleName": "OneSignalOSCore", + "overriding": true, + "objc_name": "description", + "declAttributes": [ + "Dynamic", + "ObjC" + ], + "accessorKind": "get" + } + ] + }, + { + "kind": "Constructor", + "name": "init", + "printedName": "init()", + "children": [ + { + "kind": "TypeNominal", + "name": "OSModelChangedArgs", + "printedName": "OneSignalOSCore.OSModelChangedArgs", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSModelChangedArgs" + } + ], + "declKind": "Constructor", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSModelChangedArgs(im)init", + "mangledName": "$s15OneSignalOSCore18OSModelChangedArgsCACycfc", + "moduleName": "OneSignalOSCore", + "overriding": true, + "implicit": true, + "objc_name": "init", + "declAttributes": [ + "Dynamic", + "ObjC", + "Override" + ], + "init_kind": "Designated" + } + ], + "declKind": "Class", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSModelChangedArgs", + "mangledName": "$s15OneSignalOSCore18OSModelChangedArgsC", + "moduleName": "OneSignalOSCore", + "declAttributes": [ + "AccessControl", + "ObjC" + ], + "superclassUsr": "c:objc(cs)NSObject", + "hasMissingDesignatedInitializers": true, + "superclassNames": [ + "ObjectiveC.NSObject" + ], + "conformances": [ + { + "kind": "Conformance", + "name": "Equatable", + "printedName": "Equatable", + "usr": "s:SQ", + "mangledName": "$sSQ" + }, + { + "kind": "Conformance", + "name": "Hashable", + "printedName": "Hashable", + "usr": "s:SH", + "mangledName": "$sSH" + }, + { + "kind": "Conformance", + "name": "CVarArg", + "printedName": "CVarArg", + "usr": "s:s7CVarArgP", + "mangledName": "$ss7CVarArgP" + }, + { + "kind": "Conformance", + "name": "_KeyValueCodingAndObservingPublishing", + "printedName": "_KeyValueCodingAndObservingPublishing", + "usr": "s:10Foundation37_KeyValueCodingAndObservingPublishingP", + "mangledName": "$s10Foundation37_KeyValueCodingAndObservingPublishingP" + }, + { + "kind": "Conformance", + "name": "_KeyValueCodingAndObserving", + "printedName": "_KeyValueCodingAndObserving", + "usr": "s:10Foundation27_KeyValueCodingAndObservingP", + "mangledName": "$s10Foundation27_KeyValueCodingAndObservingP" + }, + { + "kind": "Conformance", + "name": "CustomStringConvertible", + "printedName": "CustomStringConvertible", + "usr": "s:s23CustomStringConvertibleP", + "mangledName": "$ss23CustomStringConvertibleP" + }, + { + "kind": "Conformance", + "name": "CustomDebugStringConvertible", + "printedName": "CustomDebugStringConvertible", + "usr": "s:s28CustomDebugStringConvertibleP", + "mangledName": "$ss28CustomDebugStringConvertibleP" + } + ] + }, + { + "kind": "TypeDecl", + "name": "OSModelChangedHandler", + "printedName": "OSModelChangedHandler", + "children": [ + { + "kind": "Function", + "name": "onModelUpdated", + "printedName": "onModelUpdated(args:hydrating:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "OSModelChangedArgs", + "printedName": "OneSignalOSCore.OSModelChangedArgs", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSModelChangedArgs" + }, + { + "kind": "TypeNominal", + "name": "Bool", + "printedName": "Swift.Bool", + "usr": "s:Sb" + } + ], + "declKind": "Func", + "usr": "s:15OneSignalOSCore21OSModelChangedHandlerP14onModelUpdated4args9hydratingyAA0dE4ArgsC_SbtF", + "mangledName": "$s15OneSignalOSCore21OSModelChangedHandlerP14onModelUpdated4args9hydratingyAA0dE4ArgsC_SbtF", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalOSCore.OSModelChangedHandler>", + "sugared_genericSig": "", + "protocolReq": true, + "reqNewWitnessTableEntry": true, + "funcSelfKind": "NonMutating" + } + ], + "declKind": "Protocol", + "usr": "s:15OneSignalOSCore21OSModelChangedHandlerP", + "mangledName": "$s15OneSignalOSCore21OSModelChangedHandlerP", + "moduleName": "OneSignalOSCore", + "declAttributes": [ + "AccessControl" + ] + }, + { + "kind": "Import", + "name": "OneSignalCore", + "printedName": "OneSignalCore", + "declKind": "Import", + "moduleName": "OneSignalOSCore", + "declAttributes": [ + "RawDocComment" + ] + }, + { + "kind": "TypeDecl", + "name": "OSOperationExecutor", + "printedName": "OSOperationExecutor", + "children": [ + { + "kind": "Var", + "name": "supportedDeltas", + "printedName": "supportedDeltas", + "children": [ + { + "kind": "TypeNominal", + "name": "Array", + "printedName": "[Swift.String]", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:Sa" + } + ], + "declKind": "Var", + "usr": "s:15OneSignalOSCore19OSOperationExecutorP15supportedDeltasSaySSGvp", + "mangledName": "$s15OneSignalOSCore19OSOperationExecutorP15supportedDeltasSaySSGvp", + "moduleName": "OneSignalOSCore", + "protocolReq": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "Array", + "printedName": "[Swift.String]", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:Sa" + } + ], + "declKind": "Accessor", + "usr": "s:15OneSignalOSCore19OSOperationExecutorP15supportedDeltasSaySSGvg", + "mangledName": "$s15OneSignalOSCore19OSOperationExecutorP15supportedDeltasSaySSGvg", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalOSCore.OSOperationExecutor>", + "sugared_genericSig": "", + "protocolReq": true, + "reqNewWitnessTableEntry": true, + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "deltaQueue", + "printedName": "deltaQueue", + "children": [ + { + "kind": "TypeNominal", + "name": "Array", + "printedName": "[OneSignalOSCore.OSDelta]", + "children": [ + { + "kind": "TypeNominal", + "name": "OSDelta", + "printedName": "OneSignalOSCore.OSDelta", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSDelta" + } + ], + "usr": "s:Sa" + } + ], + "declKind": "Var", + "usr": "s:15OneSignalOSCore19OSOperationExecutorP10deltaQueueSayAA7OSDeltaCGvp", + "mangledName": "$s15OneSignalOSCore19OSOperationExecutorP10deltaQueueSayAA7OSDeltaCGvp", + "moduleName": "OneSignalOSCore", + "protocolReq": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "Array", + "printedName": "[OneSignalOSCore.OSDelta]", + "children": [ + { + "kind": "TypeNominal", + "name": "OSDelta", + "printedName": "OneSignalOSCore.OSDelta", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSDelta" + } + ], + "usr": "s:Sa" + } + ], + "declKind": "Accessor", + "usr": "s:15OneSignalOSCore19OSOperationExecutorP10deltaQueueSayAA7OSDeltaCGvg", + "mangledName": "$s15OneSignalOSCore19OSOperationExecutorP10deltaQueueSayAA7OSDeltaCGvg", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalOSCore.OSOperationExecutor>", + "sugared_genericSig": "", + "protocolReq": true, + "reqNewWitnessTableEntry": true, + "accessorKind": "get" + } + ] + }, + { + "kind": "Function", + "name": "enqueueDelta", + "printedName": "enqueueDelta(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "OSDelta", + "printedName": "OneSignalOSCore.OSDelta", + "usr": "c:@M@OneSignalOSCore@objc(cs)OSDelta" + } + ], + "declKind": "Func", + "usr": "s:15OneSignalOSCore19OSOperationExecutorP12enqueueDeltayyAA7OSDeltaCF", + "mangledName": "$s15OneSignalOSCore19OSOperationExecutorP12enqueueDeltayyAA7OSDeltaCF", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalOSCore.OSOperationExecutor>", + "sugared_genericSig": "", + "protocolReq": true, + "reqNewWitnessTableEntry": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "cacheDeltaQueue", + "printedName": "cacheDeltaQueue()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + } + ], + "declKind": "Func", + "usr": "s:15OneSignalOSCore19OSOperationExecutorP15cacheDeltaQueueyyF", + "mangledName": "$s15OneSignalOSCore19OSOperationExecutorP15cacheDeltaQueueyyF", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalOSCore.OSOperationExecutor>", + "sugared_genericSig": "", + "protocolReq": true, + "reqNewWitnessTableEntry": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "processDeltaQueue", + "printedName": "processDeltaQueue(inBackground:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "Bool", + "printedName": "Swift.Bool", + "usr": "s:Sb" + } + ], + "declKind": "Func", + "usr": "s:15OneSignalOSCore19OSOperationExecutorP17processDeltaQueue12inBackgroundySb_tF", + "mangledName": "$s15OneSignalOSCore19OSOperationExecutorP17processDeltaQueue12inBackgroundySb_tF", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalOSCore.OSOperationExecutor>", + "sugared_genericSig": "", + "protocolReq": true, + "reqNewWitnessTableEntry": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "processRequestQueue", + "printedName": "processRequestQueue(inBackground:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "Bool", + "printedName": "Swift.Bool", + "usr": "s:Sb" + } + ], + "declKind": "Func", + "usr": "s:15OneSignalOSCore19OSOperationExecutorP19processRequestQueue12inBackgroundySb_tF", + "mangledName": "$s15OneSignalOSCore19OSOperationExecutorP19processRequestQueue12inBackgroundySb_tF", + "moduleName": "OneSignalOSCore", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalOSCore.OSOperationExecutor>", + "sugared_genericSig": "", + "protocolReq": true, + "reqNewWitnessTableEntry": true, + "funcSelfKind": "NonMutating" + } + ], + "declKind": "Protocol", + "usr": "s:15OneSignalOSCore19OSOperationExecutorP", + "mangledName": "$s15OneSignalOSCore19OSOperationExecutorP", + "moduleName": "OneSignalOSCore", + "declAttributes": [ + "AccessControl", + "RawDocComment" + ] + } + ], + "json_format_version": 8 + }, + "ConstValues": [ + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalOSCore\/Source\/OSOperationRepo.swift", + "kind": "BooleanLiteral", + "offset": 1573, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalOSCore\/Source\/OSOperationRepo.swift", + "kind": "Dictionary", + "offset": 1711, + "length": 3, + "value": "[]" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalOSCore\/Source\/OSOperationRepo.swift", + "kind": "Array", + "offset": 1758, + "length": 2, + "value": "[]" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalOSCore\/Source\/OSOperationRepo.swift", + "kind": "Array", + "offset": 1793, + "length": 2, + "value": "[]" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalOSCore\/Source\/OSOperationRepo.swift", + "kind": "IntegerLiteral", + "offset": 1901, + "length": 1, + "value": "5" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalOSCore\/Source\/OSOperationRepo.swift", + "kind": "BooleanLiteral", + "offset": 1927, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalOSCore\/Source\/OSOperationRepo.swift", + "kind": "BooleanLiteral", + "offset": 4475, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalOSCore\/Source\/OSModelStore.swift", + "kind": "StringLiteral", + "offset": 1257, + "length": 12, + "value": "\"OneSignalOSCore.OSModelStore\"" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalOSCore\/Source\/OSModel.swift", + "kind": "BooleanLiteral", + "offset": 1419, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalOSCore\/Source\/OSModel.swift", + "kind": "StringLiteral", + "offset": 1260, + "length": 7, + "value": "\"OneSignalOSCore.OSModel\"" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalOSCore\/Source\/OSDelta.swift", + "kind": "StringLiteral", + "offset": 1455, + "length": 7, + "value": "\"OneSignalOSCore.OSDelta\"" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalOSCore\/Source\/OSModelChangedHandler.swift", + "kind": "StringLiteral", + "offset": 1256, + "length": 18, + "value": "\"OneSignalOSCore.OSModelChangedArgs\"" + } + ] +} \ No newline at end of file diff --git a/iOS_SDK/OneSignalSDK/OneSignal_OSCore/OneSignalOSCore.xcframework/ios-arm64_x86_64-simulator/OneSignalOSCore.framework/Modules/OneSignalOSCore.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface b/iOS_SDK/OneSignalSDK/OneSignal_OSCore/OneSignalOSCore.xcframework/ios-arm64_x86_64-simulator/OneSignalOSCore.framework/Modules/OneSignalOSCore.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface new file mode 100644 index 000000000..a53dcec05 --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignal_OSCore/OneSignalOSCore.xcframework/ios-arm64_x86_64-simulator/OneSignalOSCore.framework/Modules/OneSignalOSCore.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface @@ -0,0 +1,118 @@ +// swift-interface-format-version: 1.0 +// swift-compiler-version: Apple Swift version 5.7.1 (swiftlang-5.7.1.135.3 clang-1400.0.29.51) +// swift-module-flags: -target x86_64-apple-ios11.0-simulator -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -O -module-name OneSignalOSCore +// swift-module-flags-ignorable: -enable-bare-slash-regex +import Foundation +import OneSignalCore +@_exported import OneSignalOSCore +import Swift +import _Concurrency +import _StringProcessing +@objc @_inheritsConvenienceInitializers public class OSOperationRepo : ObjectiveC.NSObject { + public static let sharedInstance: OneSignalOSCore.OSOperationRepo + public var paused: Swift.Bool + public func start() + public func addExecutor(_ executor: OneSignalOSCore.OSOperationExecutor) + @objc public func flushDeltaQueue(inBackground: Swift.Bool = false) + @objc override dynamic public init() + @objc deinit +} +@_inheritsConvenienceInitializers public class OSEventProducer : ObjectiveC.NSObject { + public func subscribe(_ handler: THandler) + public func unsubscribe(_ handler: THandler) + public func fire(callback: (THandler) -> Swift.Void) + @objc override dynamic public init() + @objc deinit +} +open class OSModelStore : ObjectiveC.NSObject where TModel : OneSignalOSCore.OSModel { + public init(changeSubscription: OneSignalOSCore.OSEventProducer, storeKey: Swift.String) + public func registerAsUserObserver() -> OneSignalOSCore.OSModelStore + @objc deinit + public func getModel(key: Swift.String) -> TModel? + public func getModel(modelId: Swift.String) -> TModel? + public func getModels() -> [Swift.String : TModel] + public func add(id: Swift.String, model: TModel, hydrating: Swift.Bool) + public func remove(_ id: Swift.String) + public func clearModelsFromStore() +} +extension OneSignalOSCore.OSModelStore : OneSignalOSCore.OSModelChangedHandler { + public func onModelUpdated(args: OneSignalOSCore.OSModelChangedArgs, hydrating: Swift.Bool) +} +@objc open class OSModel : ObjectiveC.NSObject, Foundation.NSCoding { + final public let modelId: Swift.String + public var changeNotifier: OneSignalOSCore.OSEventProducer + public init(changeNotifier: OneSignalOSCore.OSEventProducer) + @objc open func encode(with coder: Foundation.NSCoder) + @objc required public init?(coder: Foundation.NSCoder) + public func set(property: Swift.String, newValue: T) + public func hydrate(_ response: [Swift.String : Any]) + open func hydrateModel(_ response: [Swift.String : Any]) + @objc deinit +} +@objc public protocol OSBackgroundTaskHandler { + @objc func beginBackgroundTask(_ taskIdentifier: Swift.String) + @objc func endBackgroundTask(_ taskIdentifier: Swift.String) + @objc func setTaskInvalid(_ taskIdentifier: Swift.String) +} +@_inheritsConvenienceInitializers @objc public class OSBackgroundTaskManager : ObjectiveC.NSObject { + @objc public static var taskHandler: OneSignalOSCore.OSBackgroundTaskHandler? + @objc public static func beginBackgroundTask(_ taskIdentifier: Swift.String) + @objc public static func endBackgroundTask(_ taskIdentifier: Swift.String) + @objc public static func setTaskInvalid(_ taskIdentifier: Swift.String) + @objc override dynamic public init() + @objc deinit +} +public protocol OSModelStoreListener : OneSignalOSCore.OSModelStoreChangedHandler { + associatedtype TModel : OneSignalOSCore.OSModel + var store: OneSignalOSCore.OSModelStore { get } + init(store: OneSignalOSCore.OSModelStore) + func getAddModelDelta(_ model: Self.TModel) -> OneSignalOSCore.OSDelta? + func getRemoveModelDelta(_ model: Self.TModel) -> OneSignalOSCore.OSDelta? + func getUpdateModelDelta(_ args: OneSignalOSCore.OSModelChangedArgs) -> OneSignalOSCore.OSDelta? +} +extension OneSignalOSCore.OSModelStoreListener { + public func start() + public func onAdded(_ model: OneSignalOSCore.OSModel) + public func onUpdated(_ args: OneSignalOSCore.OSModelChangedArgs) + public func onRemoved(_ model: OneSignalOSCore.OSModel) +} +public protocol OSModelStoreChangedHandler { + func onAdded(_ model: OneSignalOSCore.OSModel) + func onUpdated(_ args: OneSignalOSCore.OSModelChangedArgs) + func onRemoved(_ model: OneSignalOSCore.OSModel) +} +@objc open class OSDelta : ObjectiveC.NSObject, Foundation.NSCoding { + final public let name: Swift.String + final public let deltaId: Swift.String + final public let timestamp: Foundation.Date + public var model: OneSignalOSCore.OSModel + final public let property: Swift.String + final public let value: Any + @objc override dynamic open var description: Swift.String { + @objc get + } + public init(name: Swift.String, model: OneSignalOSCore.OSModel, property: Swift.String, value: Any) + @objc public func encode(with coder: Foundation.NSCoder) + @objc required public init?(coder: Foundation.NSCoder) + @objc deinit +} +@objc @_hasMissingDesignatedInitializers public class OSModelChangedArgs : ObjectiveC.NSObject { + final public let model: OneSignalOSCore.OSModel + final public let property: Swift.String + final public let newValue: Any + @objc override dynamic public var description: Swift.String { + @objc get + } + @objc deinit +} +public protocol OSModelChangedHandler { + func onModelUpdated(args: OneSignalOSCore.OSModelChangedArgs, hydrating: Swift.Bool) +} +public protocol OSOperationExecutor { + var supportedDeltas: [Swift.String] { get } + var deltaQueue: [OneSignalOSCore.OSDelta] { get } + func enqueueDelta(_ delta: OneSignalOSCore.OSDelta) + func cacheDeltaQueue() + func processDeltaQueue(inBackground: Swift.Bool) + func processRequestQueue(inBackground: Swift.Bool) +} diff --git a/iOS_SDK/OneSignalSDK/OneSignal_OSCore/OneSignalOSCore.xcframework/ios-arm64_x86_64-simulator/OneSignalOSCore.framework/Modules/OneSignalOSCore.swiftmodule/x86_64-apple-ios-simulator.swiftdoc b/iOS_SDK/OneSignalSDK/OneSignal_OSCore/OneSignalOSCore.xcframework/ios-arm64_x86_64-simulator/OneSignalOSCore.framework/Modules/OneSignalOSCore.swiftmodule/x86_64-apple-ios-simulator.swiftdoc new file mode 100644 index 000000000..540bc2009 Binary files /dev/null and b/iOS_SDK/OneSignalSDK/OneSignal_OSCore/OneSignalOSCore.xcframework/ios-arm64_x86_64-simulator/OneSignalOSCore.framework/Modules/OneSignalOSCore.swiftmodule/x86_64-apple-ios-simulator.swiftdoc differ diff --git a/iOS_SDK/OneSignalSDK/OneSignal_OSCore/OneSignalOSCore.xcframework/ios-arm64_x86_64-simulator/OneSignalOSCore.framework/Modules/OneSignalOSCore.swiftmodule/x86_64-apple-ios-simulator.swiftinterface b/iOS_SDK/OneSignalSDK/OneSignal_OSCore/OneSignalOSCore.xcframework/ios-arm64_x86_64-simulator/OneSignalOSCore.framework/Modules/OneSignalOSCore.swiftmodule/x86_64-apple-ios-simulator.swiftinterface new file mode 100644 index 000000000..a53dcec05 --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignal_OSCore/OneSignalOSCore.xcframework/ios-arm64_x86_64-simulator/OneSignalOSCore.framework/Modules/OneSignalOSCore.swiftmodule/x86_64-apple-ios-simulator.swiftinterface @@ -0,0 +1,118 @@ +// swift-interface-format-version: 1.0 +// swift-compiler-version: Apple Swift version 5.7.1 (swiftlang-5.7.1.135.3 clang-1400.0.29.51) +// swift-module-flags: -target x86_64-apple-ios11.0-simulator -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -O -module-name OneSignalOSCore +// swift-module-flags-ignorable: -enable-bare-slash-regex +import Foundation +import OneSignalCore +@_exported import OneSignalOSCore +import Swift +import _Concurrency +import _StringProcessing +@objc @_inheritsConvenienceInitializers public class OSOperationRepo : ObjectiveC.NSObject { + public static let sharedInstance: OneSignalOSCore.OSOperationRepo + public var paused: Swift.Bool + public func start() + public func addExecutor(_ executor: OneSignalOSCore.OSOperationExecutor) + @objc public func flushDeltaQueue(inBackground: Swift.Bool = false) + @objc override dynamic public init() + @objc deinit +} +@_inheritsConvenienceInitializers public class OSEventProducer : ObjectiveC.NSObject { + public func subscribe(_ handler: THandler) + public func unsubscribe(_ handler: THandler) + public func fire(callback: (THandler) -> Swift.Void) + @objc override dynamic public init() + @objc deinit +} +open class OSModelStore : ObjectiveC.NSObject where TModel : OneSignalOSCore.OSModel { + public init(changeSubscription: OneSignalOSCore.OSEventProducer, storeKey: Swift.String) + public func registerAsUserObserver() -> OneSignalOSCore.OSModelStore + @objc deinit + public func getModel(key: Swift.String) -> TModel? + public func getModel(modelId: Swift.String) -> TModel? + public func getModels() -> [Swift.String : TModel] + public func add(id: Swift.String, model: TModel, hydrating: Swift.Bool) + public func remove(_ id: Swift.String) + public func clearModelsFromStore() +} +extension OneSignalOSCore.OSModelStore : OneSignalOSCore.OSModelChangedHandler { + public func onModelUpdated(args: OneSignalOSCore.OSModelChangedArgs, hydrating: Swift.Bool) +} +@objc open class OSModel : ObjectiveC.NSObject, Foundation.NSCoding { + final public let modelId: Swift.String + public var changeNotifier: OneSignalOSCore.OSEventProducer + public init(changeNotifier: OneSignalOSCore.OSEventProducer) + @objc open func encode(with coder: Foundation.NSCoder) + @objc required public init?(coder: Foundation.NSCoder) + public func set(property: Swift.String, newValue: T) + public func hydrate(_ response: [Swift.String : Any]) + open func hydrateModel(_ response: [Swift.String : Any]) + @objc deinit +} +@objc public protocol OSBackgroundTaskHandler { + @objc func beginBackgroundTask(_ taskIdentifier: Swift.String) + @objc func endBackgroundTask(_ taskIdentifier: Swift.String) + @objc func setTaskInvalid(_ taskIdentifier: Swift.String) +} +@_inheritsConvenienceInitializers @objc public class OSBackgroundTaskManager : ObjectiveC.NSObject { + @objc public static var taskHandler: OneSignalOSCore.OSBackgroundTaskHandler? + @objc public static func beginBackgroundTask(_ taskIdentifier: Swift.String) + @objc public static func endBackgroundTask(_ taskIdentifier: Swift.String) + @objc public static func setTaskInvalid(_ taskIdentifier: Swift.String) + @objc override dynamic public init() + @objc deinit +} +public protocol OSModelStoreListener : OneSignalOSCore.OSModelStoreChangedHandler { + associatedtype TModel : OneSignalOSCore.OSModel + var store: OneSignalOSCore.OSModelStore { get } + init(store: OneSignalOSCore.OSModelStore) + func getAddModelDelta(_ model: Self.TModel) -> OneSignalOSCore.OSDelta? + func getRemoveModelDelta(_ model: Self.TModel) -> OneSignalOSCore.OSDelta? + func getUpdateModelDelta(_ args: OneSignalOSCore.OSModelChangedArgs) -> OneSignalOSCore.OSDelta? +} +extension OneSignalOSCore.OSModelStoreListener { + public func start() + public func onAdded(_ model: OneSignalOSCore.OSModel) + public func onUpdated(_ args: OneSignalOSCore.OSModelChangedArgs) + public func onRemoved(_ model: OneSignalOSCore.OSModel) +} +public protocol OSModelStoreChangedHandler { + func onAdded(_ model: OneSignalOSCore.OSModel) + func onUpdated(_ args: OneSignalOSCore.OSModelChangedArgs) + func onRemoved(_ model: OneSignalOSCore.OSModel) +} +@objc open class OSDelta : ObjectiveC.NSObject, Foundation.NSCoding { + final public let name: Swift.String + final public let deltaId: Swift.String + final public let timestamp: Foundation.Date + public var model: OneSignalOSCore.OSModel + final public let property: Swift.String + final public let value: Any + @objc override dynamic open var description: Swift.String { + @objc get + } + public init(name: Swift.String, model: OneSignalOSCore.OSModel, property: Swift.String, value: Any) + @objc public func encode(with coder: Foundation.NSCoder) + @objc required public init?(coder: Foundation.NSCoder) + @objc deinit +} +@objc @_hasMissingDesignatedInitializers public class OSModelChangedArgs : ObjectiveC.NSObject { + final public let model: OneSignalOSCore.OSModel + final public let property: Swift.String + final public let newValue: Any + @objc override dynamic public var description: Swift.String { + @objc get + } + @objc deinit +} +public protocol OSModelChangedHandler { + func onModelUpdated(args: OneSignalOSCore.OSModelChangedArgs, hydrating: Swift.Bool) +} +public protocol OSOperationExecutor { + var supportedDeltas: [Swift.String] { get } + var deltaQueue: [OneSignalOSCore.OSDelta] { get } + func enqueueDelta(_ delta: OneSignalOSCore.OSDelta) + func cacheDeltaQueue() + func processDeltaQueue(inBackground: Swift.Bool) + func processRequestQueue(inBackground: Swift.Bool) +} diff --git a/iOS_SDK/OneSignalSDK/OneSignal_OSCore/OneSignalOSCore.xcframework/ios-arm64_x86_64-simulator/OneSignalOSCore.framework/Modules/module.modulemap b/iOS_SDK/OneSignalSDK/OneSignal_OSCore/OneSignalOSCore.xcframework/ios-arm64_x86_64-simulator/OneSignalOSCore.framework/Modules/module.modulemap new file mode 100644 index 000000000..efd705b1d --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignal_OSCore/OneSignalOSCore.xcframework/ios-arm64_x86_64-simulator/OneSignalOSCore.framework/Modules/module.modulemap @@ -0,0 +1,11 @@ +framework module OneSignalOSCore { + umbrella header "OneSignalOSCore.h" + + export * + module * { export * } +} + +module OneSignalOSCore.Swift { + header "OneSignalOSCore-Swift.h" + requires objc +} diff --git a/iOS_SDK/OneSignalSDK/OneSignal_OSCore/OneSignalOSCore.xcframework/ios-arm64_x86_64-simulator/OneSignalOSCore.framework/OneSignalOSCore b/iOS_SDK/OneSignalSDK/OneSignal_OSCore/OneSignalOSCore.xcframework/ios-arm64_x86_64-simulator/OneSignalOSCore.framework/OneSignalOSCore new file mode 100755 index 000000000..14f8cd736 Binary files /dev/null and b/iOS_SDK/OneSignalSDK/OneSignal_OSCore/OneSignalOSCore.xcframework/ios-arm64_x86_64-simulator/OneSignalOSCore.framework/OneSignalOSCore differ diff --git a/iOS_SDK/OneSignalSDK/OneSignal_OSCore/OneSignalOSCore.xcframework/ios-arm64_x86_64-simulator/OneSignalOSCore.framework/_CodeSignature/CodeResources b/iOS_SDK/OneSignalSDK/OneSignal_OSCore/OneSignalOSCore.xcframework/ios-arm64_x86_64-simulator/OneSignalOSCore.framework/_CodeSignature/CodeResources new file mode 100644 index 000000000..3e0939e09 --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignal_OSCore/OneSignalOSCore.xcframework/ios-arm64_x86_64-simulator/OneSignalOSCore.framework/_CodeSignature/CodeResources @@ -0,0 +1,245 @@ + + + + + files + + Headers/OneSignalOSCore-Swift.h + + VgmCcwkrUAGAFY9bo03FQKgs7Tg= + + Headers/OneSignalOSCore.h + + NPNe/ZRA14AwHLWAugk3qv0+YqQ= + + Info.plist + + Ydb8owERk7n8WhSg+Dd1rjjuOu8= + + Modules/OneSignalOSCore.swiftmodule/arm64-apple-ios-simulator.abi.json + + J1nOVoscLfC7NFDlVBrjPhd0ZoE= + + Modules/OneSignalOSCore.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface + + Ei1fIKbtxP/YHiKqm65P4DkoKko= + + Modules/OneSignalOSCore.swiftmodule/arm64-apple-ios-simulator.swiftdoc + + W++3idjxpAXnlCgGnNbjR1w63pc= + + Modules/OneSignalOSCore.swiftmodule/arm64-apple-ios-simulator.swiftinterface + + Ei1fIKbtxP/YHiKqm65P4DkoKko= + + Modules/OneSignalOSCore.swiftmodule/arm64-apple-ios-simulator.swiftmodule + + znSGGxCU6We+Nv7hL7hre+RKsBw= + + Modules/OneSignalOSCore.swiftmodule/x86_64-apple-ios-simulator.abi.json + + J1nOVoscLfC7NFDlVBrjPhd0ZoE= + + Modules/OneSignalOSCore.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface + + Q35TygvyQXZIVS9a3j+845AirNQ= + + Modules/OneSignalOSCore.swiftmodule/x86_64-apple-ios-simulator.swiftdoc + + aZAuzX4879hLv+kycc/sczLsjjg= + + Modules/OneSignalOSCore.swiftmodule/x86_64-apple-ios-simulator.swiftinterface + + Q35TygvyQXZIVS9a3j+845AirNQ= + + Modules/OneSignalOSCore.swiftmodule/x86_64-apple-ios-simulator.swiftmodule + + 9ZNoXLSLDxjp8A7cy0gBFsY+zRc= + + Modules/module.modulemap + + 2Kj2K1hz5KUjSlkdSNvCqAGr0Xg= + + + files2 + + Headers/OneSignalOSCore-Swift.h + + hash2 + + OqiVJNxnXO4oHG4J4rGHsik/Rhs+4yprPu07GPOrhH8= + + + Headers/OneSignalOSCore.h + + hash2 + + MsJrzFE2HsCHUBJgwVudBxIOtUFFRPJU9Vq9bsNV27A= + + + Modules/OneSignalOSCore.swiftmodule/arm64-apple-ios-simulator.abi.json + + hash2 + + d0MU7egJtbg5SGxs89SF+IoAkZRr6TFINtvxvBvXBJc= + + + Modules/OneSignalOSCore.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface + + hash2 + + ixfoCM7Cy7y6GQZtotCmFCWkSMaD78k56gVIFE188P4= + + + Modules/OneSignalOSCore.swiftmodule/arm64-apple-ios-simulator.swiftdoc + + hash2 + + VmzWAMT8Xb12PXMNDug9RSowtxKkz/XepATP7RgigCM= + + + Modules/OneSignalOSCore.swiftmodule/arm64-apple-ios-simulator.swiftinterface + + hash2 + + ixfoCM7Cy7y6GQZtotCmFCWkSMaD78k56gVIFE188P4= + + + Modules/OneSignalOSCore.swiftmodule/arm64-apple-ios-simulator.swiftmodule + + hash2 + + pNl22uz0Fp/NFY7wKU2retR1njWZAm5Rk2qubu5w4M8= + + + Modules/OneSignalOSCore.swiftmodule/x86_64-apple-ios-simulator.abi.json + + hash2 + + d0MU7egJtbg5SGxs89SF+IoAkZRr6TFINtvxvBvXBJc= + + + Modules/OneSignalOSCore.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface + + hash2 + + TsMCWMRow3K6kEEPjC/i6N9Ptb7LGbX7PorYOARnm0I= + + + Modules/OneSignalOSCore.swiftmodule/x86_64-apple-ios-simulator.swiftdoc + + hash2 + + y3RQRbo5isqOJL9aztcmW2q7mzsFFlGNm+NCQ7clO5o= + + + Modules/OneSignalOSCore.swiftmodule/x86_64-apple-ios-simulator.swiftinterface + + hash2 + + TsMCWMRow3K6kEEPjC/i6N9Ptb7LGbX7PorYOARnm0I= + + + Modules/OneSignalOSCore.swiftmodule/x86_64-apple-ios-simulator.swiftmodule + + hash2 + + 98ouGUn4y2LO4p6XNrh7Yy/0jYuLyDKxO+1W3GgF4zg= + + + Modules/module.modulemap + + hash2 + + x91khB5nqURf4ltg1dva7WEuxxdOwv8OyWtDKvlKnYg= + + + + rules + + ^.* + + ^.*\.lproj/ + + optional + + weight + 1000 + + ^.*\.lproj/locversion.plist$ + + omit + + weight + 1100 + + ^Base\.lproj/ + + weight + 1010 + + ^version.plist$ + + + rules2 + + .*\.dSYM($|/) + + weight + 11 + + ^(.*/)?\.DS_Store$ + + omit + + weight + 2000 + + ^.* + + ^.*\.lproj/ + + optional + + weight + 1000 + + ^.*\.lproj/locversion.plist$ + + omit + + weight + 1100 + + ^Base\.lproj/ + + weight + 1010 + + ^Info\.plist$ + + omit + + weight + 20 + + ^PkgInfo$ + + omit + + weight + 20 + + ^embedded\.provisionprofile$ + + weight + 20 + + ^version\.plist$ + + weight + 20 + + + + diff --git a/iOS_SDK/OneSignalSDK/OneSignal_Outcomes/OneSignalOutcomes.xcframework.zip b/iOS_SDK/OneSignalSDK/OneSignal_Outcomes/OneSignalOutcomes.xcframework.zip index c4eaf6d9c..4af3195b1 100644 Binary files a/iOS_SDK/OneSignalSDK/OneSignal_Outcomes/OneSignalOutcomes.xcframework.zip and b/iOS_SDK/OneSignalSDK/OneSignal_Outcomes/OneSignalOutcomes.xcframework.zip differ diff --git a/iOS_SDK/OneSignalSDK/OneSignal_Outcomes/OneSignalOutcomes.xcframework/Info.plist b/iOS_SDK/OneSignalSDK/OneSignal_Outcomes/OneSignalOutcomes.xcframework/Info.plist index c02e49354..874cafd79 100644 --- a/iOS_SDK/OneSignalSDK/OneSignal_Outcomes/OneSignalOutcomes.xcframework/Info.plist +++ b/iOS_SDK/OneSignalSDK/OneSignal_Outcomes/OneSignalOutcomes.xcframework/Info.plist @@ -6,34 +6,34 @@ LibraryIdentifier - ios-arm64 + ios-arm64_x86_64-simulator LibraryPath OneSignalOutcomes.framework SupportedArchitectures arm64 + x86_64 SupportedPlatform ios + SupportedPlatformVariant + simulator LibraryIdentifier - ios-arm64_x86_64-maccatalyst + ios-arm64 LibraryPath OneSignalOutcomes.framework SupportedArchitectures arm64 - x86_64 SupportedPlatform ios - SupportedPlatformVariant - maccatalyst LibraryIdentifier - ios-arm64_x86_64-simulator + ios-arm64_x86_64-maccatalyst LibraryPath OneSignalOutcomes.framework SupportedArchitectures @@ -44,7 +44,7 @@ SupportedPlatform ios SupportedPlatformVariant - simulator + maccatalyst CFBundlePackageType diff --git a/iOS_SDK/OneSignalSDK/Source/OneSignalCacheCleaner.h b/iOS_SDK/OneSignalSDK/OneSignal_Outcomes/OneSignalOutcomes.xcframework/ios-arm64/OneSignalOutcomes.framework/Headers/OSFocusInfluenceParam.h similarity index 65% rename from iOS_SDK/OneSignalSDK/Source/OneSignalCacheCleaner.h rename to iOS_SDK/OneSignalSDK/OneSignal_Outcomes/OneSignalOutcomes.xcframework/ios-arm64/OneSignalOutcomes.framework/Headers/OSFocusInfluenceParam.h index aeb3e015a..efb066cfc 100644 --- a/iOS_SDK/OneSignalSDK/Source/OneSignalCacheCleaner.h +++ b/iOS_SDK/OneSignalSDK/OneSignal_Outcomes/OneSignalOutcomes.xcframework/ios-arm64/OneSignalOutcomes.framework/Headers/OSFocusInfluenceParam.h @@ -1,7 +1,7 @@ /** * Modified MIT License * -* Copyright 2019 OneSignal +* Copyright 2020 OneSignal * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -25,8 +25,21 @@ * THE SOFTWARE. */ -@interface OneSignalCacheCleaner : NSObject +#ifndef OSFocusInfluenceParam_h +#define OSFocusInfluenceParam_h -+ (void)cleanCachedUserData; +@interface OSFocusInfluenceParam : NSObject + +@property (nonatomic, readonly) NSString *influenceKey; +@property (nonatomic, readonly) NSArray *influenceIds; +@property (nonatomic, readonly) NSString *influenceDirectKey; +@property (nonatomic, readonly) BOOL directInfluence; + +- (id)initWithParamsInfluenceIds:(NSArray *)influenceIds + influenceKey:(NSString *)influenceKey + directInfluence:(BOOL)directInfluence + influenceDirectKey:(NSString *)influenceDirectKey; @end + +#endif /* OSFocusInfluenceParam_h */ diff --git a/iOS_SDK/OneSignalSDK/OneSignal_Outcomes/OneSignalOutcomes.xcframework/ios-arm64/OneSignalOutcomes.framework/Headers/OSSessionManager.h b/iOS_SDK/OneSignalSDK/OneSignal_Outcomes/OneSignalOutcomes.xcframework/ios-arm64/OneSignalOutcomes.framework/Headers/OSSessionManager.h index 7e35c39e9..a1616f737 100644 --- a/iOS_SDK/OneSignalSDK/OneSignal_Outcomes/OneSignalOutcomes.xcframework/ios-arm64/OneSignalOutcomes.framework/Headers/OSSessionManager.h +++ b/iOS_SDK/OneSignalSDK/OneSignal_Outcomes/OneSignalOutcomes.xcframework/ios-arm64/OneSignalOutcomes.framework/Headers/OSSessionManager.h @@ -41,18 +41,20 @@ + (void)resetSharedSessionManager; @property (nonatomic) id _Nullable delegate; +@property AppEntryAction appEntryState; - (instancetype _Nonnull)init:(Class _Nullable)delegate withTrackerFactory:(OSTrackerFactory *_Nonnull)trackerFactory; - (NSArray *_Nonnull)getInfluences; - (NSArray *_Nonnull)getSessionInfluences; - (void)initSessionFromCache; -- (void)restartSessionIfNeeded:(AppEntryAction)entryAction; +- (void)restartSessionIfNeeded; - (void)onInAppMessageReceived:(NSString * _Nonnull)messageId; - (void)onDirectInfluenceFromIAMClick:(NSString * _Nonnull)directIAMId; - (void)onDirectInfluenceFromIAMClickFinished; - (void)onNotificationReceived:(NSString * _Nonnull)notificationId; - (void)onDirectInfluenceFromNotificationOpen:(AppEntryAction)entryAction withNotificationId:(NSString * _Nonnull)directNotificationId; -- (void)attemptSessionUpgrade:(AppEntryAction)entryAction; +- (void)attemptSessionUpgrade; +- (NSDate *_Nullable)sessionLaunchTime; @end diff --git a/iOS_SDK/OneSignalSDK/OneSignal_Outcomes/OneSignalOutcomes.xcframework/ios-arm64/OneSignalOutcomes.framework/Headers/OneSignalOutcomeEventsController.h b/iOS_SDK/OneSignalSDK/OneSignal_Outcomes/OneSignalOutcomes.xcframework/ios-arm64/OneSignalOutcomes.framework/Headers/OneSignalOutcomeEventsController.h index f99c5ce83..b49257d26 100644 --- a/iOS_SDK/OneSignalSDK/OneSignal_Outcomes/OneSignalOutcomes.xcframework/ios-arm64/OneSignalOutcomes.framework/Headers/OneSignalOutcomeEventsController.h +++ b/iOS_SDK/OneSignalSDK/OneSignal_Outcomes/OneSignalOutcomes.xcframework/ios-arm64/OneSignalOutcomes.framework/Headers/OneSignalOutcomeEventsController.h @@ -30,6 +30,7 @@ #import "OSOutcomeEventsFactory.h" #import "OSInAppMessageOutcome.h" #import "OSOutcomeEvent.h" +#import "OSFocusInfluenceParam.h" @interface OneSignalOutcomeEventsController : NSObject @@ -37,25 +38,22 @@ outcomeEventsFactory:(OSOutcomeEventsFactory *_Nonnull)outcomeEventsFactory; - (void)clearOutcomes; +- (void)cleanUniqueOutcomeNotifications; + +- (void)addOutcome:(NSString * _Nonnull)name; +- (void)addUniqueOutcome:(NSString * _Nonnull)name; +- (void)addOutcomeWithValue:(NSString * _Nonnull)name value:(NSNumber * _Nonnull)value; - (void)sendClickActionOutcomes:(NSArray *_Nonnull)outcomes appId:(NSString * _Nonnull)appId deviceType:(NSNumber * _Nonnull)deviceType; -- (void)sendOutcomeEvent:(NSString * _Nonnull)name - appId:(NSString * _Nonnull)appId - deviceType:(NSNumber * _Nonnull)deviceType - successBlock:(OSSendOutcomeSuccess _Nullable)success; - -- (void)sendUniqueOutcomeEvent:(NSString * _Nonnull)name +- (void)sendSessionEndOutcomes:(NSNumber* _Nonnull)timeElapsed appId:(NSString * _Nonnull)appId - deviceType:(NSNumber * _Nonnull)deviceType - successBlock:(OSSendOutcomeSuccess _Nullable)success; - -- (void)sendOutcomeEventWithValue:(NSString * _Nonnull)name - value:(NSNumber * _Nullable)weight - appId:(NSString * _Nonnull)appId - deviceType:(NSNumber * _Nonnull)deviceType - successBlock:(OSSendOutcomeSuccess _Nullable)success; + pushSubscriptionId:(NSString * _Nonnull)pushSubscriptionId + onesignalId:(NSString * _Nonnull)onesignalId + influenceParams:(NSArray * _Nonnull)influenceParams + onSuccess:(OSResultSuccessBlock _Nonnull)successBlock + onFailure:(OSFailureBlock _Nonnull)failureBlock; @end diff --git a/iOS_SDK/OneSignalSDK/OneSignal_Outcomes/OneSignalOutcomes.xcframework/ios-arm64/OneSignalOutcomes.framework/Headers/OneSignalOutcomes.h b/iOS_SDK/OneSignalSDK/OneSignal_Outcomes/OneSignalOutcomes.xcframework/ios-arm64/OneSignalOutcomes.framework/Headers/OneSignalOutcomes.h index e673d4346..e3dcb57d1 100644 --- a/iOS_SDK/OneSignalSDK/OneSignal_Outcomes/OneSignalOutcomes.xcframework/ios-arm64/OneSignalOutcomes.framework/Headers/OneSignalOutcomes.h +++ b/iOS_SDK/OneSignalSDK/OneSignal_Outcomes/OneSignalOutcomes.xcframework/ios-arm64/OneSignalOutcomes.framework/Headers/OneSignalOutcomes.h @@ -40,8 +40,23 @@ #import "OSOutcomeEventsFactory.h" #import "OSTrackerFactory.h" #import "OSOutcomeEventsRepository.h" +#import "OSFocusInfluenceParam.h" -@interface OneSignalOutcomes : NSObject +/** + Public API for Session namespace. + */ +@protocol OSSession ++ (void)addOutcome:(NSString * _Nonnull)name; ++ (void)addUniqueOutcome:(NSString * _Nonnull)name; ++ (void)addOutcomeWithValue:(NSString * _Nonnull)name value:(NSNumber * _Nonnull)value NS_REFINED_FOR_SWIFT; + +@end + +@interface OSOutcomes : NSObject ++ (Class _Nonnull)Session; ++ (OneSignalOutcomeEventsController * _Nullable)sharedController; ++ (void)start; ++ (void)clearStatics; + (void)migrate; @end diff --git a/iOS_SDK/OneSignalSDK/OneSignal_Outcomes/OneSignalOutcomes.xcframework/ios-arm64/OneSignalOutcomes.framework/Info.plist b/iOS_SDK/OneSignalSDK/OneSignal_Outcomes/OneSignalOutcomes.xcframework/ios-arm64/OneSignalOutcomes.framework/Info.plist index 043a96407..7485e6609 100644 Binary files a/iOS_SDK/OneSignalSDK/OneSignal_Outcomes/OneSignalOutcomes.xcframework/ios-arm64/OneSignalOutcomes.framework/Info.plist and b/iOS_SDK/OneSignalSDK/OneSignal_Outcomes/OneSignalOutcomes.xcframework/ios-arm64/OneSignalOutcomes.framework/Info.plist differ diff --git a/iOS_SDK/OneSignalSDK/OneSignal_Outcomes/OneSignalOutcomes.xcframework/ios-arm64/OneSignalOutcomes.framework/OneSignalOutcomes b/iOS_SDK/OneSignalSDK/OneSignal_Outcomes/OneSignalOutcomes.xcframework/ios-arm64/OneSignalOutcomes.framework/OneSignalOutcomes index a023768a1..055961a7b 100755 Binary files a/iOS_SDK/OneSignalSDK/OneSignal_Outcomes/OneSignalOutcomes.xcframework/ios-arm64/OneSignalOutcomes.framework/OneSignalOutcomes and b/iOS_SDK/OneSignalSDK/OneSignal_Outcomes/OneSignalOutcomes.xcframework/ios-arm64/OneSignalOutcomes.framework/OneSignalOutcomes differ diff --git a/iOS_SDK/OneSignalSDK/OneSignal_Outcomes/OneSignalOutcomes.xcframework/ios-arm64/OneSignalOutcomes.framework/_CodeSignature/CodeResources b/iOS_SDK/OneSignalSDK/OneSignal_Outcomes/OneSignalOutcomes.xcframework/ios-arm64/OneSignalOutcomes.framework/_CodeSignature/CodeResources index a621cefa6..ecf063680 100644 --- a/iOS_SDK/OneSignalSDK/OneSignal_Outcomes/OneSignalOutcomes.xcframework/ios-arm64/OneSignalOutcomes.framework/_CodeSignature/CodeResources +++ b/iOS_SDK/OneSignalSDK/OneSignal_Outcomes/OneSignalOutcomes.xcframework/ios-arm64/OneSignalOutcomes.framework/_CodeSignature/CodeResources @@ -12,6 +12,10 @@ ArLQCzgIq/OhHDNMS3QUpcgiIqU= + Headers/OSFocusInfluenceParam.h + + cJUcXRoWNHjFA632fJMpiiizvEo= + Headers/OSInAppMessageOutcome.h 3xT4e/4T3OhG7IenJ42EGs9MroU= @@ -62,7 +66,7 @@ Headers/OSSessionManager.h - b2/LI60ct+svisyN/9N4P5hk3zc= + oprLROXR0QDxaDlh1VBluw+IqkQ= Headers/OSTrackerFactory.h @@ -70,15 +74,15 @@ Headers/OneSignalOutcomeEventsController.h - sD4f/g7VkNo0X2aZKE5/DVsacj4= + uvzESbMuMX+Z8Ltd6SUDpc2lok8= Headers/OneSignalOutcomes.h - sW/MH6o2HgmQVEWrbtmDRuL4+dA= + O9RtHadI4RnS4d89Kx/gX/aMte8= Info.plist - y4yizOp+Eu3GbNi4cJ8+A6OvA7M= + /PbznFIGKkfzYMRRlxEsqmImEw0= Modules/module.modulemap @@ -101,6 +105,13 @@ y+P1oKzfvURE+SVKSVr4j6/jH8DgujNwXv1hKuO1EAE= + Headers/OSFocusInfluenceParam.h + + hash2 + + LK98c5Q6F9eZECXWbCKYpRbvZXcUU9mG5JgOHg8a7Wc= + + Headers/OSInAppMessageOutcome.h hash2 @@ -189,7 +200,7 @@ hash2 - PqGFeWJieWBjFVlo9hW6K3zw3EROosJ9GekCpVrw87U= + WQQTU9R1M6iqBgWQ3v7vT+/cxilFPIGeZK1210ohKAw= Headers/OSTrackerFactory.h @@ -203,14 +214,14 @@ hash2 - 2LLCLqre2Yz61h0Ir/t5whNSGEa/8+9QKJx8WZ/15CQ= + DjLNqS/abTkl0tzFV/k1BghIgON/EpArDOtO9OSysBA= Headers/OneSignalOutcomes.h hash2 - GFLvc7yAjjvzpcTn4DOvrAd+0+BacOygATaFNR719s0= + Xe5MettPyNsqe7aLCyG62Z+7Sl4suKI+KlxtY47v0Rk= Modules/module.modulemap diff --git a/iOS_SDK/OneSignalSDK/Source/OSInAppMessageLocationPrompt.m b/iOS_SDK/OneSignalSDK/OneSignal_Outcomes/OneSignalOutcomes.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalOutcomes.framework/Versions/A/Headers/OSFocusInfluenceParam.h similarity index 63% rename from iOS_SDK/OneSignalSDK/Source/OSInAppMessageLocationPrompt.m rename to iOS_SDK/OneSignalSDK/OneSignal_Outcomes/OneSignalOutcomes.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalOutcomes.framework/Versions/A/Headers/OSFocusInfluenceParam.h index 75ab5e45b..efb066cfc 100644 --- a/iOS_SDK/OneSignalSDK/Source/OSInAppMessageLocationPrompt.m +++ b/iOS_SDK/OneSignalSDK/OneSignal_Outcomes/OneSignalOutcomes.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalOutcomes.framework/Versions/A/Headers/OSFocusInfluenceParam.h @@ -25,32 +25,21 @@ * THE SOFTWARE. */ -#import -#import "OSInAppMessageLocationPrompt.h" +#ifndef OSFocusInfluenceParam_h +#define OSFocusInfluenceParam_h -@interface OneSignal () +@interface OSFocusInfluenceParam : NSObject -+ (void)promptLocationFallbackToSettings:(BOOL)fallback completionHandler:(void (^)(PromptActionResult result))completionHandler; +@property (nonatomic, readonly) NSString *influenceKey; +@property (nonatomic, readonly) NSArray *influenceIds; +@property (nonatomic, readonly) NSString *influenceDirectKey; +@property (nonatomic, readonly) BOOL directInfluence; -@end - -@implementation OSInAppMessageLocationPrompt - -- (instancetype)init -{ - self = [super init]; - if (self) { - _hasPrompted = NO; - } - return self; -} - -- (void)handlePrompt:(void (^)(PromptActionResult result))completionHandler { - [OneSignal promptLocationFallbackToSettings:true completionHandler:completionHandler]; -} - -- (NSString *)description { - return [NSString stringWithFormat:@"OSInAppMessageLocationPrompt hasPrompted:%@", _hasPrompted ? @"YES" : @"NO"]; -} +- (id)initWithParamsInfluenceIds:(NSArray *)influenceIds + influenceKey:(NSString *)influenceKey + directInfluence:(BOOL)directInfluence + influenceDirectKey:(NSString *)influenceDirectKey; @end + +#endif /* OSFocusInfluenceParam_h */ diff --git a/iOS_SDK/OneSignalSDK/OneSignal_Outcomes/OneSignalOutcomes.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalOutcomes.framework/Versions/A/Headers/OSSessionManager.h b/iOS_SDK/OneSignalSDK/OneSignal_Outcomes/OneSignalOutcomes.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalOutcomes.framework/Versions/A/Headers/OSSessionManager.h index 7e35c39e9..a1616f737 100644 --- a/iOS_SDK/OneSignalSDK/OneSignal_Outcomes/OneSignalOutcomes.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalOutcomes.framework/Versions/A/Headers/OSSessionManager.h +++ b/iOS_SDK/OneSignalSDK/OneSignal_Outcomes/OneSignalOutcomes.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalOutcomes.framework/Versions/A/Headers/OSSessionManager.h @@ -41,18 +41,20 @@ + (void)resetSharedSessionManager; @property (nonatomic) id _Nullable delegate; +@property AppEntryAction appEntryState; - (instancetype _Nonnull)init:(Class _Nullable)delegate withTrackerFactory:(OSTrackerFactory *_Nonnull)trackerFactory; - (NSArray *_Nonnull)getInfluences; - (NSArray *_Nonnull)getSessionInfluences; - (void)initSessionFromCache; -- (void)restartSessionIfNeeded:(AppEntryAction)entryAction; +- (void)restartSessionIfNeeded; - (void)onInAppMessageReceived:(NSString * _Nonnull)messageId; - (void)onDirectInfluenceFromIAMClick:(NSString * _Nonnull)directIAMId; - (void)onDirectInfluenceFromIAMClickFinished; - (void)onNotificationReceived:(NSString * _Nonnull)notificationId; - (void)onDirectInfluenceFromNotificationOpen:(AppEntryAction)entryAction withNotificationId:(NSString * _Nonnull)directNotificationId; -- (void)attemptSessionUpgrade:(AppEntryAction)entryAction; +- (void)attemptSessionUpgrade; +- (NSDate *_Nullable)sessionLaunchTime; @end diff --git a/iOS_SDK/OneSignalSDK/OneSignal_Outcomes/OneSignalOutcomes.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalOutcomes.framework/Versions/A/Headers/OneSignalOutcomeEventsController.h b/iOS_SDK/OneSignalSDK/OneSignal_Outcomes/OneSignalOutcomes.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalOutcomes.framework/Versions/A/Headers/OneSignalOutcomeEventsController.h index f99c5ce83..b49257d26 100644 --- a/iOS_SDK/OneSignalSDK/OneSignal_Outcomes/OneSignalOutcomes.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalOutcomes.framework/Versions/A/Headers/OneSignalOutcomeEventsController.h +++ b/iOS_SDK/OneSignalSDK/OneSignal_Outcomes/OneSignalOutcomes.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalOutcomes.framework/Versions/A/Headers/OneSignalOutcomeEventsController.h @@ -30,6 +30,7 @@ #import "OSOutcomeEventsFactory.h" #import "OSInAppMessageOutcome.h" #import "OSOutcomeEvent.h" +#import "OSFocusInfluenceParam.h" @interface OneSignalOutcomeEventsController : NSObject @@ -37,25 +38,22 @@ outcomeEventsFactory:(OSOutcomeEventsFactory *_Nonnull)outcomeEventsFactory; - (void)clearOutcomes; +- (void)cleanUniqueOutcomeNotifications; + +- (void)addOutcome:(NSString * _Nonnull)name; +- (void)addUniqueOutcome:(NSString * _Nonnull)name; +- (void)addOutcomeWithValue:(NSString * _Nonnull)name value:(NSNumber * _Nonnull)value; - (void)sendClickActionOutcomes:(NSArray *_Nonnull)outcomes appId:(NSString * _Nonnull)appId deviceType:(NSNumber * _Nonnull)deviceType; -- (void)sendOutcomeEvent:(NSString * _Nonnull)name - appId:(NSString * _Nonnull)appId - deviceType:(NSNumber * _Nonnull)deviceType - successBlock:(OSSendOutcomeSuccess _Nullable)success; - -- (void)sendUniqueOutcomeEvent:(NSString * _Nonnull)name +- (void)sendSessionEndOutcomes:(NSNumber* _Nonnull)timeElapsed appId:(NSString * _Nonnull)appId - deviceType:(NSNumber * _Nonnull)deviceType - successBlock:(OSSendOutcomeSuccess _Nullable)success; - -- (void)sendOutcomeEventWithValue:(NSString * _Nonnull)name - value:(NSNumber * _Nullable)weight - appId:(NSString * _Nonnull)appId - deviceType:(NSNumber * _Nonnull)deviceType - successBlock:(OSSendOutcomeSuccess _Nullable)success; + pushSubscriptionId:(NSString * _Nonnull)pushSubscriptionId + onesignalId:(NSString * _Nonnull)onesignalId + influenceParams:(NSArray * _Nonnull)influenceParams + onSuccess:(OSResultSuccessBlock _Nonnull)successBlock + onFailure:(OSFailureBlock _Nonnull)failureBlock; @end diff --git a/iOS_SDK/OneSignalSDK/OneSignal_Outcomes/OneSignalOutcomes.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalOutcomes.framework/Versions/A/Headers/OneSignalOutcomes.h b/iOS_SDK/OneSignalSDK/OneSignal_Outcomes/OneSignalOutcomes.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalOutcomes.framework/Versions/A/Headers/OneSignalOutcomes.h index e673d4346..e3dcb57d1 100644 --- a/iOS_SDK/OneSignalSDK/OneSignal_Outcomes/OneSignalOutcomes.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalOutcomes.framework/Versions/A/Headers/OneSignalOutcomes.h +++ b/iOS_SDK/OneSignalSDK/OneSignal_Outcomes/OneSignalOutcomes.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalOutcomes.framework/Versions/A/Headers/OneSignalOutcomes.h @@ -40,8 +40,23 @@ #import "OSOutcomeEventsFactory.h" #import "OSTrackerFactory.h" #import "OSOutcomeEventsRepository.h" +#import "OSFocusInfluenceParam.h" -@interface OneSignalOutcomes : NSObject +/** + Public API for Session namespace. + */ +@protocol OSSession ++ (void)addOutcome:(NSString * _Nonnull)name; ++ (void)addUniqueOutcome:(NSString * _Nonnull)name; ++ (void)addOutcomeWithValue:(NSString * _Nonnull)name value:(NSNumber * _Nonnull)value NS_REFINED_FOR_SWIFT; + +@end + +@interface OSOutcomes : NSObject ++ (Class _Nonnull)Session; ++ (OneSignalOutcomeEventsController * _Nullable)sharedController; ++ (void)start; ++ (void)clearStatics; + (void)migrate; @end diff --git a/iOS_SDK/OneSignalSDK/OneSignal_Outcomes/OneSignalOutcomes.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalOutcomes.framework/Versions/A/OneSignalOutcomes b/iOS_SDK/OneSignalSDK/OneSignal_Outcomes/OneSignalOutcomes.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalOutcomes.framework/Versions/A/OneSignalOutcomes index fcfc4e81a..c95b20ff3 100755 Binary files a/iOS_SDK/OneSignalSDK/OneSignal_Outcomes/OneSignalOutcomes.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalOutcomes.framework/Versions/A/OneSignalOutcomes and b/iOS_SDK/OneSignalSDK/OneSignal_Outcomes/OneSignalOutcomes.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalOutcomes.framework/Versions/A/OneSignalOutcomes differ diff --git a/iOS_SDK/OneSignalSDK/OneSignal_Outcomes/OneSignalOutcomes.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalOutcomes.framework/Versions/A/Resources/Info.plist b/iOS_SDK/OneSignalSDK/OneSignal_Outcomes/OneSignalOutcomes.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalOutcomes.framework/Versions/A/Resources/Info.plist index 13a176bf0..301de83ed 100644 --- a/iOS_SDK/OneSignalSDK/OneSignal_Outcomes/OneSignalOutcomes.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalOutcomes.framework/Versions/A/Resources/Info.plist +++ b/iOS_SDK/OneSignalSDK/OneSignal_Outcomes/OneSignalOutcomes.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalOutcomes.framework/Versions/A/Resources/Info.plist @@ -3,7 +3,7 @@ BuildMachineOSBuild - 22G90 + 22G91 CFBundleDevelopmentRegion en CFBundleExecutable diff --git a/iOS_SDK/OneSignalSDK/OneSignal_Outcomes/OneSignalOutcomes.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalOutcomes.framework/Versions/A/_CodeSignature/CodeResources b/iOS_SDK/OneSignalSDK/OneSignal_Outcomes/OneSignalOutcomes.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalOutcomes.framework/Versions/A/_CodeSignature/CodeResources index 153cbca01..68554be2c 100644 --- a/iOS_SDK/OneSignalSDK/OneSignal_Outcomes/OneSignalOutcomes.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalOutcomes.framework/Versions/A/_CodeSignature/CodeResources +++ b/iOS_SDK/OneSignalSDK/OneSignal_Outcomes/OneSignalOutcomes.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalOutcomes.framework/Versions/A/_CodeSignature/CodeResources @@ -6,7 +6,7 @@ Resources/Info.plist - GJgKJi7mhZ3QpDXbSRXXmYed2zo= + nlBePHj8w7/gD5EM0QulDMN+vIU= files2 @@ -25,6 +25,13 @@ y+P1oKzfvURE+SVKSVr4j6/jH8DgujNwXv1hKuO1EAE= + Headers/OSFocusInfluenceParam.h + + hash2 + + LK98c5Q6F9eZECXWbCKYpRbvZXcUU9mG5JgOHg8a7Wc= + + Headers/OSInAppMessageOutcome.h hash2 @@ -113,7 +120,7 @@ hash2 - PqGFeWJieWBjFVlo9hW6K3zw3EROosJ9GekCpVrw87U= + WQQTU9R1M6iqBgWQ3v7vT+/cxilFPIGeZK1210ohKAw= Headers/OSTrackerFactory.h @@ -127,14 +134,14 @@ hash2 - 2LLCLqre2Yz61h0Ir/t5whNSGEa/8+9QKJx8WZ/15CQ= + DjLNqS/abTkl0tzFV/k1BghIgON/EpArDOtO9OSysBA= Headers/OneSignalOutcomes.h hash2 - GFLvc7yAjjvzpcTn4DOvrAd+0+BacOygATaFNR719s0= + Xe5MettPyNsqe7aLCyG62Z+7Sl4suKI+KlxtY47v0Rk= Modules/module.modulemap @@ -148,7 +155,7 @@ hash2 - jgJUSWvqcv1XxRBUWCYSIuITYMUtF4ygdTiYiJywa54= + cncAxBg9T2K2N4OOe9iM+L3E0JXg0ugtTnS05IK5h4w= diff --git a/iOS_SDK/OneSignalSDK/OneSignal_Outcomes/OneSignalOutcomes.xcframework/ios-arm64_x86_64-simulator/OneSignalOutcomes.framework/Headers/OSFocusInfluenceParam.h b/iOS_SDK/OneSignalSDK/OneSignal_Outcomes/OneSignalOutcomes.xcframework/ios-arm64_x86_64-simulator/OneSignalOutcomes.framework/Headers/OSFocusInfluenceParam.h new file mode 100644 index 000000000..efb066cfc --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignal_Outcomes/OneSignalOutcomes.xcframework/ios-arm64_x86_64-simulator/OneSignalOutcomes.framework/Headers/OSFocusInfluenceParam.h @@ -0,0 +1,45 @@ +/** +* Modified MIT License +* +* Copyright 2020 OneSignal +* +* Permission is hereby granted, free of charge, to any person obtaining a copy +* of this software and associated documentation files (the "Software"), to deal +* in the Software without restriction, including without limitation the rights +* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +* copies of the Software, and to permit persons to whom the Software is +* furnished to do so, subject to the following conditions: +* +* 1. The above copyright notice and this permission notice shall be included in +* all copies or substantial portions of the Software. +* +* 2. All copies of substantial portions of the Software may only be used in connection +* with services provided by OneSignal. +* +* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +* THE SOFTWARE. +*/ + +#ifndef OSFocusInfluenceParam_h +#define OSFocusInfluenceParam_h + +@interface OSFocusInfluenceParam : NSObject + +@property (nonatomic, readonly) NSString *influenceKey; +@property (nonatomic, readonly) NSArray *influenceIds; +@property (nonatomic, readonly) NSString *influenceDirectKey; +@property (nonatomic, readonly) BOOL directInfluence; + +- (id)initWithParamsInfluenceIds:(NSArray *)influenceIds + influenceKey:(NSString *)influenceKey + directInfluence:(BOOL)directInfluence + influenceDirectKey:(NSString *)influenceDirectKey; + +@end + +#endif /* OSFocusInfluenceParam_h */ diff --git a/iOS_SDK/OneSignalSDK/OneSignal_Outcomes/OneSignalOutcomes.xcframework/ios-arm64_x86_64-simulator/OneSignalOutcomes.framework/Headers/OSSessionManager.h b/iOS_SDK/OneSignalSDK/OneSignal_Outcomes/OneSignalOutcomes.xcframework/ios-arm64_x86_64-simulator/OneSignalOutcomes.framework/Headers/OSSessionManager.h index 7e35c39e9..a1616f737 100644 --- a/iOS_SDK/OneSignalSDK/OneSignal_Outcomes/OneSignalOutcomes.xcframework/ios-arm64_x86_64-simulator/OneSignalOutcomes.framework/Headers/OSSessionManager.h +++ b/iOS_SDK/OneSignalSDK/OneSignal_Outcomes/OneSignalOutcomes.xcframework/ios-arm64_x86_64-simulator/OneSignalOutcomes.framework/Headers/OSSessionManager.h @@ -41,18 +41,20 @@ + (void)resetSharedSessionManager; @property (nonatomic) id _Nullable delegate; +@property AppEntryAction appEntryState; - (instancetype _Nonnull)init:(Class _Nullable)delegate withTrackerFactory:(OSTrackerFactory *_Nonnull)trackerFactory; - (NSArray *_Nonnull)getInfluences; - (NSArray *_Nonnull)getSessionInfluences; - (void)initSessionFromCache; -- (void)restartSessionIfNeeded:(AppEntryAction)entryAction; +- (void)restartSessionIfNeeded; - (void)onInAppMessageReceived:(NSString * _Nonnull)messageId; - (void)onDirectInfluenceFromIAMClick:(NSString * _Nonnull)directIAMId; - (void)onDirectInfluenceFromIAMClickFinished; - (void)onNotificationReceived:(NSString * _Nonnull)notificationId; - (void)onDirectInfluenceFromNotificationOpen:(AppEntryAction)entryAction withNotificationId:(NSString * _Nonnull)directNotificationId; -- (void)attemptSessionUpgrade:(AppEntryAction)entryAction; +- (void)attemptSessionUpgrade; +- (NSDate *_Nullable)sessionLaunchTime; @end diff --git a/iOS_SDK/OneSignalSDK/OneSignal_Outcomes/OneSignalOutcomes.xcframework/ios-arm64_x86_64-simulator/OneSignalOutcomes.framework/Headers/OneSignalOutcomeEventsController.h b/iOS_SDK/OneSignalSDK/OneSignal_Outcomes/OneSignalOutcomes.xcframework/ios-arm64_x86_64-simulator/OneSignalOutcomes.framework/Headers/OneSignalOutcomeEventsController.h index f99c5ce83..b49257d26 100644 --- a/iOS_SDK/OneSignalSDK/OneSignal_Outcomes/OneSignalOutcomes.xcframework/ios-arm64_x86_64-simulator/OneSignalOutcomes.framework/Headers/OneSignalOutcomeEventsController.h +++ b/iOS_SDK/OneSignalSDK/OneSignal_Outcomes/OneSignalOutcomes.xcframework/ios-arm64_x86_64-simulator/OneSignalOutcomes.framework/Headers/OneSignalOutcomeEventsController.h @@ -30,6 +30,7 @@ #import "OSOutcomeEventsFactory.h" #import "OSInAppMessageOutcome.h" #import "OSOutcomeEvent.h" +#import "OSFocusInfluenceParam.h" @interface OneSignalOutcomeEventsController : NSObject @@ -37,25 +38,22 @@ outcomeEventsFactory:(OSOutcomeEventsFactory *_Nonnull)outcomeEventsFactory; - (void)clearOutcomes; +- (void)cleanUniqueOutcomeNotifications; + +- (void)addOutcome:(NSString * _Nonnull)name; +- (void)addUniqueOutcome:(NSString * _Nonnull)name; +- (void)addOutcomeWithValue:(NSString * _Nonnull)name value:(NSNumber * _Nonnull)value; - (void)sendClickActionOutcomes:(NSArray *_Nonnull)outcomes appId:(NSString * _Nonnull)appId deviceType:(NSNumber * _Nonnull)deviceType; -- (void)sendOutcomeEvent:(NSString * _Nonnull)name - appId:(NSString * _Nonnull)appId - deviceType:(NSNumber * _Nonnull)deviceType - successBlock:(OSSendOutcomeSuccess _Nullable)success; - -- (void)sendUniqueOutcomeEvent:(NSString * _Nonnull)name +- (void)sendSessionEndOutcomes:(NSNumber* _Nonnull)timeElapsed appId:(NSString * _Nonnull)appId - deviceType:(NSNumber * _Nonnull)deviceType - successBlock:(OSSendOutcomeSuccess _Nullable)success; - -- (void)sendOutcomeEventWithValue:(NSString * _Nonnull)name - value:(NSNumber * _Nullable)weight - appId:(NSString * _Nonnull)appId - deviceType:(NSNumber * _Nonnull)deviceType - successBlock:(OSSendOutcomeSuccess _Nullable)success; + pushSubscriptionId:(NSString * _Nonnull)pushSubscriptionId + onesignalId:(NSString * _Nonnull)onesignalId + influenceParams:(NSArray * _Nonnull)influenceParams + onSuccess:(OSResultSuccessBlock _Nonnull)successBlock + onFailure:(OSFailureBlock _Nonnull)failureBlock; @end diff --git a/iOS_SDK/OneSignalSDK/OneSignal_Outcomes/OneSignalOutcomes.xcframework/ios-arm64_x86_64-simulator/OneSignalOutcomes.framework/Headers/OneSignalOutcomes.h b/iOS_SDK/OneSignalSDK/OneSignal_Outcomes/OneSignalOutcomes.xcframework/ios-arm64_x86_64-simulator/OneSignalOutcomes.framework/Headers/OneSignalOutcomes.h index e673d4346..e3dcb57d1 100644 --- a/iOS_SDK/OneSignalSDK/OneSignal_Outcomes/OneSignalOutcomes.xcframework/ios-arm64_x86_64-simulator/OneSignalOutcomes.framework/Headers/OneSignalOutcomes.h +++ b/iOS_SDK/OneSignalSDK/OneSignal_Outcomes/OneSignalOutcomes.xcframework/ios-arm64_x86_64-simulator/OneSignalOutcomes.framework/Headers/OneSignalOutcomes.h @@ -40,8 +40,23 @@ #import "OSOutcomeEventsFactory.h" #import "OSTrackerFactory.h" #import "OSOutcomeEventsRepository.h" +#import "OSFocusInfluenceParam.h" -@interface OneSignalOutcomes : NSObject +/** + Public API for Session namespace. + */ +@protocol OSSession ++ (void)addOutcome:(NSString * _Nonnull)name; ++ (void)addUniqueOutcome:(NSString * _Nonnull)name; ++ (void)addOutcomeWithValue:(NSString * _Nonnull)name value:(NSNumber * _Nonnull)value NS_REFINED_FOR_SWIFT; + +@end + +@interface OSOutcomes : NSObject ++ (Class _Nonnull)Session; ++ (OneSignalOutcomeEventsController * _Nullable)sharedController; ++ (void)start; ++ (void)clearStatics; + (void)migrate; @end diff --git a/iOS_SDK/OneSignalSDK/OneSignal_Outcomes/OneSignalOutcomes.xcframework/ios-arm64_x86_64-simulator/OneSignalOutcomes.framework/Info.plist b/iOS_SDK/OneSignalSDK/OneSignal_Outcomes/OneSignalOutcomes.xcframework/ios-arm64_x86_64-simulator/OneSignalOutcomes.framework/Info.plist index cceb5005c..a1e2b69e6 100644 Binary files a/iOS_SDK/OneSignalSDK/OneSignal_Outcomes/OneSignalOutcomes.xcframework/ios-arm64_x86_64-simulator/OneSignalOutcomes.framework/Info.plist and b/iOS_SDK/OneSignalSDK/OneSignal_Outcomes/OneSignalOutcomes.xcframework/ios-arm64_x86_64-simulator/OneSignalOutcomes.framework/Info.plist differ diff --git a/iOS_SDK/OneSignalSDK/OneSignal_Outcomes/OneSignalOutcomes.xcframework/ios-arm64_x86_64-simulator/OneSignalOutcomes.framework/OneSignalOutcomes b/iOS_SDK/OneSignalSDK/OneSignal_Outcomes/OneSignalOutcomes.xcframework/ios-arm64_x86_64-simulator/OneSignalOutcomes.framework/OneSignalOutcomes index 4868796b7..3d8635037 100755 Binary files a/iOS_SDK/OneSignalSDK/OneSignal_Outcomes/OneSignalOutcomes.xcframework/ios-arm64_x86_64-simulator/OneSignalOutcomes.framework/OneSignalOutcomes and b/iOS_SDK/OneSignalSDK/OneSignal_Outcomes/OneSignalOutcomes.xcframework/ios-arm64_x86_64-simulator/OneSignalOutcomes.framework/OneSignalOutcomes differ diff --git a/iOS_SDK/OneSignalSDK/OneSignal_Outcomes/OneSignalOutcomes.xcframework/ios-arm64_x86_64-simulator/OneSignalOutcomes.framework/_CodeSignature/CodeResources b/iOS_SDK/OneSignalSDK/OneSignal_Outcomes/OneSignalOutcomes.xcframework/ios-arm64_x86_64-simulator/OneSignalOutcomes.framework/_CodeSignature/CodeResources index 4a5754fe6..2a9ead9fe 100644 --- a/iOS_SDK/OneSignalSDK/OneSignal_Outcomes/OneSignalOutcomes.xcframework/ios-arm64_x86_64-simulator/OneSignalOutcomes.framework/_CodeSignature/CodeResources +++ b/iOS_SDK/OneSignalSDK/OneSignal_Outcomes/OneSignalOutcomes.xcframework/ios-arm64_x86_64-simulator/OneSignalOutcomes.framework/_CodeSignature/CodeResources @@ -12,6 +12,10 @@ ArLQCzgIq/OhHDNMS3QUpcgiIqU= + Headers/OSFocusInfluenceParam.h + + cJUcXRoWNHjFA632fJMpiiizvEo= + Headers/OSInAppMessageOutcome.h 3xT4e/4T3OhG7IenJ42EGs9MroU= @@ -62,7 +66,7 @@ Headers/OSSessionManager.h - b2/LI60ct+svisyN/9N4P5hk3zc= + oprLROXR0QDxaDlh1VBluw+IqkQ= Headers/OSTrackerFactory.h @@ -70,15 +74,15 @@ Headers/OneSignalOutcomeEventsController.h - sD4f/g7VkNo0X2aZKE5/DVsacj4= + uvzESbMuMX+Z8Ltd6SUDpc2lok8= Headers/OneSignalOutcomes.h - sW/MH6o2HgmQVEWrbtmDRuL4+dA= + O9RtHadI4RnS4d89Kx/gX/aMte8= Info.plist - +egKWU/8myR1N+mdJM+FqQ4imOs= + p6Cjg1/eUJFwFMEWV7raU0O3uE8= Modules/module.modulemap @@ -101,6 +105,13 @@ y+P1oKzfvURE+SVKSVr4j6/jH8DgujNwXv1hKuO1EAE= + Headers/OSFocusInfluenceParam.h + + hash2 + + LK98c5Q6F9eZECXWbCKYpRbvZXcUU9mG5JgOHg8a7Wc= + + Headers/OSInAppMessageOutcome.h hash2 @@ -189,7 +200,7 @@ hash2 - PqGFeWJieWBjFVlo9hW6K3zw3EROosJ9GekCpVrw87U= + WQQTU9R1M6iqBgWQ3v7vT+/cxilFPIGeZK1210ohKAw= Headers/OSTrackerFactory.h @@ -203,14 +214,14 @@ hash2 - 2LLCLqre2Yz61h0Ir/t5whNSGEa/8+9QKJx8WZ/15CQ= + DjLNqS/abTkl0tzFV/k1BghIgON/EpArDOtO9OSysBA= Headers/OneSignalOutcomes.h hash2 - GFLvc7yAjjvzpcTn4DOvrAd+0+BacOygATaFNR719s0= + Xe5MettPyNsqe7aLCyG62Z+7Sl4suKI+KlxtY47v0Rk= Modules/module.modulemap diff --git a/iOS_SDK/OneSignalSDK/OneSignal_User/OneSignalUser.xcframework.zip b/iOS_SDK/OneSignalSDK/OneSignal_User/OneSignalUser.xcframework.zip new file mode 100644 index 000000000..ff05edffa Binary files /dev/null and b/iOS_SDK/OneSignalSDK/OneSignal_User/OneSignalUser.xcframework.zip differ diff --git a/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignal.xcframework/Info.plist b/iOS_SDK/OneSignalSDK/OneSignal_User/OneSignalUser.xcframework/Info.plist similarity index 90% rename from iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignal.xcframework/Info.plist rename to iOS_SDK/OneSignalSDK/OneSignal_User/OneSignalUser.xcframework/Info.plist index 86bd092bf..f4fab4509 100644 --- a/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignal.xcframework/Info.plist +++ b/iOS_SDK/OneSignalSDK/OneSignal_User/OneSignalUser.xcframework/Info.plist @@ -6,36 +6,36 @@ LibraryIdentifier - ios-arm64_x86_64-simulator + ios-arm64 LibraryPath - OneSignal.framework + OneSignalUser.framework SupportedArchitectures arm64 - x86_64 SupportedPlatform ios - SupportedPlatformVariant - simulator LibraryIdentifier - ios-arm64 + ios-arm64_x86_64-simulator LibraryPath - OneSignal.framework + OneSignalUser.framework SupportedArchitectures arm64 + x86_64 SupportedPlatform ios + SupportedPlatformVariant + simulator LibraryIdentifier ios-arm64_x86_64-maccatalyst LibraryPath - OneSignal.framework + OneSignalUser.framework SupportedArchitectures arm64 diff --git a/iOS_SDK/OneSignalSDK/OneSignal_User/OneSignalUser.xcframework/ios-arm64/OneSignalUser.framework/Headers/OneSignalUser-Swift.h b/iOS_SDK/OneSignalSDK/OneSignal_User/OneSignalUser.xcframework/ios-arm64/OneSignalUser.framework/Headers/OneSignalUser-Swift.h new file mode 100644 index 000000000..a449a1759 --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignal_User/OneSignalUser.xcframework/ios-arm64/OneSignalUser.framework/Headers/OneSignalUser-Swift.h @@ -0,0 +1,410 @@ +#if 0 +#elif defined(__arm64__) && __arm64__ +// Generated by Apple Swift version 5.7.1 (swiftlang-5.7.1.135.3 clang-1400.0.29.51) +#ifndef ONESIGNALUSER_SWIFT_H +#define ONESIGNALUSER_SWIFT_H +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wgcc-compat" + +#if !defined(__has_include) +# define __has_include(x) 0 +#endif +#if !defined(__has_attribute) +# define __has_attribute(x) 0 +#endif +#if !defined(__has_feature) +# define __has_feature(x) 0 +#endif +#if !defined(__has_warning) +# define __has_warning(x) 0 +#endif + +#if __has_include() +# include +#endif + +#pragma clang diagnostic ignored "-Wduplicate-method-match" +#pragma clang diagnostic ignored "-Wauto-import" +#if defined(__OBJC__) +#include +#endif +#if defined(__cplusplus) +#include +#include +#include +#else +#include +#include +#include +#endif + +#if !defined(SWIFT_TYPEDEFS) +# define SWIFT_TYPEDEFS 1 +# if __has_include() +# include +# elif !defined(__cplusplus) +typedef uint_least16_t char16_t; +typedef uint_least32_t char32_t; +# endif +typedef float swift_float2 __attribute__((__ext_vector_type__(2))); +typedef float swift_float3 __attribute__((__ext_vector_type__(3))); +typedef float swift_float4 __attribute__((__ext_vector_type__(4))); +typedef double swift_double2 __attribute__((__ext_vector_type__(2))); +typedef double swift_double3 __attribute__((__ext_vector_type__(3))); +typedef double swift_double4 __attribute__((__ext_vector_type__(4))); +typedef int swift_int2 __attribute__((__ext_vector_type__(2))); +typedef int swift_int3 __attribute__((__ext_vector_type__(3))); +typedef int swift_int4 __attribute__((__ext_vector_type__(4))); +typedef unsigned int swift_uint2 __attribute__((__ext_vector_type__(2))); +typedef unsigned int swift_uint3 __attribute__((__ext_vector_type__(3))); +typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4))); +#endif + +#if !defined(SWIFT_PASTE) +# define SWIFT_PASTE_HELPER(x, y) x##y +# define SWIFT_PASTE(x, y) SWIFT_PASTE_HELPER(x, y) +#endif +#if !defined(SWIFT_METATYPE) +# define SWIFT_METATYPE(X) Class +#endif +#if !defined(SWIFT_CLASS_PROPERTY) +# if __has_feature(objc_class_property) +# define SWIFT_CLASS_PROPERTY(...) __VA_ARGS__ +# else +# define SWIFT_CLASS_PROPERTY(...) +# endif +#endif + +#if __has_attribute(objc_runtime_name) +# define SWIFT_RUNTIME_NAME(X) __attribute__((objc_runtime_name(X))) +#else +# define SWIFT_RUNTIME_NAME(X) +#endif +#if __has_attribute(swift_name) +# define SWIFT_COMPILE_NAME(X) __attribute__((swift_name(X))) +#else +# define SWIFT_COMPILE_NAME(X) +#endif +#if __has_attribute(objc_method_family) +# define SWIFT_METHOD_FAMILY(X) __attribute__((objc_method_family(X))) +#else +# define SWIFT_METHOD_FAMILY(X) +#endif +#if __has_attribute(noescape) +# define SWIFT_NOESCAPE __attribute__((noescape)) +#else +# define SWIFT_NOESCAPE +#endif +#if __has_attribute(ns_consumed) +# define SWIFT_RELEASES_ARGUMENT __attribute__((ns_consumed)) +#else +# define SWIFT_RELEASES_ARGUMENT +#endif +#if __has_attribute(warn_unused_result) +# define SWIFT_WARN_UNUSED_RESULT __attribute__((warn_unused_result)) +#else +# define SWIFT_WARN_UNUSED_RESULT +#endif +#if __has_attribute(noreturn) +# define SWIFT_NORETURN __attribute__((noreturn)) +#else +# define SWIFT_NORETURN +#endif +#if !defined(SWIFT_CLASS_EXTRA) +# define SWIFT_CLASS_EXTRA +#endif +#if !defined(SWIFT_PROTOCOL_EXTRA) +# define SWIFT_PROTOCOL_EXTRA +#endif +#if !defined(SWIFT_ENUM_EXTRA) +# define SWIFT_ENUM_EXTRA +#endif +#if !defined(SWIFT_CLASS) +# if __has_attribute(objc_subclassing_restricted) +# define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_CLASS_EXTRA +# define SWIFT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA +# else +# define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA +# define SWIFT_CLASS_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA +# endif +#endif +#if !defined(SWIFT_RESILIENT_CLASS) +# if __has_attribute(objc_class_stub) +# define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME) __attribute__((objc_class_stub)) +# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_class_stub)) SWIFT_CLASS_NAMED(SWIFT_NAME) +# else +# define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME) +# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) SWIFT_CLASS_NAMED(SWIFT_NAME) +# endif +#endif + +#if !defined(SWIFT_PROTOCOL) +# define SWIFT_PROTOCOL(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA +# define SWIFT_PROTOCOL_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA +#endif + +#if !defined(SWIFT_EXTENSION) +# define SWIFT_EXTENSION(M) SWIFT_PASTE(M##_Swift_, __LINE__) +#endif + +#if !defined(OBJC_DESIGNATED_INITIALIZER) +# if __has_attribute(objc_designated_initializer) +# define OBJC_DESIGNATED_INITIALIZER __attribute__((objc_designated_initializer)) +# else +# define OBJC_DESIGNATED_INITIALIZER +# endif +#endif +#if !defined(SWIFT_ENUM_ATTR) +# if defined(__has_attribute) && __has_attribute(enum_extensibility) +# define SWIFT_ENUM_ATTR(_extensibility) __attribute__((enum_extensibility(_extensibility))) +# else +# define SWIFT_ENUM_ATTR(_extensibility) +# endif +#endif +#if !defined(SWIFT_ENUM) +# define SWIFT_ENUM(_type, _name, _extensibility) enum _name : _type _name; enum SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type +# if __has_feature(generalized_swift_name) +# define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) enum _name : _type _name SWIFT_COMPILE_NAME(SWIFT_NAME); enum SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type +# else +# define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) SWIFT_ENUM(_type, _name, _extensibility) +# endif +#endif +#if !defined(SWIFT_UNAVAILABLE) +# define SWIFT_UNAVAILABLE __attribute__((unavailable)) +#endif +#if !defined(SWIFT_UNAVAILABLE_MSG) +# define SWIFT_UNAVAILABLE_MSG(msg) __attribute__((unavailable(msg))) +#endif +#if !defined(SWIFT_AVAILABILITY) +# define SWIFT_AVAILABILITY(plat, ...) __attribute__((availability(plat, __VA_ARGS__))) +#endif +#if !defined(SWIFT_WEAK_IMPORT) +# define SWIFT_WEAK_IMPORT __attribute__((weak_import)) +#endif +#if !defined(SWIFT_DEPRECATED) +# define SWIFT_DEPRECATED __attribute__((deprecated)) +#endif +#if !defined(SWIFT_DEPRECATED_MSG) +# define SWIFT_DEPRECATED_MSG(...) __attribute__((deprecated(__VA_ARGS__))) +#endif +#if __has_feature(attribute_diagnose_if_objc) +# define SWIFT_DEPRECATED_OBJC(Msg) __attribute__((diagnose_if(1, Msg, "warning"))) +#else +# define SWIFT_DEPRECATED_OBJC(Msg) SWIFT_DEPRECATED_MSG(Msg) +#endif +#if defined(__OBJC__) +#if !defined(IBSegueAction) +# define IBSegueAction +#endif +#endif +#if !defined(SWIFT_EXTERN) +# if defined(__cplusplus) +# define SWIFT_EXTERN extern "C" +# else +# define SWIFT_EXTERN extern +# endif +#endif +#if !defined(SWIFT_CALL) +# define SWIFT_CALL __attribute__((swiftcall)) +#endif +#if defined(__cplusplus) +#if !defined(SWIFT_NOEXCEPT) +# define SWIFT_NOEXCEPT noexcept +#endif +#else +#if !defined(SWIFT_NOEXCEPT) +# define SWIFT_NOEXCEPT +#endif +#endif +#if defined(__cplusplus) +#if !defined(SWIFT_CXX_INT_DEFINED) +#define SWIFT_CXX_INT_DEFINED +namespace swift { +using Int = ptrdiff_t; +using UInt = size_t; +} +#endif +#endif +#if defined(__OBJC__) +#if __has_feature(modules) +#if __has_warning("-Watimport-in-framework-header") +#pragma clang diagnostic ignored "-Watimport-in-framework-header" +#endif +@import Foundation; +@import ObjectiveC; +@import OneSignalNotifications; +#endif + +#endif +#pragma clang diagnostic ignored "-Wproperty-attribute-mismatch" +#pragma clang diagnostic ignored "-Wduplicate-method-arg" +#if __has_warning("-Wpragma-clang-attribute") +# pragma clang diagnostic ignored "-Wpragma-clang-attribute" +#endif +#pragma clang diagnostic ignored "-Wunknown-pragmas" +#pragma clang diagnostic ignored "-Wnullability" +#pragma clang diagnostic ignored "-Wdollar-in-identifier-extension" + +#if __has_attribute(external_source_symbol) +# pragma push_macro("any") +# undef any +# pragma clang attribute push(__attribute__((external_source_symbol(language="Swift", defined_in="OneSignalUser",generated_declaration))), apply_to=any(function,enum,objc_interface,objc_category,objc_protocol)) +# pragma pop_macro("any") +#endif + +#if defined(__OBJC__) +@class NSString; +@protocol OSPushSubscriptionObserver; + +/// This is the push subscription interface exposed to the public. +SWIFT_PROTOCOL("_TtP13OneSignalUser18OSPushSubscription_") +@protocol OSPushSubscription +@property (nonatomic, readonly, copy) NSString * _Nullable id; +@property (nonatomic, readonly, copy) NSString * _Nullable token; +@property (nonatomic, readonly) BOOL optedIn; +- (void)optIn; +- (void)optOut; +- (void)addObserver:(id _Nonnull)observer; +- (void)removeObserver:(id _Nonnull)observer; +@end + +@class OSPushSubscriptionState; +@class NSDictionary; + +SWIFT_CLASS("_TtC13OneSignalUser30OSPushSubscriptionChangedState") +@interface OSPushSubscriptionChangedState : NSObject +@property (nonatomic, readonly, strong) OSPushSubscriptionState * _Nonnull current; +@property (nonatomic, readonly, strong) OSPushSubscriptionState * _Nonnull previous; +@property (nonatomic, readonly, copy) NSString * _Nonnull description; +- (NSDictionary * _Nonnull)jsonRepresentation SWIFT_WARN_UNUSED_RESULT; +- (nonnull instancetype)init SWIFT_UNAVAILABLE; ++ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); +@end + + +SWIFT_PROTOCOL("_TtP13OneSignalUser26OSPushSubscriptionObserver_") +@protocol OSPushSubscriptionObserver +- (void)onPushSubscriptionDidChangeWithState:(OSPushSubscriptionChangedState * _Nonnull)state; +@end + + +SWIFT_CLASS("_TtC13OneSignalUser23OSPushSubscriptionState") +@interface OSPushSubscriptionState : NSObject +@property (nonatomic, readonly, copy) NSString * _Nullable id; +@property (nonatomic, readonly, copy) NSString * _Nullable token; +@property (nonatomic, readonly) BOOL optedIn; +@property (nonatomic, readonly, copy) NSString * _Nonnull description; +- (NSDictionary * _Nonnull)jsonRepresentation SWIFT_WARN_UNUSED_RESULT; +- (nonnull instancetype)init SWIFT_UNAVAILABLE; ++ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); +@end + + +/// This is the user interface exposed to the public. +SWIFT_PROTOCOL("_TtP13OneSignalUser6OSUser_") +@protocol OSUser +@property (nonatomic, readonly, strong) id _Nonnull pushSubscription; +- (void)addAliasWithLabel:(NSString * _Nonnull)label id:(NSString * _Nonnull)id; +- (void)addAliases:(NSDictionary * _Nonnull)aliases; +- (void)removeAlias:(NSString * _Nonnull)label; +- (void)removeAliases:(NSArray * _Nonnull)labels; +- (void)addTagWithKey:(NSString * _Nonnull)key value:(NSString * _Nonnull)value; +- (void)addTags:(NSDictionary * _Nonnull)tags; +- (void)removeTag:(NSString * _Nonnull)tag; +- (void)removeTags:(NSArray * _Nonnull)tags; +- (void)addEmail:(NSString * _Nonnull)email; +- (void)removeEmail:(NSString * _Nonnull)email; +- (void)addSms:(NSString * _Nonnull)number; +- (void)removeSms:(NSString * _Nonnull)number; +- (void)setLanguage:(NSString * _Nonnull)language; +- (void)onJwtExpiredWithExpiredHandler:(void (^ _Nonnull)(NSString * _Nonnull, SWIFT_NOESCAPE void (^ _Nonnull)(NSString * _Nonnull)))expiredHandler; +@end + + + +SWIFT_CLASS("_TtC13OneSignalUser24OneSignalUserManagerImpl") +@interface OneSignalUserManagerImpl : NSObject +SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) OneSignalUserManagerImpl * _Nonnull sharedInstance;) ++ (OneSignalUserManagerImpl * _Nonnull)sharedInstance SWIFT_WARN_UNUSED_RESULT; +@property (nonatomic, readonly, copy) NSString * _Nullable onesignalId; +@property (nonatomic, readonly, copy) NSString * _Nullable pushSubscriptionId; +@property (nonatomic, readonly, copy) NSString * _Nullable language; +@property (nonatomic) BOOL requiresUserAuth; +- (nonnull instancetype)init SWIFT_UNAVAILABLE; ++ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); +- (void)start; +- (void)loginWithExternalId:(NSString * _Nonnull)externalId token:(NSString * _Nullable)token; +/// The SDK needs to have a user at all times, so this method will create a new anonymous user. If the current user is already anonymous, calling logout results in a no-op. +- (void)logout; +- (void)clearAllModelsFromStores; +- (NSDictionary * _Nullable)getTags SWIFT_WARN_UNUSED_RESULT; +- (void)setLocationWithLatitude:(float)latitude longitude:(float)longitude; +- (void)sendPurchases:(NSArray *> * _Nonnull)purchases; +@end + + +@interface OneSignalUserManagerImpl (SWIFT_EXTENSION(OneSignalUser)) +- (void)setNotificationTypes:(int32_t)notificationTypes; +- (void)setPushToken:(NSString * _Nonnull)pushToken; +@end + +@class NSNumber; + +@interface OneSignalUserManagerImpl (SWIFT_EXTENSION(OneSignalUser)) +- (void)startNewSession; +- (void)updateSessionWithSessionCount:(NSNumber * _Nullable)sessionCount sessionTime:(NSNumber * _Nullable)sessionTime refreshDeviceMetadata:(BOOL)refreshDeviceMetadata sendImmediately:(BOOL)sendImmediately onSuccess:(void (^ _Nullable)(void))onSuccess onFailure:(void (^ _Nullable)(void))onFailure; +/// App has been backgrounded. Run background tasks such to flush the operation repo and hydrating models. +/// Need to consider app killed vs app backgrounded and handle gracefully. +- (void)runBackgroundTasks; +@end + + +@interface OneSignalUserManagerImpl (SWIFT_EXTENSION(OneSignalUser)) +- (void)addObserver:(id _Nonnull)observer; +- (void)removeObserver:(id _Nonnull)observer; +@property (nonatomic, readonly, copy) NSString * _Nullable id; +@property (nonatomic, readonly, copy) NSString * _Nullable token; +@property (nonatomic, readonly) BOOL optedIn; +/// Enable the push subscription, and prompts if needed. optedIn can still be false after optIn() is called if permission is not granted. +- (void)optIn; +- (void)optOut; +@end + + +@interface OneSignalUserManagerImpl (SWIFT_EXTENSION(OneSignalUser)) +- (void)onJwtExpiredWithExpiredHandler:(void (^ _Nonnull)(NSString * _Nonnull, SWIFT_NOESCAPE void (^ _Nonnull)(NSString * _Nonnull)))expiredHandler; +@property (nonatomic, readonly, strong) id _Nonnull User; +@property (nonatomic, readonly, strong) id _Nonnull pushSubscription; +- (void)addAliasWithLabel:(NSString * _Nonnull)label id:(NSString * _Nonnull)id; +- (void)addAliases:(NSDictionary * _Nonnull)aliases; +- (void)removeAlias:(NSString * _Nonnull)label; +- (void)removeAliases:(NSArray * _Nonnull)labels; +- (void)addTagWithKey:(NSString * _Nonnull)key value:(NSString * _Nonnull)value; +- (void)addTags:(NSDictionary * _Nonnull)tags; +- (void)removeTag:(NSString * _Nonnull)tag; +- (void)removeTags:(NSArray * _Nonnull)tags; +- (void)addEmail:(NSString * _Nonnull)email; +/// If this email doesn’t already exist on the user, it cannot be removed. +/// This will be a no-op and no request will be made. +/// Error handling needs to be implemented in the future. +- (void)removeEmail:(NSString * _Nonnull)email; +- (void)addSms:(NSString * _Nonnull)number; +/// If this email doesn’t already exist on the user, it cannot be removed. +/// This will be a no-op and no request will be made. +/// Error handling needs to be implemented in the future. +- (void)removeSms:(NSString * _Nonnull)number; +- (void)setLanguage:(NSString * _Nonnull)language; +@end + +#endif +#if defined(__cplusplus) +#endif +#if __has_attribute(external_source_symbol) +# pragma clang attribute pop +#endif +#pragma clang diagnostic pop +#endif + +#else +#error unsupported Swift architecture +#endif diff --git a/iOS_SDK/OneSignalSDK/OneSignal_User/OneSignalUser.xcframework/ios-arm64/OneSignalUser.framework/Headers/OneSignalUser.h b/iOS_SDK/OneSignalSDK/OneSignal_User/OneSignalUser.xcframework/ios-arm64/OneSignalUser.framework/Headers/OneSignalUser.h new file mode 100644 index 000000000..e677dada3 --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignal_User/OneSignalUser.xcframework/ios-arm64/OneSignalUser.framework/Headers/OneSignalUser.h @@ -0,0 +1,34 @@ +/* + Modified MIT License + + Copyright 2022 OneSignal + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + 1. The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + 2. All copies of substantial portions of the Software may only be used in connection + with services provided by OneSignal. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + */ + +#import + +//! Project version number for OneSignalUser. +FOUNDATION_EXPORT double OneSignalUserVersionNumber; + +//! Project version string for OneSignalUser. +FOUNDATION_EXPORT const unsigned char OneSignalUserVersionString[]; diff --git a/iOS_SDK/OneSignalSDK/OneSignal_User/OneSignalUser.xcframework/ios-arm64/OneSignalUser.framework/Info.plist b/iOS_SDK/OneSignalSDK/OneSignal_User/OneSignalUser.xcframework/ios-arm64/OneSignalUser.framework/Info.plist new file mode 100644 index 000000000..c15c70d0e Binary files /dev/null and b/iOS_SDK/OneSignalSDK/OneSignal_User/OneSignalUser.xcframework/ios-arm64/OneSignalUser.framework/Info.plist differ diff --git a/iOS_SDK/OneSignalSDK/OneSignal_User/OneSignalUser.xcframework/ios-arm64/OneSignalUser.framework/Modules/OneSignalUser.swiftmodule/arm64-apple-ios.abi.json b/iOS_SDK/OneSignalSDK/OneSignal_User/OneSignalUser.xcframework/ios-arm64/OneSignalUser.framework/Modules/OneSignalUser.swiftmodule/arm64-apple-ios.abi.json new file mode 100644 index 000000000..9e99e9246 --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignal_User/OneSignalUser.xcframework/ios-arm64/OneSignalUser.framework/Modules/OneSignalUser.swiftmodule/arm64-apple-ios.abi.json @@ -0,0 +1,4152 @@ +{ + "ABIRoot": { + "kind": "Root", + "name": "TopLevel", + "printedName": "TopLevel", + "children": [ + { + "kind": "Import", + "name": "Foundation", + "printedName": "Foundation", + "declKind": "Import", + "moduleName": "OneSignalUser", + "declAttributes": [ + "RawDocComment" + ] + }, + { + "kind": "Import", + "name": "OneSignalCore", + "printedName": "OneSignalCore", + "declKind": "Import", + "moduleName": "OneSignalUser" + }, + { + "kind": "Import", + "name": "OneSignalOSCore", + "printedName": "OneSignalOSCore", + "declKind": "Import", + "moduleName": "OneSignalUser" + }, + { + "kind": "Import", + "name": "OneSignalCore", + "printedName": "OneSignalCore", + "declKind": "Import", + "moduleName": "OneSignalUser", + "declAttributes": [ + "RawDocComment" + ] + }, + { + "kind": "Import", + "name": "OneSignalOSCore", + "printedName": "OneSignalOSCore", + "declKind": "Import", + "moduleName": "OneSignalUser" + }, + { + "kind": "Import", + "name": "OneSignalNotifications", + "printedName": "OneSignalNotifications", + "declKind": "Import", + "moduleName": "OneSignalUser" + }, + { + "kind": "TypeDecl", + "name": "OSUser", + "printedName": "OSUser", + "children": [ + { + "kind": "Var", + "name": "pushSubscription", + "printedName": "pushSubscription", + "children": [ + { + "kind": "TypeNominal", + "name": "OSPushSubscription", + "printedName": "OneSignalUser.OSPushSubscription", + "usr": "c:@M@OneSignalUser@objc(pl)OSPushSubscription" + } + ], + "declKind": "Var", + "usr": "c:@M@OneSignalUser@objc(pl)OSUser(py)pushSubscription", + "mangledName": "$s13OneSignalUser6OSUserP16pushSubscriptionAA06OSPushF0_pvp", + "moduleName": "OneSignalUser", + "protocolReq": true, + "declAttributes": [ + "ObjC" + ], + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "OSPushSubscription", + "printedName": "OneSignalUser.OSPushSubscription", + "usr": "c:@M@OneSignalUser@objc(pl)OSPushSubscription" + } + ], + "declKind": "Accessor", + "usr": "c:@M@OneSignalUser@objc(pl)OSUser(im)pushSubscription", + "mangledName": "$s13OneSignalUser6OSUserP16pushSubscriptionAA06OSPushF0_pvg", + "moduleName": "OneSignalUser", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalUser.OSUser>", + "sugared_genericSig": "", + "protocolReq": true, + "declAttributes": [ + "ObjC" + ], + "reqNewWitnessTableEntry": true, + "accessorKind": "get" + } + ] + }, + { + "kind": "Function", + "name": "addAlias", + "printedName": "addAlias(label:id:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Func", + "usr": "c:@M@OneSignalUser@objc(pl)OSUser(im)addAliasWithLabel:id:", + "mangledName": "$s13OneSignalUser6OSUserP8addAlias5label2idySS_SStF", + "moduleName": "OneSignalUser", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalUser.OSUser>", + "sugared_genericSig": "", + "protocolReq": true, + "declAttributes": [ + "RawDocComment", + "ObjC" + ], + "reqNewWitnessTableEntry": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "addAliases", + "printedName": "addAliases(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "Dictionary", + "printedName": "[Swift.String : Swift.String]", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:SD" + } + ], + "declKind": "Func", + "usr": "c:@M@OneSignalUser@objc(pl)OSUser(im)addAliases:", + "mangledName": "$s13OneSignalUser6OSUserP10addAliasesyySDyS2SGF", + "moduleName": "OneSignalUser", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalUser.OSUser>", + "sugared_genericSig": "", + "protocolReq": true, + "declAttributes": [ + "ObjC" + ], + "reqNewWitnessTableEntry": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "removeAlias", + "printedName": "removeAlias(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Func", + "usr": "c:@M@OneSignalUser@objc(pl)OSUser(im)removeAlias:", + "mangledName": "$s13OneSignalUser6OSUserP11removeAliasyySSF", + "moduleName": "OneSignalUser", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalUser.OSUser>", + "sugared_genericSig": "", + "protocolReq": true, + "declAttributes": [ + "ObjC" + ], + "reqNewWitnessTableEntry": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "removeAliases", + "printedName": "removeAliases(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "Array", + "printedName": "[Swift.String]", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:Sa" + } + ], + "declKind": "Func", + "usr": "c:@M@OneSignalUser@objc(pl)OSUser(im)removeAliases:", + "mangledName": "$s13OneSignalUser6OSUserP13removeAliasesyySaySSGF", + "moduleName": "OneSignalUser", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalUser.OSUser>", + "sugared_genericSig": "", + "protocolReq": true, + "declAttributes": [ + "ObjC" + ], + "reqNewWitnessTableEntry": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "addTag", + "printedName": "addTag(key:value:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Func", + "usr": "c:@M@OneSignalUser@objc(pl)OSUser(im)addTagWithKey:value:", + "mangledName": "$s13OneSignalUser6OSUserP6addTag3key5valueySS_SStF", + "moduleName": "OneSignalUser", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalUser.OSUser>", + "sugared_genericSig": "", + "protocolReq": true, + "declAttributes": [ + "RawDocComment", + "ObjC" + ], + "reqNewWitnessTableEntry": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "addTags", + "printedName": "addTags(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "Dictionary", + "printedName": "[Swift.String : Swift.String]", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:SD" + } + ], + "declKind": "Func", + "usr": "c:@M@OneSignalUser@objc(pl)OSUser(im)addTags:", + "mangledName": "$s13OneSignalUser6OSUserP7addTagsyySDyS2SGF", + "moduleName": "OneSignalUser", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalUser.OSUser>", + "sugared_genericSig": "", + "protocolReq": true, + "declAttributes": [ + "ObjC" + ], + "reqNewWitnessTableEntry": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "removeTag", + "printedName": "removeTag(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Func", + "usr": "c:@M@OneSignalUser@objc(pl)OSUser(im)removeTag:", + "mangledName": "$s13OneSignalUser6OSUserP9removeTagyySSF", + "moduleName": "OneSignalUser", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalUser.OSUser>", + "sugared_genericSig": "", + "protocolReq": true, + "declAttributes": [ + "ObjC" + ], + "reqNewWitnessTableEntry": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "removeTags", + "printedName": "removeTags(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "Array", + "printedName": "[Swift.String]", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:Sa" + } + ], + "declKind": "Func", + "usr": "c:@M@OneSignalUser@objc(pl)OSUser(im)removeTags:", + "mangledName": "$s13OneSignalUser6OSUserP10removeTagsyySaySSGF", + "moduleName": "OneSignalUser", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalUser.OSUser>", + "sugared_genericSig": "", + "protocolReq": true, + "declAttributes": [ + "ObjC" + ], + "reqNewWitnessTableEntry": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "addEmail", + "printedName": "addEmail(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Func", + "usr": "c:@M@OneSignalUser@objc(pl)OSUser(im)addEmail:", + "mangledName": "$s13OneSignalUser6OSUserP8addEmailyySSF", + "moduleName": "OneSignalUser", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalUser.OSUser>", + "sugared_genericSig": "", + "protocolReq": true, + "declAttributes": [ + "RawDocComment", + "ObjC" + ], + "reqNewWitnessTableEntry": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "removeEmail", + "printedName": "removeEmail(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Func", + "usr": "c:@M@OneSignalUser@objc(pl)OSUser(im)removeEmail:", + "mangledName": "$s13OneSignalUser6OSUserP11removeEmailyySSF", + "moduleName": "OneSignalUser", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalUser.OSUser>", + "sugared_genericSig": "", + "protocolReq": true, + "declAttributes": [ + "ObjC" + ], + "reqNewWitnessTableEntry": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "addSms", + "printedName": "addSms(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Func", + "usr": "c:@M@OneSignalUser@objc(pl)OSUser(im)addSms:", + "mangledName": "$s13OneSignalUser6OSUserP6addSmsyySSF", + "moduleName": "OneSignalUser", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalUser.OSUser>", + "sugared_genericSig": "", + "protocolReq": true, + "declAttributes": [ + "RawDocComment", + "ObjC" + ], + "reqNewWitnessTableEntry": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "removeSms", + "printedName": "removeSms(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Func", + "usr": "c:@M@OneSignalUser@objc(pl)OSUser(im)removeSms:", + "mangledName": "$s13OneSignalUser6OSUserP9removeSmsyySSF", + "moduleName": "OneSignalUser", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalUser.OSUser>", + "sugared_genericSig": "", + "protocolReq": true, + "declAttributes": [ + "ObjC" + ], + "reqNewWitnessTableEntry": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "setLanguage", + "printedName": "setLanguage(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Func", + "usr": "c:@M@OneSignalUser@objc(pl)OSUser(im)setLanguage:", + "mangledName": "$s13OneSignalUser6OSUserP11setLanguageyySSF", + "moduleName": "OneSignalUser", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalUser.OSUser>", + "sugared_genericSig": "", + "protocolReq": true, + "declAttributes": [ + "RawDocComment", + "ObjC" + ], + "reqNewWitnessTableEntry": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "onJwtExpired", + "printedName": "onJwtExpired(expiredHandler:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeFunc", + "name": "Function", + "printedName": "(Swift.String, (Swift.String) -> ()) -> ()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "Tuple", + "printedName": "(Swift.String, (Swift.String) -> ())", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + }, + { + "kind": "TypeFunc", + "name": "Function", + "printedName": "(Swift.String) -> ()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "typeAttributes": [ + "noescape" + ] + } + ] + } + ] + } + ], + "declKind": "Func", + "usr": "c:@M@OneSignalUser@objc(pl)OSUser(im)onJwtExpiredWithExpiredHandler:", + "mangledName": "$s13OneSignalUser6OSUserP12onJwtExpired14expiredHandleryySS_ySSXEtc_tF", + "moduleName": "OneSignalUser", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalUser.OSUser>", + "sugared_genericSig": "", + "protocolReq": true, + "declAttributes": [ + "ObjC" + ], + "reqNewWitnessTableEntry": true, + "funcSelfKind": "NonMutating" + } + ], + "declKind": "Protocol", + "usr": "c:@M@OneSignalUser@objc(pl)OSUser", + "mangledName": "$s13OneSignalUser6OSUserP", + "moduleName": "OneSignalUser", + "genericSig": "<τ_0_0 : AnyObject>", + "sugared_genericSig": "", + "declAttributes": [ + "AccessControl", + "ObjC", + "RawDocComment" + ] + }, + { + "kind": "TypeDecl", + "name": "OSPushSubscription", + "printedName": "OSPushSubscription", + "children": [ + { + "kind": "Var", + "name": "id", + "printedName": "id", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "Swift.String?", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Var", + "usr": "c:@M@OneSignalUser@objc(pl)OSPushSubscription(py)id", + "mangledName": "$s13OneSignalUser18OSPushSubscriptionP2idSSSgvp", + "moduleName": "OneSignalUser", + "protocolReq": true, + "declAttributes": [ + "ObjC" + ], + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "Swift.String?", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Accessor", + "usr": "c:@M@OneSignalUser@objc(pl)OSPushSubscription(im)id", + "mangledName": "$s13OneSignalUser18OSPushSubscriptionP2idSSSgvg", + "moduleName": "OneSignalUser", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalUser.OSPushSubscription>", + "sugared_genericSig": "", + "protocolReq": true, + "declAttributes": [ + "ObjC" + ], + "reqNewWitnessTableEntry": true, + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "token", + "printedName": "token", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "Swift.String?", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Var", + "usr": "c:@M@OneSignalUser@objc(pl)OSPushSubscription(py)token", + "mangledName": "$s13OneSignalUser18OSPushSubscriptionP5tokenSSSgvp", + "moduleName": "OneSignalUser", + "protocolReq": true, + "declAttributes": [ + "ObjC" + ], + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "Swift.String?", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Accessor", + "usr": "c:@M@OneSignalUser@objc(pl)OSPushSubscription(im)token", + "mangledName": "$s13OneSignalUser18OSPushSubscriptionP5tokenSSSgvg", + "moduleName": "OneSignalUser", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalUser.OSPushSubscription>", + "sugared_genericSig": "", + "protocolReq": true, + "declAttributes": [ + "ObjC" + ], + "reqNewWitnessTableEntry": true, + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "optedIn", + "printedName": "optedIn", + "children": [ + { + "kind": "TypeNominal", + "name": "Bool", + "printedName": "Swift.Bool", + "usr": "s:Sb" + } + ], + "declKind": "Var", + "usr": "c:@M@OneSignalUser@objc(pl)OSPushSubscription(py)optedIn", + "mangledName": "$s13OneSignalUser18OSPushSubscriptionP7optedInSbvp", + "moduleName": "OneSignalUser", + "protocolReq": true, + "declAttributes": [ + "ObjC" + ], + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "Bool", + "printedName": "Swift.Bool", + "usr": "s:Sb" + } + ], + "declKind": "Accessor", + "usr": "c:@M@OneSignalUser@objc(pl)OSPushSubscription(im)optedIn", + "mangledName": "$s13OneSignalUser18OSPushSubscriptionP7optedInSbvg", + "moduleName": "OneSignalUser", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalUser.OSPushSubscription>", + "sugared_genericSig": "", + "protocolReq": true, + "declAttributes": [ + "ObjC" + ], + "reqNewWitnessTableEntry": true, + "accessorKind": "get" + } + ] + }, + { + "kind": "Function", + "name": "optIn", + "printedName": "optIn()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + } + ], + "declKind": "Func", + "usr": "c:@M@OneSignalUser@objc(pl)OSPushSubscription(im)optIn", + "mangledName": "$s13OneSignalUser18OSPushSubscriptionP5optInyyF", + "moduleName": "OneSignalUser", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalUser.OSPushSubscription>", + "sugared_genericSig": "", + "protocolReq": true, + "declAttributes": [ + "ObjC" + ], + "reqNewWitnessTableEntry": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "optOut", + "printedName": "optOut()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + } + ], + "declKind": "Func", + "usr": "c:@M@OneSignalUser@objc(pl)OSPushSubscription(im)optOut", + "mangledName": "$s13OneSignalUser18OSPushSubscriptionP6optOutyyF", + "moduleName": "OneSignalUser", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalUser.OSPushSubscription>", + "sugared_genericSig": "", + "protocolReq": true, + "declAttributes": [ + "ObjC" + ], + "reqNewWitnessTableEntry": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "addObserver", + "printedName": "addObserver(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "OSPushSubscriptionObserver", + "printedName": "OneSignalUser.OSPushSubscriptionObserver", + "usr": "c:@M@OneSignalUser@objc(pl)OSPushSubscriptionObserver" + } + ], + "declKind": "Func", + "usr": "c:@M@OneSignalUser@objc(pl)OSPushSubscription(im)addObserver:", + "mangledName": "$s13OneSignalUser18OSPushSubscriptionP11addObserveryyAA0deG0_pF", + "moduleName": "OneSignalUser", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalUser.OSPushSubscription>", + "sugared_genericSig": "", + "protocolReq": true, + "declAttributes": [ + "ObjC" + ], + "reqNewWitnessTableEntry": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "removeObserver", + "printedName": "removeObserver(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "OSPushSubscriptionObserver", + "printedName": "OneSignalUser.OSPushSubscriptionObserver", + "usr": "c:@M@OneSignalUser@objc(pl)OSPushSubscriptionObserver" + } + ], + "declKind": "Func", + "usr": "c:@M@OneSignalUser@objc(pl)OSPushSubscription(im)removeObserver:", + "mangledName": "$s13OneSignalUser18OSPushSubscriptionP14removeObserveryyAA0deG0_pF", + "moduleName": "OneSignalUser", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalUser.OSPushSubscription>", + "sugared_genericSig": "", + "protocolReq": true, + "declAttributes": [ + "ObjC" + ], + "reqNewWitnessTableEntry": true, + "funcSelfKind": "NonMutating" + } + ], + "declKind": "Protocol", + "usr": "c:@M@OneSignalUser@objc(pl)OSPushSubscription", + "mangledName": "$s13OneSignalUser18OSPushSubscriptionP", + "moduleName": "OneSignalUser", + "genericSig": "<τ_0_0 : AnyObject>", + "sugared_genericSig": "", + "declAttributes": [ + "AccessControl", + "ObjC", + "RawDocComment" + ] + }, + { + "kind": "TypeDecl", + "name": "OneSignalUserManagerImpl", + "printedName": "OneSignalUserManagerImpl", + "children": [ + { + "kind": "Var", + "name": "sharedInstance", + "printedName": "sharedInstance", + "children": [ + { + "kind": "TypeNominal", + "name": "OneSignalUserManagerImpl", + "printedName": "OneSignalUser.OneSignalUserManagerImpl", + "usr": "c:@M@OneSignalUser@objc(cs)OneSignalUserManagerImpl" + } + ], + "declKind": "Var", + "usr": "c:@M@OneSignalUser@objc(cs)OneSignalUserManagerImpl(cpy)sharedInstance", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC14sharedInstanceACvpZ", + "moduleName": "OneSignalUser", + "static": true, + "declAttributes": [ + "HasInitialValue", + "Final", + "HasStorage", + "AccessControl", + "ObjC" + ], + "isLet": true, + "hasStorage": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "OneSignalUserManagerImpl", + "printedName": "OneSignalUser.OneSignalUserManagerImpl", + "usr": "c:@M@OneSignalUser@objc(cs)OneSignalUserManagerImpl" + } + ], + "declKind": "Accessor", + "usr": "c:@M@OneSignalUser@objc(cs)OneSignalUserManagerImpl(cm)sharedInstance", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC14sharedInstanceACvgZ", + "moduleName": "OneSignalUser", + "static": true, + "implicit": true, + "declAttributes": [ + "Final", + "ObjC" + ], + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "onesignalId", + "printedName": "onesignalId", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "Swift.String?", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Var", + "usr": "c:@M@OneSignalUser@objc(cs)OneSignalUserManagerImpl(py)onesignalId", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC11onesignalIdSSSgvp", + "moduleName": "OneSignalUser", + "declAttributes": [ + "AccessControl", + "ObjC" + ], + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "Swift.String?", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Accessor", + "usr": "c:@M@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)onesignalId", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC11onesignalIdSSSgvg", + "moduleName": "OneSignalUser", + "declAttributes": [ + "ObjC" + ], + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "pushSubscriptionId", + "printedName": "pushSubscriptionId", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "Swift.String?", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Var", + "usr": "c:@M@OneSignalUser@objc(cs)OneSignalUserManagerImpl(py)pushSubscriptionId", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC18pushSubscriptionIdSSSgvp", + "moduleName": "OneSignalUser", + "declAttributes": [ + "AccessControl", + "ObjC" + ], + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "Swift.String?", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Accessor", + "usr": "c:@M@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)pushSubscriptionId", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC18pushSubscriptionIdSSSgvg", + "moduleName": "OneSignalUser", + "declAttributes": [ + "ObjC" + ], + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "language", + "printedName": "language", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "Swift.String?", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Var", + "usr": "c:@M@OneSignalUser@objc(cs)OneSignalUserManagerImpl(py)language", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC8languageSSSgvp", + "moduleName": "OneSignalUser", + "declAttributes": [ + "AccessControl", + "ObjC" + ], + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "Swift.String?", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Accessor", + "usr": "c:@M@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)language", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC8languageSSSgvg", + "moduleName": "OneSignalUser", + "declAttributes": [ + "ObjC" + ], + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "requiresUserAuth", + "printedName": "requiresUserAuth", + "children": [ + { + "kind": "TypeNominal", + "name": "Bool", + "printedName": "Swift.Bool", + "usr": "s:Sb" + } + ], + "declKind": "Var", + "usr": "c:@M@OneSignalUser@objc(cs)OneSignalUserManagerImpl(py)requiresUserAuth", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC08requiresC4AuthSbvp", + "moduleName": "OneSignalUser", + "declAttributes": [ + "HasInitialValue", + "HasStorage", + "AccessControl", + "ObjC" + ], + "hasStorage": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "Bool", + "printedName": "Swift.Bool", + "usr": "s:Sb" + } + ], + "declKind": "Accessor", + "usr": "c:@M@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)requiresUserAuth", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC08requiresC4AuthSbvg", + "moduleName": "OneSignalUser", + "implicit": true, + "declAttributes": [ + "ObjC" + ], + "accessorKind": "get" + }, + { + "kind": "Accessor", + "name": "Set", + "printedName": "Set()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "Bool", + "printedName": "Swift.Bool", + "usr": "s:Sb" + } + ], + "declKind": "Accessor", + "usr": "c:@M@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)setRequiresUserAuth:", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC08requiresC4AuthSbvs", + "moduleName": "OneSignalUser", + "implicit": true, + "declAttributes": [ + "ObjC" + ], + "accessorKind": "set" + }, + { + "kind": "Accessor", + "name": "Modify", + "printedName": "Modify()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + } + ], + "declKind": "Accessor", + "usr": "s:13OneSignalUser0abC11ManagerImplC08requiresC4AuthSbvM", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC08requiresC4AuthSbvM", + "moduleName": "OneSignalUser", + "implicit": true, + "accessorKind": "_modify" + } + ] + }, + { + "kind": "Function", + "name": "start", + "printedName": "start()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + } + ], + "declKind": "Func", + "usr": "c:@M@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)start", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC5startyyF", + "moduleName": "OneSignalUser", + "declAttributes": [ + "AccessControl", + "ObjC", + "RawDocComment" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "login", + "printedName": "login(externalId:token:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + }, + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "Swift.String?", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Func", + "usr": "c:@M@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)loginWithExternalId:token:", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC5login10externalId5tokenySS_SSSgtF", + "moduleName": "OneSignalUser", + "objc_name": "loginWithExternalId:token:", + "declAttributes": [ + "ObjC", + "AccessControl" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "logout", + "printedName": "logout()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + } + ], + "declKind": "Func", + "usr": "c:@M@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)logout", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC6logoutyyF", + "moduleName": "OneSignalUser", + "objc_name": "logout", + "declAttributes": [ + "ObjC", + "AccessControl", + "RawDocComment" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "_logout", + "printedName": "_logout()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + } + ], + "declKind": "Func", + "usr": "s:13OneSignalUser0abC11ManagerImplC7_logoutyyF", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC7_logoutyyF", + "moduleName": "OneSignalUser", + "declAttributes": [ + "AccessControl" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "clearAllModelsFromStores", + "printedName": "clearAllModelsFromStores()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + } + ], + "declKind": "Func", + "usr": "c:@M@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)clearAllModelsFromStores", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC24clearAllModelsFromStoresyyF", + "moduleName": "OneSignalUser", + "declAttributes": [ + "AccessControl", + "ObjC" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "getTags", + "printedName": "getTags()", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "[Swift.String : Swift.String]?", + "children": [ + { + "kind": "TypeNominal", + "name": "Dictionary", + "printedName": "[Swift.String : Swift.String]", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:SD" + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Func", + "usr": "c:@M@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)getTags", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC7getTagsSDyS2SGSgyF", + "moduleName": "OneSignalUser", + "declAttributes": [ + "AccessControl", + "ObjC" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "setLocation", + "printedName": "setLocation(latitude:longitude:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "Float", + "printedName": "Swift.Float", + "usr": "s:Sf" + }, + { + "kind": "TypeNominal", + "name": "Float", + "printedName": "Swift.Float", + "usr": "s:Sf" + } + ], + "declKind": "Func", + "usr": "c:@M@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)setLocationWithLatitude:longitude:", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC11setLocation8latitude9longitudeySf_SftF", + "moduleName": "OneSignalUser", + "objc_name": "setLocationWithLatitude:longitude:", + "declAttributes": [ + "ObjC", + "AccessControl" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "sendPurchases", + "printedName": "sendPurchases(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "Array", + "printedName": "[[Swift.String : AnyObject]]", + "children": [ + { + "kind": "TypeNominal", + "name": "Dictionary", + "printedName": "[Swift.String : AnyObject]", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + }, + { + "kind": "TypeNominal", + "name": "ProtocolComposition", + "printedName": "AnyObject" + } + ], + "usr": "s:SD" + } + ], + "usr": "s:Sa" + } + ], + "declKind": "Func", + "usr": "c:@M@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)sendPurchases:", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC13sendPurchasesyySaySDySSyXlGGF", + "moduleName": "OneSignalUser", + "objc_name": "sendPurchases:", + "declAttributes": [ + "ObjC", + "AccessControl" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "startNewSession", + "printedName": "startNewSession()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + } + ], + "declKind": "Func", + "usr": "c:@CM@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)startNewSession", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC15startNewSessionyyF", + "moduleName": "OneSignalUser", + "declAttributes": [ + "Dynamic", + "AccessControl", + "ObjC" + ], + "isFromExtension": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "updateSession", + "printedName": "updateSession(sessionCount:sessionTime:refreshDeviceMetadata:sendImmediately:onSuccess:onFailure:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "Foundation.NSNumber?", + "children": [ + { + "kind": "TypeNominal", + "name": "NSNumber", + "printedName": "Foundation.NSNumber", + "usr": "c:objc(cs)NSNumber" + } + ], + "usr": "s:Sq" + }, + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "Foundation.NSNumber?", + "children": [ + { + "kind": "TypeNominal", + "name": "NSNumber", + "printedName": "Foundation.NSNumber", + "usr": "c:objc(cs)NSNumber" + } + ], + "usr": "s:Sq" + }, + { + "kind": "TypeNominal", + "name": "Bool", + "printedName": "Swift.Bool", + "usr": "s:Sb" + }, + { + "kind": "TypeNominal", + "name": "Bool", + "printedName": "Swift.Bool", + "hasDefaultArg": true, + "usr": "s:Sb" + }, + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "(() -> ())?", + "children": [ + { + "kind": "TypeFunc", + "name": "Function", + "printedName": "() -> ()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + } + ] + } + ], + "hasDefaultArg": true, + "usr": "s:Sq" + }, + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "(() -> ())?", + "children": [ + { + "kind": "TypeFunc", + "name": "Function", + "printedName": "() -> ()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + } + ] + } + ], + "hasDefaultArg": true, + "usr": "s:Sq" + } + ], + "declKind": "Func", + "usr": "c:@CM@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)updateSessionWithSessionCount:sessionTime:refreshDeviceMetadata:sendImmediately:onSuccess:onFailure:", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC13updateSession12sessionCount0H4Time21refreshDeviceMetadata15sendImmediately9onSuccess0P7FailureySo8NSNumberCSg_AMS2byycSgANtF", + "moduleName": "OneSignalUser", + "objc_name": "updateSessionWithSessionCount:sessionTime:refreshDeviceMetadata:sendImmediately:onSuccess:onFailure:", + "declAttributes": [ + "Dynamic", + "AccessControl", + "ObjC" + ], + "isFromExtension": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "runBackgroundTasks", + "printedName": "runBackgroundTasks()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + } + ], + "declKind": "Func", + "usr": "c:@CM@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)runBackgroundTasks", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC18runBackgroundTasksyyF", + "moduleName": "OneSignalUser", + "declAttributes": [ + "Dynamic", + "AccessControl", + "ObjC", + "RawDocComment" + ], + "isFromExtension": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "onJwtExpired", + "printedName": "onJwtExpired(expiredHandler:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeFunc", + "name": "Function", + "printedName": "(Swift.String, (Swift.String) -> ()) -> ()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "Tuple", + "printedName": "(Swift.String, (Swift.String) -> ())", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + }, + { + "kind": "TypeFunc", + "name": "Function", + "printedName": "(Swift.String) -> ()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "typeAttributes": [ + "noescape" + ] + } + ] + } + ] + } + ], + "declKind": "Func", + "usr": "c:@CM@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)onJwtExpiredWithExpiredHandler:", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC12onJwtExpired14expiredHandleryySS_ySSXEtc_tF", + "moduleName": "OneSignalUser", + "objc_name": "onJwtExpiredWithExpiredHandler:", + "declAttributes": [ + "Dynamic", + "ObjC", + "AccessControl" + ], + "isFromExtension": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Var", + "name": "User", + "printedName": "User", + "children": [ + { + "kind": "TypeNominal", + "name": "OSUser", + "printedName": "OneSignalUser.OSUser", + "usr": "c:@M@OneSignalUser@objc(pl)OSUser" + } + ], + "declKind": "Var", + "usr": "c:@CM@OneSignalUser@objc(cs)OneSignalUserManagerImpl(py)User", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC0C0AA6OSUser_pvp", + "moduleName": "OneSignalUser", + "objc_name": "User", + "declAttributes": [ + "Dynamic", + "ObjC", + "AccessControl" + ], + "isFromExtension": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "OSUser", + "printedName": "OneSignalUser.OSUser", + "usr": "c:@M@OneSignalUser@objc(pl)OSUser" + } + ], + "declKind": "Accessor", + "usr": "c:@CM@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)User", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC0C0AA6OSUser_pvg", + "moduleName": "OneSignalUser", + "objc_name": "User", + "declAttributes": [ + "Dynamic", + "ObjC" + ], + "isFromExtension": true, + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "pushSubscription", + "printedName": "pushSubscription", + "children": [ + { + "kind": "TypeNominal", + "name": "OSPushSubscription", + "printedName": "OneSignalUser.OSPushSubscription", + "usr": "c:@M@OneSignalUser@objc(pl)OSPushSubscription" + } + ], + "declKind": "Var", + "usr": "c:@CM@OneSignalUser@objc(cs)OneSignalUserManagerImpl(py)pushSubscription", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC16pushSubscriptionAA06OSPushG0_pvp", + "moduleName": "OneSignalUser", + "objc_name": "pushSubscription", + "declAttributes": [ + "Dynamic", + "ObjC", + "AccessControl" + ], + "isFromExtension": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "OSPushSubscription", + "printedName": "OneSignalUser.OSPushSubscription", + "usr": "c:@M@OneSignalUser@objc(pl)OSPushSubscription" + } + ], + "declKind": "Accessor", + "usr": "c:@CM@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)pushSubscription", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC16pushSubscriptionAA06OSPushG0_pvg", + "moduleName": "OneSignalUser", + "objc_name": "pushSubscription", + "declAttributes": [ + "Dynamic", + "ObjC" + ], + "isFromExtension": true, + "accessorKind": "get" + } + ] + }, + { + "kind": "Function", + "name": "addAlias", + "printedName": "addAlias(label:id:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Func", + "usr": "c:@CM@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)addAliasWithLabel:id:", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC8addAlias5label2idySS_SStF", + "moduleName": "OneSignalUser", + "objc_name": "addAliasWithLabel:id:", + "declAttributes": [ + "Dynamic", + "ObjC", + "AccessControl" + ], + "isFromExtension": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "addAliases", + "printedName": "addAliases(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "Dictionary", + "printedName": "[Swift.String : Swift.String]", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:SD" + } + ], + "declKind": "Func", + "usr": "c:@CM@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)addAliases:", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC10addAliasesyySDyS2SGF", + "moduleName": "OneSignalUser", + "objc_name": "addAliases:", + "declAttributes": [ + "Dynamic", + "ObjC", + "AccessControl" + ], + "isFromExtension": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "removeAlias", + "printedName": "removeAlias(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Func", + "usr": "c:@CM@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)removeAlias:", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC11removeAliasyySSF", + "moduleName": "OneSignalUser", + "objc_name": "removeAlias:", + "declAttributes": [ + "Dynamic", + "ObjC", + "AccessControl" + ], + "isFromExtension": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "removeAliases", + "printedName": "removeAliases(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "Array", + "printedName": "[Swift.String]", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:Sa" + } + ], + "declKind": "Func", + "usr": "c:@CM@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)removeAliases:", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC13removeAliasesyySaySSGF", + "moduleName": "OneSignalUser", + "objc_name": "removeAliases:", + "declAttributes": [ + "Dynamic", + "ObjC", + "AccessControl" + ], + "isFromExtension": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "addTag", + "printedName": "addTag(key:value:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Func", + "usr": "c:@CM@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)addTagWithKey:value:", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC6addTag3key5valueySS_SStF", + "moduleName": "OneSignalUser", + "objc_name": "addTagWithKey:value:", + "declAttributes": [ + "Dynamic", + "ObjC", + "AccessControl" + ], + "isFromExtension": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "addTags", + "printedName": "addTags(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "Dictionary", + "printedName": "[Swift.String : Swift.String]", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:SD" + } + ], + "declKind": "Func", + "usr": "c:@CM@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)addTags:", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC7addTagsyySDyS2SGF", + "moduleName": "OneSignalUser", + "objc_name": "addTags:", + "declAttributes": [ + "Dynamic", + "ObjC", + "AccessControl" + ], + "isFromExtension": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "removeTag", + "printedName": "removeTag(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Func", + "usr": "c:@CM@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)removeTag:", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC9removeTagyySSF", + "moduleName": "OneSignalUser", + "objc_name": "removeTag:", + "declAttributes": [ + "Dynamic", + "ObjC", + "AccessControl" + ], + "isFromExtension": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "removeTags", + "printedName": "removeTags(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "Array", + "printedName": "[Swift.String]", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:Sa" + } + ], + "declKind": "Func", + "usr": "c:@CM@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)removeTags:", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC10removeTagsyySaySSGF", + "moduleName": "OneSignalUser", + "objc_name": "removeTags:", + "declAttributes": [ + "Dynamic", + "ObjC", + "AccessControl" + ], + "isFromExtension": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "addEmail", + "printedName": "addEmail(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Func", + "usr": "c:@CM@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)addEmail:", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC8addEmailyySSF", + "moduleName": "OneSignalUser", + "objc_name": "addEmail:", + "declAttributes": [ + "Dynamic", + "ObjC", + "AccessControl" + ], + "isFromExtension": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "removeEmail", + "printedName": "removeEmail(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Func", + "usr": "c:@CM@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)removeEmail:", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC11removeEmailyySSF", + "moduleName": "OneSignalUser", + "objc_name": "removeEmail:", + "declAttributes": [ + "Dynamic", + "ObjC", + "AccessControl", + "RawDocComment" + ], + "isFromExtension": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "addSms", + "printedName": "addSms(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Func", + "usr": "c:@CM@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)addSms:", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC6addSmsyySSF", + "moduleName": "OneSignalUser", + "objc_name": "addSms:", + "declAttributes": [ + "Dynamic", + "ObjC", + "AccessControl" + ], + "isFromExtension": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "removeSms", + "printedName": "removeSms(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Func", + "usr": "c:@CM@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)removeSms:", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC9removeSmsyySSF", + "moduleName": "OneSignalUser", + "objc_name": "removeSms:", + "declAttributes": [ + "Dynamic", + "ObjC", + "AccessControl", + "RawDocComment" + ], + "isFromExtension": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "setLanguage", + "printedName": "setLanguage(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Func", + "usr": "c:@CM@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)setLanguage:", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC11setLanguageyySSF", + "moduleName": "OneSignalUser", + "objc_name": "setLanguage:", + "declAttributes": [ + "Dynamic", + "ObjC", + "AccessControl" + ], + "isFromExtension": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "addObserver", + "printedName": "addObserver(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "OSPushSubscriptionObserver", + "printedName": "OneSignalUser.OSPushSubscriptionObserver", + "usr": "c:@M@OneSignalUser@objc(pl)OSPushSubscriptionObserver" + } + ], + "declKind": "Func", + "usr": "c:@CM@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)addObserver:", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC11addObserveryyAA018OSPushSubscriptionG0_pF", + "moduleName": "OneSignalUser", + "objc_name": "addObserver:", + "declAttributes": [ + "Dynamic", + "ObjC", + "AccessControl" + ], + "isFromExtension": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "removeObserver", + "printedName": "removeObserver(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "OSPushSubscriptionObserver", + "printedName": "OneSignalUser.OSPushSubscriptionObserver", + "usr": "c:@M@OneSignalUser@objc(pl)OSPushSubscriptionObserver" + } + ], + "declKind": "Func", + "usr": "c:@CM@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)removeObserver:", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC14removeObserveryyAA018OSPushSubscriptionG0_pF", + "moduleName": "OneSignalUser", + "objc_name": "removeObserver:", + "declAttributes": [ + "Dynamic", + "ObjC", + "AccessControl" + ], + "isFromExtension": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Var", + "name": "id", + "printedName": "id", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "Swift.String?", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Var", + "usr": "c:@CM@OneSignalUser@objc(cs)OneSignalUserManagerImpl(py)id", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC2idSSSgvp", + "moduleName": "OneSignalUser", + "objc_name": "id", + "declAttributes": [ + "Dynamic", + "ObjC", + "AccessControl" + ], + "isFromExtension": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "Swift.String?", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Accessor", + "usr": "c:@CM@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)id", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC2idSSSgvg", + "moduleName": "OneSignalUser", + "objc_name": "id", + "declAttributes": [ + "Dynamic", + "ObjC" + ], + "isFromExtension": true, + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "token", + "printedName": "token", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "Swift.String?", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Var", + "usr": "c:@CM@OneSignalUser@objc(cs)OneSignalUserManagerImpl(py)token", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC5tokenSSSgvp", + "moduleName": "OneSignalUser", + "objc_name": "token", + "declAttributes": [ + "Dynamic", + "ObjC", + "AccessControl" + ], + "isFromExtension": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "Swift.String?", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Accessor", + "usr": "c:@CM@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)token", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC5tokenSSSgvg", + "moduleName": "OneSignalUser", + "objc_name": "token", + "declAttributes": [ + "Dynamic", + "ObjC" + ], + "isFromExtension": true, + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "optedIn", + "printedName": "optedIn", + "children": [ + { + "kind": "TypeNominal", + "name": "Bool", + "printedName": "Swift.Bool", + "usr": "s:Sb" + } + ], + "declKind": "Var", + "usr": "c:@CM@OneSignalUser@objc(cs)OneSignalUserManagerImpl(py)optedIn", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC7optedInSbvp", + "moduleName": "OneSignalUser", + "objc_name": "optedIn", + "declAttributes": [ + "Dynamic", + "ObjC", + "AccessControl" + ], + "isFromExtension": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "Bool", + "printedName": "Swift.Bool", + "usr": "s:Sb" + } + ], + "declKind": "Accessor", + "usr": "c:@CM@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)optedIn", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC7optedInSbvg", + "moduleName": "OneSignalUser", + "objc_name": "optedIn", + "declAttributes": [ + "Dynamic", + "ObjC" + ], + "isFromExtension": true, + "accessorKind": "get" + } + ] + }, + { + "kind": "Function", + "name": "optIn", + "printedName": "optIn()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + } + ], + "declKind": "Func", + "usr": "c:@CM@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)optIn", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC5optInyyF", + "moduleName": "OneSignalUser", + "objc_name": "optIn", + "declAttributes": [ + "Dynamic", + "ObjC", + "AccessControl", + "RawDocComment" + ], + "isFromExtension": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "optOut", + "printedName": "optOut()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + } + ], + "declKind": "Func", + "usr": "c:@CM@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)optOut", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC6optOutyyF", + "moduleName": "OneSignalUser", + "objc_name": "optOut", + "declAttributes": [ + "Dynamic", + "ObjC", + "AccessControl" + ], + "isFromExtension": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "setNotificationTypes", + "printedName": "setNotificationTypes(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "Int32", + "printedName": "Swift.Int32", + "usr": "s:s5Int32V" + } + ], + "declKind": "Func", + "usr": "c:@CM@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)setNotificationTypes:", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC20setNotificationTypesyys5Int32VF", + "moduleName": "OneSignalUser", + "objc_name": "setNotificationTypes:", + "declAttributes": [ + "Dynamic", + "ObjC", + "AccessControl", + "RawDocComment" + ], + "isFromExtension": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "setPushToken", + "printedName": "setPushToken(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Func", + "usr": "c:@CM@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)setPushToken:", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC12setPushTokenyySSF", + "moduleName": "OneSignalUser", + "objc_name": "setPushToken:", + "declAttributes": [ + "Dynamic", + "ObjC", + "AccessControl" + ], + "isFromExtension": true, + "funcSelfKind": "NonMutating" + } + ], + "declKind": "Class", + "usr": "c:@M@OneSignalUser@objc(cs)OneSignalUserManagerImpl", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC", + "moduleName": "OneSignalUser", + "declAttributes": [ + "AccessControl", + "ObjC" + ], + "superclassUsr": "c:objc(cs)NSObject", + "hasMissingDesignatedInitializers": true, + "inheritsConvenienceInitializers": true, + "superclassNames": [ + "ObjectiveC.NSObject" + ], + "conformances": [ + { + "kind": "Conformance", + "name": "Equatable", + "printedName": "Equatable", + "usr": "s:SQ", + "mangledName": "$sSQ" + }, + { + "kind": "Conformance", + "name": "Hashable", + "printedName": "Hashable", + "usr": "s:SH", + "mangledName": "$sSH" + }, + { + "kind": "Conformance", + "name": "CVarArg", + "printedName": "CVarArg", + "usr": "s:s7CVarArgP", + "mangledName": "$ss7CVarArgP" + }, + { + "kind": "Conformance", + "name": "_KeyValueCodingAndObservingPublishing", + "printedName": "_KeyValueCodingAndObservingPublishing", + "usr": "s:10Foundation37_KeyValueCodingAndObservingPublishingP", + "mangledName": "$s10Foundation37_KeyValueCodingAndObservingPublishingP" + }, + { + "kind": "Conformance", + "name": "_KeyValueCodingAndObserving", + "printedName": "_KeyValueCodingAndObserving", + "usr": "s:10Foundation27_KeyValueCodingAndObservingP", + "mangledName": "$s10Foundation27_KeyValueCodingAndObservingP" + }, + { + "kind": "Conformance", + "name": "CustomStringConvertible", + "printedName": "CustomStringConvertible", + "usr": "s:s23CustomStringConvertibleP", + "mangledName": "$ss23CustomStringConvertibleP" + }, + { + "kind": "Conformance", + "name": "CustomDebugStringConvertible", + "printedName": "CustomDebugStringConvertible", + "usr": "s:s28CustomDebugStringConvertibleP", + "mangledName": "$ss28CustomDebugStringConvertibleP" + }, + { + "kind": "Conformance", + "name": "OSUser", + "printedName": "OSUser", + "usr": "c:@M@OneSignalUser@objc(pl)OSUser", + "mangledName": "$s13OneSignalUser6OSUserP" + }, + { + "kind": "Conformance", + "name": "OSPushSubscription", + "printedName": "OSPushSubscription", + "usr": "c:@M@OneSignalUser@objc(pl)OSPushSubscription", + "mangledName": "$s13OneSignalUser18OSPushSubscriptionP" + } + ] + }, + { + "kind": "Import", + "name": "Foundation", + "printedName": "Foundation", + "declKind": "Import", + "moduleName": "OneSignalUser", + "declAttributes": [ + "RawDocComment" + ] + }, + { + "kind": "Import", + "name": "OneSignalOSCore", + "printedName": "OneSignalOSCore", + "declKind": "Import", + "moduleName": "OneSignalUser" + }, + { + "kind": "Import", + "name": "OneSignalCore", + "printedName": "OneSignalCore", + "declKind": "Import", + "moduleName": "OneSignalUser" + }, + { + "kind": "Import", + "name": "OneSignalOSCore", + "printedName": "OneSignalOSCore", + "declKind": "Import", + "moduleName": "OneSignalUser", + "declAttributes": [ + "RawDocComment" + ] + }, + { + "kind": "Import", + "name": "OneSignalCore", + "printedName": "OneSignalCore", + "declKind": "Import", + "moduleName": "OneSignalUser" + }, + { + "kind": "Import", + "name": "Foundation", + "printedName": "Foundation", + "declKind": "Import", + "moduleName": "OneSignalUser", + "declAttributes": [ + "RawDocComment" + ] + }, + { + "kind": "Import", + "name": "OneSignalCore", + "printedName": "OneSignalCore", + "declKind": "Import", + "moduleName": "OneSignalUser" + }, + { + "kind": "Import", + "name": "OneSignalOSCore", + "printedName": "OneSignalOSCore", + "declKind": "Import", + "moduleName": "OneSignalUser" + }, + { + "kind": "Import", + "name": "OneSignalCore", + "printedName": "OneSignalCore", + "declKind": "Import", + "moduleName": "OneSignalUser", + "declAttributes": [ + "RawDocComment" + ] + }, + { + "kind": "Import", + "name": "OneSignalOSCore", + "printedName": "OneSignalOSCore", + "declKind": "Import", + "moduleName": "OneSignalUser" + }, + { + "kind": "Import", + "name": "OneSignalOSCore", + "printedName": "OneSignalOSCore", + "declKind": "Import", + "moduleName": "OneSignalUser", + "declAttributes": [ + "RawDocComment" + ] + }, + { + "kind": "Import", + "name": "OneSignalCore", + "printedName": "OneSignalCore", + "declKind": "Import", + "moduleName": "OneSignalUser" + }, + { + "kind": "Import", + "name": "Foundation", + "printedName": "Foundation", + "declKind": "Import", + "moduleName": "OneSignalUser", + "declAttributes": [ + "RawDocComment" + ] + }, + { + "kind": "Import", + "name": "OneSignalCore", + "printedName": "OneSignalCore", + "declKind": "Import", + "moduleName": "OneSignalUser" + }, + { + "kind": "Import", + "name": "OneSignalOSCore", + "printedName": "OneSignalOSCore", + "declKind": "Import", + "moduleName": "OneSignalUser" + }, + { + "kind": "Import", + "name": "OneSignalNotifications", + "printedName": "OneSignalNotifications", + "declKind": "Import", + "moduleName": "OneSignalUser" + }, + { + "kind": "TypeDecl", + "name": "OSPushSubscriptionObserver", + "printedName": "OSPushSubscriptionObserver", + "children": [ + { + "kind": "Function", + "name": "onPushSubscriptionDidChange", + "printedName": "onPushSubscriptionDidChange(state:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "OSPushSubscriptionChangedState", + "printedName": "OneSignalUser.OSPushSubscriptionChangedState", + "usr": "c:@M@OneSignalUser@objc(cs)OSPushSubscriptionChangedState" + } + ], + "declKind": "Func", + "usr": "c:@M@OneSignalUser@objc(pl)OSPushSubscriptionObserver(im)onPushSubscriptionDidChangeWithState:", + "mangledName": "$s13OneSignalUser26OSPushSubscriptionObserverP06onPushE9DidChange5stateyAA0dE12ChangedStateC_tF", + "moduleName": "OneSignalUser", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalUser.OSPushSubscriptionObserver>", + "sugared_genericSig": "", + "protocolReq": true, + "objc_name": "onPushSubscriptionDidChangeWithState:", + "declAttributes": [ + "ObjC", + "RawDocComment" + ], + "reqNewWitnessTableEntry": true, + "funcSelfKind": "NonMutating" + } + ], + "declKind": "Protocol", + "usr": "c:@M@OneSignalUser@objc(pl)OSPushSubscriptionObserver", + "mangledName": "$s13OneSignalUser26OSPushSubscriptionObserverP", + "moduleName": "OneSignalUser", + "genericSig": "<τ_0_0 : AnyObject>", + "sugared_genericSig": "", + "declAttributes": [ + "AccessControl", + "ObjC", + "RawDocComment" + ] + }, + { + "kind": "TypeDecl", + "name": "OSPushSubscriptionState", + "printedName": "OSPushSubscriptionState", + "children": [ + { + "kind": "Var", + "name": "id", + "printedName": "id", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "Swift.String?", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Var", + "usr": "c:@M@OneSignalUser@objc(cs)OSPushSubscriptionState(py)id", + "mangledName": "$s13OneSignalUser23OSPushSubscriptionStateC2idSSSgvp", + "moduleName": "OneSignalUser", + "declAttributes": [ + "Final", + "HasStorage", + "AccessControl", + "ObjC" + ], + "isLet": true, + "hasStorage": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "Swift.String?", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Accessor", + "usr": "c:@M@OneSignalUser@objc(cs)OSPushSubscriptionState(im)id", + "mangledName": "$s13OneSignalUser23OSPushSubscriptionStateC2idSSSgvg", + "moduleName": "OneSignalUser", + "implicit": true, + "declAttributes": [ + "Final", + "ObjC" + ], + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "token", + "printedName": "token", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "Swift.String?", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Var", + "usr": "c:@M@OneSignalUser@objc(cs)OSPushSubscriptionState(py)token", + "mangledName": "$s13OneSignalUser23OSPushSubscriptionStateC5tokenSSSgvp", + "moduleName": "OneSignalUser", + "declAttributes": [ + "Final", + "HasStorage", + "AccessControl", + "ObjC" + ], + "isLet": true, + "hasStorage": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "Swift.String?", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Accessor", + "usr": "c:@M@OneSignalUser@objc(cs)OSPushSubscriptionState(im)token", + "mangledName": "$s13OneSignalUser23OSPushSubscriptionStateC5tokenSSSgvg", + "moduleName": "OneSignalUser", + "implicit": true, + "declAttributes": [ + "Final", + "ObjC" + ], + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "optedIn", + "printedName": "optedIn", + "children": [ + { + "kind": "TypeNominal", + "name": "Bool", + "printedName": "Swift.Bool", + "usr": "s:Sb" + } + ], + "declKind": "Var", + "usr": "c:@M@OneSignalUser@objc(cs)OSPushSubscriptionState(py)optedIn", + "mangledName": "$s13OneSignalUser23OSPushSubscriptionStateC7optedInSbvp", + "moduleName": "OneSignalUser", + "declAttributes": [ + "Final", + "HasStorage", + "AccessControl", + "ObjC" + ], + "isLet": true, + "hasStorage": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "Bool", + "printedName": "Swift.Bool", + "usr": "s:Sb" + } + ], + "declKind": "Accessor", + "usr": "c:@M@OneSignalUser@objc(cs)OSPushSubscriptionState(im)optedIn", + "mangledName": "$s13OneSignalUser23OSPushSubscriptionStateC7optedInSbvg", + "moduleName": "OneSignalUser", + "implicit": true, + "declAttributes": [ + "Final", + "ObjC" + ], + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "description", + "printedName": "description", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Var", + "usr": "c:@M@OneSignalUser@objc(cs)OSPushSubscriptionState(py)description", + "mangledName": "$s13OneSignalUser23OSPushSubscriptionStateC11descriptionSSvp", + "moduleName": "OneSignalUser", + "overriding": true, + "objc_name": "description", + "declAttributes": [ + "Dynamic", + "ObjC", + "Override", + "AccessControl" + ], + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Accessor", + "usr": "c:@M@OneSignalUser@objc(cs)OSPushSubscriptionState(im)description", + "mangledName": "$s13OneSignalUser23OSPushSubscriptionStateC11descriptionSSvg", + "moduleName": "OneSignalUser", + "overriding": true, + "objc_name": "description", + "declAttributes": [ + "Dynamic", + "ObjC" + ], + "accessorKind": "get" + } + ] + }, + { + "kind": "Function", + "name": "jsonRepresentation", + "printedName": "jsonRepresentation()", + "children": [ + { + "kind": "TypeNominal", + "name": "NSDictionary", + "printedName": "Foundation.NSDictionary", + "usr": "c:objc(cs)NSDictionary" + } + ], + "declKind": "Func", + "usr": "c:@M@OneSignalUser@objc(cs)OSPushSubscriptionState(im)jsonRepresentation", + "mangledName": "$s13OneSignalUser23OSPushSubscriptionStateC18jsonRepresentationSo12NSDictionaryCyF", + "moduleName": "OneSignalUser", + "declAttributes": [ + "AccessControl", + "ObjC" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Constructor", + "name": "init", + "printedName": "init()", + "children": [ + { + "kind": "TypeNominal", + "name": "OSPushSubscriptionState", + "printedName": "OneSignalUser.OSPushSubscriptionState", + "usr": "c:@M@OneSignalUser@objc(cs)OSPushSubscriptionState" + } + ], + "declKind": "Constructor", + "usr": "c:@M@OneSignalUser@objc(cs)OSPushSubscriptionState(im)init", + "mangledName": "$s13OneSignalUser23OSPushSubscriptionStateCACycfc", + "moduleName": "OneSignalUser", + "overriding": true, + "implicit": true, + "objc_name": "init", + "declAttributes": [ + "Dynamic", + "ObjC", + "Override" + ], + "init_kind": "Designated" + } + ], + "declKind": "Class", + "usr": "c:@M@OneSignalUser@objc(cs)OSPushSubscriptionState", + "mangledName": "$s13OneSignalUser23OSPushSubscriptionStateC", + "moduleName": "OneSignalUser", + "declAttributes": [ + "AccessControl", + "ObjC" + ], + "superclassUsr": "c:objc(cs)NSObject", + "hasMissingDesignatedInitializers": true, + "superclassNames": [ + "ObjectiveC.NSObject" + ], + "conformances": [ + { + "kind": "Conformance", + "name": "Equatable", + "printedName": "Equatable", + "usr": "s:SQ", + "mangledName": "$sSQ" + }, + { + "kind": "Conformance", + "name": "Hashable", + "printedName": "Hashable", + "usr": "s:SH", + "mangledName": "$sSH" + }, + { + "kind": "Conformance", + "name": "CVarArg", + "printedName": "CVarArg", + "usr": "s:s7CVarArgP", + "mangledName": "$ss7CVarArgP" + }, + { + "kind": "Conformance", + "name": "_KeyValueCodingAndObservingPublishing", + "printedName": "_KeyValueCodingAndObservingPublishing", + "usr": "s:10Foundation37_KeyValueCodingAndObservingPublishingP", + "mangledName": "$s10Foundation37_KeyValueCodingAndObservingPublishingP" + }, + { + "kind": "Conformance", + "name": "_KeyValueCodingAndObserving", + "printedName": "_KeyValueCodingAndObserving", + "usr": "s:10Foundation27_KeyValueCodingAndObservingP", + "mangledName": "$s10Foundation27_KeyValueCodingAndObservingP" + }, + { + "kind": "Conformance", + "name": "CustomStringConvertible", + "printedName": "CustomStringConvertible", + "usr": "s:s23CustomStringConvertibleP", + "mangledName": "$ss23CustomStringConvertibleP" + }, + { + "kind": "Conformance", + "name": "CustomDebugStringConvertible", + "printedName": "CustomDebugStringConvertible", + "usr": "s:s28CustomDebugStringConvertibleP", + "mangledName": "$ss28CustomDebugStringConvertibleP" + } + ] + }, + { + "kind": "TypeDecl", + "name": "OSPushSubscriptionChangedState", + "printedName": "OSPushSubscriptionChangedState", + "children": [ + { + "kind": "Var", + "name": "current", + "printedName": "current", + "children": [ + { + "kind": "TypeNominal", + "name": "OSPushSubscriptionState", + "printedName": "OneSignalUser.OSPushSubscriptionState", + "usr": "c:@M@OneSignalUser@objc(cs)OSPushSubscriptionState" + } + ], + "declKind": "Var", + "usr": "c:@M@OneSignalUser@objc(cs)OSPushSubscriptionChangedState(py)current", + "mangledName": "$s13OneSignalUser30OSPushSubscriptionChangedStateC7currentAA0deG0Cvp", + "moduleName": "OneSignalUser", + "declAttributes": [ + "Final", + "HasStorage", + "AccessControl", + "ObjC" + ], + "isLet": true, + "hasStorage": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "OSPushSubscriptionState", + "printedName": "OneSignalUser.OSPushSubscriptionState", + "usr": "c:@M@OneSignalUser@objc(cs)OSPushSubscriptionState" + } + ], + "declKind": "Accessor", + "usr": "c:@M@OneSignalUser@objc(cs)OSPushSubscriptionChangedState(im)current", + "mangledName": "$s13OneSignalUser30OSPushSubscriptionChangedStateC7currentAA0deG0Cvg", + "moduleName": "OneSignalUser", + "implicit": true, + "declAttributes": [ + "Final", + "ObjC" + ], + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "previous", + "printedName": "previous", + "children": [ + { + "kind": "TypeNominal", + "name": "OSPushSubscriptionState", + "printedName": "OneSignalUser.OSPushSubscriptionState", + "usr": "c:@M@OneSignalUser@objc(cs)OSPushSubscriptionState" + } + ], + "declKind": "Var", + "usr": "c:@M@OneSignalUser@objc(cs)OSPushSubscriptionChangedState(py)previous", + "mangledName": "$s13OneSignalUser30OSPushSubscriptionChangedStateC8previousAA0deG0Cvp", + "moduleName": "OneSignalUser", + "declAttributes": [ + "Final", + "HasStorage", + "AccessControl", + "ObjC" + ], + "isLet": true, + "hasStorage": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "OSPushSubscriptionState", + "printedName": "OneSignalUser.OSPushSubscriptionState", + "usr": "c:@M@OneSignalUser@objc(cs)OSPushSubscriptionState" + } + ], + "declKind": "Accessor", + "usr": "c:@M@OneSignalUser@objc(cs)OSPushSubscriptionChangedState(im)previous", + "mangledName": "$s13OneSignalUser30OSPushSubscriptionChangedStateC8previousAA0deG0Cvg", + "moduleName": "OneSignalUser", + "implicit": true, + "declAttributes": [ + "Final", + "ObjC" + ], + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "description", + "printedName": "description", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Var", + "usr": "c:@M@OneSignalUser@objc(cs)OSPushSubscriptionChangedState(py)description", + "mangledName": "$s13OneSignalUser30OSPushSubscriptionChangedStateC11descriptionSSvp", + "moduleName": "OneSignalUser", + "overriding": true, + "objc_name": "description", + "declAttributes": [ + "Dynamic", + "ObjC", + "Override", + "AccessControl" + ], + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Accessor", + "usr": "c:@M@OneSignalUser@objc(cs)OSPushSubscriptionChangedState(im)description", + "mangledName": "$s13OneSignalUser30OSPushSubscriptionChangedStateC11descriptionSSvg", + "moduleName": "OneSignalUser", + "overriding": true, + "objc_name": "description", + "declAttributes": [ + "Dynamic", + "ObjC" + ], + "accessorKind": "get" + } + ] + }, + { + "kind": "Function", + "name": "jsonRepresentation", + "printedName": "jsonRepresentation()", + "children": [ + { + "kind": "TypeNominal", + "name": "NSDictionary", + "printedName": "Foundation.NSDictionary", + "usr": "c:objc(cs)NSDictionary" + } + ], + "declKind": "Func", + "usr": "c:@M@OneSignalUser@objc(cs)OSPushSubscriptionChangedState(im)jsonRepresentation", + "mangledName": "$s13OneSignalUser30OSPushSubscriptionChangedStateC18jsonRepresentationSo12NSDictionaryCyF", + "moduleName": "OneSignalUser", + "declAttributes": [ + "AccessControl", + "ObjC" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Constructor", + "name": "init", + "printedName": "init()", + "children": [ + { + "kind": "TypeNominal", + "name": "OSPushSubscriptionChangedState", + "printedName": "OneSignalUser.OSPushSubscriptionChangedState", + "usr": "c:@M@OneSignalUser@objc(cs)OSPushSubscriptionChangedState" + } + ], + "declKind": "Constructor", + "usr": "c:@M@OneSignalUser@objc(cs)OSPushSubscriptionChangedState(im)init", + "mangledName": "$s13OneSignalUser30OSPushSubscriptionChangedStateCACycfc", + "moduleName": "OneSignalUser", + "overriding": true, + "implicit": true, + "objc_name": "init", + "declAttributes": [ + "Dynamic", + "ObjC", + "Override" + ], + "init_kind": "Designated" + } + ], + "declKind": "Class", + "usr": "c:@M@OneSignalUser@objc(cs)OSPushSubscriptionChangedState", + "mangledName": "$s13OneSignalUser30OSPushSubscriptionChangedStateC", + "moduleName": "OneSignalUser", + "declAttributes": [ + "AccessControl", + "ObjC" + ], + "superclassUsr": "c:objc(cs)NSObject", + "hasMissingDesignatedInitializers": true, + "superclassNames": [ + "ObjectiveC.NSObject" + ], + "conformances": [ + { + "kind": "Conformance", + "name": "Equatable", + "printedName": "Equatable", + "usr": "s:SQ", + "mangledName": "$sSQ" + }, + { + "kind": "Conformance", + "name": "Hashable", + "printedName": "Hashable", + "usr": "s:SH", + "mangledName": "$sSH" + }, + { + "kind": "Conformance", + "name": "CVarArg", + "printedName": "CVarArg", + "usr": "s:s7CVarArgP", + "mangledName": "$ss7CVarArgP" + }, + { + "kind": "Conformance", + "name": "_KeyValueCodingAndObservingPublishing", + "printedName": "_KeyValueCodingAndObservingPublishing", + "usr": "s:10Foundation37_KeyValueCodingAndObservingPublishingP", + "mangledName": "$s10Foundation37_KeyValueCodingAndObservingPublishingP" + }, + { + "kind": "Conformance", + "name": "_KeyValueCodingAndObserving", + "printedName": "_KeyValueCodingAndObserving", + "usr": "s:10Foundation27_KeyValueCodingAndObservingP", + "mangledName": "$s10Foundation27_KeyValueCodingAndObservingP" + }, + { + "kind": "Conformance", + "name": "CustomStringConvertible", + "printedName": "CustomStringConvertible", + "usr": "s:s23CustomStringConvertibleP", + "mangledName": "$ss23CustomStringConvertibleP" + }, + { + "kind": "Conformance", + "name": "CustomDebugStringConvertible", + "printedName": "CustomDebugStringConvertible", + "usr": "s:s28CustomDebugStringConvertibleP", + "mangledName": "$ss28CustomDebugStringConvertibleP" + } + ] + }, + { + "kind": "Import", + "name": "Foundation", + "printedName": "Foundation", + "declKind": "Import", + "moduleName": "OneSignalUser", + "declAttributes": [ + "RawDocComment" + ] + }, + { + "kind": "Import", + "name": "OneSignalCore", + "printedName": "OneSignalCore", + "declKind": "Import", + "moduleName": "OneSignalUser" + }, + { + "kind": "Import", + "name": "OneSignalOSCore", + "printedName": "OneSignalOSCore", + "declKind": "Import", + "moduleName": "OneSignalUser" + }, + { + "kind": "Import", + "name": "OneSignalOSCore", + "printedName": "OneSignalOSCore", + "declKind": "Import", + "moduleName": "OneSignalUser", + "declAttributes": [ + "RawDocComment" + ] + }, + { + "kind": "Import", + "name": "OneSignalCore", + "printedName": "OneSignalCore", + "declKind": "Import", + "moduleName": "OneSignalUser" + }, + { + "kind": "Import", + "name": "Foundation", + "printedName": "Foundation", + "declKind": "Import", + "moduleName": "OneSignalUser", + "declAttributes": [ + "RawDocComment" + ] + }, + { + "kind": "Import", + "name": "OneSignalCore", + "printedName": "OneSignalCore", + "declKind": "Import", + "moduleName": "OneSignalUser" + }, + { + "kind": "Import", + "name": "OneSignalOSCore", + "printedName": "OneSignalOSCore", + "declKind": "Import", + "moduleName": "OneSignalUser" + }, + { + "kind": "Import", + "name": "OneSignalCore", + "printedName": "OneSignalCore", + "declKind": "Import", + "moduleName": "OneSignalUser", + "declAttributes": [ + "RawDocComment" + ] + }, + { + "kind": "Import", + "name": "OneSignalNotifications", + "printedName": "OneSignalNotifications", + "declKind": "Import", + "moduleName": "OneSignalUser" + }, + { + "kind": "Import", + "name": "OneSignalOSCore", + "printedName": "OneSignalOSCore", + "declKind": "Import", + "moduleName": "OneSignalUser" + } + ], + "json_format_version": 8 + }, + "ConstValues": [ + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OneSignalUserManagerImpl.swift", + "kind": "BooleanLiteral", + "offset": 4048, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OneSignalUserManagerImpl.swift", + "kind": "BooleanLiteral", + "offset": 5070, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OneSignalUserManagerImpl.swift", + "kind": "BooleanLiteral", + "offset": 5089, + "length": 4, + "value": "true" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OneSignalUserManagerImpl.swift", + "kind": "BooleanLiteral", + "offset": 5172, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OneSignalUserManagerImpl.swift", + "kind": "BooleanLiteral", + "offset": 24536, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSPropertiesModel.swift", + "kind": "StringLiteral", + "offset": 1847, + "length": 15, + "value": "\"OneSignalUser.OSLocationPoint\"" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSPropertiesModel.swift", + "kind": "StringLiteral", + "offset": 2423, + "length": 10, + "value": "\"language\"" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSPropertiesModel.swift", + "kind": "StringLiteral", + "offset": 2557, + "length": 10, + "value": "\"location\"" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSPropertiesModel.swift", + "kind": "Dictionary", + "offset": 2697, + "length": 3, + "value": "[]" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSIdentityOperationExecutor.swift", + "kind": "Array", + "offset": 1438, + "length": 2, + "value": "[]" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSIdentityOperationExecutor.swift", + "kind": "Array", + "offset": 1570, + "length": 2, + "value": "[]" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSIdentityOperationExecutor.swift", + "kind": "Array", + "offset": 1626, + "length": 2, + "value": "[]" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSUserInternalImpl.swift", + "kind": "StringLiteral", + "offset": 2006, + "length": 18, + "value": "\"OneSignalUser.OSUserInternalImpl\"" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSPropertyOperationExecutor.swift", + "kind": "Array", + "offset": 1423, + "length": 2, + "value": "[]" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSPropertyOperationExecutor.swift", + "kind": "Array", + "offset": 1484, + "length": 2, + "value": "[]" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSPropertyOperationExecutor.swift", + "kind": "BooleanLiteral", + "offset": 9816, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSSubscriptionModel.swift", + "kind": "StringLiteral", + "offset": 1536, + "length": 23, + "value": "\"OneSignalUser.OSPushSubscriptionState\"" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSSubscriptionModel.swift", + "kind": "StringLiteral", + "offset": 2423, + "length": 30, + "value": "\"OneSignalUser.OSPushSubscriptionChangedState\"" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSSubscriptionModel.swift", + "kind": "StringLiteral", + "offset": 3147, + "length": 9, + "value": "\"iOSPush\"" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSSubscriptionModel.swift", + "kind": "StringLiteral", + "offset": 3174, + "length": 7, + "value": "\"Email\"" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSSubscriptionModel.swift", + "kind": "StringLiteral", + "offset": 3197, + "length": 5, + "value": "\"SMS\"" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSSubscriptionModel.swift", + "kind": "StringLiteral", + "offset": 3147, + "length": 9, + "value": "\"iOSPush\"" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSSubscriptionModel.swift", + "kind": "StringLiteral", + "offset": 3174, + "length": 7, + "value": "\"Email\"" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSSubscriptionModel.swift", + "kind": "StringLiteral", + "offset": 3197, + "length": 5, + "value": "\"SMS\"" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSSubscriptionModel.swift", + "kind": "StringLiteral", + "offset": 3526, + "length": 9, + "value": "\"address\"" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSSubscriptionModel.swift", + "kind": "StringLiteral", + "offset": 3957, + "length": 16, + "value": "\"subscriptionId\"" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSSubscriptionModel.swift", + "kind": "IntegerLiteral", + "offset": 5277, + "length": 2, + "value": "2" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSSubscriptionModel.swift", + "kind": "IntegerLiteral", + "offset": 5318, + "length": 2, + "value": "2" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSSubscriptionModel.swift", + "kind": "IntegerLiteral", + "offset": 5403, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSSubscriptionModel.swift", + "kind": "StringLiteral", + "offset": 5436, + "length": 19, + "value": "\"notificationTypes\"" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSSubscriptionModel.swift", + "kind": "IntegerLiteral", + "offset": 5003, + "length": 2, + "value": "1" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSSubscriptionModel.swift", + "kind": "IntegerLiteral", + "offset": 6433, + "length": 2, + "value": "2" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSSubscriptionModel.swift", + "kind": "StringLiteral", + "offset": 6649, + "length": 10, + "value": "\"testType\"" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSSubscriptionModel.swift", + "kind": "StringLiteral", + "offset": 6885, + "length": 10, + "value": "\"deviceOs\"" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSSubscriptionModel.swift", + "kind": "StringLiteral", + "offset": 7098, + "length": 5, + "value": "\"sdk\"" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSSubscriptionModel.swift", + "kind": "StringLiteral", + "offset": 7341, + "length": 13, + "value": "\"deviceModel\"" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSSubscriptionModel.swift", + "kind": "StringLiteral", + "offset": 7634, + "length": 12, + "value": "\"appVersion\"" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSSubscriptionModel.swift", + "kind": "StringLiteral", + "offset": 7458, + "length": 28, + "value": "\"CFBundleShortVersionString\"" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSSubscriptionModel.swift", + "kind": "StringLiteral", + "offset": 7886, + "length": 9, + "value": "\"netType\"" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSSubscriptionModel.swift", + "kind": "StringLiteral", + "offset": 3250, + "length": 19, + "value": "\"OneSignalUser.OSSubscriptionModel\"" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSIdentityModel.swift", + "kind": "Dictionary", + "offset": 1510, + "length": 3, + "value": "[]" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSIdentityModel.swift", + "kind": "StringLiteral", + "offset": 1293, + "length": 15, + "value": "\"OneSignalUser.OSIdentityModel\"" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSSubscriptionOperationExecutor.swift", + "kind": "Array", + "offset": 1486, + "length": 2, + "value": "[]" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSSubscriptionOperationExecutor.swift", + "kind": "Array", + "offset": 1626, + "length": 2, + "value": "[]" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSSubscriptionOperationExecutor.swift", + "kind": "Array", + "offset": 1689, + "length": 2, + "value": "[]" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSSubscriptionOperationExecutor.swift", + "kind": "Array", + "offset": 1752, + "length": 2, + "value": "[]" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSSubscriptionOperationExecutor.swift", + "kind": "Dictionary", + "offset": 1815, + "length": 3, + "value": "[]" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSUserRequests.swift", + "kind": "Array", + "offset": 1619, + "length": 2, + "value": "[]" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSUserRequests.swift", + "kind": "Array", + "offset": 1705, + "length": 2, + "value": "[]" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSUserRequests.swift", + "kind": "Dictionary", + "offset": 1767, + "length": 3, + "value": "[]" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSUserRequests.swift", + "kind": "BooleanLiteral", + "offset": 27422, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSUserRequests.swift", + "kind": "BooleanLiteral", + "offset": 31693, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSUserRequests.swift", + "kind": "StringLiteral", + "offset": 31615, + "length": 19, + "value": "\"OneSignalUser.OSRequestCreateUser\"" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSUserRequests.swift", + "kind": "BooleanLiteral", + "offset": 35419, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSUserRequests.swift", + "kind": "StringLiteral", + "offset": 35324, + "length": 36, + "value": "\"OneSignalUser.OSRequestFetchIdentityBySubscription\"" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSUserRequests.swift", + "kind": "BooleanLiteral", + "offset": 38704, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSUserRequests.swift", + "kind": "StringLiteral", + "offset": 38624, + "length": 21, + "value": "\"OneSignalUser.OSRequestIdentifyUser\"" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSUserRequests.swift", + "kind": "BooleanLiteral", + "offset": 42618, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSUserRequests.swift", + "kind": "StringLiteral", + "offset": 42541, + "length": 18, + "value": "\"OneSignalUser.OSRequestFetchUser\"" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSUserRequests.swift", + "kind": "BooleanLiteral", + "offset": 45201, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSUserRequests.swift", + "kind": "StringLiteral", + "offset": 45123, + "length": 19, + "value": "\"OneSignalUser.OSRequestAddAliases\"" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSUserRequests.swift", + "kind": "BooleanLiteral", + "offset": 47646, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSUserRequests.swift", + "kind": "StringLiteral", + "offset": 47567, + "length": 20, + "value": "\"OneSignalUser.OSRequestRemoveAlias\"" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSUserRequests.swift", + "kind": "BooleanLiteral", + "offset": 49858, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSUserRequests.swift", + "kind": "StringLiteral", + "offset": 49774, + "length": 25, + "value": "\"OneSignalUser.OSRequestUpdateProperties\"" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSUserRequests.swift", + "kind": "BooleanLiteral", + "offset": 54435, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSUserRequests.swift", + "kind": "StringLiteral", + "offset": 54349, + "length": 27, + "value": "\"OneSignalUser.OSRequestCreateSubscription\"" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSUserRequests.swift", + "kind": "BooleanLiteral", + "offset": 57362, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSUserRequests.swift", + "kind": "StringLiteral", + "offset": 57274, + "length": 29, + "value": "\"OneSignalUser.OSRequestTransferSubscription\"" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSUserRequests.swift", + "kind": "BooleanLiteral", + "offset": 60213, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSUserRequests.swift", + "kind": "StringLiteral", + "offset": 60127, + "length": 27, + "value": "\"OneSignalUser.OSRequestUpdateSubscription\"" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSUserRequests.swift", + "kind": "BooleanLiteral", + "offset": 63838, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSUserRequests.swift", + "kind": "StringLiteral", + "offset": 63752, + "length": 27, + "value": "\"OneSignalUser.OSRequestDeleteSubscription\"" + } + ] +} \ No newline at end of file diff --git a/iOS_SDK/OneSignalSDK/OneSignal_User/OneSignalUser.xcframework/ios-arm64/OneSignalUser.framework/Modules/OneSignalUser.swiftmodule/arm64-apple-ios.private.swiftinterface b/iOS_SDK/OneSignalSDK/OneSignal_User/OneSignalUser.xcframework/ios-arm64/OneSignalUser.framework/Modules/OneSignalUser.swiftmodule/arm64-apple-ios.private.swiftinterface new file mode 100644 index 000000000..1cb098553 --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignal_User/OneSignalUser.xcframework/ios-arm64/OneSignalUser.framework/Modules/OneSignalUser.swiftmodule/arm64-apple-ios.private.swiftinterface @@ -0,0 +1,130 @@ +// swift-interface-format-version: 1.0 +// swift-compiler-version: Apple Swift version 5.7.1 (swiftlang-5.7.1.135.3 clang-1400.0.29.51) +// swift-module-flags: -target arm64-apple-ios11.0 -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -O -module-name OneSignalUser +// swift-module-flags-ignorable: -enable-bare-slash-regex +import Foundation +import OneSignalCore +import OneSignalNotifications +import OneSignalOSCore +@_exported import OneSignalUser +import Swift +import _Concurrency +import _StringProcessing +@objc public protocol OSUser { + @objc var pushSubscription: OneSignalUser.OSPushSubscription { get } + @objc func addAlias(label: Swift.String, id: Swift.String) + @objc func addAliases(_ aliases: [Swift.String : Swift.String]) + @objc func removeAlias(_ label: Swift.String) + @objc func removeAliases(_ labels: [Swift.String]) + @objc func addTag(key: Swift.String, value: Swift.String) + @objc func addTags(_ tags: [Swift.String : Swift.String]) + @objc func removeTag(_ tag: Swift.String) + @objc func removeTags(_ tags: [Swift.String]) + @objc func addEmail(_ email: Swift.String) + @objc func removeEmail(_ email: Swift.String) + @objc func addSms(_ number: Swift.String) + @objc func removeSms(_ number: Swift.String) + @objc func setLanguage(_ language: Swift.String) + typealias OSJwtCompletionBlock = (_ newJwtToken: Swift.String) -> Swift.Void + typealias OSJwtExpiredHandler = (_ externalId: Swift.String, _ completion: (_ newJwtToken: Swift.String) -> Swift.Void) -> Swift.Void + @objc func onJwtExpired(expiredHandler: @escaping Self.OSJwtExpiredHandler) +} +@objc public protocol OSPushSubscription { + @objc var id: Swift.String? { get } + @objc var token: Swift.String? { get } + @objc var optedIn: Swift.Bool { get } + @objc func optIn() + @objc func optOut() + @objc func addObserver(_ observer: OneSignalUser.OSPushSubscriptionObserver) + @objc func removeObserver(_ observer: OneSignalUser.OSPushSubscriptionObserver) +} +@_inheritsConvenienceInitializers @_hasMissingDesignatedInitializers @objc public class OneSignalUserManagerImpl : ObjectiveC.NSObject { + @objc public static let sharedInstance: OneSignalUser.OneSignalUserManagerImpl + @objc public var onesignalId: Swift.String? { + @objc get + } + @objc public var pushSubscriptionId: Swift.String? { + @objc get + } + @objc public var language: Swift.String? { + @objc get + } + @objc public var requiresUserAuth: Swift.Bool + @objc public func start() + @objc public func login(externalId: Swift.String, token: Swift.String?) + @objc public func logout() + public func _logout() + @objc public func clearAllModelsFromStores() + @objc public func getTags() -> [Swift.String : Swift.String]? + @objc public func setLocation(latitude: Swift.Float, longitude: Swift.Float) + @objc public func sendPurchases(_ purchases: [[Swift.String : Swift.AnyObject]]) + @objc deinit +} +extension OneSignalUser.OneSignalUserManagerImpl { + @objc dynamic public func startNewSession() + @objc dynamic public func updateSession(sessionCount: Foundation.NSNumber?, sessionTime: Foundation.NSNumber?, refreshDeviceMetadata: Swift.Bool, sendImmediately: Swift.Bool = false, onSuccess: (() -> Swift.Void)? = nil, onFailure: (() -> Swift.Void)? = nil) + @objc dynamic public func runBackgroundTasks() +} +extension OneSignalUser.OneSignalUserManagerImpl : OneSignalUser.OSUser { + @objc dynamic public func onJwtExpired(expiredHandler: @escaping OneSignalUser.OneSignalUserManagerImpl.OSJwtExpiredHandler) + @objc dynamic public var User: OneSignalUser.OSUser { + @objc get + } + @objc dynamic public var pushSubscription: OneSignalUser.OSPushSubscription { + @objc get + } + @objc dynamic public func addAlias(label: Swift.String, id: Swift.String) + @objc dynamic public func addAliases(_ aliases: [Swift.String : Swift.String]) + @objc dynamic public func removeAlias(_ label: Swift.String) + @objc dynamic public func removeAliases(_ labels: [Swift.String]) + @objc dynamic public func addTag(key: Swift.String, value: Swift.String) + @objc dynamic public func addTags(_ tags: [Swift.String : Swift.String]) + @objc dynamic public func removeTag(_ tag: Swift.String) + @objc dynamic public func removeTags(_ tags: [Swift.String]) + @objc dynamic public func addEmail(_ email: Swift.String) + @objc dynamic public func removeEmail(_ email: Swift.String) + @objc dynamic public func addSms(_ number: Swift.String) + @objc dynamic public func removeSms(_ number: Swift.String) + @objc dynamic public func setLanguage(_ language: Swift.String) +} +extension OneSignalUser.OneSignalUserManagerImpl : OneSignalUser.OSPushSubscription { + @objc dynamic public func addObserver(_ observer: OneSignalUser.OSPushSubscriptionObserver) + @objc dynamic public func removeObserver(_ observer: OneSignalUser.OSPushSubscriptionObserver) + @objc dynamic public var id: Swift.String? { + @objc get + } + @objc dynamic public var token: Swift.String? { + @objc get + } + @objc dynamic public var optedIn: Swift.Bool { + @objc get + } + @objc dynamic public func optIn() + @objc dynamic public func optOut() +} +extension OneSignalUser.OneSignalUserManagerImpl : OneSignalNotifications.OneSignalNotificationsDelegate { + @objc dynamic public func setNotificationTypes(_ notificationTypes: Swift.Int32) + @objc dynamic public func setPushToken(_ pushToken: Swift.String) +} +@objc public protocol OSPushSubscriptionObserver { + @objc func onPushSubscriptionDidChange(state: OneSignalUser.OSPushSubscriptionChangedState) +} +@_hasMissingDesignatedInitializers @objc public class OSPushSubscriptionState : ObjectiveC.NSObject { + @objc final public let id: Swift.String? + @objc final public let token: Swift.String? + @objc final public let optedIn: Swift.Bool + @objc override dynamic public var description: Swift.String { + @objc get + } + @objc public func jsonRepresentation() -> Foundation.NSDictionary + @objc deinit +} +@_hasMissingDesignatedInitializers @objc public class OSPushSubscriptionChangedState : ObjectiveC.NSObject { + @objc final public let current: OneSignalUser.OSPushSubscriptionState + @objc final public let previous: OneSignalUser.OSPushSubscriptionState + @objc override dynamic public var description: Swift.String { + @objc get + } + @objc public func jsonRepresentation() -> Foundation.NSDictionary + @objc deinit +} diff --git a/iOS_SDK/OneSignalSDK/OneSignal_User/OneSignalUser.xcframework/ios-arm64/OneSignalUser.framework/Modules/OneSignalUser.swiftmodule/arm64-apple-ios.swiftdoc b/iOS_SDK/OneSignalSDK/OneSignal_User/OneSignalUser.xcframework/ios-arm64/OneSignalUser.framework/Modules/OneSignalUser.swiftmodule/arm64-apple-ios.swiftdoc new file mode 100644 index 000000000..c2bcbaf96 Binary files /dev/null and b/iOS_SDK/OneSignalSDK/OneSignal_User/OneSignalUser.xcframework/ios-arm64/OneSignalUser.framework/Modules/OneSignalUser.swiftmodule/arm64-apple-ios.swiftdoc differ diff --git a/iOS_SDK/OneSignalSDK/OneSignal_User/OneSignalUser.xcframework/ios-arm64/OneSignalUser.framework/Modules/OneSignalUser.swiftmodule/arm64-apple-ios.swiftinterface b/iOS_SDK/OneSignalSDK/OneSignal_User/OneSignalUser.xcframework/ios-arm64/OneSignalUser.framework/Modules/OneSignalUser.swiftmodule/arm64-apple-ios.swiftinterface new file mode 100644 index 000000000..1cb098553 --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignal_User/OneSignalUser.xcframework/ios-arm64/OneSignalUser.framework/Modules/OneSignalUser.swiftmodule/arm64-apple-ios.swiftinterface @@ -0,0 +1,130 @@ +// swift-interface-format-version: 1.0 +// swift-compiler-version: Apple Swift version 5.7.1 (swiftlang-5.7.1.135.3 clang-1400.0.29.51) +// swift-module-flags: -target arm64-apple-ios11.0 -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -O -module-name OneSignalUser +// swift-module-flags-ignorable: -enable-bare-slash-regex +import Foundation +import OneSignalCore +import OneSignalNotifications +import OneSignalOSCore +@_exported import OneSignalUser +import Swift +import _Concurrency +import _StringProcessing +@objc public protocol OSUser { + @objc var pushSubscription: OneSignalUser.OSPushSubscription { get } + @objc func addAlias(label: Swift.String, id: Swift.String) + @objc func addAliases(_ aliases: [Swift.String : Swift.String]) + @objc func removeAlias(_ label: Swift.String) + @objc func removeAliases(_ labels: [Swift.String]) + @objc func addTag(key: Swift.String, value: Swift.String) + @objc func addTags(_ tags: [Swift.String : Swift.String]) + @objc func removeTag(_ tag: Swift.String) + @objc func removeTags(_ tags: [Swift.String]) + @objc func addEmail(_ email: Swift.String) + @objc func removeEmail(_ email: Swift.String) + @objc func addSms(_ number: Swift.String) + @objc func removeSms(_ number: Swift.String) + @objc func setLanguage(_ language: Swift.String) + typealias OSJwtCompletionBlock = (_ newJwtToken: Swift.String) -> Swift.Void + typealias OSJwtExpiredHandler = (_ externalId: Swift.String, _ completion: (_ newJwtToken: Swift.String) -> Swift.Void) -> Swift.Void + @objc func onJwtExpired(expiredHandler: @escaping Self.OSJwtExpiredHandler) +} +@objc public protocol OSPushSubscription { + @objc var id: Swift.String? { get } + @objc var token: Swift.String? { get } + @objc var optedIn: Swift.Bool { get } + @objc func optIn() + @objc func optOut() + @objc func addObserver(_ observer: OneSignalUser.OSPushSubscriptionObserver) + @objc func removeObserver(_ observer: OneSignalUser.OSPushSubscriptionObserver) +} +@_inheritsConvenienceInitializers @_hasMissingDesignatedInitializers @objc public class OneSignalUserManagerImpl : ObjectiveC.NSObject { + @objc public static let sharedInstance: OneSignalUser.OneSignalUserManagerImpl + @objc public var onesignalId: Swift.String? { + @objc get + } + @objc public var pushSubscriptionId: Swift.String? { + @objc get + } + @objc public var language: Swift.String? { + @objc get + } + @objc public var requiresUserAuth: Swift.Bool + @objc public func start() + @objc public func login(externalId: Swift.String, token: Swift.String?) + @objc public func logout() + public func _logout() + @objc public func clearAllModelsFromStores() + @objc public func getTags() -> [Swift.String : Swift.String]? + @objc public func setLocation(latitude: Swift.Float, longitude: Swift.Float) + @objc public func sendPurchases(_ purchases: [[Swift.String : Swift.AnyObject]]) + @objc deinit +} +extension OneSignalUser.OneSignalUserManagerImpl { + @objc dynamic public func startNewSession() + @objc dynamic public func updateSession(sessionCount: Foundation.NSNumber?, sessionTime: Foundation.NSNumber?, refreshDeviceMetadata: Swift.Bool, sendImmediately: Swift.Bool = false, onSuccess: (() -> Swift.Void)? = nil, onFailure: (() -> Swift.Void)? = nil) + @objc dynamic public func runBackgroundTasks() +} +extension OneSignalUser.OneSignalUserManagerImpl : OneSignalUser.OSUser { + @objc dynamic public func onJwtExpired(expiredHandler: @escaping OneSignalUser.OneSignalUserManagerImpl.OSJwtExpiredHandler) + @objc dynamic public var User: OneSignalUser.OSUser { + @objc get + } + @objc dynamic public var pushSubscription: OneSignalUser.OSPushSubscription { + @objc get + } + @objc dynamic public func addAlias(label: Swift.String, id: Swift.String) + @objc dynamic public func addAliases(_ aliases: [Swift.String : Swift.String]) + @objc dynamic public func removeAlias(_ label: Swift.String) + @objc dynamic public func removeAliases(_ labels: [Swift.String]) + @objc dynamic public func addTag(key: Swift.String, value: Swift.String) + @objc dynamic public func addTags(_ tags: [Swift.String : Swift.String]) + @objc dynamic public func removeTag(_ tag: Swift.String) + @objc dynamic public func removeTags(_ tags: [Swift.String]) + @objc dynamic public func addEmail(_ email: Swift.String) + @objc dynamic public func removeEmail(_ email: Swift.String) + @objc dynamic public func addSms(_ number: Swift.String) + @objc dynamic public func removeSms(_ number: Swift.String) + @objc dynamic public func setLanguage(_ language: Swift.String) +} +extension OneSignalUser.OneSignalUserManagerImpl : OneSignalUser.OSPushSubscription { + @objc dynamic public func addObserver(_ observer: OneSignalUser.OSPushSubscriptionObserver) + @objc dynamic public func removeObserver(_ observer: OneSignalUser.OSPushSubscriptionObserver) + @objc dynamic public var id: Swift.String? { + @objc get + } + @objc dynamic public var token: Swift.String? { + @objc get + } + @objc dynamic public var optedIn: Swift.Bool { + @objc get + } + @objc dynamic public func optIn() + @objc dynamic public func optOut() +} +extension OneSignalUser.OneSignalUserManagerImpl : OneSignalNotifications.OneSignalNotificationsDelegate { + @objc dynamic public func setNotificationTypes(_ notificationTypes: Swift.Int32) + @objc dynamic public func setPushToken(_ pushToken: Swift.String) +} +@objc public protocol OSPushSubscriptionObserver { + @objc func onPushSubscriptionDidChange(state: OneSignalUser.OSPushSubscriptionChangedState) +} +@_hasMissingDesignatedInitializers @objc public class OSPushSubscriptionState : ObjectiveC.NSObject { + @objc final public let id: Swift.String? + @objc final public let token: Swift.String? + @objc final public let optedIn: Swift.Bool + @objc override dynamic public var description: Swift.String { + @objc get + } + @objc public func jsonRepresentation() -> Foundation.NSDictionary + @objc deinit +} +@_hasMissingDesignatedInitializers @objc public class OSPushSubscriptionChangedState : ObjectiveC.NSObject { + @objc final public let current: OneSignalUser.OSPushSubscriptionState + @objc final public let previous: OneSignalUser.OSPushSubscriptionState + @objc override dynamic public var description: Swift.String { + @objc get + } + @objc public func jsonRepresentation() -> Foundation.NSDictionary + @objc deinit +} diff --git a/iOS_SDK/OneSignalSDK/OneSignal_User/OneSignalUser.xcframework/ios-arm64/OneSignalUser.framework/Modules/module.modulemap b/iOS_SDK/OneSignalSDK/OneSignal_User/OneSignalUser.xcframework/ios-arm64/OneSignalUser.framework/Modules/module.modulemap new file mode 100644 index 000000000..2313273e3 --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignal_User/OneSignalUser.xcframework/ios-arm64/OneSignalUser.framework/Modules/module.modulemap @@ -0,0 +1,11 @@ +framework module OneSignalUser { + umbrella header "OneSignalUser.h" + + export * + module * { export * } +} + +module OneSignalUser.Swift { + header "OneSignalUser-Swift.h" + requires objc +} diff --git a/iOS_SDK/OneSignalSDK/OneSignal_User/OneSignalUser.xcframework/ios-arm64/OneSignalUser.framework/OneSignalUser b/iOS_SDK/OneSignalSDK/OneSignal_User/OneSignalUser.xcframework/ios-arm64/OneSignalUser.framework/OneSignalUser new file mode 100755 index 000000000..27a5336d9 Binary files /dev/null and b/iOS_SDK/OneSignalSDK/OneSignal_User/OneSignalUser.xcframework/ios-arm64/OneSignalUser.framework/OneSignalUser differ diff --git a/iOS_SDK/OneSignalSDK/OneSignal_User/OneSignalUser.xcframework/ios-arm64/OneSignalUser.framework/_CodeSignature/CodeResources b/iOS_SDK/OneSignalSDK/OneSignal_User/OneSignalUser.xcframework/ios-arm64/OneSignalUser.framework/_CodeSignature/CodeResources new file mode 100644 index 000000000..af1fdff88 --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignal_User/OneSignalUser.xcframework/ios-arm64/OneSignalUser.framework/_CodeSignature/CodeResources @@ -0,0 +1,190 @@ + + + + + files + + Headers/OneSignalUser-Swift.h + + sR4hLivdGvdI2n06sDsz5xUSc7M= + + Headers/OneSignalUser.h + + pTdDVlAAP214UX3ZzcJHJlgjwKo= + + Info.plist + + DicBn0FJAogzWp6/mEq3EsFEO1w= + + Modules/OneSignalUser.swiftmodule/arm64-apple-ios.abi.json + + r1SM0Gn2pAl2chqQvYPO+/tRWrE= + + Modules/OneSignalUser.swiftmodule/arm64-apple-ios.private.swiftinterface + + RIIkxN5CPl+Hm9y8IIg7QUjLPKU= + + Modules/OneSignalUser.swiftmodule/arm64-apple-ios.swiftdoc + + 97ONe39x4nVLqm3/7xi88EDQ+Wo= + + Modules/OneSignalUser.swiftmodule/arm64-apple-ios.swiftinterface + + RIIkxN5CPl+Hm9y8IIg7QUjLPKU= + + Modules/OneSignalUser.swiftmodule/arm64-apple-ios.swiftmodule + + F6++C06XVwjap06lc70uOJ1KR1M= + + Modules/module.modulemap + + G7kIR7T48fnqMfkxMEz5Gq0mPZo= + + + files2 + + Headers/OneSignalUser-Swift.h + + hash2 + + lfcTb2q1ANMlpOplsdrXW0Is2Y6Ti8vlCGsgcPxVpkk= + + + Headers/OneSignalUser.h + + hash2 + + kzlTLEUR5uAPjMN03oyfrT8TmYBfxfO52NTJnvQdnvE= + + + Modules/OneSignalUser.swiftmodule/arm64-apple-ios.abi.json + + hash2 + + P1MWEWOm2ZGGcL2azjP6c8uZT11g6rrZH1qa8wKwwZ0= + + + Modules/OneSignalUser.swiftmodule/arm64-apple-ios.private.swiftinterface + + hash2 + + cBrwcFQfjm6/e26L37LMWJCgpc3JsgCTI2LBUTPeK+o= + + + Modules/OneSignalUser.swiftmodule/arm64-apple-ios.swiftdoc + + hash2 + + iavkKn//onEzcOrWnB6LkJI/kc3oAB2KBfCbi8JYbTg= + + + Modules/OneSignalUser.swiftmodule/arm64-apple-ios.swiftinterface + + hash2 + + cBrwcFQfjm6/e26L37LMWJCgpc3JsgCTI2LBUTPeK+o= + + + Modules/OneSignalUser.swiftmodule/arm64-apple-ios.swiftmodule + + hash2 + + CzP6+uBf1HO9wG/ugNcUYYeS2Mawv0mnGbPwHg4x/Vo= + + + Modules/module.modulemap + + hash2 + + D9eZkSkXqymTKNbGMVvSiBm8jGPDNW9FHX+RgvGgjqc= + + + + rules + + ^.* + + ^.*\.lproj/ + + optional + + weight + 1000 + + ^.*\.lproj/locversion.plist$ + + omit + + weight + 1100 + + ^Base\.lproj/ + + weight + 1010 + + ^version.plist$ + + + rules2 + + .*\.dSYM($|/) + + weight + 11 + + ^(.*/)?\.DS_Store$ + + omit + + weight + 2000 + + ^.* + + ^.*\.lproj/ + + optional + + weight + 1000 + + ^.*\.lproj/locversion.plist$ + + omit + + weight + 1100 + + ^Base\.lproj/ + + weight + 1010 + + ^Info\.plist$ + + omit + + weight + 20 + + ^PkgInfo$ + + omit + + weight + 20 + + ^embedded\.provisionprofile$ + + weight + 20 + + ^version\.plist$ + + weight + 20 + + + + diff --git a/iOS_SDK/OneSignalSDK/OneSignal_User/OneSignalUser.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalUser.framework/Headers b/iOS_SDK/OneSignalSDK/OneSignal_User/OneSignalUser.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalUser.framework/Headers new file mode 120000 index 000000000..a177d2a6b --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignal_User/OneSignalUser.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalUser.framework/Headers @@ -0,0 +1 @@ +Versions/Current/Headers \ No newline at end of file diff --git a/iOS_SDK/OneSignalSDK/OneSignal_User/OneSignalUser.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalUser.framework/Modules b/iOS_SDK/OneSignalSDK/OneSignal_User/OneSignalUser.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalUser.framework/Modules new file mode 120000 index 000000000..5736f3186 --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignal_User/OneSignalUser.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalUser.framework/Modules @@ -0,0 +1 @@ +Versions/Current/Modules \ No newline at end of file diff --git a/iOS_SDK/OneSignalSDK/OneSignal_User/OneSignalUser.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalUser.framework/OneSignalUser b/iOS_SDK/OneSignalSDK/OneSignal_User/OneSignalUser.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalUser.framework/OneSignalUser new file mode 120000 index 000000000..a9638bf3d --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignal_User/OneSignalUser.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalUser.framework/OneSignalUser @@ -0,0 +1 @@ +Versions/Current/OneSignalUser \ No newline at end of file diff --git a/iOS_SDK/OneSignalSDK/OneSignal_User/OneSignalUser.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalUser.framework/Resources b/iOS_SDK/OneSignalSDK/OneSignal_User/OneSignalUser.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalUser.framework/Resources new file mode 120000 index 000000000..953ee36f3 --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignal_User/OneSignalUser.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalUser.framework/Resources @@ -0,0 +1 @@ +Versions/Current/Resources \ No newline at end of file diff --git a/iOS_SDK/OneSignalSDK/OneSignal_User/OneSignalUser.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalUser.framework/Versions/A/Headers/OneSignalUser-Swift.h b/iOS_SDK/OneSignalSDK/OneSignal_User/OneSignalUser.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalUser.framework/Versions/A/Headers/OneSignalUser-Swift.h new file mode 100644 index 000000000..7d1bb0df9 --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignal_User/OneSignalUser.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalUser.framework/Versions/A/Headers/OneSignalUser-Swift.h @@ -0,0 +1,816 @@ +#if 0 +#elif defined(__arm64__) && __arm64__ +// Generated by Apple Swift version 5.7.1 (swiftlang-5.7.1.135.3 clang-1400.0.29.51) +#ifndef ONESIGNALUSER_SWIFT_H +#define ONESIGNALUSER_SWIFT_H +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wgcc-compat" + +#if !defined(__has_include) +# define __has_include(x) 0 +#endif +#if !defined(__has_attribute) +# define __has_attribute(x) 0 +#endif +#if !defined(__has_feature) +# define __has_feature(x) 0 +#endif +#if !defined(__has_warning) +# define __has_warning(x) 0 +#endif + +#if __has_include() +# include +#endif + +#pragma clang diagnostic ignored "-Wduplicate-method-match" +#pragma clang diagnostic ignored "-Wauto-import" +#if defined(__OBJC__) +#include +#endif +#if defined(__cplusplus) +#include +#include +#include +#else +#include +#include +#include +#endif + +#if !defined(SWIFT_TYPEDEFS) +# define SWIFT_TYPEDEFS 1 +# if __has_include() +# include +# elif !defined(__cplusplus) +typedef uint_least16_t char16_t; +typedef uint_least32_t char32_t; +# endif +typedef float swift_float2 __attribute__((__ext_vector_type__(2))); +typedef float swift_float3 __attribute__((__ext_vector_type__(3))); +typedef float swift_float4 __attribute__((__ext_vector_type__(4))); +typedef double swift_double2 __attribute__((__ext_vector_type__(2))); +typedef double swift_double3 __attribute__((__ext_vector_type__(3))); +typedef double swift_double4 __attribute__((__ext_vector_type__(4))); +typedef int swift_int2 __attribute__((__ext_vector_type__(2))); +typedef int swift_int3 __attribute__((__ext_vector_type__(3))); +typedef int swift_int4 __attribute__((__ext_vector_type__(4))); +typedef unsigned int swift_uint2 __attribute__((__ext_vector_type__(2))); +typedef unsigned int swift_uint3 __attribute__((__ext_vector_type__(3))); +typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4))); +#endif + +#if !defined(SWIFT_PASTE) +# define SWIFT_PASTE_HELPER(x, y) x##y +# define SWIFT_PASTE(x, y) SWIFT_PASTE_HELPER(x, y) +#endif +#if !defined(SWIFT_METATYPE) +# define SWIFT_METATYPE(X) Class +#endif +#if !defined(SWIFT_CLASS_PROPERTY) +# if __has_feature(objc_class_property) +# define SWIFT_CLASS_PROPERTY(...) __VA_ARGS__ +# else +# define SWIFT_CLASS_PROPERTY(...) +# endif +#endif + +#if __has_attribute(objc_runtime_name) +# define SWIFT_RUNTIME_NAME(X) __attribute__((objc_runtime_name(X))) +#else +# define SWIFT_RUNTIME_NAME(X) +#endif +#if __has_attribute(swift_name) +# define SWIFT_COMPILE_NAME(X) __attribute__((swift_name(X))) +#else +# define SWIFT_COMPILE_NAME(X) +#endif +#if __has_attribute(objc_method_family) +# define SWIFT_METHOD_FAMILY(X) __attribute__((objc_method_family(X))) +#else +# define SWIFT_METHOD_FAMILY(X) +#endif +#if __has_attribute(noescape) +# define SWIFT_NOESCAPE __attribute__((noescape)) +#else +# define SWIFT_NOESCAPE +#endif +#if __has_attribute(ns_consumed) +# define SWIFT_RELEASES_ARGUMENT __attribute__((ns_consumed)) +#else +# define SWIFT_RELEASES_ARGUMENT +#endif +#if __has_attribute(warn_unused_result) +# define SWIFT_WARN_UNUSED_RESULT __attribute__((warn_unused_result)) +#else +# define SWIFT_WARN_UNUSED_RESULT +#endif +#if __has_attribute(noreturn) +# define SWIFT_NORETURN __attribute__((noreturn)) +#else +# define SWIFT_NORETURN +#endif +#if !defined(SWIFT_CLASS_EXTRA) +# define SWIFT_CLASS_EXTRA +#endif +#if !defined(SWIFT_PROTOCOL_EXTRA) +# define SWIFT_PROTOCOL_EXTRA +#endif +#if !defined(SWIFT_ENUM_EXTRA) +# define SWIFT_ENUM_EXTRA +#endif +#if !defined(SWIFT_CLASS) +# if __has_attribute(objc_subclassing_restricted) +# define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_CLASS_EXTRA +# define SWIFT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA +# else +# define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA +# define SWIFT_CLASS_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA +# endif +#endif +#if !defined(SWIFT_RESILIENT_CLASS) +# if __has_attribute(objc_class_stub) +# define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME) __attribute__((objc_class_stub)) +# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_class_stub)) SWIFT_CLASS_NAMED(SWIFT_NAME) +# else +# define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME) +# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) SWIFT_CLASS_NAMED(SWIFT_NAME) +# endif +#endif + +#if !defined(SWIFT_PROTOCOL) +# define SWIFT_PROTOCOL(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA +# define SWIFT_PROTOCOL_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA +#endif + +#if !defined(SWIFT_EXTENSION) +# define SWIFT_EXTENSION(M) SWIFT_PASTE(M##_Swift_, __LINE__) +#endif + +#if !defined(OBJC_DESIGNATED_INITIALIZER) +# if __has_attribute(objc_designated_initializer) +# define OBJC_DESIGNATED_INITIALIZER __attribute__((objc_designated_initializer)) +# else +# define OBJC_DESIGNATED_INITIALIZER +# endif +#endif +#if !defined(SWIFT_ENUM_ATTR) +# if defined(__has_attribute) && __has_attribute(enum_extensibility) +# define SWIFT_ENUM_ATTR(_extensibility) __attribute__((enum_extensibility(_extensibility))) +# else +# define SWIFT_ENUM_ATTR(_extensibility) +# endif +#endif +#if !defined(SWIFT_ENUM) +# define SWIFT_ENUM(_type, _name, _extensibility) enum _name : _type _name; enum SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type +# if __has_feature(generalized_swift_name) +# define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) enum _name : _type _name SWIFT_COMPILE_NAME(SWIFT_NAME); enum SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type +# else +# define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) SWIFT_ENUM(_type, _name, _extensibility) +# endif +#endif +#if !defined(SWIFT_UNAVAILABLE) +# define SWIFT_UNAVAILABLE __attribute__((unavailable)) +#endif +#if !defined(SWIFT_UNAVAILABLE_MSG) +# define SWIFT_UNAVAILABLE_MSG(msg) __attribute__((unavailable(msg))) +#endif +#if !defined(SWIFT_AVAILABILITY) +# define SWIFT_AVAILABILITY(plat, ...) __attribute__((availability(plat, __VA_ARGS__))) +#endif +#if !defined(SWIFT_WEAK_IMPORT) +# define SWIFT_WEAK_IMPORT __attribute__((weak_import)) +#endif +#if !defined(SWIFT_DEPRECATED) +# define SWIFT_DEPRECATED __attribute__((deprecated)) +#endif +#if !defined(SWIFT_DEPRECATED_MSG) +# define SWIFT_DEPRECATED_MSG(...) __attribute__((deprecated(__VA_ARGS__))) +#endif +#if __has_feature(attribute_diagnose_if_objc) +# define SWIFT_DEPRECATED_OBJC(Msg) __attribute__((diagnose_if(1, Msg, "warning"))) +#else +# define SWIFT_DEPRECATED_OBJC(Msg) SWIFT_DEPRECATED_MSG(Msg) +#endif +#if defined(__OBJC__) +#if !defined(IBSegueAction) +# define IBSegueAction +#endif +#endif +#if !defined(SWIFT_EXTERN) +# if defined(__cplusplus) +# define SWIFT_EXTERN extern "C" +# else +# define SWIFT_EXTERN extern +# endif +#endif +#if !defined(SWIFT_CALL) +# define SWIFT_CALL __attribute__((swiftcall)) +#endif +#if defined(__cplusplus) +#if !defined(SWIFT_NOEXCEPT) +# define SWIFT_NOEXCEPT noexcept +#endif +#else +#if !defined(SWIFT_NOEXCEPT) +# define SWIFT_NOEXCEPT +#endif +#endif +#if defined(__cplusplus) +#if !defined(SWIFT_CXX_INT_DEFINED) +#define SWIFT_CXX_INT_DEFINED +namespace swift { +using Int = ptrdiff_t; +using UInt = size_t; +} +#endif +#endif +#if defined(__OBJC__) +#if __has_feature(modules) +#if __has_warning("-Watimport-in-framework-header") +#pragma clang diagnostic ignored "-Watimport-in-framework-header" +#endif +@import Foundation; +@import ObjectiveC; +@import OneSignalNotifications; +#endif + +#endif +#pragma clang diagnostic ignored "-Wproperty-attribute-mismatch" +#pragma clang diagnostic ignored "-Wduplicate-method-arg" +#if __has_warning("-Wpragma-clang-attribute") +# pragma clang diagnostic ignored "-Wpragma-clang-attribute" +#endif +#pragma clang diagnostic ignored "-Wunknown-pragmas" +#pragma clang diagnostic ignored "-Wnullability" +#pragma clang diagnostic ignored "-Wdollar-in-identifier-extension" + +#if __has_attribute(external_source_symbol) +# pragma push_macro("any") +# undef any +# pragma clang attribute push(__attribute__((external_source_symbol(language="Swift", defined_in="OneSignalUser",generated_declaration))), apply_to=any(function,enum,objc_interface,objc_category,objc_protocol)) +# pragma pop_macro("any") +#endif + +#if defined(__OBJC__) +@class NSString; +@protocol OSPushSubscriptionObserver; + +/// This is the push subscription interface exposed to the public. +SWIFT_PROTOCOL("_TtP13OneSignalUser18OSPushSubscription_") +@protocol OSPushSubscription +@property (nonatomic, readonly, copy) NSString * _Nullable id; +@property (nonatomic, readonly, copy) NSString * _Nullable token; +@property (nonatomic, readonly) BOOL optedIn; +- (void)optIn; +- (void)optOut; +- (void)addObserver:(id _Nonnull)observer; +- (void)removeObserver:(id _Nonnull)observer; +@end + +@class OSPushSubscriptionState; +@class NSDictionary; + +SWIFT_CLASS("_TtC13OneSignalUser30OSPushSubscriptionChangedState") +@interface OSPushSubscriptionChangedState : NSObject +@property (nonatomic, readonly, strong) OSPushSubscriptionState * _Nonnull current; +@property (nonatomic, readonly, strong) OSPushSubscriptionState * _Nonnull previous; +@property (nonatomic, readonly, copy) NSString * _Nonnull description; +- (NSDictionary * _Nonnull)jsonRepresentation SWIFT_WARN_UNUSED_RESULT; +- (nonnull instancetype)init SWIFT_UNAVAILABLE; ++ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); +@end + + +SWIFT_PROTOCOL("_TtP13OneSignalUser26OSPushSubscriptionObserver_") +@protocol OSPushSubscriptionObserver +- (void)onPushSubscriptionDidChangeWithState:(OSPushSubscriptionChangedState * _Nonnull)state; +@end + + +SWIFT_CLASS("_TtC13OneSignalUser23OSPushSubscriptionState") +@interface OSPushSubscriptionState : NSObject +@property (nonatomic, readonly, copy) NSString * _Nullable id; +@property (nonatomic, readonly, copy) NSString * _Nullable token; +@property (nonatomic, readonly) BOOL optedIn; +@property (nonatomic, readonly, copy) NSString * _Nonnull description; +- (NSDictionary * _Nonnull)jsonRepresentation SWIFT_WARN_UNUSED_RESULT; +- (nonnull instancetype)init SWIFT_UNAVAILABLE; ++ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); +@end + + +/// This is the user interface exposed to the public. +SWIFT_PROTOCOL("_TtP13OneSignalUser6OSUser_") +@protocol OSUser +@property (nonatomic, readonly, strong) id _Nonnull pushSubscription; +- (void)addAliasWithLabel:(NSString * _Nonnull)label id:(NSString * _Nonnull)id; +- (void)addAliases:(NSDictionary * _Nonnull)aliases; +- (void)removeAlias:(NSString * _Nonnull)label; +- (void)removeAliases:(NSArray * _Nonnull)labels; +- (void)addTagWithKey:(NSString * _Nonnull)key value:(NSString * _Nonnull)value; +- (void)addTags:(NSDictionary * _Nonnull)tags; +- (void)removeTag:(NSString * _Nonnull)tag; +- (void)removeTags:(NSArray * _Nonnull)tags; +- (void)addEmail:(NSString * _Nonnull)email; +- (void)removeEmail:(NSString * _Nonnull)email; +- (void)addSms:(NSString * _Nonnull)number; +- (void)removeSms:(NSString * _Nonnull)number; +- (void)setLanguage:(NSString * _Nonnull)language; +- (void)onJwtExpiredWithExpiredHandler:(void (^ _Nonnull)(NSString * _Nonnull, SWIFT_NOESCAPE void (^ _Nonnull)(NSString * _Nonnull)))expiredHandler; +@end + + + +SWIFT_CLASS("_TtC13OneSignalUser24OneSignalUserManagerImpl") +@interface OneSignalUserManagerImpl : NSObject +SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) OneSignalUserManagerImpl * _Nonnull sharedInstance;) ++ (OneSignalUserManagerImpl * _Nonnull)sharedInstance SWIFT_WARN_UNUSED_RESULT; +@property (nonatomic, readonly, copy) NSString * _Nullable onesignalId; +@property (nonatomic, readonly, copy) NSString * _Nullable pushSubscriptionId; +@property (nonatomic, readonly, copy) NSString * _Nullable language; +@property (nonatomic) BOOL requiresUserAuth; +- (nonnull instancetype)init SWIFT_UNAVAILABLE; ++ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); +- (void)start; +- (void)loginWithExternalId:(NSString * _Nonnull)externalId token:(NSString * _Nullable)token; +/// The SDK needs to have a user at all times, so this method will create a new anonymous user. If the current user is already anonymous, calling logout results in a no-op. +- (void)logout; +- (void)clearAllModelsFromStores; +- (NSDictionary * _Nullable)getTags SWIFT_WARN_UNUSED_RESULT; +- (void)setLocationWithLatitude:(float)latitude longitude:(float)longitude; +- (void)sendPurchases:(NSArray *> * _Nonnull)purchases; +@end + + +@interface OneSignalUserManagerImpl (SWIFT_EXTENSION(OneSignalUser)) +- (void)setNotificationTypes:(int32_t)notificationTypes; +- (void)setPushToken:(NSString * _Nonnull)pushToken; +@end + +@class NSNumber; + +@interface OneSignalUserManagerImpl (SWIFT_EXTENSION(OneSignalUser)) +- (void)startNewSession; +- (void)updateSessionWithSessionCount:(NSNumber * _Nullable)sessionCount sessionTime:(NSNumber * _Nullable)sessionTime refreshDeviceMetadata:(BOOL)refreshDeviceMetadata sendImmediately:(BOOL)sendImmediately onSuccess:(void (^ _Nullable)(void))onSuccess onFailure:(void (^ _Nullable)(void))onFailure; +/// App has been backgrounded. Run background tasks such to flush the operation repo and hydrating models. +/// Need to consider app killed vs app backgrounded and handle gracefully. +- (void)runBackgroundTasks; +@end + + +@interface OneSignalUserManagerImpl (SWIFT_EXTENSION(OneSignalUser)) +- (void)addObserver:(id _Nonnull)observer; +- (void)removeObserver:(id _Nonnull)observer; +@property (nonatomic, readonly, copy) NSString * _Nullable id; +@property (nonatomic, readonly, copy) NSString * _Nullable token; +@property (nonatomic, readonly) BOOL optedIn; +/// Enable the push subscription, and prompts if needed. optedIn can still be false after optIn() is called if permission is not granted. +- (void)optIn; +- (void)optOut; +@end + + +@interface OneSignalUserManagerImpl (SWIFT_EXTENSION(OneSignalUser)) +- (void)onJwtExpiredWithExpiredHandler:(void (^ _Nonnull)(NSString * _Nonnull, SWIFT_NOESCAPE void (^ _Nonnull)(NSString * _Nonnull)))expiredHandler; +@property (nonatomic, readonly, strong) id _Nonnull User; +@property (nonatomic, readonly, strong) id _Nonnull pushSubscription; +- (void)addAliasWithLabel:(NSString * _Nonnull)label id:(NSString * _Nonnull)id; +- (void)addAliases:(NSDictionary * _Nonnull)aliases; +- (void)removeAlias:(NSString * _Nonnull)label; +- (void)removeAliases:(NSArray * _Nonnull)labels; +- (void)addTagWithKey:(NSString * _Nonnull)key value:(NSString * _Nonnull)value; +- (void)addTags:(NSDictionary * _Nonnull)tags; +- (void)removeTag:(NSString * _Nonnull)tag; +- (void)removeTags:(NSArray * _Nonnull)tags; +- (void)addEmail:(NSString * _Nonnull)email; +/// If this email doesn’t already exist on the user, it cannot be removed. +/// This will be a no-op and no request will be made. +/// Error handling needs to be implemented in the future. +- (void)removeEmail:(NSString * _Nonnull)email; +- (void)addSms:(NSString * _Nonnull)number; +/// If this email doesn’t already exist on the user, it cannot be removed. +/// This will be a no-op and no request will be made. +/// Error handling needs to be implemented in the future. +- (void)removeSms:(NSString * _Nonnull)number; +- (void)setLanguage:(NSString * _Nonnull)language; +@end + +#endif +#if defined(__cplusplus) +#endif +#if __has_attribute(external_source_symbol) +# pragma clang attribute pop +#endif +#pragma clang diagnostic pop +#endif + +#elif defined(__x86_64__) && __x86_64__ +// Generated by Apple Swift version 5.7.1 (swiftlang-5.7.1.135.3 clang-1400.0.29.51) +#ifndef ONESIGNALUSER_SWIFT_H +#define ONESIGNALUSER_SWIFT_H +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wgcc-compat" + +#if !defined(__has_include) +# define __has_include(x) 0 +#endif +#if !defined(__has_attribute) +# define __has_attribute(x) 0 +#endif +#if !defined(__has_feature) +# define __has_feature(x) 0 +#endif +#if !defined(__has_warning) +# define __has_warning(x) 0 +#endif + +#if __has_include() +# include +#endif + +#pragma clang diagnostic ignored "-Wduplicate-method-match" +#pragma clang diagnostic ignored "-Wauto-import" +#if defined(__OBJC__) +#include +#endif +#if defined(__cplusplus) +#include +#include +#include +#else +#include +#include +#include +#endif + +#if !defined(SWIFT_TYPEDEFS) +# define SWIFT_TYPEDEFS 1 +# if __has_include() +# include +# elif !defined(__cplusplus) +typedef uint_least16_t char16_t; +typedef uint_least32_t char32_t; +# endif +typedef float swift_float2 __attribute__((__ext_vector_type__(2))); +typedef float swift_float3 __attribute__((__ext_vector_type__(3))); +typedef float swift_float4 __attribute__((__ext_vector_type__(4))); +typedef double swift_double2 __attribute__((__ext_vector_type__(2))); +typedef double swift_double3 __attribute__((__ext_vector_type__(3))); +typedef double swift_double4 __attribute__((__ext_vector_type__(4))); +typedef int swift_int2 __attribute__((__ext_vector_type__(2))); +typedef int swift_int3 __attribute__((__ext_vector_type__(3))); +typedef int swift_int4 __attribute__((__ext_vector_type__(4))); +typedef unsigned int swift_uint2 __attribute__((__ext_vector_type__(2))); +typedef unsigned int swift_uint3 __attribute__((__ext_vector_type__(3))); +typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4))); +#endif + +#if !defined(SWIFT_PASTE) +# define SWIFT_PASTE_HELPER(x, y) x##y +# define SWIFT_PASTE(x, y) SWIFT_PASTE_HELPER(x, y) +#endif +#if !defined(SWIFT_METATYPE) +# define SWIFT_METATYPE(X) Class +#endif +#if !defined(SWIFT_CLASS_PROPERTY) +# if __has_feature(objc_class_property) +# define SWIFT_CLASS_PROPERTY(...) __VA_ARGS__ +# else +# define SWIFT_CLASS_PROPERTY(...) +# endif +#endif + +#if __has_attribute(objc_runtime_name) +# define SWIFT_RUNTIME_NAME(X) __attribute__((objc_runtime_name(X))) +#else +# define SWIFT_RUNTIME_NAME(X) +#endif +#if __has_attribute(swift_name) +# define SWIFT_COMPILE_NAME(X) __attribute__((swift_name(X))) +#else +# define SWIFT_COMPILE_NAME(X) +#endif +#if __has_attribute(objc_method_family) +# define SWIFT_METHOD_FAMILY(X) __attribute__((objc_method_family(X))) +#else +# define SWIFT_METHOD_FAMILY(X) +#endif +#if __has_attribute(noescape) +# define SWIFT_NOESCAPE __attribute__((noescape)) +#else +# define SWIFT_NOESCAPE +#endif +#if __has_attribute(ns_consumed) +# define SWIFT_RELEASES_ARGUMENT __attribute__((ns_consumed)) +#else +# define SWIFT_RELEASES_ARGUMENT +#endif +#if __has_attribute(warn_unused_result) +# define SWIFT_WARN_UNUSED_RESULT __attribute__((warn_unused_result)) +#else +# define SWIFT_WARN_UNUSED_RESULT +#endif +#if __has_attribute(noreturn) +# define SWIFT_NORETURN __attribute__((noreturn)) +#else +# define SWIFT_NORETURN +#endif +#if !defined(SWIFT_CLASS_EXTRA) +# define SWIFT_CLASS_EXTRA +#endif +#if !defined(SWIFT_PROTOCOL_EXTRA) +# define SWIFT_PROTOCOL_EXTRA +#endif +#if !defined(SWIFT_ENUM_EXTRA) +# define SWIFT_ENUM_EXTRA +#endif +#if !defined(SWIFT_CLASS) +# if __has_attribute(objc_subclassing_restricted) +# define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_CLASS_EXTRA +# define SWIFT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA +# else +# define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA +# define SWIFT_CLASS_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA +# endif +#endif +#if !defined(SWIFT_RESILIENT_CLASS) +# if __has_attribute(objc_class_stub) +# define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME) __attribute__((objc_class_stub)) +# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_class_stub)) SWIFT_CLASS_NAMED(SWIFT_NAME) +# else +# define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME) +# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) SWIFT_CLASS_NAMED(SWIFT_NAME) +# endif +#endif + +#if !defined(SWIFT_PROTOCOL) +# define SWIFT_PROTOCOL(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA +# define SWIFT_PROTOCOL_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA +#endif + +#if !defined(SWIFT_EXTENSION) +# define SWIFT_EXTENSION(M) SWIFT_PASTE(M##_Swift_, __LINE__) +#endif + +#if !defined(OBJC_DESIGNATED_INITIALIZER) +# if __has_attribute(objc_designated_initializer) +# define OBJC_DESIGNATED_INITIALIZER __attribute__((objc_designated_initializer)) +# else +# define OBJC_DESIGNATED_INITIALIZER +# endif +#endif +#if !defined(SWIFT_ENUM_ATTR) +# if defined(__has_attribute) && __has_attribute(enum_extensibility) +# define SWIFT_ENUM_ATTR(_extensibility) __attribute__((enum_extensibility(_extensibility))) +# else +# define SWIFT_ENUM_ATTR(_extensibility) +# endif +#endif +#if !defined(SWIFT_ENUM) +# define SWIFT_ENUM(_type, _name, _extensibility) enum _name : _type _name; enum SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type +# if __has_feature(generalized_swift_name) +# define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) enum _name : _type _name SWIFT_COMPILE_NAME(SWIFT_NAME); enum SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type +# else +# define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) SWIFT_ENUM(_type, _name, _extensibility) +# endif +#endif +#if !defined(SWIFT_UNAVAILABLE) +# define SWIFT_UNAVAILABLE __attribute__((unavailable)) +#endif +#if !defined(SWIFT_UNAVAILABLE_MSG) +# define SWIFT_UNAVAILABLE_MSG(msg) __attribute__((unavailable(msg))) +#endif +#if !defined(SWIFT_AVAILABILITY) +# define SWIFT_AVAILABILITY(plat, ...) __attribute__((availability(plat, __VA_ARGS__))) +#endif +#if !defined(SWIFT_WEAK_IMPORT) +# define SWIFT_WEAK_IMPORT __attribute__((weak_import)) +#endif +#if !defined(SWIFT_DEPRECATED) +# define SWIFT_DEPRECATED __attribute__((deprecated)) +#endif +#if !defined(SWIFT_DEPRECATED_MSG) +# define SWIFT_DEPRECATED_MSG(...) __attribute__((deprecated(__VA_ARGS__))) +#endif +#if __has_feature(attribute_diagnose_if_objc) +# define SWIFT_DEPRECATED_OBJC(Msg) __attribute__((diagnose_if(1, Msg, "warning"))) +#else +# define SWIFT_DEPRECATED_OBJC(Msg) SWIFT_DEPRECATED_MSG(Msg) +#endif +#if defined(__OBJC__) +#if !defined(IBSegueAction) +# define IBSegueAction +#endif +#endif +#if !defined(SWIFT_EXTERN) +# if defined(__cplusplus) +# define SWIFT_EXTERN extern "C" +# else +# define SWIFT_EXTERN extern +# endif +#endif +#if !defined(SWIFT_CALL) +# define SWIFT_CALL __attribute__((swiftcall)) +#endif +#if defined(__cplusplus) +#if !defined(SWIFT_NOEXCEPT) +# define SWIFT_NOEXCEPT noexcept +#endif +#else +#if !defined(SWIFT_NOEXCEPT) +# define SWIFT_NOEXCEPT +#endif +#endif +#if defined(__cplusplus) +#if !defined(SWIFT_CXX_INT_DEFINED) +#define SWIFT_CXX_INT_DEFINED +namespace swift { +using Int = ptrdiff_t; +using UInt = size_t; +} +#endif +#endif +#if defined(__OBJC__) +#if __has_feature(modules) +#if __has_warning("-Watimport-in-framework-header") +#pragma clang diagnostic ignored "-Watimport-in-framework-header" +#endif +@import Foundation; +@import ObjectiveC; +@import OneSignalNotifications; +#endif + +#endif +#pragma clang diagnostic ignored "-Wproperty-attribute-mismatch" +#pragma clang diagnostic ignored "-Wduplicate-method-arg" +#if __has_warning("-Wpragma-clang-attribute") +# pragma clang diagnostic ignored "-Wpragma-clang-attribute" +#endif +#pragma clang diagnostic ignored "-Wunknown-pragmas" +#pragma clang diagnostic ignored "-Wnullability" +#pragma clang diagnostic ignored "-Wdollar-in-identifier-extension" + +#if __has_attribute(external_source_symbol) +# pragma push_macro("any") +# undef any +# pragma clang attribute push(__attribute__((external_source_symbol(language="Swift", defined_in="OneSignalUser",generated_declaration))), apply_to=any(function,enum,objc_interface,objc_category,objc_protocol)) +# pragma pop_macro("any") +#endif + +#if defined(__OBJC__) +@class NSString; +@protocol OSPushSubscriptionObserver; + +/// This is the push subscription interface exposed to the public. +SWIFT_PROTOCOL("_TtP13OneSignalUser18OSPushSubscription_") +@protocol OSPushSubscription +@property (nonatomic, readonly, copy) NSString * _Nullable id; +@property (nonatomic, readonly, copy) NSString * _Nullable token; +@property (nonatomic, readonly) BOOL optedIn; +- (void)optIn; +- (void)optOut; +- (void)addObserver:(id _Nonnull)observer; +- (void)removeObserver:(id _Nonnull)observer; +@end + +@class OSPushSubscriptionState; +@class NSDictionary; + +SWIFT_CLASS("_TtC13OneSignalUser30OSPushSubscriptionChangedState") +@interface OSPushSubscriptionChangedState : NSObject +@property (nonatomic, readonly, strong) OSPushSubscriptionState * _Nonnull current; +@property (nonatomic, readonly, strong) OSPushSubscriptionState * _Nonnull previous; +@property (nonatomic, readonly, copy) NSString * _Nonnull description; +- (NSDictionary * _Nonnull)jsonRepresentation SWIFT_WARN_UNUSED_RESULT; +- (nonnull instancetype)init SWIFT_UNAVAILABLE; ++ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); +@end + + +SWIFT_PROTOCOL("_TtP13OneSignalUser26OSPushSubscriptionObserver_") +@protocol OSPushSubscriptionObserver +- (void)onPushSubscriptionDidChangeWithState:(OSPushSubscriptionChangedState * _Nonnull)state; +@end + + +SWIFT_CLASS("_TtC13OneSignalUser23OSPushSubscriptionState") +@interface OSPushSubscriptionState : NSObject +@property (nonatomic, readonly, copy) NSString * _Nullable id; +@property (nonatomic, readonly, copy) NSString * _Nullable token; +@property (nonatomic, readonly) BOOL optedIn; +@property (nonatomic, readonly, copy) NSString * _Nonnull description; +- (NSDictionary * _Nonnull)jsonRepresentation SWIFT_WARN_UNUSED_RESULT; +- (nonnull instancetype)init SWIFT_UNAVAILABLE; ++ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); +@end + + +/// This is the user interface exposed to the public. +SWIFT_PROTOCOL("_TtP13OneSignalUser6OSUser_") +@protocol OSUser +@property (nonatomic, readonly, strong) id _Nonnull pushSubscription; +- (void)addAliasWithLabel:(NSString * _Nonnull)label id:(NSString * _Nonnull)id; +- (void)addAliases:(NSDictionary * _Nonnull)aliases; +- (void)removeAlias:(NSString * _Nonnull)label; +- (void)removeAliases:(NSArray * _Nonnull)labels; +- (void)addTagWithKey:(NSString * _Nonnull)key value:(NSString * _Nonnull)value; +- (void)addTags:(NSDictionary * _Nonnull)tags; +- (void)removeTag:(NSString * _Nonnull)tag; +- (void)removeTags:(NSArray * _Nonnull)tags; +- (void)addEmail:(NSString * _Nonnull)email; +- (void)removeEmail:(NSString * _Nonnull)email; +- (void)addSms:(NSString * _Nonnull)number; +- (void)removeSms:(NSString * _Nonnull)number; +- (void)setLanguage:(NSString * _Nonnull)language; +- (void)onJwtExpiredWithExpiredHandler:(void (^ _Nonnull)(NSString * _Nonnull, SWIFT_NOESCAPE void (^ _Nonnull)(NSString * _Nonnull)))expiredHandler; +@end + + + +SWIFT_CLASS("_TtC13OneSignalUser24OneSignalUserManagerImpl") +@interface OneSignalUserManagerImpl : NSObject +SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) OneSignalUserManagerImpl * _Nonnull sharedInstance;) ++ (OneSignalUserManagerImpl * _Nonnull)sharedInstance SWIFT_WARN_UNUSED_RESULT; +@property (nonatomic, readonly, copy) NSString * _Nullable onesignalId; +@property (nonatomic, readonly, copy) NSString * _Nullable pushSubscriptionId; +@property (nonatomic, readonly, copy) NSString * _Nullable language; +@property (nonatomic) BOOL requiresUserAuth; +- (nonnull instancetype)init SWIFT_UNAVAILABLE; ++ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); +- (void)start; +- (void)loginWithExternalId:(NSString * _Nonnull)externalId token:(NSString * _Nullable)token; +/// The SDK needs to have a user at all times, so this method will create a new anonymous user. If the current user is already anonymous, calling logout results in a no-op. +- (void)logout; +- (void)clearAllModelsFromStores; +- (NSDictionary * _Nullable)getTags SWIFT_WARN_UNUSED_RESULT; +- (void)setLocationWithLatitude:(float)latitude longitude:(float)longitude; +- (void)sendPurchases:(NSArray *> * _Nonnull)purchases; +@end + + +@interface OneSignalUserManagerImpl (SWIFT_EXTENSION(OneSignalUser)) +- (void)setNotificationTypes:(int32_t)notificationTypes; +- (void)setPushToken:(NSString * _Nonnull)pushToken; +@end + +@class NSNumber; + +@interface OneSignalUserManagerImpl (SWIFT_EXTENSION(OneSignalUser)) +- (void)startNewSession; +- (void)updateSessionWithSessionCount:(NSNumber * _Nullable)sessionCount sessionTime:(NSNumber * _Nullable)sessionTime refreshDeviceMetadata:(BOOL)refreshDeviceMetadata sendImmediately:(BOOL)sendImmediately onSuccess:(void (^ _Nullable)(void))onSuccess onFailure:(void (^ _Nullable)(void))onFailure; +/// App has been backgrounded. Run background tasks such to flush the operation repo and hydrating models. +/// Need to consider app killed vs app backgrounded and handle gracefully. +- (void)runBackgroundTasks; +@end + + +@interface OneSignalUserManagerImpl (SWIFT_EXTENSION(OneSignalUser)) +- (void)addObserver:(id _Nonnull)observer; +- (void)removeObserver:(id _Nonnull)observer; +@property (nonatomic, readonly, copy) NSString * _Nullable id; +@property (nonatomic, readonly, copy) NSString * _Nullable token; +@property (nonatomic, readonly) BOOL optedIn; +/// Enable the push subscription, and prompts if needed. optedIn can still be false after optIn() is called if permission is not granted. +- (void)optIn; +- (void)optOut; +@end + + +@interface OneSignalUserManagerImpl (SWIFT_EXTENSION(OneSignalUser)) +- (void)onJwtExpiredWithExpiredHandler:(void (^ _Nonnull)(NSString * _Nonnull, SWIFT_NOESCAPE void (^ _Nonnull)(NSString * _Nonnull)))expiredHandler; +@property (nonatomic, readonly, strong) id _Nonnull User; +@property (nonatomic, readonly, strong) id _Nonnull pushSubscription; +- (void)addAliasWithLabel:(NSString * _Nonnull)label id:(NSString * _Nonnull)id; +- (void)addAliases:(NSDictionary * _Nonnull)aliases; +- (void)removeAlias:(NSString * _Nonnull)label; +- (void)removeAliases:(NSArray * _Nonnull)labels; +- (void)addTagWithKey:(NSString * _Nonnull)key value:(NSString * _Nonnull)value; +- (void)addTags:(NSDictionary * _Nonnull)tags; +- (void)removeTag:(NSString * _Nonnull)tag; +- (void)removeTags:(NSArray * _Nonnull)tags; +- (void)addEmail:(NSString * _Nonnull)email; +/// If this email doesn’t already exist on the user, it cannot be removed. +/// This will be a no-op and no request will be made. +/// Error handling needs to be implemented in the future. +- (void)removeEmail:(NSString * _Nonnull)email; +- (void)addSms:(NSString * _Nonnull)number; +/// If this email doesn’t already exist on the user, it cannot be removed. +/// This will be a no-op and no request will be made. +/// Error handling needs to be implemented in the future. +- (void)removeSms:(NSString * _Nonnull)number; +- (void)setLanguage:(NSString * _Nonnull)language; +@end + +#endif +#if defined(__cplusplus) +#endif +#if __has_attribute(external_source_symbol) +# pragma clang attribute pop +#endif +#pragma clang diagnostic pop +#endif + +#else +#error unsupported Swift architecture +#endif diff --git a/iOS_SDK/OneSignalSDK/OneSignal_User/OneSignalUser.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalUser.framework/Versions/A/Headers/OneSignalUser.h b/iOS_SDK/OneSignalSDK/OneSignal_User/OneSignalUser.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalUser.framework/Versions/A/Headers/OneSignalUser.h new file mode 100644 index 000000000..e677dada3 --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignal_User/OneSignalUser.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalUser.framework/Versions/A/Headers/OneSignalUser.h @@ -0,0 +1,34 @@ +/* + Modified MIT License + + Copyright 2022 OneSignal + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + 1. The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + 2. All copies of substantial portions of the Software may only be used in connection + with services provided by OneSignal. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + */ + +#import + +//! Project version number for OneSignalUser. +FOUNDATION_EXPORT double OneSignalUserVersionNumber; + +//! Project version string for OneSignalUser. +FOUNDATION_EXPORT const unsigned char OneSignalUserVersionString[]; diff --git a/iOS_SDK/OneSignalSDK/OneSignal_User/OneSignalUser.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalUser.framework/Versions/A/Modules/OneSignalUser.swiftmodule/arm64-apple-ios-macabi.abi.json b/iOS_SDK/OneSignalSDK/OneSignal_User/OneSignalUser.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalUser.framework/Versions/A/Modules/OneSignalUser.swiftmodule/arm64-apple-ios-macabi.abi.json new file mode 100644 index 000000000..9e99e9246 --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignal_User/OneSignalUser.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalUser.framework/Versions/A/Modules/OneSignalUser.swiftmodule/arm64-apple-ios-macabi.abi.json @@ -0,0 +1,4152 @@ +{ + "ABIRoot": { + "kind": "Root", + "name": "TopLevel", + "printedName": "TopLevel", + "children": [ + { + "kind": "Import", + "name": "Foundation", + "printedName": "Foundation", + "declKind": "Import", + "moduleName": "OneSignalUser", + "declAttributes": [ + "RawDocComment" + ] + }, + { + "kind": "Import", + "name": "OneSignalCore", + "printedName": "OneSignalCore", + "declKind": "Import", + "moduleName": "OneSignalUser" + }, + { + "kind": "Import", + "name": "OneSignalOSCore", + "printedName": "OneSignalOSCore", + "declKind": "Import", + "moduleName": "OneSignalUser" + }, + { + "kind": "Import", + "name": "OneSignalCore", + "printedName": "OneSignalCore", + "declKind": "Import", + "moduleName": "OneSignalUser", + "declAttributes": [ + "RawDocComment" + ] + }, + { + "kind": "Import", + "name": "OneSignalOSCore", + "printedName": "OneSignalOSCore", + "declKind": "Import", + "moduleName": "OneSignalUser" + }, + { + "kind": "Import", + "name": "OneSignalNotifications", + "printedName": "OneSignalNotifications", + "declKind": "Import", + "moduleName": "OneSignalUser" + }, + { + "kind": "TypeDecl", + "name": "OSUser", + "printedName": "OSUser", + "children": [ + { + "kind": "Var", + "name": "pushSubscription", + "printedName": "pushSubscription", + "children": [ + { + "kind": "TypeNominal", + "name": "OSPushSubscription", + "printedName": "OneSignalUser.OSPushSubscription", + "usr": "c:@M@OneSignalUser@objc(pl)OSPushSubscription" + } + ], + "declKind": "Var", + "usr": "c:@M@OneSignalUser@objc(pl)OSUser(py)pushSubscription", + "mangledName": "$s13OneSignalUser6OSUserP16pushSubscriptionAA06OSPushF0_pvp", + "moduleName": "OneSignalUser", + "protocolReq": true, + "declAttributes": [ + "ObjC" + ], + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "OSPushSubscription", + "printedName": "OneSignalUser.OSPushSubscription", + "usr": "c:@M@OneSignalUser@objc(pl)OSPushSubscription" + } + ], + "declKind": "Accessor", + "usr": "c:@M@OneSignalUser@objc(pl)OSUser(im)pushSubscription", + "mangledName": "$s13OneSignalUser6OSUserP16pushSubscriptionAA06OSPushF0_pvg", + "moduleName": "OneSignalUser", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalUser.OSUser>", + "sugared_genericSig": "", + "protocolReq": true, + "declAttributes": [ + "ObjC" + ], + "reqNewWitnessTableEntry": true, + "accessorKind": "get" + } + ] + }, + { + "kind": "Function", + "name": "addAlias", + "printedName": "addAlias(label:id:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Func", + "usr": "c:@M@OneSignalUser@objc(pl)OSUser(im)addAliasWithLabel:id:", + "mangledName": "$s13OneSignalUser6OSUserP8addAlias5label2idySS_SStF", + "moduleName": "OneSignalUser", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalUser.OSUser>", + "sugared_genericSig": "", + "protocolReq": true, + "declAttributes": [ + "RawDocComment", + "ObjC" + ], + "reqNewWitnessTableEntry": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "addAliases", + "printedName": "addAliases(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "Dictionary", + "printedName": "[Swift.String : Swift.String]", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:SD" + } + ], + "declKind": "Func", + "usr": "c:@M@OneSignalUser@objc(pl)OSUser(im)addAliases:", + "mangledName": "$s13OneSignalUser6OSUserP10addAliasesyySDyS2SGF", + "moduleName": "OneSignalUser", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalUser.OSUser>", + "sugared_genericSig": "", + "protocolReq": true, + "declAttributes": [ + "ObjC" + ], + "reqNewWitnessTableEntry": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "removeAlias", + "printedName": "removeAlias(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Func", + "usr": "c:@M@OneSignalUser@objc(pl)OSUser(im)removeAlias:", + "mangledName": "$s13OneSignalUser6OSUserP11removeAliasyySSF", + "moduleName": "OneSignalUser", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalUser.OSUser>", + "sugared_genericSig": "", + "protocolReq": true, + "declAttributes": [ + "ObjC" + ], + "reqNewWitnessTableEntry": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "removeAliases", + "printedName": "removeAliases(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "Array", + "printedName": "[Swift.String]", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:Sa" + } + ], + "declKind": "Func", + "usr": "c:@M@OneSignalUser@objc(pl)OSUser(im)removeAliases:", + "mangledName": "$s13OneSignalUser6OSUserP13removeAliasesyySaySSGF", + "moduleName": "OneSignalUser", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalUser.OSUser>", + "sugared_genericSig": "", + "protocolReq": true, + "declAttributes": [ + "ObjC" + ], + "reqNewWitnessTableEntry": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "addTag", + "printedName": "addTag(key:value:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Func", + "usr": "c:@M@OneSignalUser@objc(pl)OSUser(im)addTagWithKey:value:", + "mangledName": "$s13OneSignalUser6OSUserP6addTag3key5valueySS_SStF", + "moduleName": "OneSignalUser", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalUser.OSUser>", + "sugared_genericSig": "", + "protocolReq": true, + "declAttributes": [ + "RawDocComment", + "ObjC" + ], + "reqNewWitnessTableEntry": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "addTags", + "printedName": "addTags(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "Dictionary", + "printedName": "[Swift.String : Swift.String]", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:SD" + } + ], + "declKind": "Func", + "usr": "c:@M@OneSignalUser@objc(pl)OSUser(im)addTags:", + "mangledName": "$s13OneSignalUser6OSUserP7addTagsyySDyS2SGF", + "moduleName": "OneSignalUser", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalUser.OSUser>", + "sugared_genericSig": "", + "protocolReq": true, + "declAttributes": [ + "ObjC" + ], + "reqNewWitnessTableEntry": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "removeTag", + "printedName": "removeTag(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Func", + "usr": "c:@M@OneSignalUser@objc(pl)OSUser(im)removeTag:", + "mangledName": "$s13OneSignalUser6OSUserP9removeTagyySSF", + "moduleName": "OneSignalUser", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalUser.OSUser>", + "sugared_genericSig": "", + "protocolReq": true, + "declAttributes": [ + "ObjC" + ], + "reqNewWitnessTableEntry": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "removeTags", + "printedName": "removeTags(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "Array", + "printedName": "[Swift.String]", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:Sa" + } + ], + "declKind": "Func", + "usr": "c:@M@OneSignalUser@objc(pl)OSUser(im)removeTags:", + "mangledName": "$s13OneSignalUser6OSUserP10removeTagsyySaySSGF", + "moduleName": "OneSignalUser", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalUser.OSUser>", + "sugared_genericSig": "", + "protocolReq": true, + "declAttributes": [ + "ObjC" + ], + "reqNewWitnessTableEntry": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "addEmail", + "printedName": "addEmail(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Func", + "usr": "c:@M@OneSignalUser@objc(pl)OSUser(im)addEmail:", + "mangledName": "$s13OneSignalUser6OSUserP8addEmailyySSF", + "moduleName": "OneSignalUser", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalUser.OSUser>", + "sugared_genericSig": "", + "protocolReq": true, + "declAttributes": [ + "RawDocComment", + "ObjC" + ], + "reqNewWitnessTableEntry": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "removeEmail", + "printedName": "removeEmail(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Func", + "usr": "c:@M@OneSignalUser@objc(pl)OSUser(im)removeEmail:", + "mangledName": "$s13OneSignalUser6OSUserP11removeEmailyySSF", + "moduleName": "OneSignalUser", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalUser.OSUser>", + "sugared_genericSig": "", + "protocolReq": true, + "declAttributes": [ + "ObjC" + ], + "reqNewWitnessTableEntry": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "addSms", + "printedName": "addSms(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Func", + "usr": "c:@M@OneSignalUser@objc(pl)OSUser(im)addSms:", + "mangledName": "$s13OneSignalUser6OSUserP6addSmsyySSF", + "moduleName": "OneSignalUser", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalUser.OSUser>", + "sugared_genericSig": "", + "protocolReq": true, + "declAttributes": [ + "RawDocComment", + "ObjC" + ], + "reqNewWitnessTableEntry": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "removeSms", + "printedName": "removeSms(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Func", + "usr": "c:@M@OneSignalUser@objc(pl)OSUser(im)removeSms:", + "mangledName": "$s13OneSignalUser6OSUserP9removeSmsyySSF", + "moduleName": "OneSignalUser", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalUser.OSUser>", + "sugared_genericSig": "", + "protocolReq": true, + "declAttributes": [ + "ObjC" + ], + "reqNewWitnessTableEntry": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "setLanguage", + "printedName": "setLanguage(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Func", + "usr": "c:@M@OneSignalUser@objc(pl)OSUser(im)setLanguage:", + "mangledName": "$s13OneSignalUser6OSUserP11setLanguageyySSF", + "moduleName": "OneSignalUser", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalUser.OSUser>", + "sugared_genericSig": "", + "protocolReq": true, + "declAttributes": [ + "RawDocComment", + "ObjC" + ], + "reqNewWitnessTableEntry": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "onJwtExpired", + "printedName": "onJwtExpired(expiredHandler:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeFunc", + "name": "Function", + "printedName": "(Swift.String, (Swift.String) -> ()) -> ()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "Tuple", + "printedName": "(Swift.String, (Swift.String) -> ())", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + }, + { + "kind": "TypeFunc", + "name": "Function", + "printedName": "(Swift.String) -> ()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "typeAttributes": [ + "noescape" + ] + } + ] + } + ] + } + ], + "declKind": "Func", + "usr": "c:@M@OneSignalUser@objc(pl)OSUser(im)onJwtExpiredWithExpiredHandler:", + "mangledName": "$s13OneSignalUser6OSUserP12onJwtExpired14expiredHandleryySS_ySSXEtc_tF", + "moduleName": "OneSignalUser", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalUser.OSUser>", + "sugared_genericSig": "", + "protocolReq": true, + "declAttributes": [ + "ObjC" + ], + "reqNewWitnessTableEntry": true, + "funcSelfKind": "NonMutating" + } + ], + "declKind": "Protocol", + "usr": "c:@M@OneSignalUser@objc(pl)OSUser", + "mangledName": "$s13OneSignalUser6OSUserP", + "moduleName": "OneSignalUser", + "genericSig": "<τ_0_0 : AnyObject>", + "sugared_genericSig": "", + "declAttributes": [ + "AccessControl", + "ObjC", + "RawDocComment" + ] + }, + { + "kind": "TypeDecl", + "name": "OSPushSubscription", + "printedName": "OSPushSubscription", + "children": [ + { + "kind": "Var", + "name": "id", + "printedName": "id", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "Swift.String?", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Var", + "usr": "c:@M@OneSignalUser@objc(pl)OSPushSubscription(py)id", + "mangledName": "$s13OneSignalUser18OSPushSubscriptionP2idSSSgvp", + "moduleName": "OneSignalUser", + "protocolReq": true, + "declAttributes": [ + "ObjC" + ], + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "Swift.String?", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Accessor", + "usr": "c:@M@OneSignalUser@objc(pl)OSPushSubscription(im)id", + "mangledName": "$s13OneSignalUser18OSPushSubscriptionP2idSSSgvg", + "moduleName": "OneSignalUser", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalUser.OSPushSubscription>", + "sugared_genericSig": "", + "protocolReq": true, + "declAttributes": [ + "ObjC" + ], + "reqNewWitnessTableEntry": true, + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "token", + "printedName": "token", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "Swift.String?", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Var", + "usr": "c:@M@OneSignalUser@objc(pl)OSPushSubscription(py)token", + "mangledName": "$s13OneSignalUser18OSPushSubscriptionP5tokenSSSgvp", + "moduleName": "OneSignalUser", + "protocolReq": true, + "declAttributes": [ + "ObjC" + ], + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "Swift.String?", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Accessor", + "usr": "c:@M@OneSignalUser@objc(pl)OSPushSubscription(im)token", + "mangledName": "$s13OneSignalUser18OSPushSubscriptionP5tokenSSSgvg", + "moduleName": "OneSignalUser", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalUser.OSPushSubscription>", + "sugared_genericSig": "", + "protocolReq": true, + "declAttributes": [ + "ObjC" + ], + "reqNewWitnessTableEntry": true, + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "optedIn", + "printedName": "optedIn", + "children": [ + { + "kind": "TypeNominal", + "name": "Bool", + "printedName": "Swift.Bool", + "usr": "s:Sb" + } + ], + "declKind": "Var", + "usr": "c:@M@OneSignalUser@objc(pl)OSPushSubscription(py)optedIn", + "mangledName": "$s13OneSignalUser18OSPushSubscriptionP7optedInSbvp", + "moduleName": "OneSignalUser", + "protocolReq": true, + "declAttributes": [ + "ObjC" + ], + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "Bool", + "printedName": "Swift.Bool", + "usr": "s:Sb" + } + ], + "declKind": "Accessor", + "usr": "c:@M@OneSignalUser@objc(pl)OSPushSubscription(im)optedIn", + "mangledName": "$s13OneSignalUser18OSPushSubscriptionP7optedInSbvg", + "moduleName": "OneSignalUser", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalUser.OSPushSubscription>", + "sugared_genericSig": "", + "protocolReq": true, + "declAttributes": [ + "ObjC" + ], + "reqNewWitnessTableEntry": true, + "accessorKind": "get" + } + ] + }, + { + "kind": "Function", + "name": "optIn", + "printedName": "optIn()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + } + ], + "declKind": "Func", + "usr": "c:@M@OneSignalUser@objc(pl)OSPushSubscription(im)optIn", + "mangledName": "$s13OneSignalUser18OSPushSubscriptionP5optInyyF", + "moduleName": "OneSignalUser", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalUser.OSPushSubscription>", + "sugared_genericSig": "", + "protocolReq": true, + "declAttributes": [ + "ObjC" + ], + "reqNewWitnessTableEntry": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "optOut", + "printedName": "optOut()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + } + ], + "declKind": "Func", + "usr": "c:@M@OneSignalUser@objc(pl)OSPushSubscription(im)optOut", + "mangledName": "$s13OneSignalUser18OSPushSubscriptionP6optOutyyF", + "moduleName": "OneSignalUser", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalUser.OSPushSubscription>", + "sugared_genericSig": "", + "protocolReq": true, + "declAttributes": [ + "ObjC" + ], + "reqNewWitnessTableEntry": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "addObserver", + "printedName": "addObserver(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "OSPushSubscriptionObserver", + "printedName": "OneSignalUser.OSPushSubscriptionObserver", + "usr": "c:@M@OneSignalUser@objc(pl)OSPushSubscriptionObserver" + } + ], + "declKind": "Func", + "usr": "c:@M@OneSignalUser@objc(pl)OSPushSubscription(im)addObserver:", + "mangledName": "$s13OneSignalUser18OSPushSubscriptionP11addObserveryyAA0deG0_pF", + "moduleName": "OneSignalUser", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalUser.OSPushSubscription>", + "sugared_genericSig": "", + "protocolReq": true, + "declAttributes": [ + "ObjC" + ], + "reqNewWitnessTableEntry": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "removeObserver", + "printedName": "removeObserver(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "OSPushSubscriptionObserver", + "printedName": "OneSignalUser.OSPushSubscriptionObserver", + "usr": "c:@M@OneSignalUser@objc(pl)OSPushSubscriptionObserver" + } + ], + "declKind": "Func", + "usr": "c:@M@OneSignalUser@objc(pl)OSPushSubscription(im)removeObserver:", + "mangledName": "$s13OneSignalUser18OSPushSubscriptionP14removeObserveryyAA0deG0_pF", + "moduleName": "OneSignalUser", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalUser.OSPushSubscription>", + "sugared_genericSig": "", + "protocolReq": true, + "declAttributes": [ + "ObjC" + ], + "reqNewWitnessTableEntry": true, + "funcSelfKind": "NonMutating" + } + ], + "declKind": "Protocol", + "usr": "c:@M@OneSignalUser@objc(pl)OSPushSubscription", + "mangledName": "$s13OneSignalUser18OSPushSubscriptionP", + "moduleName": "OneSignalUser", + "genericSig": "<τ_0_0 : AnyObject>", + "sugared_genericSig": "", + "declAttributes": [ + "AccessControl", + "ObjC", + "RawDocComment" + ] + }, + { + "kind": "TypeDecl", + "name": "OneSignalUserManagerImpl", + "printedName": "OneSignalUserManagerImpl", + "children": [ + { + "kind": "Var", + "name": "sharedInstance", + "printedName": "sharedInstance", + "children": [ + { + "kind": "TypeNominal", + "name": "OneSignalUserManagerImpl", + "printedName": "OneSignalUser.OneSignalUserManagerImpl", + "usr": "c:@M@OneSignalUser@objc(cs)OneSignalUserManagerImpl" + } + ], + "declKind": "Var", + "usr": "c:@M@OneSignalUser@objc(cs)OneSignalUserManagerImpl(cpy)sharedInstance", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC14sharedInstanceACvpZ", + "moduleName": "OneSignalUser", + "static": true, + "declAttributes": [ + "HasInitialValue", + "Final", + "HasStorage", + "AccessControl", + "ObjC" + ], + "isLet": true, + "hasStorage": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "OneSignalUserManagerImpl", + "printedName": "OneSignalUser.OneSignalUserManagerImpl", + "usr": "c:@M@OneSignalUser@objc(cs)OneSignalUserManagerImpl" + } + ], + "declKind": "Accessor", + "usr": "c:@M@OneSignalUser@objc(cs)OneSignalUserManagerImpl(cm)sharedInstance", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC14sharedInstanceACvgZ", + "moduleName": "OneSignalUser", + "static": true, + "implicit": true, + "declAttributes": [ + "Final", + "ObjC" + ], + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "onesignalId", + "printedName": "onesignalId", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "Swift.String?", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Var", + "usr": "c:@M@OneSignalUser@objc(cs)OneSignalUserManagerImpl(py)onesignalId", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC11onesignalIdSSSgvp", + "moduleName": "OneSignalUser", + "declAttributes": [ + "AccessControl", + "ObjC" + ], + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "Swift.String?", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Accessor", + "usr": "c:@M@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)onesignalId", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC11onesignalIdSSSgvg", + "moduleName": "OneSignalUser", + "declAttributes": [ + "ObjC" + ], + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "pushSubscriptionId", + "printedName": "pushSubscriptionId", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "Swift.String?", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Var", + "usr": "c:@M@OneSignalUser@objc(cs)OneSignalUserManagerImpl(py)pushSubscriptionId", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC18pushSubscriptionIdSSSgvp", + "moduleName": "OneSignalUser", + "declAttributes": [ + "AccessControl", + "ObjC" + ], + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "Swift.String?", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Accessor", + "usr": "c:@M@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)pushSubscriptionId", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC18pushSubscriptionIdSSSgvg", + "moduleName": "OneSignalUser", + "declAttributes": [ + "ObjC" + ], + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "language", + "printedName": "language", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "Swift.String?", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Var", + "usr": "c:@M@OneSignalUser@objc(cs)OneSignalUserManagerImpl(py)language", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC8languageSSSgvp", + "moduleName": "OneSignalUser", + "declAttributes": [ + "AccessControl", + "ObjC" + ], + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "Swift.String?", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Accessor", + "usr": "c:@M@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)language", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC8languageSSSgvg", + "moduleName": "OneSignalUser", + "declAttributes": [ + "ObjC" + ], + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "requiresUserAuth", + "printedName": "requiresUserAuth", + "children": [ + { + "kind": "TypeNominal", + "name": "Bool", + "printedName": "Swift.Bool", + "usr": "s:Sb" + } + ], + "declKind": "Var", + "usr": "c:@M@OneSignalUser@objc(cs)OneSignalUserManagerImpl(py)requiresUserAuth", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC08requiresC4AuthSbvp", + "moduleName": "OneSignalUser", + "declAttributes": [ + "HasInitialValue", + "HasStorage", + "AccessControl", + "ObjC" + ], + "hasStorage": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "Bool", + "printedName": "Swift.Bool", + "usr": "s:Sb" + } + ], + "declKind": "Accessor", + "usr": "c:@M@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)requiresUserAuth", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC08requiresC4AuthSbvg", + "moduleName": "OneSignalUser", + "implicit": true, + "declAttributes": [ + "ObjC" + ], + "accessorKind": "get" + }, + { + "kind": "Accessor", + "name": "Set", + "printedName": "Set()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "Bool", + "printedName": "Swift.Bool", + "usr": "s:Sb" + } + ], + "declKind": "Accessor", + "usr": "c:@M@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)setRequiresUserAuth:", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC08requiresC4AuthSbvs", + "moduleName": "OneSignalUser", + "implicit": true, + "declAttributes": [ + "ObjC" + ], + "accessorKind": "set" + }, + { + "kind": "Accessor", + "name": "Modify", + "printedName": "Modify()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + } + ], + "declKind": "Accessor", + "usr": "s:13OneSignalUser0abC11ManagerImplC08requiresC4AuthSbvM", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC08requiresC4AuthSbvM", + "moduleName": "OneSignalUser", + "implicit": true, + "accessorKind": "_modify" + } + ] + }, + { + "kind": "Function", + "name": "start", + "printedName": "start()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + } + ], + "declKind": "Func", + "usr": "c:@M@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)start", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC5startyyF", + "moduleName": "OneSignalUser", + "declAttributes": [ + "AccessControl", + "ObjC", + "RawDocComment" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "login", + "printedName": "login(externalId:token:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + }, + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "Swift.String?", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Func", + "usr": "c:@M@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)loginWithExternalId:token:", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC5login10externalId5tokenySS_SSSgtF", + "moduleName": "OneSignalUser", + "objc_name": "loginWithExternalId:token:", + "declAttributes": [ + "ObjC", + "AccessControl" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "logout", + "printedName": "logout()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + } + ], + "declKind": "Func", + "usr": "c:@M@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)logout", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC6logoutyyF", + "moduleName": "OneSignalUser", + "objc_name": "logout", + "declAttributes": [ + "ObjC", + "AccessControl", + "RawDocComment" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "_logout", + "printedName": "_logout()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + } + ], + "declKind": "Func", + "usr": "s:13OneSignalUser0abC11ManagerImplC7_logoutyyF", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC7_logoutyyF", + "moduleName": "OneSignalUser", + "declAttributes": [ + "AccessControl" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "clearAllModelsFromStores", + "printedName": "clearAllModelsFromStores()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + } + ], + "declKind": "Func", + "usr": "c:@M@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)clearAllModelsFromStores", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC24clearAllModelsFromStoresyyF", + "moduleName": "OneSignalUser", + "declAttributes": [ + "AccessControl", + "ObjC" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "getTags", + "printedName": "getTags()", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "[Swift.String : Swift.String]?", + "children": [ + { + "kind": "TypeNominal", + "name": "Dictionary", + "printedName": "[Swift.String : Swift.String]", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:SD" + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Func", + "usr": "c:@M@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)getTags", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC7getTagsSDyS2SGSgyF", + "moduleName": "OneSignalUser", + "declAttributes": [ + "AccessControl", + "ObjC" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "setLocation", + "printedName": "setLocation(latitude:longitude:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "Float", + "printedName": "Swift.Float", + "usr": "s:Sf" + }, + { + "kind": "TypeNominal", + "name": "Float", + "printedName": "Swift.Float", + "usr": "s:Sf" + } + ], + "declKind": "Func", + "usr": "c:@M@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)setLocationWithLatitude:longitude:", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC11setLocation8latitude9longitudeySf_SftF", + "moduleName": "OneSignalUser", + "objc_name": "setLocationWithLatitude:longitude:", + "declAttributes": [ + "ObjC", + "AccessControl" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "sendPurchases", + "printedName": "sendPurchases(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "Array", + "printedName": "[[Swift.String : AnyObject]]", + "children": [ + { + "kind": "TypeNominal", + "name": "Dictionary", + "printedName": "[Swift.String : AnyObject]", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + }, + { + "kind": "TypeNominal", + "name": "ProtocolComposition", + "printedName": "AnyObject" + } + ], + "usr": "s:SD" + } + ], + "usr": "s:Sa" + } + ], + "declKind": "Func", + "usr": "c:@M@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)sendPurchases:", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC13sendPurchasesyySaySDySSyXlGGF", + "moduleName": "OneSignalUser", + "objc_name": "sendPurchases:", + "declAttributes": [ + "ObjC", + "AccessControl" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "startNewSession", + "printedName": "startNewSession()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + } + ], + "declKind": "Func", + "usr": "c:@CM@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)startNewSession", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC15startNewSessionyyF", + "moduleName": "OneSignalUser", + "declAttributes": [ + "Dynamic", + "AccessControl", + "ObjC" + ], + "isFromExtension": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "updateSession", + "printedName": "updateSession(sessionCount:sessionTime:refreshDeviceMetadata:sendImmediately:onSuccess:onFailure:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "Foundation.NSNumber?", + "children": [ + { + "kind": "TypeNominal", + "name": "NSNumber", + "printedName": "Foundation.NSNumber", + "usr": "c:objc(cs)NSNumber" + } + ], + "usr": "s:Sq" + }, + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "Foundation.NSNumber?", + "children": [ + { + "kind": "TypeNominal", + "name": "NSNumber", + "printedName": "Foundation.NSNumber", + "usr": "c:objc(cs)NSNumber" + } + ], + "usr": "s:Sq" + }, + { + "kind": "TypeNominal", + "name": "Bool", + "printedName": "Swift.Bool", + "usr": "s:Sb" + }, + { + "kind": "TypeNominal", + "name": "Bool", + "printedName": "Swift.Bool", + "hasDefaultArg": true, + "usr": "s:Sb" + }, + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "(() -> ())?", + "children": [ + { + "kind": "TypeFunc", + "name": "Function", + "printedName": "() -> ()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + } + ] + } + ], + "hasDefaultArg": true, + "usr": "s:Sq" + }, + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "(() -> ())?", + "children": [ + { + "kind": "TypeFunc", + "name": "Function", + "printedName": "() -> ()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + } + ] + } + ], + "hasDefaultArg": true, + "usr": "s:Sq" + } + ], + "declKind": "Func", + "usr": "c:@CM@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)updateSessionWithSessionCount:sessionTime:refreshDeviceMetadata:sendImmediately:onSuccess:onFailure:", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC13updateSession12sessionCount0H4Time21refreshDeviceMetadata15sendImmediately9onSuccess0P7FailureySo8NSNumberCSg_AMS2byycSgANtF", + "moduleName": "OneSignalUser", + "objc_name": "updateSessionWithSessionCount:sessionTime:refreshDeviceMetadata:sendImmediately:onSuccess:onFailure:", + "declAttributes": [ + "Dynamic", + "AccessControl", + "ObjC" + ], + "isFromExtension": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "runBackgroundTasks", + "printedName": "runBackgroundTasks()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + } + ], + "declKind": "Func", + "usr": "c:@CM@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)runBackgroundTasks", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC18runBackgroundTasksyyF", + "moduleName": "OneSignalUser", + "declAttributes": [ + "Dynamic", + "AccessControl", + "ObjC", + "RawDocComment" + ], + "isFromExtension": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "onJwtExpired", + "printedName": "onJwtExpired(expiredHandler:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeFunc", + "name": "Function", + "printedName": "(Swift.String, (Swift.String) -> ()) -> ()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "Tuple", + "printedName": "(Swift.String, (Swift.String) -> ())", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + }, + { + "kind": "TypeFunc", + "name": "Function", + "printedName": "(Swift.String) -> ()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "typeAttributes": [ + "noescape" + ] + } + ] + } + ] + } + ], + "declKind": "Func", + "usr": "c:@CM@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)onJwtExpiredWithExpiredHandler:", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC12onJwtExpired14expiredHandleryySS_ySSXEtc_tF", + "moduleName": "OneSignalUser", + "objc_name": "onJwtExpiredWithExpiredHandler:", + "declAttributes": [ + "Dynamic", + "ObjC", + "AccessControl" + ], + "isFromExtension": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Var", + "name": "User", + "printedName": "User", + "children": [ + { + "kind": "TypeNominal", + "name": "OSUser", + "printedName": "OneSignalUser.OSUser", + "usr": "c:@M@OneSignalUser@objc(pl)OSUser" + } + ], + "declKind": "Var", + "usr": "c:@CM@OneSignalUser@objc(cs)OneSignalUserManagerImpl(py)User", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC0C0AA6OSUser_pvp", + "moduleName": "OneSignalUser", + "objc_name": "User", + "declAttributes": [ + "Dynamic", + "ObjC", + "AccessControl" + ], + "isFromExtension": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "OSUser", + "printedName": "OneSignalUser.OSUser", + "usr": "c:@M@OneSignalUser@objc(pl)OSUser" + } + ], + "declKind": "Accessor", + "usr": "c:@CM@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)User", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC0C0AA6OSUser_pvg", + "moduleName": "OneSignalUser", + "objc_name": "User", + "declAttributes": [ + "Dynamic", + "ObjC" + ], + "isFromExtension": true, + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "pushSubscription", + "printedName": "pushSubscription", + "children": [ + { + "kind": "TypeNominal", + "name": "OSPushSubscription", + "printedName": "OneSignalUser.OSPushSubscription", + "usr": "c:@M@OneSignalUser@objc(pl)OSPushSubscription" + } + ], + "declKind": "Var", + "usr": "c:@CM@OneSignalUser@objc(cs)OneSignalUserManagerImpl(py)pushSubscription", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC16pushSubscriptionAA06OSPushG0_pvp", + "moduleName": "OneSignalUser", + "objc_name": "pushSubscription", + "declAttributes": [ + "Dynamic", + "ObjC", + "AccessControl" + ], + "isFromExtension": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "OSPushSubscription", + "printedName": "OneSignalUser.OSPushSubscription", + "usr": "c:@M@OneSignalUser@objc(pl)OSPushSubscription" + } + ], + "declKind": "Accessor", + "usr": "c:@CM@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)pushSubscription", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC16pushSubscriptionAA06OSPushG0_pvg", + "moduleName": "OneSignalUser", + "objc_name": "pushSubscription", + "declAttributes": [ + "Dynamic", + "ObjC" + ], + "isFromExtension": true, + "accessorKind": "get" + } + ] + }, + { + "kind": "Function", + "name": "addAlias", + "printedName": "addAlias(label:id:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Func", + "usr": "c:@CM@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)addAliasWithLabel:id:", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC8addAlias5label2idySS_SStF", + "moduleName": "OneSignalUser", + "objc_name": "addAliasWithLabel:id:", + "declAttributes": [ + "Dynamic", + "ObjC", + "AccessControl" + ], + "isFromExtension": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "addAliases", + "printedName": "addAliases(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "Dictionary", + "printedName": "[Swift.String : Swift.String]", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:SD" + } + ], + "declKind": "Func", + "usr": "c:@CM@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)addAliases:", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC10addAliasesyySDyS2SGF", + "moduleName": "OneSignalUser", + "objc_name": "addAliases:", + "declAttributes": [ + "Dynamic", + "ObjC", + "AccessControl" + ], + "isFromExtension": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "removeAlias", + "printedName": "removeAlias(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Func", + "usr": "c:@CM@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)removeAlias:", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC11removeAliasyySSF", + "moduleName": "OneSignalUser", + "objc_name": "removeAlias:", + "declAttributes": [ + "Dynamic", + "ObjC", + "AccessControl" + ], + "isFromExtension": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "removeAliases", + "printedName": "removeAliases(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "Array", + "printedName": "[Swift.String]", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:Sa" + } + ], + "declKind": "Func", + "usr": "c:@CM@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)removeAliases:", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC13removeAliasesyySaySSGF", + "moduleName": "OneSignalUser", + "objc_name": "removeAliases:", + "declAttributes": [ + "Dynamic", + "ObjC", + "AccessControl" + ], + "isFromExtension": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "addTag", + "printedName": "addTag(key:value:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Func", + "usr": "c:@CM@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)addTagWithKey:value:", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC6addTag3key5valueySS_SStF", + "moduleName": "OneSignalUser", + "objc_name": "addTagWithKey:value:", + "declAttributes": [ + "Dynamic", + "ObjC", + "AccessControl" + ], + "isFromExtension": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "addTags", + "printedName": "addTags(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "Dictionary", + "printedName": "[Swift.String : Swift.String]", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:SD" + } + ], + "declKind": "Func", + "usr": "c:@CM@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)addTags:", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC7addTagsyySDyS2SGF", + "moduleName": "OneSignalUser", + "objc_name": "addTags:", + "declAttributes": [ + "Dynamic", + "ObjC", + "AccessControl" + ], + "isFromExtension": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "removeTag", + "printedName": "removeTag(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Func", + "usr": "c:@CM@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)removeTag:", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC9removeTagyySSF", + "moduleName": "OneSignalUser", + "objc_name": "removeTag:", + "declAttributes": [ + "Dynamic", + "ObjC", + "AccessControl" + ], + "isFromExtension": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "removeTags", + "printedName": "removeTags(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "Array", + "printedName": "[Swift.String]", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:Sa" + } + ], + "declKind": "Func", + "usr": "c:@CM@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)removeTags:", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC10removeTagsyySaySSGF", + "moduleName": "OneSignalUser", + "objc_name": "removeTags:", + "declAttributes": [ + "Dynamic", + "ObjC", + "AccessControl" + ], + "isFromExtension": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "addEmail", + "printedName": "addEmail(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Func", + "usr": "c:@CM@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)addEmail:", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC8addEmailyySSF", + "moduleName": "OneSignalUser", + "objc_name": "addEmail:", + "declAttributes": [ + "Dynamic", + "ObjC", + "AccessControl" + ], + "isFromExtension": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "removeEmail", + "printedName": "removeEmail(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Func", + "usr": "c:@CM@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)removeEmail:", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC11removeEmailyySSF", + "moduleName": "OneSignalUser", + "objc_name": "removeEmail:", + "declAttributes": [ + "Dynamic", + "ObjC", + "AccessControl", + "RawDocComment" + ], + "isFromExtension": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "addSms", + "printedName": "addSms(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Func", + "usr": "c:@CM@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)addSms:", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC6addSmsyySSF", + "moduleName": "OneSignalUser", + "objc_name": "addSms:", + "declAttributes": [ + "Dynamic", + "ObjC", + "AccessControl" + ], + "isFromExtension": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "removeSms", + "printedName": "removeSms(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Func", + "usr": "c:@CM@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)removeSms:", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC9removeSmsyySSF", + "moduleName": "OneSignalUser", + "objc_name": "removeSms:", + "declAttributes": [ + "Dynamic", + "ObjC", + "AccessControl", + "RawDocComment" + ], + "isFromExtension": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "setLanguage", + "printedName": "setLanguage(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Func", + "usr": "c:@CM@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)setLanguage:", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC11setLanguageyySSF", + "moduleName": "OneSignalUser", + "objc_name": "setLanguage:", + "declAttributes": [ + "Dynamic", + "ObjC", + "AccessControl" + ], + "isFromExtension": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "addObserver", + "printedName": "addObserver(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "OSPushSubscriptionObserver", + "printedName": "OneSignalUser.OSPushSubscriptionObserver", + "usr": "c:@M@OneSignalUser@objc(pl)OSPushSubscriptionObserver" + } + ], + "declKind": "Func", + "usr": "c:@CM@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)addObserver:", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC11addObserveryyAA018OSPushSubscriptionG0_pF", + "moduleName": "OneSignalUser", + "objc_name": "addObserver:", + "declAttributes": [ + "Dynamic", + "ObjC", + "AccessControl" + ], + "isFromExtension": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "removeObserver", + "printedName": "removeObserver(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "OSPushSubscriptionObserver", + "printedName": "OneSignalUser.OSPushSubscriptionObserver", + "usr": "c:@M@OneSignalUser@objc(pl)OSPushSubscriptionObserver" + } + ], + "declKind": "Func", + "usr": "c:@CM@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)removeObserver:", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC14removeObserveryyAA018OSPushSubscriptionG0_pF", + "moduleName": "OneSignalUser", + "objc_name": "removeObserver:", + "declAttributes": [ + "Dynamic", + "ObjC", + "AccessControl" + ], + "isFromExtension": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Var", + "name": "id", + "printedName": "id", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "Swift.String?", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Var", + "usr": "c:@CM@OneSignalUser@objc(cs)OneSignalUserManagerImpl(py)id", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC2idSSSgvp", + "moduleName": "OneSignalUser", + "objc_name": "id", + "declAttributes": [ + "Dynamic", + "ObjC", + "AccessControl" + ], + "isFromExtension": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "Swift.String?", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Accessor", + "usr": "c:@CM@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)id", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC2idSSSgvg", + "moduleName": "OneSignalUser", + "objc_name": "id", + "declAttributes": [ + "Dynamic", + "ObjC" + ], + "isFromExtension": true, + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "token", + "printedName": "token", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "Swift.String?", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Var", + "usr": "c:@CM@OneSignalUser@objc(cs)OneSignalUserManagerImpl(py)token", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC5tokenSSSgvp", + "moduleName": "OneSignalUser", + "objc_name": "token", + "declAttributes": [ + "Dynamic", + "ObjC", + "AccessControl" + ], + "isFromExtension": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "Swift.String?", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Accessor", + "usr": "c:@CM@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)token", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC5tokenSSSgvg", + "moduleName": "OneSignalUser", + "objc_name": "token", + "declAttributes": [ + "Dynamic", + "ObjC" + ], + "isFromExtension": true, + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "optedIn", + "printedName": "optedIn", + "children": [ + { + "kind": "TypeNominal", + "name": "Bool", + "printedName": "Swift.Bool", + "usr": "s:Sb" + } + ], + "declKind": "Var", + "usr": "c:@CM@OneSignalUser@objc(cs)OneSignalUserManagerImpl(py)optedIn", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC7optedInSbvp", + "moduleName": "OneSignalUser", + "objc_name": "optedIn", + "declAttributes": [ + "Dynamic", + "ObjC", + "AccessControl" + ], + "isFromExtension": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "Bool", + "printedName": "Swift.Bool", + "usr": "s:Sb" + } + ], + "declKind": "Accessor", + "usr": "c:@CM@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)optedIn", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC7optedInSbvg", + "moduleName": "OneSignalUser", + "objc_name": "optedIn", + "declAttributes": [ + "Dynamic", + "ObjC" + ], + "isFromExtension": true, + "accessorKind": "get" + } + ] + }, + { + "kind": "Function", + "name": "optIn", + "printedName": "optIn()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + } + ], + "declKind": "Func", + "usr": "c:@CM@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)optIn", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC5optInyyF", + "moduleName": "OneSignalUser", + "objc_name": "optIn", + "declAttributes": [ + "Dynamic", + "ObjC", + "AccessControl", + "RawDocComment" + ], + "isFromExtension": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "optOut", + "printedName": "optOut()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + } + ], + "declKind": "Func", + "usr": "c:@CM@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)optOut", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC6optOutyyF", + "moduleName": "OneSignalUser", + "objc_name": "optOut", + "declAttributes": [ + "Dynamic", + "ObjC", + "AccessControl" + ], + "isFromExtension": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "setNotificationTypes", + "printedName": "setNotificationTypes(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "Int32", + "printedName": "Swift.Int32", + "usr": "s:s5Int32V" + } + ], + "declKind": "Func", + "usr": "c:@CM@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)setNotificationTypes:", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC20setNotificationTypesyys5Int32VF", + "moduleName": "OneSignalUser", + "objc_name": "setNotificationTypes:", + "declAttributes": [ + "Dynamic", + "ObjC", + "AccessControl", + "RawDocComment" + ], + "isFromExtension": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "setPushToken", + "printedName": "setPushToken(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Func", + "usr": "c:@CM@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)setPushToken:", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC12setPushTokenyySSF", + "moduleName": "OneSignalUser", + "objc_name": "setPushToken:", + "declAttributes": [ + "Dynamic", + "ObjC", + "AccessControl" + ], + "isFromExtension": true, + "funcSelfKind": "NonMutating" + } + ], + "declKind": "Class", + "usr": "c:@M@OneSignalUser@objc(cs)OneSignalUserManagerImpl", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC", + "moduleName": "OneSignalUser", + "declAttributes": [ + "AccessControl", + "ObjC" + ], + "superclassUsr": "c:objc(cs)NSObject", + "hasMissingDesignatedInitializers": true, + "inheritsConvenienceInitializers": true, + "superclassNames": [ + "ObjectiveC.NSObject" + ], + "conformances": [ + { + "kind": "Conformance", + "name": "Equatable", + "printedName": "Equatable", + "usr": "s:SQ", + "mangledName": "$sSQ" + }, + { + "kind": "Conformance", + "name": "Hashable", + "printedName": "Hashable", + "usr": "s:SH", + "mangledName": "$sSH" + }, + { + "kind": "Conformance", + "name": "CVarArg", + "printedName": "CVarArg", + "usr": "s:s7CVarArgP", + "mangledName": "$ss7CVarArgP" + }, + { + "kind": "Conformance", + "name": "_KeyValueCodingAndObservingPublishing", + "printedName": "_KeyValueCodingAndObservingPublishing", + "usr": "s:10Foundation37_KeyValueCodingAndObservingPublishingP", + "mangledName": "$s10Foundation37_KeyValueCodingAndObservingPublishingP" + }, + { + "kind": "Conformance", + "name": "_KeyValueCodingAndObserving", + "printedName": "_KeyValueCodingAndObserving", + "usr": "s:10Foundation27_KeyValueCodingAndObservingP", + "mangledName": "$s10Foundation27_KeyValueCodingAndObservingP" + }, + { + "kind": "Conformance", + "name": "CustomStringConvertible", + "printedName": "CustomStringConvertible", + "usr": "s:s23CustomStringConvertibleP", + "mangledName": "$ss23CustomStringConvertibleP" + }, + { + "kind": "Conformance", + "name": "CustomDebugStringConvertible", + "printedName": "CustomDebugStringConvertible", + "usr": "s:s28CustomDebugStringConvertibleP", + "mangledName": "$ss28CustomDebugStringConvertibleP" + }, + { + "kind": "Conformance", + "name": "OSUser", + "printedName": "OSUser", + "usr": "c:@M@OneSignalUser@objc(pl)OSUser", + "mangledName": "$s13OneSignalUser6OSUserP" + }, + { + "kind": "Conformance", + "name": "OSPushSubscription", + "printedName": "OSPushSubscription", + "usr": "c:@M@OneSignalUser@objc(pl)OSPushSubscription", + "mangledName": "$s13OneSignalUser18OSPushSubscriptionP" + } + ] + }, + { + "kind": "Import", + "name": "Foundation", + "printedName": "Foundation", + "declKind": "Import", + "moduleName": "OneSignalUser", + "declAttributes": [ + "RawDocComment" + ] + }, + { + "kind": "Import", + "name": "OneSignalOSCore", + "printedName": "OneSignalOSCore", + "declKind": "Import", + "moduleName": "OneSignalUser" + }, + { + "kind": "Import", + "name": "OneSignalCore", + "printedName": "OneSignalCore", + "declKind": "Import", + "moduleName": "OneSignalUser" + }, + { + "kind": "Import", + "name": "OneSignalOSCore", + "printedName": "OneSignalOSCore", + "declKind": "Import", + "moduleName": "OneSignalUser", + "declAttributes": [ + "RawDocComment" + ] + }, + { + "kind": "Import", + "name": "OneSignalCore", + "printedName": "OneSignalCore", + "declKind": "Import", + "moduleName": "OneSignalUser" + }, + { + "kind": "Import", + "name": "Foundation", + "printedName": "Foundation", + "declKind": "Import", + "moduleName": "OneSignalUser", + "declAttributes": [ + "RawDocComment" + ] + }, + { + "kind": "Import", + "name": "OneSignalCore", + "printedName": "OneSignalCore", + "declKind": "Import", + "moduleName": "OneSignalUser" + }, + { + "kind": "Import", + "name": "OneSignalOSCore", + "printedName": "OneSignalOSCore", + "declKind": "Import", + "moduleName": "OneSignalUser" + }, + { + "kind": "Import", + "name": "OneSignalCore", + "printedName": "OneSignalCore", + "declKind": "Import", + "moduleName": "OneSignalUser", + "declAttributes": [ + "RawDocComment" + ] + }, + { + "kind": "Import", + "name": "OneSignalOSCore", + "printedName": "OneSignalOSCore", + "declKind": "Import", + "moduleName": "OneSignalUser" + }, + { + "kind": "Import", + "name": "OneSignalOSCore", + "printedName": "OneSignalOSCore", + "declKind": "Import", + "moduleName": "OneSignalUser", + "declAttributes": [ + "RawDocComment" + ] + }, + { + "kind": "Import", + "name": "OneSignalCore", + "printedName": "OneSignalCore", + "declKind": "Import", + "moduleName": "OneSignalUser" + }, + { + "kind": "Import", + "name": "Foundation", + "printedName": "Foundation", + "declKind": "Import", + "moduleName": "OneSignalUser", + "declAttributes": [ + "RawDocComment" + ] + }, + { + "kind": "Import", + "name": "OneSignalCore", + "printedName": "OneSignalCore", + "declKind": "Import", + "moduleName": "OneSignalUser" + }, + { + "kind": "Import", + "name": "OneSignalOSCore", + "printedName": "OneSignalOSCore", + "declKind": "Import", + "moduleName": "OneSignalUser" + }, + { + "kind": "Import", + "name": "OneSignalNotifications", + "printedName": "OneSignalNotifications", + "declKind": "Import", + "moduleName": "OneSignalUser" + }, + { + "kind": "TypeDecl", + "name": "OSPushSubscriptionObserver", + "printedName": "OSPushSubscriptionObserver", + "children": [ + { + "kind": "Function", + "name": "onPushSubscriptionDidChange", + "printedName": "onPushSubscriptionDidChange(state:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "OSPushSubscriptionChangedState", + "printedName": "OneSignalUser.OSPushSubscriptionChangedState", + "usr": "c:@M@OneSignalUser@objc(cs)OSPushSubscriptionChangedState" + } + ], + "declKind": "Func", + "usr": "c:@M@OneSignalUser@objc(pl)OSPushSubscriptionObserver(im)onPushSubscriptionDidChangeWithState:", + "mangledName": "$s13OneSignalUser26OSPushSubscriptionObserverP06onPushE9DidChange5stateyAA0dE12ChangedStateC_tF", + "moduleName": "OneSignalUser", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalUser.OSPushSubscriptionObserver>", + "sugared_genericSig": "", + "protocolReq": true, + "objc_name": "onPushSubscriptionDidChangeWithState:", + "declAttributes": [ + "ObjC", + "RawDocComment" + ], + "reqNewWitnessTableEntry": true, + "funcSelfKind": "NonMutating" + } + ], + "declKind": "Protocol", + "usr": "c:@M@OneSignalUser@objc(pl)OSPushSubscriptionObserver", + "mangledName": "$s13OneSignalUser26OSPushSubscriptionObserverP", + "moduleName": "OneSignalUser", + "genericSig": "<τ_0_0 : AnyObject>", + "sugared_genericSig": "", + "declAttributes": [ + "AccessControl", + "ObjC", + "RawDocComment" + ] + }, + { + "kind": "TypeDecl", + "name": "OSPushSubscriptionState", + "printedName": "OSPushSubscriptionState", + "children": [ + { + "kind": "Var", + "name": "id", + "printedName": "id", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "Swift.String?", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Var", + "usr": "c:@M@OneSignalUser@objc(cs)OSPushSubscriptionState(py)id", + "mangledName": "$s13OneSignalUser23OSPushSubscriptionStateC2idSSSgvp", + "moduleName": "OneSignalUser", + "declAttributes": [ + "Final", + "HasStorage", + "AccessControl", + "ObjC" + ], + "isLet": true, + "hasStorage": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "Swift.String?", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Accessor", + "usr": "c:@M@OneSignalUser@objc(cs)OSPushSubscriptionState(im)id", + "mangledName": "$s13OneSignalUser23OSPushSubscriptionStateC2idSSSgvg", + "moduleName": "OneSignalUser", + "implicit": true, + "declAttributes": [ + "Final", + "ObjC" + ], + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "token", + "printedName": "token", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "Swift.String?", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Var", + "usr": "c:@M@OneSignalUser@objc(cs)OSPushSubscriptionState(py)token", + "mangledName": "$s13OneSignalUser23OSPushSubscriptionStateC5tokenSSSgvp", + "moduleName": "OneSignalUser", + "declAttributes": [ + "Final", + "HasStorage", + "AccessControl", + "ObjC" + ], + "isLet": true, + "hasStorage": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "Swift.String?", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Accessor", + "usr": "c:@M@OneSignalUser@objc(cs)OSPushSubscriptionState(im)token", + "mangledName": "$s13OneSignalUser23OSPushSubscriptionStateC5tokenSSSgvg", + "moduleName": "OneSignalUser", + "implicit": true, + "declAttributes": [ + "Final", + "ObjC" + ], + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "optedIn", + "printedName": "optedIn", + "children": [ + { + "kind": "TypeNominal", + "name": "Bool", + "printedName": "Swift.Bool", + "usr": "s:Sb" + } + ], + "declKind": "Var", + "usr": "c:@M@OneSignalUser@objc(cs)OSPushSubscriptionState(py)optedIn", + "mangledName": "$s13OneSignalUser23OSPushSubscriptionStateC7optedInSbvp", + "moduleName": "OneSignalUser", + "declAttributes": [ + "Final", + "HasStorage", + "AccessControl", + "ObjC" + ], + "isLet": true, + "hasStorage": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "Bool", + "printedName": "Swift.Bool", + "usr": "s:Sb" + } + ], + "declKind": "Accessor", + "usr": "c:@M@OneSignalUser@objc(cs)OSPushSubscriptionState(im)optedIn", + "mangledName": "$s13OneSignalUser23OSPushSubscriptionStateC7optedInSbvg", + "moduleName": "OneSignalUser", + "implicit": true, + "declAttributes": [ + "Final", + "ObjC" + ], + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "description", + "printedName": "description", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Var", + "usr": "c:@M@OneSignalUser@objc(cs)OSPushSubscriptionState(py)description", + "mangledName": "$s13OneSignalUser23OSPushSubscriptionStateC11descriptionSSvp", + "moduleName": "OneSignalUser", + "overriding": true, + "objc_name": "description", + "declAttributes": [ + "Dynamic", + "ObjC", + "Override", + "AccessControl" + ], + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Accessor", + "usr": "c:@M@OneSignalUser@objc(cs)OSPushSubscriptionState(im)description", + "mangledName": "$s13OneSignalUser23OSPushSubscriptionStateC11descriptionSSvg", + "moduleName": "OneSignalUser", + "overriding": true, + "objc_name": "description", + "declAttributes": [ + "Dynamic", + "ObjC" + ], + "accessorKind": "get" + } + ] + }, + { + "kind": "Function", + "name": "jsonRepresentation", + "printedName": "jsonRepresentation()", + "children": [ + { + "kind": "TypeNominal", + "name": "NSDictionary", + "printedName": "Foundation.NSDictionary", + "usr": "c:objc(cs)NSDictionary" + } + ], + "declKind": "Func", + "usr": "c:@M@OneSignalUser@objc(cs)OSPushSubscriptionState(im)jsonRepresentation", + "mangledName": "$s13OneSignalUser23OSPushSubscriptionStateC18jsonRepresentationSo12NSDictionaryCyF", + "moduleName": "OneSignalUser", + "declAttributes": [ + "AccessControl", + "ObjC" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Constructor", + "name": "init", + "printedName": "init()", + "children": [ + { + "kind": "TypeNominal", + "name": "OSPushSubscriptionState", + "printedName": "OneSignalUser.OSPushSubscriptionState", + "usr": "c:@M@OneSignalUser@objc(cs)OSPushSubscriptionState" + } + ], + "declKind": "Constructor", + "usr": "c:@M@OneSignalUser@objc(cs)OSPushSubscriptionState(im)init", + "mangledName": "$s13OneSignalUser23OSPushSubscriptionStateCACycfc", + "moduleName": "OneSignalUser", + "overriding": true, + "implicit": true, + "objc_name": "init", + "declAttributes": [ + "Dynamic", + "ObjC", + "Override" + ], + "init_kind": "Designated" + } + ], + "declKind": "Class", + "usr": "c:@M@OneSignalUser@objc(cs)OSPushSubscriptionState", + "mangledName": "$s13OneSignalUser23OSPushSubscriptionStateC", + "moduleName": "OneSignalUser", + "declAttributes": [ + "AccessControl", + "ObjC" + ], + "superclassUsr": "c:objc(cs)NSObject", + "hasMissingDesignatedInitializers": true, + "superclassNames": [ + "ObjectiveC.NSObject" + ], + "conformances": [ + { + "kind": "Conformance", + "name": "Equatable", + "printedName": "Equatable", + "usr": "s:SQ", + "mangledName": "$sSQ" + }, + { + "kind": "Conformance", + "name": "Hashable", + "printedName": "Hashable", + "usr": "s:SH", + "mangledName": "$sSH" + }, + { + "kind": "Conformance", + "name": "CVarArg", + "printedName": "CVarArg", + "usr": "s:s7CVarArgP", + "mangledName": "$ss7CVarArgP" + }, + { + "kind": "Conformance", + "name": "_KeyValueCodingAndObservingPublishing", + "printedName": "_KeyValueCodingAndObservingPublishing", + "usr": "s:10Foundation37_KeyValueCodingAndObservingPublishingP", + "mangledName": "$s10Foundation37_KeyValueCodingAndObservingPublishingP" + }, + { + "kind": "Conformance", + "name": "_KeyValueCodingAndObserving", + "printedName": "_KeyValueCodingAndObserving", + "usr": "s:10Foundation27_KeyValueCodingAndObservingP", + "mangledName": "$s10Foundation27_KeyValueCodingAndObservingP" + }, + { + "kind": "Conformance", + "name": "CustomStringConvertible", + "printedName": "CustomStringConvertible", + "usr": "s:s23CustomStringConvertibleP", + "mangledName": "$ss23CustomStringConvertibleP" + }, + { + "kind": "Conformance", + "name": "CustomDebugStringConvertible", + "printedName": "CustomDebugStringConvertible", + "usr": "s:s28CustomDebugStringConvertibleP", + "mangledName": "$ss28CustomDebugStringConvertibleP" + } + ] + }, + { + "kind": "TypeDecl", + "name": "OSPushSubscriptionChangedState", + "printedName": "OSPushSubscriptionChangedState", + "children": [ + { + "kind": "Var", + "name": "current", + "printedName": "current", + "children": [ + { + "kind": "TypeNominal", + "name": "OSPushSubscriptionState", + "printedName": "OneSignalUser.OSPushSubscriptionState", + "usr": "c:@M@OneSignalUser@objc(cs)OSPushSubscriptionState" + } + ], + "declKind": "Var", + "usr": "c:@M@OneSignalUser@objc(cs)OSPushSubscriptionChangedState(py)current", + "mangledName": "$s13OneSignalUser30OSPushSubscriptionChangedStateC7currentAA0deG0Cvp", + "moduleName": "OneSignalUser", + "declAttributes": [ + "Final", + "HasStorage", + "AccessControl", + "ObjC" + ], + "isLet": true, + "hasStorage": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "OSPushSubscriptionState", + "printedName": "OneSignalUser.OSPushSubscriptionState", + "usr": "c:@M@OneSignalUser@objc(cs)OSPushSubscriptionState" + } + ], + "declKind": "Accessor", + "usr": "c:@M@OneSignalUser@objc(cs)OSPushSubscriptionChangedState(im)current", + "mangledName": "$s13OneSignalUser30OSPushSubscriptionChangedStateC7currentAA0deG0Cvg", + "moduleName": "OneSignalUser", + "implicit": true, + "declAttributes": [ + "Final", + "ObjC" + ], + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "previous", + "printedName": "previous", + "children": [ + { + "kind": "TypeNominal", + "name": "OSPushSubscriptionState", + "printedName": "OneSignalUser.OSPushSubscriptionState", + "usr": "c:@M@OneSignalUser@objc(cs)OSPushSubscriptionState" + } + ], + "declKind": "Var", + "usr": "c:@M@OneSignalUser@objc(cs)OSPushSubscriptionChangedState(py)previous", + "mangledName": "$s13OneSignalUser30OSPushSubscriptionChangedStateC8previousAA0deG0Cvp", + "moduleName": "OneSignalUser", + "declAttributes": [ + "Final", + "HasStorage", + "AccessControl", + "ObjC" + ], + "isLet": true, + "hasStorage": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "OSPushSubscriptionState", + "printedName": "OneSignalUser.OSPushSubscriptionState", + "usr": "c:@M@OneSignalUser@objc(cs)OSPushSubscriptionState" + } + ], + "declKind": "Accessor", + "usr": "c:@M@OneSignalUser@objc(cs)OSPushSubscriptionChangedState(im)previous", + "mangledName": "$s13OneSignalUser30OSPushSubscriptionChangedStateC8previousAA0deG0Cvg", + "moduleName": "OneSignalUser", + "implicit": true, + "declAttributes": [ + "Final", + "ObjC" + ], + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "description", + "printedName": "description", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Var", + "usr": "c:@M@OneSignalUser@objc(cs)OSPushSubscriptionChangedState(py)description", + "mangledName": "$s13OneSignalUser30OSPushSubscriptionChangedStateC11descriptionSSvp", + "moduleName": "OneSignalUser", + "overriding": true, + "objc_name": "description", + "declAttributes": [ + "Dynamic", + "ObjC", + "Override", + "AccessControl" + ], + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Accessor", + "usr": "c:@M@OneSignalUser@objc(cs)OSPushSubscriptionChangedState(im)description", + "mangledName": "$s13OneSignalUser30OSPushSubscriptionChangedStateC11descriptionSSvg", + "moduleName": "OneSignalUser", + "overriding": true, + "objc_name": "description", + "declAttributes": [ + "Dynamic", + "ObjC" + ], + "accessorKind": "get" + } + ] + }, + { + "kind": "Function", + "name": "jsonRepresentation", + "printedName": "jsonRepresentation()", + "children": [ + { + "kind": "TypeNominal", + "name": "NSDictionary", + "printedName": "Foundation.NSDictionary", + "usr": "c:objc(cs)NSDictionary" + } + ], + "declKind": "Func", + "usr": "c:@M@OneSignalUser@objc(cs)OSPushSubscriptionChangedState(im)jsonRepresentation", + "mangledName": "$s13OneSignalUser30OSPushSubscriptionChangedStateC18jsonRepresentationSo12NSDictionaryCyF", + "moduleName": "OneSignalUser", + "declAttributes": [ + "AccessControl", + "ObjC" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Constructor", + "name": "init", + "printedName": "init()", + "children": [ + { + "kind": "TypeNominal", + "name": "OSPushSubscriptionChangedState", + "printedName": "OneSignalUser.OSPushSubscriptionChangedState", + "usr": "c:@M@OneSignalUser@objc(cs)OSPushSubscriptionChangedState" + } + ], + "declKind": "Constructor", + "usr": "c:@M@OneSignalUser@objc(cs)OSPushSubscriptionChangedState(im)init", + "mangledName": "$s13OneSignalUser30OSPushSubscriptionChangedStateCACycfc", + "moduleName": "OneSignalUser", + "overriding": true, + "implicit": true, + "objc_name": "init", + "declAttributes": [ + "Dynamic", + "ObjC", + "Override" + ], + "init_kind": "Designated" + } + ], + "declKind": "Class", + "usr": "c:@M@OneSignalUser@objc(cs)OSPushSubscriptionChangedState", + "mangledName": "$s13OneSignalUser30OSPushSubscriptionChangedStateC", + "moduleName": "OneSignalUser", + "declAttributes": [ + "AccessControl", + "ObjC" + ], + "superclassUsr": "c:objc(cs)NSObject", + "hasMissingDesignatedInitializers": true, + "superclassNames": [ + "ObjectiveC.NSObject" + ], + "conformances": [ + { + "kind": "Conformance", + "name": "Equatable", + "printedName": "Equatable", + "usr": "s:SQ", + "mangledName": "$sSQ" + }, + { + "kind": "Conformance", + "name": "Hashable", + "printedName": "Hashable", + "usr": "s:SH", + "mangledName": "$sSH" + }, + { + "kind": "Conformance", + "name": "CVarArg", + "printedName": "CVarArg", + "usr": "s:s7CVarArgP", + "mangledName": "$ss7CVarArgP" + }, + { + "kind": "Conformance", + "name": "_KeyValueCodingAndObservingPublishing", + "printedName": "_KeyValueCodingAndObservingPublishing", + "usr": "s:10Foundation37_KeyValueCodingAndObservingPublishingP", + "mangledName": "$s10Foundation37_KeyValueCodingAndObservingPublishingP" + }, + { + "kind": "Conformance", + "name": "_KeyValueCodingAndObserving", + "printedName": "_KeyValueCodingAndObserving", + "usr": "s:10Foundation27_KeyValueCodingAndObservingP", + "mangledName": "$s10Foundation27_KeyValueCodingAndObservingP" + }, + { + "kind": "Conformance", + "name": "CustomStringConvertible", + "printedName": "CustomStringConvertible", + "usr": "s:s23CustomStringConvertibleP", + "mangledName": "$ss23CustomStringConvertibleP" + }, + { + "kind": "Conformance", + "name": "CustomDebugStringConvertible", + "printedName": "CustomDebugStringConvertible", + "usr": "s:s28CustomDebugStringConvertibleP", + "mangledName": "$ss28CustomDebugStringConvertibleP" + } + ] + }, + { + "kind": "Import", + "name": "Foundation", + "printedName": "Foundation", + "declKind": "Import", + "moduleName": "OneSignalUser", + "declAttributes": [ + "RawDocComment" + ] + }, + { + "kind": "Import", + "name": "OneSignalCore", + "printedName": "OneSignalCore", + "declKind": "Import", + "moduleName": "OneSignalUser" + }, + { + "kind": "Import", + "name": "OneSignalOSCore", + "printedName": "OneSignalOSCore", + "declKind": "Import", + "moduleName": "OneSignalUser" + }, + { + "kind": "Import", + "name": "OneSignalOSCore", + "printedName": "OneSignalOSCore", + "declKind": "Import", + "moduleName": "OneSignalUser", + "declAttributes": [ + "RawDocComment" + ] + }, + { + "kind": "Import", + "name": "OneSignalCore", + "printedName": "OneSignalCore", + "declKind": "Import", + "moduleName": "OneSignalUser" + }, + { + "kind": "Import", + "name": "Foundation", + "printedName": "Foundation", + "declKind": "Import", + "moduleName": "OneSignalUser", + "declAttributes": [ + "RawDocComment" + ] + }, + { + "kind": "Import", + "name": "OneSignalCore", + "printedName": "OneSignalCore", + "declKind": "Import", + "moduleName": "OneSignalUser" + }, + { + "kind": "Import", + "name": "OneSignalOSCore", + "printedName": "OneSignalOSCore", + "declKind": "Import", + "moduleName": "OneSignalUser" + }, + { + "kind": "Import", + "name": "OneSignalCore", + "printedName": "OneSignalCore", + "declKind": "Import", + "moduleName": "OneSignalUser", + "declAttributes": [ + "RawDocComment" + ] + }, + { + "kind": "Import", + "name": "OneSignalNotifications", + "printedName": "OneSignalNotifications", + "declKind": "Import", + "moduleName": "OneSignalUser" + }, + { + "kind": "Import", + "name": "OneSignalOSCore", + "printedName": "OneSignalOSCore", + "declKind": "Import", + "moduleName": "OneSignalUser" + } + ], + "json_format_version": 8 + }, + "ConstValues": [ + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OneSignalUserManagerImpl.swift", + "kind": "BooleanLiteral", + "offset": 4048, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OneSignalUserManagerImpl.swift", + "kind": "BooleanLiteral", + "offset": 5070, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OneSignalUserManagerImpl.swift", + "kind": "BooleanLiteral", + "offset": 5089, + "length": 4, + "value": "true" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OneSignalUserManagerImpl.swift", + "kind": "BooleanLiteral", + "offset": 5172, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OneSignalUserManagerImpl.swift", + "kind": "BooleanLiteral", + "offset": 24536, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSPropertiesModel.swift", + "kind": "StringLiteral", + "offset": 1847, + "length": 15, + "value": "\"OneSignalUser.OSLocationPoint\"" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSPropertiesModel.swift", + "kind": "StringLiteral", + "offset": 2423, + "length": 10, + "value": "\"language\"" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSPropertiesModel.swift", + "kind": "StringLiteral", + "offset": 2557, + "length": 10, + "value": "\"location\"" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSPropertiesModel.swift", + "kind": "Dictionary", + "offset": 2697, + "length": 3, + "value": "[]" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSIdentityOperationExecutor.swift", + "kind": "Array", + "offset": 1438, + "length": 2, + "value": "[]" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSIdentityOperationExecutor.swift", + "kind": "Array", + "offset": 1570, + "length": 2, + "value": "[]" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSIdentityOperationExecutor.swift", + "kind": "Array", + "offset": 1626, + "length": 2, + "value": "[]" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSUserInternalImpl.swift", + "kind": "StringLiteral", + "offset": 2006, + "length": 18, + "value": "\"OneSignalUser.OSUserInternalImpl\"" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSPropertyOperationExecutor.swift", + "kind": "Array", + "offset": 1423, + "length": 2, + "value": "[]" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSPropertyOperationExecutor.swift", + "kind": "Array", + "offset": 1484, + "length": 2, + "value": "[]" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSPropertyOperationExecutor.swift", + "kind": "BooleanLiteral", + "offset": 9816, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSSubscriptionModel.swift", + "kind": "StringLiteral", + "offset": 1536, + "length": 23, + "value": "\"OneSignalUser.OSPushSubscriptionState\"" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSSubscriptionModel.swift", + "kind": "StringLiteral", + "offset": 2423, + "length": 30, + "value": "\"OneSignalUser.OSPushSubscriptionChangedState\"" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSSubscriptionModel.swift", + "kind": "StringLiteral", + "offset": 3147, + "length": 9, + "value": "\"iOSPush\"" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSSubscriptionModel.swift", + "kind": "StringLiteral", + "offset": 3174, + "length": 7, + "value": "\"Email\"" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSSubscriptionModel.swift", + "kind": "StringLiteral", + "offset": 3197, + "length": 5, + "value": "\"SMS\"" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSSubscriptionModel.swift", + "kind": "StringLiteral", + "offset": 3147, + "length": 9, + "value": "\"iOSPush\"" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSSubscriptionModel.swift", + "kind": "StringLiteral", + "offset": 3174, + "length": 7, + "value": "\"Email\"" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSSubscriptionModel.swift", + "kind": "StringLiteral", + "offset": 3197, + "length": 5, + "value": "\"SMS\"" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSSubscriptionModel.swift", + "kind": "StringLiteral", + "offset": 3526, + "length": 9, + "value": "\"address\"" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSSubscriptionModel.swift", + "kind": "StringLiteral", + "offset": 3957, + "length": 16, + "value": "\"subscriptionId\"" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSSubscriptionModel.swift", + "kind": "IntegerLiteral", + "offset": 5277, + "length": 2, + "value": "2" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSSubscriptionModel.swift", + "kind": "IntegerLiteral", + "offset": 5318, + "length": 2, + "value": "2" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSSubscriptionModel.swift", + "kind": "IntegerLiteral", + "offset": 5403, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSSubscriptionModel.swift", + "kind": "StringLiteral", + "offset": 5436, + "length": 19, + "value": "\"notificationTypes\"" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSSubscriptionModel.swift", + "kind": "IntegerLiteral", + "offset": 5003, + "length": 2, + "value": "1" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSSubscriptionModel.swift", + "kind": "IntegerLiteral", + "offset": 6433, + "length": 2, + "value": "2" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSSubscriptionModel.swift", + "kind": "StringLiteral", + "offset": 6649, + "length": 10, + "value": "\"testType\"" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSSubscriptionModel.swift", + "kind": "StringLiteral", + "offset": 6885, + "length": 10, + "value": "\"deviceOs\"" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSSubscriptionModel.swift", + "kind": "StringLiteral", + "offset": 7098, + "length": 5, + "value": "\"sdk\"" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSSubscriptionModel.swift", + "kind": "StringLiteral", + "offset": 7341, + "length": 13, + "value": "\"deviceModel\"" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSSubscriptionModel.swift", + "kind": "StringLiteral", + "offset": 7634, + "length": 12, + "value": "\"appVersion\"" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSSubscriptionModel.swift", + "kind": "StringLiteral", + "offset": 7458, + "length": 28, + "value": "\"CFBundleShortVersionString\"" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSSubscriptionModel.swift", + "kind": "StringLiteral", + "offset": 7886, + "length": 9, + "value": "\"netType\"" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSSubscriptionModel.swift", + "kind": "StringLiteral", + "offset": 3250, + "length": 19, + "value": "\"OneSignalUser.OSSubscriptionModel\"" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSIdentityModel.swift", + "kind": "Dictionary", + "offset": 1510, + "length": 3, + "value": "[]" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSIdentityModel.swift", + "kind": "StringLiteral", + "offset": 1293, + "length": 15, + "value": "\"OneSignalUser.OSIdentityModel\"" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSSubscriptionOperationExecutor.swift", + "kind": "Array", + "offset": 1486, + "length": 2, + "value": "[]" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSSubscriptionOperationExecutor.swift", + "kind": "Array", + "offset": 1626, + "length": 2, + "value": "[]" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSSubscriptionOperationExecutor.swift", + "kind": "Array", + "offset": 1689, + "length": 2, + "value": "[]" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSSubscriptionOperationExecutor.swift", + "kind": "Array", + "offset": 1752, + "length": 2, + "value": "[]" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSSubscriptionOperationExecutor.swift", + "kind": "Dictionary", + "offset": 1815, + "length": 3, + "value": "[]" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSUserRequests.swift", + "kind": "Array", + "offset": 1619, + "length": 2, + "value": "[]" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSUserRequests.swift", + "kind": "Array", + "offset": 1705, + "length": 2, + "value": "[]" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSUserRequests.swift", + "kind": "Dictionary", + "offset": 1767, + "length": 3, + "value": "[]" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSUserRequests.swift", + "kind": "BooleanLiteral", + "offset": 27422, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSUserRequests.swift", + "kind": "BooleanLiteral", + "offset": 31693, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSUserRequests.swift", + "kind": "StringLiteral", + "offset": 31615, + "length": 19, + "value": "\"OneSignalUser.OSRequestCreateUser\"" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSUserRequests.swift", + "kind": "BooleanLiteral", + "offset": 35419, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSUserRequests.swift", + "kind": "StringLiteral", + "offset": 35324, + "length": 36, + "value": "\"OneSignalUser.OSRequestFetchIdentityBySubscription\"" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSUserRequests.swift", + "kind": "BooleanLiteral", + "offset": 38704, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSUserRequests.swift", + "kind": "StringLiteral", + "offset": 38624, + "length": 21, + "value": "\"OneSignalUser.OSRequestIdentifyUser\"" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSUserRequests.swift", + "kind": "BooleanLiteral", + "offset": 42618, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSUserRequests.swift", + "kind": "StringLiteral", + "offset": 42541, + "length": 18, + "value": "\"OneSignalUser.OSRequestFetchUser\"" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSUserRequests.swift", + "kind": "BooleanLiteral", + "offset": 45201, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSUserRequests.swift", + "kind": "StringLiteral", + "offset": 45123, + "length": 19, + "value": "\"OneSignalUser.OSRequestAddAliases\"" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSUserRequests.swift", + "kind": "BooleanLiteral", + "offset": 47646, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSUserRequests.swift", + "kind": "StringLiteral", + "offset": 47567, + "length": 20, + "value": "\"OneSignalUser.OSRequestRemoveAlias\"" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSUserRequests.swift", + "kind": "BooleanLiteral", + "offset": 49858, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSUserRequests.swift", + "kind": "StringLiteral", + "offset": 49774, + "length": 25, + "value": "\"OneSignalUser.OSRequestUpdateProperties\"" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSUserRequests.swift", + "kind": "BooleanLiteral", + "offset": 54435, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSUserRequests.swift", + "kind": "StringLiteral", + "offset": 54349, + "length": 27, + "value": "\"OneSignalUser.OSRequestCreateSubscription\"" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSUserRequests.swift", + "kind": "BooleanLiteral", + "offset": 57362, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSUserRequests.swift", + "kind": "StringLiteral", + "offset": 57274, + "length": 29, + "value": "\"OneSignalUser.OSRequestTransferSubscription\"" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSUserRequests.swift", + "kind": "BooleanLiteral", + "offset": 60213, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSUserRequests.swift", + "kind": "StringLiteral", + "offset": 60127, + "length": 27, + "value": "\"OneSignalUser.OSRequestUpdateSubscription\"" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSUserRequests.swift", + "kind": "BooleanLiteral", + "offset": 63838, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSUserRequests.swift", + "kind": "StringLiteral", + "offset": 63752, + "length": 27, + "value": "\"OneSignalUser.OSRequestDeleteSubscription\"" + } + ] +} \ No newline at end of file diff --git a/iOS_SDK/OneSignalSDK/OneSignal_User/OneSignalUser.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalUser.framework/Versions/A/Modules/OneSignalUser.swiftmodule/arm64-apple-ios-macabi.private.swiftinterface b/iOS_SDK/OneSignalSDK/OneSignal_User/OneSignalUser.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalUser.framework/Versions/A/Modules/OneSignalUser.swiftmodule/arm64-apple-ios-macabi.private.swiftinterface new file mode 100644 index 000000000..d0cfb9d2e --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignal_User/OneSignalUser.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalUser.framework/Versions/A/Modules/OneSignalUser.swiftmodule/arm64-apple-ios-macabi.private.swiftinterface @@ -0,0 +1,130 @@ +// swift-interface-format-version: 1.0 +// swift-compiler-version: Apple Swift version 5.7.1 (swiftlang-5.7.1.135.3 clang-1400.0.29.51) +// swift-module-flags: -target arm64-apple-ios13.1-macabi -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -O -module-name OneSignalUser +// swift-module-flags-ignorable: -enable-bare-slash-regex +import Foundation +import OneSignalCore +import OneSignalNotifications +import OneSignalOSCore +@_exported import OneSignalUser +import Swift +import _Concurrency +import _StringProcessing +@objc public protocol OSUser { + @objc var pushSubscription: OneSignalUser.OSPushSubscription { get } + @objc func addAlias(label: Swift.String, id: Swift.String) + @objc func addAliases(_ aliases: [Swift.String : Swift.String]) + @objc func removeAlias(_ label: Swift.String) + @objc func removeAliases(_ labels: [Swift.String]) + @objc func addTag(key: Swift.String, value: Swift.String) + @objc func addTags(_ tags: [Swift.String : Swift.String]) + @objc func removeTag(_ tag: Swift.String) + @objc func removeTags(_ tags: [Swift.String]) + @objc func addEmail(_ email: Swift.String) + @objc func removeEmail(_ email: Swift.String) + @objc func addSms(_ number: Swift.String) + @objc func removeSms(_ number: Swift.String) + @objc func setLanguage(_ language: Swift.String) + typealias OSJwtCompletionBlock = (_ newJwtToken: Swift.String) -> Swift.Void + typealias OSJwtExpiredHandler = (_ externalId: Swift.String, _ completion: (_ newJwtToken: Swift.String) -> Swift.Void) -> Swift.Void + @objc func onJwtExpired(expiredHandler: @escaping Self.OSJwtExpiredHandler) +} +@objc public protocol OSPushSubscription { + @objc var id: Swift.String? { get } + @objc var token: Swift.String? { get } + @objc var optedIn: Swift.Bool { get } + @objc func optIn() + @objc func optOut() + @objc func addObserver(_ observer: OneSignalUser.OSPushSubscriptionObserver) + @objc func removeObserver(_ observer: OneSignalUser.OSPushSubscriptionObserver) +} +@_inheritsConvenienceInitializers @_hasMissingDesignatedInitializers @objc public class OneSignalUserManagerImpl : ObjectiveC.NSObject { + @objc public static let sharedInstance: OneSignalUser.OneSignalUserManagerImpl + @objc public var onesignalId: Swift.String? { + @objc get + } + @objc public var pushSubscriptionId: Swift.String? { + @objc get + } + @objc public var language: Swift.String? { + @objc get + } + @objc public var requiresUserAuth: Swift.Bool + @objc public func start() + @objc public func login(externalId: Swift.String, token: Swift.String?) + @objc public func logout() + public func _logout() + @objc public func clearAllModelsFromStores() + @objc public func getTags() -> [Swift.String : Swift.String]? + @objc public func setLocation(latitude: Swift.Float, longitude: Swift.Float) + @objc public func sendPurchases(_ purchases: [[Swift.String : Swift.AnyObject]]) + @objc deinit +} +extension OneSignalUser.OneSignalUserManagerImpl { + @objc dynamic public func startNewSession() + @objc dynamic public func updateSession(sessionCount: Foundation.NSNumber?, sessionTime: Foundation.NSNumber?, refreshDeviceMetadata: Swift.Bool, sendImmediately: Swift.Bool = false, onSuccess: (() -> Swift.Void)? = nil, onFailure: (() -> Swift.Void)? = nil) + @objc dynamic public func runBackgroundTasks() +} +extension OneSignalUser.OneSignalUserManagerImpl : OneSignalUser.OSUser { + @objc dynamic public func onJwtExpired(expiredHandler: @escaping OneSignalUser.OneSignalUserManagerImpl.OSJwtExpiredHandler) + @objc dynamic public var User: OneSignalUser.OSUser { + @objc get + } + @objc dynamic public var pushSubscription: OneSignalUser.OSPushSubscription { + @objc get + } + @objc dynamic public func addAlias(label: Swift.String, id: Swift.String) + @objc dynamic public func addAliases(_ aliases: [Swift.String : Swift.String]) + @objc dynamic public func removeAlias(_ label: Swift.String) + @objc dynamic public func removeAliases(_ labels: [Swift.String]) + @objc dynamic public func addTag(key: Swift.String, value: Swift.String) + @objc dynamic public func addTags(_ tags: [Swift.String : Swift.String]) + @objc dynamic public func removeTag(_ tag: Swift.String) + @objc dynamic public func removeTags(_ tags: [Swift.String]) + @objc dynamic public func addEmail(_ email: Swift.String) + @objc dynamic public func removeEmail(_ email: Swift.String) + @objc dynamic public func addSms(_ number: Swift.String) + @objc dynamic public func removeSms(_ number: Swift.String) + @objc dynamic public func setLanguage(_ language: Swift.String) +} +extension OneSignalUser.OneSignalUserManagerImpl : OneSignalUser.OSPushSubscription { + @objc dynamic public func addObserver(_ observer: OneSignalUser.OSPushSubscriptionObserver) + @objc dynamic public func removeObserver(_ observer: OneSignalUser.OSPushSubscriptionObserver) + @objc dynamic public var id: Swift.String? { + @objc get + } + @objc dynamic public var token: Swift.String? { + @objc get + } + @objc dynamic public var optedIn: Swift.Bool { + @objc get + } + @objc dynamic public func optIn() + @objc dynamic public func optOut() +} +extension OneSignalUser.OneSignalUserManagerImpl : OneSignalNotifications.OneSignalNotificationsDelegate { + @objc dynamic public func setNotificationTypes(_ notificationTypes: Swift.Int32) + @objc dynamic public func setPushToken(_ pushToken: Swift.String) +} +@objc public protocol OSPushSubscriptionObserver { + @objc func onPushSubscriptionDidChange(state: OneSignalUser.OSPushSubscriptionChangedState) +} +@_hasMissingDesignatedInitializers @objc public class OSPushSubscriptionState : ObjectiveC.NSObject { + @objc final public let id: Swift.String? + @objc final public let token: Swift.String? + @objc final public let optedIn: Swift.Bool + @objc override dynamic public var description: Swift.String { + @objc get + } + @objc public func jsonRepresentation() -> Foundation.NSDictionary + @objc deinit +} +@_hasMissingDesignatedInitializers @objc public class OSPushSubscriptionChangedState : ObjectiveC.NSObject { + @objc final public let current: OneSignalUser.OSPushSubscriptionState + @objc final public let previous: OneSignalUser.OSPushSubscriptionState + @objc override dynamic public var description: Swift.String { + @objc get + } + @objc public func jsonRepresentation() -> Foundation.NSDictionary + @objc deinit +} diff --git a/iOS_SDK/OneSignalSDK/OneSignal_User/OneSignalUser.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalUser.framework/Versions/A/Modules/OneSignalUser.swiftmodule/arm64-apple-ios-macabi.swiftdoc b/iOS_SDK/OneSignalSDK/OneSignal_User/OneSignalUser.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalUser.framework/Versions/A/Modules/OneSignalUser.swiftmodule/arm64-apple-ios-macabi.swiftdoc new file mode 100644 index 000000000..ee55bae68 Binary files /dev/null and b/iOS_SDK/OneSignalSDK/OneSignal_User/OneSignalUser.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalUser.framework/Versions/A/Modules/OneSignalUser.swiftmodule/arm64-apple-ios-macabi.swiftdoc differ diff --git a/iOS_SDK/OneSignalSDK/OneSignal_User/OneSignalUser.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalUser.framework/Versions/A/Modules/OneSignalUser.swiftmodule/arm64-apple-ios-macabi.swiftinterface b/iOS_SDK/OneSignalSDK/OneSignal_User/OneSignalUser.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalUser.framework/Versions/A/Modules/OneSignalUser.swiftmodule/arm64-apple-ios-macabi.swiftinterface new file mode 100644 index 000000000..d0cfb9d2e --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignal_User/OneSignalUser.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalUser.framework/Versions/A/Modules/OneSignalUser.swiftmodule/arm64-apple-ios-macabi.swiftinterface @@ -0,0 +1,130 @@ +// swift-interface-format-version: 1.0 +// swift-compiler-version: Apple Swift version 5.7.1 (swiftlang-5.7.1.135.3 clang-1400.0.29.51) +// swift-module-flags: -target arm64-apple-ios13.1-macabi -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -O -module-name OneSignalUser +// swift-module-flags-ignorable: -enable-bare-slash-regex +import Foundation +import OneSignalCore +import OneSignalNotifications +import OneSignalOSCore +@_exported import OneSignalUser +import Swift +import _Concurrency +import _StringProcessing +@objc public protocol OSUser { + @objc var pushSubscription: OneSignalUser.OSPushSubscription { get } + @objc func addAlias(label: Swift.String, id: Swift.String) + @objc func addAliases(_ aliases: [Swift.String : Swift.String]) + @objc func removeAlias(_ label: Swift.String) + @objc func removeAliases(_ labels: [Swift.String]) + @objc func addTag(key: Swift.String, value: Swift.String) + @objc func addTags(_ tags: [Swift.String : Swift.String]) + @objc func removeTag(_ tag: Swift.String) + @objc func removeTags(_ tags: [Swift.String]) + @objc func addEmail(_ email: Swift.String) + @objc func removeEmail(_ email: Swift.String) + @objc func addSms(_ number: Swift.String) + @objc func removeSms(_ number: Swift.String) + @objc func setLanguage(_ language: Swift.String) + typealias OSJwtCompletionBlock = (_ newJwtToken: Swift.String) -> Swift.Void + typealias OSJwtExpiredHandler = (_ externalId: Swift.String, _ completion: (_ newJwtToken: Swift.String) -> Swift.Void) -> Swift.Void + @objc func onJwtExpired(expiredHandler: @escaping Self.OSJwtExpiredHandler) +} +@objc public protocol OSPushSubscription { + @objc var id: Swift.String? { get } + @objc var token: Swift.String? { get } + @objc var optedIn: Swift.Bool { get } + @objc func optIn() + @objc func optOut() + @objc func addObserver(_ observer: OneSignalUser.OSPushSubscriptionObserver) + @objc func removeObserver(_ observer: OneSignalUser.OSPushSubscriptionObserver) +} +@_inheritsConvenienceInitializers @_hasMissingDesignatedInitializers @objc public class OneSignalUserManagerImpl : ObjectiveC.NSObject { + @objc public static let sharedInstance: OneSignalUser.OneSignalUserManagerImpl + @objc public var onesignalId: Swift.String? { + @objc get + } + @objc public var pushSubscriptionId: Swift.String? { + @objc get + } + @objc public var language: Swift.String? { + @objc get + } + @objc public var requiresUserAuth: Swift.Bool + @objc public func start() + @objc public func login(externalId: Swift.String, token: Swift.String?) + @objc public func logout() + public func _logout() + @objc public func clearAllModelsFromStores() + @objc public func getTags() -> [Swift.String : Swift.String]? + @objc public func setLocation(latitude: Swift.Float, longitude: Swift.Float) + @objc public func sendPurchases(_ purchases: [[Swift.String : Swift.AnyObject]]) + @objc deinit +} +extension OneSignalUser.OneSignalUserManagerImpl { + @objc dynamic public func startNewSession() + @objc dynamic public func updateSession(sessionCount: Foundation.NSNumber?, sessionTime: Foundation.NSNumber?, refreshDeviceMetadata: Swift.Bool, sendImmediately: Swift.Bool = false, onSuccess: (() -> Swift.Void)? = nil, onFailure: (() -> Swift.Void)? = nil) + @objc dynamic public func runBackgroundTasks() +} +extension OneSignalUser.OneSignalUserManagerImpl : OneSignalUser.OSUser { + @objc dynamic public func onJwtExpired(expiredHandler: @escaping OneSignalUser.OneSignalUserManagerImpl.OSJwtExpiredHandler) + @objc dynamic public var User: OneSignalUser.OSUser { + @objc get + } + @objc dynamic public var pushSubscription: OneSignalUser.OSPushSubscription { + @objc get + } + @objc dynamic public func addAlias(label: Swift.String, id: Swift.String) + @objc dynamic public func addAliases(_ aliases: [Swift.String : Swift.String]) + @objc dynamic public func removeAlias(_ label: Swift.String) + @objc dynamic public func removeAliases(_ labels: [Swift.String]) + @objc dynamic public func addTag(key: Swift.String, value: Swift.String) + @objc dynamic public func addTags(_ tags: [Swift.String : Swift.String]) + @objc dynamic public func removeTag(_ tag: Swift.String) + @objc dynamic public func removeTags(_ tags: [Swift.String]) + @objc dynamic public func addEmail(_ email: Swift.String) + @objc dynamic public func removeEmail(_ email: Swift.String) + @objc dynamic public func addSms(_ number: Swift.String) + @objc dynamic public func removeSms(_ number: Swift.String) + @objc dynamic public func setLanguage(_ language: Swift.String) +} +extension OneSignalUser.OneSignalUserManagerImpl : OneSignalUser.OSPushSubscription { + @objc dynamic public func addObserver(_ observer: OneSignalUser.OSPushSubscriptionObserver) + @objc dynamic public func removeObserver(_ observer: OneSignalUser.OSPushSubscriptionObserver) + @objc dynamic public var id: Swift.String? { + @objc get + } + @objc dynamic public var token: Swift.String? { + @objc get + } + @objc dynamic public var optedIn: Swift.Bool { + @objc get + } + @objc dynamic public func optIn() + @objc dynamic public func optOut() +} +extension OneSignalUser.OneSignalUserManagerImpl : OneSignalNotifications.OneSignalNotificationsDelegate { + @objc dynamic public func setNotificationTypes(_ notificationTypes: Swift.Int32) + @objc dynamic public func setPushToken(_ pushToken: Swift.String) +} +@objc public protocol OSPushSubscriptionObserver { + @objc func onPushSubscriptionDidChange(state: OneSignalUser.OSPushSubscriptionChangedState) +} +@_hasMissingDesignatedInitializers @objc public class OSPushSubscriptionState : ObjectiveC.NSObject { + @objc final public let id: Swift.String? + @objc final public let token: Swift.String? + @objc final public let optedIn: Swift.Bool + @objc override dynamic public var description: Swift.String { + @objc get + } + @objc public func jsonRepresentation() -> Foundation.NSDictionary + @objc deinit +} +@_hasMissingDesignatedInitializers @objc public class OSPushSubscriptionChangedState : ObjectiveC.NSObject { + @objc final public let current: OneSignalUser.OSPushSubscriptionState + @objc final public let previous: OneSignalUser.OSPushSubscriptionState + @objc override dynamic public var description: Swift.String { + @objc get + } + @objc public func jsonRepresentation() -> Foundation.NSDictionary + @objc deinit +} diff --git a/iOS_SDK/OneSignalSDK/OneSignal_User/OneSignalUser.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalUser.framework/Versions/A/Modules/OneSignalUser.swiftmodule/x86_64-apple-ios-macabi.abi.json b/iOS_SDK/OneSignalSDK/OneSignal_User/OneSignalUser.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalUser.framework/Versions/A/Modules/OneSignalUser.swiftmodule/x86_64-apple-ios-macabi.abi.json new file mode 100644 index 000000000..9e99e9246 --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignal_User/OneSignalUser.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalUser.framework/Versions/A/Modules/OneSignalUser.swiftmodule/x86_64-apple-ios-macabi.abi.json @@ -0,0 +1,4152 @@ +{ + "ABIRoot": { + "kind": "Root", + "name": "TopLevel", + "printedName": "TopLevel", + "children": [ + { + "kind": "Import", + "name": "Foundation", + "printedName": "Foundation", + "declKind": "Import", + "moduleName": "OneSignalUser", + "declAttributes": [ + "RawDocComment" + ] + }, + { + "kind": "Import", + "name": "OneSignalCore", + "printedName": "OneSignalCore", + "declKind": "Import", + "moduleName": "OneSignalUser" + }, + { + "kind": "Import", + "name": "OneSignalOSCore", + "printedName": "OneSignalOSCore", + "declKind": "Import", + "moduleName": "OneSignalUser" + }, + { + "kind": "Import", + "name": "OneSignalCore", + "printedName": "OneSignalCore", + "declKind": "Import", + "moduleName": "OneSignalUser", + "declAttributes": [ + "RawDocComment" + ] + }, + { + "kind": "Import", + "name": "OneSignalOSCore", + "printedName": "OneSignalOSCore", + "declKind": "Import", + "moduleName": "OneSignalUser" + }, + { + "kind": "Import", + "name": "OneSignalNotifications", + "printedName": "OneSignalNotifications", + "declKind": "Import", + "moduleName": "OneSignalUser" + }, + { + "kind": "TypeDecl", + "name": "OSUser", + "printedName": "OSUser", + "children": [ + { + "kind": "Var", + "name": "pushSubscription", + "printedName": "pushSubscription", + "children": [ + { + "kind": "TypeNominal", + "name": "OSPushSubscription", + "printedName": "OneSignalUser.OSPushSubscription", + "usr": "c:@M@OneSignalUser@objc(pl)OSPushSubscription" + } + ], + "declKind": "Var", + "usr": "c:@M@OneSignalUser@objc(pl)OSUser(py)pushSubscription", + "mangledName": "$s13OneSignalUser6OSUserP16pushSubscriptionAA06OSPushF0_pvp", + "moduleName": "OneSignalUser", + "protocolReq": true, + "declAttributes": [ + "ObjC" + ], + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "OSPushSubscription", + "printedName": "OneSignalUser.OSPushSubscription", + "usr": "c:@M@OneSignalUser@objc(pl)OSPushSubscription" + } + ], + "declKind": "Accessor", + "usr": "c:@M@OneSignalUser@objc(pl)OSUser(im)pushSubscription", + "mangledName": "$s13OneSignalUser6OSUserP16pushSubscriptionAA06OSPushF0_pvg", + "moduleName": "OneSignalUser", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalUser.OSUser>", + "sugared_genericSig": "", + "protocolReq": true, + "declAttributes": [ + "ObjC" + ], + "reqNewWitnessTableEntry": true, + "accessorKind": "get" + } + ] + }, + { + "kind": "Function", + "name": "addAlias", + "printedName": "addAlias(label:id:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Func", + "usr": "c:@M@OneSignalUser@objc(pl)OSUser(im)addAliasWithLabel:id:", + "mangledName": "$s13OneSignalUser6OSUserP8addAlias5label2idySS_SStF", + "moduleName": "OneSignalUser", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalUser.OSUser>", + "sugared_genericSig": "", + "protocolReq": true, + "declAttributes": [ + "RawDocComment", + "ObjC" + ], + "reqNewWitnessTableEntry": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "addAliases", + "printedName": "addAliases(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "Dictionary", + "printedName": "[Swift.String : Swift.String]", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:SD" + } + ], + "declKind": "Func", + "usr": "c:@M@OneSignalUser@objc(pl)OSUser(im)addAliases:", + "mangledName": "$s13OneSignalUser6OSUserP10addAliasesyySDyS2SGF", + "moduleName": "OneSignalUser", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalUser.OSUser>", + "sugared_genericSig": "", + "protocolReq": true, + "declAttributes": [ + "ObjC" + ], + "reqNewWitnessTableEntry": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "removeAlias", + "printedName": "removeAlias(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Func", + "usr": "c:@M@OneSignalUser@objc(pl)OSUser(im)removeAlias:", + "mangledName": "$s13OneSignalUser6OSUserP11removeAliasyySSF", + "moduleName": "OneSignalUser", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalUser.OSUser>", + "sugared_genericSig": "", + "protocolReq": true, + "declAttributes": [ + "ObjC" + ], + "reqNewWitnessTableEntry": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "removeAliases", + "printedName": "removeAliases(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "Array", + "printedName": "[Swift.String]", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:Sa" + } + ], + "declKind": "Func", + "usr": "c:@M@OneSignalUser@objc(pl)OSUser(im)removeAliases:", + "mangledName": "$s13OneSignalUser6OSUserP13removeAliasesyySaySSGF", + "moduleName": "OneSignalUser", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalUser.OSUser>", + "sugared_genericSig": "", + "protocolReq": true, + "declAttributes": [ + "ObjC" + ], + "reqNewWitnessTableEntry": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "addTag", + "printedName": "addTag(key:value:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Func", + "usr": "c:@M@OneSignalUser@objc(pl)OSUser(im)addTagWithKey:value:", + "mangledName": "$s13OneSignalUser6OSUserP6addTag3key5valueySS_SStF", + "moduleName": "OneSignalUser", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalUser.OSUser>", + "sugared_genericSig": "", + "protocolReq": true, + "declAttributes": [ + "RawDocComment", + "ObjC" + ], + "reqNewWitnessTableEntry": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "addTags", + "printedName": "addTags(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "Dictionary", + "printedName": "[Swift.String : Swift.String]", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:SD" + } + ], + "declKind": "Func", + "usr": "c:@M@OneSignalUser@objc(pl)OSUser(im)addTags:", + "mangledName": "$s13OneSignalUser6OSUserP7addTagsyySDyS2SGF", + "moduleName": "OneSignalUser", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalUser.OSUser>", + "sugared_genericSig": "", + "protocolReq": true, + "declAttributes": [ + "ObjC" + ], + "reqNewWitnessTableEntry": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "removeTag", + "printedName": "removeTag(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Func", + "usr": "c:@M@OneSignalUser@objc(pl)OSUser(im)removeTag:", + "mangledName": "$s13OneSignalUser6OSUserP9removeTagyySSF", + "moduleName": "OneSignalUser", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalUser.OSUser>", + "sugared_genericSig": "", + "protocolReq": true, + "declAttributes": [ + "ObjC" + ], + "reqNewWitnessTableEntry": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "removeTags", + "printedName": "removeTags(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "Array", + "printedName": "[Swift.String]", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:Sa" + } + ], + "declKind": "Func", + "usr": "c:@M@OneSignalUser@objc(pl)OSUser(im)removeTags:", + "mangledName": "$s13OneSignalUser6OSUserP10removeTagsyySaySSGF", + "moduleName": "OneSignalUser", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalUser.OSUser>", + "sugared_genericSig": "", + "protocolReq": true, + "declAttributes": [ + "ObjC" + ], + "reqNewWitnessTableEntry": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "addEmail", + "printedName": "addEmail(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Func", + "usr": "c:@M@OneSignalUser@objc(pl)OSUser(im)addEmail:", + "mangledName": "$s13OneSignalUser6OSUserP8addEmailyySSF", + "moduleName": "OneSignalUser", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalUser.OSUser>", + "sugared_genericSig": "", + "protocolReq": true, + "declAttributes": [ + "RawDocComment", + "ObjC" + ], + "reqNewWitnessTableEntry": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "removeEmail", + "printedName": "removeEmail(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Func", + "usr": "c:@M@OneSignalUser@objc(pl)OSUser(im)removeEmail:", + "mangledName": "$s13OneSignalUser6OSUserP11removeEmailyySSF", + "moduleName": "OneSignalUser", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalUser.OSUser>", + "sugared_genericSig": "", + "protocolReq": true, + "declAttributes": [ + "ObjC" + ], + "reqNewWitnessTableEntry": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "addSms", + "printedName": "addSms(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Func", + "usr": "c:@M@OneSignalUser@objc(pl)OSUser(im)addSms:", + "mangledName": "$s13OneSignalUser6OSUserP6addSmsyySSF", + "moduleName": "OneSignalUser", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalUser.OSUser>", + "sugared_genericSig": "", + "protocolReq": true, + "declAttributes": [ + "RawDocComment", + "ObjC" + ], + "reqNewWitnessTableEntry": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "removeSms", + "printedName": "removeSms(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Func", + "usr": "c:@M@OneSignalUser@objc(pl)OSUser(im)removeSms:", + "mangledName": "$s13OneSignalUser6OSUserP9removeSmsyySSF", + "moduleName": "OneSignalUser", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalUser.OSUser>", + "sugared_genericSig": "", + "protocolReq": true, + "declAttributes": [ + "ObjC" + ], + "reqNewWitnessTableEntry": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "setLanguage", + "printedName": "setLanguage(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Func", + "usr": "c:@M@OneSignalUser@objc(pl)OSUser(im)setLanguage:", + "mangledName": "$s13OneSignalUser6OSUserP11setLanguageyySSF", + "moduleName": "OneSignalUser", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalUser.OSUser>", + "sugared_genericSig": "", + "protocolReq": true, + "declAttributes": [ + "RawDocComment", + "ObjC" + ], + "reqNewWitnessTableEntry": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "onJwtExpired", + "printedName": "onJwtExpired(expiredHandler:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeFunc", + "name": "Function", + "printedName": "(Swift.String, (Swift.String) -> ()) -> ()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "Tuple", + "printedName": "(Swift.String, (Swift.String) -> ())", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + }, + { + "kind": "TypeFunc", + "name": "Function", + "printedName": "(Swift.String) -> ()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "typeAttributes": [ + "noescape" + ] + } + ] + } + ] + } + ], + "declKind": "Func", + "usr": "c:@M@OneSignalUser@objc(pl)OSUser(im)onJwtExpiredWithExpiredHandler:", + "mangledName": "$s13OneSignalUser6OSUserP12onJwtExpired14expiredHandleryySS_ySSXEtc_tF", + "moduleName": "OneSignalUser", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalUser.OSUser>", + "sugared_genericSig": "", + "protocolReq": true, + "declAttributes": [ + "ObjC" + ], + "reqNewWitnessTableEntry": true, + "funcSelfKind": "NonMutating" + } + ], + "declKind": "Protocol", + "usr": "c:@M@OneSignalUser@objc(pl)OSUser", + "mangledName": "$s13OneSignalUser6OSUserP", + "moduleName": "OneSignalUser", + "genericSig": "<τ_0_0 : AnyObject>", + "sugared_genericSig": "", + "declAttributes": [ + "AccessControl", + "ObjC", + "RawDocComment" + ] + }, + { + "kind": "TypeDecl", + "name": "OSPushSubscription", + "printedName": "OSPushSubscription", + "children": [ + { + "kind": "Var", + "name": "id", + "printedName": "id", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "Swift.String?", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Var", + "usr": "c:@M@OneSignalUser@objc(pl)OSPushSubscription(py)id", + "mangledName": "$s13OneSignalUser18OSPushSubscriptionP2idSSSgvp", + "moduleName": "OneSignalUser", + "protocolReq": true, + "declAttributes": [ + "ObjC" + ], + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "Swift.String?", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Accessor", + "usr": "c:@M@OneSignalUser@objc(pl)OSPushSubscription(im)id", + "mangledName": "$s13OneSignalUser18OSPushSubscriptionP2idSSSgvg", + "moduleName": "OneSignalUser", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalUser.OSPushSubscription>", + "sugared_genericSig": "", + "protocolReq": true, + "declAttributes": [ + "ObjC" + ], + "reqNewWitnessTableEntry": true, + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "token", + "printedName": "token", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "Swift.String?", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Var", + "usr": "c:@M@OneSignalUser@objc(pl)OSPushSubscription(py)token", + "mangledName": "$s13OneSignalUser18OSPushSubscriptionP5tokenSSSgvp", + "moduleName": "OneSignalUser", + "protocolReq": true, + "declAttributes": [ + "ObjC" + ], + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "Swift.String?", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Accessor", + "usr": "c:@M@OneSignalUser@objc(pl)OSPushSubscription(im)token", + "mangledName": "$s13OneSignalUser18OSPushSubscriptionP5tokenSSSgvg", + "moduleName": "OneSignalUser", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalUser.OSPushSubscription>", + "sugared_genericSig": "", + "protocolReq": true, + "declAttributes": [ + "ObjC" + ], + "reqNewWitnessTableEntry": true, + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "optedIn", + "printedName": "optedIn", + "children": [ + { + "kind": "TypeNominal", + "name": "Bool", + "printedName": "Swift.Bool", + "usr": "s:Sb" + } + ], + "declKind": "Var", + "usr": "c:@M@OneSignalUser@objc(pl)OSPushSubscription(py)optedIn", + "mangledName": "$s13OneSignalUser18OSPushSubscriptionP7optedInSbvp", + "moduleName": "OneSignalUser", + "protocolReq": true, + "declAttributes": [ + "ObjC" + ], + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "Bool", + "printedName": "Swift.Bool", + "usr": "s:Sb" + } + ], + "declKind": "Accessor", + "usr": "c:@M@OneSignalUser@objc(pl)OSPushSubscription(im)optedIn", + "mangledName": "$s13OneSignalUser18OSPushSubscriptionP7optedInSbvg", + "moduleName": "OneSignalUser", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalUser.OSPushSubscription>", + "sugared_genericSig": "", + "protocolReq": true, + "declAttributes": [ + "ObjC" + ], + "reqNewWitnessTableEntry": true, + "accessorKind": "get" + } + ] + }, + { + "kind": "Function", + "name": "optIn", + "printedName": "optIn()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + } + ], + "declKind": "Func", + "usr": "c:@M@OneSignalUser@objc(pl)OSPushSubscription(im)optIn", + "mangledName": "$s13OneSignalUser18OSPushSubscriptionP5optInyyF", + "moduleName": "OneSignalUser", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalUser.OSPushSubscription>", + "sugared_genericSig": "", + "protocolReq": true, + "declAttributes": [ + "ObjC" + ], + "reqNewWitnessTableEntry": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "optOut", + "printedName": "optOut()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + } + ], + "declKind": "Func", + "usr": "c:@M@OneSignalUser@objc(pl)OSPushSubscription(im)optOut", + "mangledName": "$s13OneSignalUser18OSPushSubscriptionP6optOutyyF", + "moduleName": "OneSignalUser", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalUser.OSPushSubscription>", + "sugared_genericSig": "", + "protocolReq": true, + "declAttributes": [ + "ObjC" + ], + "reqNewWitnessTableEntry": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "addObserver", + "printedName": "addObserver(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "OSPushSubscriptionObserver", + "printedName": "OneSignalUser.OSPushSubscriptionObserver", + "usr": "c:@M@OneSignalUser@objc(pl)OSPushSubscriptionObserver" + } + ], + "declKind": "Func", + "usr": "c:@M@OneSignalUser@objc(pl)OSPushSubscription(im)addObserver:", + "mangledName": "$s13OneSignalUser18OSPushSubscriptionP11addObserveryyAA0deG0_pF", + "moduleName": "OneSignalUser", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalUser.OSPushSubscription>", + "sugared_genericSig": "", + "protocolReq": true, + "declAttributes": [ + "ObjC" + ], + "reqNewWitnessTableEntry": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "removeObserver", + "printedName": "removeObserver(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "OSPushSubscriptionObserver", + "printedName": "OneSignalUser.OSPushSubscriptionObserver", + "usr": "c:@M@OneSignalUser@objc(pl)OSPushSubscriptionObserver" + } + ], + "declKind": "Func", + "usr": "c:@M@OneSignalUser@objc(pl)OSPushSubscription(im)removeObserver:", + "mangledName": "$s13OneSignalUser18OSPushSubscriptionP14removeObserveryyAA0deG0_pF", + "moduleName": "OneSignalUser", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalUser.OSPushSubscription>", + "sugared_genericSig": "", + "protocolReq": true, + "declAttributes": [ + "ObjC" + ], + "reqNewWitnessTableEntry": true, + "funcSelfKind": "NonMutating" + } + ], + "declKind": "Protocol", + "usr": "c:@M@OneSignalUser@objc(pl)OSPushSubscription", + "mangledName": "$s13OneSignalUser18OSPushSubscriptionP", + "moduleName": "OneSignalUser", + "genericSig": "<τ_0_0 : AnyObject>", + "sugared_genericSig": "", + "declAttributes": [ + "AccessControl", + "ObjC", + "RawDocComment" + ] + }, + { + "kind": "TypeDecl", + "name": "OneSignalUserManagerImpl", + "printedName": "OneSignalUserManagerImpl", + "children": [ + { + "kind": "Var", + "name": "sharedInstance", + "printedName": "sharedInstance", + "children": [ + { + "kind": "TypeNominal", + "name": "OneSignalUserManagerImpl", + "printedName": "OneSignalUser.OneSignalUserManagerImpl", + "usr": "c:@M@OneSignalUser@objc(cs)OneSignalUserManagerImpl" + } + ], + "declKind": "Var", + "usr": "c:@M@OneSignalUser@objc(cs)OneSignalUserManagerImpl(cpy)sharedInstance", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC14sharedInstanceACvpZ", + "moduleName": "OneSignalUser", + "static": true, + "declAttributes": [ + "HasInitialValue", + "Final", + "HasStorage", + "AccessControl", + "ObjC" + ], + "isLet": true, + "hasStorage": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "OneSignalUserManagerImpl", + "printedName": "OneSignalUser.OneSignalUserManagerImpl", + "usr": "c:@M@OneSignalUser@objc(cs)OneSignalUserManagerImpl" + } + ], + "declKind": "Accessor", + "usr": "c:@M@OneSignalUser@objc(cs)OneSignalUserManagerImpl(cm)sharedInstance", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC14sharedInstanceACvgZ", + "moduleName": "OneSignalUser", + "static": true, + "implicit": true, + "declAttributes": [ + "Final", + "ObjC" + ], + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "onesignalId", + "printedName": "onesignalId", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "Swift.String?", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Var", + "usr": "c:@M@OneSignalUser@objc(cs)OneSignalUserManagerImpl(py)onesignalId", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC11onesignalIdSSSgvp", + "moduleName": "OneSignalUser", + "declAttributes": [ + "AccessControl", + "ObjC" + ], + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "Swift.String?", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Accessor", + "usr": "c:@M@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)onesignalId", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC11onesignalIdSSSgvg", + "moduleName": "OneSignalUser", + "declAttributes": [ + "ObjC" + ], + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "pushSubscriptionId", + "printedName": "pushSubscriptionId", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "Swift.String?", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Var", + "usr": "c:@M@OneSignalUser@objc(cs)OneSignalUserManagerImpl(py)pushSubscriptionId", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC18pushSubscriptionIdSSSgvp", + "moduleName": "OneSignalUser", + "declAttributes": [ + "AccessControl", + "ObjC" + ], + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "Swift.String?", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Accessor", + "usr": "c:@M@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)pushSubscriptionId", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC18pushSubscriptionIdSSSgvg", + "moduleName": "OneSignalUser", + "declAttributes": [ + "ObjC" + ], + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "language", + "printedName": "language", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "Swift.String?", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Var", + "usr": "c:@M@OneSignalUser@objc(cs)OneSignalUserManagerImpl(py)language", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC8languageSSSgvp", + "moduleName": "OneSignalUser", + "declAttributes": [ + "AccessControl", + "ObjC" + ], + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "Swift.String?", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Accessor", + "usr": "c:@M@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)language", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC8languageSSSgvg", + "moduleName": "OneSignalUser", + "declAttributes": [ + "ObjC" + ], + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "requiresUserAuth", + "printedName": "requiresUserAuth", + "children": [ + { + "kind": "TypeNominal", + "name": "Bool", + "printedName": "Swift.Bool", + "usr": "s:Sb" + } + ], + "declKind": "Var", + "usr": "c:@M@OneSignalUser@objc(cs)OneSignalUserManagerImpl(py)requiresUserAuth", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC08requiresC4AuthSbvp", + "moduleName": "OneSignalUser", + "declAttributes": [ + "HasInitialValue", + "HasStorage", + "AccessControl", + "ObjC" + ], + "hasStorage": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "Bool", + "printedName": "Swift.Bool", + "usr": "s:Sb" + } + ], + "declKind": "Accessor", + "usr": "c:@M@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)requiresUserAuth", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC08requiresC4AuthSbvg", + "moduleName": "OneSignalUser", + "implicit": true, + "declAttributes": [ + "ObjC" + ], + "accessorKind": "get" + }, + { + "kind": "Accessor", + "name": "Set", + "printedName": "Set()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "Bool", + "printedName": "Swift.Bool", + "usr": "s:Sb" + } + ], + "declKind": "Accessor", + "usr": "c:@M@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)setRequiresUserAuth:", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC08requiresC4AuthSbvs", + "moduleName": "OneSignalUser", + "implicit": true, + "declAttributes": [ + "ObjC" + ], + "accessorKind": "set" + }, + { + "kind": "Accessor", + "name": "Modify", + "printedName": "Modify()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + } + ], + "declKind": "Accessor", + "usr": "s:13OneSignalUser0abC11ManagerImplC08requiresC4AuthSbvM", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC08requiresC4AuthSbvM", + "moduleName": "OneSignalUser", + "implicit": true, + "accessorKind": "_modify" + } + ] + }, + { + "kind": "Function", + "name": "start", + "printedName": "start()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + } + ], + "declKind": "Func", + "usr": "c:@M@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)start", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC5startyyF", + "moduleName": "OneSignalUser", + "declAttributes": [ + "AccessControl", + "ObjC", + "RawDocComment" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "login", + "printedName": "login(externalId:token:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + }, + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "Swift.String?", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Func", + "usr": "c:@M@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)loginWithExternalId:token:", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC5login10externalId5tokenySS_SSSgtF", + "moduleName": "OneSignalUser", + "objc_name": "loginWithExternalId:token:", + "declAttributes": [ + "ObjC", + "AccessControl" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "logout", + "printedName": "logout()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + } + ], + "declKind": "Func", + "usr": "c:@M@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)logout", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC6logoutyyF", + "moduleName": "OneSignalUser", + "objc_name": "logout", + "declAttributes": [ + "ObjC", + "AccessControl", + "RawDocComment" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "_logout", + "printedName": "_logout()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + } + ], + "declKind": "Func", + "usr": "s:13OneSignalUser0abC11ManagerImplC7_logoutyyF", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC7_logoutyyF", + "moduleName": "OneSignalUser", + "declAttributes": [ + "AccessControl" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "clearAllModelsFromStores", + "printedName": "clearAllModelsFromStores()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + } + ], + "declKind": "Func", + "usr": "c:@M@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)clearAllModelsFromStores", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC24clearAllModelsFromStoresyyF", + "moduleName": "OneSignalUser", + "declAttributes": [ + "AccessControl", + "ObjC" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "getTags", + "printedName": "getTags()", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "[Swift.String : Swift.String]?", + "children": [ + { + "kind": "TypeNominal", + "name": "Dictionary", + "printedName": "[Swift.String : Swift.String]", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:SD" + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Func", + "usr": "c:@M@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)getTags", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC7getTagsSDyS2SGSgyF", + "moduleName": "OneSignalUser", + "declAttributes": [ + "AccessControl", + "ObjC" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "setLocation", + "printedName": "setLocation(latitude:longitude:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "Float", + "printedName": "Swift.Float", + "usr": "s:Sf" + }, + { + "kind": "TypeNominal", + "name": "Float", + "printedName": "Swift.Float", + "usr": "s:Sf" + } + ], + "declKind": "Func", + "usr": "c:@M@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)setLocationWithLatitude:longitude:", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC11setLocation8latitude9longitudeySf_SftF", + "moduleName": "OneSignalUser", + "objc_name": "setLocationWithLatitude:longitude:", + "declAttributes": [ + "ObjC", + "AccessControl" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "sendPurchases", + "printedName": "sendPurchases(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "Array", + "printedName": "[[Swift.String : AnyObject]]", + "children": [ + { + "kind": "TypeNominal", + "name": "Dictionary", + "printedName": "[Swift.String : AnyObject]", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + }, + { + "kind": "TypeNominal", + "name": "ProtocolComposition", + "printedName": "AnyObject" + } + ], + "usr": "s:SD" + } + ], + "usr": "s:Sa" + } + ], + "declKind": "Func", + "usr": "c:@M@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)sendPurchases:", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC13sendPurchasesyySaySDySSyXlGGF", + "moduleName": "OneSignalUser", + "objc_name": "sendPurchases:", + "declAttributes": [ + "ObjC", + "AccessControl" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "startNewSession", + "printedName": "startNewSession()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + } + ], + "declKind": "Func", + "usr": "c:@CM@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)startNewSession", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC15startNewSessionyyF", + "moduleName": "OneSignalUser", + "declAttributes": [ + "Dynamic", + "AccessControl", + "ObjC" + ], + "isFromExtension": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "updateSession", + "printedName": "updateSession(sessionCount:sessionTime:refreshDeviceMetadata:sendImmediately:onSuccess:onFailure:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "Foundation.NSNumber?", + "children": [ + { + "kind": "TypeNominal", + "name": "NSNumber", + "printedName": "Foundation.NSNumber", + "usr": "c:objc(cs)NSNumber" + } + ], + "usr": "s:Sq" + }, + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "Foundation.NSNumber?", + "children": [ + { + "kind": "TypeNominal", + "name": "NSNumber", + "printedName": "Foundation.NSNumber", + "usr": "c:objc(cs)NSNumber" + } + ], + "usr": "s:Sq" + }, + { + "kind": "TypeNominal", + "name": "Bool", + "printedName": "Swift.Bool", + "usr": "s:Sb" + }, + { + "kind": "TypeNominal", + "name": "Bool", + "printedName": "Swift.Bool", + "hasDefaultArg": true, + "usr": "s:Sb" + }, + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "(() -> ())?", + "children": [ + { + "kind": "TypeFunc", + "name": "Function", + "printedName": "() -> ()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + } + ] + } + ], + "hasDefaultArg": true, + "usr": "s:Sq" + }, + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "(() -> ())?", + "children": [ + { + "kind": "TypeFunc", + "name": "Function", + "printedName": "() -> ()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + } + ] + } + ], + "hasDefaultArg": true, + "usr": "s:Sq" + } + ], + "declKind": "Func", + "usr": "c:@CM@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)updateSessionWithSessionCount:sessionTime:refreshDeviceMetadata:sendImmediately:onSuccess:onFailure:", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC13updateSession12sessionCount0H4Time21refreshDeviceMetadata15sendImmediately9onSuccess0P7FailureySo8NSNumberCSg_AMS2byycSgANtF", + "moduleName": "OneSignalUser", + "objc_name": "updateSessionWithSessionCount:sessionTime:refreshDeviceMetadata:sendImmediately:onSuccess:onFailure:", + "declAttributes": [ + "Dynamic", + "AccessControl", + "ObjC" + ], + "isFromExtension": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "runBackgroundTasks", + "printedName": "runBackgroundTasks()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + } + ], + "declKind": "Func", + "usr": "c:@CM@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)runBackgroundTasks", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC18runBackgroundTasksyyF", + "moduleName": "OneSignalUser", + "declAttributes": [ + "Dynamic", + "AccessControl", + "ObjC", + "RawDocComment" + ], + "isFromExtension": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "onJwtExpired", + "printedName": "onJwtExpired(expiredHandler:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeFunc", + "name": "Function", + "printedName": "(Swift.String, (Swift.String) -> ()) -> ()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "Tuple", + "printedName": "(Swift.String, (Swift.String) -> ())", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + }, + { + "kind": "TypeFunc", + "name": "Function", + "printedName": "(Swift.String) -> ()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "typeAttributes": [ + "noescape" + ] + } + ] + } + ] + } + ], + "declKind": "Func", + "usr": "c:@CM@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)onJwtExpiredWithExpiredHandler:", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC12onJwtExpired14expiredHandleryySS_ySSXEtc_tF", + "moduleName": "OneSignalUser", + "objc_name": "onJwtExpiredWithExpiredHandler:", + "declAttributes": [ + "Dynamic", + "ObjC", + "AccessControl" + ], + "isFromExtension": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Var", + "name": "User", + "printedName": "User", + "children": [ + { + "kind": "TypeNominal", + "name": "OSUser", + "printedName": "OneSignalUser.OSUser", + "usr": "c:@M@OneSignalUser@objc(pl)OSUser" + } + ], + "declKind": "Var", + "usr": "c:@CM@OneSignalUser@objc(cs)OneSignalUserManagerImpl(py)User", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC0C0AA6OSUser_pvp", + "moduleName": "OneSignalUser", + "objc_name": "User", + "declAttributes": [ + "Dynamic", + "ObjC", + "AccessControl" + ], + "isFromExtension": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "OSUser", + "printedName": "OneSignalUser.OSUser", + "usr": "c:@M@OneSignalUser@objc(pl)OSUser" + } + ], + "declKind": "Accessor", + "usr": "c:@CM@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)User", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC0C0AA6OSUser_pvg", + "moduleName": "OneSignalUser", + "objc_name": "User", + "declAttributes": [ + "Dynamic", + "ObjC" + ], + "isFromExtension": true, + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "pushSubscription", + "printedName": "pushSubscription", + "children": [ + { + "kind": "TypeNominal", + "name": "OSPushSubscription", + "printedName": "OneSignalUser.OSPushSubscription", + "usr": "c:@M@OneSignalUser@objc(pl)OSPushSubscription" + } + ], + "declKind": "Var", + "usr": "c:@CM@OneSignalUser@objc(cs)OneSignalUserManagerImpl(py)pushSubscription", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC16pushSubscriptionAA06OSPushG0_pvp", + "moduleName": "OneSignalUser", + "objc_name": "pushSubscription", + "declAttributes": [ + "Dynamic", + "ObjC", + "AccessControl" + ], + "isFromExtension": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "OSPushSubscription", + "printedName": "OneSignalUser.OSPushSubscription", + "usr": "c:@M@OneSignalUser@objc(pl)OSPushSubscription" + } + ], + "declKind": "Accessor", + "usr": "c:@CM@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)pushSubscription", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC16pushSubscriptionAA06OSPushG0_pvg", + "moduleName": "OneSignalUser", + "objc_name": "pushSubscription", + "declAttributes": [ + "Dynamic", + "ObjC" + ], + "isFromExtension": true, + "accessorKind": "get" + } + ] + }, + { + "kind": "Function", + "name": "addAlias", + "printedName": "addAlias(label:id:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Func", + "usr": "c:@CM@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)addAliasWithLabel:id:", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC8addAlias5label2idySS_SStF", + "moduleName": "OneSignalUser", + "objc_name": "addAliasWithLabel:id:", + "declAttributes": [ + "Dynamic", + "ObjC", + "AccessControl" + ], + "isFromExtension": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "addAliases", + "printedName": "addAliases(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "Dictionary", + "printedName": "[Swift.String : Swift.String]", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:SD" + } + ], + "declKind": "Func", + "usr": "c:@CM@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)addAliases:", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC10addAliasesyySDyS2SGF", + "moduleName": "OneSignalUser", + "objc_name": "addAliases:", + "declAttributes": [ + "Dynamic", + "ObjC", + "AccessControl" + ], + "isFromExtension": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "removeAlias", + "printedName": "removeAlias(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Func", + "usr": "c:@CM@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)removeAlias:", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC11removeAliasyySSF", + "moduleName": "OneSignalUser", + "objc_name": "removeAlias:", + "declAttributes": [ + "Dynamic", + "ObjC", + "AccessControl" + ], + "isFromExtension": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "removeAliases", + "printedName": "removeAliases(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "Array", + "printedName": "[Swift.String]", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:Sa" + } + ], + "declKind": "Func", + "usr": "c:@CM@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)removeAliases:", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC13removeAliasesyySaySSGF", + "moduleName": "OneSignalUser", + "objc_name": "removeAliases:", + "declAttributes": [ + "Dynamic", + "ObjC", + "AccessControl" + ], + "isFromExtension": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "addTag", + "printedName": "addTag(key:value:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Func", + "usr": "c:@CM@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)addTagWithKey:value:", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC6addTag3key5valueySS_SStF", + "moduleName": "OneSignalUser", + "objc_name": "addTagWithKey:value:", + "declAttributes": [ + "Dynamic", + "ObjC", + "AccessControl" + ], + "isFromExtension": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "addTags", + "printedName": "addTags(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "Dictionary", + "printedName": "[Swift.String : Swift.String]", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:SD" + } + ], + "declKind": "Func", + "usr": "c:@CM@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)addTags:", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC7addTagsyySDyS2SGF", + "moduleName": "OneSignalUser", + "objc_name": "addTags:", + "declAttributes": [ + "Dynamic", + "ObjC", + "AccessControl" + ], + "isFromExtension": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "removeTag", + "printedName": "removeTag(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Func", + "usr": "c:@CM@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)removeTag:", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC9removeTagyySSF", + "moduleName": "OneSignalUser", + "objc_name": "removeTag:", + "declAttributes": [ + "Dynamic", + "ObjC", + "AccessControl" + ], + "isFromExtension": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "removeTags", + "printedName": "removeTags(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "Array", + "printedName": "[Swift.String]", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:Sa" + } + ], + "declKind": "Func", + "usr": "c:@CM@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)removeTags:", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC10removeTagsyySaySSGF", + "moduleName": "OneSignalUser", + "objc_name": "removeTags:", + "declAttributes": [ + "Dynamic", + "ObjC", + "AccessControl" + ], + "isFromExtension": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "addEmail", + "printedName": "addEmail(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Func", + "usr": "c:@CM@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)addEmail:", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC8addEmailyySSF", + "moduleName": "OneSignalUser", + "objc_name": "addEmail:", + "declAttributes": [ + "Dynamic", + "ObjC", + "AccessControl" + ], + "isFromExtension": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "removeEmail", + "printedName": "removeEmail(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Func", + "usr": "c:@CM@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)removeEmail:", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC11removeEmailyySSF", + "moduleName": "OneSignalUser", + "objc_name": "removeEmail:", + "declAttributes": [ + "Dynamic", + "ObjC", + "AccessControl", + "RawDocComment" + ], + "isFromExtension": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "addSms", + "printedName": "addSms(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Func", + "usr": "c:@CM@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)addSms:", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC6addSmsyySSF", + "moduleName": "OneSignalUser", + "objc_name": "addSms:", + "declAttributes": [ + "Dynamic", + "ObjC", + "AccessControl" + ], + "isFromExtension": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "removeSms", + "printedName": "removeSms(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Func", + "usr": "c:@CM@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)removeSms:", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC9removeSmsyySSF", + "moduleName": "OneSignalUser", + "objc_name": "removeSms:", + "declAttributes": [ + "Dynamic", + "ObjC", + "AccessControl", + "RawDocComment" + ], + "isFromExtension": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "setLanguage", + "printedName": "setLanguage(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Func", + "usr": "c:@CM@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)setLanguage:", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC11setLanguageyySSF", + "moduleName": "OneSignalUser", + "objc_name": "setLanguage:", + "declAttributes": [ + "Dynamic", + "ObjC", + "AccessControl" + ], + "isFromExtension": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "addObserver", + "printedName": "addObserver(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "OSPushSubscriptionObserver", + "printedName": "OneSignalUser.OSPushSubscriptionObserver", + "usr": "c:@M@OneSignalUser@objc(pl)OSPushSubscriptionObserver" + } + ], + "declKind": "Func", + "usr": "c:@CM@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)addObserver:", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC11addObserveryyAA018OSPushSubscriptionG0_pF", + "moduleName": "OneSignalUser", + "objc_name": "addObserver:", + "declAttributes": [ + "Dynamic", + "ObjC", + "AccessControl" + ], + "isFromExtension": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "removeObserver", + "printedName": "removeObserver(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "OSPushSubscriptionObserver", + "printedName": "OneSignalUser.OSPushSubscriptionObserver", + "usr": "c:@M@OneSignalUser@objc(pl)OSPushSubscriptionObserver" + } + ], + "declKind": "Func", + "usr": "c:@CM@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)removeObserver:", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC14removeObserveryyAA018OSPushSubscriptionG0_pF", + "moduleName": "OneSignalUser", + "objc_name": "removeObserver:", + "declAttributes": [ + "Dynamic", + "ObjC", + "AccessControl" + ], + "isFromExtension": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Var", + "name": "id", + "printedName": "id", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "Swift.String?", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Var", + "usr": "c:@CM@OneSignalUser@objc(cs)OneSignalUserManagerImpl(py)id", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC2idSSSgvp", + "moduleName": "OneSignalUser", + "objc_name": "id", + "declAttributes": [ + "Dynamic", + "ObjC", + "AccessControl" + ], + "isFromExtension": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "Swift.String?", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Accessor", + "usr": "c:@CM@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)id", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC2idSSSgvg", + "moduleName": "OneSignalUser", + "objc_name": "id", + "declAttributes": [ + "Dynamic", + "ObjC" + ], + "isFromExtension": true, + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "token", + "printedName": "token", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "Swift.String?", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Var", + "usr": "c:@CM@OneSignalUser@objc(cs)OneSignalUserManagerImpl(py)token", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC5tokenSSSgvp", + "moduleName": "OneSignalUser", + "objc_name": "token", + "declAttributes": [ + "Dynamic", + "ObjC", + "AccessControl" + ], + "isFromExtension": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "Swift.String?", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Accessor", + "usr": "c:@CM@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)token", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC5tokenSSSgvg", + "moduleName": "OneSignalUser", + "objc_name": "token", + "declAttributes": [ + "Dynamic", + "ObjC" + ], + "isFromExtension": true, + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "optedIn", + "printedName": "optedIn", + "children": [ + { + "kind": "TypeNominal", + "name": "Bool", + "printedName": "Swift.Bool", + "usr": "s:Sb" + } + ], + "declKind": "Var", + "usr": "c:@CM@OneSignalUser@objc(cs)OneSignalUserManagerImpl(py)optedIn", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC7optedInSbvp", + "moduleName": "OneSignalUser", + "objc_name": "optedIn", + "declAttributes": [ + "Dynamic", + "ObjC", + "AccessControl" + ], + "isFromExtension": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "Bool", + "printedName": "Swift.Bool", + "usr": "s:Sb" + } + ], + "declKind": "Accessor", + "usr": "c:@CM@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)optedIn", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC7optedInSbvg", + "moduleName": "OneSignalUser", + "objc_name": "optedIn", + "declAttributes": [ + "Dynamic", + "ObjC" + ], + "isFromExtension": true, + "accessorKind": "get" + } + ] + }, + { + "kind": "Function", + "name": "optIn", + "printedName": "optIn()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + } + ], + "declKind": "Func", + "usr": "c:@CM@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)optIn", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC5optInyyF", + "moduleName": "OneSignalUser", + "objc_name": "optIn", + "declAttributes": [ + "Dynamic", + "ObjC", + "AccessControl", + "RawDocComment" + ], + "isFromExtension": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "optOut", + "printedName": "optOut()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + } + ], + "declKind": "Func", + "usr": "c:@CM@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)optOut", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC6optOutyyF", + "moduleName": "OneSignalUser", + "objc_name": "optOut", + "declAttributes": [ + "Dynamic", + "ObjC", + "AccessControl" + ], + "isFromExtension": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "setNotificationTypes", + "printedName": "setNotificationTypes(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "Int32", + "printedName": "Swift.Int32", + "usr": "s:s5Int32V" + } + ], + "declKind": "Func", + "usr": "c:@CM@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)setNotificationTypes:", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC20setNotificationTypesyys5Int32VF", + "moduleName": "OneSignalUser", + "objc_name": "setNotificationTypes:", + "declAttributes": [ + "Dynamic", + "ObjC", + "AccessControl", + "RawDocComment" + ], + "isFromExtension": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "setPushToken", + "printedName": "setPushToken(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Func", + "usr": "c:@CM@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)setPushToken:", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC12setPushTokenyySSF", + "moduleName": "OneSignalUser", + "objc_name": "setPushToken:", + "declAttributes": [ + "Dynamic", + "ObjC", + "AccessControl" + ], + "isFromExtension": true, + "funcSelfKind": "NonMutating" + } + ], + "declKind": "Class", + "usr": "c:@M@OneSignalUser@objc(cs)OneSignalUserManagerImpl", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC", + "moduleName": "OneSignalUser", + "declAttributes": [ + "AccessControl", + "ObjC" + ], + "superclassUsr": "c:objc(cs)NSObject", + "hasMissingDesignatedInitializers": true, + "inheritsConvenienceInitializers": true, + "superclassNames": [ + "ObjectiveC.NSObject" + ], + "conformances": [ + { + "kind": "Conformance", + "name": "Equatable", + "printedName": "Equatable", + "usr": "s:SQ", + "mangledName": "$sSQ" + }, + { + "kind": "Conformance", + "name": "Hashable", + "printedName": "Hashable", + "usr": "s:SH", + "mangledName": "$sSH" + }, + { + "kind": "Conformance", + "name": "CVarArg", + "printedName": "CVarArg", + "usr": "s:s7CVarArgP", + "mangledName": "$ss7CVarArgP" + }, + { + "kind": "Conformance", + "name": "_KeyValueCodingAndObservingPublishing", + "printedName": "_KeyValueCodingAndObservingPublishing", + "usr": "s:10Foundation37_KeyValueCodingAndObservingPublishingP", + "mangledName": "$s10Foundation37_KeyValueCodingAndObservingPublishingP" + }, + { + "kind": "Conformance", + "name": "_KeyValueCodingAndObserving", + "printedName": "_KeyValueCodingAndObserving", + "usr": "s:10Foundation27_KeyValueCodingAndObservingP", + "mangledName": "$s10Foundation27_KeyValueCodingAndObservingP" + }, + { + "kind": "Conformance", + "name": "CustomStringConvertible", + "printedName": "CustomStringConvertible", + "usr": "s:s23CustomStringConvertibleP", + "mangledName": "$ss23CustomStringConvertibleP" + }, + { + "kind": "Conformance", + "name": "CustomDebugStringConvertible", + "printedName": "CustomDebugStringConvertible", + "usr": "s:s28CustomDebugStringConvertibleP", + "mangledName": "$ss28CustomDebugStringConvertibleP" + }, + { + "kind": "Conformance", + "name": "OSUser", + "printedName": "OSUser", + "usr": "c:@M@OneSignalUser@objc(pl)OSUser", + "mangledName": "$s13OneSignalUser6OSUserP" + }, + { + "kind": "Conformance", + "name": "OSPushSubscription", + "printedName": "OSPushSubscription", + "usr": "c:@M@OneSignalUser@objc(pl)OSPushSubscription", + "mangledName": "$s13OneSignalUser18OSPushSubscriptionP" + } + ] + }, + { + "kind": "Import", + "name": "Foundation", + "printedName": "Foundation", + "declKind": "Import", + "moduleName": "OneSignalUser", + "declAttributes": [ + "RawDocComment" + ] + }, + { + "kind": "Import", + "name": "OneSignalOSCore", + "printedName": "OneSignalOSCore", + "declKind": "Import", + "moduleName": "OneSignalUser" + }, + { + "kind": "Import", + "name": "OneSignalCore", + "printedName": "OneSignalCore", + "declKind": "Import", + "moduleName": "OneSignalUser" + }, + { + "kind": "Import", + "name": "OneSignalOSCore", + "printedName": "OneSignalOSCore", + "declKind": "Import", + "moduleName": "OneSignalUser", + "declAttributes": [ + "RawDocComment" + ] + }, + { + "kind": "Import", + "name": "OneSignalCore", + "printedName": "OneSignalCore", + "declKind": "Import", + "moduleName": "OneSignalUser" + }, + { + "kind": "Import", + "name": "Foundation", + "printedName": "Foundation", + "declKind": "Import", + "moduleName": "OneSignalUser", + "declAttributes": [ + "RawDocComment" + ] + }, + { + "kind": "Import", + "name": "OneSignalCore", + "printedName": "OneSignalCore", + "declKind": "Import", + "moduleName": "OneSignalUser" + }, + { + "kind": "Import", + "name": "OneSignalOSCore", + "printedName": "OneSignalOSCore", + "declKind": "Import", + "moduleName": "OneSignalUser" + }, + { + "kind": "Import", + "name": "OneSignalCore", + "printedName": "OneSignalCore", + "declKind": "Import", + "moduleName": "OneSignalUser", + "declAttributes": [ + "RawDocComment" + ] + }, + { + "kind": "Import", + "name": "OneSignalOSCore", + "printedName": "OneSignalOSCore", + "declKind": "Import", + "moduleName": "OneSignalUser" + }, + { + "kind": "Import", + "name": "OneSignalOSCore", + "printedName": "OneSignalOSCore", + "declKind": "Import", + "moduleName": "OneSignalUser", + "declAttributes": [ + "RawDocComment" + ] + }, + { + "kind": "Import", + "name": "OneSignalCore", + "printedName": "OneSignalCore", + "declKind": "Import", + "moduleName": "OneSignalUser" + }, + { + "kind": "Import", + "name": "Foundation", + "printedName": "Foundation", + "declKind": "Import", + "moduleName": "OneSignalUser", + "declAttributes": [ + "RawDocComment" + ] + }, + { + "kind": "Import", + "name": "OneSignalCore", + "printedName": "OneSignalCore", + "declKind": "Import", + "moduleName": "OneSignalUser" + }, + { + "kind": "Import", + "name": "OneSignalOSCore", + "printedName": "OneSignalOSCore", + "declKind": "Import", + "moduleName": "OneSignalUser" + }, + { + "kind": "Import", + "name": "OneSignalNotifications", + "printedName": "OneSignalNotifications", + "declKind": "Import", + "moduleName": "OneSignalUser" + }, + { + "kind": "TypeDecl", + "name": "OSPushSubscriptionObserver", + "printedName": "OSPushSubscriptionObserver", + "children": [ + { + "kind": "Function", + "name": "onPushSubscriptionDidChange", + "printedName": "onPushSubscriptionDidChange(state:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "OSPushSubscriptionChangedState", + "printedName": "OneSignalUser.OSPushSubscriptionChangedState", + "usr": "c:@M@OneSignalUser@objc(cs)OSPushSubscriptionChangedState" + } + ], + "declKind": "Func", + "usr": "c:@M@OneSignalUser@objc(pl)OSPushSubscriptionObserver(im)onPushSubscriptionDidChangeWithState:", + "mangledName": "$s13OneSignalUser26OSPushSubscriptionObserverP06onPushE9DidChange5stateyAA0dE12ChangedStateC_tF", + "moduleName": "OneSignalUser", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalUser.OSPushSubscriptionObserver>", + "sugared_genericSig": "", + "protocolReq": true, + "objc_name": "onPushSubscriptionDidChangeWithState:", + "declAttributes": [ + "ObjC", + "RawDocComment" + ], + "reqNewWitnessTableEntry": true, + "funcSelfKind": "NonMutating" + } + ], + "declKind": "Protocol", + "usr": "c:@M@OneSignalUser@objc(pl)OSPushSubscriptionObserver", + "mangledName": "$s13OneSignalUser26OSPushSubscriptionObserverP", + "moduleName": "OneSignalUser", + "genericSig": "<τ_0_0 : AnyObject>", + "sugared_genericSig": "", + "declAttributes": [ + "AccessControl", + "ObjC", + "RawDocComment" + ] + }, + { + "kind": "TypeDecl", + "name": "OSPushSubscriptionState", + "printedName": "OSPushSubscriptionState", + "children": [ + { + "kind": "Var", + "name": "id", + "printedName": "id", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "Swift.String?", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Var", + "usr": "c:@M@OneSignalUser@objc(cs)OSPushSubscriptionState(py)id", + "mangledName": "$s13OneSignalUser23OSPushSubscriptionStateC2idSSSgvp", + "moduleName": "OneSignalUser", + "declAttributes": [ + "Final", + "HasStorage", + "AccessControl", + "ObjC" + ], + "isLet": true, + "hasStorage": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "Swift.String?", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Accessor", + "usr": "c:@M@OneSignalUser@objc(cs)OSPushSubscriptionState(im)id", + "mangledName": "$s13OneSignalUser23OSPushSubscriptionStateC2idSSSgvg", + "moduleName": "OneSignalUser", + "implicit": true, + "declAttributes": [ + "Final", + "ObjC" + ], + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "token", + "printedName": "token", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "Swift.String?", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Var", + "usr": "c:@M@OneSignalUser@objc(cs)OSPushSubscriptionState(py)token", + "mangledName": "$s13OneSignalUser23OSPushSubscriptionStateC5tokenSSSgvp", + "moduleName": "OneSignalUser", + "declAttributes": [ + "Final", + "HasStorage", + "AccessControl", + "ObjC" + ], + "isLet": true, + "hasStorage": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "Swift.String?", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Accessor", + "usr": "c:@M@OneSignalUser@objc(cs)OSPushSubscriptionState(im)token", + "mangledName": "$s13OneSignalUser23OSPushSubscriptionStateC5tokenSSSgvg", + "moduleName": "OneSignalUser", + "implicit": true, + "declAttributes": [ + "Final", + "ObjC" + ], + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "optedIn", + "printedName": "optedIn", + "children": [ + { + "kind": "TypeNominal", + "name": "Bool", + "printedName": "Swift.Bool", + "usr": "s:Sb" + } + ], + "declKind": "Var", + "usr": "c:@M@OneSignalUser@objc(cs)OSPushSubscriptionState(py)optedIn", + "mangledName": "$s13OneSignalUser23OSPushSubscriptionStateC7optedInSbvp", + "moduleName": "OneSignalUser", + "declAttributes": [ + "Final", + "HasStorage", + "AccessControl", + "ObjC" + ], + "isLet": true, + "hasStorage": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "Bool", + "printedName": "Swift.Bool", + "usr": "s:Sb" + } + ], + "declKind": "Accessor", + "usr": "c:@M@OneSignalUser@objc(cs)OSPushSubscriptionState(im)optedIn", + "mangledName": "$s13OneSignalUser23OSPushSubscriptionStateC7optedInSbvg", + "moduleName": "OneSignalUser", + "implicit": true, + "declAttributes": [ + "Final", + "ObjC" + ], + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "description", + "printedName": "description", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Var", + "usr": "c:@M@OneSignalUser@objc(cs)OSPushSubscriptionState(py)description", + "mangledName": "$s13OneSignalUser23OSPushSubscriptionStateC11descriptionSSvp", + "moduleName": "OneSignalUser", + "overriding": true, + "objc_name": "description", + "declAttributes": [ + "Dynamic", + "ObjC", + "Override", + "AccessControl" + ], + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Accessor", + "usr": "c:@M@OneSignalUser@objc(cs)OSPushSubscriptionState(im)description", + "mangledName": "$s13OneSignalUser23OSPushSubscriptionStateC11descriptionSSvg", + "moduleName": "OneSignalUser", + "overriding": true, + "objc_name": "description", + "declAttributes": [ + "Dynamic", + "ObjC" + ], + "accessorKind": "get" + } + ] + }, + { + "kind": "Function", + "name": "jsonRepresentation", + "printedName": "jsonRepresentation()", + "children": [ + { + "kind": "TypeNominal", + "name": "NSDictionary", + "printedName": "Foundation.NSDictionary", + "usr": "c:objc(cs)NSDictionary" + } + ], + "declKind": "Func", + "usr": "c:@M@OneSignalUser@objc(cs)OSPushSubscriptionState(im)jsonRepresentation", + "mangledName": "$s13OneSignalUser23OSPushSubscriptionStateC18jsonRepresentationSo12NSDictionaryCyF", + "moduleName": "OneSignalUser", + "declAttributes": [ + "AccessControl", + "ObjC" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Constructor", + "name": "init", + "printedName": "init()", + "children": [ + { + "kind": "TypeNominal", + "name": "OSPushSubscriptionState", + "printedName": "OneSignalUser.OSPushSubscriptionState", + "usr": "c:@M@OneSignalUser@objc(cs)OSPushSubscriptionState" + } + ], + "declKind": "Constructor", + "usr": "c:@M@OneSignalUser@objc(cs)OSPushSubscriptionState(im)init", + "mangledName": "$s13OneSignalUser23OSPushSubscriptionStateCACycfc", + "moduleName": "OneSignalUser", + "overriding": true, + "implicit": true, + "objc_name": "init", + "declAttributes": [ + "Dynamic", + "ObjC", + "Override" + ], + "init_kind": "Designated" + } + ], + "declKind": "Class", + "usr": "c:@M@OneSignalUser@objc(cs)OSPushSubscriptionState", + "mangledName": "$s13OneSignalUser23OSPushSubscriptionStateC", + "moduleName": "OneSignalUser", + "declAttributes": [ + "AccessControl", + "ObjC" + ], + "superclassUsr": "c:objc(cs)NSObject", + "hasMissingDesignatedInitializers": true, + "superclassNames": [ + "ObjectiveC.NSObject" + ], + "conformances": [ + { + "kind": "Conformance", + "name": "Equatable", + "printedName": "Equatable", + "usr": "s:SQ", + "mangledName": "$sSQ" + }, + { + "kind": "Conformance", + "name": "Hashable", + "printedName": "Hashable", + "usr": "s:SH", + "mangledName": "$sSH" + }, + { + "kind": "Conformance", + "name": "CVarArg", + "printedName": "CVarArg", + "usr": "s:s7CVarArgP", + "mangledName": "$ss7CVarArgP" + }, + { + "kind": "Conformance", + "name": "_KeyValueCodingAndObservingPublishing", + "printedName": "_KeyValueCodingAndObservingPublishing", + "usr": "s:10Foundation37_KeyValueCodingAndObservingPublishingP", + "mangledName": "$s10Foundation37_KeyValueCodingAndObservingPublishingP" + }, + { + "kind": "Conformance", + "name": "_KeyValueCodingAndObserving", + "printedName": "_KeyValueCodingAndObserving", + "usr": "s:10Foundation27_KeyValueCodingAndObservingP", + "mangledName": "$s10Foundation27_KeyValueCodingAndObservingP" + }, + { + "kind": "Conformance", + "name": "CustomStringConvertible", + "printedName": "CustomStringConvertible", + "usr": "s:s23CustomStringConvertibleP", + "mangledName": "$ss23CustomStringConvertibleP" + }, + { + "kind": "Conformance", + "name": "CustomDebugStringConvertible", + "printedName": "CustomDebugStringConvertible", + "usr": "s:s28CustomDebugStringConvertibleP", + "mangledName": "$ss28CustomDebugStringConvertibleP" + } + ] + }, + { + "kind": "TypeDecl", + "name": "OSPushSubscriptionChangedState", + "printedName": "OSPushSubscriptionChangedState", + "children": [ + { + "kind": "Var", + "name": "current", + "printedName": "current", + "children": [ + { + "kind": "TypeNominal", + "name": "OSPushSubscriptionState", + "printedName": "OneSignalUser.OSPushSubscriptionState", + "usr": "c:@M@OneSignalUser@objc(cs)OSPushSubscriptionState" + } + ], + "declKind": "Var", + "usr": "c:@M@OneSignalUser@objc(cs)OSPushSubscriptionChangedState(py)current", + "mangledName": "$s13OneSignalUser30OSPushSubscriptionChangedStateC7currentAA0deG0Cvp", + "moduleName": "OneSignalUser", + "declAttributes": [ + "Final", + "HasStorage", + "AccessControl", + "ObjC" + ], + "isLet": true, + "hasStorage": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "OSPushSubscriptionState", + "printedName": "OneSignalUser.OSPushSubscriptionState", + "usr": "c:@M@OneSignalUser@objc(cs)OSPushSubscriptionState" + } + ], + "declKind": "Accessor", + "usr": "c:@M@OneSignalUser@objc(cs)OSPushSubscriptionChangedState(im)current", + "mangledName": "$s13OneSignalUser30OSPushSubscriptionChangedStateC7currentAA0deG0Cvg", + "moduleName": "OneSignalUser", + "implicit": true, + "declAttributes": [ + "Final", + "ObjC" + ], + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "previous", + "printedName": "previous", + "children": [ + { + "kind": "TypeNominal", + "name": "OSPushSubscriptionState", + "printedName": "OneSignalUser.OSPushSubscriptionState", + "usr": "c:@M@OneSignalUser@objc(cs)OSPushSubscriptionState" + } + ], + "declKind": "Var", + "usr": "c:@M@OneSignalUser@objc(cs)OSPushSubscriptionChangedState(py)previous", + "mangledName": "$s13OneSignalUser30OSPushSubscriptionChangedStateC8previousAA0deG0Cvp", + "moduleName": "OneSignalUser", + "declAttributes": [ + "Final", + "HasStorage", + "AccessControl", + "ObjC" + ], + "isLet": true, + "hasStorage": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "OSPushSubscriptionState", + "printedName": "OneSignalUser.OSPushSubscriptionState", + "usr": "c:@M@OneSignalUser@objc(cs)OSPushSubscriptionState" + } + ], + "declKind": "Accessor", + "usr": "c:@M@OneSignalUser@objc(cs)OSPushSubscriptionChangedState(im)previous", + "mangledName": "$s13OneSignalUser30OSPushSubscriptionChangedStateC8previousAA0deG0Cvg", + "moduleName": "OneSignalUser", + "implicit": true, + "declAttributes": [ + "Final", + "ObjC" + ], + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "description", + "printedName": "description", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Var", + "usr": "c:@M@OneSignalUser@objc(cs)OSPushSubscriptionChangedState(py)description", + "mangledName": "$s13OneSignalUser30OSPushSubscriptionChangedStateC11descriptionSSvp", + "moduleName": "OneSignalUser", + "overriding": true, + "objc_name": "description", + "declAttributes": [ + "Dynamic", + "ObjC", + "Override", + "AccessControl" + ], + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Accessor", + "usr": "c:@M@OneSignalUser@objc(cs)OSPushSubscriptionChangedState(im)description", + "mangledName": "$s13OneSignalUser30OSPushSubscriptionChangedStateC11descriptionSSvg", + "moduleName": "OneSignalUser", + "overriding": true, + "objc_name": "description", + "declAttributes": [ + "Dynamic", + "ObjC" + ], + "accessorKind": "get" + } + ] + }, + { + "kind": "Function", + "name": "jsonRepresentation", + "printedName": "jsonRepresentation()", + "children": [ + { + "kind": "TypeNominal", + "name": "NSDictionary", + "printedName": "Foundation.NSDictionary", + "usr": "c:objc(cs)NSDictionary" + } + ], + "declKind": "Func", + "usr": "c:@M@OneSignalUser@objc(cs)OSPushSubscriptionChangedState(im)jsonRepresentation", + "mangledName": "$s13OneSignalUser30OSPushSubscriptionChangedStateC18jsonRepresentationSo12NSDictionaryCyF", + "moduleName": "OneSignalUser", + "declAttributes": [ + "AccessControl", + "ObjC" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Constructor", + "name": "init", + "printedName": "init()", + "children": [ + { + "kind": "TypeNominal", + "name": "OSPushSubscriptionChangedState", + "printedName": "OneSignalUser.OSPushSubscriptionChangedState", + "usr": "c:@M@OneSignalUser@objc(cs)OSPushSubscriptionChangedState" + } + ], + "declKind": "Constructor", + "usr": "c:@M@OneSignalUser@objc(cs)OSPushSubscriptionChangedState(im)init", + "mangledName": "$s13OneSignalUser30OSPushSubscriptionChangedStateCACycfc", + "moduleName": "OneSignalUser", + "overriding": true, + "implicit": true, + "objc_name": "init", + "declAttributes": [ + "Dynamic", + "ObjC", + "Override" + ], + "init_kind": "Designated" + } + ], + "declKind": "Class", + "usr": "c:@M@OneSignalUser@objc(cs)OSPushSubscriptionChangedState", + "mangledName": "$s13OneSignalUser30OSPushSubscriptionChangedStateC", + "moduleName": "OneSignalUser", + "declAttributes": [ + "AccessControl", + "ObjC" + ], + "superclassUsr": "c:objc(cs)NSObject", + "hasMissingDesignatedInitializers": true, + "superclassNames": [ + "ObjectiveC.NSObject" + ], + "conformances": [ + { + "kind": "Conformance", + "name": "Equatable", + "printedName": "Equatable", + "usr": "s:SQ", + "mangledName": "$sSQ" + }, + { + "kind": "Conformance", + "name": "Hashable", + "printedName": "Hashable", + "usr": "s:SH", + "mangledName": "$sSH" + }, + { + "kind": "Conformance", + "name": "CVarArg", + "printedName": "CVarArg", + "usr": "s:s7CVarArgP", + "mangledName": "$ss7CVarArgP" + }, + { + "kind": "Conformance", + "name": "_KeyValueCodingAndObservingPublishing", + "printedName": "_KeyValueCodingAndObservingPublishing", + "usr": "s:10Foundation37_KeyValueCodingAndObservingPublishingP", + "mangledName": "$s10Foundation37_KeyValueCodingAndObservingPublishingP" + }, + { + "kind": "Conformance", + "name": "_KeyValueCodingAndObserving", + "printedName": "_KeyValueCodingAndObserving", + "usr": "s:10Foundation27_KeyValueCodingAndObservingP", + "mangledName": "$s10Foundation27_KeyValueCodingAndObservingP" + }, + { + "kind": "Conformance", + "name": "CustomStringConvertible", + "printedName": "CustomStringConvertible", + "usr": "s:s23CustomStringConvertibleP", + "mangledName": "$ss23CustomStringConvertibleP" + }, + { + "kind": "Conformance", + "name": "CustomDebugStringConvertible", + "printedName": "CustomDebugStringConvertible", + "usr": "s:s28CustomDebugStringConvertibleP", + "mangledName": "$ss28CustomDebugStringConvertibleP" + } + ] + }, + { + "kind": "Import", + "name": "Foundation", + "printedName": "Foundation", + "declKind": "Import", + "moduleName": "OneSignalUser", + "declAttributes": [ + "RawDocComment" + ] + }, + { + "kind": "Import", + "name": "OneSignalCore", + "printedName": "OneSignalCore", + "declKind": "Import", + "moduleName": "OneSignalUser" + }, + { + "kind": "Import", + "name": "OneSignalOSCore", + "printedName": "OneSignalOSCore", + "declKind": "Import", + "moduleName": "OneSignalUser" + }, + { + "kind": "Import", + "name": "OneSignalOSCore", + "printedName": "OneSignalOSCore", + "declKind": "Import", + "moduleName": "OneSignalUser", + "declAttributes": [ + "RawDocComment" + ] + }, + { + "kind": "Import", + "name": "OneSignalCore", + "printedName": "OneSignalCore", + "declKind": "Import", + "moduleName": "OneSignalUser" + }, + { + "kind": "Import", + "name": "Foundation", + "printedName": "Foundation", + "declKind": "Import", + "moduleName": "OneSignalUser", + "declAttributes": [ + "RawDocComment" + ] + }, + { + "kind": "Import", + "name": "OneSignalCore", + "printedName": "OneSignalCore", + "declKind": "Import", + "moduleName": "OneSignalUser" + }, + { + "kind": "Import", + "name": "OneSignalOSCore", + "printedName": "OneSignalOSCore", + "declKind": "Import", + "moduleName": "OneSignalUser" + }, + { + "kind": "Import", + "name": "OneSignalCore", + "printedName": "OneSignalCore", + "declKind": "Import", + "moduleName": "OneSignalUser", + "declAttributes": [ + "RawDocComment" + ] + }, + { + "kind": "Import", + "name": "OneSignalNotifications", + "printedName": "OneSignalNotifications", + "declKind": "Import", + "moduleName": "OneSignalUser" + }, + { + "kind": "Import", + "name": "OneSignalOSCore", + "printedName": "OneSignalOSCore", + "declKind": "Import", + "moduleName": "OneSignalUser" + } + ], + "json_format_version": 8 + }, + "ConstValues": [ + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OneSignalUserManagerImpl.swift", + "kind": "BooleanLiteral", + "offset": 4048, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OneSignalUserManagerImpl.swift", + "kind": "BooleanLiteral", + "offset": 5070, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OneSignalUserManagerImpl.swift", + "kind": "BooleanLiteral", + "offset": 5089, + "length": 4, + "value": "true" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OneSignalUserManagerImpl.swift", + "kind": "BooleanLiteral", + "offset": 5172, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OneSignalUserManagerImpl.swift", + "kind": "BooleanLiteral", + "offset": 24536, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSPropertiesModel.swift", + "kind": "StringLiteral", + "offset": 1847, + "length": 15, + "value": "\"OneSignalUser.OSLocationPoint\"" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSPropertiesModel.swift", + "kind": "StringLiteral", + "offset": 2423, + "length": 10, + "value": "\"language\"" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSPropertiesModel.swift", + "kind": "StringLiteral", + "offset": 2557, + "length": 10, + "value": "\"location\"" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSPropertiesModel.swift", + "kind": "Dictionary", + "offset": 2697, + "length": 3, + "value": "[]" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSIdentityOperationExecutor.swift", + "kind": "Array", + "offset": 1438, + "length": 2, + "value": "[]" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSIdentityOperationExecutor.swift", + "kind": "Array", + "offset": 1570, + "length": 2, + "value": "[]" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSIdentityOperationExecutor.swift", + "kind": "Array", + "offset": 1626, + "length": 2, + "value": "[]" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSUserInternalImpl.swift", + "kind": "StringLiteral", + "offset": 2006, + "length": 18, + "value": "\"OneSignalUser.OSUserInternalImpl\"" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSPropertyOperationExecutor.swift", + "kind": "Array", + "offset": 1423, + "length": 2, + "value": "[]" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSPropertyOperationExecutor.swift", + "kind": "Array", + "offset": 1484, + "length": 2, + "value": "[]" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSPropertyOperationExecutor.swift", + "kind": "BooleanLiteral", + "offset": 9816, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSSubscriptionModel.swift", + "kind": "StringLiteral", + "offset": 1536, + "length": 23, + "value": "\"OneSignalUser.OSPushSubscriptionState\"" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSSubscriptionModel.swift", + "kind": "StringLiteral", + "offset": 2423, + "length": 30, + "value": "\"OneSignalUser.OSPushSubscriptionChangedState\"" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSSubscriptionModel.swift", + "kind": "StringLiteral", + "offset": 3147, + "length": 9, + "value": "\"iOSPush\"" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSSubscriptionModel.swift", + "kind": "StringLiteral", + "offset": 3174, + "length": 7, + "value": "\"Email\"" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSSubscriptionModel.swift", + "kind": "StringLiteral", + "offset": 3197, + "length": 5, + "value": "\"SMS\"" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSSubscriptionModel.swift", + "kind": "StringLiteral", + "offset": 3147, + "length": 9, + "value": "\"iOSPush\"" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSSubscriptionModel.swift", + "kind": "StringLiteral", + "offset": 3174, + "length": 7, + "value": "\"Email\"" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSSubscriptionModel.swift", + "kind": "StringLiteral", + "offset": 3197, + "length": 5, + "value": "\"SMS\"" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSSubscriptionModel.swift", + "kind": "StringLiteral", + "offset": 3526, + "length": 9, + "value": "\"address\"" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSSubscriptionModel.swift", + "kind": "StringLiteral", + "offset": 3957, + "length": 16, + "value": "\"subscriptionId\"" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSSubscriptionModel.swift", + "kind": "IntegerLiteral", + "offset": 5277, + "length": 2, + "value": "2" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSSubscriptionModel.swift", + "kind": "IntegerLiteral", + "offset": 5318, + "length": 2, + "value": "2" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSSubscriptionModel.swift", + "kind": "IntegerLiteral", + "offset": 5403, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSSubscriptionModel.swift", + "kind": "StringLiteral", + "offset": 5436, + "length": 19, + "value": "\"notificationTypes\"" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSSubscriptionModel.swift", + "kind": "IntegerLiteral", + "offset": 5003, + "length": 2, + "value": "1" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSSubscriptionModel.swift", + "kind": "IntegerLiteral", + "offset": 6433, + "length": 2, + "value": "2" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSSubscriptionModel.swift", + "kind": "StringLiteral", + "offset": 6649, + "length": 10, + "value": "\"testType\"" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSSubscriptionModel.swift", + "kind": "StringLiteral", + "offset": 6885, + "length": 10, + "value": "\"deviceOs\"" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSSubscriptionModel.swift", + "kind": "StringLiteral", + "offset": 7098, + "length": 5, + "value": "\"sdk\"" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSSubscriptionModel.swift", + "kind": "StringLiteral", + "offset": 7341, + "length": 13, + "value": "\"deviceModel\"" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSSubscriptionModel.swift", + "kind": "StringLiteral", + "offset": 7634, + "length": 12, + "value": "\"appVersion\"" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSSubscriptionModel.swift", + "kind": "StringLiteral", + "offset": 7458, + "length": 28, + "value": "\"CFBundleShortVersionString\"" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSSubscriptionModel.swift", + "kind": "StringLiteral", + "offset": 7886, + "length": 9, + "value": "\"netType\"" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSSubscriptionModel.swift", + "kind": "StringLiteral", + "offset": 3250, + "length": 19, + "value": "\"OneSignalUser.OSSubscriptionModel\"" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSIdentityModel.swift", + "kind": "Dictionary", + "offset": 1510, + "length": 3, + "value": "[]" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSIdentityModel.swift", + "kind": "StringLiteral", + "offset": 1293, + "length": 15, + "value": "\"OneSignalUser.OSIdentityModel\"" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSSubscriptionOperationExecutor.swift", + "kind": "Array", + "offset": 1486, + "length": 2, + "value": "[]" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSSubscriptionOperationExecutor.swift", + "kind": "Array", + "offset": 1626, + "length": 2, + "value": "[]" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSSubscriptionOperationExecutor.swift", + "kind": "Array", + "offset": 1689, + "length": 2, + "value": "[]" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSSubscriptionOperationExecutor.swift", + "kind": "Array", + "offset": 1752, + "length": 2, + "value": "[]" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSSubscriptionOperationExecutor.swift", + "kind": "Dictionary", + "offset": 1815, + "length": 3, + "value": "[]" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSUserRequests.swift", + "kind": "Array", + "offset": 1619, + "length": 2, + "value": "[]" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSUserRequests.swift", + "kind": "Array", + "offset": 1705, + "length": 2, + "value": "[]" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSUserRequests.swift", + "kind": "Dictionary", + "offset": 1767, + "length": 3, + "value": "[]" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSUserRequests.swift", + "kind": "BooleanLiteral", + "offset": 27422, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSUserRequests.swift", + "kind": "BooleanLiteral", + "offset": 31693, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSUserRequests.swift", + "kind": "StringLiteral", + "offset": 31615, + "length": 19, + "value": "\"OneSignalUser.OSRequestCreateUser\"" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSUserRequests.swift", + "kind": "BooleanLiteral", + "offset": 35419, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSUserRequests.swift", + "kind": "StringLiteral", + "offset": 35324, + "length": 36, + "value": "\"OneSignalUser.OSRequestFetchIdentityBySubscription\"" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSUserRequests.swift", + "kind": "BooleanLiteral", + "offset": 38704, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSUserRequests.swift", + "kind": "StringLiteral", + "offset": 38624, + "length": 21, + "value": "\"OneSignalUser.OSRequestIdentifyUser\"" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSUserRequests.swift", + "kind": "BooleanLiteral", + "offset": 42618, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSUserRequests.swift", + "kind": "StringLiteral", + "offset": 42541, + "length": 18, + "value": "\"OneSignalUser.OSRequestFetchUser\"" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSUserRequests.swift", + "kind": "BooleanLiteral", + "offset": 45201, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSUserRequests.swift", + "kind": "StringLiteral", + "offset": 45123, + "length": 19, + "value": "\"OneSignalUser.OSRequestAddAliases\"" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSUserRequests.swift", + "kind": "BooleanLiteral", + "offset": 47646, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSUserRequests.swift", + "kind": "StringLiteral", + "offset": 47567, + "length": 20, + "value": "\"OneSignalUser.OSRequestRemoveAlias\"" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSUserRequests.swift", + "kind": "BooleanLiteral", + "offset": 49858, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSUserRequests.swift", + "kind": "StringLiteral", + "offset": 49774, + "length": 25, + "value": "\"OneSignalUser.OSRequestUpdateProperties\"" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSUserRequests.swift", + "kind": "BooleanLiteral", + "offset": 54435, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSUserRequests.swift", + "kind": "StringLiteral", + "offset": 54349, + "length": 27, + "value": "\"OneSignalUser.OSRequestCreateSubscription\"" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSUserRequests.swift", + "kind": "BooleanLiteral", + "offset": 57362, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSUserRequests.swift", + "kind": "StringLiteral", + "offset": 57274, + "length": 29, + "value": "\"OneSignalUser.OSRequestTransferSubscription\"" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSUserRequests.swift", + "kind": "BooleanLiteral", + "offset": 60213, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSUserRequests.swift", + "kind": "StringLiteral", + "offset": 60127, + "length": 27, + "value": "\"OneSignalUser.OSRequestUpdateSubscription\"" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSUserRequests.swift", + "kind": "BooleanLiteral", + "offset": 63838, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSUserRequests.swift", + "kind": "StringLiteral", + "offset": 63752, + "length": 27, + "value": "\"OneSignalUser.OSRequestDeleteSubscription\"" + } + ] +} \ No newline at end of file diff --git a/iOS_SDK/OneSignalSDK/OneSignal_User/OneSignalUser.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalUser.framework/Versions/A/Modules/OneSignalUser.swiftmodule/x86_64-apple-ios-macabi.private.swiftinterface b/iOS_SDK/OneSignalSDK/OneSignal_User/OneSignalUser.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalUser.framework/Versions/A/Modules/OneSignalUser.swiftmodule/x86_64-apple-ios-macabi.private.swiftinterface new file mode 100644 index 000000000..b53617c7d --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignal_User/OneSignalUser.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalUser.framework/Versions/A/Modules/OneSignalUser.swiftmodule/x86_64-apple-ios-macabi.private.swiftinterface @@ -0,0 +1,130 @@ +// swift-interface-format-version: 1.0 +// swift-compiler-version: Apple Swift version 5.7.1 (swiftlang-5.7.1.135.3 clang-1400.0.29.51) +// swift-module-flags: -target x86_64-apple-ios13.1-macabi -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -O -module-name OneSignalUser +// swift-module-flags-ignorable: -enable-bare-slash-regex +import Foundation +import OneSignalCore +import OneSignalNotifications +import OneSignalOSCore +@_exported import OneSignalUser +import Swift +import _Concurrency +import _StringProcessing +@objc public protocol OSUser { + @objc var pushSubscription: OneSignalUser.OSPushSubscription { get } + @objc func addAlias(label: Swift.String, id: Swift.String) + @objc func addAliases(_ aliases: [Swift.String : Swift.String]) + @objc func removeAlias(_ label: Swift.String) + @objc func removeAliases(_ labels: [Swift.String]) + @objc func addTag(key: Swift.String, value: Swift.String) + @objc func addTags(_ tags: [Swift.String : Swift.String]) + @objc func removeTag(_ tag: Swift.String) + @objc func removeTags(_ tags: [Swift.String]) + @objc func addEmail(_ email: Swift.String) + @objc func removeEmail(_ email: Swift.String) + @objc func addSms(_ number: Swift.String) + @objc func removeSms(_ number: Swift.String) + @objc func setLanguage(_ language: Swift.String) + typealias OSJwtCompletionBlock = (_ newJwtToken: Swift.String) -> Swift.Void + typealias OSJwtExpiredHandler = (_ externalId: Swift.String, _ completion: (_ newJwtToken: Swift.String) -> Swift.Void) -> Swift.Void + @objc func onJwtExpired(expiredHandler: @escaping Self.OSJwtExpiredHandler) +} +@objc public protocol OSPushSubscription { + @objc var id: Swift.String? { get } + @objc var token: Swift.String? { get } + @objc var optedIn: Swift.Bool { get } + @objc func optIn() + @objc func optOut() + @objc func addObserver(_ observer: OneSignalUser.OSPushSubscriptionObserver) + @objc func removeObserver(_ observer: OneSignalUser.OSPushSubscriptionObserver) +} +@_inheritsConvenienceInitializers @_hasMissingDesignatedInitializers @objc public class OneSignalUserManagerImpl : ObjectiveC.NSObject { + @objc public static let sharedInstance: OneSignalUser.OneSignalUserManagerImpl + @objc public var onesignalId: Swift.String? { + @objc get + } + @objc public var pushSubscriptionId: Swift.String? { + @objc get + } + @objc public var language: Swift.String? { + @objc get + } + @objc public var requiresUserAuth: Swift.Bool + @objc public func start() + @objc public func login(externalId: Swift.String, token: Swift.String?) + @objc public func logout() + public func _logout() + @objc public func clearAllModelsFromStores() + @objc public func getTags() -> [Swift.String : Swift.String]? + @objc public func setLocation(latitude: Swift.Float, longitude: Swift.Float) + @objc public func sendPurchases(_ purchases: [[Swift.String : Swift.AnyObject]]) + @objc deinit +} +extension OneSignalUser.OneSignalUserManagerImpl { + @objc dynamic public func startNewSession() + @objc dynamic public func updateSession(sessionCount: Foundation.NSNumber?, sessionTime: Foundation.NSNumber?, refreshDeviceMetadata: Swift.Bool, sendImmediately: Swift.Bool = false, onSuccess: (() -> Swift.Void)? = nil, onFailure: (() -> Swift.Void)? = nil) + @objc dynamic public func runBackgroundTasks() +} +extension OneSignalUser.OneSignalUserManagerImpl : OneSignalUser.OSUser { + @objc dynamic public func onJwtExpired(expiredHandler: @escaping OneSignalUser.OneSignalUserManagerImpl.OSJwtExpiredHandler) + @objc dynamic public var User: OneSignalUser.OSUser { + @objc get + } + @objc dynamic public var pushSubscription: OneSignalUser.OSPushSubscription { + @objc get + } + @objc dynamic public func addAlias(label: Swift.String, id: Swift.String) + @objc dynamic public func addAliases(_ aliases: [Swift.String : Swift.String]) + @objc dynamic public func removeAlias(_ label: Swift.String) + @objc dynamic public func removeAliases(_ labels: [Swift.String]) + @objc dynamic public func addTag(key: Swift.String, value: Swift.String) + @objc dynamic public func addTags(_ tags: [Swift.String : Swift.String]) + @objc dynamic public func removeTag(_ tag: Swift.String) + @objc dynamic public func removeTags(_ tags: [Swift.String]) + @objc dynamic public func addEmail(_ email: Swift.String) + @objc dynamic public func removeEmail(_ email: Swift.String) + @objc dynamic public func addSms(_ number: Swift.String) + @objc dynamic public func removeSms(_ number: Swift.String) + @objc dynamic public func setLanguage(_ language: Swift.String) +} +extension OneSignalUser.OneSignalUserManagerImpl : OneSignalUser.OSPushSubscription { + @objc dynamic public func addObserver(_ observer: OneSignalUser.OSPushSubscriptionObserver) + @objc dynamic public func removeObserver(_ observer: OneSignalUser.OSPushSubscriptionObserver) + @objc dynamic public var id: Swift.String? { + @objc get + } + @objc dynamic public var token: Swift.String? { + @objc get + } + @objc dynamic public var optedIn: Swift.Bool { + @objc get + } + @objc dynamic public func optIn() + @objc dynamic public func optOut() +} +extension OneSignalUser.OneSignalUserManagerImpl : OneSignalNotifications.OneSignalNotificationsDelegate { + @objc dynamic public func setNotificationTypes(_ notificationTypes: Swift.Int32) + @objc dynamic public func setPushToken(_ pushToken: Swift.String) +} +@objc public protocol OSPushSubscriptionObserver { + @objc func onPushSubscriptionDidChange(state: OneSignalUser.OSPushSubscriptionChangedState) +} +@_hasMissingDesignatedInitializers @objc public class OSPushSubscriptionState : ObjectiveC.NSObject { + @objc final public let id: Swift.String? + @objc final public let token: Swift.String? + @objc final public let optedIn: Swift.Bool + @objc override dynamic public var description: Swift.String { + @objc get + } + @objc public func jsonRepresentation() -> Foundation.NSDictionary + @objc deinit +} +@_hasMissingDesignatedInitializers @objc public class OSPushSubscriptionChangedState : ObjectiveC.NSObject { + @objc final public let current: OneSignalUser.OSPushSubscriptionState + @objc final public let previous: OneSignalUser.OSPushSubscriptionState + @objc override dynamic public var description: Swift.String { + @objc get + } + @objc public func jsonRepresentation() -> Foundation.NSDictionary + @objc deinit +} diff --git a/iOS_SDK/OneSignalSDK/OneSignal_User/OneSignalUser.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalUser.framework/Versions/A/Modules/OneSignalUser.swiftmodule/x86_64-apple-ios-macabi.swiftdoc b/iOS_SDK/OneSignalSDK/OneSignal_User/OneSignalUser.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalUser.framework/Versions/A/Modules/OneSignalUser.swiftmodule/x86_64-apple-ios-macabi.swiftdoc new file mode 100644 index 000000000..7482cdac3 Binary files /dev/null and b/iOS_SDK/OneSignalSDK/OneSignal_User/OneSignalUser.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalUser.framework/Versions/A/Modules/OneSignalUser.swiftmodule/x86_64-apple-ios-macabi.swiftdoc differ diff --git a/iOS_SDK/OneSignalSDK/OneSignal_User/OneSignalUser.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalUser.framework/Versions/A/Modules/OneSignalUser.swiftmodule/x86_64-apple-ios-macabi.swiftinterface b/iOS_SDK/OneSignalSDK/OneSignal_User/OneSignalUser.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalUser.framework/Versions/A/Modules/OneSignalUser.swiftmodule/x86_64-apple-ios-macabi.swiftinterface new file mode 100644 index 000000000..b53617c7d --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignal_User/OneSignalUser.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalUser.framework/Versions/A/Modules/OneSignalUser.swiftmodule/x86_64-apple-ios-macabi.swiftinterface @@ -0,0 +1,130 @@ +// swift-interface-format-version: 1.0 +// swift-compiler-version: Apple Swift version 5.7.1 (swiftlang-5.7.1.135.3 clang-1400.0.29.51) +// swift-module-flags: -target x86_64-apple-ios13.1-macabi -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -O -module-name OneSignalUser +// swift-module-flags-ignorable: -enable-bare-slash-regex +import Foundation +import OneSignalCore +import OneSignalNotifications +import OneSignalOSCore +@_exported import OneSignalUser +import Swift +import _Concurrency +import _StringProcessing +@objc public protocol OSUser { + @objc var pushSubscription: OneSignalUser.OSPushSubscription { get } + @objc func addAlias(label: Swift.String, id: Swift.String) + @objc func addAliases(_ aliases: [Swift.String : Swift.String]) + @objc func removeAlias(_ label: Swift.String) + @objc func removeAliases(_ labels: [Swift.String]) + @objc func addTag(key: Swift.String, value: Swift.String) + @objc func addTags(_ tags: [Swift.String : Swift.String]) + @objc func removeTag(_ tag: Swift.String) + @objc func removeTags(_ tags: [Swift.String]) + @objc func addEmail(_ email: Swift.String) + @objc func removeEmail(_ email: Swift.String) + @objc func addSms(_ number: Swift.String) + @objc func removeSms(_ number: Swift.String) + @objc func setLanguage(_ language: Swift.String) + typealias OSJwtCompletionBlock = (_ newJwtToken: Swift.String) -> Swift.Void + typealias OSJwtExpiredHandler = (_ externalId: Swift.String, _ completion: (_ newJwtToken: Swift.String) -> Swift.Void) -> Swift.Void + @objc func onJwtExpired(expiredHandler: @escaping Self.OSJwtExpiredHandler) +} +@objc public protocol OSPushSubscription { + @objc var id: Swift.String? { get } + @objc var token: Swift.String? { get } + @objc var optedIn: Swift.Bool { get } + @objc func optIn() + @objc func optOut() + @objc func addObserver(_ observer: OneSignalUser.OSPushSubscriptionObserver) + @objc func removeObserver(_ observer: OneSignalUser.OSPushSubscriptionObserver) +} +@_inheritsConvenienceInitializers @_hasMissingDesignatedInitializers @objc public class OneSignalUserManagerImpl : ObjectiveC.NSObject { + @objc public static let sharedInstance: OneSignalUser.OneSignalUserManagerImpl + @objc public var onesignalId: Swift.String? { + @objc get + } + @objc public var pushSubscriptionId: Swift.String? { + @objc get + } + @objc public var language: Swift.String? { + @objc get + } + @objc public var requiresUserAuth: Swift.Bool + @objc public func start() + @objc public func login(externalId: Swift.String, token: Swift.String?) + @objc public func logout() + public func _logout() + @objc public func clearAllModelsFromStores() + @objc public func getTags() -> [Swift.String : Swift.String]? + @objc public func setLocation(latitude: Swift.Float, longitude: Swift.Float) + @objc public func sendPurchases(_ purchases: [[Swift.String : Swift.AnyObject]]) + @objc deinit +} +extension OneSignalUser.OneSignalUserManagerImpl { + @objc dynamic public func startNewSession() + @objc dynamic public func updateSession(sessionCount: Foundation.NSNumber?, sessionTime: Foundation.NSNumber?, refreshDeviceMetadata: Swift.Bool, sendImmediately: Swift.Bool = false, onSuccess: (() -> Swift.Void)? = nil, onFailure: (() -> Swift.Void)? = nil) + @objc dynamic public func runBackgroundTasks() +} +extension OneSignalUser.OneSignalUserManagerImpl : OneSignalUser.OSUser { + @objc dynamic public func onJwtExpired(expiredHandler: @escaping OneSignalUser.OneSignalUserManagerImpl.OSJwtExpiredHandler) + @objc dynamic public var User: OneSignalUser.OSUser { + @objc get + } + @objc dynamic public var pushSubscription: OneSignalUser.OSPushSubscription { + @objc get + } + @objc dynamic public func addAlias(label: Swift.String, id: Swift.String) + @objc dynamic public func addAliases(_ aliases: [Swift.String : Swift.String]) + @objc dynamic public func removeAlias(_ label: Swift.String) + @objc dynamic public func removeAliases(_ labels: [Swift.String]) + @objc dynamic public func addTag(key: Swift.String, value: Swift.String) + @objc dynamic public func addTags(_ tags: [Swift.String : Swift.String]) + @objc dynamic public func removeTag(_ tag: Swift.String) + @objc dynamic public func removeTags(_ tags: [Swift.String]) + @objc dynamic public func addEmail(_ email: Swift.String) + @objc dynamic public func removeEmail(_ email: Swift.String) + @objc dynamic public func addSms(_ number: Swift.String) + @objc dynamic public func removeSms(_ number: Swift.String) + @objc dynamic public func setLanguage(_ language: Swift.String) +} +extension OneSignalUser.OneSignalUserManagerImpl : OneSignalUser.OSPushSubscription { + @objc dynamic public func addObserver(_ observer: OneSignalUser.OSPushSubscriptionObserver) + @objc dynamic public func removeObserver(_ observer: OneSignalUser.OSPushSubscriptionObserver) + @objc dynamic public var id: Swift.String? { + @objc get + } + @objc dynamic public var token: Swift.String? { + @objc get + } + @objc dynamic public var optedIn: Swift.Bool { + @objc get + } + @objc dynamic public func optIn() + @objc dynamic public func optOut() +} +extension OneSignalUser.OneSignalUserManagerImpl : OneSignalNotifications.OneSignalNotificationsDelegate { + @objc dynamic public func setNotificationTypes(_ notificationTypes: Swift.Int32) + @objc dynamic public func setPushToken(_ pushToken: Swift.String) +} +@objc public protocol OSPushSubscriptionObserver { + @objc func onPushSubscriptionDidChange(state: OneSignalUser.OSPushSubscriptionChangedState) +} +@_hasMissingDesignatedInitializers @objc public class OSPushSubscriptionState : ObjectiveC.NSObject { + @objc final public let id: Swift.String? + @objc final public let token: Swift.String? + @objc final public let optedIn: Swift.Bool + @objc override dynamic public var description: Swift.String { + @objc get + } + @objc public func jsonRepresentation() -> Foundation.NSDictionary + @objc deinit +} +@_hasMissingDesignatedInitializers @objc public class OSPushSubscriptionChangedState : ObjectiveC.NSObject { + @objc final public let current: OneSignalUser.OSPushSubscriptionState + @objc final public let previous: OneSignalUser.OSPushSubscriptionState + @objc override dynamic public var description: Swift.String { + @objc get + } + @objc public func jsonRepresentation() -> Foundation.NSDictionary + @objc deinit +} diff --git a/iOS_SDK/OneSignalSDK/OneSignal_User/OneSignalUser.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalUser.framework/Versions/A/Modules/module.modulemap b/iOS_SDK/OneSignalSDK/OneSignal_User/OneSignalUser.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalUser.framework/Versions/A/Modules/module.modulemap new file mode 100644 index 000000000..2313273e3 --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignal_User/OneSignalUser.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalUser.framework/Versions/A/Modules/module.modulemap @@ -0,0 +1,11 @@ +framework module OneSignalUser { + umbrella header "OneSignalUser.h" + + export * + module * { export * } +} + +module OneSignalUser.Swift { + header "OneSignalUser-Swift.h" + requires objc +} diff --git a/iOS_SDK/OneSignalSDK/OneSignal_User/OneSignalUser.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalUser.framework/Versions/A/OneSignalUser b/iOS_SDK/OneSignalSDK/OneSignal_User/OneSignalUser.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalUser.framework/Versions/A/OneSignalUser new file mode 100755 index 000000000..62cf6d14a Binary files /dev/null and b/iOS_SDK/OneSignalSDK/OneSignal_User/OneSignalUser.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalUser.framework/Versions/A/OneSignalUser differ diff --git a/iOS_SDK/OneSignalSDK/OneSignal_User/OneSignalUser.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalUser.framework/Versions/A/Resources/Info.plist b/iOS_SDK/OneSignalSDK/OneSignal_User/OneSignalUser.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalUser.framework/Versions/A/Resources/Info.plist new file mode 100644 index 000000000..aa8c47dfa --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignal_User/OneSignalUser.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalUser.framework/Versions/A/Resources/Info.plist @@ -0,0 +1,52 @@ + + + + + BuildMachineOSBuild + 22G91 + CFBundleDevelopmentRegion + English + CFBundleExecutable + OneSignalUser + CFBundleIdentifier + com.onesignal.OneSignalUser + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + OneSignalUser + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0 + CFBundleSupportedPlatforms + + MacOSX + + CFBundleVersion + 1 + DTCompiler + com.apple.compilers.llvm.clang.1_0 + DTPlatformBuild + 14B47b + DTPlatformName + macosx + DTPlatformVersion + 13.0 + DTSDKBuild + 22A372 + DTSDKName + macosx13.0 + DTXcode + 1410 + DTXcodeBuild + 14B47b + LSMinimumSystemVersion + 10.15 + NSHumanReadableCopyright + Copyright © 2022 Hiptic. All rights reserved. + UIDeviceFamily + + 2 + + + diff --git a/iOS_SDK/OneSignalSDK/OneSignal_User/OneSignalUser.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalUser.framework/Versions/A/_CodeSignature/CodeResources b/iOS_SDK/OneSignalSDK/OneSignal_User/OneSignalUser.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalUser.framework/Versions/A/_CodeSignature/CodeResources new file mode 100644 index 000000000..3b6439609 --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignal_User/OneSignalUser.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalUser.framework/Versions/A/_CodeSignature/CodeResources @@ -0,0 +1,219 @@ + + + + + files + + Resources/Info.plist + + RUSE0VO+63wgarLQ0c3C6KRWBdM= + + + files2 + + Headers/OneSignalUser-Swift.h + + hash2 + + 2SSy/EB01SX2PXCFbMwGeTkOr126gf+OvjAtPt+3HUU= + + + Headers/OneSignalUser.h + + hash2 + + kzlTLEUR5uAPjMN03oyfrT8TmYBfxfO52NTJnvQdnvE= + + + Modules/OneSignalUser.swiftmodule/arm64-apple-ios-macabi.abi.json + + hash2 + + P1MWEWOm2ZGGcL2azjP6c8uZT11g6rrZH1qa8wKwwZ0= + + + Modules/OneSignalUser.swiftmodule/arm64-apple-ios-macabi.private.swiftinterface + + hash2 + + pGVBqgM9Rqi1oLqvIMzMDJvKH2CM7dBZ4Nw9MFoLITg= + + + Modules/OneSignalUser.swiftmodule/arm64-apple-ios-macabi.swiftdoc + + hash2 + + cGL8DixfPNLYi6EeFsGXC1AUjUnz+MvL2JWyqYI17f4= + + + Modules/OneSignalUser.swiftmodule/arm64-apple-ios-macabi.swiftinterface + + hash2 + + pGVBqgM9Rqi1oLqvIMzMDJvKH2CM7dBZ4Nw9MFoLITg= + + + Modules/OneSignalUser.swiftmodule/arm64-apple-ios-macabi.swiftmodule + + hash2 + + EIpXpbQF3lEvjDgZlA3vDY6HuvSEbPFHASoTcy+dm1g= + + + Modules/OneSignalUser.swiftmodule/x86_64-apple-ios-macabi.abi.json + + hash2 + + P1MWEWOm2ZGGcL2azjP6c8uZT11g6rrZH1qa8wKwwZ0= + + + Modules/OneSignalUser.swiftmodule/x86_64-apple-ios-macabi.private.swiftinterface + + hash2 + + rcX0RL1UCdiQpnYacPEwsykPBhue1NiyO4iWOsnH1do= + + + Modules/OneSignalUser.swiftmodule/x86_64-apple-ios-macabi.swiftdoc + + hash2 + + WdQY5w2BVYkgPB8q6VfSe4n8Z/D2KZixKgP3u3xr3PU= + + + Modules/OneSignalUser.swiftmodule/x86_64-apple-ios-macabi.swiftinterface + + hash2 + + rcX0RL1UCdiQpnYacPEwsykPBhue1NiyO4iWOsnH1do= + + + Modules/OneSignalUser.swiftmodule/x86_64-apple-ios-macabi.swiftmodule + + hash2 + + 2WzqZ5a3xuvxDC3f4RvljJahk1UgAwVKontC/0LDu9M= + + + Modules/module.modulemap + + hash2 + + D9eZkSkXqymTKNbGMVvSiBm8jGPDNW9FHX+RgvGgjqc= + + + Resources/Info.plist + + hash2 + + U+qT1/IRPn1YJHfBHa52JPqfcwDu/QL1xrc5HqjTMoI= + + + + rules + + ^Resources/ + + ^Resources/.*\.lproj/ + + optional + + weight + 1000 + + ^Resources/.*\.lproj/locversion.plist$ + + omit + + weight + 1100 + + ^Resources/Base\.lproj/ + + weight + 1010 + + ^version.plist$ + + + rules2 + + .*\.dSYM($|/) + + weight + 11 + + ^(.*/)?\.DS_Store$ + + omit + + weight + 2000 + + ^(Frameworks|SharedFrameworks|PlugIns|Plug-ins|XPCServices|Helpers|MacOS|Library/(Automator|Spotlight|LoginItems))/ + + nested + + weight + 10 + + ^.* + + ^Info\.plist$ + + omit + + weight + 20 + + ^PkgInfo$ + + omit + + weight + 20 + + ^Resources/ + + weight + 20 + + ^Resources/.*\.lproj/ + + optional + + weight + 1000 + + ^Resources/.*\.lproj/locversion.plist$ + + omit + + weight + 1100 + + ^Resources/Base\.lproj/ + + weight + 1010 + + ^[^/]+$ + + nested + + weight + 10 + + ^embedded\.provisionprofile$ + + weight + 20 + + ^version\.plist$ + + weight + 20 + + + + diff --git a/iOS_SDK/OneSignalSDK/OneSignal_User/OneSignalUser.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalUser.framework/Versions/Current b/iOS_SDK/OneSignalSDK/OneSignal_User/OneSignalUser.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalUser.framework/Versions/Current new file mode 120000 index 000000000..8c7e5a667 --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignal_User/OneSignalUser.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalUser.framework/Versions/Current @@ -0,0 +1 @@ +A \ No newline at end of file diff --git a/iOS_SDK/OneSignalSDK/OneSignal_User/OneSignalUser.xcframework/ios-arm64_x86_64-simulator/OneSignalUser.framework/Headers/OneSignalUser-Swift.h b/iOS_SDK/OneSignalSDK/OneSignal_User/OneSignalUser.xcframework/ios-arm64_x86_64-simulator/OneSignalUser.framework/Headers/OneSignalUser-Swift.h new file mode 100644 index 000000000..7d1bb0df9 --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignal_User/OneSignalUser.xcframework/ios-arm64_x86_64-simulator/OneSignalUser.framework/Headers/OneSignalUser-Swift.h @@ -0,0 +1,816 @@ +#if 0 +#elif defined(__arm64__) && __arm64__ +// Generated by Apple Swift version 5.7.1 (swiftlang-5.7.1.135.3 clang-1400.0.29.51) +#ifndef ONESIGNALUSER_SWIFT_H +#define ONESIGNALUSER_SWIFT_H +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wgcc-compat" + +#if !defined(__has_include) +# define __has_include(x) 0 +#endif +#if !defined(__has_attribute) +# define __has_attribute(x) 0 +#endif +#if !defined(__has_feature) +# define __has_feature(x) 0 +#endif +#if !defined(__has_warning) +# define __has_warning(x) 0 +#endif + +#if __has_include() +# include +#endif + +#pragma clang diagnostic ignored "-Wduplicate-method-match" +#pragma clang diagnostic ignored "-Wauto-import" +#if defined(__OBJC__) +#include +#endif +#if defined(__cplusplus) +#include +#include +#include +#else +#include +#include +#include +#endif + +#if !defined(SWIFT_TYPEDEFS) +# define SWIFT_TYPEDEFS 1 +# if __has_include() +# include +# elif !defined(__cplusplus) +typedef uint_least16_t char16_t; +typedef uint_least32_t char32_t; +# endif +typedef float swift_float2 __attribute__((__ext_vector_type__(2))); +typedef float swift_float3 __attribute__((__ext_vector_type__(3))); +typedef float swift_float4 __attribute__((__ext_vector_type__(4))); +typedef double swift_double2 __attribute__((__ext_vector_type__(2))); +typedef double swift_double3 __attribute__((__ext_vector_type__(3))); +typedef double swift_double4 __attribute__((__ext_vector_type__(4))); +typedef int swift_int2 __attribute__((__ext_vector_type__(2))); +typedef int swift_int3 __attribute__((__ext_vector_type__(3))); +typedef int swift_int4 __attribute__((__ext_vector_type__(4))); +typedef unsigned int swift_uint2 __attribute__((__ext_vector_type__(2))); +typedef unsigned int swift_uint3 __attribute__((__ext_vector_type__(3))); +typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4))); +#endif + +#if !defined(SWIFT_PASTE) +# define SWIFT_PASTE_HELPER(x, y) x##y +# define SWIFT_PASTE(x, y) SWIFT_PASTE_HELPER(x, y) +#endif +#if !defined(SWIFT_METATYPE) +# define SWIFT_METATYPE(X) Class +#endif +#if !defined(SWIFT_CLASS_PROPERTY) +# if __has_feature(objc_class_property) +# define SWIFT_CLASS_PROPERTY(...) __VA_ARGS__ +# else +# define SWIFT_CLASS_PROPERTY(...) +# endif +#endif + +#if __has_attribute(objc_runtime_name) +# define SWIFT_RUNTIME_NAME(X) __attribute__((objc_runtime_name(X))) +#else +# define SWIFT_RUNTIME_NAME(X) +#endif +#if __has_attribute(swift_name) +# define SWIFT_COMPILE_NAME(X) __attribute__((swift_name(X))) +#else +# define SWIFT_COMPILE_NAME(X) +#endif +#if __has_attribute(objc_method_family) +# define SWIFT_METHOD_FAMILY(X) __attribute__((objc_method_family(X))) +#else +# define SWIFT_METHOD_FAMILY(X) +#endif +#if __has_attribute(noescape) +# define SWIFT_NOESCAPE __attribute__((noescape)) +#else +# define SWIFT_NOESCAPE +#endif +#if __has_attribute(ns_consumed) +# define SWIFT_RELEASES_ARGUMENT __attribute__((ns_consumed)) +#else +# define SWIFT_RELEASES_ARGUMENT +#endif +#if __has_attribute(warn_unused_result) +# define SWIFT_WARN_UNUSED_RESULT __attribute__((warn_unused_result)) +#else +# define SWIFT_WARN_UNUSED_RESULT +#endif +#if __has_attribute(noreturn) +# define SWIFT_NORETURN __attribute__((noreturn)) +#else +# define SWIFT_NORETURN +#endif +#if !defined(SWIFT_CLASS_EXTRA) +# define SWIFT_CLASS_EXTRA +#endif +#if !defined(SWIFT_PROTOCOL_EXTRA) +# define SWIFT_PROTOCOL_EXTRA +#endif +#if !defined(SWIFT_ENUM_EXTRA) +# define SWIFT_ENUM_EXTRA +#endif +#if !defined(SWIFT_CLASS) +# if __has_attribute(objc_subclassing_restricted) +# define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_CLASS_EXTRA +# define SWIFT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA +# else +# define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA +# define SWIFT_CLASS_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA +# endif +#endif +#if !defined(SWIFT_RESILIENT_CLASS) +# if __has_attribute(objc_class_stub) +# define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME) __attribute__((objc_class_stub)) +# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_class_stub)) SWIFT_CLASS_NAMED(SWIFT_NAME) +# else +# define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME) +# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) SWIFT_CLASS_NAMED(SWIFT_NAME) +# endif +#endif + +#if !defined(SWIFT_PROTOCOL) +# define SWIFT_PROTOCOL(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA +# define SWIFT_PROTOCOL_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA +#endif + +#if !defined(SWIFT_EXTENSION) +# define SWIFT_EXTENSION(M) SWIFT_PASTE(M##_Swift_, __LINE__) +#endif + +#if !defined(OBJC_DESIGNATED_INITIALIZER) +# if __has_attribute(objc_designated_initializer) +# define OBJC_DESIGNATED_INITIALIZER __attribute__((objc_designated_initializer)) +# else +# define OBJC_DESIGNATED_INITIALIZER +# endif +#endif +#if !defined(SWIFT_ENUM_ATTR) +# if defined(__has_attribute) && __has_attribute(enum_extensibility) +# define SWIFT_ENUM_ATTR(_extensibility) __attribute__((enum_extensibility(_extensibility))) +# else +# define SWIFT_ENUM_ATTR(_extensibility) +# endif +#endif +#if !defined(SWIFT_ENUM) +# define SWIFT_ENUM(_type, _name, _extensibility) enum _name : _type _name; enum SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type +# if __has_feature(generalized_swift_name) +# define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) enum _name : _type _name SWIFT_COMPILE_NAME(SWIFT_NAME); enum SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type +# else +# define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) SWIFT_ENUM(_type, _name, _extensibility) +# endif +#endif +#if !defined(SWIFT_UNAVAILABLE) +# define SWIFT_UNAVAILABLE __attribute__((unavailable)) +#endif +#if !defined(SWIFT_UNAVAILABLE_MSG) +# define SWIFT_UNAVAILABLE_MSG(msg) __attribute__((unavailable(msg))) +#endif +#if !defined(SWIFT_AVAILABILITY) +# define SWIFT_AVAILABILITY(plat, ...) __attribute__((availability(plat, __VA_ARGS__))) +#endif +#if !defined(SWIFT_WEAK_IMPORT) +# define SWIFT_WEAK_IMPORT __attribute__((weak_import)) +#endif +#if !defined(SWIFT_DEPRECATED) +# define SWIFT_DEPRECATED __attribute__((deprecated)) +#endif +#if !defined(SWIFT_DEPRECATED_MSG) +# define SWIFT_DEPRECATED_MSG(...) __attribute__((deprecated(__VA_ARGS__))) +#endif +#if __has_feature(attribute_diagnose_if_objc) +# define SWIFT_DEPRECATED_OBJC(Msg) __attribute__((diagnose_if(1, Msg, "warning"))) +#else +# define SWIFT_DEPRECATED_OBJC(Msg) SWIFT_DEPRECATED_MSG(Msg) +#endif +#if defined(__OBJC__) +#if !defined(IBSegueAction) +# define IBSegueAction +#endif +#endif +#if !defined(SWIFT_EXTERN) +# if defined(__cplusplus) +# define SWIFT_EXTERN extern "C" +# else +# define SWIFT_EXTERN extern +# endif +#endif +#if !defined(SWIFT_CALL) +# define SWIFT_CALL __attribute__((swiftcall)) +#endif +#if defined(__cplusplus) +#if !defined(SWIFT_NOEXCEPT) +# define SWIFT_NOEXCEPT noexcept +#endif +#else +#if !defined(SWIFT_NOEXCEPT) +# define SWIFT_NOEXCEPT +#endif +#endif +#if defined(__cplusplus) +#if !defined(SWIFT_CXX_INT_DEFINED) +#define SWIFT_CXX_INT_DEFINED +namespace swift { +using Int = ptrdiff_t; +using UInt = size_t; +} +#endif +#endif +#if defined(__OBJC__) +#if __has_feature(modules) +#if __has_warning("-Watimport-in-framework-header") +#pragma clang diagnostic ignored "-Watimport-in-framework-header" +#endif +@import Foundation; +@import ObjectiveC; +@import OneSignalNotifications; +#endif + +#endif +#pragma clang diagnostic ignored "-Wproperty-attribute-mismatch" +#pragma clang diagnostic ignored "-Wduplicate-method-arg" +#if __has_warning("-Wpragma-clang-attribute") +# pragma clang diagnostic ignored "-Wpragma-clang-attribute" +#endif +#pragma clang diagnostic ignored "-Wunknown-pragmas" +#pragma clang diagnostic ignored "-Wnullability" +#pragma clang diagnostic ignored "-Wdollar-in-identifier-extension" + +#if __has_attribute(external_source_symbol) +# pragma push_macro("any") +# undef any +# pragma clang attribute push(__attribute__((external_source_symbol(language="Swift", defined_in="OneSignalUser",generated_declaration))), apply_to=any(function,enum,objc_interface,objc_category,objc_protocol)) +# pragma pop_macro("any") +#endif + +#if defined(__OBJC__) +@class NSString; +@protocol OSPushSubscriptionObserver; + +/// This is the push subscription interface exposed to the public. +SWIFT_PROTOCOL("_TtP13OneSignalUser18OSPushSubscription_") +@protocol OSPushSubscription +@property (nonatomic, readonly, copy) NSString * _Nullable id; +@property (nonatomic, readonly, copy) NSString * _Nullable token; +@property (nonatomic, readonly) BOOL optedIn; +- (void)optIn; +- (void)optOut; +- (void)addObserver:(id _Nonnull)observer; +- (void)removeObserver:(id _Nonnull)observer; +@end + +@class OSPushSubscriptionState; +@class NSDictionary; + +SWIFT_CLASS("_TtC13OneSignalUser30OSPushSubscriptionChangedState") +@interface OSPushSubscriptionChangedState : NSObject +@property (nonatomic, readonly, strong) OSPushSubscriptionState * _Nonnull current; +@property (nonatomic, readonly, strong) OSPushSubscriptionState * _Nonnull previous; +@property (nonatomic, readonly, copy) NSString * _Nonnull description; +- (NSDictionary * _Nonnull)jsonRepresentation SWIFT_WARN_UNUSED_RESULT; +- (nonnull instancetype)init SWIFT_UNAVAILABLE; ++ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); +@end + + +SWIFT_PROTOCOL("_TtP13OneSignalUser26OSPushSubscriptionObserver_") +@protocol OSPushSubscriptionObserver +- (void)onPushSubscriptionDidChangeWithState:(OSPushSubscriptionChangedState * _Nonnull)state; +@end + + +SWIFT_CLASS("_TtC13OneSignalUser23OSPushSubscriptionState") +@interface OSPushSubscriptionState : NSObject +@property (nonatomic, readonly, copy) NSString * _Nullable id; +@property (nonatomic, readonly, copy) NSString * _Nullable token; +@property (nonatomic, readonly) BOOL optedIn; +@property (nonatomic, readonly, copy) NSString * _Nonnull description; +- (NSDictionary * _Nonnull)jsonRepresentation SWIFT_WARN_UNUSED_RESULT; +- (nonnull instancetype)init SWIFT_UNAVAILABLE; ++ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); +@end + + +/// This is the user interface exposed to the public. +SWIFT_PROTOCOL("_TtP13OneSignalUser6OSUser_") +@protocol OSUser +@property (nonatomic, readonly, strong) id _Nonnull pushSubscription; +- (void)addAliasWithLabel:(NSString * _Nonnull)label id:(NSString * _Nonnull)id; +- (void)addAliases:(NSDictionary * _Nonnull)aliases; +- (void)removeAlias:(NSString * _Nonnull)label; +- (void)removeAliases:(NSArray * _Nonnull)labels; +- (void)addTagWithKey:(NSString * _Nonnull)key value:(NSString * _Nonnull)value; +- (void)addTags:(NSDictionary * _Nonnull)tags; +- (void)removeTag:(NSString * _Nonnull)tag; +- (void)removeTags:(NSArray * _Nonnull)tags; +- (void)addEmail:(NSString * _Nonnull)email; +- (void)removeEmail:(NSString * _Nonnull)email; +- (void)addSms:(NSString * _Nonnull)number; +- (void)removeSms:(NSString * _Nonnull)number; +- (void)setLanguage:(NSString * _Nonnull)language; +- (void)onJwtExpiredWithExpiredHandler:(void (^ _Nonnull)(NSString * _Nonnull, SWIFT_NOESCAPE void (^ _Nonnull)(NSString * _Nonnull)))expiredHandler; +@end + + + +SWIFT_CLASS("_TtC13OneSignalUser24OneSignalUserManagerImpl") +@interface OneSignalUserManagerImpl : NSObject +SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) OneSignalUserManagerImpl * _Nonnull sharedInstance;) ++ (OneSignalUserManagerImpl * _Nonnull)sharedInstance SWIFT_WARN_UNUSED_RESULT; +@property (nonatomic, readonly, copy) NSString * _Nullable onesignalId; +@property (nonatomic, readonly, copy) NSString * _Nullable pushSubscriptionId; +@property (nonatomic, readonly, copy) NSString * _Nullable language; +@property (nonatomic) BOOL requiresUserAuth; +- (nonnull instancetype)init SWIFT_UNAVAILABLE; ++ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); +- (void)start; +- (void)loginWithExternalId:(NSString * _Nonnull)externalId token:(NSString * _Nullable)token; +/// The SDK needs to have a user at all times, so this method will create a new anonymous user. If the current user is already anonymous, calling logout results in a no-op. +- (void)logout; +- (void)clearAllModelsFromStores; +- (NSDictionary * _Nullable)getTags SWIFT_WARN_UNUSED_RESULT; +- (void)setLocationWithLatitude:(float)latitude longitude:(float)longitude; +- (void)sendPurchases:(NSArray *> * _Nonnull)purchases; +@end + + +@interface OneSignalUserManagerImpl (SWIFT_EXTENSION(OneSignalUser)) +- (void)setNotificationTypes:(int32_t)notificationTypes; +- (void)setPushToken:(NSString * _Nonnull)pushToken; +@end + +@class NSNumber; + +@interface OneSignalUserManagerImpl (SWIFT_EXTENSION(OneSignalUser)) +- (void)startNewSession; +- (void)updateSessionWithSessionCount:(NSNumber * _Nullable)sessionCount sessionTime:(NSNumber * _Nullable)sessionTime refreshDeviceMetadata:(BOOL)refreshDeviceMetadata sendImmediately:(BOOL)sendImmediately onSuccess:(void (^ _Nullable)(void))onSuccess onFailure:(void (^ _Nullable)(void))onFailure; +/// App has been backgrounded. Run background tasks such to flush the operation repo and hydrating models. +/// Need to consider app killed vs app backgrounded and handle gracefully. +- (void)runBackgroundTasks; +@end + + +@interface OneSignalUserManagerImpl (SWIFT_EXTENSION(OneSignalUser)) +- (void)addObserver:(id _Nonnull)observer; +- (void)removeObserver:(id _Nonnull)observer; +@property (nonatomic, readonly, copy) NSString * _Nullable id; +@property (nonatomic, readonly, copy) NSString * _Nullable token; +@property (nonatomic, readonly) BOOL optedIn; +/// Enable the push subscription, and prompts if needed. optedIn can still be false after optIn() is called if permission is not granted. +- (void)optIn; +- (void)optOut; +@end + + +@interface OneSignalUserManagerImpl (SWIFT_EXTENSION(OneSignalUser)) +- (void)onJwtExpiredWithExpiredHandler:(void (^ _Nonnull)(NSString * _Nonnull, SWIFT_NOESCAPE void (^ _Nonnull)(NSString * _Nonnull)))expiredHandler; +@property (nonatomic, readonly, strong) id _Nonnull User; +@property (nonatomic, readonly, strong) id _Nonnull pushSubscription; +- (void)addAliasWithLabel:(NSString * _Nonnull)label id:(NSString * _Nonnull)id; +- (void)addAliases:(NSDictionary * _Nonnull)aliases; +- (void)removeAlias:(NSString * _Nonnull)label; +- (void)removeAliases:(NSArray * _Nonnull)labels; +- (void)addTagWithKey:(NSString * _Nonnull)key value:(NSString * _Nonnull)value; +- (void)addTags:(NSDictionary * _Nonnull)tags; +- (void)removeTag:(NSString * _Nonnull)tag; +- (void)removeTags:(NSArray * _Nonnull)tags; +- (void)addEmail:(NSString * _Nonnull)email; +/// If this email doesn’t already exist on the user, it cannot be removed. +/// This will be a no-op and no request will be made. +/// Error handling needs to be implemented in the future. +- (void)removeEmail:(NSString * _Nonnull)email; +- (void)addSms:(NSString * _Nonnull)number; +/// If this email doesn’t already exist on the user, it cannot be removed. +/// This will be a no-op and no request will be made. +/// Error handling needs to be implemented in the future. +- (void)removeSms:(NSString * _Nonnull)number; +- (void)setLanguage:(NSString * _Nonnull)language; +@end + +#endif +#if defined(__cplusplus) +#endif +#if __has_attribute(external_source_symbol) +# pragma clang attribute pop +#endif +#pragma clang diagnostic pop +#endif + +#elif defined(__x86_64__) && __x86_64__ +// Generated by Apple Swift version 5.7.1 (swiftlang-5.7.1.135.3 clang-1400.0.29.51) +#ifndef ONESIGNALUSER_SWIFT_H +#define ONESIGNALUSER_SWIFT_H +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wgcc-compat" + +#if !defined(__has_include) +# define __has_include(x) 0 +#endif +#if !defined(__has_attribute) +# define __has_attribute(x) 0 +#endif +#if !defined(__has_feature) +# define __has_feature(x) 0 +#endif +#if !defined(__has_warning) +# define __has_warning(x) 0 +#endif + +#if __has_include() +# include +#endif + +#pragma clang diagnostic ignored "-Wduplicate-method-match" +#pragma clang diagnostic ignored "-Wauto-import" +#if defined(__OBJC__) +#include +#endif +#if defined(__cplusplus) +#include +#include +#include +#else +#include +#include +#include +#endif + +#if !defined(SWIFT_TYPEDEFS) +# define SWIFT_TYPEDEFS 1 +# if __has_include() +# include +# elif !defined(__cplusplus) +typedef uint_least16_t char16_t; +typedef uint_least32_t char32_t; +# endif +typedef float swift_float2 __attribute__((__ext_vector_type__(2))); +typedef float swift_float3 __attribute__((__ext_vector_type__(3))); +typedef float swift_float4 __attribute__((__ext_vector_type__(4))); +typedef double swift_double2 __attribute__((__ext_vector_type__(2))); +typedef double swift_double3 __attribute__((__ext_vector_type__(3))); +typedef double swift_double4 __attribute__((__ext_vector_type__(4))); +typedef int swift_int2 __attribute__((__ext_vector_type__(2))); +typedef int swift_int3 __attribute__((__ext_vector_type__(3))); +typedef int swift_int4 __attribute__((__ext_vector_type__(4))); +typedef unsigned int swift_uint2 __attribute__((__ext_vector_type__(2))); +typedef unsigned int swift_uint3 __attribute__((__ext_vector_type__(3))); +typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4))); +#endif + +#if !defined(SWIFT_PASTE) +# define SWIFT_PASTE_HELPER(x, y) x##y +# define SWIFT_PASTE(x, y) SWIFT_PASTE_HELPER(x, y) +#endif +#if !defined(SWIFT_METATYPE) +# define SWIFT_METATYPE(X) Class +#endif +#if !defined(SWIFT_CLASS_PROPERTY) +# if __has_feature(objc_class_property) +# define SWIFT_CLASS_PROPERTY(...) __VA_ARGS__ +# else +# define SWIFT_CLASS_PROPERTY(...) +# endif +#endif + +#if __has_attribute(objc_runtime_name) +# define SWIFT_RUNTIME_NAME(X) __attribute__((objc_runtime_name(X))) +#else +# define SWIFT_RUNTIME_NAME(X) +#endif +#if __has_attribute(swift_name) +# define SWIFT_COMPILE_NAME(X) __attribute__((swift_name(X))) +#else +# define SWIFT_COMPILE_NAME(X) +#endif +#if __has_attribute(objc_method_family) +# define SWIFT_METHOD_FAMILY(X) __attribute__((objc_method_family(X))) +#else +# define SWIFT_METHOD_FAMILY(X) +#endif +#if __has_attribute(noescape) +# define SWIFT_NOESCAPE __attribute__((noescape)) +#else +# define SWIFT_NOESCAPE +#endif +#if __has_attribute(ns_consumed) +# define SWIFT_RELEASES_ARGUMENT __attribute__((ns_consumed)) +#else +# define SWIFT_RELEASES_ARGUMENT +#endif +#if __has_attribute(warn_unused_result) +# define SWIFT_WARN_UNUSED_RESULT __attribute__((warn_unused_result)) +#else +# define SWIFT_WARN_UNUSED_RESULT +#endif +#if __has_attribute(noreturn) +# define SWIFT_NORETURN __attribute__((noreturn)) +#else +# define SWIFT_NORETURN +#endif +#if !defined(SWIFT_CLASS_EXTRA) +# define SWIFT_CLASS_EXTRA +#endif +#if !defined(SWIFT_PROTOCOL_EXTRA) +# define SWIFT_PROTOCOL_EXTRA +#endif +#if !defined(SWIFT_ENUM_EXTRA) +# define SWIFT_ENUM_EXTRA +#endif +#if !defined(SWIFT_CLASS) +# if __has_attribute(objc_subclassing_restricted) +# define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_CLASS_EXTRA +# define SWIFT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA +# else +# define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA +# define SWIFT_CLASS_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA +# endif +#endif +#if !defined(SWIFT_RESILIENT_CLASS) +# if __has_attribute(objc_class_stub) +# define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME) __attribute__((objc_class_stub)) +# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_class_stub)) SWIFT_CLASS_NAMED(SWIFT_NAME) +# else +# define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME) +# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) SWIFT_CLASS_NAMED(SWIFT_NAME) +# endif +#endif + +#if !defined(SWIFT_PROTOCOL) +# define SWIFT_PROTOCOL(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA +# define SWIFT_PROTOCOL_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA +#endif + +#if !defined(SWIFT_EXTENSION) +# define SWIFT_EXTENSION(M) SWIFT_PASTE(M##_Swift_, __LINE__) +#endif + +#if !defined(OBJC_DESIGNATED_INITIALIZER) +# if __has_attribute(objc_designated_initializer) +# define OBJC_DESIGNATED_INITIALIZER __attribute__((objc_designated_initializer)) +# else +# define OBJC_DESIGNATED_INITIALIZER +# endif +#endif +#if !defined(SWIFT_ENUM_ATTR) +# if defined(__has_attribute) && __has_attribute(enum_extensibility) +# define SWIFT_ENUM_ATTR(_extensibility) __attribute__((enum_extensibility(_extensibility))) +# else +# define SWIFT_ENUM_ATTR(_extensibility) +# endif +#endif +#if !defined(SWIFT_ENUM) +# define SWIFT_ENUM(_type, _name, _extensibility) enum _name : _type _name; enum SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type +# if __has_feature(generalized_swift_name) +# define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) enum _name : _type _name SWIFT_COMPILE_NAME(SWIFT_NAME); enum SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type +# else +# define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) SWIFT_ENUM(_type, _name, _extensibility) +# endif +#endif +#if !defined(SWIFT_UNAVAILABLE) +# define SWIFT_UNAVAILABLE __attribute__((unavailable)) +#endif +#if !defined(SWIFT_UNAVAILABLE_MSG) +# define SWIFT_UNAVAILABLE_MSG(msg) __attribute__((unavailable(msg))) +#endif +#if !defined(SWIFT_AVAILABILITY) +# define SWIFT_AVAILABILITY(plat, ...) __attribute__((availability(plat, __VA_ARGS__))) +#endif +#if !defined(SWIFT_WEAK_IMPORT) +# define SWIFT_WEAK_IMPORT __attribute__((weak_import)) +#endif +#if !defined(SWIFT_DEPRECATED) +# define SWIFT_DEPRECATED __attribute__((deprecated)) +#endif +#if !defined(SWIFT_DEPRECATED_MSG) +# define SWIFT_DEPRECATED_MSG(...) __attribute__((deprecated(__VA_ARGS__))) +#endif +#if __has_feature(attribute_diagnose_if_objc) +# define SWIFT_DEPRECATED_OBJC(Msg) __attribute__((diagnose_if(1, Msg, "warning"))) +#else +# define SWIFT_DEPRECATED_OBJC(Msg) SWIFT_DEPRECATED_MSG(Msg) +#endif +#if defined(__OBJC__) +#if !defined(IBSegueAction) +# define IBSegueAction +#endif +#endif +#if !defined(SWIFT_EXTERN) +# if defined(__cplusplus) +# define SWIFT_EXTERN extern "C" +# else +# define SWIFT_EXTERN extern +# endif +#endif +#if !defined(SWIFT_CALL) +# define SWIFT_CALL __attribute__((swiftcall)) +#endif +#if defined(__cplusplus) +#if !defined(SWIFT_NOEXCEPT) +# define SWIFT_NOEXCEPT noexcept +#endif +#else +#if !defined(SWIFT_NOEXCEPT) +# define SWIFT_NOEXCEPT +#endif +#endif +#if defined(__cplusplus) +#if !defined(SWIFT_CXX_INT_DEFINED) +#define SWIFT_CXX_INT_DEFINED +namespace swift { +using Int = ptrdiff_t; +using UInt = size_t; +} +#endif +#endif +#if defined(__OBJC__) +#if __has_feature(modules) +#if __has_warning("-Watimport-in-framework-header") +#pragma clang diagnostic ignored "-Watimport-in-framework-header" +#endif +@import Foundation; +@import ObjectiveC; +@import OneSignalNotifications; +#endif + +#endif +#pragma clang diagnostic ignored "-Wproperty-attribute-mismatch" +#pragma clang diagnostic ignored "-Wduplicate-method-arg" +#if __has_warning("-Wpragma-clang-attribute") +# pragma clang diagnostic ignored "-Wpragma-clang-attribute" +#endif +#pragma clang diagnostic ignored "-Wunknown-pragmas" +#pragma clang diagnostic ignored "-Wnullability" +#pragma clang diagnostic ignored "-Wdollar-in-identifier-extension" + +#if __has_attribute(external_source_symbol) +# pragma push_macro("any") +# undef any +# pragma clang attribute push(__attribute__((external_source_symbol(language="Swift", defined_in="OneSignalUser",generated_declaration))), apply_to=any(function,enum,objc_interface,objc_category,objc_protocol)) +# pragma pop_macro("any") +#endif + +#if defined(__OBJC__) +@class NSString; +@protocol OSPushSubscriptionObserver; + +/// This is the push subscription interface exposed to the public. +SWIFT_PROTOCOL("_TtP13OneSignalUser18OSPushSubscription_") +@protocol OSPushSubscription +@property (nonatomic, readonly, copy) NSString * _Nullable id; +@property (nonatomic, readonly, copy) NSString * _Nullable token; +@property (nonatomic, readonly) BOOL optedIn; +- (void)optIn; +- (void)optOut; +- (void)addObserver:(id _Nonnull)observer; +- (void)removeObserver:(id _Nonnull)observer; +@end + +@class OSPushSubscriptionState; +@class NSDictionary; + +SWIFT_CLASS("_TtC13OneSignalUser30OSPushSubscriptionChangedState") +@interface OSPushSubscriptionChangedState : NSObject +@property (nonatomic, readonly, strong) OSPushSubscriptionState * _Nonnull current; +@property (nonatomic, readonly, strong) OSPushSubscriptionState * _Nonnull previous; +@property (nonatomic, readonly, copy) NSString * _Nonnull description; +- (NSDictionary * _Nonnull)jsonRepresentation SWIFT_WARN_UNUSED_RESULT; +- (nonnull instancetype)init SWIFT_UNAVAILABLE; ++ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); +@end + + +SWIFT_PROTOCOL("_TtP13OneSignalUser26OSPushSubscriptionObserver_") +@protocol OSPushSubscriptionObserver +- (void)onPushSubscriptionDidChangeWithState:(OSPushSubscriptionChangedState * _Nonnull)state; +@end + + +SWIFT_CLASS("_TtC13OneSignalUser23OSPushSubscriptionState") +@interface OSPushSubscriptionState : NSObject +@property (nonatomic, readonly, copy) NSString * _Nullable id; +@property (nonatomic, readonly, copy) NSString * _Nullable token; +@property (nonatomic, readonly) BOOL optedIn; +@property (nonatomic, readonly, copy) NSString * _Nonnull description; +- (NSDictionary * _Nonnull)jsonRepresentation SWIFT_WARN_UNUSED_RESULT; +- (nonnull instancetype)init SWIFT_UNAVAILABLE; ++ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); +@end + + +/// This is the user interface exposed to the public. +SWIFT_PROTOCOL("_TtP13OneSignalUser6OSUser_") +@protocol OSUser +@property (nonatomic, readonly, strong) id _Nonnull pushSubscription; +- (void)addAliasWithLabel:(NSString * _Nonnull)label id:(NSString * _Nonnull)id; +- (void)addAliases:(NSDictionary * _Nonnull)aliases; +- (void)removeAlias:(NSString * _Nonnull)label; +- (void)removeAliases:(NSArray * _Nonnull)labels; +- (void)addTagWithKey:(NSString * _Nonnull)key value:(NSString * _Nonnull)value; +- (void)addTags:(NSDictionary * _Nonnull)tags; +- (void)removeTag:(NSString * _Nonnull)tag; +- (void)removeTags:(NSArray * _Nonnull)tags; +- (void)addEmail:(NSString * _Nonnull)email; +- (void)removeEmail:(NSString * _Nonnull)email; +- (void)addSms:(NSString * _Nonnull)number; +- (void)removeSms:(NSString * _Nonnull)number; +- (void)setLanguage:(NSString * _Nonnull)language; +- (void)onJwtExpiredWithExpiredHandler:(void (^ _Nonnull)(NSString * _Nonnull, SWIFT_NOESCAPE void (^ _Nonnull)(NSString * _Nonnull)))expiredHandler; +@end + + + +SWIFT_CLASS("_TtC13OneSignalUser24OneSignalUserManagerImpl") +@interface OneSignalUserManagerImpl : NSObject +SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) OneSignalUserManagerImpl * _Nonnull sharedInstance;) ++ (OneSignalUserManagerImpl * _Nonnull)sharedInstance SWIFT_WARN_UNUSED_RESULT; +@property (nonatomic, readonly, copy) NSString * _Nullable onesignalId; +@property (nonatomic, readonly, copy) NSString * _Nullable pushSubscriptionId; +@property (nonatomic, readonly, copy) NSString * _Nullable language; +@property (nonatomic) BOOL requiresUserAuth; +- (nonnull instancetype)init SWIFT_UNAVAILABLE; ++ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); +- (void)start; +- (void)loginWithExternalId:(NSString * _Nonnull)externalId token:(NSString * _Nullable)token; +/// The SDK needs to have a user at all times, so this method will create a new anonymous user. If the current user is already anonymous, calling logout results in a no-op. +- (void)logout; +- (void)clearAllModelsFromStores; +- (NSDictionary * _Nullable)getTags SWIFT_WARN_UNUSED_RESULT; +- (void)setLocationWithLatitude:(float)latitude longitude:(float)longitude; +- (void)sendPurchases:(NSArray *> * _Nonnull)purchases; +@end + + +@interface OneSignalUserManagerImpl (SWIFT_EXTENSION(OneSignalUser)) +- (void)setNotificationTypes:(int32_t)notificationTypes; +- (void)setPushToken:(NSString * _Nonnull)pushToken; +@end + +@class NSNumber; + +@interface OneSignalUserManagerImpl (SWIFT_EXTENSION(OneSignalUser)) +- (void)startNewSession; +- (void)updateSessionWithSessionCount:(NSNumber * _Nullable)sessionCount sessionTime:(NSNumber * _Nullable)sessionTime refreshDeviceMetadata:(BOOL)refreshDeviceMetadata sendImmediately:(BOOL)sendImmediately onSuccess:(void (^ _Nullable)(void))onSuccess onFailure:(void (^ _Nullable)(void))onFailure; +/// App has been backgrounded. Run background tasks such to flush the operation repo and hydrating models. +/// Need to consider app killed vs app backgrounded and handle gracefully. +- (void)runBackgroundTasks; +@end + + +@interface OneSignalUserManagerImpl (SWIFT_EXTENSION(OneSignalUser)) +- (void)addObserver:(id _Nonnull)observer; +- (void)removeObserver:(id _Nonnull)observer; +@property (nonatomic, readonly, copy) NSString * _Nullable id; +@property (nonatomic, readonly, copy) NSString * _Nullable token; +@property (nonatomic, readonly) BOOL optedIn; +/// Enable the push subscription, and prompts if needed. optedIn can still be false after optIn() is called if permission is not granted. +- (void)optIn; +- (void)optOut; +@end + + +@interface OneSignalUserManagerImpl (SWIFT_EXTENSION(OneSignalUser)) +- (void)onJwtExpiredWithExpiredHandler:(void (^ _Nonnull)(NSString * _Nonnull, SWIFT_NOESCAPE void (^ _Nonnull)(NSString * _Nonnull)))expiredHandler; +@property (nonatomic, readonly, strong) id _Nonnull User; +@property (nonatomic, readonly, strong) id _Nonnull pushSubscription; +- (void)addAliasWithLabel:(NSString * _Nonnull)label id:(NSString * _Nonnull)id; +- (void)addAliases:(NSDictionary * _Nonnull)aliases; +- (void)removeAlias:(NSString * _Nonnull)label; +- (void)removeAliases:(NSArray * _Nonnull)labels; +- (void)addTagWithKey:(NSString * _Nonnull)key value:(NSString * _Nonnull)value; +- (void)addTags:(NSDictionary * _Nonnull)tags; +- (void)removeTag:(NSString * _Nonnull)tag; +- (void)removeTags:(NSArray * _Nonnull)tags; +- (void)addEmail:(NSString * _Nonnull)email; +/// If this email doesn’t already exist on the user, it cannot be removed. +/// This will be a no-op and no request will be made. +/// Error handling needs to be implemented in the future. +- (void)removeEmail:(NSString * _Nonnull)email; +- (void)addSms:(NSString * _Nonnull)number; +/// If this email doesn’t already exist on the user, it cannot be removed. +/// This will be a no-op and no request will be made. +/// Error handling needs to be implemented in the future. +- (void)removeSms:(NSString * _Nonnull)number; +- (void)setLanguage:(NSString * _Nonnull)language; +@end + +#endif +#if defined(__cplusplus) +#endif +#if __has_attribute(external_source_symbol) +# pragma clang attribute pop +#endif +#pragma clang diagnostic pop +#endif + +#else +#error unsupported Swift architecture +#endif diff --git a/iOS_SDK/OneSignalSDK/OneSignal_User/OneSignalUser.xcframework/ios-arm64_x86_64-simulator/OneSignalUser.framework/Headers/OneSignalUser.h b/iOS_SDK/OneSignalSDK/OneSignal_User/OneSignalUser.xcframework/ios-arm64_x86_64-simulator/OneSignalUser.framework/Headers/OneSignalUser.h new file mode 100644 index 000000000..e677dada3 --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignal_User/OneSignalUser.xcframework/ios-arm64_x86_64-simulator/OneSignalUser.framework/Headers/OneSignalUser.h @@ -0,0 +1,34 @@ +/* + Modified MIT License + + Copyright 2022 OneSignal + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + 1. The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + 2. All copies of substantial portions of the Software may only be used in connection + with services provided by OneSignal. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + */ + +#import + +//! Project version number for OneSignalUser. +FOUNDATION_EXPORT double OneSignalUserVersionNumber; + +//! Project version string for OneSignalUser. +FOUNDATION_EXPORT const unsigned char OneSignalUserVersionString[]; diff --git a/iOS_SDK/OneSignalSDK/OneSignal_User/OneSignalUser.xcframework/ios-arm64_x86_64-simulator/OneSignalUser.framework/Info.plist b/iOS_SDK/OneSignalSDK/OneSignal_User/OneSignalUser.xcframework/ios-arm64_x86_64-simulator/OneSignalUser.framework/Info.plist new file mode 100644 index 000000000..18486ac9b Binary files /dev/null and b/iOS_SDK/OneSignalSDK/OneSignal_User/OneSignalUser.xcframework/ios-arm64_x86_64-simulator/OneSignalUser.framework/Info.plist differ diff --git a/iOS_SDK/OneSignalSDK/OneSignal_User/OneSignalUser.xcframework/ios-arm64_x86_64-simulator/OneSignalUser.framework/Modules/OneSignalUser.swiftmodule/arm64-apple-ios-simulator.abi.json b/iOS_SDK/OneSignalSDK/OneSignal_User/OneSignalUser.xcframework/ios-arm64_x86_64-simulator/OneSignalUser.framework/Modules/OneSignalUser.swiftmodule/arm64-apple-ios-simulator.abi.json new file mode 100644 index 000000000..9e99e9246 --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignal_User/OneSignalUser.xcframework/ios-arm64_x86_64-simulator/OneSignalUser.framework/Modules/OneSignalUser.swiftmodule/arm64-apple-ios-simulator.abi.json @@ -0,0 +1,4152 @@ +{ + "ABIRoot": { + "kind": "Root", + "name": "TopLevel", + "printedName": "TopLevel", + "children": [ + { + "kind": "Import", + "name": "Foundation", + "printedName": "Foundation", + "declKind": "Import", + "moduleName": "OneSignalUser", + "declAttributes": [ + "RawDocComment" + ] + }, + { + "kind": "Import", + "name": "OneSignalCore", + "printedName": "OneSignalCore", + "declKind": "Import", + "moduleName": "OneSignalUser" + }, + { + "kind": "Import", + "name": "OneSignalOSCore", + "printedName": "OneSignalOSCore", + "declKind": "Import", + "moduleName": "OneSignalUser" + }, + { + "kind": "Import", + "name": "OneSignalCore", + "printedName": "OneSignalCore", + "declKind": "Import", + "moduleName": "OneSignalUser", + "declAttributes": [ + "RawDocComment" + ] + }, + { + "kind": "Import", + "name": "OneSignalOSCore", + "printedName": "OneSignalOSCore", + "declKind": "Import", + "moduleName": "OneSignalUser" + }, + { + "kind": "Import", + "name": "OneSignalNotifications", + "printedName": "OneSignalNotifications", + "declKind": "Import", + "moduleName": "OneSignalUser" + }, + { + "kind": "TypeDecl", + "name": "OSUser", + "printedName": "OSUser", + "children": [ + { + "kind": "Var", + "name": "pushSubscription", + "printedName": "pushSubscription", + "children": [ + { + "kind": "TypeNominal", + "name": "OSPushSubscription", + "printedName": "OneSignalUser.OSPushSubscription", + "usr": "c:@M@OneSignalUser@objc(pl)OSPushSubscription" + } + ], + "declKind": "Var", + "usr": "c:@M@OneSignalUser@objc(pl)OSUser(py)pushSubscription", + "mangledName": "$s13OneSignalUser6OSUserP16pushSubscriptionAA06OSPushF0_pvp", + "moduleName": "OneSignalUser", + "protocolReq": true, + "declAttributes": [ + "ObjC" + ], + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "OSPushSubscription", + "printedName": "OneSignalUser.OSPushSubscription", + "usr": "c:@M@OneSignalUser@objc(pl)OSPushSubscription" + } + ], + "declKind": "Accessor", + "usr": "c:@M@OneSignalUser@objc(pl)OSUser(im)pushSubscription", + "mangledName": "$s13OneSignalUser6OSUserP16pushSubscriptionAA06OSPushF0_pvg", + "moduleName": "OneSignalUser", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalUser.OSUser>", + "sugared_genericSig": "", + "protocolReq": true, + "declAttributes": [ + "ObjC" + ], + "reqNewWitnessTableEntry": true, + "accessorKind": "get" + } + ] + }, + { + "kind": "Function", + "name": "addAlias", + "printedName": "addAlias(label:id:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Func", + "usr": "c:@M@OneSignalUser@objc(pl)OSUser(im)addAliasWithLabel:id:", + "mangledName": "$s13OneSignalUser6OSUserP8addAlias5label2idySS_SStF", + "moduleName": "OneSignalUser", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalUser.OSUser>", + "sugared_genericSig": "", + "protocolReq": true, + "declAttributes": [ + "RawDocComment", + "ObjC" + ], + "reqNewWitnessTableEntry": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "addAliases", + "printedName": "addAliases(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "Dictionary", + "printedName": "[Swift.String : Swift.String]", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:SD" + } + ], + "declKind": "Func", + "usr": "c:@M@OneSignalUser@objc(pl)OSUser(im)addAliases:", + "mangledName": "$s13OneSignalUser6OSUserP10addAliasesyySDyS2SGF", + "moduleName": "OneSignalUser", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalUser.OSUser>", + "sugared_genericSig": "", + "protocolReq": true, + "declAttributes": [ + "ObjC" + ], + "reqNewWitnessTableEntry": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "removeAlias", + "printedName": "removeAlias(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Func", + "usr": "c:@M@OneSignalUser@objc(pl)OSUser(im)removeAlias:", + "mangledName": "$s13OneSignalUser6OSUserP11removeAliasyySSF", + "moduleName": "OneSignalUser", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalUser.OSUser>", + "sugared_genericSig": "", + "protocolReq": true, + "declAttributes": [ + "ObjC" + ], + "reqNewWitnessTableEntry": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "removeAliases", + "printedName": "removeAliases(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "Array", + "printedName": "[Swift.String]", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:Sa" + } + ], + "declKind": "Func", + "usr": "c:@M@OneSignalUser@objc(pl)OSUser(im)removeAliases:", + "mangledName": "$s13OneSignalUser6OSUserP13removeAliasesyySaySSGF", + "moduleName": "OneSignalUser", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalUser.OSUser>", + "sugared_genericSig": "", + "protocolReq": true, + "declAttributes": [ + "ObjC" + ], + "reqNewWitnessTableEntry": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "addTag", + "printedName": "addTag(key:value:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Func", + "usr": "c:@M@OneSignalUser@objc(pl)OSUser(im)addTagWithKey:value:", + "mangledName": "$s13OneSignalUser6OSUserP6addTag3key5valueySS_SStF", + "moduleName": "OneSignalUser", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalUser.OSUser>", + "sugared_genericSig": "", + "protocolReq": true, + "declAttributes": [ + "RawDocComment", + "ObjC" + ], + "reqNewWitnessTableEntry": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "addTags", + "printedName": "addTags(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "Dictionary", + "printedName": "[Swift.String : Swift.String]", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:SD" + } + ], + "declKind": "Func", + "usr": "c:@M@OneSignalUser@objc(pl)OSUser(im)addTags:", + "mangledName": "$s13OneSignalUser6OSUserP7addTagsyySDyS2SGF", + "moduleName": "OneSignalUser", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalUser.OSUser>", + "sugared_genericSig": "", + "protocolReq": true, + "declAttributes": [ + "ObjC" + ], + "reqNewWitnessTableEntry": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "removeTag", + "printedName": "removeTag(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Func", + "usr": "c:@M@OneSignalUser@objc(pl)OSUser(im)removeTag:", + "mangledName": "$s13OneSignalUser6OSUserP9removeTagyySSF", + "moduleName": "OneSignalUser", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalUser.OSUser>", + "sugared_genericSig": "", + "protocolReq": true, + "declAttributes": [ + "ObjC" + ], + "reqNewWitnessTableEntry": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "removeTags", + "printedName": "removeTags(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "Array", + "printedName": "[Swift.String]", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:Sa" + } + ], + "declKind": "Func", + "usr": "c:@M@OneSignalUser@objc(pl)OSUser(im)removeTags:", + "mangledName": "$s13OneSignalUser6OSUserP10removeTagsyySaySSGF", + "moduleName": "OneSignalUser", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalUser.OSUser>", + "sugared_genericSig": "", + "protocolReq": true, + "declAttributes": [ + "ObjC" + ], + "reqNewWitnessTableEntry": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "addEmail", + "printedName": "addEmail(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Func", + "usr": "c:@M@OneSignalUser@objc(pl)OSUser(im)addEmail:", + "mangledName": "$s13OneSignalUser6OSUserP8addEmailyySSF", + "moduleName": "OneSignalUser", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalUser.OSUser>", + "sugared_genericSig": "", + "protocolReq": true, + "declAttributes": [ + "RawDocComment", + "ObjC" + ], + "reqNewWitnessTableEntry": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "removeEmail", + "printedName": "removeEmail(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Func", + "usr": "c:@M@OneSignalUser@objc(pl)OSUser(im)removeEmail:", + "mangledName": "$s13OneSignalUser6OSUserP11removeEmailyySSF", + "moduleName": "OneSignalUser", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalUser.OSUser>", + "sugared_genericSig": "", + "protocolReq": true, + "declAttributes": [ + "ObjC" + ], + "reqNewWitnessTableEntry": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "addSms", + "printedName": "addSms(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Func", + "usr": "c:@M@OneSignalUser@objc(pl)OSUser(im)addSms:", + "mangledName": "$s13OneSignalUser6OSUserP6addSmsyySSF", + "moduleName": "OneSignalUser", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalUser.OSUser>", + "sugared_genericSig": "", + "protocolReq": true, + "declAttributes": [ + "RawDocComment", + "ObjC" + ], + "reqNewWitnessTableEntry": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "removeSms", + "printedName": "removeSms(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Func", + "usr": "c:@M@OneSignalUser@objc(pl)OSUser(im)removeSms:", + "mangledName": "$s13OneSignalUser6OSUserP9removeSmsyySSF", + "moduleName": "OneSignalUser", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalUser.OSUser>", + "sugared_genericSig": "", + "protocolReq": true, + "declAttributes": [ + "ObjC" + ], + "reqNewWitnessTableEntry": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "setLanguage", + "printedName": "setLanguage(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Func", + "usr": "c:@M@OneSignalUser@objc(pl)OSUser(im)setLanguage:", + "mangledName": "$s13OneSignalUser6OSUserP11setLanguageyySSF", + "moduleName": "OneSignalUser", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalUser.OSUser>", + "sugared_genericSig": "", + "protocolReq": true, + "declAttributes": [ + "RawDocComment", + "ObjC" + ], + "reqNewWitnessTableEntry": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "onJwtExpired", + "printedName": "onJwtExpired(expiredHandler:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeFunc", + "name": "Function", + "printedName": "(Swift.String, (Swift.String) -> ()) -> ()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "Tuple", + "printedName": "(Swift.String, (Swift.String) -> ())", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + }, + { + "kind": "TypeFunc", + "name": "Function", + "printedName": "(Swift.String) -> ()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "typeAttributes": [ + "noescape" + ] + } + ] + } + ] + } + ], + "declKind": "Func", + "usr": "c:@M@OneSignalUser@objc(pl)OSUser(im)onJwtExpiredWithExpiredHandler:", + "mangledName": "$s13OneSignalUser6OSUserP12onJwtExpired14expiredHandleryySS_ySSXEtc_tF", + "moduleName": "OneSignalUser", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalUser.OSUser>", + "sugared_genericSig": "", + "protocolReq": true, + "declAttributes": [ + "ObjC" + ], + "reqNewWitnessTableEntry": true, + "funcSelfKind": "NonMutating" + } + ], + "declKind": "Protocol", + "usr": "c:@M@OneSignalUser@objc(pl)OSUser", + "mangledName": "$s13OneSignalUser6OSUserP", + "moduleName": "OneSignalUser", + "genericSig": "<τ_0_0 : AnyObject>", + "sugared_genericSig": "", + "declAttributes": [ + "AccessControl", + "ObjC", + "RawDocComment" + ] + }, + { + "kind": "TypeDecl", + "name": "OSPushSubscription", + "printedName": "OSPushSubscription", + "children": [ + { + "kind": "Var", + "name": "id", + "printedName": "id", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "Swift.String?", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Var", + "usr": "c:@M@OneSignalUser@objc(pl)OSPushSubscription(py)id", + "mangledName": "$s13OneSignalUser18OSPushSubscriptionP2idSSSgvp", + "moduleName": "OneSignalUser", + "protocolReq": true, + "declAttributes": [ + "ObjC" + ], + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "Swift.String?", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Accessor", + "usr": "c:@M@OneSignalUser@objc(pl)OSPushSubscription(im)id", + "mangledName": "$s13OneSignalUser18OSPushSubscriptionP2idSSSgvg", + "moduleName": "OneSignalUser", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalUser.OSPushSubscription>", + "sugared_genericSig": "", + "protocolReq": true, + "declAttributes": [ + "ObjC" + ], + "reqNewWitnessTableEntry": true, + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "token", + "printedName": "token", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "Swift.String?", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Var", + "usr": "c:@M@OneSignalUser@objc(pl)OSPushSubscription(py)token", + "mangledName": "$s13OneSignalUser18OSPushSubscriptionP5tokenSSSgvp", + "moduleName": "OneSignalUser", + "protocolReq": true, + "declAttributes": [ + "ObjC" + ], + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "Swift.String?", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Accessor", + "usr": "c:@M@OneSignalUser@objc(pl)OSPushSubscription(im)token", + "mangledName": "$s13OneSignalUser18OSPushSubscriptionP5tokenSSSgvg", + "moduleName": "OneSignalUser", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalUser.OSPushSubscription>", + "sugared_genericSig": "", + "protocolReq": true, + "declAttributes": [ + "ObjC" + ], + "reqNewWitnessTableEntry": true, + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "optedIn", + "printedName": "optedIn", + "children": [ + { + "kind": "TypeNominal", + "name": "Bool", + "printedName": "Swift.Bool", + "usr": "s:Sb" + } + ], + "declKind": "Var", + "usr": "c:@M@OneSignalUser@objc(pl)OSPushSubscription(py)optedIn", + "mangledName": "$s13OneSignalUser18OSPushSubscriptionP7optedInSbvp", + "moduleName": "OneSignalUser", + "protocolReq": true, + "declAttributes": [ + "ObjC" + ], + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "Bool", + "printedName": "Swift.Bool", + "usr": "s:Sb" + } + ], + "declKind": "Accessor", + "usr": "c:@M@OneSignalUser@objc(pl)OSPushSubscription(im)optedIn", + "mangledName": "$s13OneSignalUser18OSPushSubscriptionP7optedInSbvg", + "moduleName": "OneSignalUser", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalUser.OSPushSubscription>", + "sugared_genericSig": "", + "protocolReq": true, + "declAttributes": [ + "ObjC" + ], + "reqNewWitnessTableEntry": true, + "accessorKind": "get" + } + ] + }, + { + "kind": "Function", + "name": "optIn", + "printedName": "optIn()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + } + ], + "declKind": "Func", + "usr": "c:@M@OneSignalUser@objc(pl)OSPushSubscription(im)optIn", + "mangledName": "$s13OneSignalUser18OSPushSubscriptionP5optInyyF", + "moduleName": "OneSignalUser", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalUser.OSPushSubscription>", + "sugared_genericSig": "", + "protocolReq": true, + "declAttributes": [ + "ObjC" + ], + "reqNewWitnessTableEntry": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "optOut", + "printedName": "optOut()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + } + ], + "declKind": "Func", + "usr": "c:@M@OneSignalUser@objc(pl)OSPushSubscription(im)optOut", + "mangledName": "$s13OneSignalUser18OSPushSubscriptionP6optOutyyF", + "moduleName": "OneSignalUser", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalUser.OSPushSubscription>", + "sugared_genericSig": "", + "protocolReq": true, + "declAttributes": [ + "ObjC" + ], + "reqNewWitnessTableEntry": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "addObserver", + "printedName": "addObserver(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "OSPushSubscriptionObserver", + "printedName": "OneSignalUser.OSPushSubscriptionObserver", + "usr": "c:@M@OneSignalUser@objc(pl)OSPushSubscriptionObserver" + } + ], + "declKind": "Func", + "usr": "c:@M@OneSignalUser@objc(pl)OSPushSubscription(im)addObserver:", + "mangledName": "$s13OneSignalUser18OSPushSubscriptionP11addObserveryyAA0deG0_pF", + "moduleName": "OneSignalUser", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalUser.OSPushSubscription>", + "sugared_genericSig": "", + "protocolReq": true, + "declAttributes": [ + "ObjC" + ], + "reqNewWitnessTableEntry": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "removeObserver", + "printedName": "removeObserver(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "OSPushSubscriptionObserver", + "printedName": "OneSignalUser.OSPushSubscriptionObserver", + "usr": "c:@M@OneSignalUser@objc(pl)OSPushSubscriptionObserver" + } + ], + "declKind": "Func", + "usr": "c:@M@OneSignalUser@objc(pl)OSPushSubscription(im)removeObserver:", + "mangledName": "$s13OneSignalUser18OSPushSubscriptionP14removeObserveryyAA0deG0_pF", + "moduleName": "OneSignalUser", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalUser.OSPushSubscription>", + "sugared_genericSig": "", + "protocolReq": true, + "declAttributes": [ + "ObjC" + ], + "reqNewWitnessTableEntry": true, + "funcSelfKind": "NonMutating" + } + ], + "declKind": "Protocol", + "usr": "c:@M@OneSignalUser@objc(pl)OSPushSubscription", + "mangledName": "$s13OneSignalUser18OSPushSubscriptionP", + "moduleName": "OneSignalUser", + "genericSig": "<τ_0_0 : AnyObject>", + "sugared_genericSig": "", + "declAttributes": [ + "AccessControl", + "ObjC", + "RawDocComment" + ] + }, + { + "kind": "TypeDecl", + "name": "OneSignalUserManagerImpl", + "printedName": "OneSignalUserManagerImpl", + "children": [ + { + "kind": "Var", + "name": "sharedInstance", + "printedName": "sharedInstance", + "children": [ + { + "kind": "TypeNominal", + "name": "OneSignalUserManagerImpl", + "printedName": "OneSignalUser.OneSignalUserManagerImpl", + "usr": "c:@M@OneSignalUser@objc(cs)OneSignalUserManagerImpl" + } + ], + "declKind": "Var", + "usr": "c:@M@OneSignalUser@objc(cs)OneSignalUserManagerImpl(cpy)sharedInstance", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC14sharedInstanceACvpZ", + "moduleName": "OneSignalUser", + "static": true, + "declAttributes": [ + "HasInitialValue", + "Final", + "HasStorage", + "AccessControl", + "ObjC" + ], + "isLet": true, + "hasStorage": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "OneSignalUserManagerImpl", + "printedName": "OneSignalUser.OneSignalUserManagerImpl", + "usr": "c:@M@OneSignalUser@objc(cs)OneSignalUserManagerImpl" + } + ], + "declKind": "Accessor", + "usr": "c:@M@OneSignalUser@objc(cs)OneSignalUserManagerImpl(cm)sharedInstance", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC14sharedInstanceACvgZ", + "moduleName": "OneSignalUser", + "static": true, + "implicit": true, + "declAttributes": [ + "Final", + "ObjC" + ], + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "onesignalId", + "printedName": "onesignalId", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "Swift.String?", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Var", + "usr": "c:@M@OneSignalUser@objc(cs)OneSignalUserManagerImpl(py)onesignalId", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC11onesignalIdSSSgvp", + "moduleName": "OneSignalUser", + "declAttributes": [ + "AccessControl", + "ObjC" + ], + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "Swift.String?", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Accessor", + "usr": "c:@M@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)onesignalId", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC11onesignalIdSSSgvg", + "moduleName": "OneSignalUser", + "declAttributes": [ + "ObjC" + ], + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "pushSubscriptionId", + "printedName": "pushSubscriptionId", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "Swift.String?", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Var", + "usr": "c:@M@OneSignalUser@objc(cs)OneSignalUserManagerImpl(py)pushSubscriptionId", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC18pushSubscriptionIdSSSgvp", + "moduleName": "OneSignalUser", + "declAttributes": [ + "AccessControl", + "ObjC" + ], + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "Swift.String?", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Accessor", + "usr": "c:@M@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)pushSubscriptionId", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC18pushSubscriptionIdSSSgvg", + "moduleName": "OneSignalUser", + "declAttributes": [ + "ObjC" + ], + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "language", + "printedName": "language", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "Swift.String?", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Var", + "usr": "c:@M@OneSignalUser@objc(cs)OneSignalUserManagerImpl(py)language", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC8languageSSSgvp", + "moduleName": "OneSignalUser", + "declAttributes": [ + "AccessControl", + "ObjC" + ], + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "Swift.String?", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Accessor", + "usr": "c:@M@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)language", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC8languageSSSgvg", + "moduleName": "OneSignalUser", + "declAttributes": [ + "ObjC" + ], + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "requiresUserAuth", + "printedName": "requiresUserAuth", + "children": [ + { + "kind": "TypeNominal", + "name": "Bool", + "printedName": "Swift.Bool", + "usr": "s:Sb" + } + ], + "declKind": "Var", + "usr": "c:@M@OneSignalUser@objc(cs)OneSignalUserManagerImpl(py)requiresUserAuth", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC08requiresC4AuthSbvp", + "moduleName": "OneSignalUser", + "declAttributes": [ + "HasInitialValue", + "HasStorage", + "AccessControl", + "ObjC" + ], + "hasStorage": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "Bool", + "printedName": "Swift.Bool", + "usr": "s:Sb" + } + ], + "declKind": "Accessor", + "usr": "c:@M@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)requiresUserAuth", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC08requiresC4AuthSbvg", + "moduleName": "OneSignalUser", + "implicit": true, + "declAttributes": [ + "ObjC" + ], + "accessorKind": "get" + }, + { + "kind": "Accessor", + "name": "Set", + "printedName": "Set()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "Bool", + "printedName": "Swift.Bool", + "usr": "s:Sb" + } + ], + "declKind": "Accessor", + "usr": "c:@M@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)setRequiresUserAuth:", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC08requiresC4AuthSbvs", + "moduleName": "OneSignalUser", + "implicit": true, + "declAttributes": [ + "ObjC" + ], + "accessorKind": "set" + }, + { + "kind": "Accessor", + "name": "Modify", + "printedName": "Modify()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + } + ], + "declKind": "Accessor", + "usr": "s:13OneSignalUser0abC11ManagerImplC08requiresC4AuthSbvM", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC08requiresC4AuthSbvM", + "moduleName": "OneSignalUser", + "implicit": true, + "accessorKind": "_modify" + } + ] + }, + { + "kind": "Function", + "name": "start", + "printedName": "start()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + } + ], + "declKind": "Func", + "usr": "c:@M@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)start", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC5startyyF", + "moduleName": "OneSignalUser", + "declAttributes": [ + "AccessControl", + "ObjC", + "RawDocComment" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "login", + "printedName": "login(externalId:token:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + }, + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "Swift.String?", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Func", + "usr": "c:@M@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)loginWithExternalId:token:", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC5login10externalId5tokenySS_SSSgtF", + "moduleName": "OneSignalUser", + "objc_name": "loginWithExternalId:token:", + "declAttributes": [ + "ObjC", + "AccessControl" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "logout", + "printedName": "logout()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + } + ], + "declKind": "Func", + "usr": "c:@M@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)logout", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC6logoutyyF", + "moduleName": "OneSignalUser", + "objc_name": "logout", + "declAttributes": [ + "ObjC", + "AccessControl", + "RawDocComment" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "_logout", + "printedName": "_logout()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + } + ], + "declKind": "Func", + "usr": "s:13OneSignalUser0abC11ManagerImplC7_logoutyyF", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC7_logoutyyF", + "moduleName": "OneSignalUser", + "declAttributes": [ + "AccessControl" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "clearAllModelsFromStores", + "printedName": "clearAllModelsFromStores()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + } + ], + "declKind": "Func", + "usr": "c:@M@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)clearAllModelsFromStores", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC24clearAllModelsFromStoresyyF", + "moduleName": "OneSignalUser", + "declAttributes": [ + "AccessControl", + "ObjC" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "getTags", + "printedName": "getTags()", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "[Swift.String : Swift.String]?", + "children": [ + { + "kind": "TypeNominal", + "name": "Dictionary", + "printedName": "[Swift.String : Swift.String]", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:SD" + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Func", + "usr": "c:@M@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)getTags", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC7getTagsSDyS2SGSgyF", + "moduleName": "OneSignalUser", + "declAttributes": [ + "AccessControl", + "ObjC" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "setLocation", + "printedName": "setLocation(latitude:longitude:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "Float", + "printedName": "Swift.Float", + "usr": "s:Sf" + }, + { + "kind": "TypeNominal", + "name": "Float", + "printedName": "Swift.Float", + "usr": "s:Sf" + } + ], + "declKind": "Func", + "usr": "c:@M@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)setLocationWithLatitude:longitude:", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC11setLocation8latitude9longitudeySf_SftF", + "moduleName": "OneSignalUser", + "objc_name": "setLocationWithLatitude:longitude:", + "declAttributes": [ + "ObjC", + "AccessControl" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "sendPurchases", + "printedName": "sendPurchases(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "Array", + "printedName": "[[Swift.String : AnyObject]]", + "children": [ + { + "kind": "TypeNominal", + "name": "Dictionary", + "printedName": "[Swift.String : AnyObject]", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + }, + { + "kind": "TypeNominal", + "name": "ProtocolComposition", + "printedName": "AnyObject" + } + ], + "usr": "s:SD" + } + ], + "usr": "s:Sa" + } + ], + "declKind": "Func", + "usr": "c:@M@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)sendPurchases:", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC13sendPurchasesyySaySDySSyXlGGF", + "moduleName": "OneSignalUser", + "objc_name": "sendPurchases:", + "declAttributes": [ + "ObjC", + "AccessControl" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "startNewSession", + "printedName": "startNewSession()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + } + ], + "declKind": "Func", + "usr": "c:@CM@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)startNewSession", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC15startNewSessionyyF", + "moduleName": "OneSignalUser", + "declAttributes": [ + "Dynamic", + "AccessControl", + "ObjC" + ], + "isFromExtension": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "updateSession", + "printedName": "updateSession(sessionCount:sessionTime:refreshDeviceMetadata:sendImmediately:onSuccess:onFailure:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "Foundation.NSNumber?", + "children": [ + { + "kind": "TypeNominal", + "name": "NSNumber", + "printedName": "Foundation.NSNumber", + "usr": "c:objc(cs)NSNumber" + } + ], + "usr": "s:Sq" + }, + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "Foundation.NSNumber?", + "children": [ + { + "kind": "TypeNominal", + "name": "NSNumber", + "printedName": "Foundation.NSNumber", + "usr": "c:objc(cs)NSNumber" + } + ], + "usr": "s:Sq" + }, + { + "kind": "TypeNominal", + "name": "Bool", + "printedName": "Swift.Bool", + "usr": "s:Sb" + }, + { + "kind": "TypeNominal", + "name": "Bool", + "printedName": "Swift.Bool", + "hasDefaultArg": true, + "usr": "s:Sb" + }, + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "(() -> ())?", + "children": [ + { + "kind": "TypeFunc", + "name": "Function", + "printedName": "() -> ()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + } + ] + } + ], + "hasDefaultArg": true, + "usr": "s:Sq" + }, + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "(() -> ())?", + "children": [ + { + "kind": "TypeFunc", + "name": "Function", + "printedName": "() -> ()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + } + ] + } + ], + "hasDefaultArg": true, + "usr": "s:Sq" + } + ], + "declKind": "Func", + "usr": "c:@CM@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)updateSessionWithSessionCount:sessionTime:refreshDeviceMetadata:sendImmediately:onSuccess:onFailure:", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC13updateSession12sessionCount0H4Time21refreshDeviceMetadata15sendImmediately9onSuccess0P7FailureySo8NSNumberCSg_AMS2byycSgANtF", + "moduleName": "OneSignalUser", + "objc_name": "updateSessionWithSessionCount:sessionTime:refreshDeviceMetadata:sendImmediately:onSuccess:onFailure:", + "declAttributes": [ + "Dynamic", + "AccessControl", + "ObjC" + ], + "isFromExtension": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "runBackgroundTasks", + "printedName": "runBackgroundTasks()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + } + ], + "declKind": "Func", + "usr": "c:@CM@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)runBackgroundTasks", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC18runBackgroundTasksyyF", + "moduleName": "OneSignalUser", + "declAttributes": [ + "Dynamic", + "AccessControl", + "ObjC", + "RawDocComment" + ], + "isFromExtension": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "onJwtExpired", + "printedName": "onJwtExpired(expiredHandler:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeFunc", + "name": "Function", + "printedName": "(Swift.String, (Swift.String) -> ()) -> ()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "Tuple", + "printedName": "(Swift.String, (Swift.String) -> ())", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + }, + { + "kind": "TypeFunc", + "name": "Function", + "printedName": "(Swift.String) -> ()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "typeAttributes": [ + "noescape" + ] + } + ] + } + ] + } + ], + "declKind": "Func", + "usr": "c:@CM@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)onJwtExpiredWithExpiredHandler:", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC12onJwtExpired14expiredHandleryySS_ySSXEtc_tF", + "moduleName": "OneSignalUser", + "objc_name": "onJwtExpiredWithExpiredHandler:", + "declAttributes": [ + "Dynamic", + "ObjC", + "AccessControl" + ], + "isFromExtension": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Var", + "name": "User", + "printedName": "User", + "children": [ + { + "kind": "TypeNominal", + "name": "OSUser", + "printedName": "OneSignalUser.OSUser", + "usr": "c:@M@OneSignalUser@objc(pl)OSUser" + } + ], + "declKind": "Var", + "usr": "c:@CM@OneSignalUser@objc(cs)OneSignalUserManagerImpl(py)User", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC0C0AA6OSUser_pvp", + "moduleName": "OneSignalUser", + "objc_name": "User", + "declAttributes": [ + "Dynamic", + "ObjC", + "AccessControl" + ], + "isFromExtension": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "OSUser", + "printedName": "OneSignalUser.OSUser", + "usr": "c:@M@OneSignalUser@objc(pl)OSUser" + } + ], + "declKind": "Accessor", + "usr": "c:@CM@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)User", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC0C0AA6OSUser_pvg", + "moduleName": "OneSignalUser", + "objc_name": "User", + "declAttributes": [ + "Dynamic", + "ObjC" + ], + "isFromExtension": true, + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "pushSubscription", + "printedName": "pushSubscription", + "children": [ + { + "kind": "TypeNominal", + "name": "OSPushSubscription", + "printedName": "OneSignalUser.OSPushSubscription", + "usr": "c:@M@OneSignalUser@objc(pl)OSPushSubscription" + } + ], + "declKind": "Var", + "usr": "c:@CM@OneSignalUser@objc(cs)OneSignalUserManagerImpl(py)pushSubscription", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC16pushSubscriptionAA06OSPushG0_pvp", + "moduleName": "OneSignalUser", + "objc_name": "pushSubscription", + "declAttributes": [ + "Dynamic", + "ObjC", + "AccessControl" + ], + "isFromExtension": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "OSPushSubscription", + "printedName": "OneSignalUser.OSPushSubscription", + "usr": "c:@M@OneSignalUser@objc(pl)OSPushSubscription" + } + ], + "declKind": "Accessor", + "usr": "c:@CM@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)pushSubscription", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC16pushSubscriptionAA06OSPushG0_pvg", + "moduleName": "OneSignalUser", + "objc_name": "pushSubscription", + "declAttributes": [ + "Dynamic", + "ObjC" + ], + "isFromExtension": true, + "accessorKind": "get" + } + ] + }, + { + "kind": "Function", + "name": "addAlias", + "printedName": "addAlias(label:id:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Func", + "usr": "c:@CM@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)addAliasWithLabel:id:", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC8addAlias5label2idySS_SStF", + "moduleName": "OneSignalUser", + "objc_name": "addAliasWithLabel:id:", + "declAttributes": [ + "Dynamic", + "ObjC", + "AccessControl" + ], + "isFromExtension": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "addAliases", + "printedName": "addAliases(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "Dictionary", + "printedName": "[Swift.String : Swift.String]", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:SD" + } + ], + "declKind": "Func", + "usr": "c:@CM@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)addAliases:", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC10addAliasesyySDyS2SGF", + "moduleName": "OneSignalUser", + "objc_name": "addAliases:", + "declAttributes": [ + "Dynamic", + "ObjC", + "AccessControl" + ], + "isFromExtension": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "removeAlias", + "printedName": "removeAlias(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Func", + "usr": "c:@CM@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)removeAlias:", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC11removeAliasyySSF", + "moduleName": "OneSignalUser", + "objc_name": "removeAlias:", + "declAttributes": [ + "Dynamic", + "ObjC", + "AccessControl" + ], + "isFromExtension": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "removeAliases", + "printedName": "removeAliases(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "Array", + "printedName": "[Swift.String]", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:Sa" + } + ], + "declKind": "Func", + "usr": "c:@CM@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)removeAliases:", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC13removeAliasesyySaySSGF", + "moduleName": "OneSignalUser", + "objc_name": "removeAliases:", + "declAttributes": [ + "Dynamic", + "ObjC", + "AccessControl" + ], + "isFromExtension": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "addTag", + "printedName": "addTag(key:value:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Func", + "usr": "c:@CM@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)addTagWithKey:value:", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC6addTag3key5valueySS_SStF", + "moduleName": "OneSignalUser", + "objc_name": "addTagWithKey:value:", + "declAttributes": [ + "Dynamic", + "ObjC", + "AccessControl" + ], + "isFromExtension": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "addTags", + "printedName": "addTags(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "Dictionary", + "printedName": "[Swift.String : Swift.String]", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:SD" + } + ], + "declKind": "Func", + "usr": "c:@CM@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)addTags:", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC7addTagsyySDyS2SGF", + "moduleName": "OneSignalUser", + "objc_name": "addTags:", + "declAttributes": [ + "Dynamic", + "ObjC", + "AccessControl" + ], + "isFromExtension": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "removeTag", + "printedName": "removeTag(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Func", + "usr": "c:@CM@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)removeTag:", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC9removeTagyySSF", + "moduleName": "OneSignalUser", + "objc_name": "removeTag:", + "declAttributes": [ + "Dynamic", + "ObjC", + "AccessControl" + ], + "isFromExtension": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "removeTags", + "printedName": "removeTags(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "Array", + "printedName": "[Swift.String]", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:Sa" + } + ], + "declKind": "Func", + "usr": "c:@CM@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)removeTags:", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC10removeTagsyySaySSGF", + "moduleName": "OneSignalUser", + "objc_name": "removeTags:", + "declAttributes": [ + "Dynamic", + "ObjC", + "AccessControl" + ], + "isFromExtension": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "addEmail", + "printedName": "addEmail(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Func", + "usr": "c:@CM@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)addEmail:", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC8addEmailyySSF", + "moduleName": "OneSignalUser", + "objc_name": "addEmail:", + "declAttributes": [ + "Dynamic", + "ObjC", + "AccessControl" + ], + "isFromExtension": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "removeEmail", + "printedName": "removeEmail(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Func", + "usr": "c:@CM@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)removeEmail:", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC11removeEmailyySSF", + "moduleName": "OneSignalUser", + "objc_name": "removeEmail:", + "declAttributes": [ + "Dynamic", + "ObjC", + "AccessControl", + "RawDocComment" + ], + "isFromExtension": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "addSms", + "printedName": "addSms(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Func", + "usr": "c:@CM@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)addSms:", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC6addSmsyySSF", + "moduleName": "OneSignalUser", + "objc_name": "addSms:", + "declAttributes": [ + "Dynamic", + "ObjC", + "AccessControl" + ], + "isFromExtension": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "removeSms", + "printedName": "removeSms(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Func", + "usr": "c:@CM@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)removeSms:", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC9removeSmsyySSF", + "moduleName": "OneSignalUser", + "objc_name": "removeSms:", + "declAttributes": [ + "Dynamic", + "ObjC", + "AccessControl", + "RawDocComment" + ], + "isFromExtension": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "setLanguage", + "printedName": "setLanguage(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Func", + "usr": "c:@CM@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)setLanguage:", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC11setLanguageyySSF", + "moduleName": "OneSignalUser", + "objc_name": "setLanguage:", + "declAttributes": [ + "Dynamic", + "ObjC", + "AccessControl" + ], + "isFromExtension": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "addObserver", + "printedName": "addObserver(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "OSPushSubscriptionObserver", + "printedName": "OneSignalUser.OSPushSubscriptionObserver", + "usr": "c:@M@OneSignalUser@objc(pl)OSPushSubscriptionObserver" + } + ], + "declKind": "Func", + "usr": "c:@CM@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)addObserver:", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC11addObserveryyAA018OSPushSubscriptionG0_pF", + "moduleName": "OneSignalUser", + "objc_name": "addObserver:", + "declAttributes": [ + "Dynamic", + "ObjC", + "AccessControl" + ], + "isFromExtension": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "removeObserver", + "printedName": "removeObserver(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "OSPushSubscriptionObserver", + "printedName": "OneSignalUser.OSPushSubscriptionObserver", + "usr": "c:@M@OneSignalUser@objc(pl)OSPushSubscriptionObserver" + } + ], + "declKind": "Func", + "usr": "c:@CM@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)removeObserver:", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC14removeObserveryyAA018OSPushSubscriptionG0_pF", + "moduleName": "OneSignalUser", + "objc_name": "removeObserver:", + "declAttributes": [ + "Dynamic", + "ObjC", + "AccessControl" + ], + "isFromExtension": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Var", + "name": "id", + "printedName": "id", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "Swift.String?", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Var", + "usr": "c:@CM@OneSignalUser@objc(cs)OneSignalUserManagerImpl(py)id", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC2idSSSgvp", + "moduleName": "OneSignalUser", + "objc_name": "id", + "declAttributes": [ + "Dynamic", + "ObjC", + "AccessControl" + ], + "isFromExtension": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "Swift.String?", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Accessor", + "usr": "c:@CM@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)id", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC2idSSSgvg", + "moduleName": "OneSignalUser", + "objc_name": "id", + "declAttributes": [ + "Dynamic", + "ObjC" + ], + "isFromExtension": true, + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "token", + "printedName": "token", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "Swift.String?", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Var", + "usr": "c:@CM@OneSignalUser@objc(cs)OneSignalUserManagerImpl(py)token", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC5tokenSSSgvp", + "moduleName": "OneSignalUser", + "objc_name": "token", + "declAttributes": [ + "Dynamic", + "ObjC", + "AccessControl" + ], + "isFromExtension": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "Swift.String?", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Accessor", + "usr": "c:@CM@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)token", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC5tokenSSSgvg", + "moduleName": "OneSignalUser", + "objc_name": "token", + "declAttributes": [ + "Dynamic", + "ObjC" + ], + "isFromExtension": true, + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "optedIn", + "printedName": "optedIn", + "children": [ + { + "kind": "TypeNominal", + "name": "Bool", + "printedName": "Swift.Bool", + "usr": "s:Sb" + } + ], + "declKind": "Var", + "usr": "c:@CM@OneSignalUser@objc(cs)OneSignalUserManagerImpl(py)optedIn", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC7optedInSbvp", + "moduleName": "OneSignalUser", + "objc_name": "optedIn", + "declAttributes": [ + "Dynamic", + "ObjC", + "AccessControl" + ], + "isFromExtension": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "Bool", + "printedName": "Swift.Bool", + "usr": "s:Sb" + } + ], + "declKind": "Accessor", + "usr": "c:@CM@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)optedIn", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC7optedInSbvg", + "moduleName": "OneSignalUser", + "objc_name": "optedIn", + "declAttributes": [ + "Dynamic", + "ObjC" + ], + "isFromExtension": true, + "accessorKind": "get" + } + ] + }, + { + "kind": "Function", + "name": "optIn", + "printedName": "optIn()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + } + ], + "declKind": "Func", + "usr": "c:@CM@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)optIn", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC5optInyyF", + "moduleName": "OneSignalUser", + "objc_name": "optIn", + "declAttributes": [ + "Dynamic", + "ObjC", + "AccessControl", + "RawDocComment" + ], + "isFromExtension": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "optOut", + "printedName": "optOut()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + } + ], + "declKind": "Func", + "usr": "c:@CM@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)optOut", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC6optOutyyF", + "moduleName": "OneSignalUser", + "objc_name": "optOut", + "declAttributes": [ + "Dynamic", + "ObjC", + "AccessControl" + ], + "isFromExtension": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "setNotificationTypes", + "printedName": "setNotificationTypes(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "Int32", + "printedName": "Swift.Int32", + "usr": "s:s5Int32V" + } + ], + "declKind": "Func", + "usr": "c:@CM@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)setNotificationTypes:", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC20setNotificationTypesyys5Int32VF", + "moduleName": "OneSignalUser", + "objc_name": "setNotificationTypes:", + "declAttributes": [ + "Dynamic", + "ObjC", + "AccessControl", + "RawDocComment" + ], + "isFromExtension": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "setPushToken", + "printedName": "setPushToken(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Func", + "usr": "c:@CM@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)setPushToken:", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC12setPushTokenyySSF", + "moduleName": "OneSignalUser", + "objc_name": "setPushToken:", + "declAttributes": [ + "Dynamic", + "ObjC", + "AccessControl" + ], + "isFromExtension": true, + "funcSelfKind": "NonMutating" + } + ], + "declKind": "Class", + "usr": "c:@M@OneSignalUser@objc(cs)OneSignalUserManagerImpl", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC", + "moduleName": "OneSignalUser", + "declAttributes": [ + "AccessControl", + "ObjC" + ], + "superclassUsr": "c:objc(cs)NSObject", + "hasMissingDesignatedInitializers": true, + "inheritsConvenienceInitializers": true, + "superclassNames": [ + "ObjectiveC.NSObject" + ], + "conformances": [ + { + "kind": "Conformance", + "name": "Equatable", + "printedName": "Equatable", + "usr": "s:SQ", + "mangledName": "$sSQ" + }, + { + "kind": "Conformance", + "name": "Hashable", + "printedName": "Hashable", + "usr": "s:SH", + "mangledName": "$sSH" + }, + { + "kind": "Conformance", + "name": "CVarArg", + "printedName": "CVarArg", + "usr": "s:s7CVarArgP", + "mangledName": "$ss7CVarArgP" + }, + { + "kind": "Conformance", + "name": "_KeyValueCodingAndObservingPublishing", + "printedName": "_KeyValueCodingAndObservingPublishing", + "usr": "s:10Foundation37_KeyValueCodingAndObservingPublishingP", + "mangledName": "$s10Foundation37_KeyValueCodingAndObservingPublishingP" + }, + { + "kind": "Conformance", + "name": "_KeyValueCodingAndObserving", + "printedName": "_KeyValueCodingAndObserving", + "usr": "s:10Foundation27_KeyValueCodingAndObservingP", + "mangledName": "$s10Foundation27_KeyValueCodingAndObservingP" + }, + { + "kind": "Conformance", + "name": "CustomStringConvertible", + "printedName": "CustomStringConvertible", + "usr": "s:s23CustomStringConvertibleP", + "mangledName": "$ss23CustomStringConvertibleP" + }, + { + "kind": "Conformance", + "name": "CustomDebugStringConvertible", + "printedName": "CustomDebugStringConvertible", + "usr": "s:s28CustomDebugStringConvertibleP", + "mangledName": "$ss28CustomDebugStringConvertibleP" + }, + { + "kind": "Conformance", + "name": "OSUser", + "printedName": "OSUser", + "usr": "c:@M@OneSignalUser@objc(pl)OSUser", + "mangledName": "$s13OneSignalUser6OSUserP" + }, + { + "kind": "Conformance", + "name": "OSPushSubscription", + "printedName": "OSPushSubscription", + "usr": "c:@M@OneSignalUser@objc(pl)OSPushSubscription", + "mangledName": "$s13OneSignalUser18OSPushSubscriptionP" + } + ] + }, + { + "kind": "Import", + "name": "Foundation", + "printedName": "Foundation", + "declKind": "Import", + "moduleName": "OneSignalUser", + "declAttributes": [ + "RawDocComment" + ] + }, + { + "kind": "Import", + "name": "OneSignalOSCore", + "printedName": "OneSignalOSCore", + "declKind": "Import", + "moduleName": "OneSignalUser" + }, + { + "kind": "Import", + "name": "OneSignalCore", + "printedName": "OneSignalCore", + "declKind": "Import", + "moduleName": "OneSignalUser" + }, + { + "kind": "Import", + "name": "OneSignalOSCore", + "printedName": "OneSignalOSCore", + "declKind": "Import", + "moduleName": "OneSignalUser", + "declAttributes": [ + "RawDocComment" + ] + }, + { + "kind": "Import", + "name": "OneSignalCore", + "printedName": "OneSignalCore", + "declKind": "Import", + "moduleName": "OneSignalUser" + }, + { + "kind": "Import", + "name": "Foundation", + "printedName": "Foundation", + "declKind": "Import", + "moduleName": "OneSignalUser", + "declAttributes": [ + "RawDocComment" + ] + }, + { + "kind": "Import", + "name": "OneSignalCore", + "printedName": "OneSignalCore", + "declKind": "Import", + "moduleName": "OneSignalUser" + }, + { + "kind": "Import", + "name": "OneSignalOSCore", + "printedName": "OneSignalOSCore", + "declKind": "Import", + "moduleName": "OneSignalUser" + }, + { + "kind": "Import", + "name": "OneSignalCore", + "printedName": "OneSignalCore", + "declKind": "Import", + "moduleName": "OneSignalUser", + "declAttributes": [ + "RawDocComment" + ] + }, + { + "kind": "Import", + "name": "OneSignalOSCore", + "printedName": "OneSignalOSCore", + "declKind": "Import", + "moduleName": "OneSignalUser" + }, + { + "kind": "Import", + "name": "OneSignalOSCore", + "printedName": "OneSignalOSCore", + "declKind": "Import", + "moduleName": "OneSignalUser", + "declAttributes": [ + "RawDocComment" + ] + }, + { + "kind": "Import", + "name": "OneSignalCore", + "printedName": "OneSignalCore", + "declKind": "Import", + "moduleName": "OneSignalUser" + }, + { + "kind": "Import", + "name": "Foundation", + "printedName": "Foundation", + "declKind": "Import", + "moduleName": "OneSignalUser", + "declAttributes": [ + "RawDocComment" + ] + }, + { + "kind": "Import", + "name": "OneSignalCore", + "printedName": "OneSignalCore", + "declKind": "Import", + "moduleName": "OneSignalUser" + }, + { + "kind": "Import", + "name": "OneSignalOSCore", + "printedName": "OneSignalOSCore", + "declKind": "Import", + "moduleName": "OneSignalUser" + }, + { + "kind": "Import", + "name": "OneSignalNotifications", + "printedName": "OneSignalNotifications", + "declKind": "Import", + "moduleName": "OneSignalUser" + }, + { + "kind": "TypeDecl", + "name": "OSPushSubscriptionObserver", + "printedName": "OSPushSubscriptionObserver", + "children": [ + { + "kind": "Function", + "name": "onPushSubscriptionDidChange", + "printedName": "onPushSubscriptionDidChange(state:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "OSPushSubscriptionChangedState", + "printedName": "OneSignalUser.OSPushSubscriptionChangedState", + "usr": "c:@M@OneSignalUser@objc(cs)OSPushSubscriptionChangedState" + } + ], + "declKind": "Func", + "usr": "c:@M@OneSignalUser@objc(pl)OSPushSubscriptionObserver(im)onPushSubscriptionDidChangeWithState:", + "mangledName": "$s13OneSignalUser26OSPushSubscriptionObserverP06onPushE9DidChange5stateyAA0dE12ChangedStateC_tF", + "moduleName": "OneSignalUser", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalUser.OSPushSubscriptionObserver>", + "sugared_genericSig": "", + "protocolReq": true, + "objc_name": "onPushSubscriptionDidChangeWithState:", + "declAttributes": [ + "ObjC", + "RawDocComment" + ], + "reqNewWitnessTableEntry": true, + "funcSelfKind": "NonMutating" + } + ], + "declKind": "Protocol", + "usr": "c:@M@OneSignalUser@objc(pl)OSPushSubscriptionObserver", + "mangledName": "$s13OneSignalUser26OSPushSubscriptionObserverP", + "moduleName": "OneSignalUser", + "genericSig": "<τ_0_0 : AnyObject>", + "sugared_genericSig": "", + "declAttributes": [ + "AccessControl", + "ObjC", + "RawDocComment" + ] + }, + { + "kind": "TypeDecl", + "name": "OSPushSubscriptionState", + "printedName": "OSPushSubscriptionState", + "children": [ + { + "kind": "Var", + "name": "id", + "printedName": "id", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "Swift.String?", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Var", + "usr": "c:@M@OneSignalUser@objc(cs)OSPushSubscriptionState(py)id", + "mangledName": "$s13OneSignalUser23OSPushSubscriptionStateC2idSSSgvp", + "moduleName": "OneSignalUser", + "declAttributes": [ + "Final", + "HasStorage", + "AccessControl", + "ObjC" + ], + "isLet": true, + "hasStorage": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "Swift.String?", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Accessor", + "usr": "c:@M@OneSignalUser@objc(cs)OSPushSubscriptionState(im)id", + "mangledName": "$s13OneSignalUser23OSPushSubscriptionStateC2idSSSgvg", + "moduleName": "OneSignalUser", + "implicit": true, + "declAttributes": [ + "Final", + "ObjC" + ], + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "token", + "printedName": "token", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "Swift.String?", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Var", + "usr": "c:@M@OneSignalUser@objc(cs)OSPushSubscriptionState(py)token", + "mangledName": "$s13OneSignalUser23OSPushSubscriptionStateC5tokenSSSgvp", + "moduleName": "OneSignalUser", + "declAttributes": [ + "Final", + "HasStorage", + "AccessControl", + "ObjC" + ], + "isLet": true, + "hasStorage": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "Swift.String?", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Accessor", + "usr": "c:@M@OneSignalUser@objc(cs)OSPushSubscriptionState(im)token", + "mangledName": "$s13OneSignalUser23OSPushSubscriptionStateC5tokenSSSgvg", + "moduleName": "OneSignalUser", + "implicit": true, + "declAttributes": [ + "Final", + "ObjC" + ], + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "optedIn", + "printedName": "optedIn", + "children": [ + { + "kind": "TypeNominal", + "name": "Bool", + "printedName": "Swift.Bool", + "usr": "s:Sb" + } + ], + "declKind": "Var", + "usr": "c:@M@OneSignalUser@objc(cs)OSPushSubscriptionState(py)optedIn", + "mangledName": "$s13OneSignalUser23OSPushSubscriptionStateC7optedInSbvp", + "moduleName": "OneSignalUser", + "declAttributes": [ + "Final", + "HasStorage", + "AccessControl", + "ObjC" + ], + "isLet": true, + "hasStorage": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "Bool", + "printedName": "Swift.Bool", + "usr": "s:Sb" + } + ], + "declKind": "Accessor", + "usr": "c:@M@OneSignalUser@objc(cs)OSPushSubscriptionState(im)optedIn", + "mangledName": "$s13OneSignalUser23OSPushSubscriptionStateC7optedInSbvg", + "moduleName": "OneSignalUser", + "implicit": true, + "declAttributes": [ + "Final", + "ObjC" + ], + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "description", + "printedName": "description", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Var", + "usr": "c:@M@OneSignalUser@objc(cs)OSPushSubscriptionState(py)description", + "mangledName": "$s13OneSignalUser23OSPushSubscriptionStateC11descriptionSSvp", + "moduleName": "OneSignalUser", + "overriding": true, + "objc_name": "description", + "declAttributes": [ + "Dynamic", + "ObjC", + "Override", + "AccessControl" + ], + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Accessor", + "usr": "c:@M@OneSignalUser@objc(cs)OSPushSubscriptionState(im)description", + "mangledName": "$s13OneSignalUser23OSPushSubscriptionStateC11descriptionSSvg", + "moduleName": "OneSignalUser", + "overriding": true, + "objc_name": "description", + "declAttributes": [ + "Dynamic", + "ObjC" + ], + "accessorKind": "get" + } + ] + }, + { + "kind": "Function", + "name": "jsonRepresentation", + "printedName": "jsonRepresentation()", + "children": [ + { + "kind": "TypeNominal", + "name": "NSDictionary", + "printedName": "Foundation.NSDictionary", + "usr": "c:objc(cs)NSDictionary" + } + ], + "declKind": "Func", + "usr": "c:@M@OneSignalUser@objc(cs)OSPushSubscriptionState(im)jsonRepresentation", + "mangledName": "$s13OneSignalUser23OSPushSubscriptionStateC18jsonRepresentationSo12NSDictionaryCyF", + "moduleName": "OneSignalUser", + "declAttributes": [ + "AccessControl", + "ObjC" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Constructor", + "name": "init", + "printedName": "init()", + "children": [ + { + "kind": "TypeNominal", + "name": "OSPushSubscriptionState", + "printedName": "OneSignalUser.OSPushSubscriptionState", + "usr": "c:@M@OneSignalUser@objc(cs)OSPushSubscriptionState" + } + ], + "declKind": "Constructor", + "usr": "c:@M@OneSignalUser@objc(cs)OSPushSubscriptionState(im)init", + "mangledName": "$s13OneSignalUser23OSPushSubscriptionStateCACycfc", + "moduleName": "OneSignalUser", + "overriding": true, + "implicit": true, + "objc_name": "init", + "declAttributes": [ + "Dynamic", + "ObjC", + "Override" + ], + "init_kind": "Designated" + } + ], + "declKind": "Class", + "usr": "c:@M@OneSignalUser@objc(cs)OSPushSubscriptionState", + "mangledName": "$s13OneSignalUser23OSPushSubscriptionStateC", + "moduleName": "OneSignalUser", + "declAttributes": [ + "AccessControl", + "ObjC" + ], + "superclassUsr": "c:objc(cs)NSObject", + "hasMissingDesignatedInitializers": true, + "superclassNames": [ + "ObjectiveC.NSObject" + ], + "conformances": [ + { + "kind": "Conformance", + "name": "Equatable", + "printedName": "Equatable", + "usr": "s:SQ", + "mangledName": "$sSQ" + }, + { + "kind": "Conformance", + "name": "Hashable", + "printedName": "Hashable", + "usr": "s:SH", + "mangledName": "$sSH" + }, + { + "kind": "Conformance", + "name": "CVarArg", + "printedName": "CVarArg", + "usr": "s:s7CVarArgP", + "mangledName": "$ss7CVarArgP" + }, + { + "kind": "Conformance", + "name": "_KeyValueCodingAndObservingPublishing", + "printedName": "_KeyValueCodingAndObservingPublishing", + "usr": "s:10Foundation37_KeyValueCodingAndObservingPublishingP", + "mangledName": "$s10Foundation37_KeyValueCodingAndObservingPublishingP" + }, + { + "kind": "Conformance", + "name": "_KeyValueCodingAndObserving", + "printedName": "_KeyValueCodingAndObserving", + "usr": "s:10Foundation27_KeyValueCodingAndObservingP", + "mangledName": "$s10Foundation27_KeyValueCodingAndObservingP" + }, + { + "kind": "Conformance", + "name": "CustomStringConvertible", + "printedName": "CustomStringConvertible", + "usr": "s:s23CustomStringConvertibleP", + "mangledName": "$ss23CustomStringConvertibleP" + }, + { + "kind": "Conformance", + "name": "CustomDebugStringConvertible", + "printedName": "CustomDebugStringConvertible", + "usr": "s:s28CustomDebugStringConvertibleP", + "mangledName": "$ss28CustomDebugStringConvertibleP" + } + ] + }, + { + "kind": "TypeDecl", + "name": "OSPushSubscriptionChangedState", + "printedName": "OSPushSubscriptionChangedState", + "children": [ + { + "kind": "Var", + "name": "current", + "printedName": "current", + "children": [ + { + "kind": "TypeNominal", + "name": "OSPushSubscriptionState", + "printedName": "OneSignalUser.OSPushSubscriptionState", + "usr": "c:@M@OneSignalUser@objc(cs)OSPushSubscriptionState" + } + ], + "declKind": "Var", + "usr": "c:@M@OneSignalUser@objc(cs)OSPushSubscriptionChangedState(py)current", + "mangledName": "$s13OneSignalUser30OSPushSubscriptionChangedStateC7currentAA0deG0Cvp", + "moduleName": "OneSignalUser", + "declAttributes": [ + "Final", + "HasStorage", + "AccessControl", + "ObjC" + ], + "isLet": true, + "hasStorage": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "OSPushSubscriptionState", + "printedName": "OneSignalUser.OSPushSubscriptionState", + "usr": "c:@M@OneSignalUser@objc(cs)OSPushSubscriptionState" + } + ], + "declKind": "Accessor", + "usr": "c:@M@OneSignalUser@objc(cs)OSPushSubscriptionChangedState(im)current", + "mangledName": "$s13OneSignalUser30OSPushSubscriptionChangedStateC7currentAA0deG0Cvg", + "moduleName": "OneSignalUser", + "implicit": true, + "declAttributes": [ + "Final", + "ObjC" + ], + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "previous", + "printedName": "previous", + "children": [ + { + "kind": "TypeNominal", + "name": "OSPushSubscriptionState", + "printedName": "OneSignalUser.OSPushSubscriptionState", + "usr": "c:@M@OneSignalUser@objc(cs)OSPushSubscriptionState" + } + ], + "declKind": "Var", + "usr": "c:@M@OneSignalUser@objc(cs)OSPushSubscriptionChangedState(py)previous", + "mangledName": "$s13OneSignalUser30OSPushSubscriptionChangedStateC8previousAA0deG0Cvp", + "moduleName": "OneSignalUser", + "declAttributes": [ + "Final", + "HasStorage", + "AccessControl", + "ObjC" + ], + "isLet": true, + "hasStorage": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "OSPushSubscriptionState", + "printedName": "OneSignalUser.OSPushSubscriptionState", + "usr": "c:@M@OneSignalUser@objc(cs)OSPushSubscriptionState" + } + ], + "declKind": "Accessor", + "usr": "c:@M@OneSignalUser@objc(cs)OSPushSubscriptionChangedState(im)previous", + "mangledName": "$s13OneSignalUser30OSPushSubscriptionChangedStateC8previousAA0deG0Cvg", + "moduleName": "OneSignalUser", + "implicit": true, + "declAttributes": [ + "Final", + "ObjC" + ], + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "description", + "printedName": "description", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Var", + "usr": "c:@M@OneSignalUser@objc(cs)OSPushSubscriptionChangedState(py)description", + "mangledName": "$s13OneSignalUser30OSPushSubscriptionChangedStateC11descriptionSSvp", + "moduleName": "OneSignalUser", + "overriding": true, + "objc_name": "description", + "declAttributes": [ + "Dynamic", + "ObjC", + "Override", + "AccessControl" + ], + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Accessor", + "usr": "c:@M@OneSignalUser@objc(cs)OSPushSubscriptionChangedState(im)description", + "mangledName": "$s13OneSignalUser30OSPushSubscriptionChangedStateC11descriptionSSvg", + "moduleName": "OneSignalUser", + "overriding": true, + "objc_name": "description", + "declAttributes": [ + "Dynamic", + "ObjC" + ], + "accessorKind": "get" + } + ] + }, + { + "kind": "Function", + "name": "jsonRepresentation", + "printedName": "jsonRepresentation()", + "children": [ + { + "kind": "TypeNominal", + "name": "NSDictionary", + "printedName": "Foundation.NSDictionary", + "usr": "c:objc(cs)NSDictionary" + } + ], + "declKind": "Func", + "usr": "c:@M@OneSignalUser@objc(cs)OSPushSubscriptionChangedState(im)jsonRepresentation", + "mangledName": "$s13OneSignalUser30OSPushSubscriptionChangedStateC18jsonRepresentationSo12NSDictionaryCyF", + "moduleName": "OneSignalUser", + "declAttributes": [ + "AccessControl", + "ObjC" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Constructor", + "name": "init", + "printedName": "init()", + "children": [ + { + "kind": "TypeNominal", + "name": "OSPushSubscriptionChangedState", + "printedName": "OneSignalUser.OSPushSubscriptionChangedState", + "usr": "c:@M@OneSignalUser@objc(cs)OSPushSubscriptionChangedState" + } + ], + "declKind": "Constructor", + "usr": "c:@M@OneSignalUser@objc(cs)OSPushSubscriptionChangedState(im)init", + "mangledName": "$s13OneSignalUser30OSPushSubscriptionChangedStateCACycfc", + "moduleName": "OneSignalUser", + "overriding": true, + "implicit": true, + "objc_name": "init", + "declAttributes": [ + "Dynamic", + "ObjC", + "Override" + ], + "init_kind": "Designated" + } + ], + "declKind": "Class", + "usr": "c:@M@OneSignalUser@objc(cs)OSPushSubscriptionChangedState", + "mangledName": "$s13OneSignalUser30OSPushSubscriptionChangedStateC", + "moduleName": "OneSignalUser", + "declAttributes": [ + "AccessControl", + "ObjC" + ], + "superclassUsr": "c:objc(cs)NSObject", + "hasMissingDesignatedInitializers": true, + "superclassNames": [ + "ObjectiveC.NSObject" + ], + "conformances": [ + { + "kind": "Conformance", + "name": "Equatable", + "printedName": "Equatable", + "usr": "s:SQ", + "mangledName": "$sSQ" + }, + { + "kind": "Conformance", + "name": "Hashable", + "printedName": "Hashable", + "usr": "s:SH", + "mangledName": "$sSH" + }, + { + "kind": "Conformance", + "name": "CVarArg", + "printedName": "CVarArg", + "usr": "s:s7CVarArgP", + "mangledName": "$ss7CVarArgP" + }, + { + "kind": "Conformance", + "name": "_KeyValueCodingAndObservingPublishing", + "printedName": "_KeyValueCodingAndObservingPublishing", + "usr": "s:10Foundation37_KeyValueCodingAndObservingPublishingP", + "mangledName": "$s10Foundation37_KeyValueCodingAndObservingPublishingP" + }, + { + "kind": "Conformance", + "name": "_KeyValueCodingAndObserving", + "printedName": "_KeyValueCodingAndObserving", + "usr": "s:10Foundation27_KeyValueCodingAndObservingP", + "mangledName": "$s10Foundation27_KeyValueCodingAndObservingP" + }, + { + "kind": "Conformance", + "name": "CustomStringConvertible", + "printedName": "CustomStringConvertible", + "usr": "s:s23CustomStringConvertibleP", + "mangledName": "$ss23CustomStringConvertibleP" + }, + { + "kind": "Conformance", + "name": "CustomDebugStringConvertible", + "printedName": "CustomDebugStringConvertible", + "usr": "s:s28CustomDebugStringConvertibleP", + "mangledName": "$ss28CustomDebugStringConvertibleP" + } + ] + }, + { + "kind": "Import", + "name": "Foundation", + "printedName": "Foundation", + "declKind": "Import", + "moduleName": "OneSignalUser", + "declAttributes": [ + "RawDocComment" + ] + }, + { + "kind": "Import", + "name": "OneSignalCore", + "printedName": "OneSignalCore", + "declKind": "Import", + "moduleName": "OneSignalUser" + }, + { + "kind": "Import", + "name": "OneSignalOSCore", + "printedName": "OneSignalOSCore", + "declKind": "Import", + "moduleName": "OneSignalUser" + }, + { + "kind": "Import", + "name": "OneSignalOSCore", + "printedName": "OneSignalOSCore", + "declKind": "Import", + "moduleName": "OneSignalUser", + "declAttributes": [ + "RawDocComment" + ] + }, + { + "kind": "Import", + "name": "OneSignalCore", + "printedName": "OneSignalCore", + "declKind": "Import", + "moduleName": "OneSignalUser" + }, + { + "kind": "Import", + "name": "Foundation", + "printedName": "Foundation", + "declKind": "Import", + "moduleName": "OneSignalUser", + "declAttributes": [ + "RawDocComment" + ] + }, + { + "kind": "Import", + "name": "OneSignalCore", + "printedName": "OneSignalCore", + "declKind": "Import", + "moduleName": "OneSignalUser" + }, + { + "kind": "Import", + "name": "OneSignalOSCore", + "printedName": "OneSignalOSCore", + "declKind": "Import", + "moduleName": "OneSignalUser" + }, + { + "kind": "Import", + "name": "OneSignalCore", + "printedName": "OneSignalCore", + "declKind": "Import", + "moduleName": "OneSignalUser", + "declAttributes": [ + "RawDocComment" + ] + }, + { + "kind": "Import", + "name": "OneSignalNotifications", + "printedName": "OneSignalNotifications", + "declKind": "Import", + "moduleName": "OneSignalUser" + }, + { + "kind": "Import", + "name": "OneSignalOSCore", + "printedName": "OneSignalOSCore", + "declKind": "Import", + "moduleName": "OneSignalUser" + } + ], + "json_format_version": 8 + }, + "ConstValues": [ + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OneSignalUserManagerImpl.swift", + "kind": "BooleanLiteral", + "offset": 4048, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OneSignalUserManagerImpl.swift", + "kind": "BooleanLiteral", + "offset": 5070, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OneSignalUserManagerImpl.swift", + "kind": "BooleanLiteral", + "offset": 5089, + "length": 4, + "value": "true" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OneSignalUserManagerImpl.swift", + "kind": "BooleanLiteral", + "offset": 5172, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OneSignalUserManagerImpl.swift", + "kind": "BooleanLiteral", + "offset": 24536, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSPropertiesModel.swift", + "kind": "StringLiteral", + "offset": 1847, + "length": 15, + "value": "\"OneSignalUser.OSLocationPoint\"" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSPropertiesModel.swift", + "kind": "StringLiteral", + "offset": 2423, + "length": 10, + "value": "\"language\"" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSPropertiesModel.swift", + "kind": "StringLiteral", + "offset": 2557, + "length": 10, + "value": "\"location\"" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSPropertiesModel.swift", + "kind": "Dictionary", + "offset": 2697, + "length": 3, + "value": "[]" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSIdentityOperationExecutor.swift", + "kind": "Array", + "offset": 1438, + "length": 2, + "value": "[]" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSIdentityOperationExecutor.swift", + "kind": "Array", + "offset": 1570, + "length": 2, + "value": "[]" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSIdentityOperationExecutor.swift", + "kind": "Array", + "offset": 1626, + "length": 2, + "value": "[]" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSUserInternalImpl.swift", + "kind": "StringLiteral", + "offset": 2006, + "length": 18, + "value": "\"OneSignalUser.OSUserInternalImpl\"" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSPropertyOperationExecutor.swift", + "kind": "Array", + "offset": 1423, + "length": 2, + "value": "[]" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSPropertyOperationExecutor.swift", + "kind": "Array", + "offset": 1484, + "length": 2, + "value": "[]" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSPropertyOperationExecutor.swift", + "kind": "BooleanLiteral", + "offset": 9816, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSSubscriptionModel.swift", + "kind": "StringLiteral", + "offset": 1536, + "length": 23, + "value": "\"OneSignalUser.OSPushSubscriptionState\"" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSSubscriptionModel.swift", + "kind": "StringLiteral", + "offset": 2423, + "length": 30, + "value": "\"OneSignalUser.OSPushSubscriptionChangedState\"" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSSubscriptionModel.swift", + "kind": "StringLiteral", + "offset": 3147, + "length": 9, + "value": "\"iOSPush\"" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSSubscriptionModel.swift", + "kind": "StringLiteral", + "offset": 3174, + "length": 7, + "value": "\"Email\"" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSSubscriptionModel.swift", + "kind": "StringLiteral", + "offset": 3197, + "length": 5, + "value": "\"SMS\"" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSSubscriptionModel.swift", + "kind": "StringLiteral", + "offset": 3147, + "length": 9, + "value": "\"iOSPush\"" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSSubscriptionModel.swift", + "kind": "StringLiteral", + "offset": 3174, + "length": 7, + "value": "\"Email\"" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSSubscriptionModel.swift", + "kind": "StringLiteral", + "offset": 3197, + "length": 5, + "value": "\"SMS\"" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSSubscriptionModel.swift", + "kind": "StringLiteral", + "offset": 3526, + "length": 9, + "value": "\"address\"" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSSubscriptionModel.swift", + "kind": "StringLiteral", + "offset": 3957, + "length": 16, + "value": "\"subscriptionId\"" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSSubscriptionModel.swift", + "kind": "IntegerLiteral", + "offset": 5277, + "length": 2, + "value": "2" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSSubscriptionModel.swift", + "kind": "IntegerLiteral", + "offset": 5318, + "length": 2, + "value": "2" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSSubscriptionModel.swift", + "kind": "IntegerLiteral", + "offset": 5403, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSSubscriptionModel.swift", + "kind": "StringLiteral", + "offset": 5436, + "length": 19, + "value": "\"notificationTypes\"" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSSubscriptionModel.swift", + "kind": "IntegerLiteral", + "offset": 5003, + "length": 2, + "value": "1" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSSubscriptionModel.swift", + "kind": "IntegerLiteral", + "offset": 6433, + "length": 2, + "value": "2" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSSubscriptionModel.swift", + "kind": "StringLiteral", + "offset": 6649, + "length": 10, + "value": "\"testType\"" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSSubscriptionModel.swift", + "kind": "StringLiteral", + "offset": 6885, + "length": 10, + "value": "\"deviceOs\"" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSSubscriptionModel.swift", + "kind": "StringLiteral", + "offset": 7098, + "length": 5, + "value": "\"sdk\"" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSSubscriptionModel.swift", + "kind": "StringLiteral", + "offset": 7341, + "length": 13, + "value": "\"deviceModel\"" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSSubscriptionModel.swift", + "kind": "StringLiteral", + "offset": 7634, + "length": 12, + "value": "\"appVersion\"" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSSubscriptionModel.swift", + "kind": "StringLiteral", + "offset": 7458, + "length": 28, + "value": "\"CFBundleShortVersionString\"" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSSubscriptionModel.swift", + "kind": "StringLiteral", + "offset": 7886, + "length": 9, + "value": "\"netType\"" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSSubscriptionModel.swift", + "kind": "StringLiteral", + "offset": 3250, + "length": 19, + "value": "\"OneSignalUser.OSSubscriptionModel\"" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSIdentityModel.swift", + "kind": "Dictionary", + "offset": 1510, + "length": 3, + "value": "[]" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSIdentityModel.swift", + "kind": "StringLiteral", + "offset": 1293, + "length": 15, + "value": "\"OneSignalUser.OSIdentityModel\"" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSSubscriptionOperationExecutor.swift", + "kind": "Array", + "offset": 1486, + "length": 2, + "value": "[]" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSSubscriptionOperationExecutor.swift", + "kind": "Array", + "offset": 1626, + "length": 2, + "value": "[]" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSSubscriptionOperationExecutor.swift", + "kind": "Array", + "offset": 1689, + "length": 2, + "value": "[]" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSSubscriptionOperationExecutor.swift", + "kind": "Array", + "offset": 1752, + "length": 2, + "value": "[]" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSSubscriptionOperationExecutor.swift", + "kind": "Dictionary", + "offset": 1815, + "length": 3, + "value": "[]" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSUserRequests.swift", + "kind": "Array", + "offset": 1619, + "length": 2, + "value": "[]" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSUserRequests.swift", + "kind": "Array", + "offset": 1705, + "length": 2, + "value": "[]" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSUserRequests.swift", + "kind": "Dictionary", + "offset": 1767, + "length": 3, + "value": "[]" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSUserRequests.swift", + "kind": "BooleanLiteral", + "offset": 27422, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSUserRequests.swift", + "kind": "BooleanLiteral", + "offset": 31693, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSUserRequests.swift", + "kind": "StringLiteral", + "offset": 31615, + "length": 19, + "value": "\"OneSignalUser.OSRequestCreateUser\"" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSUserRequests.swift", + "kind": "BooleanLiteral", + "offset": 35419, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSUserRequests.swift", + "kind": "StringLiteral", + "offset": 35324, + "length": 36, + "value": "\"OneSignalUser.OSRequestFetchIdentityBySubscription\"" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSUserRequests.swift", + "kind": "BooleanLiteral", + "offset": 38704, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSUserRequests.swift", + "kind": "StringLiteral", + "offset": 38624, + "length": 21, + "value": "\"OneSignalUser.OSRequestIdentifyUser\"" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSUserRequests.swift", + "kind": "BooleanLiteral", + "offset": 42618, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSUserRequests.swift", + "kind": "StringLiteral", + "offset": 42541, + "length": 18, + "value": "\"OneSignalUser.OSRequestFetchUser\"" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSUserRequests.swift", + "kind": "BooleanLiteral", + "offset": 45201, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSUserRequests.swift", + "kind": "StringLiteral", + "offset": 45123, + "length": 19, + "value": "\"OneSignalUser.OSRequestAddAliases\"" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSUserRequests.swift", + "kind": "BooleanLiteral", + "offset": 47646, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSUserRequests.swift", + "kind": "StringLiteral", + "offset": 47567, + "length": 20, + "value": "\"OneSignalUser.OSRequestRemoveAlias\"" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSUserRequests.swift", + "kind": "BooleanLiteral", + "offset": 49858, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSUserRequests.swift", + "kind": "StringLiteral", + "offset": 49774, + "length": 25, + "value": "\"OneSignalUser.OSRequestUpdateProperties\"" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSUserRequests.swift", + "kind": "BooleanLiteral", + "offset": 54435, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSUserRequests.swift", + "kind": "StringLiteral", + "offset": 54349, + "length": 27, + "value": "\"OneSignalUser.OSRequestCreateSubscription\"" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSUserRequests.swift", + "kind": "BooleanLiteral", + "offset": 57362, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSUserRequests.swift", + "kind": "StringLiteral", + "offset": 57274, + "length": 29, + "value": "\"OneSignalUser.OSRequestTransferSubscription\"" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSUserRequests.swift", + "kind": "BooleanLiteral", + "offset": 60213, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSUserRequests.swift", + "kind": "StringLiteral", + "offset": 60127, + "length": 27, + "value": "\"OneSignalUser.OSRequestUpdateSubscription\"" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSUserRequests.swift", + "kind": "BooleanLiteral", + "offset": 63838, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSUserRequests.swift", + "kind": "StringLiteral", + "offset": 63752, + "length": 27, + "value": "\"OneSignalUser.OSRequestDeleteSubscription\"" + } + ] +} \ No newline at end of file diff --git a/iOS_SDK/OneSignalSDK/OneSignal_User/OneSignalUser.xcframework/ios-arm64_x86_64-simulator/OneSignalUser.framework/Modules/OneSignalUser.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface b/iOS_SDK/OneSignalSDK/OneSignal_User/OneSignalUser.xcframework/ios-arm64_x86_64-simulator/OneSignalUser.framework/Modules/OneSignalUser.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface new file mode 100644 index 000000000..ebb22b783 --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignal_User/OneSignalUser.xcframework/ios-arm64_x86_64-simulator/OneSignalUser.framework/Modules/OneSignalUser.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface @@ -0,0 +1,130 @@ +// swift-interface-format-version: 1.0 +// swift-compiler-version: Apple Swift version 5.7.1 (swiftlang-5.7.1.135.3 clang-1400.0.29.51) +// swift-module-flags: -target arm64-apple-ios11.0-simulator -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -O -module-name OneSignalUser +// swift-module-flags-ignorable: -enable-bare-slash-regex +import Foundation +import OneSignalCore +import OneSignalNotifications +import OneSignalOSCore +@_exported import OneSignalUser +import Swift +import _Concurrency +import _StringProcessing +@objc public protocol OSUser { + @objc var pushSubscription: OneSignalUser.OSPushSubscription { get } + @objc func addAlias(label: Swift.String, id: Swift.String) + @objc func addAliases(_ aliases: [Swift.String : Swift.String]) + @objc func removeAlias(_ label: Swift.String) + @objc func removeAliases(_ labels: [Swift.String]) + @objc func addTag(key: Swift.String, value: Swift.String) + @objc func addTags(_ tags: [Swift.String : Swift.String]) + @objc func removeTag(_ tag: Swift.String) + @objc func removeTags(_ tags: [Swift.String]) + @objc func addEmail(_ email: Swift.String) + @objc func removeEmail(_ email: Swift.String) + @objc func addSms(_ number: Swift.String) + @objc func removeSms(_ number: Swift.String) + @objc func setLanguage(_ language: Swift.String) + typealias OSJwtCompletionBlock = (_ newJwtToken: Swift.String) -> Swift.Void + typealias OSJwtExpiredHandler = (_ externalId: Swift.String, _ completion: (_ newJwtToken: Swift.String) -> Swift.Void) -> Swift.Void + @objc func onJwtExpired(expiredHandler: @escaping Self.OSJwtExpiredHandler) +} +@objc public protocol OSPushSubscription { + @objc var id: Swift.String? { get } + @objc var token: Swift.String? { get } + @objc var optedIn: Swift.Bool { get } + @objc func optIn() + @objc func optOut() + @objc func addObserver(_ observer: OneSignalUser.OSPushSubscriptionObserver) + @objc func removeObserver(_ observer: OneSignalUser.OSPushSubscriptionObserver) +} +@_inheritsConvenienceInitializers @_hasMissingDesignatedInitializers @objc public class OneSignalUserManagerImpl : ObjectiveC.NSObject { + @objc public static let sharedInstance: OneSignalUser.OneSignalUserManagerImpl + @objc public var onesignalId: Swift.String? { + @objc get + } + @objc public var pushSubscriptionId: Swift.String? { + @objc get + } + @objc public var language: Swift.String? { + @objc get + } + @objc public var requiresUserAuth: Swift.Bool + @objc public func start() + @objc public func login(externalId: Swift.String, token: Swift.String?) + @objc public func logout() + public func _logout() + @objc public func clearAllModelsFromStores() + @objc public func getTags() -> [Swift.String : Swift.String]? + @objc public func setLocation(latitude: Swift.Float, longitude: Swift.Float) + @objc public func sendPurchases(_ purchases: [[Swift.String : Swift.AnyObject]]) + @objc deinit +} +extension OneSignalUser.OneSignalUserManagerImpl { + @objc dynamic public func startNewSession() + @objc dynamic public func updateSession(sessionCount: Foundation.NSNumber?, sessionTime: Foundation.NSNumber?, refreshDeviceMetadata: Swift.Bool, sendImmediately: Swift.Bool = false, onSuccess: (() -> Swift.Void)? = nil, onFailure: (() -> Swift.Void)? = nil) + @objc dynamic public func runBackgroundTasks() +} +extension OneSignalUser.OneSignalUserManagerImpl : OneSignalUser.OSUser { + @objc dynamic public func onJwtExpired(expiredHandler: @escaping OneSignalUser.OneSignalUserManagerImpl.OSJwtExpiredHandler) + @objc dynamic public var User: OneSignalUser.OSUser { + @objc get + } + @objc dynamic public var pushSubscription: OneSignalUser.OSPushSubscription { + @objc get + } + @objc dynamic public func addAlias(label: Swift.String, id: Swift.String) + @objc dynamic public func addAliases(_ aliases: [Swift.String : Swift.String]) + @objc dynamic public func removeAlias(_ label: Swift.String) + @objc dynamic public func removeAliases(_ labels: [Swift.String]) + @objc dynamic public func addTag(key: Swift.String, value: Swift.String) + @objc dynamic public func addTags(_ tags: [Swift.String : Swift.String]) + @objc dynamic public func removeTag(_ tag: Swift.String) + @objc dynamic public func removeTags(_ tags: [Swift.String]) + @objc dynamic public func addEmail(_ email: Swift.String) + @objc dynamic public func removeEmail(_ email: Swift.String) + @objc dynamic public func addSms(_ number: Swift.String) + @objc dynamic public func removeSms(_ number: Swift.String) + @objc dynamic public func setLanguage(_ language: Swift.String) +} +extension OneSignalUser.OneSignalUserManagerImpl : OneSignalUser.OSPushSubscription { + @objc dynamic public func addObserver(_ observer: OneSignalUser.OSPushSubscriptionObserver) + @objc dynamic public func removeObserver(_ observer: OneSignalUser.OSPushSubscriptionObserver) + @objc dynamic public var id: Swift.String? { + @objc get + } + @objc dynamic public var token: Swift.String? { + @objc get + } + @objc dynamic public var optedIn: Swift.Bool { + @objc get + } + @objc dynamic public func optIn() + @objc dynamic public func optOut() +} +extension OneSignalUser.OneSignalUserManagerImpl : OneSignalNotifications.OneSignalNotificationsDelegate { + @objc dynamic public func setNotificationTypes(_ notificationTypes: Swift.Int32) + @objc dynamic public func setPushToken(_ pushToken: Swift.String) +} +@objc public protocol OSPushSubscriptionObserver { + @objc func onPushSubscriptionDidChange(state: OneSignalUser.OSPushSubscriptionChangedState) +} +@_hasMissingDesignatedInitializers @objc public class OSPushSubscriptionState : ObjectiveC.NSObject { + @objc final public let id: Swift.String? + @objc final public let token: Swift.String? + @objc final public let optedIn: Swift.Bool + @objc override dynamic public var description: Swift.String { + @objc get + } + @objc public func jsonRepresentation() -> Foundation.NSDictionary + @objc deinit +} +@_hasMissingDesignatedInitializers @objc public class OSPushSubscriptionChangedState : ObjectiveC.NSObject { + @objc final public let current: OneSignalUser.OSPushSubscriptionState + @objc final public let previous: OneSignalUser.OSPushSubscriptionState + @objc override dynamic public var description: Swift.String { + @objc get + } + @objc public func jsonRepresentation() -> Foundation.NSDictionary + @objc deinit +} diff --git a/iOS_SDK/OneSignalSDK/OneSignal_User/OneSignalUser.xcframework/ios-arm64_x86_64-simulator/OneSignalUser.framework/Modules/OneSignalUser.swiftmodule/arm64-apple-ios-simulator.swiftdoc b/iOS_SDK/OneSignalSDK/OneSignal_User/OneSignalUser.xcframework/ios-arm64_x86_64-simulator/OneSignalUser.framework/Modules/OneSignalUser.swiftmodule/arm64-apple-ios-simulator.swiftdoc new file mode 100644 index 000000000..a3af37908 Binary files /dev/null and b/iOS_SDK/OneSignalSDK/OneSignal_User/OneSignalUser.xcframework/ios-arm64_x86_64-simulator/OneSignalUser.framework/Modules/OneSignalUser.swiftmodule/arm64-apple-ios-simulator.swiftdoc differ diff --git a/iOS_SDK/OneSignalSDK/OneSignal_User/OneSignalUser.xcframework/ios-arm64_x86_64-simulator/OneSignalUser.framework/Modules/OneSignalUser.swiftmodule/arm64-apple-ios-simulator.swiftinterface b/iOS_SDK/OneSignalSDK/OneSignal_User/OneSignalUser.xcframework/ios-arm64_x86_64-simulator/OneSignalUser.framework/Modules/OneSignalUser.swiftmodule/arm64-apple-ios-simulator.swiftinterface new file mode 100644 index 000000000..ebb22b783 --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignal_User/OneSignalUser.xcframework/ios-arm64_x86_64-simulator/OneSignalUser.framework/Modules/OneSignalUser.swiftmodule/arm64-apple-ios-simulator.swiftinterface @@ -0,0 +1,130 @@ +// swift-interface-format-version: 1.0 +// swift-compiler-version: Apple Swift version 5.7.1 (swiftlang-5.7.1.135.3 clang-1400.0.29.51) +// swift-module-flags: -target arm64-apple-ios11.0-simulator -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -O -module-name OneSignalUser +// swift-module-flags-ignorable: -enable-bare-slash-regex +import Foundation +import OneSignalCore +import OneSignalNotifications +import OneSignalOSCore +@_exported import OneSignalUser +import Swift +import _Concurrency +import _StringProcessing +@objc public protocol OSUser { + @objc var pushSubscription: OneSignalUser.OSPushSubscription { get } + @objc func addAlias(label: Swift.String, id: Swift.String) + @objc func addAliases(_ aliases: [Swift.String : Swift.String]) + @objc func removeAlias(_ label: Swift.String) + @objc func removeAliases(_ labels: [Swift.String]) + @objc func addTag(key: Swift.String, value: Swift.String) + @objc func addTags(_ tags: [Swift.String : Swift.String]) + @objc func removeTag(_ tag: Swift.String) + @objc func removeTags(_ tags: [Swift.String]) + @objc func addEmail(_ email: Swift.String) + @objc func removeEmail(_ email: Swift.String) + @objc func addSms(_ number: Swift.String) + @objc func removeSms(_ number: Swift.String) + @objc func setLanguage(_ language: Swift.String) + typealias OSJwtCompletionBlock = (_ newJwtToken: Swift.String) -> Swift.Void + typealias OSJwtExpiredHandler = (_ externalId: Swift.String, _ completion: (_ newJwtToken: Swift.String) -> Swift.Void) -> Swift.Void + @objc func onJwtExpired(expiredHandler: @escaping Self.OSJwtExpiredHandler) +} +@objc public protocol OSPushSubscription { + @objc var id: Swift.String? { get } + @objc var token: Swift.String? { get } + @objc var optedIn: Swift.Bool { get } + @objc func optIn() + @objc func optOut() + @objc func addObserver(_ observer: OneSignalUser.OSPushSubscriptionObserver) + @objc func removeObserver(_ observer: OneSignalUser.OSPushSubscriptionObserver) +} +@_inheritsConvenienceInitializers @_hasMissingDesignatedInitializers @objc public class OneSignalUserManagerImpl : ObjectiveC.NSObject { + @objc public static let sharedInstance: OneSignalUser.OneSignalUserManagerImpl + @objc public var onesignalId: Swift.String? { + @objc get + } + @objc public var pushSubscriptionId: Swift.String? { + @objc get + } + @objc public var language: Swift.String? { + @objc get + } + @objc public var requiresUserAuth: Swift.Bool + @objc public func start() + @objc public func login(externalId: Swift.String, token: Swift.String?) + @objc public func logout() + public func _logout() + @objc public func clearAllModelsFromStores() + @objc public func getTags() -> [Swift.String : Swift.String]? + @objc public func setLocation(latitude: Swift.Float, longitude: Swift.Float) + @objc public func sendPurchases(_ purchases: [[Swift.String : Swift.AnyObject]]) + @objc deinit +} +extension OneSignalUser.OneSignalUserManagerImpl { + @objc dynamic public func startNewSession() + @objc dynamic public func updateSession(sessionCount: Foundation.NSNumber?, sessionTime: Foundation.NSNumber?, refreshDeviceMetadata: Swift.Bool, sendImmediately: Swift.Bool = false, onSuccess: (() -> Swift.Void)? = nil, onFailure: (() -> Swift.Void)? = nil) + @objc dynamic public func runBackgroundTasks() +} +extension OneSignalUser.OneSignalUserManagerImpl : OneSignalUser.OSUser { + @objc dynamic public func onJwtExpired(expiredHandler: @escaping OneSignalUser.OneSignalUserManagerImpl.OSJwtExpiredHandler) + @objc dynamic public var User: OneSignalUser.OSUser { + @objc get + } + @objc dynamic public var pushSubscription: OneSignalUser.OSPushSubscription { + @objc get + } + @objc dynamic public func addAlias(label: Swift.String, id: Swift.String) + @objc dynamic public func addAliases(_ aliases: [Swift.String : Swift.String]) + @objc dynamic public func removeAlias(_ label: Swift.String) + @objc dynamic public func removeAliases(_ labels: [Swift.String]) + @objc dynamic public func addTag(key: Swift.String, value: Swift.String) + @objc dynamic public func addTags(_ tags: [Swift.String : Swift.String]) + @objc dynamic public func removeTag(_ tag: Swift.String) + @objc dynamic public func removeTags(_ tags: [Swift.String]) + @objc dynamic public func addEmail(_ email: Swift.String) + @objc dynamic public func removeEmail(_ email: Swift.String) + @objc dynamic public func addSms(_ number: Swift.String) + @objc dynamic public func removeSms(_ number: Swift.String) + @objc dynamic public func setLanguage(_ language: Swift.String) +} +extension OneSignalUser.OneSignalUserManagerImpl : OneSignalUser.OSPushSubscription { + @objc dynamic public func addObserver(_ observer: OneSignalUser.OSPushSubscriptionObserver) + @objc dynamic public func removeObserver(_ observer: OneSignalUser.OSPushSubscriptionObserver) + @objc dynamic public var id: Swift.String? { + @objc get + } + @objc dynamic public var token: Swift.String? { + @objc get + } + @objc dynamic public var optedIn: Swift.Bool { + @objc get + } + @objc dynamic public func optIn() + @objc dynamic public func optOut() +} +extension OneSignalUser.OneSignalUserManagerImpl : OneSignalNotifications.OneSignalNotificationsDelegate { + @objc dynamic public func setNotificationTypes(_ notificationTypes: Swift.Int32) + @objc dynamic public func setPushToken(_ pushToken: Swift.String) +} +@objc public protocol OSPushSubscriptionObserver { + @objc func onPushSubscriptionDidChange(state: OneSignalUser.OSPushSubscriptionChangedState) +} +@_hasMissingDesignatedInitializers @objc public class OSPushSubscriptionState : ObjectiveC.NSObject { + @objc final public let id: Swift.String? + @objc final public let token: Swift.String? + @objc final public let optedIn: Swift.Bool + @objc override dynamic public var description: Swift.String { + @objc get + } + @objc public func jsonRepresentation() -> Foundation.NSDictionary + @objc deinit +} +@_hasMissingDesignatedInitializers @objc public class OSPushSubscriptionChangedState : ObjectiveC.NSObject { + @objc final public let current: OneSignalUser.OSPushSubscriptionState + @objc final public let previous: OneSignalUser.OSPushSubscriptionState + @objc override dynamic public var description: Swift.String { + @objc get + } + @objc public func jsonRepresentation() -> Foundation.NSDictionary + @objc deinit +} diff --git a/iOS_SDK/OneSignalSDK/OneSignal_User/OneSignalUser.xcframework/ios-arm64_x86_64-simulator/OneSignalUser.framework/Modules/OneSignalUser.swiftmodule/x86_64-apple-ios-simulator.abi.json b/iOS_SDK/OneSignalSDK/OneSignal_User/OneSignalUser.xcframework/ios-arm64_x86_64-simulator/OneSignalUser.framework/Modules/OneSignalUser.swiftmodule/x86_64-apple-ios-simulator.abi.json new file mode 100644 index 000000000..9e99e9246 --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignal_User/OneSignalUser.xcframework/ios-arm64_x86_64-simulator/OneSignalUser.framework/Modules/OneSignalUser.swiftmodule/x86_64-apple-ios-simulator.abi.json @@ -0,0 +1,4152 @@ +{ + "ABIRoot": { + "kind": "Root", + "name": "TopLevel", + "printedName": "TopLevel", + "children": [ + { + "kind": "Import", + "name": "Foundation", + "printedName": "Foundation", + "declKind": "Import", + "moduleName": "OneSignalUser", + "declAttributes": [ + "RawDocComment" + ] + }, + { + "kind": "Import", + "name": "OneSignalCore", + "printedName": "OneSignalCore", + "declKind": "Import", + "moduleName": "OneSignalUser" + }, + { + "kind": "Import", + "name": "OneSignalOSCore", + "printedName": "OneSignalOSCore", + "declKind": "Import", + "moduleName": "OneSignalUser" + }, + { + "kind": "Import", + "name": "OneSignalCore", + "printedName": "OneSignalCore", + "declKind": "Import", + "moduleName": "OneSignalUser", + "declAttributes": [ + "RawDocComment" + ] + }, + { + "kind": "Import", + "name": "OneSignalOSCore", + "printedName": "OneSignalOSCore", + "declKind": "Import", + "moduleName": "OneSignalUser" + }, + { + "kind": "Import", + "name": "OneSignalNotifications", + "printedName": "OneSignalNotifications", + "declKind": "Import", + "moduleName": "OneSignalUser" + }, + { + "kind": "TypeDecl", + "name": "OSUser", + "printedName": "OSUser", + "children": [ + { + "kind": "Var", + "name": "pushSubscription", + "printedName": "pushSubscription", + "children": [ + { + "kind": "TypeNominal", + "name": "OSPushSubscription", + "printedName": "OneSignalUser.OSPushSubscription", + "usr": "c:@M@OneSignalUser@objc(pl)OSPushSubscription" + } + ], + "declKind": "Var", + "usr": "c:@M@OneSignalUser@objc(pl)OSUser(py)pushSubscription", + "mangledName": "$s13OneSignalUser6OSUserP16pushSubscriptionAA06OSPushF0_pvp", + "moduleName": "OneSignalUser", + "protocolReq": true, + "declAttributes": [ + "ObjC" + ], + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "OSPushSubscription", + "printedName": "OneSignalUser.OSPushSubscription", + "usr": "c:@M@OneSignalUser@objc(pl)OSPushSubscription" + } + ], + "declKind": "Accessor", + "usr": "c:@M@OneSignalUser@objc(pl)OSUser(im)pushSubscription", + "mangledName": "$s13OneSignalUser6OSUserP16pushSubscriptionAA06OSPushF0_pvg", + "moduleName": "OneSignalUser", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalUser.OSUser>", + "sugared_genericSig": "", + "protocolReq": true, + "declAttributes": [ + "ObjC" + ], + "reqNewWitnessTableEntry": true, + "accessorKind": "get" + } + ] + }, + { + "kind": "Function", + "name": "addAlias", + "printedName": "addAlias(label:id:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Func", + "usr": "c:@M@OneSignalUser@objc(pl)OSUser(im)addAliasWithLabel:id:", + "mangledName": "$s13OneSignalUser6OSUserP8addAlias5label2idySS_SStF", + "moduleName": "OneSignalUser", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalUser.OSUser>", + "sugared_genericSig": "", + "protocolReq": true, + "declAttributes": [ + "RawDocComment", + "ObjC" + ], + "reqNewWitnessTableEntry": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "addAliases", + "printedName": "addAliases(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "Dictionary", + "printedName": "[Swift.String : Swift.String]", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:SD" + } + ], + "declKind": "Func", + "usr": "c:@M@OneSignalUser@objc(pl)OSUser(im)addAliases:", + "mangledName": "$s13OneSignalUser6OSUserP10addAliasesyySDyS2SGF", + "moduleName": "OneSignalUser", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalUser.OSUser>", + "sugared_genericSig": "", + "protocolReq": true, + "declAttributes": [ + "ObjC" + ], + "reqNewWitnessTableEntry": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "removeAlias", + "printedName": "removeAlias(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Func", + "usr": "c:@M@OneSignalUser@objc(pl)OSUser(im)removeAlias:", + "mangledName": "$s13OneSignalUser6OSUserP11removeAliasyySSF", + "moduleName": "OneSignalUser", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalUser.OSUser>", + "sugared_genericSig": "", + "protocolReq": true, + "declAttributes": [ + "ObjC" + ], + "reqNewWitnessTableEntry": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "removeAliases", + "printedName": "removeAliases(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "Array", + "printedName": "[Swift.String]", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:Sa" + } + ], + "declKind": "Func", + "usr": "c:@M@OneSignalUser@objc(pl)OSUser(im)removeAliases:", + "mangledName": "$s13OneSignalUser6OSUserP13removeAliasesyySaySSGF", + "moduleName": "OneSignalUser", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalUser.OSUser>", + "sugared_genericSig": "", + "protocolReq": true, + "declAttributes": [ + "ObjC" + ], + "reqNewWitnessTableEntry": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "addTag", + "printedName": "addTag(key:value:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Func", + "usr": "c:@M@OneSignalUser@objc(pl)OSUser(im)addTagWithKey:value:", + "mangledName": "$s13OneSignalUser6OSUserP6addTag3key5valueySS_SStF", + "moduleName": "OneSignalUser", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalUser.OSUser>", + "sugared_genericSig": "", + "protocolReq": true, + "declAttributes": [ + "RawDocComment", + "ObjC" + ], + "reqNewWitnessTableEntry": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "addTags", + "printedName": "addTags(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "Dictionary", + "printedName": "[Swift.String : Swift.String]", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:SD" + } + ], + "declKind": "Func", + "usr": "c:@M@OneSignalUser@objc(pl)OSUser(im)addTags:", + "mangledName": "$s13OneSignalUser6OSUserP7addTagsyySDyS2SGF", + "moduleName": "OneSignalUser", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalUser.OSUser>", + "sugared_genericSig": "", + "protocolReq": true, + "declAttributes": [ + "ObjC" + ], + "reqNewWitnessTableEntry": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "removeTag", + "printedName": "removeTag(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Func", + "usr": "c:@M@OneSignalUser@objc(pl)OSUser(im)removeTag:", + "mangledName": "$s13OneSignalUser6OSUserP9removeTagyySSF", + "moduleName": "OneSignalUser", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalUser.OSUser>", + "sugared_genericSig": "", + "protocolReq": true, + "declAttributes": [ + "ObjC" + ], + "reqNewWitnessTableEntry": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "removeTags", + "printedName": "removeTags(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "Array", + "printedName": "[Swift.String]", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:Sa" + } + ], + "declKind": "Func", + "usr": "c:@M@OneSignalUser@objc(pl)OSUser(im)removeTags:", + "mangledName": "$s13OneSignalUser6OSUserP10removeTagsyySaySSGF", + "moduleName": "OneSignalUser", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalUser.OSUser>", + "sugared_genericSig": "", + "protocolReq": true, + "declAttributes": [ + "ObjC" + ], + "reqNewWitnessTableEntry": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "addEmail", + "printedName": "addEmail(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Func", + "usr": "c:@M@OneSignalUser@objc(pl)OSUser(im)addEmail:", + "mangledName": "$s13OneSignalUser6OSUserP8addEmailyySSF", + "moduleName": "OneSignalUser", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalUser.OSUser>", + "sugared_genericSig": "", + "protocolReq": true, + "declAttributes": [ + "RawDocComment", + "ObjC" + ], + "reqNewWitnessTableEntry": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "removeEmail", + "printedName": "removeEmail(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Func", + "usr": "c:@M@OneSignalUser@objc(pl)OSUser(im)removeEmail:", + "mangledName": "$s13OneSignalUser6OSUserP11removeEmailyySSF", + "moduleName": "OneSignalUser", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalUser.OSUser>", + "sugared_genericSig": "", + "protocolReq": true, + "declAttributes": [ + "ObjC" + ], + "reqNewWitnessTableEntry": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "addSms", + "printedName": "addSms(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Func", + "usr": "c:@M@OneSignalUser@objc(pl)OSUser(im)addSms:", + "mangledName": "$s13OneSignalUser6OSUserP6addSmsyySSF", + "moduleName": "OneSignalUser", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalUser.OSUser>", + "sugared_genericSig": "", + "protocolReq": true, + "declAttributes": [ + "RawDocComment", + "ObjC" + ], + "reqNewWitnessTableEntry": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "removeSms", + "printedName": "removeSms(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Func", + "usr": "c:@M@OneSignalUser@objc(pl)OSUser(im)removeSms:", + "mangledName": "$s13OneSignalUser6OSUserP9removeSmsyySSF", + "moduleName": "OneSignalUser", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalUser.OSUser>", + "sugared_genericSig": "", + "protocolReq": true, + "declAttributes": [ + "ObjC" + ], + "reqNewWitnessTableEntry": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "setLanguage", + "printedName": "setLanguage(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Func", + "usr": "c:@M@OneSignalUser@objc(pl)OSUser(im)setLanguage:", + "mangledName": "$s13OneSignalUser6OSUserP11setLanguageyySSF", + "moduleName": "OneSignalUser", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalUser.OSUser>", + "sugared_genericSig": "", + "protocolReq": true, + "declAttributes": [ + "RawDocComment", + "ObjC" + ], + "reqNewWitnessTableEntry": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "onJwtExpired", + "printedName": "onJwtExpired(expiredHandler:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeFunc", + "name": "Function", + "printedName": "(Swift.String, (Swift.String) -> ()) -> ()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "Tuple", + "printedName": "(Swift.String, (Swift.String) -> ())", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + }, + { + "kind": "TypeFunc", + "name": "Function", + "printedName": "(Swift.String) -> ()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "typeAttributes": [ + "noescape" + ] + } + ] + } + ] + } + ], + "declKind": "Func", + "usr": "c:@M@OneSignalUser@objc(pl)OSUser(im)onJwtExpiredWithExpiredHandler:", + "mangledName": "$s13OneSignalUser6OSUserP12onJwtExpired14expiredHandleryySS_ySSXEtc_tF", + "moduleName": "OneSignalUser", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalUser.OSUser>", + "sugared_genericSig": "", + "protocolReq": true, + "declAttributes": [ + "ObjC" + ], + "reqNewWitnessTableEntry": true, + "funcSelfKind": "NonMutating" + } + ], + "declKind": "Protocol", + "usr": "c:@M@OneSignalUser@objc(pl)OSUser", + "mangledName": "$s13OneSignalUser6OSUserP", + "moduleName": "OneSignalUser", + "genericSig": "<τ_0_0 : AnyObject>", + "sugared_genericSig": "", + "declAttributes": [ + "AccessControl", + "ObjC", + "RawDocComment" + ] + }, + { + "kind": "TypeDecl", + "name": "OSPushSubscription", + "printedName": "OSPushSubscription", + "children": [ + { + "kind": "Var", + "name": "id", + "printedName": "id", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "Swift.String?", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Var", + "usr": "c:@M@OneSignalUser@objc(pl)OSPushSubscription(py)id", + "mangledName": "$s13OneSignalUser18OSPushSubscriptionP2idSSSgvp", + "moduleName": "OneSignalUser", + "protocolReq": true, + "declAttributes": [ + "ObjC" + ], + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "Swift.String?", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Accessor", + "usr": "c:@M@OneSignalUser@objc(pl)OSPushSubscription(im)id", + "mangledName": "$s13OneSignalUser18OSPushSubscriptionP2idSSSgvg", + "moduleName": "OneSignalUser", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalUser.OSPushSubscription>", + "sugared_genericSig": "", + "protocolReq": true, + "declAttributes": [ + "ObjC" + ], + "reqNewWitnessTableEntry": true, + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "token", + "printedName": "token", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "Swift.String?", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Var", + "usr": "c:@M@OneSignalUser@objc(pl)OSPushSubscription(py)token", + "mangledName": "$s13OneSignalUser18OSPushSubscriptionP5tokenSSSgvp", + "moduleName": "OneSignalUser", + "protocolReq": true, + "declAttributes": [ + "ObjC" + ], + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "Swift.String?", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Accessor", + "usr": "c:@M@OneSignalUser@objc(pl)OSPushSubscription(im)token", + "mangledName": "$s13OneSignalUser18OSPushSubscriptionP5tokenSSSgvg", + "moduleName": "OneSignalUser", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalUser.OSPushSubscription>", + "sugared_genericSig": "", + "protocolReq": true, + "declAttributes": [ + "ObjC" + ], + "reqNewWitnessTableEntry": true, + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "optedIn", + "printedName": "optedIn", + "children": [ + { + "kind": "TypeNominal", + "name": "Bool", + "printedName": "Swift.Bool", + "usr": "s:Sb" + } + ], + "declKind": "Var", + "usr": "c:@M@OneSignalUser@objc(pl)OSPushSubscription(py)optedIn", + "mangledName": "$s13OneSignalUser18OSPushSubscriptionP7optedInSbvp", + "moduleName": "OneSignalUser", + "protocolReq": true, + "declAttributes": [ + "ObjC" + ], + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "Bool", + "printedName": "Swift.Bool", + "usr": "s:Sb" + } + ], + "declKind": "Accessor", + "usr": "c:@M@OneSignalUser@objc(pl)OSPushSubscription(im)optedIn", + "mangledName": "$s13OneSignalUser18OSPushSubscriptionP7optedInSbvg", + "moduleName": "OneSignalUser", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalUser.OSPushSubscription>", + "sugared_genericSig": "", + "protocolReq": true, + "declAttributes": [ + "ObjC" + ], + "reqNewWitnessTableEntry": true, + "accessorKind": "get" + } + ] + }, + { + "kind": "Function", + "name": "optIn", + "printedName": "optIn()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + } + ], + "declKind": "Func", + "usr": "c:@M@OneSignalUser@objc(pl)OSPushSubscription(im)optIn", + "mangledName": "$s13OneSignalUser18OSPushSubscriptionP5optInyyF", + "moduleName": "OneSignalUser", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalUser.OSPushSubscription>", + "sugared_genericSig": "", + "protocolReq": true, + "declAttributes": [ + "ObjC" + ], + "reqNewWitnessTableEntry": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "optOut", + "printedName": "optOut()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + } + ], + "declKind": "Func", + "usr": "c:@M@OneSignalUser@objc(pl)OSPushSubscription(im)optOut", + "mangledName": "$s13OneSignalUser18OSPushSubscriptionP6optOutyyF", + "moduleName": "OneSignalUser", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalUser.OSPushSubscription>", + "sugared_genericSig": "", + "protocolReq": true, + "declAttributes": [ + "ObjC" + ], + "reqNewWitnessTableEntry": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "addObserver", + "printedName": "addObserver(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "OSPushSubscriptionObserver", + "printedName": "OneSignalUser.OSPushSubscriptionObserver", + "usr": "c:@M@OneSignalUser@objc(pl)OSPushSubscriptionObserver" + } + ], + "declKind": "Func", + "usr": "c:@M@OneSignalUser@objc(pl)OSPushSubscription(im)addObserver:", + "mangledName": "$s13OneSignalUser18OSPushSubscriptionP11addObserveryyAA0deG0_pF", + "moduleName": "OneSignalUser", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalUser.OSPushSubscription>", + "sugared_genericSig": "", + "protocolReq": true, + "declAttributes": [ + "ObjC" + ], + "reqNewWitnessTableEntry": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "removeObserver", + "printedName": "removeObserver(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "OSPushSubscriptionObserver", + "printedName": "OneSignalUser.OSPushSubscriptionObserver", + "usr": "c:@M@OneSignalUser@objc(pl)OSPushSubscriptionObserver" + } + ], + "declKind": "Func", + "usr": "c:@M@OneSignalUser@objc(pl)OSPushSubscription(im)removeObserver:", + "mangledName": "$s13OneSignalUser18OSPushSubscriptionP14removeObserveryyAA0deG0_pF", + "moduleName": "OneSignalUser", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalUser.OSPushSubscription>", + "sugared_genericSig": "", + "protocolReq": true, + "declAttributes": [ + "ObjC" + ], + "reqNewWitnessTableEntry": true, + "funcSelfKind": "NonMutating" + } + ], + "declKind": "Protocol", + "usr": "c:@M@OneSignalUser@objc(pl)OSPushSubscription", + "mangledName": "$s13OneSignalUser18OSPushSubscriptionP", + "moduleName": "OneSignalUser", + "genericSig": "<τ_0_0 : AnyObject>", + "sugared_genericSig": "", + "declAttributes": [ + "AccessControl", + "ObjC", + "RawDocComment" + ] + }, + { + "kind": "TypeDecl", + "name": "OneSignalUserManagerImpl", + "printedName": "OneSignalUserManagerImpl", + "children": [ + { + "kind": "Var", + "name": "sharedInstance", + "printedName": "sharedInstance", + "children": [ + { + "kind": "TypeNominal", + "name": "OneSignalUserManagerImpl", + "printedName": "OneSignalUser.OneSignalUserManagerImpl", + "usr": "c:@M@OneSignalUser@objc(cs)OneSignalUserManagerImpl" + } + ], + "declKind": "Var", + "usr": "c:@M@OneSignalUser@objc(cs)OneSignalUserManagerImpl(cpy)sharedInstance", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC14sharedInstanceACvpZ", + "moduleName": "OneSignalUser", + "static": true, + "declAttributes": [ + "HasInitialValue", + "Final", + "HasStorage", + "AccessControl", + "ObjC" + ], + "isLet": true, + "hasStorage": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "OneSignalUserManagerImpl", + "printedName": "OneSignalUser.OneSignalUserManagerImpl", + "usr": "c:@M@OneSignalUser@objc(cs)OneSignalUserManagerImpl" + } + ], + "declKind": "Accessor", + "usr": "c:@M@OneSignalUser@objc(cs)OneSignalUserManagerImpl(cm)sharedInstance", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC14sharedInstanceACvgZ", + "moduleName": "OneSignalUser", + "static": true, + "implicit": true, + "declAttributes": [ + "Final", + "ObjC" + ], + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "onesignalId", + "printedName": "onesignalId", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "Swift.String?", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Var", + "usr": "c:@M@OneSignalUser@objc(cs)OneSignalUserManagerImpl(py)onesignalId", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC11onesignalIdSSSgvp", + "moduleName": "OneSignalUser", + "declAttributes": [ + "AccessControl", + "ObjC" + ], + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "Swift.String?", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Accessor", + "usr": "c:@M@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)onesignalId", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC11onesignalIdSSSgvg", + "moduleName": "OneSignalUser", + "declAttributes": [ + "ObjC" + ], + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "pushSubscriptionId", + "printedName": "pushSubscriptionId", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "Swift.String?", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Var", + "usr": "c:@M@OneSignalUser@objc(cs)OneSignalUserManagerImpl(py)pushSubscriptionId", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC18pushSubscriptionIdSSSgvp", + "moduleName": "OneSignalUser", + "declAttributes": [ + "AccessControl", + "ObjC" + ], + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "Swift.String?", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Accessor", + "usr": "c:@M@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)pushSubscriptionId", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC18pushSubscriptionIdSSSgvg", + "moduleName": "OneSignalUser", + "declAttributes": [ + "ObjC" + ], + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "language", + "printedName": "language", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "Swift.String?", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Var", + "usr": "c:@M@OneSignalUser@objc(cs)OneSignalUserManagerImpl(py)language", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC8languageSSSgvp", + "moduleName": "OneSignalUser", + "declAttributes": [ + "AccessControl", + "ObjC" + ], + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "Swift.String?", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Accessor", + "usr": "c:@M@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)language", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC8languageSSSgvg", + "moduleName": "OneSignalUser", + "declAttributes": [ + "ObjC" + ], + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "requiresUserAuth", + "printedName": "requiresUserAuth", + "children": [ + { + "kind": "TypeNominal", + "name": "Bool", + "printedName": "Swift.Bool", + "usr": "s:Sb" + } + ], + "declKind": "Var", + "usr": "c:@M@OneSignalUser@objc(cs)OneSignalUserManagerImpl(py)requiresUserAuth", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC08requiresC4AuthSbvp", + "moduleName": "OneSignalUser", + "declAttributes": [ + "HasInitialValue", + "HasStorage", + "AccessControl", + "ObjC" + ], + "hasStorage": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "Bool", + "printedName": "Swift.Bool", + "usr": "s:Sb" + } + ], + "declKind": "Accessor", + "usr": "c:@M@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)requiresUserAuth", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC08requiresC4AuthSbvg", + "moduleName": "OneSignalUser", + "implicit": true, + "declAttributes": [ + "ObjC" + ], + "accessorKind": "get" + }, + { + "kind": "Accessor", + "name": "Set", + "printedName": "Set()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "Bool", + "printedName": "Swift.Bool", + "usr": "s:Sb" + } + ], + "declKind": "Accessor", + "usr": "c:@M@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)setRequiresUserAuth:", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC08requiresC4AuthSbvs", + "moduleName": "OneSignalUser", + "implicit": true, + "declAttributes": [ + "ObjC" + ], + "accessorKind": "set" + }, + { + "kind": "Accessor", + "name": "Modify", + "printedName": "Modify()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + } + ], + "declKind": "Accessor", + "usr": "s:13OneSignalUser0abC11ManagerImplC08requiresC4AuthSbvM", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC08requiresC4AuthSbvM", + "moduleName": "OneSignalUser", + "implicit": true, + "accessorKind": "_modify" + } + ] + }, + { + "kind": "Function", + "name": "start", + "printedName": "start()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + } + ], + "declKind": "Func", + "usr": "c:@M@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)start", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC5startyyF", + "moduleName": "OneSignalUser", + "declAttributes": [ + "AccessControl", + "ObjC", + "RawDocComment" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "login", + "printedName": "login(externalId:token:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + }, + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "Swift.String?", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Func", + "usr": "c:@M@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)loginWithExternalId:token:", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC5login10externalId5tokenySS_SSSgtF", + "moduleName": "OneSignalUser", + "objc_name": "loginWithExternalId:token:", + "declAttributes": [ + "ObjC", + "AccessControl" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "logout", + "printedName": "logout()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + } + ], + "declKind": "Func", + "usr": "c:@M@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)logout", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC6logoutyyF", + "moduleName": "OneSignalUser", + "objc_name": "logout", + "declAttributes": [ + "ObjC", + "AccessControl", + "RawDocComment" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "_logout", + "printedName": "_logout()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + } + ], + "declKind": "Func", + "usr": "s:13OneSignalUser0abC11ManagerImplC7_logoutyyF", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC7_logoutyyF", + "moduleName": "OneSignalUser", + "declAttributes": [ + "AccessControl" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "clearAllModelsFromStores", + "printedName": "clearAllModelsFromStores()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + } + ], + "declKind": "Func", + "usr": "c:@M@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)clearAllModelsFromStores", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC24clearAllModelsFromStoresyyF", + "moduleName": "OneSignalUser", + "declAttributes": [ + "AccessControl", + "ObjC" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "getTags", + "printedName": "getTags()", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "[Swift.String : Swift.String]?", + "children": [ + { + "kind": "TypeNominal", + "name": "Dictionary", + "printedName": "[Swift.String : Swift.String]", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:SD" + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Func", + "usr": "c:@M@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)getTags", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC7getTagsSDyS2SGSgyF", + "moduleName": "OneSignalUser", + "declAttributes": [ + "AccessControl", + "ObjC" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "setLocation", + "printedName": "setLocation(latitude:longitude:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "Float", + "printedName": "Swift.Float", + "usr": "s:Sf" + }, + { + "kind": "TypeNominal", + "name": "Float", + "printedName": "Swift.Float", + "usr": "s:Sf" + } + ], + "declKind": "Func", + "usr": "c:@M@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)setLocationWithLatitude:longitude:", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC11setLocation8latitude9longitudeySf_SftF", + "moduleName": "OneSignalUser", + "objc_name": "setLocationWithLatitude:longitude:", + "declAttributes": [ + "ObjC", + "AccessControl" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "sendPurchases", + "printedName": "sendPurchases(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "Array", + "printedName": "[[Swift.String : AnyObject]]", + "children": [ + { + "kind": "TypeNominal", + "name": "Dictionary", + "printedName": "[Swift.String : AnyObject]", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + }, + { + "kind": "TypeNominal", + "name": "ProtocolComposition", + "printedName": "AnyObject" + } + ], + "usr": "s:SD" + } + ], + "usr": "s:Sa" + } + ], + "declKind": "Func", + "usr": "c:@M@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)sendPurchases:", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC13sendPurchasesyySaySDySSyXlGGF", + "moduleName": "OneSignalUser", + "objc_name": "sendPurchases:", + "declAttributes": [ + "ObjC", + "AccessControl" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "startNewSession", + "printedName": "startNewSession()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + } + ], + "declKind": "Func", + "usr": "c:@CM@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)startNewSession", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC15startNewSessionyyF", + "moduleName": "OneSignalUser", + "declAttributes": [ + "Dynamic", + "AccessControl", + "ObjC" + ], + "isFromExtension": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "updateSession", + "printedName": "updateSession(sessionCount:sessionTime:refreshDeviceMetadata:sendImmediately:onSuccess:onFailure:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "Foundation.NSNumber?", + "children": [ + { + "kind": "TypeNominal", + "name": "NSNumber", + "printedName": "Foundation.NSNumber", + "usr": "c:objc(cs)NSNumber" + } + ], + "usr": "s:Sq" + }, + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "Foundation.NSNumber?", + "children": [ + { + "kind": "TypeNominal", + "name": "NSNumber", + "printedName": "Foundation.NSNumber", + "usr": "c:objc(cs)NSNumber" + } + ], + "usr": "s:Sq" + }, + { + "kind": "TypeNominal", + "name": "Bool", + "printedName": "Swift.Bool", + "usr": "s:Sb" + }, + { + "kind": "TypeNominal", + "name": "Bool", + "printedName": "Swift.Bool", + "hasDefaultArg": true, + "usr": "s:Sb" + }, + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "(() -> ())?", + "children": [ + { + "kind": "TypeFunc", + "name": "Function", + "printedName": "() -> ()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + } + ] + } + ], + "hasDefaultArg": true, + "usr": "s:Sq" + }, + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "(() -> ())?", + "children": [ + { + "kind": "TypeFunc", + "name": "Function", + "printedName": "() -> ()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + } + ] + } + ], + "hasDefaultArg": true, + "usr": "s:Sq" + } + ], + "declKind": "Func", + "usr": "c:@CM@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)updateSessionWithSessionCount:sessionTime:refreshDeviceMetadata:sendImmediately:onSuccess:onFailure:", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC13updateSession12sessionCount0H4Time21refreshDeviceMetadata15sendImmediately9onSuccess0P7FailureySo8NSNumberCSg_AMS2byycSgANtF", + "moduleName": "OneSignalUser", + "objc_name": "updateSessionWithSessionCount:sessionTime:refreshDeviceMetadata:sendImmediately:onSuccess:onFailure:", + "declAttributes": [ + "Dynamic", + "AccessControl", + "ObjC" + ], + "isFromExtension": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "runBackgroundTasks", + "printedName": "runBackgroundTasks()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + } + ], + "declKind": "Func", + "usr": "c:@CM@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)runBackgroundTasks", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC18runBackgroundTasksyyF", + "moduleName": "OneSignalUser", + "declAttributes": [ + "Dynamic", + "AccessControl", + "ObjC", + "RawDocComment" + ], + "isFromExtension": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "onJwtExpired", + "printedName": "onJwtExpired(expiredHandler:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeFunc", + "name": "Function", + "printedName": "(Swift.String, (Swift.String) -> ()) -> ()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "Tuple", + "printedName": "(Swift.String, (Swift.String) -> ())", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + }, + { + "kind": "TypeFunc", + "name": "Function", + "printedName": "(Swift.String) -> ()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "typeAttributes": [ + "noescape" + ] + } + ] + } + ] + } + ], + "declKind": "Func", + "usr": "c:@CM@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)onJwtExpiredWithExpiredHandler:", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC12onJwtExpired14expiredHandleryySS_ySSXEtc_tF", + "moduleName": "OneSignalUser", + "objc_name": "onJwtExpiredWithExpiredHandler:", + "declAttributes": [ + "Dynamic", + "ObjC", + "AccessControl" + ], + "isFromExtension": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Var", + "name": "User", + "printedName": "User", + "children": [ + { + "kind": "TypeNominal", + "name": "OSUser", + "printedName": "OneSignalUser.OSUser", + "usr": "c:@M@OneSignalUser@objc(pl)OSUser" + } + ], + "declKind": "Var", + "usr": "c:@CM@OneSignalUser@objc(cs)OneSignalUserManagerImpl(py)User", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC0C0AA6OSUser_pvp", + "moduleName": "OneSignalUser", + "objc_name": "User", + "declAttributes": [ + "Dynamic", + "ObjC", + "AccessControl" + ], + "isFromExtension": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "OSUser", + "printedName": "OneSignalUser.OSUser", + "usr": "c:@M@OneSignalUser@objc(pl)OSUser" + } + ], + "declKind": "Accessor", + "usr": "c:@CM@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)User", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC0C0AA6OSUser_pvg", + "moduleName": "OneSignalUser", + "objc_name": "User", + "declAttributes": [ + "Dynamic", + "ObjC" + ], + "isFromExtension": true, + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "pushSubscription", + "printedName": "pushSubscription", + "children": [ + { + "kind": "TypeNominal", + "name": "OSPushSubscription", + "printedName": "OneSignalUser.OSPushSubscription", + "usr": "c:@M@OneSignalUser@objc(pl)OSPushSubscription" + } + ], + "declKind": "Var", + "usr": "c:@CM@OneSignalUser@objc(cs)OneSignalUserManagerImpl(py)pushSubscription", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC16pushSubscriptionAA06OSPushG0_pvp", + "moduleName": "OneSignalUser", + "objc_name": "pushSubscription", + "declAttributes": [ + "Dynamic", + "ObjC", + "AccessControl" + ], + "isFromExtension": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "OSPushSubscription", + "printedName": "OneSignalUser.OSPushSubscription", + "usr": "c:@M@OneSignalUser@objc(pl)OSPushSubscription" + } + ], + "declKind": "Accessor", + "usr": "c:@CM@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)pushSubscription", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC16pushSubscriptionAA06OSPushG0_pvg", + "moduleName": "OneSignalUser", + "objc_name": "pushSubscription", + "declAttributes": [ + "Dynamic", + "ObjC" + ], + "isFromExtension": true, + "accessorKind": "get" + } + ] + }, + { + "kind": "Function", + "name": "addAlias", + "printedName": "addAlias(label:id:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Func", + "usr": "c:@CM@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)addAliasWithLabel:id:", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC8addAlias5label2idySS_SStF", + "moduleName": "OneSignalUser", + "objc_name": "addAliasWithLabel:id:", + "declAttributes": [ + "Dynamic", + "ObjC", + "AccessControl" + ], + "isFromExtension": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "addAliases", + "printedName": "addAliases(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "Dictionary", + "printedName": "[Swift.String : Swift.String]", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:SD" + } + ], + "declKind": "Func", + "usr": "c:@CM@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)addAliases:", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC10addAliasesyySDyS2SGF", + "moduleName": "OneSignalUser", + "objc_name": "addAliases:", + "declAttributes": [ + "Dynamic", + "ObjC", + "AccessControl" + ], + "isFromExtension": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "removeAlias", + "printedName": "removeAlias(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Func", + "usr": "c:@CM@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)removeAlias:", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC11removeAliasyySSF", + "moduleName": "OneSignalUser", + "objc_name": "removeAlias:", + "declAttributes": [ + "Dynamic", + "ObjC", + "AccessControl" + ], + "isFromExtension": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "removeAliases", + "printedName": "removeAliases(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "Array", + "printedName": "[Swift.String]", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:Sa" + } + ], + "declKind": "Func", + "usr": "c:@CM@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)removeAliases:", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC13removeAliasesyySaySSGF", + "moduleName": "OneSignalUser", + "objc_name": "removeAliases:", + "declAttributes": [ + "Dynamic", + "ObjC", + "AccessControl" + ], + "isFromExtension": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "addTag", + "printedName": "addTag(key:value:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Func", + "usr": "c:@CM@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)addTagWithKey:value:", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC6addTag3key5valueySS_SStF", + "moduleName": "OneSignalUser", + "objc_name": "addTagWithKey:value:", + "declAttributes": [ + "Dynamic", + "ObjC", + "AccessControl" + ], + "isFromExtension": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "addTags", + "printedName": "addTags(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "Dictionary", + "printedName": "[Swift.String : Swift.String]", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:SD" + } + ], + "declKind": "Func", + "usr": "c:@CM@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)addTags:", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC7addTagsyySDyS2SGF", + "moduleName": "OneSignalUser", + "objc_name": "addTags:", + "declAttributes": [ + "Dynamic", + "ObjC", + "AccessControl" + ], + "isFromExtension": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "removeTag", + "printedName": "removeTag(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Func", + "usr": "c:@CM@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)removeTag:", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC9removeTagyySSF", + "moduleName": "OneSignalUser", + "objc_name": "removeTag:", + "declAttributes": [ + "Dynamic", + "ObjC", + "AccessControl" + ], + "isFromExtension": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "removeTags", + "printedName": "removeTags(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "Array", + "printedName": "[Swift.String]", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:Sa" + } + ], + "declKind": "Func", + "usr": "c:@CM@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)removeTags:", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC10removeTagsyySaySSGF", + "moduleName": "OneSignalUser", + "objc_name": "removeTags:", + "declAttributes": [ + "Dynamic", + "ObjC", + "AccessControl" + ], + "isFromExtension": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "addEmail", + "printedName": "addEmail(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Func", + "usr": "c:@CM@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)addEmail:", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC8addEmailyySSF", + "moduleName": "OneSignalUser", + "objc_name": "addEmail:", + "declAttributes": [ + "Dynamic", + "ObjC", + "AccessControl" + ], + "isFromExtension": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "removeEmail", + "printedName": "removeEmail(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Func", + "usr": "c:@CM@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)removeEmail:", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC11removeEmailyySSF", + "moduleName": "OneSignalUser", + "objc_name": "removeEmail:", + "declAttributes": [ + "Dynamic", + "ObjC", + "AccessControl", + "RawDocComment" + ], + "isFromExtension": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "addSms", + "printedName": "addSms(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Func", + "usr": "c:@CM@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)addSms:", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC6addSmsyySSF", + "moduleName": "OneSignalUser", + "objc_name": "addSms:", + "declAttributes": [ + "Dynamic", + "ObjC", + "AccessControl" + ], + "isFromExtension": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "removeSms", + "printedName": "removeSms(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Func", + "usr": "c:@CM@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)removeSms:", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC9removeSmsyySSF", + "moduleName": "OneSignalUser", + "objc_name": "removeSms:", + "declAttributes": [ + "Dynamic", + "ObjC", + "AccessControl", + "RawDocComment" + ], + "isFromExtension": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "setLanguage", + "printedName": "setLanguage(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Func", + "usr": "c:@CM@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)setLanguage:", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC11setLanguageyySSF", + "moduleName": "OneSignalUser", + "objc_name": "setLanguage:", + "declAttributes": [ + "Dynamic", + "ObjC", + "AccessControl" + ], + "isFromExtension": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "addObserver", + "printedName": "addObserver(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "OSPushSubscriptionObserver", + "printedName": "OneSignalUser.OSPushSubscriptionObserver", + "usr": "c:@M@OneSignalUser@objc(pl)OSPushSubscriptionObserver" + } + ], + "declKind": "Func", + "usr": "c:@CM@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)addObserver:", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC11addObserveryyAA018OSPushSubscriptionG0_pF", + "moduleName": "OneSignalUser", + "objc_name": "addObserver:", + "declAttributes": [ + "Dynamic", + "ObjC", + "AccessControl" + ], + "isFromExtension": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "removeObserver", + "printedName": "removeObserver(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "OSPushSubscriptionObserver", + "printedName": "OneSignalUser.OSPushSubscriptionObserver", + "usr": "c:@M@OneSignalUser@objc(pl)OSPushSubscriptionObserver" + } + ], + "declKind": "Func", + "usr": "c:@CM@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)removeObserver:", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC14removeObserveryyAA018OSPushSubscriptionG0_pF", + "moduleName": "OneSignalUser", + "objc_name": "removeObserver:", + "declAttributes": [ + "Dynamic", + "ObjC", + "AccessControl" + ], + "isFromExtension": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Var", + "name": "id", + "printedName": "id", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "Swift.String?", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Var", + "usr": "c:@CM@OneSignalUser@objc(cs)OneSignalUserManagerImpl(py)id", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC2idSSSgvp", + "moduleName": "OneSignalUser", + "objc_name": "id", + "declAttributes": [ + "Dynamic", + "ObjC", + "AccessControl" + ], + "isFromExtension": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "Swift.String?", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Accessor", + "usr": "c:@CM@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)id", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC2idSSSgvg", + "moduleName": "OneSignalUser", + "objc_name": "id", + "declAttributes": [ + "Dynamic", + "ObjC" + ], + "isFromExtension": true, + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "token", + "printedName": "token", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "Swift.String?", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Var", + "usr": "c:@CM@OneSignalUser@objc(cs)OneSignalUserManagerImpl(py)token", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC5tokenSSSgvp", + "moduleName": "OneSignalUser", + "objc_name": "token", + "declAttributes": [ + "Dynamic", + "ObjC", + "AccessControl" + ], + "isFromExtension": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "Swift.String?", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Accessor", + "usr": "c:@CM@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)token", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC5tokenSSSgvg", + "moduleName": "OneSignalUser", + "objc_name": "token", + "declAttributes": [ + "Dynamic", + "ObjC" + ], + "isFromExtension": true, + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "optedIn", + "printedName": "optedIn", + "children": [ + { + "kind": "TypeNominal", + "name": "Bool", + "printedName": "Swift.Bool", + "usr": "s:Sb" + } + ], + "declKind": "Var", + "usr": "c:@CM@OneSignalUser@objc(cs)OneSignalUserManagerImpl(py)optedIn", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC7optedInSbvp", + "moduleName": "OneSignalUser", + "objc_name": "optedIn", + "declAttributes": [ + "Dynamic", + "ObjC", + "AccessControl" + ], + "isFromExtension": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "Bool", + "printedName": "Swift.Bool", + "usr": "s:Sb" + } + ], + "declKind": "Accessor", + "usr": "c:@CM@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)optedIn", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC7optedInSbvg", + "moduleName": "OneSignalUser", + "objc_name": "optedIn", + "declAttributes": [ + "Dynamic", + "ObjC" + ], + "isFromExtension": true, + "accessorKind": "get" + } + ] + }, + { + "kind": "Function", + "name": "optIn", + "printedName": "optIn()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + } + ], + "declKind": "Func", + "usr": "c:@CM@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)optIn", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC5optInyyF", + "moduleName": "OneSignalUser", + "objc_name": "optIn", + "declAttributes": [ + "Dynamic", + "ObjC", + "AccessControl", + "RawDocComment" + ], + "isFromExtension": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "optOut", + "printedName": "optOut()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + } + ], + "declKind": "Func", + "usr": "c:@CM@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)optOut", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC6optOutyyF", + "moduleName": "OneSignalUser", + "objc_name": "optOut", + "declAttributes": [ + "Dynamic", + "ObjC", + "AccessControl" + ], + "isFromExtension": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "setNotificationTypes", + "printedName": "setNotificationTypes(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "Int32", + "printedName": "Swift.Int32", + "usr": "s:s5Int32V" + } + ], + "declKind": "Func", + "usr": "c:@CM@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)setNotificationTypes:", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC20setNotificationTypesyys5Int32VF", + "moduleName": "OneSignalUser", + "objc_name": "setNotificationTypes:", + "declAttributes": [ + "Dynamic", + "ObjC", + "AccessControl", + "RawDocComment" + ], + "isFromExtension": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "setPushToken", + "printedName": "setPushToken(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Func", + "usr": "c:@CM@OneSignalUser@objc(cs)OneSignalUserManagerImpl(im)setPushToken:", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC12setPushTokenyySSF", + "moduleName": "OneSignalUser", + "objc_name": "setPushToken:", + "declAttributes": [ + "Dynamic", + "ObjC", + "AccessControl" + ], + "isFromExtension": true, + "funcSelfKind": "NonMutating" + } + ], + "declKind": "Class", + "usr": "c:@M@OneSignalUser@objc(cs)OneSignalUserManagerImpl", + "mangledName": "$s13OneSignalUser0abC11ManagerImplC", + "moduleName": "OneSignalUser", + "declAttributes": [ + "AccessControl", + "ObjC" + ], + "superclassUsr": "c:objc(cs)NSObject", + "hasMissingDesignatedInitializers": true, + "inheritsConvenienceInitializers": true, + "superclassNames": [ + "ObjectiveC.NSObject" + ], + "conformances": [ + { + "kind": "Conformance", + "name": "Equatable", + "printedName": "Equatable", + "usr": "s:SQ", + "mangledName": "$sSQ" + }, + { + "kind": "Conformance", + "name": "Hashable", + "printedName": "Hashable", + "usr": "s:SH", + "mangledName": "$sSH" + }, + { + "kind": "Conformance", + "name": "CVarArg", + "printedName": "CVarArg", + "usr": "s:s7CVarArgP", + "mangledName": "$ss7CVarArgP" + }, + { + "kind": "Conformance", + "name": "_KeyValueCodingAndObservingPublishing", + "printedName": "_KeyValueCodingAndObservingPublishing", + "usr": "s:10Foundation37_KeyValueCodingAndObservingPublishingP", + "mangledName": "$s10Foundation37_KeyValueCodingAndObservingPublishingP" + }, + { + "kind": "Conformance", + "name": "_KeyValueCodingAndObserving", + "printedName": "_KeyValueCodingAndObserving", + "usr": "s:10Foundation27_KeyValueCodingAndObservingP", + "mangledName": "$s10Foundation27_KeyValueCodingAndObservingP" + }, + { + "kind": "Conformance", + "name": "CustomStringConvertible", + "printedName": "CustomStringConvertible", + "usr": "s:s23CustomStringConvertibleP", + "mangledName": "$ss23CustomStringConvertibleP" + }, + { + "kind": "Conformance", + "name": "CustomDebugStringConvertible", + "printedName": "CustomDebugStringConvertible", + "usr": "s:s28CustomDebugStringConvertibleP", + "mangledName": "$ss28CustomDebugStringConvertibleP" + }, + { + "kind": "Conformance", + "name": "OSUser", + "printedName": "OSUser", + "usr": "c:@M@OneSignalUser@objc(pl)OSUser", + "mangledName": "$s13OneSignalUser6OSUserP" + }, + { + "kind": "Conformance", + "name": "OSPushSubscription", + "printedName": "OSPushSubscription", + "usr": "c:@M@OneSignalUser@objc(pl)OSPushSubscription", + "mangledName": "$s13OneSignalUser18OSPushSubscriptionP" + } + ] + }, + { + "kind": "Import", + "name": "Foundation", + "printedName": "Foundation", + "declKind": "Import", + "moduleName": "OneSignalUser", + "declAttributes": [ + "RawDocComment" + ] + }, + { + "kind": "Import", + "name": "OneSignalOSCore", + "printedName": "OneSignalOSCore", + "declKind": "Import", + "moduleName": "OneSignalUser" + }, + { + "kind": "Import", + "name": "OneSignalCore", + "printedName": "OneSignalCore", + "declKind": "Import", + "moduleName": "OneSignalUser" + }, + { + "kind": "Import", + "name": "OneSignalOSCore", + "printedName": "OneSignalOSCore", + "declKind": "Import", + "moduleName": "OneSignalUser", + "declAttributes": [ + "RawDocComment" + ] + }, + { + "kind": "Import", + "name": "OneSignalCore", + "printedName": "OneSignalCore", + "declKind": "Import", + "moduleName": "OneSignalUser" + }, + { + "kind": "Import", + "name": "Foundation", + "printedName": "Foundation", + "declKind": "Import", + "moduleName": "OneSignalUser", + "declAttributes": [ + "RawDocComment" + ] + }, + { + "kind": "Import", + "name": "OneSignalCore", + "printedName": "OneSignalCore", + "declKind": "Import", + "moduleName": "OneSignalUser" + }, + { + "kind": "Import", + "name": "OneSignalOSCore", + "printedName": "OneSignalOSCore", + "declKind": "Import", + "moduleName": "OneSignalUser" + }, + { + "kind": "Import", + "name": "OneSignalCore", + "printedName": "OneSignalCore", + "declKind": "Import", + "moduleName": "OneSignalUser", + "declAttributes": [ + "RawDocComment" + ] + }, + { + "kind": "Import", + "name": "OneSignalOSCore", + "printedName": "OneSignalOSCore", + "declKind": "Import", + "moduleName": "OneSignalUser" + }, + { + "kind": "Import", + "name": "OneSignalOSCore", + "printedName": "OneSignalOSCore", + "declKind": "Import", + "moduleName": "OneSignalUser", + "declAttributes": [ + "RawDocComment" + ] + }, + { + "kind": "Import", + "name": "OneSignalCore", + "printedName": "OneSignalCore", + "declKind": "Import", + "moduleName": "OneSignalUser" + }, + { + "kind": "Import", + "name": "Foundation", + "printedName": "Foundation", + "declKind": "Import", + "moduleName": "OneSignalUser", + "declAttributes": [ + "RawDocComment" + ] + }, + { + "kind": "Import", + "name": "OneSignalCore", + "printedName": "OneSignalCore", + "declKind": "Import", + "moduleName": "OneSignalUser" + }, + { + "kind": "Import", + "name": "OneSignalOSCore", + "printedName": "OneSignalOSCore", + "declKind": "Import", + "moduleName": "OneSignalUser" + }, + { + "kind": "Import", + "name": "OneSignalNotifications", + "printedName": "OneSignalNotifications", + "declKind": "Import", + "moduleName": "OneSignalUser" + }, + { + "kind": "TypeDecl", + "name": "OSPushSubscriptionObserver", + "printedName": "OSPushSubscriptionObserver", + "children": [ + { + "kind": "Function", + "name": "onPushSubscriptionDidChange", + "printedName": "onPushSubscriptionDidChange(state:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "OSPushSubscriptionChangedState", + "printedName": "OneSignalUser.OSPushSubscriptionChangedState", + "usr": "c:@M@OneSignalUser@objc(cs)OSPushSubscriptionChangedState" + } + ], + "declKind": "Func", + "usr": "c:@M@OneSignalUser@objc(pl)OSPushSubscriptionObserver(im)onPushSubscriptionDidChangeWithState:", + "mangledName": "$s13OneSignalUser26OSPushSubscriptionObserverP06onPushE9DidChange5stateyAA0dE12ChangedStateC_tF", + "moduleName": "OneSignalUser", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalUser.OSPushSubscriptionObserver>", + "sugared_genericSig": "", + "protocolReq": true, + "objc_name": "onPushSubscriptionDidChangeWithState:", + "declAttributes": [ + "ObjC", + "RawDocComment" + ], + "reqNewWitnessTableEntry": true, + "funcSelfKind": "NonMutating" + } + ], + "declKind": "Protocol", + "usr": "c:@M@OneSignalUser@objc(pl)OSPushSubscriptionObserver", + "mangledName": "$s13OneSignalUser26OSPushSubscriptionObserverP", + "moduleName": "OneSignalUser", + "genericSig": "<τ_0_0 : AnyObject>", + "sugared_genericSig": "", + "declAttributes": [ + "AccessControl", + "ObjC", + "RawDocComment" + ] + }, + { + "kind": "TypeDecl", + "name": "OSPushSubscriptionState", + "printedName": "OSPushSubscriptionState", + "children": [ + { + "kind": "Var", + "name": "id", + "printedName": "id", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "Swift.String?", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Var", + "usr": "c:@M@OneSignalUser@objc(cs)OSPushSubscriptionState(py)id", + "mangledName": "$s13OneSignalUser23OSPushSubscriptionStateC2idSSSgvp", + "moduleName": "OneSignalUser", + "declAttributes": [ + "Final", + "HasStorage", + "AccessControl", + "ObjC" + ], + "isLet": true, + "hasStorage": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "Swift.String?", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Accessor", + "usr": "c:@M@OneSignalUser@objc(cs)OSPushSubscriptionState(im)id", + "mangledName": "$s13OneSignalUser23OSPushSubscriptionStateC2idSSSgvg", + "moduleName": "OneSignalUser", + "implicit": true, + "declAttributes": [ + "Final", + "ObjC" + ], + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "token", + "printedName": "token", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "Swift.String?", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Var", + "usr": "c:@M@OneSignalUser@objc(cs)OSPushSubscriptionState(py)token", + "mangledName": "$s13OneSignalUser23OSPushSubscriptionStateC5tokenSSSgvp", + "moduleName": "OneSignalUser", + "declAttributes": [ + "Final", + "HasStorage", + "AccessControl", + "ObjC" + ], + "isLet": true, + "hasStorage": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "Swift.String?", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Accessor", + "usr": "c:@M@OneSignalUser@objc(cs)OSPushSubscriptionState(im)token", + "mangledName": "$s13OneSignalUser23OSPushSubscriptionStateC5tokenSSSgvg", + "moduleName": "OneSignalUser", + "implicit": true, + "declAttributes": [ + "Final", + "ObjC" + ], + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "optedIn", + "printedName": "optedIn", + "children": [ + { + "kind": "TypeNominal", + "name": "Bool", + "printedName": "Swift.Bool", + "usr": "s:Sb" + } + ], + "declKind": "Var", + "usr": "c:@M@OneSignalUser@objc(cs)OSPushSubscriptionState(py)optedIn", + "mangledName": "$s13OneSignalUser23OSPushSubscriptionStateC7optedInSbvp", + "moduleName": "OneSignalUser", + "declAttributes": [ + "Final", + "HasStorage", + "AccessControl", + "ObjC" + ], + "isLet": true, + "hasStorage": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "Bool", + "printedName": "Swift.Bool", + "usr": "s:Sb" + } + ], + "declKind": "Accessor", + "usr": "c:@M@OneSignalUser@objc(cs)OSPushSubscriptionState(im)optedIn", + "mangledName": "$s13OneSignalUser23OSPushSubscriptionStateC7optedInSbvg", + "moduleName": "OneSignalUser", + "implicit": true, + "declAttributes": [ + "Final", + "ObjC" + ], + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "description", + "printedName": "description", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Var", + "usr": "c:@M@OneSignalUser@objc(cs)OSPushSubscriptionState(py)description", + "mangledName": "$s13OneSignalUser23OSPushSubscriptionStateC11descriptionSSvp", + "moduleName": "OneSignalUser", + "overriding": true, + "objc_name": "description", + "declAttributes": [ + "Dynamic", + "ObjC", + "Override", + "AccessControl" + ], + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Accessor", + "usr": "c:@M@OneSignalUser@objc(cs)OSPushSubscriptionState(im)description", + "mangledName": "$s13OneSignalUser23OSPushSubscriptionStateC11descriptionSSvg", + "moduleName": "OneSignalUser", + "overriding": true, + "objc_name": "description", + "declAttributes": [ + "Dynamic", + "ObjC" + ], + "accessorKind": "get" + } + ] + }, + { + "kind": "Function", + "name": "jsonRepresentation", + "printedName": "jsonRepresentation()", + "children": [ + { + "kind": "TypeNominal", + "name": "NSDictionary", + "printedName": "Foundation.NSDictionary", + "usr": "c:objc(cs)NSDictionary" + } + ], + "declKind": "Func", + "usr": "c:@M@OneSignalUser@objc(cs)OSPushSubscriptionState(im)jsonRepresentation", + "mangledName": "$s13OneSignalUser23OSPushSubscriptionStateC18jsonRepresentationSo12NSDictionaryCyF", + "moduleName": "OneSignalUser", + "declAttributes": [ + "AccessControl", + "ObjC" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Constructor", + "name": "init", + "printedName": "init()", + "children": [ + { + "kind": "TypeNominal", + "name": "OSPushSubscriptionState", + "printedName": "OneSignalUser.OSPushSubscriptionState", + "usr": "c:@M@OneSignalUser@objc(cs)OSPushSubscriptionState" + } + ], + "declKind": "Constructor", + "usr": "c:@M@OneSignalUser@objc(cs)OSPushSubscriptionState(im)init", + "mangledName": "$s13OneSignalUser23OSPushSubscriptionStateCACycfc", + "moduleName": "OneSignalUser", + "overriding": true, + "implicit": true, + "objc_name": "init", + "declAttributes": [ + "Dynamic", + "ObjC", + "Override" + ], + "init_kind": "Designated" + } + ], + "declKind": "Class", + "usr": "c:@M@OneSignalUser@objc(cs)OSPushSubscriptionState", + "mangledName": "$s13OneSignalUser23OSPushSubscriptionStateC", + "moduleName": "OneSignalUser", + "declAttributes": [ + "AccessControl", + "ObjC" + ], + "superclassUsr": "c:objc(cs)NSObject", + "hasMissingDesignatedInitializers": true, + "superclassNames": [ + "ObjectiveC.NSObject" + ], + "conformances": [ + { + "kind": "Conformance", + "name": "Equatable", + "printedName": "Equatable", + "usr": "s:SQ", + "mangledName": "$sSQ" + }, + { + "kind": "Conformance", + "name": "Hashable", + "printedName": "Hashable", + "usr": "s:SH", + "mangledName": "$sSH" + }, + { + "kind": "Conformance", + "name": "CVarArg", + "printedName": "CVarArg", + "usr": "s:s7CVarArgP", + "mangledName": "$ss7CVarArgP" + }, + { + "kind": "Conformance", + "name": "_KeyValueCodingAndObservingPublishing", + "printedName": "_KeyValueCodingAndObservingPublishing", + "usr": "s:10Foundation37_KeyValueCodingAndObservingPublishingP", + "mangledName": "$s10Foundation37_KeyValueCodingAndObservingPublishingP" + }, + { + "kind": "Conformance", + "name": "_KeyValueCodingAndObserving", + "printedName": "_KeyValueCodingAndObserving", + "usr": "s:10Foundation27_KeyValueCodingAndObservingP", + "mangledName": "$s10Foundation27_KeyValueCodingAndObservingP" + }, + { + "kind": "Conformance", + "name": "CustomStringConvertible", + "printedName": "CustomStringConvertible", + "usr": "s:s23CustomStringConvertibleP", + "mangledName": "$ss23CustomStringConvertibleP" + }, + { + "kind": "Conformance", + "name": "CustomDebugStringConvertible", + "printedName": "CustomDebugStringConvertible", + "usr": "s:s28CustomDebugStringConvertibleP", + "mangledName": "$ss28CustomDebugStringConvertibleP" + } + ] + }, + { + "kind": "TypeDecl", + "name": "OSPushSubscriptionChangedState", + "printedName": "OSPushSubscriptionChangedState", + "children": [ + { + "kind": "Var", + "name": "current", + "printedName": "current", + "children": [ + { + "kind": "TypeNominal", + "name": "OSPushSubscriptionState", + "printedName": "OneSignalUser.OSPushSubscriptionState", + "usr": "c:@M@OneSignalUser@objc(cs)OSPushSubscriptionState" + } + ], + "declKind": "Var", + "usr": "c:@M@OneSignalUser@objc(cs)OSPushSubscriptionChangedState(py)current", + "mangledName": "$s13OneSignalUser30OSPushSubscriptionChangedStateC7currentAA0deG0Cvp", + "moduleName": "OneSignalUser", + "declAttributes": [ + "Final", + "HasStorage", + "AccessControl", + "ObjC" + ], + "isLet": true, + "hasStorage": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "OSPushSubscriptionState", + "printedName": "OneSignalUser.OSPushSubscriptionState", + "usr": "c:@M@OneSignalUser@objc(cs)OSPushSubscriptionState" + } + ], + "declKind": "Accessor", + "usr": "c:@M@OneSignalUser@objc(cs)OSPushSubscriptionChangedState(im)current", + "mangledName": "$s13OneSignalUser30OSPushSubscriptionChangedStateC7currentAA0deG0Cvg", + "moduleName": "OneSignalUser", + "implicit": true, + "declAttributes": [ + "Final", + "ObjC" + ], + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "previous", + "printedName": "previous", + "children": [ + { + "kind": "TypeNominal", + "name": "OSPushSubscriptionState", + "printedName": "OneSignalUser.OSPushSubscriptionState", + "usr": "c:@M@OneSignalUser@objc(cs)OSPushSubscriptionState" + } + ], + "declKind": "Var", + "usr": "c:@M@OneSignalUser@objc(cs)OSPushSubscriptionChangedState(py)previous", + "mangledName": "$s13OneSignalUser30OSPushSubscriptionChangedStateC8previousAA0deG0Cvp", + "moduleName": "OneSignalUser", + "declAttributes": [ + "Final", + "HasStorage", + "AccessControl", + "ObjC" + ], + "isLet": true, + "hasStorage": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "OSPushSubscriptionState", + "printedName": "OneSignalUser.OSPushSubscriptionState", + "usr": "c:@M@OneSignalUser@objc(cs)OSPushSubscriptionState" + } + ], + "declKind": "Accessor", + "usr": "c:@M@OneSignalUser@objc(cs)OSPushSubscriptionChangedState(im)previous", + "mangledName": "$s13OneSignalUser30OSPushSubscriptionChangedStateC8previousAA0deG0Cvg", + "moduleName": "OneSignalUser", + "implicit": true, + "declAttributes": [ + "Final", + "ObjC" + ], + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "description", + "printedName": "description", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Var", + "usr": "c:@M@OneSignalUser@objc(cs)OSPushSubscriptionChangedState(py)description", + "mangledName": "$s13OneSignalUser30OSPushSubscriptionChangedStateC11descriptionSSvp", + "moduleName": "OneSignalUser", + "overriding": true, + "objc_name": "description", + "declAttributes": [ + "Dynamic", + "ObjC", + "Override", + "AccessControl" + ], + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Accessor", + "usr": "c:@M@OneSignalUser@objc(cs)OSPushSubscriptionChangedState(im)description", + "mangledName": "$s13OneSignalUser30OSPushSubscriptionChangedStateC11descriptionSSvg", + "moduleName": "OneSignalUser", + "overriding": true, + "objc_name": "description", + "declAttributes": [ + "Dynamic", + "ObjC" + ], + "accessorKind": "get" + } + ] + }, + { + "kind": "Function", + "name": "jsonRepresentation", + "printedName": "jsonRepresentation()", + "children": [ + { + "kind": "TypeNominal", + "name": "NSDictionary", + "printedName": "Foundation.NSDictionary", + "usr": "c:objc(cs)NSDictionary" + } + ], + "declKind": "Func", + "usr": "c:@M@OneSignalUser@objc(cs)OSPushSubscriptionChangedState(im)jsonRepresentation", + "mangledName": "$s13OneSignalUser30OSPushSubscriptionChangedStateC18jsonRepresentationSo12NSDictionaryCyF", + "moduleName": "OneSignalUser", + "declAttributes": [ + "AccessControl", + "ObjC" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Constructor", + "name": "init", + "printedName": "init()", + "children": [ + { + "kind": "TypeNominal", + "name": "OSPushSubscriptionChangedState", + "printedName": "OneSignalUser.OSPushSubscriptionChangedState", + "usr": "c:@M@OneSignalUser@objc(cs)OSPushSubscriptionChangedState" + } + ], + "declKind": "Constructor", + "usr": "c:@M@OneSignalUser@objc(cs)OSPushSubscriptionChangedState(im)init", + "mangledName": "$s13OneSignalUser30OSPushSubscriptionChangedStateCACycfc", + "moduleName": "OneSignalUser", + "overriding": true, + "implicit": true, + "objc_name": "init", + "declAttributes": [ + "Dynamic", + "ObjC", + "Override" + ], + "init_kind": "Designated" + } + ], + "declKind": "Class", + "usr": "c:@M@OneSignalUser@objc(cs)OSPushSubscriptionChangedState", + "mangledName": "$s13OneSignalUser30OSPushSubscriptionChangedStateC", + "moduleName": "OneSignalUser", + "declAttributes": [ + "AccessControl", + "ObjC" + ], + "superclassUsr": "c:objc(cs)NSObject", + "hasMissingDesignatedInitializers": true, + "superclassNames": [ + "ObjectiveC.NSObject" + ], + "conformances": [ + { + "kind": "Conformance", + "name": "Equatable", + "printedName": "Equatable", + "usr": "s:SQ", + "mangledName": "$sSQ" + }, + { + "kind": "Conformance", + "name": "Hashable", + "printedName": "Hashable", + "usr": "s:SH", + "mangledName": "$sSH" + }, + { + "kind": "Conformance", + "name": "CVarArg", + "printedName": "CVarArg", + "usr": "s:s7CVarArgP", + "mangledName": "$ss7CVarArgP" + }, + { + "kind": "Conformance", + "name": "_KeyValueCodingAndObservingPublishing", + "printedName": "_KeyValueCodingAndObservingPublishing", + "usr": "s:10Foundation37_KeyValueCodingAndObservingPublishingP", + "mangledName": "$s10Foundation37_KeyValueCodingAndObservingPublishingP" + }, + { + "kind": "Conformance", + "name": "_KeyValueCodingAndObserving", + "printedName": "_KeyValueCodingAndObserving", + "usr": "s:10Foundation27_KeyValueCodingAndObservingP", + "mangledName": "$s10Foundation27_KeyValueCodingAndObservingP" + }, + { + "kind": "Conformance", + "name": "CustomStringConvertible", + "printedName": "CustomStringConvertible", + "usr": "s:s23CustomStringConvertibleP", + "mangledName": "$ss23CustomStringConvertibleP" + }, + { + "kind": "Conformance", + "name": "CustomDebugStringConvertible", + "printedName": "CustomDebugStringConvertible", + "usr": "s:s28CustomDebugStringConvertibleP", + "mangledName": "$ss28CustomDebugStringConvertibleP" + } + ] + }, + { + "kind": "Import", + "name": "Foundation", + "printedName": "Foundation", + "declKind": "Import", + "moduleName": "OneSignalUser", + "declAttributes": [ + "RawDocComment" + ] + }, + { + "kind": "Import", + "name": "OneSignalCore", + "printedName": "OneSignalCore", + "declKind": "Import", + "moduleName": "OneSignalUser" + }, + { + "kind": "Import", + "name": "OneSignalOSCore", + "printedName": "OneSignalOSCore", + "declKind": "Import", + "moduleName": "OneSignalUser" + }, + { + "kind": "Import", + "name": "OneSignalOSCore", + "printedName": "OneSignalOSCore", + "declKind": "Import", + "moduleName": "OneSignalUser", + "declAttributes": [ + "RawDocComment" + ] + }, + { + "kind": "Import", + "name": "OneSignalCore", + "printedName": "OneSignalCore", + "declKind": "Import", + "moduleName": "OneSignalUser" + }, + { + "kind": "Import", + "name": "Foundation", + "printedName": "Foundation", + "declKind": "Import", + "moduleName": "OneSignalUser", + "declAttributes": [ + "RawDocComment" + ] + }, + { + "kind": "Import", + "name": "OneSignalCore", + "printedName": "OneSignalCore", + "declKind": "Import", + "moduleName": "OneSignalUser" + }, + { + "kind": "Import", + "name": "OneSignalOSCore", + "printedName": "OneSignalOSCore", + "declKind": "Import", + "moduleName": "OneSignalUser" + }, + { + "kind": "Import", + "name": "OneSignalCore", + "printedName": "OneSignalCore", + "declKind": "Import", + "moduleName": "OneSignalUser", + "declAttributes": [ + "RawDocComment" + ] + }, + { + "kind": "Import", + "name": "OneSignalNotifications", + "printedName": "OneSignalNotifications", + "declKind": "Import", + "moduleName": "OneSignalUser" + }, + { + "kind": "Import", + "name": "OneSignalOSCore", + "printedName": "OneSignalOSCore", + "declKind": "Import", + "moduleName": "OneSignalUser" + } + ], + "json_format_version": 8 + }, + "ConstValues": [ + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OneSignalUserManagerImpl.swift", + "kind": "BooleanLiteral", + "offset": 4048, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OneSignalUserManagerImpl.swift", + "kind": "BooleanLiteral", + "offset": 5070, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OneSignalUserManagerImpl.swift", + "kind": "BooleanLiteral", + "offset": 5089, + "length": 4, + "value": "true" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OneSignalUserManagerImpl.swift", + "kind": "BooleanLiteral", + "offset": 5172, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OneSignalUserManagerImpl.swift", + "kind": "BooleanLiteral", + "offset": 24536, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSPropertiesModel.swift", + "kind": "StringLiteral", + "offset": 1847, + "length": 15, + "value": "\"OneSignalUser.OSLocationPoint\"" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSPropertiesModel.swift", + "kind": "StringLiteral", + "offset": 2423, + "length": 10, + "value": "\"language\"" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSPropertiesModel.swift", + "kind": "StringLiteral", + "offset": 2557, + "length": 10, + "value": "\"location\"" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSPropertiesModel.swift", + "kind": "Dictionary", + "offset": 2697, + "length": 3, + "value": "[]" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSIdentityOperationExecutor.swift", + "kind": "Array", + "offset": 1438, + "length": 2, + "value": "[]" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSIdentityOperationExecutor.swift", + "kind": "Array", + "offset": 1570, + "length": 2, + "value": "[]" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSIdentityOperationExecutor.swift", + "kind": "Array", + "offset": 1626, + "length": 2, + "value": "[]" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSUserInternalImpl.swift", + "kind": "StringLiteral", + "offset": 2006, + "length": 18, + "value": "\"OneSignalUser.OSUserInternalImpl\"" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSPropertyOperationExecutor.swift", + "kind": "Array", + "offset": 1423, + "length": 2, + "value": "[]" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSPropertyOperationExecutor.swift", + "kind": "Array", + "offset": 1484, + "length": 2, + "value": "[]" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSPropertyOperationExecutor.swift", + "kind": "BooleanLiteral", + "offset": 9816, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSSubscriptionModel.swift", + "kind": "StringLiteral", + "offset": 1536, + "length": 23, + "value": "\"OneSignalUser.OSPushSubscriptionState\"" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSSubscriptionModel.swift", + "kind": "StringLiteral", + "offset": 2423, + "length": 30, + "value": "\"OneSignalUser.OSPushSubscriptionChangedState\"" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSSubscriptionModel.swift", + "kind": "StringLiteral", + "offset": 3147, + "length": 9, + "value": "\"iOSPush\"" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSSubscriptionModel.swift", + "kind": "StringLiteral", + "offset": 3174, + "length": 7, + "value": "\"Email\"" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSSubscriptionModel.swift", + "kind": "StringLiteral", + "offset": 3197, + "length": 5, + "value": "\"SMS\"" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSSubscriptionModel.swift", + "kind": "StringLiteral", + "offset": 3147, + "length": 9, + "value": "\"iOSPush\"" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSSubscriptionModel.swift", + "kind": "StringLiteral", + "offset": 3174, + "length": 7, + "value": "\"Email\"" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSSubscriptionModel.swift", + "kind": "StringLiteral", + "offset": 3197, + "length": 5, + "value": "\"SMS\"" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSSubscriptionModel.swift", + "kind": "StringLiteral", + "offset": 3526, + "length": 9, + "value": "\"address\"" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSSubscriptionModel.swift", + "kind": "StringLiteral", + "offset": 3957, + "length": 16, + "value": "\"subscriptionId\"" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSSubscriptionModel.swift", + "kind": "IntegerLiteral", + "offset": 5277, + "length": 2, + "value": "2" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSSubscriptionModel.swift", + "kind": "IntegerLiteral", + "offset": 5318, + "length": 2, + "value": "2" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSSubscriptionModel.swift", + "kind": "IntegerLiteral", + "offset": 5403, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSSubscriptionModel.swift", + "kind": "StringLiteral", + "offset": 5436, + "length": 19, + "value": "\"notificationTypes\"" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSSubscriptionModel.swift", + "kind": "IntegerLiteral", + "offset": 5003, + "length": 2, + "value": "1" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSSubscriptionModel.swift", + "kind": "IntegerLiteral", + "offset": 6433, + "length": 2, + "value": "2" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSSubscriptionModel.swift", + "kind": "StringLiteral", + "offset": 6649, + "length": 10, + "value": "\"testType\"" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSSubscriptionModel.swift", + "kind": "StringLiteral", + "offset": 6885, + "length": 10, + "value": "\"deviceOs\"" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSSubscriptionModel.swift", + "kind": "StringLiteral", + "offset": 7098, + "length": 5, + "value": "\"sdk\"" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSSubscriptionModel.swift", + "kind": "StringLiteral", + "offset": 7341, + "length": 13, + "value": "\"deviceModel\"" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSSubscriptionModel.swift", + "kind": "StringLiteral", + "offset": 7634, + "length": 12, + "value": "\"appVersion\"" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSSubscriptionModel.swift", + "kind": "StringLiteral", + "offset": 7458, + "length": 28, + "value": "\"CFBundleShortVersionString\"" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSSubscriptionModel.swift", + "kind": "StringLiteral", + "offset": 7886, + "length": 9, + "value": "\"netType\"" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSSubscriptionModel.swift", + "kind": "StringLiteral", + "offset": 3250, + "length": 19, + "value": "\"OneSignalUser.OSSubscriptionModel\"" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSIdentityModel.swift", + "kind": "Dictionary", + "offset": 1510, + "length": 3, + "value": "[]" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSIdentityModel.swift", + "kind": "StringLiteral", + "offset": 1293, + "length": 15, + "value": "\"OneSignalUser.OSIdentityModel\"" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSSubscriptionOperationExecutor.swift", + "kind": "Array", + "offset": 1486, + "length": 2, + "value": "[]" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSSubscriptionOperationExecutor.swift", + "kind": "Array", + "offset": 1626, + "length": 2, + "value": "[]" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSSubscriptionOperationExecutor.swift", + "kind": "Array", + "offset": 1689, + "length": 2, + "value": "[]" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSSubscriptionOperationExecutor.swift", + "kind": "Array", + "offset": 1752, + "length": 2, + "value": "[]" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSSubscriptionOperationExecutor.swift", + "kind": "Dictionary", + "offset": 1815, + "length": 3, + "value": "[]" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSUserRequests.swift", + "kind": "Array", + "offset": 1619, + "length": 2, + "value": "[]" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSUserRequests.swift", + "kind": "Array", + "offset": 1705, + "length": 2, + "value": "[]" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSUserRequests.swift", + "kind": "Dictionary", + "offset": 1767, + "length": 3, + "value": "[]" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSUserRequests.swift", + "kind": "BooleanLiteral", + "offset": 27422, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSUserRequests.swift", + "kind": "BooleanLiteral", + "offset": 31693, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSUserRequests.swift", + "kind": "StringLiteral", + "offset": 31615, + "length": 19, + "value": "\"OneSignalUser.OSRequestCreateUser\"" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSUserRequests.swift", + "kind": "BooleanLiteral", + "offset": 35419, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSUserRequests.swift", + "kind": "StringLiteral", + "offset": 35324, + "length": 36, + "value": "\"OneSignalUser.OSRequestFetchIdentityBySubscription\"" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSUserRequests.swift", + "kind": "BooleanLiteral", + "offset": 38704, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSUserRequests.swift", + "kind": "StringLiteral", + "offset": 38624, + "length": 21, + "value": "\"OneSignalUser.OSRequestIdentifyUser\"" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSUserRequests.swift", + "kind": "BooleanLiteral", + "offset": 42618, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSUserRequests.swift", + "kind": "StringLiteral", + "offset": 42541, + "length": 18, + "value": "\"OneSignalUser.OSRequestFetchUser\"" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSUserRequests.swift", + "kind": "BooleanLiteral", + "offset": 45201, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSUserRequests.swift", + "kind": "StringLiteral", + "offset": 45123, + "length": 19, + "value": "\"OneSignalUser.OSRequestAddAliases\"" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSUserRequests.swift", + "kind": "BooleanLiteral", + "offset": 47646, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSUserRequests.swift", + "kind": "StringLiteral", + "offset": 47567, + "length": 20, + "value": "\"OneSignalUser.OSRequestRemoveAlias\"" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSUserRequests.swift", + "kind": "BooleanLiteral", + "offset": 49858, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSUserRequests.swift", + "kind": "StringLiteral", + "offset": 49774, + "length": 25, + "value": "\"OneSignalUser.OSRequestUpdateProperties\"" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSUserRequests.swift", + "kind": "BooleanLiteral", + "offset": 54435, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSUserRequests.swift", + "kind": "StringLiteral", + "offset": 54349, + "length": 27, + "value": "\"OneSignalUser.OSRequestCreateSubscription\"" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSUserRequests.swift", + "kind": "BooleanLiteral", + "offset": 57362, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSUserRequests.swift", + "kind": "StringLiteral", + "offset": 57274, + "length": 29, + "value": "\"OneSignalUser.OSRequestTransferSubscription\"" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSUserRequests.swift", + "kind": "BooleanLiteral", + "offset": 60213, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSUserRequests.swift", + "kind": "StringLiteral", + "offset": 60127, + "length": 27, + "value": "\"OneSignalUser.OSRequestUpdateSubscription\"" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSUserRequests.swift", + "kind": "BooleanLiteral", + "offset": 63838, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/nanli\/Documents\/GitHub\/OneSignal-iOS-SDK\/iOS_SDK\/OneSignalSDK\/OneSignalUser\/Source\/OSUserRequests.swift", + "kind": "StringLiteral", + "offset": 63752, + "length": 27, + "value": "\"OneSignalUser.OSRequestDeleteSubscription\"" + } + ] +} \ No newline at end of file diff --git a/iOS_SDK/OneSignalSDK/OneSignal_User/OneSignalUser.xcframework/ios-arm64_x86_64-simulator/OneSignalUser.framework/Modules/OneSignalUser.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface b/iOS_SDK/OneSignalSDK/OneSignal_User/OneSignalUser.xcframework/ios-arm64_x86_64-simulator/OneSignalUser.framework/Modules/OneSignalUser.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface new file mode 100644 index 000000000..c1cfd7abd --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignal_User/OneSignalUser.xcframework/ios-arm64_x86_64-simulator/OneSignalUser.framework/Modules/OneSignalUser.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface @@ -0,0 +1,130 @@ +// swift-interface-format-version: 1.0 +// swift-compiler-version: Apple Swift version 5.7.1 (swiftlang-5.7.1.135.3 clang-1400.0.29.51) +// swift-module-flags: -target x86_64-apple-ios11.0-simulator -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -O -module-name OneSignalUser +// swift-module-flags-ignorable: -enable-bare-slash-regex +import Foundation +import OneSignalCore +import OneSignalNotifications +import OneSignalOSCore +@_exported import OneSignalUser +import Swift +import _Concurrency +import _StringProcessing +@objc public protocol OSUser { + @objc var pushSubscription: OneSignalUser.OSPushSubscription { get } + @objc func addAlias(label: Swift.String, id: Swift.String) + @objc func addAliases(_ aliases: [Swift.String : Swift.String]) + @objc func removeAlias(_ label: Swift.String) + @objc func removeAliases(_ labels: [Swift.String]) + @objc func addTag(key: Swift.String, value: Swift.String) + @objc func addTags(_ tags: [Swift.String : Swift.String]) + @objc func removeTag(_ tag: Swift.String) + @objc func removeTags(_ tags: [Swift.String]) + @objc func addEmail(_ email: Swift.String) + @objc func removeEmail(_ email: Swift.String) + @objc func addSms(_ number: Swift.String) + @objc func removeSms(_ number: Swift.String) + @objc func setLanguage(_ language: Swift.String) + typealias OSJwtCompletionBlock = (_ newJwtToken: Swift.String) -> Swift.Void + typealias OSJwtExpiredHandler = (_ externalId: Swift.String, _ completion: (_ newJwtToken: Swift.String) -> Swift.Void) -> Swift.Void + @objc func onJwtExpired(expiredHandler: @escaping Self.OSJwtExpiredHandler) +} +@objc public protocol OSPushSubscription { + @objc var id: Swift.String? { get } + @objc var token: Swift.String? { get } + @objc var optedIn: Swift.Bool { get } + @objc func optIn() + @objc func optOut() + @objc func addObserver(_ observer: OneSignalUser.OSPushSubscriptionObserver) + @objc func removeObserver(_ observer: OneSignalUser.OSPushSubscriptionObserver) +} +@_inheritsConvenienceInitializers @_hasMissingDesignatedInitializers @objc public class OneSignalUserManagerImpl : ObjectiveC.NSObject { + @objc public static let sharedInstance: OneSignalUser.OneSignalUserManagerImpl + @objc public var onesignalId: Swift.String? { + @objc get + } + @objc public var pushSubscriptionId: Swift.String? { + @objc get + } + @objc public var language: Swift.String? { + @objc get + } + @objc public var requiresUserAuth: Swift.Bool + @objc public func start() + @objc public func login(externalId: Swift.String, token: Swift.String?) + @objc public func logout() + public func _logout() + @objc public func clearAllModelsFromStores() + @objc public func getTags() -> [Swift.String : Swift.String]? + @objc public func setLocation(latitude: Swift.Float, longitude: Swift.Float) + @objc public func sendPurchases(_ purchases: [[Swift.String : Swift.AnyObject]]) + @objc deinit +} +extension OneSignalUser.OneSignalUserManagerImpl { + @objc dynamic public func startNewSession() + @objc dynamic public func updateSession(sessionCount: Foundation.NSNumber?, sessionTime: Foundation.NSNumber?, refreshDeviceMetadata: Swift.Bool, sendImmediately: Swift.Bool = false, onSuccess: (() -> Swift.Void)? = nil, onFailure: (() -> Swift.Void)? = nil) + @objc dynamic public func runBackgroundTasks() +} +extension OneSignalUser.OneSignalUserManagerImpl : OneSignalUser.OSUser { + @objc dynamic public func onJwtExpired(expiredHandler: @escaping OneSignalUser.OneSignalUserManagerImpl.OSJwtExpiredHandler) + @objc dynamic public var User: OneSignalUser.OSUser { + @objc get + } + @objc dynamic public var pushSubscription: OneSignalUser.OSPushSubscription { + @objc get + } + @objc dynamic public func addAlias(label: Swift.String, id: Swift.String) + @objc dynamic public func addAliases(_ aliases: [Swift.String : Swift.String]) + @objc dynamic public func removeAlias(_ label: Swift.String) + @objc dynamic public func removeAliases(_ labels: [Swift.String]) + @objc dynamic public func addTag(key: Swift.String, value: Swift.String) + @objc dynamic public func addTags(_ tags: [Swift.String : Swift.String]) + @objc dynamic public func removeTag(_ tag: Swift.String) + @objc dynamic public func removeTags(_ tags: [Swift.String]) + @objc dynamic public func addEmail(_ email: Swift.String) + @objc dynamic public func removeEmail(_ email: Swift.String) + @objc dynamic public func addSms(_ number: Swift.String) + @objc dynamic public func removeSms(_ number: Swift.String) + @objc dynamic public func setLanguage(_ language: Swift.String) +} +extension OneSignalUser.OneSignalUserManagerImpl : OneSignalUser.OSPushSubscription { + @objc dynamic public func addObserver(_ observer: OneSignalUser.OSPushSubscriptionObserver) + @objc dynamic public func removeObserver(_ observer: OneSignalUser.OSPushSubscriptionObserver) + @objc dynamic public var id: Swift.String? { + @objc get + } + @objc dynamic public var token: Swift.String? { + @objc get + } + @objc dynamic public var optedIn: Swift.Bool { + @objc get + } + @objc dynamic public func optIn() + @objc dynamic public func optOut() +} +extension OneSignalUser.OneSignalUserManagerImpl : OneSignalNotifications.OneSignalNotificationsDelegate { + @objc dynamic public func setNotificationTypes(_ notificationTypes: Swift.Int32) + @objc dynamic public func setPushToken(_ pushToken: Swift.String) +} +@objc public protocol OSPushSubscriptionObserver { + @objc func onPushSubscriptionDidChange(state: OneSignalUser.OSPushSubscriptionChangedState) +} +@_hasMissingDesignatedInitializers @objc public class OSPushSubscriptionState : ObjectiveC.NSObject { + @objc final public let id: Swift.String? + @objc final public let token: Swift.String? + @objc final public let optedIn: Swift.Bool + @objc override dynamic public var description: Swift.String { + @objc get + } + @objc public func jsonRepresentation() -> Foundation.NSDictionary + @objc deinit +} +@_hasMissingDesignatedInitializers @objc public class OSPushSubscriptionChangedState : ObjectiveC.NSObject { + @objc final public let current: OneSignalUser.OSPushSubscriptionState + @objc final public let previous: OneSignalUser.OSPushSubscriptionState + @objc override dynamic public var description: Swift.String { + @objc get + } + @objc public func jsonRepresentation() -> Foundation.NSDictionary + @objc deinit +} diff --git a/iOS_SDK/OneSignalSDK/OneSignal_User/OneSignalUser.xcframework/ios-arm64_x86_64-simulator/OneSignalUser.framework/Modules/OneSignalUser.swiftmodule/x86_64-apple-ios-simulator.swiftdoc b/iOS_SDK/OneSignalSDK/OneSignal_User/OneSignalUser.xcframework/ios-arm64_x86_64-simulator/OneSignalUser.framework/Modules/OneSignalUser.swiftmodule/x86_64-apple-ios-simulator.swiftdoc new file mode 100644 index 000000000..9dc01712d Binary files /dev/null and b/iOS_SDK/OneSignalSDK/OneSignal_User/OneSignalUser.xcframework/ios-arm64_x86_64-simulator/OneSignalUser.framework/Modules/OneSignalUser.swiftmodule/x86_64-apple-ios-simulator.swiftdoc differ diff --git a/iOS_SDK/OneSignalSDK/OneSignal_User/OneSignalUser.xcframework/ios-arm64_x86_64-simulator/OneSignalUser.framework/Modules/OneSignalUser.swiftmodule/x86_64-apple-ios-simulator.swiftinterface b/iOS_SDK/OneSignalSDK/OneSignal_User/OneSignalUser.xcframework/ios-arm64_x86_64-simulator/OneSignalUser.framework/Modules/OneSignalUser.swiftmodule/x86_64-apple-ios-simulator.swiftinterface new file mode 100644 index 000000000..c1cfd7abd --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignal_User/OneSignalUser.xcframework/ios-arm64_x86_64-simulator/OneSignalUser.framework/Modules/OneSignalUser.swiftmodule/x86_64-apple-ios-simulator.swiftinterface @@ -0,0 +1,130 @@ +// swift-interface-format-version: 1.0 +// swift-compiler-version: Apple Swift version 5.7.1 (swiftlang-5.7.1.135.3 clang-1400.0.29.51) +// swift-module-flags: -target x86_64-apple-ios11.0-simulator -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -O -module-name OneSignalUser +// swift-module-flags-ignorable: -enable-bare-slash-regex +import Foundation +import OneSignalCore +import OneSignalNotifications +import OneSignalOSCore +@_exported import OneSignalUser +import Swift +import _Concurrency +import _StringProcessing +@objc public protocol OSUser { + @objc var pushSubscription: OneSignalUser.OSPushSubscription { get } + @objc func addAlias(label: Swift.String, id: Swift.String) + @objc func addAliases(_ aliases: [Swift.String : Swift.String]) + @objc func removeAlias(_ label: Swift.String) + @objc func removeAliases(_ labels: [Swift.String]) + @objc func addTag(key: Swift.String, value: Swift.String) + @objc func addTags(_ tags: [Swift.String : Swift.String]) + @objc func removeTag(_ tag: Swift.String) + @objc func removeTags(_ tags: [Swift.String]) + @objc func addEmail(_ email: Swift.String) + @objc func removeEmail(_ email: Swift.String) + @objc func addSms(_ number: Swift.String) + @objc func removeSms(_ number: Swift.String) + @objc func setLanguage(_ language: Swift.String) + typealias OSJwtCompletionBlock = (_ newJwtToken: Swift.String) -> Swift.Void + typealias OSJwtExpiredHandler = (_ externalId: Swift.String, _ completion: (_ newJwtToken: Swift.String) -> Swift.Void) -> Swift.Void + @objc func onJwtExpired(expiredHandler: @escaping Self.OSJwtExpiredHandler) +} +@objc public protocol OSPushSubscription { + @objc var id: Swift.String? { get } + @objc var token: Swift.String? { get } + @objc var optedIn: Swift.Bool { get } + @objc func optIn() + @objc func optOut() + @objc func addObserver(_ observer: OneSignalUser.OSPushSubscriptionObserver) + @objc func removeObserver(_ observer: OneSignalUser.OSPushSubscriptionObserver) +} +@_inheritsConvenienceInitializers @_hasMissingDesignatedInitializers @objc public class OneSignalUserManagerImpl : ObjectiveC.NSObject { + @objc public static let sharedInstance: OneSignalUser.OneSignalUserManagerImpl + @objc public var onesignalId: Swift.String? { + @objc get + } + @objc public var pushSubscriptionId: Swift.String? { + @objc get + } + @objc public var language: Swift.String? { + @objc get + } + @objc public var requiresUserAuth: Swift.Bool + @objc public func start() + @objc public func login(externalId: Swift.String, token: Swift.String?) + @objc public func logout() + public func _logout() + @objc public func clearAllModelsFromStores() + @objc public func getTags() -> [Swift.String : Swift.String]? + @objc public func setLocation(latitude: Swift.Float, longitude: Swift.Float) + @objc public func sendPurchases(_ purchases: [[Swift.String : Swift.AnyObject]]) + @objc deinit +} +extension OneSignalUser.OneSignalUserManagerImpl { + @objc dynamic public func startNewSession() + @objc dynamic public func updateSession(sessionCount: Foundation.NSNumber?, sessionTime: Foundation.NSNumber?, refreshDeviceMetadata: Swift.Bool, sendImmediately: Swift.Bool = false, onSuccess: (() -> Swift.Void)? = nil, onFailure: (() -> Swift.Void)? = nil) + @objc dynamic public func runBackgroundTasks() +} +extension OneSignalUser.OneSignalUserManagerImpl : OneSignalUser.OSUser { + @objc dynamic public func onJwtExpired(expiredHandler: @escaping OneSignalUser.OneSignalUserManagerImpl.OSJwtExpiredHandler) + @objc dynamic public var User: OneSignalUser.OSUser { + @objc get + } + @objc dynamic public var pushSubscription: OneSignalUser.OSPushSubscription { + @objc get + } + @objc dynamic public func addAlias(label: Swift.String, id: Swift.String) + @objc dynamic public func addAliases(_ aliases: [Swift.String : Swift.String]) + @objc dynamic public func removeAlias(_ label: Swift.String) + @objc dynamic public func removeAliases(_ labels: [Swift.String]) + @objc dynamic public func addTag(key: Swift.String, value: Swift.String) + @objc dynamic public func addTags(_ tags: [Swift.String : Swift.String]) + @objc dynamic public func removeTag(_ tag: Swift.String) + @objc dynamic public func removeTags(_ tags: [Swift.String]) + @objc dynamic public func addEmail(_ email: Swift.String) + @objc dynamic public func removeEmail(_ email: Swift.String) + @objc dynamic public func addSms(_ number: Swift.String) + @objc dynamic public func removeSms(_ number: Swift.String) + @objc dynamic public func setLanguage(_ language: Swift.String) +} +extension OneSignalUser.OneSignalUserManagerImpl : OneSignalUser.OSPushSubscription { + @objc dynamic public func addObserver(_ observer: OneSignalUser.OSPushSubscriptionObserver) + @objc dynamic public func removeObserver(_ observer: OneSignalUser.OSPushSubscriptionObserver) + @objc dynamic public var id: Swift.String? { + @objc get + } + @objc dynamic public var token: Swift.String? { + @objc get + } + @objc dynamic public var optedIn: Swift.Bool { + @objc get + } + @objc dynamic public func optIn() + @objc dynamic public func optOut() +} +extension OneSignalUser.OneSignalUserManagerImpl : OneSignalNotifications.OneSignalNotificationsDelegate { + @objc dynamic public func setNotificationTypes(_ notificationTypes: Swift.Int32) + @objc dynamic public func setPushToken(_ pushToken: Swift.String) +} +@objc public protocol OSPushSubscriptionObserver { + @objc func onPushSubscriptionDidChange(state: OneSignalUser.OSPushSubscriptionChangedState) +} +@_hasMissingDesignatedInitializers @objc public class OSPushSubscriptionState : ObjectiveC.NSObject { + @objc final public let id: Swift.String? + @objc final public let token: Swift.String? + @objc final public let optedIn: Swift.Bool + @objc override dynamic public var description: Swift.String { + @objc get + } + @objc public func jsonRepresentation() -> Foundation.NSDictionary + @objc deinit +} +@_hasMissingDesignatedInitializers @objc public class OSPushSubscriptionChangedState : ObjectiveC.NSObject { + @objc final public let current: OneSignalUser.OSPushSubscriptionState + @objc final public let previous: OneSignalUser.OSPushSubscriptionState + @objc override dynamic public var description: Swift.String { + @objc get + } + @objc public func jsonRepresentation() -> Foundation.NSDictionary + @objc deinit +} diff --git a/iOS_SDK/OneSignalSDK/OneSignal_User/OneSignalUser.xcframework/ios-arm64_x86_64-simulator/OneSignalUser.framework/Modules/module.modulemap b/iOS_SDK/OneSignalSDK/OneSignal_User/OneSignalUser.xcframework/ios-arm64_x86_64-simulator/OneSignalUser.framework/Modules/module.modulemap new file mode 100644 index 000000000..2313273e3 --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignal_User/OneSignalUser.xcframework/ios-arm64_x86_64-simulator/OneSignalUser.framework/Modules/module.modulemap @@ -0,0 +1,11 @@ +framework module OneSignalUser { + umbrella header "OneSignalUser.h" + + export * + module * { export * } +} + +module OneSignalUser.Swift { + header "OneSignalUser-Swift.h" + requires objc +} diff --git a/iOS_SDK/OneSignalSDK/OneSignal_User/OneSignalUser.xcframework/ios-arm64_x86_64-simulator/OneSignalUser.framework/OneSignalUser b/iOS_SDK/OneSignalSDK/OneSignal_User/OneSignalUser.xcframework/ios-arm64_x86_64-simulator/OneSignalUser.framework/OneSignalUser new file mode 100755 index 000000000..29b52ab99 Binary files /dev/null and b/iOS_SDK/OneSignalSDK/OneSignal_User/OneSignalUser.xcframework/ios-arm64_x86_64-simulator/OneSignalUser.framework/OneSignalUser differ diff --git a/iOS_SDK/OneSignalSDK/OneSignal_User/OneSignalUser.xcframework/ios-arm64_x86_64-simulator/OneSignalUser.framework/_CodeSignature/CodeResources b/iOS_SDK/OneSignalSDK/OneSignal_User/OneSignalUser.xcframework/ios-arm64_x86_64-simulator/OneSignalUser.framework/_CodeSignature/CodeResources new file mode 100644 index 000000000..2996b7498 --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignal_User/OneSignalUser.xcframework/ios-arm64_x86_64-simulator/OneSignalUser.framework/_CodeSignature/CodeResources @@ -0,0 +1,245 @@ + + + + + files + + Headers/OneSignalUser-Swift.h + + 7bpxB1WP0H7OucGZ8Y+lOl5d+nU= + + Headers/OneSignalUser.h + + pTdDVlAAP214UX3ZzcJHJlgjwKo= + + Info.plist + + e9AFVZhaza+kJlICwbbxiib1pCg= + + Modules/OneSignalUser.swiftmodule/arm64-apple-ios-simulator.abi.json + + r1SM0Gn2pAl2chqQvYPO+/tRWrE= + + Modules/OneSignalUser.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface + + vSAjASbTeYg8SakA0VSm+Kiotng= + + Modules/OneSignalUser.swiftmodule/arm64-apple-ios-simulator.swiftdoc + + Di3zrNfqh1bXbZjeMAx1OTgZha0= + + Modules/OneSignalUser.swiftmodule/arm64-apple-ios-simulator.swiftinterface + + vSAjASbTeYg8SakA0VSm+Kiotng= + + Modules/OneSignalUser.swiftmodule/arm64-apple-ios-simulator.swiftmodule + + 6G9i5XHkApt/GwBbLa9YuYYouWg= + + Modules/OneSignalUser.swiftmodule/x86_64-apple-ios-simulator.abi.json + + r1SM0Gn2pAl2chqQvYPO+/tRWrE= + + Modules/OneSignalUser.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface + + DsvcnEX7qoNVs2+/NRSPHOWFv9s= + + Modules/OneSignalUser.swiftmodule/x86_64-apple-ios-simulator.swiftdoc + + f1TrTDQFR854aWi6/jqx8em8Tg4= + + Modules/OneSignalUser.swiftmodule/x86_64-apple-ios-simulator.swiftinterface + + DsvcnEX7qoNVs2+/NRSPHOWFv9s= + + Modules/OneSignalUser.swiftmodule/x86_64-apple-ios-simulator.swiftmodule + + SZpiP16zRWWokKa7CrUpNjmL8Q4= + + Modules/module.modulemap + + G7kIR7T48fnqMfkxMEz5Gq0mPZo= + + + files2 + + Headers/OneSignalUser-Swift.h + + hash2 + + 2SSy/EB01SX2PXCFbMwGeTkOr126gf+OvjAtPt+3HUU= + + + Headers/OneSignalUser.h + + hash2 + + kzlTLEUR5uAPjMN03oyfrT8TmYBfxfO52NTJnvQdnvE= + + + Modules/OneSignalUser.swiftmodule/arm64-apple-ios-simulator.abi.json + + hash2 + + P1MWEWOm2ZGGcL2azjP6c8uZT11g6rrZH1qa8wKwwZ0= + + + Modules/OneSignalUser.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface + + hash2 + + z9KhuUIpXEbycWLLc4UGNjQ5Ejcchr4fgNHGPM/F70g= + + + Modules/OneSignalUser.swiftmodule/arm64-apple-ios-simulator.swiftdoc + + hash2 + + bke6WqElBMZ9Y2BaBg3bO2RY1aoSF8vX+h9cfgFmX08= + + + Modules/OneSignalUser.swiftmodule/arm64-apple-ios-simulator.swiftinterface + + hash2 + + z9KhuUIpXEbycWLLc4UGNjQ5Ejcchr4fgNHGPM/F70g= + + + Modules/OneSignalUser.swiftmodule/arm64-apple-ios-simulator.swiftmodule + + hash2 + + VOoVuZ1MYe7NXxlbd6xM3ST0OrGbMhp3dE0IKXlPJL8= + + + Modules/OneSignalUser.swiftmodule/x86_64-apple-ios-simulator.abi.json + + hash2 + + P1MWEWOm2ZGGcL2azjP6c8uZT11g6rrZH1qa8wKwwZ0= + + + Modules/OneSignalUser.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface + + hash2 + + SKlnbCPoCnPlhh9MjomBIWuM8xnKQggDAD2zakHEQT8= + + + Modules/OneSignalUser.swiftmodule/x86_64-apple-ios-simulator.swiftdoc + + hash2 + + 1Kh5+qTiMbFHerrAv+LreNpSRju6DZlHnXFB2W/k2+w= + + + Modules/OneSignalUser.swiftmodule/x86_64-apple-ios-simulator.swiftinterface + + hash2 + + SKlnbCPoCnPlhh9MjomBIWuM8xnKQggDAD2zakHEQT8= + + + Modules/OneSignalUser.swiftmodule/x86_64-apple-ios-simulator.swiftmodule + + hash2 + + 907HkGWHnDCsE5CLVUmVPez+xevqVz6Pu70vOyVQgLE= + + + Modules/module.modulemap + + hash2 + + D9eZkSkXqymTKNbGMVvSiBm8jGPDNW9FHX+RgvGgjqc= + + + + rules + + ^.* + + ^.*\.lproj/ + + optional + + weight + 1000 + + ^.*\.lproj/locversion.plist$ + + omit + + weight + 1100 + + ^Base\.lproj/ + + weight + 1010 + + ^version.plist$ + + + rules2 + + .*\.dSYM($|/) + + weight + 11 + + ^(.*/)?\.DS_Store$ + + omit + + weight + 2000 + + ^.* + + ^.*\.lproj/ + + optional + + weight + 1000 + + ^.*\.lproj/locversion.plist$ + + omit + + weight + 1100 + + ^Base\.lproj/ + + weight + 1010 + + ^Info\.plist$ + + omit + + weight + 20 + + ^PkgInfo$ + + omit + + weight + 20 + + ^embedded\.provisionprofile$ + + weight + 20 + + ^version\.plist$ + + weight + 20 + + + + diff --git a/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignal.xcframework.zip b/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignal.xcframework.zip deleted file mode 100644 index 943ed166a..000000000 Binary files a/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignal.xcframework.zip and /dev/null differ diff --git a/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignal.xcframework/ios-arm64/OneSignal.framework/Headers/OneSignal.h b/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignal.xcframework/ios-arm64/OneSignal.framework/Headers/OneSignal.h deleted file mode 100755 index a85aa7bd7..000000000 --- a/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignal.xcframework/ios-arm64/OneSignal.framework/Headers/OneSignal.h +++ /dev/null @@ -1,463 +0,0 @@ -/** - Modified MIT License - - Copyright 2017 OneSignal - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - 1. The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - 2. All copies of substantial portions of the Software may only be used in connection - with services provided by OneSignal. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - */ - -/** - ### Setting up the SDK ### - Follow the documentation from https://documentation.onesignal.com/docs/ios-sdk-setupto setup OneSignal in your app. - - ### API Reference ### - Follow the documentation from https://documentation.onesignal.com/docs/ios-sdk-api for a detailed explanation of the API. - - ### Troubleshoot ### - Follow the documentation from https://documentation.onesignal.com/docs/troubleshooting-ios to fix common problems. - - For help on how to upgrade your code from 1.* SDK to 2.*: https://documentation.onesignal.com/docs/upgrading-to-ios-sdk-20 - - ### More ### - iOS Push Cert: https://documentation.onesignal.com/docs/generating-an-ios-push-certificate -*/ - -#import -#import -#import -#import -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wstrict-prototypes" -#pragma clang diagnostic ignored "-Wnullability-completeness" - -@interface OSInAppMessage : NSObject - -@property (strong, nonatomic, nonnull) NSString *messageId; - -// Convert the object into a NSDictionary -- (NSDictionary *_Nonnull)jsonRepresentation; - -@end - - -@interface OSInAppMessageTag : NSObject - -@property (strong, nonatomic, nullable) NSDictionary *tagsToAdd; -@property (strong, nonatomic, nullable) NSArray *tagsToRemove; - -// Convert the class into a NSDictionary -- (NSDictionary *_Nonnull)jsonRepresentation; - -@end - -@interface OSInAppMessageAction : NSObject - -// The action name attached to the IAM action -@property (strong, nonatomic, nullable) NSString *clickName; - -// The URL (if any) that should be opened when the action occurs -@property (strong, nonatomic, nullable) NSURL *clickUrl; - -//UUID for the page in an IAM Carousel -@property (strong, nonatomic, nullable) NSString *pageId; - -// Whether or not the click action is first click on the IAM -@property (nonatomic) BOOL firstClick; - -// Whether or not the click action dismisses the message -@property (nonatomic) BOOL closesMessage; - -// The outcome to send for this action -@property (strong, nonatomic, nullable) NSArray *outcomes; - -// The tags to send for this action -@property (strong, nonatomic, nullable) OSInAppMessageTag *tags; - -// Convert the class into a NSDictionary -- (NSDictionary *_Nonnull)jsonRepresentation; - -@end - -@protocol OSInAppMessageDelegate -@optional -- (void)handleMessageAction:(OSInAppMessageAction * _Nonnull)action NS_SWIFT_NAME(handleMessageAction(action:)); -@end - -@protocol OSInAppMessageLifecycleHandler -@optional -- (void)onWillDisplayInAppMessage:(OSInAppMessage *)message; -- (void)onDidDisplayInAppMessage:(OSInAppMessage *)message; -- (void)onWillDismissInAppMessage:(OSInAppMessage *)message; -- (void)onDidDismissInAppMessage:(OSInAppMessage *)message; -@end - -typedef NS_ENUM(NSInteger, OSNotificationPermission) { - // The user has not yet made a choice regarding whether your app can show notifications. - OSNotificationPermissionNotDetermined = 0, - - // The application is not authorized to post user notifications. - OSNotificationPermissionDenied, - - // The application is authorized to post user notifications. - OSNotificationPermissionAuthorized, - - // the application is only authorized to post Provisional notifications (direct to history) - OSNotificationPermissionProvisional, - - // the application is authorized to send notifications for 8 hours. Only used by App Clips. - OSNotificationPermissionEphemeral -}; - -// Permission Classes -@interface OSPermissionState : NSObject - -@property (readonly, nonatomic) BOOL reachable; -@property (readonly, nonatomic) BOOL hasPrompted; -@property (readonly, nonatomic) BOOL providesAppNotificationSettings; -@property (readonly, nonatomic) OSNotificationPermission status; -- (NSDictionary* _Nonnull)toDictionary; - -@end - -@interface OSPermissionStateChanges : NSObject - -@property (readonly, nonnull) OSPermissionState* to; -@property (readonly, nonnull) OSPermissionState* from; -- (NSDictionary* _Nonnull)toDictionary; - -@end - -// Subscription Classes -@interface OSSubscriptionState : NSObject - -@property (readonly, nonatomic) BOOL isSubscribed; // (yes only if userId, pushToken, and setSubscription exists / are true) -@property (readonly, nonatomic) BOOL isPushDisabled; // returns value of disablePush. -@property (readonly, nonatomic, nullable) NSString* userId; // AKA OneSignal PlayerId -@property (readonly, nonatomic, nullable) NSString* pushToken; // AKA Apple Device Token -- (NSDictionary* _Nonnull)toDictionary; - -@end - -@interface OSSubscriptionStateChanges : NSObject -@property (readonly, nonnull) OSSubscriptionState* to; -@property (readonly, nonnull) OSSubscriptionState* from; -- (NSDictionary* _Nonnull)toDictionary; -@end - -@interface OSEmailSubscriptionState : NSObject -@property (readonly, nonatomic, nullable) NSString *emailUserId; // The new Email user ID -@property (readonly, nonatomic, nullable) NSString *emailAddress; -@property (readonly, nonatomic) BOOL isSubscribed; -- (NSDictionary* _Nonnull)toDictionary; -@end - -@interface OSEmailSubscriptionStateChanges : NSObject -@property (readonly, nonnull) OSEmailSubscriptionState* to; -@property (readonly, nonnull) OSEmailSubscriptionState* from; -- (NSDictionary* _Nonnull)toDictionary; -@end - -@interface OSSMSSubscriptionState : NSObject -@property (readonly, nonatomic, nullable) NSString* smsUserId; -@property (readonly, nonatomic, nullable) NSString *smsNumber; -@property (readonly, nonatomic) BOOL isSubscribed; -- (NSDictionary* _Nonnull)toDictionary; -@end - -@interface OSSMSSubscriptionStateChanges : NSObject -@property (readonly, nonnull) OSSMSSubscriptionState* to; -@property (readonly, nonnull) OSSMSSubscriptionState* from; -- (NSDictionary* _Nonnull)toDictionary; -@end - -@protocol OSPermissionObserver -- (void)onOSPermissionChanged:(OSPermissionStateChanges* _Nonnull)stateChanges; -@end - -@protocol OSSubscriptionObserver -- (void)onOSSubscriptionChanged:(OSSubscriptionStateChanges* _Nonnull)stateChanges; -@end - -@protocol OSEmailSubscriptionObserver -- (void)onOSEmailSubscriptionChanged:(OSEmailSubscriptionStateChanges* _Nonnull)stateChanges; -@end - -@protocol OSSMSSubscriptionObserver -- (void)onOSSMSSubscriptionChanged:(OSSMSSubscriptionStateChanges* _Nonnull)stateChanges; -@end - -@interface OSDeviceState : NSObject -/** - * Get the app's notification permission - * @return false if the user disabled notifications for the app, otherwise true - */ -@property (readonly) BOOL hasNotificationPermission; -/** - * Get whether the user is subscribed to OneSignal notifications or not - * @return false if the user is not subscribed to OneSignal notifications, otherwise true - */ -@property (readonly) BOOL isPushDisabled; -/** - * Get whether the user is subscribed - * @return true if isNotificationEnabled, isUserSubscribed, getUserId and getPushToken are true, otherwise false - */ -@property (readonly) BOOL isSubscribed; -/** - * Get the user notification permision status - * @return OSNotificationPermission -*/ -@property (readonly) OSNotificationPermission notificationPermissionStatus; -/** - * Get user id from registration (player id) - * @return user id if user is registered, otherwise null - */ -@property (readonly, nullable) NSString* userId; -/** - * Get apple deice push token - * @return push token if available, otherwise null - */ -@property (readonly, nullable) NSString* pushToken; -/** - * Get the user email id - * @return email id if user address was registered, otherwise null - */ -@property (readonly, nullable) NSString* emailUserId; -/** - * Get the user email - * @return email address if set, otherwise null - */ -@property (readonly, nullable) NSString* emailAddress; - -@property (readonly) BOOL isEmailSubscribed; - -/** - * Get the user sms id - * @return sms id if user sms number was registered, otherwise null - */ -@property (readonly, nullable) NSString* smsUserId; -/** - * Get the user sms number, number may start with + and continue with numbers or contain only numbers - * e.g: +11231231231 or 11231231231 - * @return sms number if set, otherwise null - */ -@property (readonly, nullable) NSString* smsNumber; - -@property (readonly) BOOL isSMSSubscribed; - -// Convert the class into a NSDictionary -- (NSDictionary *_Nonnull)jsonRepresentation; - -@end - -typedef void (^OSWebOpenURLResultBlock)(BOOL shouldOpen); - -/*Block for generic results on success and errors on failure*/ -typedef void (^OSResultSuccessBlock)(NSDictionary* result); -typedef void (^OSFailureBlock)(NSError* error); - - -// ======= OneSignal Class Interface ========= -@interface OneSignal : NSObject - -+ (NSString*)appId; -+ (NSString* _Nonnull)sdkVersionRaw; -+ (NSString* _Nonnull)sdkSemanticVersion; - -+ (void)disablePush:(BOOL)disable; - -// Only used for wrapping SDKs, such as Unity, Cordova, Xamarin, etc. -+ (void)setMSDKType:(NSString* _Nonnull)type; - -#pragma mark Initialization -+ (void)setAppId:(NSString* _Nonnull)newAppId; -+ (void)initWithLaunchOptions:(NSDictionary* _Nullable)launchOptions; -+ (void)setLaunchURLsInApp:(BOOL)launchInApp; -+ (void)setProvidesNotificationSettingsView:(BOOL)providesView; - - -#pragma mark Live Activity -+ (void)enterLiveActivity:(NSString * _Nonnull)activityId withToken:(NSString * _Nonnull)token; -+ (void)enterLiveActivity:(NSString * _Nonnull)activityId withToken:(NSString * _Nonnull)token withSuccess:(OSResultSuccessBlock _Nullable)successBlock withFailure:(OSFailureBlock _Nullable)failureBlock; - -+ (void)exitLiveActivity:(NSString * _Nonnull)activityId; -+ (void)exitLiveActivity:(NSString * _Nonnull)activityId withSuccess:(OSResultSuccessBlock _Nullable)successBlock withFailure:(OSFailureBlock _Nullable)failureBlock; - -#pragma mark Logging -+ (void)setLogLevel:(ONE_S_LOG_LEVEL)logLevel visualLevel:(ONE_S_LOG_LEVEL)visualLogLevel; -+ (void)onesignalLog:(ONE_S_LOG_LEVEL)logLevel message:(NSString* _Nonnull)message; - -#pragma mark Prompt For Push -typedef void(^OSUserResponseBlock)(BOOL accepted); - -+ (void)promptForPushNotificationsWithUserResponse:(OSUserResponseBlock)block; -+ (void)promptForPushNotificationsWithUserResponse:(OSUserResponseBlock)block fallbackToSettings:(BOOL)fallback; -+ (void)registerForProvisionalAuthorization:(OSUserResponseBlock)block; -+ (OSDeviceState*)getDeviceState; - -#pragma mark Privacy Consent -+ (void)consentGranted:(BOOL)granted; -// Tells your application if privacy consent is still needed from the current user -+ (BOOL)requiresUserPrivacyConsent; -+ (void)setRequiresUserPrivacyConsent:(BOOL)required; - -#pragma mark Public Handlers - -// If the completion block is not called within 25 seconds of this block being called in notificationWillShowInForegroundHandler then the completion will be automatically fired. -typedef void (^OSNotificationWillShowInForegroundBlock)(OSNotification * _Nonnull notification, OSNotificationDisplayResponse _Nonnull completion); -typedef void (^OSNotificationOpenedBlock)(OSNotificationOpenedResult * _Nonnull result); -typedef void (^OSInAppMessageClickBlock)(OSInAppMessageAction * _Nonnull action); - -+ (void)setNotificationWillShowInForegroundHandler:(OSNotificationWillShowInForegroundBlock _Nullable)block; -+ (void)setNotificationOpenedHandler:(OSNotificationOpenedBlock _Nullable)block; -+ (void)setInAppMessageClickHandler:(OSInAppMessageClickBlock _Nullable)block; -+ (void)setInAppMessageLifecycleHandler:(NSObject *_Nullable)delegate; - -#pragma mark Post Notification -+ (void)postNotification:(NSDictionary* _Nonnull)jsonData; -+ (void)postNotification:(NSDictionary* _Nonnull)jsonData onSuccess:(OSResultSuccessBlock _Nullable)successBlock onFailure:(OSFailureBlock _Nullable)failureBlock; -+ (void)postNotificationWithJsonString:(NSString* _Nonnull)jsonData onSuccess:(OSResultSuccessBlock _Nullable)successBlock onFailure:(OSFailureBlock _Nullable)failureBlock; - -#pragma mark Location -// - Request and track user's location -+ (void)promptLocation; -+ (void)setLocationShared:(BOOL)enable; -+ (BOOL)isLocationShared; - -#pragma mark Tags -+ (void)sendTag:(NSString* _Nonnull)key value:(NSString* _Nonnull)value onSuccess:(OSResultSuccessBlock _Nullable)successBlock onFailure:(OSFailureBlock _Nullable)failureBlock; -+ (void)sendTag:(NSString* _Nonnull)key value:(NSString* _Nonnull)value; -+ (void)sendTags:(NSDictionary* _Nonnull)keyValuePair onSuccess:(OSResultSuccessBlock _Nullable)successBlock onFailure:(OSFailureBlock _Nullable)failureBlock; -+ (void)sendTags:(NSDictionary* _Nonnull)keyValuePair; -+ (void)sendTagsWithJsonString:(NSString* _Nonnull)jsonString; -+ (void)getTags:(OSResultSuccessBlock _Nullable)successBlock onFailure:(OSFailureBlock _Nullable)failureBlock; -+ (void)getTags:(OSResultSuccessBlock _Nullable)successBlock; -+ (void)deleteTag:(NSString* _Nonnull)key onSuccess:(OSResultSuccessBlock _Nullable)successBlock onFailure:(OSFailureBlock _Nullable)failureBlock; -+ (void)deleteTag:(NSString* _Nonnull)key; -+ (void)deleteTags:(NSArray* _Nonnull)keys onSuccess:(OSResultSuccessBlock _Nullable)successBlock onFailure:(OSFailureBlock _Nullable)failureBlock; -+ (void)deleteTags:(NSArray *_Nonnull)keys; -+ (void)deleteTagsWithJsonString:(NSString* _Nonnull)jsonString; - -#pragma mark Permission, Subscription, and Email Observers -NS_ASSUME_NONNULL_BEGIN - -+ (void)addPermissionObserver:(NSObject*)observer; -+ (void)removePermissionObserver:(NSObject*)observer; - -+ (void)addSubscriptionObserver:(NSObject*)observer; -+ (void)removeSubscriptionObserver:(NSObject*)observer; - -+ (void)addEmailSubscriptionObserver:(NSObject*)observer; -+ (void)removeEmailSubscriptionObserver:(NSObject*)observer; - -+ (void)addSMSSubscriptionObserver:(NSObject*)observer; -+ (void)removeSMSSubscriptionObserver:(NSObject*)observer; -NS_ASSUME_NONNULL_END - -#pragma mark Email -// Typedefs defining completion blocks for email & simultaneous HTTP requests -typedef void (^OSEmailFailureBlock)(NSError *error); -typedef void (^OSEmailSuccessBlock)(); - -// Allows you to set the email for this user. -// Email Auth Token is a (recommended) optional parameter that should *NOT* be generated on the client. -// For security purposes, the emailAuthToken should be generated by your backend server. -// If you do not have a backend server for your application, use the version of thge setEmail: method without an emailAuthToken parameter. -+ (void)setEmail:(NSString * _Nonnull)email withEmailAuthHashToken:(NSString * _Nullable)hashToken; -+ (void)setEmail:(NSString * _Nonnull)email withEmailAuthHashToken:(NSString * _Nullable)hashToken withSuccess:(OSEmailSuccessBlock _Nullable)successBlock withFailure:(OSEmailFailureBlock _Nullable)failureBlock; - -// Sets email without an authentication token -+ (void)setEmail:(NSString * _Nonnull)email; -+ (void)setEmail:(NSString * _Nonnull)email withSuccess:(OSEmailSuccessBlock _Nullable)successBlock withFailure:(OSEmailFailureBlock _Nullable)failureBlock; - -// Logs the device out of the current email. -+ (void)logoutEmail; -+ (void)logoutEmailWithSuccess:(OSEmailSuccessBlock _Nullable)successBlock withFailure:(OSEmailFailureBlock _Nullable)failureBlock; - -#pragma mark SMS -// Typedefs defining completion blocks for SMS & simultaneous HTTP requests -typedef void (^OSSMSFailureBlock)(NSError *error); -typedef void (^OSSMSSuccessBlock)(NSDictionary *results); - -// Allows you to set the SMS for this user. SMS number may start with + and continue with numbers or contain only numbers -// e.g: +11231231231 or 11231231231 -// SMS Auth Token is a (recommended) optional parameter that should *NOT* be generated on the client. -// For security purposes, the smsAuthToken should be generated by your backend server. -// If you do not have a backend server for your application, use the version of thge setSMSNumber: method without an smsAuthToken parameter. -+ (void)setSMSNumber:(NSString * _Nonnull)smsNumber withSMSAuthHashToken:(NSString * _Nullable)hashToken; -+ (void)setSMSNumber:(NSString * _Nonnull)smsNumber withSMSAuthHashToken:(NSString * _Nullable)hashToken withSuccess:(OSSMSSuccessBlock _Nullable)successBlock withFailure:(OSSMSFailureBlock _Nullable)failureBlock; - -// Sets SMS without an authentication token -+ (void)setSMSNumber:(NSString * _Nonnull)smsNumber; -+ (void)setSMSNumber:(NSString * _Nonnull)smsNumber withSuccess:(OSSMSSuccessBlock _Nullable)successBlock withFailure:(OSSMSFailureBlock _Nullable)failureBlock; - -// Logs the device out of the current sms number. -+ (void)logoutSMSNumber; -+ (void)logoutSMSNumberWithSuccess:(OSSMSSuccessBlock _Nullable)successBlock withFailure:(OSSMSFailureBlock _Nullable)failureBlock; - -#pragma mark Language -// Typedefs defining completion blocks for updating language -typedef void (^OSUpdateLanguageFailureBlock)(NSError *error); -typedef void (^OSUpdateLanguageSuccessBlock)(); - -// Language input ISO 639-1 code representation for user input language -+ (void)setLanguage:(NSString * _Nonnull)language; -+ (void)setLanguage:(NSString * _Nonnull)language withSuccess:(OSUpdateLanguageSuccessBlock _Nullable)successBlock withFailure:(OSUpdateLanguageFailureBlock)failureBlock; - -#pragma mark External User Id -// Typedefs defining completion blocks for updating the external user id -typedef void (^OSUpdateExternalUserIdFailureBlock)(NSError *error); -typedef void (^OSUpdateExternalUserIdSuccessBlock)(NSDictionary *results); - -+ (void)setExternalUserId:(NSString * _Nonnull)externalId; -+ (void)setExternalUserId:(NSString * _Nonnull)externalId withSuccess:(OSUpdateExternalUserIdSuccessBlock _Nullable)successBlock withFailure:(OSUpdateExternalUserIdFailureBlock _Nullable)failureBlock; -+ (void)setExternalUserId:(NSString *)externalId withExternalIdAuthHashToken:(NSString *)hashToken withSuccess:(OSUpdateExternalUserIdSuccessBlock _Nullable)successBlock withFailure:(OSUpdateExternalUserIdFailureBlock _Nullable)failureBlock; -+ (void)removeExternalUserId; -+ (void)removeExternalUserId:(OSUpdateExternalUserIdSuccessBlock _Nullable)successBlock withFailure:(OSUpdateExternalUserIdFailureBlock _Nullable)failureBlock; - -#pragma mark In-App Messaging -+ (BOOL)isInAppMessagingPaused; -+ (void)pauseInAppMessages:(BOOL)pause; -+ (void)addTrigger:(NSString * _Nonnull)key withValue:(id _Nonnull)value; -+ (void)addTriggers:(NSDictionary * _Nonnull)triggers; -+ (void)removeTriggerForKey:(NSString * _Nonnull)key; -+ (void)removeTriggersForKeys:(NSArray * _Nonnull)keys; -+ (NSDictionary * _Nonnull)getTriggers; -+ (id _Nullable)getTriggerValueForKey:(NSString * _Nonnull)key; - -#pragma mark Outcomes -+ (void)sendOutcome:(NSString * _Nonnull)name; -+ (void)sendOutcome:(NSString * _Nonnull)name onSuccess:(OSSendOutcomeSuccess _Nullable)success; -+ (void)sendUniqueOutcome:(NSString * _Nonnull)name; -+ (void)sendUniqueOutcome:(NSString * _Nonnull)name onSuccess:(OSSendOutcomeSuccess _Nullable)success; -+ (void)sendOutcomeWithValue:(NSString * _Nonnull)name value:(NSNumber * _Nonnull)value; -+ (void)sendOutcomeWithValue:(NSString * _Nonnull)name value:(NSNumber * _Nonnull)value onSuccess:(OSSendOutcomeSuccess _Nullable)success; - -#pragma mark Extension -// iOS 10 only -// Process from Notification Service Extension. -// Used for iOS Media Attachemtns and Action Buttons. -+ (UNMutableNotificationContent*)didReceiveNotificationExtensionRequest:(UNNotificationRequest* _Nonnull)request withMutableNotificationContent:(UNMutableNotificationContent* _Nullable)replacementContent __deprecated_msg("Please use didReceiveNotificationExtensionRequest:withMutableNotificationContent:withContentHandler: instead."); -+ (UNMutableNotificationContent*)didReceiveNotificationExtensionRequest:(UNNotificationRequest* _Nonnull)request withMutableNotificationContent:(UNMutableNotificationContent* _Nullable)replacementContent withContentHandler:(void (^)(UNNotificationContent *_Nonnull))contentHandler; -+ (UNMutableNotificationContent*)serviceExtensionTimeWillExpireRequest:(UNNotificationRequest* _Nonnull)request withMutableNotificationContent:(UNMutableNotificationContent* _Nullable)replacementContent; -@end - -#pragma clang diagnostic pop diff --git a/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignal.xcframework/ios-arm64/OneSignal.framework/Modules/module.modulemap b/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignal.xcframework/ios-arm64/OneSignal.framework/Modules/module.modulemap deleted file mode 100644 index a3424cd21..000000000 --- a/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignal.xcframework/ios-arm64/OneSignal.framework/Modules/module.modulemap +++ /dev/null @@ -1,6 +0,0 @@ -framework module OneSignal { - umbrella header "OneSignal.h" - - export * - module * { export * } -} diff --git a/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignal.xcframework/ios-arm64/OneSignal.framework/OneSignal b/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignal.xcframework/ios-arm64/OneSignal.framework/OneSignal deleted file mode 100755 index d7e46bbb0..000000000 Binary files a/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignal.xcframework/ios-arm64/OneSignal.framework/OneSignal and /dev/null differ diff --git a/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignal.xcframework/ios-arm64_x86_64-maccatalyst/OneSignal.framework/OneSignal b/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignal.xcframework/ios-arm64_x86_64-maccatalyst/OneSignal.framework/OneSignal deleted file mode 120000 index 51c8d4e7d..000000000 --- a/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignal.xcframework/ios-arm64_x86_64-maccatalyst/OneSignal.framework/OneSignal +++ /dev/null @@ -1 +0,0 @@ -Versions/Current/OneSignal \ No newline at end of file diff --git a/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignal.xcframework/ios-arm64_x86_64-maccatalyst/OneSignal.framework/Versions/A/Headers/OneSignal.h b/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignal.xcframework/ios-arm64_x86_64-maccatalyst/OneSignal.framework/Versions/A/Headers/OneSignal.h deleted file mode 100755 index a85aa7bd7..000000000 --- a/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignal.xcframework/ios-arm64_x86_64-maccatalyst/OneSignal.framework/Versions/A/Headers/OneSignal.h +++ /dev/null @@ -1,463 +0,0 @@ -/** - Modified MIT License - - Copyright 2017 OneSignal - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - 1. The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - 2. All copies of substantial portions of the Software may only be used in connection - with services provided by OneSignal. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - */ - -/** - ### Setting up the SDK ### - Follow the documentation from https://documentation.onesignal.com/docs/ios-sdk-setupto setup OneSignal in your app. - - ### API Reference ### - Follow the documentation from https://documentation.onesignal.com/docs/ios-sdk-api for a detailed explanation of the API. - - ### Troubleshoot ### - Follow the documentation from https://documentation.onesignal.com/docs/troubleshooting-ios to fix common problems. - - For help on how to upgrade your code from 1.* SDK to 2.*: https://documentation.onesignal.com/docs/upgrading-to-ios-sdk-20 - - ### More ### - iOS Push Cert: https://documentation.onesignal.com/docs/generating-an-ios-push-certificate -*/ - -#import -#import -#import -#import -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wstrict-prototypes" -#pragma clang diagnostic ignored "-Wnullability-completeness" - -@interface OSInAppMessage : NSObject - -@property (strong, nonatomic, nonnull) NSString *messageId; - -// Convert the object into a NSDictionary -- (NSDictionary *_Nonnull)jsonRepresentation; - -@end - - -@interface OSInAppMessageTag : NSObject - -@property (strong, nonatomic, nullable) NSDictionary *tagsToAdd; -@property (strong, nonatomic, nullable) NSArray *tagsToRemove; - -// Convert the class into a NSDictionary -- (NSDictionary *_Nonnull)jsonRepresentation; - -@end - -@interface OSInAppMessageAction : NSObject - -// The action name attached to the IAM action -@property (strong, nonatomic, nullable) NSString *clickName; - -// The URL (if any) that should be opened when the action occurs -@property (strong, nonatomic, nullable) NSURL *clickUrl; - -//UUID for the page in an IAM Carousel -@property (strong, nonatomic, nullable) NSString *pageId; - -// Whether or not the click action is first click on the IAM -@property (nonatomic) BOOL firstClick; - -// Whether or not the click action dismisses the message -@property (nonatomic) BOOL closesMessage; - -// The outcome to send for this action -@property (strong, nonatomic, nullable) NSArray *outcomes; - -// The tags to send for this action -@property (strong, nonatomic, nullable) OSInAppMessageTag *tags; - -// Convert the class into a NSDictionary -- (NSDictionary *_Nonnull)jsonRepresentation; - -@end - -@protocol OSInAppMessageDelegate -@optional -- (void)handleMessageAction:(OSInAppMessageAction * _Nonnull)action NS_SWIFT_NAME(handleMessageAction(action:)); -@end - -@protocol OSInAppMessageLifecycleHandler -@optional -- (void)onWillDisplayInAppMessage:(OSInAppMessage *)message; -- (void)onDidDisplayInAppMessage:(OSInAppMessage *)message; -- (void)onWillDismissInAppMessage:(OSInAppMessage *)message; -- (void)onDidDismissInAppMessage:(OSInAppMessage *)message; -@end - -typedef NS_ENUM(NSInteger, OSNotificationPermission) { - // The user has not yet made a choice regarding whether your app can show notifications. - OSNotificationPermissionNotDetermined = 0, - - // The application is not authorized to post user notifications. - OSNotificationPermissionDenied, - - // The application is authorized to post user notifications. - OSNotificationPermissionAuthorized, - - // the application is only authorized to post Provisional notifications (direct to history) - OSNotificationPermissionProvisional, - - // the application is authorized to send notifications for 8 hours. Only used by App Clips. - OSNotificationPermissionEphemeral -}; - -// Permission Classes -@interface OSPermissionState : NSObject - -@property (readonly, nonatomic) BOOL reachable; -@property (readonly, nonatomic) BOOL hasPrompted; -@property (readonly, nonatomic) BOOL providesAppNotificationSettings; -@property (readonly, nonatomic) OSNotificationPermission status; -- (NSDictionary* _Nonnull)toDictionary; - -@end - -@interface OSPermissionStateChanges : NSObject - -@property (readonly, nonnull) OSPermissionState* to; -@property (readonly, nonnull) OSPermissionState* from; -- (NSDictionary* _Nonnull)toDictionary; - -@end - -// Subscription Classes -@interface OSSubscriptionState : NSObject - -@property (readonly, nonatomic) BOOL isSubscribed; // (yes only if userId, pushToken, and setSubscription exists / are true) -@property (readonly, nonatomic) BOOL isPushDisabled; // returns value of disablePush. -@property (readonly, nonatomic, nullable) NSString* userId; // AKA OneSignal PlayerId -@property (readonly, nonatomic, nullable) NSString* pushToken; // AKA Apple Device Token -- (NSDictionary* _Nonnull)toDictionary; - -@end - -@interface OSSubscriptionStateChanges : NSObject -@property (readonly, nonnull) OSSubscriptionState* to; -@property (readonly, nonnull) OSSubscriptionState* from; -- (NSDictionary* _Nonnull)toDictionary; -@end - -@interface OSEmailSubscriptionState : NSObject -@property (readonly, nonatomic, nullable) NSString *emailUserId; // The new Email user ID -@property (readonly, nonatomic, nullable) NSString *emailAddress; -@property (readonly, nonatomic) BOOL isSubscribed; -- (NSDictionary* _Nonnull)toDictionary; -@end - -@interface OSEmailSubscriptionStateChanges : NSObject -@property (readonly, nonnull) OSEmailSubscriptionState* to; -@property (readonly, nonnull) OSEmailSubscriptionState* from; -- (NSDictionary* _Nonnull)toDictionary; -@end - -@interface OSSMSSubscriptionState : NSObject -@property (readonly, nonatomic, nullable) NSString* smsUserId; -@property (readonly, nonatomic, nullable) NSString *smsNumber; -@property (readonly, nonatomic) BOOL isSubscribed; -- (NSDictionary* _Nonnull)toDictionary; -@end - -@interface OSSMSSubscriptionStateChanges : NSObject -@property (readonly, nonnull) OSSMSSubscriptionState* to; -@property (readonly, nonnull) OSSMSSubscriptionState* from; -- (NSDictionary* _Nonnull)toDictionary; -@end - -@protocol OSPermissionObserver -- (void)onOSPermissionChanged:(OSPermissionStateChanges* _Nonnull)stateChanges; -@end - -@protocol OSSubscriptionObserver -- (void)onOSSubscriptionChanged:(OSSubscriptionStateChanges* _Nonnull)stateChanges; -@end - -@protocol OSEmailSubscriptionObserver -- (void)onOSEmailSubscriptionChanged:(OSEmailSubscriptionStateChanges* _Nonnull)stateChanges; -@end - -@protocol OSSMSSubscriptionObserver -- (void)onOSSMSSubscriptionChanged:(OSSMSSubscriptionStateChanges* _Nonnull)stateChanges; -@end - -@interface OSDeviceState : NSObject -/** - * Get the app's notification permission - * @return false if the user disabled notifications for the app, otherwise true - */ -@property (readonly) BOOL hasNotificationPermission; -/** - * Get whether the user is subscribed to OneSignal notifications or not - * @return false if the user is not subscribed to OneSignal notifications, otherwise true - */ -@property (readonly) BOOL isPushDisabled; -/** - * Get whether the user is subscribed - * @return true if isNotificationEnabled, isUserSubscribed, getUserId and getPushToken are true, otherwise false - */ -@property (readonly) BOOL isSubscribed; -/** - * Get the user notification permision status - * @return OSNotificationPermission -*/ -@property (readonly) OSNotificationPermission notificationPermissionStatus; -/** - * Get user id from registration (player id) - * @return user id if user is registered, otherwise null - */ -@property (readonly, nullable) NSString* userId; -/** - * Get apple deice push token - * @return push token if available, otherwise null - */ -@property (readonly, nullable) NSString* pushToken; -/** - * Get the user email id - * @return email id if user address was registered, otherwise null - */ -@property (readonly, nullable) NSString* emailUserId; -/** - * Get the user email - * @return email address if set, otherwise null - */ -@property (readonly, nullable) NSString* emailAddress; - -@property (readonly) BOOL isEmailSubscribed; - -/** - * Get the user sms id - * @return sms id if user sms number was registered, otherwise null - */ -@property (readonly, nullable) NSString* smsUserId; -/** - * Get the user sms number, number may start with + and continue with numbers or contain only numbers - * e.g: +11231231231 or 11231231231 - * @return sms number if set, otherwise null - */ -@property (readonly, nullable) NSString* smsNumber; - -@property (readonly) BOOL isSMSSubscribed; - -// Convert the class into a NSDictionary -- (NSDictionary *_Nonnull)jsonRepresentation; - -@end - -typedef void (^OSWebOpenURLResultBlock)(BOOL shouldOpen); - -/*Block for generic results on success and errors on failure*/ -typedef void (^OSResultSuccessBlock)(NSDictionary* result); -typedef void (^OSFailureBlock)(NSError* error); - - -// ======= OneSignal Class Interface ========= -@interface OneSignal : NSObject - -+ (NSString*)appId; -+ (NSString* _Nonnull)sdkVersionRaw; -+ (NSString* _Nonnull)sdkSemanticVersion; - -+ (void)disablePush:(BOOL)disable; - -// Only used for wrapping SDKs, such as Unity, Cordova, Xamarin, etc. -+ (void)setMSDKType:(NSString* _Nonnull)type; - -#pragma mark Initialization -+ (void)setAppId:(NSString* _Nonnull)newAppId; -+ (void)initWithLaunchOptions:(NSDictionary* _Nullable)launchOptions; -+ (void)setLaunchURLsInApp:(BOOL)launchInApp; -+ (void)setProvidesNotificationSettingsView:(BOOL)providesView; - - -#pragma mark Live Activity -+ (void)enterLiveActivity:(NSString * _Nonnull)activityId withToken:(NSString * _Nonnull)token; -+ (void)enterLiveActivity:(NSString * _Nonnull)activityId withToken:(NSString * _Nonnull)token withSuccess:(OSResultSuccessBlock _Nullable)successBlock withFailure:(OSFailureBlock _Nullable)failureBlock; - -+ (void)exitLiveActivity:(NSString * _Nonnull)activityId; -+ (void)exitLiveActivity:(NSString * _Nonnull)activityId withSuccess:(OSResultSuccessBlock _Nullable)successBlock withFailure:(OSFailureBlock _Nullable)failureBlock; - -#pragma mark Logging -+ (void)setLogLevel:(ONE_S_LOG_LEVEL)logLevel visualLevel:(ONE_S_LOG_LEVEL)visualLogLevel; -+ (void)onesignalLog:(ONE_S_LOG_LEVEL)logLevel message:(NSString* _Nonnull)message; - -#pragma mark Prompt For Push -typedef void(^OSUserResponseBlock)(BOOL accepted); - -+ (void)promptForPushNotificationsWithUserResponse:(OSUserResponseBlock)block; -+ (void)promptForPushNotificationsWithUserResponse:(OSUserResponseBlock)block fallbackToSettings:(BOOL)fallback; -+ (void)registerForProvisionalAuthorization:(OSUserResponseBlock)block; -+ (OSDeviceState*)getDeviceState; - -#pragma mark Privacy Consent -+ (void)consentGranted:(BOOL)granted; -// Tells your application if privacy consent is still needed from the current user -+ (BOOL)requiresUserPrivacyConsent; -+ (void)setRequiresUserPrivacyConsent:(BOOL)required; - -#pragma mark Public Handlers - -// If the completion block is not called within 25 seconds of this block being called in notificationWillShowInForegroundHandler then the completion will be automatically fired. -typedef void (^OSNotificationWillShowInForegroundBlock)(OSNotification * _Nonnull notification, OSNotificationDisplayResponse _Nonnull completion); -typedef void (^OSNotificationOpenedBlock)(OSNotificationOpenedResult * _Nonnull result); -typedef void (^OSInAppMessageClickBlock)(OSInAppMessageAction * _Nonnull action); - -+ (void)setNotificationWillShowInForegroundHandler:(OSNotificationWillShowInForegroundBlock _Nullable)block; -+ (void)setNotificationOpenedHandler:(OSNotificationOpenedBlock _Nullable)block; -+ (void)setInAppMessageClickHandler:(OSInAppMessageClickBlock _Nullable)block; -+ (void)setInAppMessageLifecycleHandler:(NSObject *_Nullable)delegate; - -#pragma mark Post Notification -+ (void)postNotification:(NSDictionary* _Nonnull)jsonData; -+ (void)postNotification:(NSDictionary* _Nonnull)jsonData onSuccess:(OSResultSuccessBlock _Nullable)successBlock onFailure:(OSFailureBlock _Nullable)failureBlock; -+ (void)postNotificationWithJsonString:(NSString* _Nonnull)jsonData onSuccess:(OSResultSuccessBlock _Nullable)successBlock onFailure:(OSFailureBlock _Nullable)failureBlock; - -#pragma mark Location -// - Request and track user's location -+ (void)promptLocation; -+ (void)setLocationShared:(BOOL)enable; -+ (BOOL)isLocationShared; - -#pragma mark Tags -+ (void)sendTag:(NSString* _Nonnull)key value:(NSString* _Nonnull)value onSuccess:(OSResultSuccessBlock _Nullable)successBlock onFailure:(OSFailureBlock _Nullable)failureBlock; -+ (void)sendTag:(NSString* _Nonnull)key value:(NSString* _Nonnull)value; -+ (void)sendTags:(NSDictionary* _Nonnull)keyValuePair onSuccess:(OSResultSuccessBlock _Nullable)successBlock onFailure:(OSFailureBlock _Nullable)failureBlock; -+ (void)sendTags:(NSDictionary* _Nonnull)keyValuePair; -+ (void)sendTagsWithJsonString:(NSString* _Nonnull)jsonString; -+ (void)getTags:(OSResultSuccessBlock _Nullable)successBlock onFailure:(OSFailureBlock _Nullable)failureBlock; -+ (void)getTags:(OSResultSuccessBlock _Nullable)successBlock; -+ (void)deleteTag:(NSString* _Nonnull)key onSuccess:(OSResultSuccessBlock _Nullable)successBlock onFailure:(OSFailureBlock _Nullable)failureBlock; -+ (void)deleteTag:(NSString* _Nonnull)key; -+ (void)deleteTags:(NSArray* _Nonnull)keys onSuccess:(OSResultSuccessBlock _Nullable)successBlock onFailure:(OSFailureBlock _Nullable)failureBlock; -+ (void)deleteTags:(NSArray *_Nonnull)keys; -+ (void)deleteTagsWithJsonString:(NSString* _Nonnull)jsonString; - -#pragma mark Permission, Subscription, and Email Observers -NS_ASSUME_NONNULL_BEGIN - -+ (void)addPermissionObserver:(NSObject*)observer; -+ (void)removePermissionObserver:(NSObject*)observer; - -+ (void)addSubscriptionObserver:(NSObject*)observer; -+ (void)removeSubscriptionObserver:(NSObject*)observer; - -+ (void)addEmailSubscriptionObserver:(NSObject*)observer; -+ (void)removeEmailSubscriptionObserver:(NSObject*)observer; - -+ (void)addSMSSubscriptionObserver:(NSObject*)observer; -+ (void)removeSMSSubscriptionObserver:(NSObject*)observer; -NS_ASSUME_NONNULL_END - -#pragma mark Email -// Typedefs defining completion blocks for email & simultaneous HTTP requests -typedef void (^OSEmailFailureBlock)(NSError *error); -typedef void (^OSEmailSuccessBlock)(); - -// Allows you to set the email for this user. -// Email Auth Token is a (recommended) optional parameter that should *NOT* be generated on the client. -// For security purposes, the emailAuthToken should be generated by your backend server. -// If you do not have a backend server for your application, use the version of thge setEmail: method without an emailAuthToken parameter. -+ (void)setEmail:(NSString * _Nonnull)email withEmailAuthHashToken:(NSString * _Nullable)hashToken; -+ (void)setEmail:(NSString * _Nonnull)email withEmailAuthHashToken:(NSString * _Nullable)hashToken withSuccess:(OSEmailSuccessBlock _Nullable)successBlock withFailure:(OSEmailFailureBlock _Nullable)failureBlock; - -// Sets email without an authentication token -+ (void)setEmail:(NSString * _Nonnull)email; -+ (void)setEmail:(NSString * _Nonnull)email withSuccess:(OSEmailSuccessBlock _Nullable)successBlock withFailure:(OSEmailFailureBlock _Nullable)failureBlock; - -// Logs the device out of the current email. -+ (void)logoutEmail; -+ (void)logoutEmailWithSuccess:(OSEmailSuccessBlock _Nullable)successBlock withFailure:(OSEmailFailureBlock _Nullable)failureBlock; - -#pragma mark SMS -// Typedefs defining completion blocks for SMS & simultaneous HTTP requests -typedef void (^OSSMSFailureBlock)(NSError *error); -typedef void (^OSSMSSuccessBlock)(NSDictionary *results); - -// Allows you to set the SMS for this user. SMS number may start with + and continue with numbers or contain only numbers -// e.g: +11231231231 or 11231231231 -// SMS Auth Token is a (recommended) optional parameter that should *NOT* be generated on the client. -// For security purposes, the smsAuthToken should be generated by your backend server. -// If you do not have a backend server for your application, use the version of thge setSMSNumber: method without an smsAuthToken parameter. -+ (void)setSMSNumber:(NSString * _Nonnull)smsNumber withSMSAuthHashToken:(NSString * _Nullable)hashToken; -+ (void)setSMSNumber:(NSString * _Nonnull)smsNumber withSMSAuthHashToken:(NSString * _Nullable)hashToken withSuccess:(OSSMSSuccessBlock _Nullable)successBlock withFailure:(OSSMSFailureBlock _Nullable)failureBlock; - -// Sets SMS without an authentication token -+ (void)setSMSNumber:(NSString * _Nonnull)smsNumber; -+ (void)setSMSNumber:(NSString * _Nonnull)smsNumber withSuccess:(OSSMSSuccessBlock _Nullable)successBlock withFailure:(OSSMSFailureBlock _Nullable)failureBlock; - -// Logs the device out of the current sms number. -+ (void)logoutSMSNumber; -+ (void)logoutSMSNumberWithSuccess:(OSSMSSuccessBlock _Nullable)successBlock withFailure:(OSSMSFailureBlock _Nullable)failureBlock; - -#pragma mark Language -// Typedefs defining completion blocks for updating language -typedef void (^OSUpdateLanguageFailureBlock)(NSError *error); -typedef void (^OSUpdateLanguageSuccessBlock)(); - -// Language input ISO 639-1 code representation for user input language -+ (void)setLanguage:(NSString * _Nonnull)language; -+ (void)setLanguage:(NSString * _Nonnull)language withSuccess:(OSUpdateLanguageSuccessBlock _Nullable)successBlock withFailure:(OSUpdateLanguageFailureBlock)failureBlock; - -#pragma mark External User Id -// Typedefs defining completion blocks for updating the external user id -typedef void (^OSUpdateExternalUserIdFailureBlock)(NSError *error); -typedef void (^OSUpdateExternalUserIdSuccessBlock)(NSDictionary *results); - -+ (void)setExternalUserId:(NSString * _Nonnull)externalId; -+ (void)setExternalUserId:(NSString * _Nonnull)externalId withSuccess:(OSUpdateExternalUserIdSuccessBlock _Nullable)successBlock withFailure:(OSUpdateExternalUserIdFailureBlock _Nullable)failureBlock; -+ (void)setExternalUserId:(NSString *)externalId withExternalIdAuthHashToken:(NSString *)hashToken withSuccess:(OSUpdateExternalUserIdSuccessBlock _Nullable)successBlock withFailure:(OSUpdateExternalUserIdFailureBlock _Nullable)failureBlock; -+ (void)removeExternalUserId; -+ (void)removeExternalUserId:(OSUpdateExternalUserIdSuccessBlock _Nullable)successBlock withFailure:(OSUpdateExternalUserIdFailureBlock _Nullable)failureBlock; - -#pragma mark In-App Messaging -+ (BOOL)isInAppMessagingPaused; -+ (void)pauseInAppMessages:(BOOL)pause; -+ (void)addTrigger:(NSString * _Nonnull)key withValue:(id _Nonnull)value; -+ (void)addTriggers:(NSDictionary * _Nonnull)triggers; -+ (void)removeTriggerForKey:(NSString * _Nonnull)key; -+ (void)removeTriggersForKeys:(NSArray * _Nonnull)keys; -+ (NSDictionary * _Nonnull)getTriggers; -+ (id _Nullable)getTriggerValueForKey:(NSString * _Nonnull)key; - -#pragma mark Outcomes -+ (void)sendOutcome:(NSString * _Nonnull)name; -+ (void)sendOutcome:(NSString * _Nonnull)name onSuccess:(OSSendOutcomeSuccess _Nullable)success; -+ (void)sendUniqueOutcome:(NSString * _Nonnull)name; -+ (void)sendUniqueOutcome:(NSString * _Nonnull)name onSuccess:(OSSendOutcomeSuccess _Nullable)success; -+ (void)sendOutcomeWithValue:(NSString * _Nonnull)name value:(NSNumber * _Nonnull)value; -+ (void)sendOutcomeWithValue:(NSString * _Nonnull)name value:(NSNumber * _Nonnull)value onSuccess:(OSSendOutcomeSuccess _Nullable)success; - -#pragma mark Extension -// iOS 10 only -// Process from Notification Service Extension. -// Used for iOS Media Attachemtns and Action Buttons. -+ (UNMutableNotificationContent*)didReceiveNotificationExtensionRequest:(UNNotificationRequest* _Nonnull)request withMutableNotificationContent:(UNMutableNotificationContent* _Nullable)replacementContent __deprecated_msg("Please use didReceiveNotificationExtensionRequest:withMutableNotificationContent:withContentHandler: instead."); -+ (UNMutableNotificationContent*)didReceiveNotificationExtensionRequest:(UNNotificationRequest* _Nonnull)request withMutableNotificationContent:(UNMutableNotificationContent* _Nullable)replacementContent withContentHandler:(void (^)(UNNotificationContent *_Nonnull))contentHandler; -+ (UNMutableNotificationContent*)serviceExtensionTimeWillExpireRequest:(UNNotificationRequest* _Nonnull)request withMutableNotificationContent:(UNMutableNotificationContent* _Nullable)replacementContent; -@end - -#pragma clang diagnostic pop diff --git a/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignal.xcframework/ios-arm64_x86_64-maccatalyst/OneSignal.framework/Versions/A/Modules/module.modulemap b/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignal.xcframework/ios-arm64_x86_64-maccatalyst/OneSignal.framework/Versions/A/Modules/module.modulemap deleted file mode 100644 index a3424cd21..000000000 --- a/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignal.xcframework/ios-arm64_x86_64-maccatalyst/OneSignal.framework/Versions/A/Modules/module.modulemap +++ /dev/null @@ -1,6 +0,0 @@ -framework module OneSignal { - umbrella header "OneSignal.h" - - export * - module * { export * } -} diff --git a/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignal.xcframework/ios-arm64_x86_64-maccatalyst/OneSignal.framework/Versions/A/OneSignal b/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignal.xcframework/ios-arm64_x86_64-maccatalyst/OneSignal.framework/Versions/A/OneSignal deleted file mode 100755 index 8ad647abe..000000000 Binary files a/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignal.xcframework/ios-arm64_x86_64-maccatalyst/OneSignal.framework/Versions/A/OneSignal and /dev/null differ diff --git a/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignal.xcframework/ios-arm64_x86_64-simulator/OneSignal.framework/Headers/OneSignal.h b/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignal.xcframework/ios-arm64_x86_64-simulator/OneSignal.framework/Headers/OneSignal.h deleted file mode 100755 index a85aa7bd7..000000000 --- a/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignal.xcframework/ios-arm64_x86_64-simulator/OneSignal.framework/Headers/OneSignal.h +++ /dev/null @@ -1,463 +0,0 @@ -/** - Modified MIT License - - Copyright 2017 OneSignal - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - 1. The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - 2. All copies of substantial portions of the Software may only be used in connection - with services provided by OneSignal. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - */ - -/** - ### Setting up the SDK ### - Follow the documentation from https://documentation.onesignal.com/docs/ios-sdk-setupto setup OneSignal in your app. - - ### API Reference ### - Follow the documentation from https://documentation.onesignal.com/docs/ios-sdk-api for a detailed explanation of the API. - - ### Troubleshoot ### - Follow the documentation from https://documentation.onesignal.com/docs/troubleshooting-ios to fix common problems. - - For help on how to upgrade your code from 1.* SDK to 2.*: https://documentation.onesignal.com/docs/upgrading-to-ios-sdk-20 - - ### More ### - iOS Push Cert: https://documentation.onesignal.com/docs/generating-an-ios-push-certificate -*/ - -#import -#import -#import -#import -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wstrict-prototypes" -#pragma clang diagnostic ignored "-Wnullability-completeness" - -@interface OSInAppMessage : NSObject - -@property (strong, nonatomic, nonnull) NSString *messageId; - -// Convert the object into a NSDictionary -- (NSDictionary *_Nonnull)jsonRepresentation; - -@end - - -@interface OSInAppMessageTag : NSObject - -@property (strong, nonatomic, nullable) NSDictionary *tagsToAdd; -@property (strong, nonatomic, nullable) NSArray *tagsToRemove; - -// Convert the class into a NSDictionary -- (NSDictionary *_Nonnull)jsonRepresentation; - -@end - -@interface OSInAppMessageAction : NSObject - -// The action name attached to the IAM action -@property (strong, nonatomic, nullable) NSString *clickName; - -// The URL (if any) that should be opened when the action occurs -@property (strong, nonatomic, nullable) NSURL *clickUrl; - -//UUID for the page in an IAM Carousel -@property (strong, nonatomic, nullable) NSString *pageId; - -// Whether or not the click action is first click on the IAM -@property (nonatomic) BOOL firstClick; - -// Whether or not the click action dismisses the message -@property (nonatomic) BOOL closesMessage; - -// The outcome to send for this action -@property (strong, nonatomic, nullable) NSArray *outcomes; - -// The tags to send for this action -@property (strong, nonatomic, nullable) OSInAppMessageTag *tags; - -// Convert the class into a NSDictionary -- (NSDictionary *_Nonnull)jsonRepresentation; - -@end - -@protocol OSInAppMessageDelegate -@optional -- (void)handleMessageAction:(OSInAppMessageAction * _Nonnull)action NS_SWIFT_NAME(handleMessageAction(action:)); -@end - -@protocol OSInAppMessageLifecycleHandler -@optional -- (void)onWillDisplayInAppMessage:(OSInAppMessage *)message; -- (void)onDidDisplayInAppMessage:(OSInAppMessage *)message; -- (void)onWillDismissInAppMessage:(OSInAppMessage *)message; -- (void)onDidDismissInAppMessage:(OSInAppMessage *)message; -@end - -typedef NS_ENUM(NSInteger, OSNotificationPermission) { - // The user has not yet made a choice regarding whether your app can show notifications. - OSNotificationPermissionNotDetermined = 0, - - // The application is not authorized to post user notifications. - OSNotificationPermissionDenied, - - // The application is authorized to post user notifications. - OSNotificationPermissionAuthorized, - - // the application is only authorized to post Provisional notifications (direct to history) - OSNotificationPermissionProvisional, - - // the application is authorized to send notifications for 8 hours. Only used by App Clips. - OSNotificationPermissionEphemeral -}; - -// Permission Classes -@interface OSPermissionState : NSObject - -@property (readonly, nonatomic) BOOL reachable; -@property (readonly, nonatomic) BOOL hasPrompted; -@property (readonly, nonatomic) BOOL providesAppNotificationSettings; -@property (readonly, nonatomic) OSNotificationPermission status; -- (NSDictionary* _Nonnull)toDictionary; - -@end - -@interface OSPermissionStateChanges : NSObject - -@property (readonly, nonnull) OSPermissionState* to; -@property (readonly, nonnull) OSPermissionState* from; -- (NSDictionary* _Nonnull)toDictionary; - -@end - -// Subscription Classes -@interface OSSubscriptionState : NSObject - -@property (readonly, nonatomic) BOOL isSubscribed; // (yes only if userId, pushToken, and setSubscription exists / are true) -@property (readonly, nonatomic) BOOL isPushDisabled; // returns value of disablePush. -@property (readonly, nonatomic, nullable) NSString* userId; // AKA OneSignal PlayerId -@property (readonly, nonatomic, nullable) NSString* pushToken; // AKA Apple Device Token -- (NSDictionary* _Nonnull)toDictionary; - -@end - -@interface OSSubscriptionStateChanges : NSObject -@property (readonly, nonnull) OSSubscriptionState* to; -@property (readonly, nonnull) OSSubscriptionState* from; -- (NSDictionary* _Nonnull)toDictionary; -@end - -@interface OSEmailSubscriptionState : NSObject -@property (readonly, nonatomic, nullable) NSString *emailUserId; // The new Email user ID -@property (readonly, nonatomic, nullable) NSString *emailAddress; -@property (readonly, nonatomic) BOOL isSubscribed; -- (NSDictionary* _Nonnull)toDictionary; -@end - -@interface OSEmailSubscriptionStateChanges : NSObject -@property (readonly, nonnull) OSEmailSubscriptionState* to; -@property (readonly, nonnull) OSEmailSubscriptionState* from; -- (NSDictionary* _Nonnull)toDictionary; -@end - -@interface OSSMSSubscriptionState : NSObject -@property (readonly, nonatomic, nullable) NSString* smsUserId; -@property (readonly, nonatomic, nullable) NSString *smsNumber; -@property (readonly, nonatomic) BOOL isSubscribed; -- (NSDictionary* _Nonnull)toDictionary; -@end - -@interface OSSMSSubscriptionStateChanges : NSObject -@property (readonly, nonnull) OSSMSSubscriptionState* to; -@property (readonly, nonnull) OSSMSSubscriptionState* from; -- (NSDictionary* _Nonnull)toDictionary; -@end - -@protocol OSPermissionObserver -- (void)onOSPermissionChanged:(OSPermissionStateChanges* _Nonnull)stateChanges; -@end - -@protocol OSSubscriptionObserver -- (void)onOSSubscriptionChanged:(OSSubscriptionStateChanges* _Nonnull)stateChanges; -@end - -@protocol OSEmailSubscriptionObserver -- (void)onOSEmailSubscriptionChanged:(OSEmailSubscriptionStateChanges* _Nonnull)stateChanges; -@end - -@protocol OSSMSSubscriptionObserver -- (void)onOSSMSSubscriptionChanged:(OSSMSSubscriptionStateChanges* _Nonnull)stateChanges; -@end - -@interface OSDeviceState : NSObject -/** - * Get the app's notification permission - * @return false if the user disabled notifications for the app, otherwise true - */ -@property (readonly) BOOL hasNotificationPermission; -/** - * Get whether the user is subscribed to OneSignal notifications or not - * @return false if the user is not subscribed to OneSignal notifications, otherwise true - */ -@property (readonly) BOOL isPushDisabled; -/** - * Get whether the user is subscribed - * @return true if isNotificationEnabled, isUserSubscribed, getUserId and getPushToken are true, otherwise false - */ -@property (readonly) BOOL isSubscribed; -/** - * Get the user notification permision status - * @return OSNotificationPermission -*/ -@property (readonly) OSNotificationPermission notificationPermissionStatus; -/** - * Get user id from registration (player id) - * @return user id if user is registered, otherwise null - */ -@property (readonly, nullable) NSString* userId; -/** - * Get apple deice push token - * @return push token if available, otherwise null - */ -@property (readonly, nullable) NSString* pushToken; -/** - * Get the user email id - * @return email id if user address was registered, otherwise null - */ -@property (readonly, nullable) NSString* emailUserId; -/** - * Get the user email - * @return email address if set, otherwise null - */ -@property (readonly, nullable) NSString* emailAddress; - -@property (readonly) BOOL isEmailSubscribed; - -/** - * Get the user sms id - * @return sms id if user sms number was registered, otherwise null - */ -@property (readonly, nullable) NSString* smsUserId; -/** - * Get the user sms number, number may start with + and continue with numbers or contain only numbers - * e.g: +11231231231 or 11231231231 - * @return sms number if set, otherwise null - */ -@property (readonly, nullable) NSString* smsNumber; - -@property (readonly) BOOL isSMSSubscribed; - -// Convert the class into a NSDictionary -- (NSDictionary *_Nonnull)jsonRepresentation; - -@end - -typedef void (^OSWebOpenURLResultBlock)(BOOL shouldOpen); - -/*Block for generic results on success and errors on failure*/ -typedef void (^OSResultSuccessBlock)(NSDictionary* result); -typedef void (^OSFailureBlock)(NSError* error); - - -// ======= OneSignal Class Interface ========= -@interface OneSignal : NSObject - -+ (NSString*)appId; -+ (NSString* _Nonnull)sdkVersionRaw; -+ (NSString* _Nonnull)sdkSemanticVersion; - -+ (void)disablePush:(BOOL)disable; - -// Only used for wrapping SDKs, such as Unity, Cordova, Xamarin, etc. -+ (void)setMSDKType:(NSString* _Nonnull)type; - -#pragma mark Initialization -+ (void)setAppId:(NSString* _Nonnull)newAppId; -+ (void)initWithLaunchOptions:(NSDictionary* _Nullable)launchOptions; -+ (void)setLaunchURLsInApp:(BOOL)launchInApp; -+ (void)setProvidesNotificationSettingsView:(BOOL)providesView; - - -#pragma mark Live Activity -+ (void)enterLiveActivity:(NSString * _Nonnull)activityId withToken:(NSString * _Nonnull)token; -+ (void)enterLiveActivity:(NSString * _Nonnull)activityId withToken:(NSString * _Nonnull)token withSuccess:(OSResultSuccessBlock _Nullable)successBlock withFailure:(OSFailureBlock _Nullable)failureBlock; - -+ (void)exitLiveActivity:(NSString * _Nonnull)activityId; -+ (void)exitLiveActivity:(NSString * _Nonnull)activityId withSuccess:(OSResultSuccessBlock _Nullable)successBlock withFailure:(OSFailureBlock _Nullable)failureBlock; - -#pragma mark Logging -+ (void)setLogLevel:(ONE_S_LOG_LEVEL)logLevel visualLevel:(ONE_S_LOG_LEVEL)visualLogLevel; -+ (void)onesignalLog:(ONE_S_LOG_LEVEL)logLevel message:(NSString* _Nonnull)message; - -#pragma mark Prompt For Push -typedef void(^OSUserResponseBlock)(BOOL accepted); - -+ (void)promptForPushNotificationsWithUserResponse:(OSUserResponseBlock)block; -+ (void)promptForPushNotificationsWithUserResponse:(OSUserResponseBlock)block fallbackToSettings:(BOOL)fallback; -+ (void)registerForProvisionalAuthorization:(OSUserResponseBlock)block; -+ (OSDeviceState*)getDeviceState; - -#pragma mark Privacy Consent -+ (void)consentGranted:(BOOL)granted; -// Tells your application if privacy consent is still needed from the current user -+ (BOOL)requiresUserPrivacyConsent; -+ (void)setRequiresUserPrivacyConsent:(BOOL)required; - -#pragma mark Public Handlers - -// If the completion block is not called within 25 seconds of this block being called in notificationWillShowInForegroundHandler then the completion will be automatically fired. -typedef void (^OSNotificationWillShowInForegroundBlock)(OSNotification * _Nonnull notification, OSNotificationDisplayResponse _Nonnull completion); -typedef void (^OSNotificationOpenedBlock)(OSNotificationOpenedResult * _Nonnull result); -typedef void (^OSInAppMessageClickBlock)(OSInAppMessageAction * _Nonnull action); - -+ (void)setNotificationWillShowInForegroundHandler:(OSNotificationWillShowInForegroundBlock _Nullable)block; -+ (void)setNotificationOpenedHandler:(OSNotificationOpenedBlock _Nullable)block; -+ (void)setInAppMessageClickHandler:(OSInAppMessageClickBlock _Nullable)block; -+ (void)setInAppMessageLifecycleHandler:(NSObject *_Nullable)delegate; - -#pragma mark Post Notification -+ (void)postNotification:(NSDictionary* _Nonnull)jsonData; -+ (void)postNotification:(NSDictionary* _Nonnull)jsonData onSuccess:(OSResultSuccessBlock _Nullable)successBlock onFailure:(OSFailureBlock _Nullable)failureBlock; -+ (void)postNotificationWithJsonString:(NSString* _Nonnull)jsonData onSuccess:(OSResultSuccessBlock _Nullable)successBlock onFailure:(OSFailureBlock _Nullable)failureBlock; - -#pragma mark Location -// - Request and track user's location -+ (void)promptLocation; -+ (void)setLocationShared:(BOOL)enable; -+ (BOOL)isLocationShared; - -#pragma mark Tags -+ (void)sendTag:(NSString* _Nonnull)key value:(NSString* _Nonnull)value onSuccess:(OSResultSuccessBlock _Nullable)successBlock onFailure:(OSFailureBlock _Nullable)failureBlock; -+ (void)sendTag:(NSString* _Nonnull)key value:(NSString* _Nonnull)value; -+ (void)sendTags:(NSDictionary* _Nonnull)keyValuePair onSuccess:(OSResultSuccessBlock _Nullable)successBlock onFailure:(OSFailureBlock _Nullable)failureBlock; -+ (void)sendTags:(NSDictionary* _Nonnull)keyValuePair; -+ (void)sendTagsWithJsonString:(NSString* _Nonnull)jsonString; -+ (void)getTags:(OSResultSuccessBlock _Nullable)successBlock onFailure:(OSFailureBlock _Nullable)failureBlock; -+ (void)getTags:(OSResultSuccessBlock _Nullable)successBlock; -+ (void)deleteTag:(NSString* _Nonnull)key onSuccess:(OSResultSuccessBlock _Nullable)successBlock onFailure:(OSFailureBlock _Nullable)failureBlock; -+ (void)deleteTag:(NSString* _Nonnull)key; -+ (void)deleteTags:(NSArray* _Nonnull)keys onSuccess:(OSResultSuccessBlock _Nullable)successBlock onFailure:(OSFailureBlock _Nullable)failureBlock; -+ (void)deleteTags:(NSArray *_Nonnull)keys; -+ (void)deleteTagsWithJsonString:(NSString* _Nonnull)jsonString; - -#pragma mark Permission, Subscription, and Email Observers -NS_ASSUME_NONNULL_BEGIN - -+ (void)addPermissionObserver:(NSObject*)observer; -+ (void)removePermissionObserver:(NSObject*)observer; - -+ (void)addSubscriptionObserver:(NSObject*)observer; -+ (void)removeSubscriptionObserver:(NSObject*)observer; - -+ (void)addEmailSubscriptionObserver:(NSObject*)observer; -+ (void)removeEmailSubscriptionObserver:(NSObject*)observer; - -+ (void)addSMSSubscriptionObserver:(NSObject*)observer; -+ (void)removeSMSSubscriptionObserver:(NSObject*)observer; -NS_ASSUME_NONNULL_END - -#pragma mark Email -// Typedefs defining completion blocks for email & simultaneous HTTP requests -typedef void (^OSEmailFailureBlock)(NSError *error); -typedef void (^OSEmailSuccessBlock)(); - -// Allows you to set the email for this user. -// Email Auth Token is a (recommended) optional parameter that should *NOT* be generated on the client. -// For security purposes, the emailAuthToken should be generated by your backend server. -// If you do not have a backend server for your application, use the version of thge setEmail: method without an emailAuthToken parameter. -+ (void)setEmail:(NSString * _Nonnull)email withEmailAuthHashToken:(NSString * _Nullable)hashToken; -+ (void)setEmail:(NSString * _Nonnull)email withEmailAuthHashToken:(NSString * _Nullable)hashToken withSuccess:(OSEmailSuccessBlock _Nullable)successBlock withFailure:(OSEmailFailureBlock _Nullable)failureBlock; - -// Sets email without an authentication token -+ (void)setEmail:(NSString * _Nonnull)email; -+ (void)setEmail:(NSString * _Nonnull)email withSuccess:(OSEmailSuccessBlock _Nullable)successBlock withFailure:(OSEmailFailureBlock _Nullable)failureBlock; - -// Logs the device out of the current email. -+ (void)logoutEmail; -+ (void)logoutEmailWithSuccess:(OSEmailSuccessBlock _Nullable)successBlock withFailure:(OSEmailFailureBlock _Nullable)failureBlock; - -#pragma mark SMS -// Typedefs defining completion blocks for SMS & simultaneous HTTP requests -typedef void (^OSSMSFailureBlock)(NSError *error); -typedef void (^OSSMSSuccessBlock)(NSDictionary *results); - -// Allows you to set the SMS for this user. SMS number may start with + and continue with numbers or contain only numbers -// e.g: +11231231231 or 11231231231 -// SMS Auth Token is a (recommended) optional parameter that should *NOT* be generated on the client. -// For security purposes, the smsAuthToken should be generated by your backend server. -// If you do not have a backend server for your application, use the version of thge setSMSNumber: method without an smsAuthToken parameter. -+ (void)setSMSNumber:(NSString * _Nonnull)smsNumber withSMSAuthHashToken:(NSString * _Nullable)hashToken; -+ (void)setSMSNumber:(NSString * _Nonnull)smsNumber withSMSAuthHashToken:(NSString * _Nullable)hashToken withSuccess:(OSSMSSuccessBlock _Nullable)successBlock withFailure:(OSSMSFailureBlock _Nullable)failureBlock; - -// Sets SMS without an authentication token -+ (void)setSMSNumber:(NSString * _Nonnull)smsNumber; -+ (void)setSMSNumber:(NSString * _Nonnull)smsNumber withSuccess:(OSSMSSuccessBlock _Nullable)successBlock withFailure:(OSSMSFailureBlock _Nullable)failureBlock; - -// Logs the device out of the current sms number. -+ (void)logoutSMSNumber; -+ (void)logoutSMSNumberWithSuccess:(OSSMSSuccessBlock _Nullable)successBlock withFailure:(OSSMSFailureBlock _Nullable)failureBlock; - -#pragma mark Language -// Typedefs defining completion blocks for updating language -typedef void (^OSUpdateLanguageFailureBlock)(NSError *error); -typedef void (^OSUpdateLanguageSuccessBlock)(); - -// Language input ISO 639-1 code representation for user input language -+ (void)setLanguage:(NSString * _Nonnull)language; -+ (void)setLanguage:(NSString * _Nonnull)language withSuccess:(OSUpdateLanguageSuccessBlock _Nullable)successBlock withFailure:(OSUpdateLanguageFailureBlock)failureBlock; - -#pragma mark External User Id -// Typedefs defining completion blocks for updating the external user id -typedef void (^OSUpdateExternalUserIdFailureBlock)(NSError *error); -typedef void (^OSUpdateExternalUserIdSuccessBlock)(NSDictionary *results); - -+ (void)setExternalUserId:(NSString * _Nonnull)externalId; -+ (void)setExternalUserId:(NSString * _Nonnull)externalId withSuccess:(OSUpdateExternalUserIdSuccessBlock _Nullable)successBlock withFailure:(OSUpdateExternalUserIdFailureBlock _Nullable)failureBlock; -+ (void)setExternalUserId:(NSString *)externalId withExternalIdAuthHashToken:(NSString *)hashToken withSuccess:(OSUpdateExternalUserIdSuccessBlock _Nullable)successBlock withFailure:(OSUpdateExternalUserIdFailureBlock _Nullable)failureBlock; -+ (void)removeExternalUserId; -+ (void)removeExternalUserId:(OSUpdateExternalUserIdSuccessBlock _Nullable)successBlock withFailure:(OSUpdateExternalUserIdFailureBlock _Nullable)failureBlock; - -#pragma mark In-App Messaging -+ (BOOL)isInAppMessagingPaused; -+ (void)pauseInAppMessages:(BOOL)pause; -+ (void)addTrigger:(NSString * _Nonnull)key withValue:(id _Nonnull)value; -+ (void)addTriggers:(NSDictionary * _Nonnull)triggers; -+ (void)removeTriggerForKey:(NSString * _Nonnull)key; -+ (void)removeTriggersForKeys:(NSArray * _Nonnull)keys; -+ (NSDictionary * _Nonnull)getTriggers; -+ (id _Nullable)getTriggerValueForKey:(NSString * _Nonnull)key; - -#pragma mark Outcomes -+ (void)sendOutcome:(NSString * _Nonnull)name; -+ (void)sendOutcome:(NSString * _Nonnull)name onSuccess:(OSSendOutcomeSuccess _Nullable)success; -+ (void)sendUniqueOutcome:(NSString * _Nonnull)name; -+ (void)sendUniqueOutcome:(NSString * _Nonnull)name onSuccess:(OSSendOutcomeSuccess _Nullable)success; -+ (void)sendOutcomeWithValue:(NSString * _Nonnull)name value:(NSNumber * _Nonnull)value; -+ (void)sendOutcomeWithValue:(NSString * _Nonnull)name value:(NSNumber * _Nonnull)value onSuccess:(OSSendOutcomeSuccess _Nullable)success; - -#pragma mark Extension -// iOS 10 only -// Process from Notification Service Extension. -// Used for iOS Media Attachemtns and Action Buttons. -+ (UNMutableNotificationContent*)didReceiveNotificationExtensionRequest:(UNNotificationRequest* _Nonnull)request withMutableNotificationContent:(UNMutableNotificationContent* _Nullable)replacementContent __deprecated_msg("Please use didReceiveNotificationExtensionRequest:withMutableNotificationContent:withContentHandler: instead."); -+ (UNMutableNotificationContent*)didReceiveNotificationExtensionRequest:(UNNotificationRequest* _Nonnull)request withMutableNotificationContent:(UNMutableNotificationContent* _Nullable)replacementContent withContentHandler:(void (^)(UNNotificationContent *_Nonnull))contentHandler; -+ (UNMutableNotificationContent*)serviceExtensionTimeWillExpireRequest:(UNNotificationRequest* _Nonnull)request withMutableNotificationContent:(UNMutableNotificationContent* _Nullable)replacementContent; -@end - -#pragma clang diagnostic pop diff --git a/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignal.xcframework/ios-arm64_x86_64-simulator/OneSignal.framework/Modules/module.modulemap b/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignal.xcframework/ios-arm64_x86_64-simulator/OneSignal.framework/Modules/module.modulemap deleted file mode 100644 index a3424cd21..000000000 --- a/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignal.xcframework/ios-arm64_x86_64-simulator/OneSignal.framework/Modules/module.modulemap +++ /dev/null @@ -1,6 +0,0 @@ -framework module OneSignal { - umbrella header "OneSignal.h" - - export * - module * { export * } -} diff --git a/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignal.xcframework/ios-arm64_x86_64-simulator/OneSignal.framework/OneSignal b/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignal.xcframework/ios-arm64_x86_64-simulator/OneSignal.framework/OneSignal deleted file mode 100755 index 0ed076a4c..000000000 Binary files a/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignal.xcframework/ios-arm64_x86_64-simulator/OneSignal.framework/OneSignal and /dev/null differ diff --git a/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignalFramework.xcframework.zip b/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignalFramework.xcframework.zip new file mode 100644 index 000000000..d8b821749 Binary files /dev/null and b/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignalFramework.xcframework.zip differ diff --git a/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignalFramework.xcframework/Info.plist b/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignalFramework.xcframework/Info.plist new file mode 100644 index 000000000..0492c57e7 --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignalFramework.xcframework/Info.plist @@ -0,0 +1,55 @@ + + + + + AvailableLibraries + + + LibraryIdentifier + ios-arm64_x86_64-simulator + LibraryPath + OneSignalFramework.framework + SupportedArchitectures + + arm64 + x86_64 + + SupportedPlatform + ios + SupportedPlatformVariant + simulator + + + LibraryIdentifier + ios-arm64_x86_64-maccatalyst + LibraryPath + OneSignalFramework.framework + SupportedArchitectures + + arm64 + x86_64 + + SupportedPlatform + ios + SupportedPlatformVariant + maccatalyst + + + LibraryIdentifier + ios-arm64 + LibraryPath + OneSignalFramework.framework + SupportedArchitectures + + arm64 + + SupportedPlatform + ios + + + CFBundlePackageType + XFWK + XCFrameworkFormatVersion + 1.0 + + diff --git a/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignalFramework.xcframework/ios-arm64/OneSignalFramework.framework/Headers/OneSignalFramework-Swift.h b/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignalFramework.xcframework/ios-arm64/OneSignalFramework.framework/Headers/OneSignalFramework-Swift.h new file mode 100644 index 000000000..fa1746a1a --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignalFramework.xcframework/ios-arm64/OneSignalFramework.framework/Headers/OneSignalFramework-Swift.h @@ -0,0 +1,265 @@ +#if 0 +#elif defined(__arm64__) && __arm64__ +// Generated by Apple Swift version 5.7.1 (swiftlang-5.7.1.135.3 clang-1400.0.29.51) +#ifndef ONESIGNALFRAMEWORK_SWIFT_H +#define ONESIGNALFRAMEWORK_SWIFT_H +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wgcc-compat" + +#if !defined(__has_include) +# define __has_include(x) 0 +#endif +#if !defined(__has_attribute) +# define __has_attribute(x) 0 +#endif +#if !defined(__has_feature) +# define __has_feature(x) 0 +#endif +#if !defined(__has_warning) +# define __has_warning(x) 0 +#endif + +#if __has_include() +# include +#endif + +#pragma clang diagnostic ignored "-Wduplicate-method-match" +#pragma clang diagnostic ignored "-Wauto-import" +#if defined(__OBJC__) +#include +#endif +#if defined(__cplusplus) +#include +#include +#include +#else +#include +#include +#include +#endif + +#if !defined(SWIFT_TYPEDEFS) +# define SWIFT_TYPEDEFS 1 +# if __has_include() +# include +# elif !defined(__cplusplus) +typedef uint_least16_t char16_t; +typedef uint_least32_t char32_t; +# endif +typedef float swift_float2 __attribute__((__ext_vector_type__(2))); +typedef float swift_float3 __attribute__((__ext_vector_type__(3))); +typedef float swift_float4 __attribute__((__ext_vector_type__(4))); +typedef double swift_double2 __attribute__((__ext_vector_type__(2))); +typedef double swift_double3 __attribute__((__ext_vector_type__(3))); +typedef double swift_double4 __attribute__((__ext_vector_type__(4))); +typedef int swift_int2 __attribute__((__ext_vector_type__(2))); +typedef int swift_int3 __attribute__((__ext_vector_type__(3))); +typedef int swift_int4 __attribute__((__ext_vector_type__(4))); +typedef unsigned int swift_uint2 __attribute__((__ext_vector_type__(2))); +typedef unsigned int swift_uint3 __attribute__((__ext_vector_type__(3))); +typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4))); +#endif + +#if !defined(SWIFT_PASTE) +# define SWIFT_PASTE_HELPER(x, y) x##y +# define SWIFT_PASTE(x, y) SWIFT_PASTE_HELPER(x, y) +#endif +#if !defined(SWIFT_METATYPE) +# define SWIFT_METATYPE(X) Class +#endif +#if !defined(SWIFT_CLASS_PROPERTY) +# if __has_feature(objc_class_property) +# define SWIFT_CLASS_PROPERTY(...) __VA_ARGS__ +# else +# define SWIFT_CLASS_PROPERTY(...) +# endif +#endif + +#if __has_attribute(objc_runtime_name) +# define SWIFT_RUNTIME_NAME(X) __attribute__((objc_runtime_name(X))) +#else +# define SWIFT_RUNTIME_NAME(X) +#endif +#if __has_attribute(swift_name) +# define SWIFT_COMPILE_NAME(X) __attribute__((swift_name(X))) +#else +# define SWIFT_COMPILE_NAME(X) +#endif +#if __has_attribute(objc_method_family) +# define SWIFT_METHOD_FAMILY(X) __attribute__((objc_method_family(X))) +#else +# define SWIFT_METHOD_FAMILY(X) +#endif +#if __has_attribute(noescape) +# define SWIFT_NOESCAPE __attribute__((noescape)) +#else +# define SWIFT_NOESCAPE +#endif +#if __has_attribute(ns_consumed) +# define SWIFT_RELEASES_ARGUMENT __attribute__((ns_consumed)) +#else +# define SWIFT_RELEASES_ARGUMENT +#endif +#if __has_attribute(warn_unused_result) +# define SWIFT_WARN_UNUSED_RESULT __attribute__((warn_unused_result)) +#else +# define SWIFT_WARN_UNUSED_RESULT +#endif +#if __has_attribute(noreturn) +# define SWIFT_NORETURN __attribute__((noreturn)) +#else +# define SWIFT_NORETURN +#endif +#if !defined(SWIFT_CLASS_EXTRA) +# define SWIFT_CLASS_EXTRA +#endif +#if !defined(SWIFT_PROTOCOL_EXTRA) +# define SWIFT_PROTOCOL_EXTRA +#endif +#if !defined(SWIFT_ENUM_EXTRA) +# define SWIFT_ENUM_EXTRA +#endif +#if !defined(SWIFT_CLASS) +# if __has_attribute(objc_subclassing_restricted) +# define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_CLASS_EXTRA +# define SWIFT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA +# else +# define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA +# define SWIFT_CLASS_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA +# endif +#endif +#if !defined(SWIFT_RESILIENT_CLASS) +# if __has_attribute(objc_class_stub) +# define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME) __attribute__((objc_class_stub)) +# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_class_stub)) SWIFT_CLASS_NAMED(SWIFT_NAME) +# else +# define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME) +# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) SWIFT_CLASS_NAMED(SWIFT_NAME) +# endif +#endif + +#if !defined(SWIFT_PROTOCOL) +# define SWIFT_PROTOCOL(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA +# define SWIFT_PROTOCOL_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA +#endif + +#if !defined(SWIFT_EXTENSION) +# define SWIFT_EXTENSION(M) SWIFT_PASTE(M##_Swift_, __LINE__) +#endif + +#if !defined(OBJC_DESIGNATED_INITIALIZER) +# if __has_attribute(objc_designated_initializer) +# define OBJC_DESIGNATED_INITIALIZER __attribute__((objc_designated_initializer)) +# else +# define OBJC_DESIGNATED_INITIALIZER +# endif +#endif +#if !defined(SWIFT_ENUM_ATTR) +# if defined(__has_attribute) && __has_attribute(enum_extensibility) +# define SWIFT_ENUM_ATTR(_extensibility) __attribute__((enum_extensibility(_extensibility))) +# else +# define SWIFT_ENUM_ATTR(_extensibility) +# endif +#endif +#if !defined(SWIFT_ENUM) +# define SWIFT_ENUM(_type, _name, _extensibility) enum _name : _type _name; enum SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type +# if __has_feature(generalized_swift_name) +# define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) enum _name : _type _name SWIFT_COMPILE_NAME(SWIFT_NAME); enum SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type +# else +# define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) SWIFT_ENUM(_type, _name, _extensibility) +# endif +#endif +#if !defined(SWIFT_UNAVAILABLE) +# define SWIFT_UNAVAILABLE __attribute__((unavailable)) +#endif +#if !defined(SWIFT_UNAVAILABLE_MSG) +# define SWIFT_UNAVAILABLE_MSG(msg) __attribute__((unavailable(msg))) +#endif +#if !defined(SWIFT_AVAILABILITY) +# define SWIFT_AVAILABILITY(plat, ...) __attribute__((availability(plat, __VA_ARGS__))) +#endif +#if !defined(SWIFT_WEAK_IMPORT) +# define SWIFT_WEAK_IMPORT __attribute__((weak_import)) +#endif +#if !defined(SWIFT_DEPRECATED) +# define SWIFT_DEPRECATED __attribute__((deprecated)) +#endif +#if !defined(SWIFT_DEPRECATED_MSG) +# define SWIFT_DEPRECATED_MSG(...) __attribute__((deprecated(__VA_ARGS__))) +#endif +#if __has_feature(attribute_diagnose_if_objc) +# define SWIFT_DEPRECATED_OBJC(Msg) __attribute__((diagnose_if(1, Msg, "warning"))) +#else +# define SWIFT_DEPRECATED_OBJC(Msg) SWIFT_DEPRECATED_MSG(Msg) +#endif +#if defined(__OBJC__) +#if !defined(IBSegueAction) +# define IBSegueAction +#endif +#endif +#if !defined(SWIFT_EXTERN) +# if defined(__cplusplus) +# define SWIFT_EXTERN extern "C" +# else +# define SWIFT_EXTERN extern +# endif +#endif +#if !defined(SWIFT_CALL) +# define SWIFT_CALL __attribute__((swiftcall)) +#endif +#if defined(__cplusplus) +#if !defined(SWIFT_NOEXCEPT) +# define SWIFT_NOEXCEPT noexcept +#endif +#else +#if !defined(SWIFT_NOEXCEPT) +# define SWIFT_NOEXCEPT +#endif +#endif +#if defined(__cplusplus) +#if !defined(SWIFT_CXX_INT_DEFINED) +#define SWIFT_CXX_INT_DEFINED +namespace swift { +using Int = ptrdiff_t; +using UInt = size_t; +} +#endif +#endif +#if defined(__OBJC__) +#if __has_feature(modules) +#if __has_warning("-Watimport-in-framework-header") +#pragma clang diagnostic ignored "-Watimport-in-framework-header" +#endif +#endif + +#endif +#pragma clang diagnostic ignored "-Wproperty-attribute-mismatch" +#pragma clang diagnostic ignored "-Wduplicate-method-arg" +#if __has_warning("-Wpragma-clang-attribute") +# pragma clang diagnostic ignored "-Wpragma-clang-attribute" +#endif +#pragma clang diagnostic ignored "-Wunknown-pragmas" +#pragma clang diagnostic ignored "-Wnullability" +#pragma clang diagnostic ignored "-Wdollar-in-identifier-extension" + +#if __has_attribute(external_source_symbol) +# pragma push_macro("any") +# undef any +# pragma clang attribute push(__attribute__((external_source_symbol(language="Swift", defined_in="OneSignalFramework",generated_declaration))), apply_to=any(function,enum,objc_interface,objc_category,objc_protocol)) +# pragma pop_macro("any") +#endif + +#if defined(__OBJC__) + +#endif +#if defined(__cplusplus) +#endif +#if __has_attribute(external_source_symbol) +# pragma clang attribute pop +#endif +#pragma clang diagnostic pop +#endif + +#else +#error unsupported Swift architecture +#endif diff --git a/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignalFramework.xcframework/ios-arm64/OneSignalFramework.framework/Headers/OneSignalFramework.h b/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignalFramework.xcframework/ios-arm64/OneSignalFramework.framework/Headers/OneSignalFramework.h new file mode 100755 index 000000000..5cffcce44 --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignalFramework.xcframework/ios-arm64/OneSignalFramework.framework/Headers/OneSignalFramework.h @@ -0,0 +1,116 @@ +/** + Modified MIT License + + Copyright 2017 OneSignal + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + 1. The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + 2. All copies of substantial portions of the Software may only be used in connection + with services provided by OneSignal. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + */ + +/** + ### Setting up the SDK ### + Follow the documentation from https://documentation.onesignal.com/docs/ios-sdk-setupto setup OneSignal in your app. + + ### API Reference ### + Follow the documentation from https://documentation.onesignal.com/docs/ios-sdk-api for a detailed explanation of the API. + + ### Troubleshoot ### + Follow the documentation from https://documentation.onesignal.com/docs/troubleshooting-ios to fix common problems. + + For help on how to upgrade your code from 1.* SDK to 2.*: https://documentation.onesignal.com/docs/upgrading-to-ios-sdk-20 + + ### More ### + iOS Push Cert: https://documentation.onesignal.com/docs/generating-an-ios-push-certificate +*/ + +#import +#import +#import +#import +#import +#import +#import +#import "OneSignalLiveActivityController.h" + +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wstrict-prototypes" +#pragma clang diagnostic ignored "-Wnullability-completeness" + +typedef void (^OSWebOpenURLResultBlock)(BOOL shouldOpen); + +/*Block for generic results on success and errors on failure*/ +typedef void (^OSResultSuccessBlock)(NSDictionary* result); +typedef void (^OSFailureBlock)(NSError* error); + +// ======= OneSignal Class Interface ========= +@interface OneSignal : NSObject + ++ (NSString* _Nonnull)sdkVersionRaw; ++ (NSString* _Nonnull)sdkSemanticVersion; + +#pragma mark User ++ (id)User NS_REFINED_FOR_SWIFT; ++ (void)login:(NSString * _Nonnull)externalId; ++ (void)login:(NSString * _Nonnull)externalId withToken:(NSString * _Nullable)token +NS_SWIFT_NAME(login(externalId:token:)); ++ (void)logout; + +#pragma mark Notifications ++ (Class)Notifications NS_REFINED_FOR_SWIFT; + +#pragma mark Initialization ++ (void)setLaunchOptions:(nullable NSDictionary*)newLaunchOptions; // meant for use by wrappers ++ (void)initialize:(nonnull NSString*)newAppId withLaunchOptions:(nullable NSDictionary*)launchOptions; ++ (void)setProvidesNotificationSettingsView:(BOOL)providesView; + +#pragma mark Live Activity ++ (Class)LiveActivities NS_REFINED_FOR_SWIFT; + +#pragma mark Logging ++ (Class)Debug NS_REFINED_FOR_SWIFT; + +#pragma mark Privacy Consent +/** + * Set to `true` if your application requires privacy consent. + * Consent should be provided prior to the invocation of `initialize` to ensure compliance. + */ ++ (void)setConsentRequired:(BOOL)required; ++ (void)setConsentGiven:(BOOL)granted; + +#pragma mark In-App Messaging ++ (Class)InAppMessages NS_REFINED_FOR_SWIFT; + +#pragma mark Location ++ (Class)Location NS_REFINED_FOR_SWIFT; + +#pragma mark Session ++ (Class)Session NS_REFINED_FOR_SWIFT; + +#pragma mark Extension +// iOS 10 only +// Process from Notification Service Extension. +// Used for iOS Media Attachemtns and Action Buttons. ++ (UNMutableNotificationContent*)didReceiveNotificationExtensionRequest:(UNNotificationRequest* _Nonnull)request withMutableNotificationContent:(UNMutableNotificationContent* _Nullable)replacementContent __deprecated_msg("Please use didReceiveNotificationExtensionRequest:withMutableNotificationContent:withContentHandler: instead."); ++ (UNMutableNotificationContent*)didReceiveNotificationExtensionRequest:(UNNotificationRequest* _Nonnull)request withMutableNotificationContent:(UNMutableNotificationContent* _Nullable)replacementContent withContentHandler:(void (^)(UNNotificationContent *_Nonnull))contentHandler; ++ (UNMutableNotificationContent*)serviceExtensionTimeWillExpireRequest:(UNNotificationRequest* _Nonnull)request withMutableNotificationContent:(UNMutableNotificationContent* _Nullable)replacementContent; +@end + +#pragma clang diagnostic pop diff --git a/iOS_SDK/OneSignalSDK/Source/LanguageContext.m b/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignalFramework.xcframework/ios-arm64/OneSignalFramework.framework/Headers/OneSignalLiveActivityController.h similarity index 57% rename from iOS_SDK/OneSignalSDK/Source/LanguageContext.m rename to iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignalFramework.xcframework/ios-arm64/OneSignalFramework.framework/Headers/OneSignalLiveActivityController.h index 1d8057f35..43233bc0e 100644 --- a/iOS_SDK/OneSignalSDK/Source/LanguageContext.m +++ b/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignalFramework.xcframework/ios-arm64/OneSignalFramework.framework/Headers/OneSignalLiveActivityController.h @@ -1,7 +1,7 @@ /** * Modified MIT License * - * Copyright 2021 OneSignal + * Copyright 2023 OneSignal * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -25,33 +25,23 @@ * THE SOFTWARE. */ -#import "LanguageContext.h" -#import "LanguageProvider.h" -#import "OneSignalHelper.h" -#import "LanguageProviderDevice.h" -#import "LanguageProviderAppDefined.h" +#ifndef OneSignalLiveActivityController_h +#define OneSignalLiveActivityController_h -@implementation LanguageContext { +#import - NSObject *strategy; -} - -- (instancetype)init { - self = [super init]; - let languageAppDefined = [OneSignalUserDefaults.initStandard getSavedStringForKey:OSUD_LANGUAGE defaultValue:nil]; - if (languageAppDefined == nil) { - strategy = [LanguageProviderDevice new]; - } else { - strategy = [LanguageProviderAppDefined new]; - } - return self; -} - -- (void)setStrategy:(NSObject*)newStrategy { - strategy = newStrategy; -} +/** + Public API for the LiveActivities namespace. + */ +@protocol OSLiveActivities ++ (void)enter:(NSString * _Nonnull)activityId withToken:(NSString * _Nonnull)token; ++ (void)enter:(NSString * _Nonnull)activityId withToken:(NSString * _Nonnull)token withSuccess:(OSResultSuccessBlock _Nullable)successBlock withFailure:(OSFailureBlock _Nullable)failureBlock; ++ (void)exit:(NSString * _Nonnull)activityId; ++ (void)exit:(NSString * _Nonnull)activityId withSuccess:(OSResultSuccessBlock _Nullable)successBlock withFailure:(OSFailureBlock _Nullable)failureBlock; +@end -- (NSString *)language { - return strategy.language; -} +@interface OneSignalLiveActivityController: NSObject ++ (Class_Nonnull)LiveActivities; @end + +#endif /* OneSignalLiveActivityController_h */ diff --git a/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignal.xcframework/ios-arm64/OneSignal.framework/Info.plist b/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignalFramework.xcframework/ios-arm64/OneSignalFramework.framework/Info.plist similarity index 52% rename from iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignal.xcframework/ios-arm64/OneSignal.framework/Info.plist rename to iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignalFramework.xcframework/ios-arm64/OneSignalFramework.framework/Info.plist index e2173b2ee..4f4fd7aea 100644 Binary files a/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignal.xcframework/ios-arm64/OneSignal.framework/Info.plist and b/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignalFramework.xcframework/ios-arm64/OneSignalFramework.framework/Info.plist differ diff --git a/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignalFramework.xcframework/ios-arm64/OneSignalFramework.framework/Modules/OneSignalFramework.swiftmodule/arm64-apple-ios.abi.json b/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignalFramework.xcframework/ios-arm64/OneSignalFramework.framework/Modules/OneSignalFramework.swiftmodule/arm64-apple-ios.abi.json new file mode 100644 index 000000000..8069d9ff4 --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignalFramework.xcframework/ios-arm64/OneSignalFramework.framework/Modules/OneSignalFramework.swiftmodule/arm64-apple-ios.abi.json @@ -0,0 +1,1261 @@ +{ + "ABIRoot": { + "kind": "Root", + "name": "TopLevel", + "printedName": "TopLevel", + "children": [ + { + "kind": "Import", + "name": "Foundation", + "printedName": "Foundation", + "declKind": "Import", + "moduleName": "OneSignalFramework", + "declAttributes": [ + "RawDocComment" + ] + }, + { + "kind": "Import", + "name": "OneSignalUser", + "printedName": "OneSignalUser", + "declKind": "Import", + "moduleName": "OneSignalFramework" + }, + { + "kind": "Import", + "name": "OneSignalOutcomes", + "printedName": "OneSignalOutcomes", + "declKind": "Import", + "moduleName": "OneSignalFramework" + }, + { + "kind": "Import", + "name": "OneSignalNotifications", + "printedName": "OneSignalNotifications", + "declKind": "Import", + "moduleName": "OneSignalFramework" + }, + { + "kind": "Import", + "name": "OneSignalCore", + "printedName": "OneSignalCore", + "declKind": "Import", + "moduleName": "OneSignalFramework" + }, + { + "kind": "TypeDecl", + "name": "OneSignal", + "printedName": "OneSignal", + "children": [ + { + "kind": "Var", + "name": "User", + "printedName": "User", + "children": [ + { + "kind": "TypeNominal", + "name": "OSUser", + "printedName": "OneSignalUser.OSUser", + "usr": "c:@M@OneSignalUser@objc(pl)OSUser" + } + ], + "declKind": "Var", + "usr": "s:So9OneSignalC0aB9FrameworkE4User0abD06OSUser_pvpZ", + "mangledName": "$sSo9OneSignalC0aB9FrameworkE4User0abD06OSUser_pvpZ", + "moduleName": "OneSignalFramework", + "static": true, + "declAttributes": [ + "Final" + ], + "isFromExtension": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "OSUser", + "printedName": "OneSignalUser.OSUser", + "usr": "c:@M@OneSignalUser@objc(pl)OSUser" + } + ], + "declKind": "Accessor", + "usr": "s:So9OneSignalC0aB9FrameworkE4User0abD06OSUser_pvgZ", + "mangledName": "$sSo9OneSignalC0aB9FrameworkE4User0abD06OSUser_pvgZ", + "moduleName": "OneSignalFramework", + "static": true, + "declAttributes": [ + "Final" + ], + "isFromExtension": true, + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "Notifications", + "printedName": "Notifications", + "children": [ + { + "kind": "TypeNominal", + "name": "ExistentialMetatype", + "printedName": "OneSignalNotifications.OSNotifications.Type", + "children": [ + { + "kind": "TypeNominal", + "name": "OSNotifications", + "printedName": "OneSignalNotifications.OSNotifications", + "usr": "c:objc(pl)OSNotifications" + } + ] + } + ], + "declKind": "Var", + "usr": "s:So9OneSignalC0aB9FrameworkE13NotificationsSo15OSNotifications_pXpvpZ", + "mangledName": "$sSo9OneSignalC0aB9FrameworkE13NotificationsSo15OSNotifications_pXpvpZ", + "moduleName": "OneSignalFramework", + "static": true, + "declAttributes": [ + "Final" + ], + "isFromExtension": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "ExistentialMetatype", + "printedName": "OneSignalNotifications.OSNotifications.Type", + "children": [ + { + "kind": "TypeNominal", + "name": "OSNotifications", + "printedName": "OneSignalNotifications.OSNotifications", + "usr": "c:objc(pl)OSNotifications" + } + ] + } + ], + "declKind": "Accessor", + "usr": "s:So9OneSignalC0aB9FrameworkE13NotificationsSo15OSNotifications_pXpvgZ", + "mangledName": "$sSo9OneSignalC0aB9FrameworkE13NotificationsSo15OSNotifications_pXpvgZ", + "moduleName": "OneSignalFramework", + "static": true, + "declAttributes": [ + "Final" + ], + "isFromExtension": true, + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "Session", + "printedName": "Session", + "children": [ + { + "kind": "TypeNominal", + "name": "ExistentialMetatype", + "printedName": "OneSignalOutcomes.OSSession.Type", + "children": [ + { + "kind": "TypeNominal", + "name": "OSSession", + "printedName": "OneSignalOutcomes.OSSession", + "usr": "c:objc(pl)OSSession" + } + ] + } + ], + "declKind": "Var", + "usr": "s:So9OneSignalC0aB9FrameworkE7SessionSo9OSSession_pXpvpZ", + "mangledName": "$sSo9OneSignalC0aB9FrameworkE7SessionSo9OSSession_pXpvpZ", + "moduleName": "OneSignalFramework", + "static": true, + "declAttributes": [ + "Final" + ], + "isFromExtension": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "ExistentialMetatype", + "printedName": "OneSignalOutcomes.OSSession.Type", + "children": [ + { + "kind": "TypeNominal", + "name": "OSSession", + "printedName": "OneSignalOutcomes.OSSession", + "usr": "c:objc(pl)OSSession" + } + ] + } + ], + "declKind": "Accessor", + "usr": "s:So9OneSignalC0aB9FrameworkE7SessionSo9OSSession_pXpvgZ", + "mangledName": "$sSo9OneSignalC0aB9FrameworkE7SessionSo9OSSession_pXpvgZ", + "moduleName": "OneSignalFramework", + "static": true, + "declAttributes": [ + "Final" + ], + "isFromExtension": true, + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "InAppMessages", + "printedName": "InAppMessages", + "children": [ + { + "kind": "TypeNominal", + "name": "ExistentialMetatype", + "printedName": "OneSignalCore.OSInAppMessages.Type", + "children": [ + { + "kind": "TypeNominal", + "name": "OSInAppMessages", + "printedName": "OneSignalCore.OSInAppMessages", + "usr": "c:objc(pl)OSInAppMessages" + } + ] + } + ], + "declKind": "Var", + "usr": "s:So9OneSignalC0aB9FrameworkE13InAppMessagesSo04OSIneF0_pXpvpZ", + "mangledName": "$sSo9OneSignalC0aB9FrameworkE13InAppMessagesSo04OSIneF0_pXpvpZ", + "moduleName": "OneSignalFramework", + "static": true, + "declAttributes": [ + "Final" + ], + "isFromExtension": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "ExistentialMetatype", + "printedName": "OneSignalCore.OSInAppMessages.Type", + "children": [ + { + "kind": "TypeNominal", + "name": "OSInAppMessages", + "printedName": "OneSignalCore.OSInAppMessages", + "usr": "c:objc(pl)OSInAppMessages" + } + ] + } + ], + "declKind": "Accessor", + "usr": "s:So9OneSignalC0aB9FrameworkE13InAppMessagesSo04OSIneF0_pXpvgZ", + "mangledName": "$sSo9OneSignalC0aB9FrameworkE13InAppMessagesSo04OSIneF0_pXpvgZ", + "moduleName": "OneSignalFramework", + "static": true, + "declAttributes": [ + "Final" + ], + "isFromExtension": true, + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "Debug", + "printedName": "Debug", + "children": [ + { + "kind": "TypeNominal", + "name": "ExistentialMetatype", + "printedName": "OneSignalCore.OSDebug.Type", + "children": [ + { + "kind": "TypeNominal", + "name": "OSDebug", + "printedName": "OneSignalCore.OSDebug", + "usr": "c:objc(pl)OSDebug" + } + ] + } + ], + "declKind": "Var", + "usr": "s:So9OneSignalC0aB9FrameworkE5DebugSo7OSDebug_pXpvpZ", + "mangledName": "$sSo9OneSignalC0aB9FrameworkE5DebugSo7OSDebug_pXpvpZ", + "moduleName": "OneSignalFramework", + "static": true, + "declAttributes": [ + "Final" + ], + "isFromExtension": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "ExistentialMetatype", + "printedName": "OneSignalCore.OSDebug.Type", + "children": [ + { + "kind": "TypeNominal", + "name": "OSDebug", + "printedName": "OneSignalCore.OSDebug", + "usr": "c:objc(pl)OSDebug" + } + ] + } + ], + "declKind": "Accessor", + "usr": "s:So9OneSignalC0aB9FrameworkE5DebugSo7OSDebug_pXpvgZ", + "mangledName": "$sSo9OneSignalC0aB9FrameworkE5DebugSo7OSDebug_pXpvgZ", + "moduleName": "OneSignalFramework", + "static": true, + "declAttributes": [ + "Final" + ], + "isFromExtension": true, + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "Location", + "printedName": "Location", + "children": [ + { + "kind": "TypeNominal", + "name": "ExistentialMetatype", + "printedName": "OneSignalCore.OSLocation.Type", + "children": [ + { + "kind": "TypeNominal", + "name": "OSLocation", + "printedName": "OneSignalCore.OSLocation", + "usr": "c:objc(pl)OSLocation" + } + ] + } + ], + "declKind": "Var", + "usr": "s:So9OneSignalC0aB9FrameworkE8LocationSo10OSLocation_pXpvpZ", + "mangledName": "$sSo9OneSignalC0aB9FrameworkE8LocationSo10OSLocation_pXpvpZ", + "moduleName": "OneSignalFramework", + "static": true, + "declAttributes": [ + "Final" + ], + "isFromExtension": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "ExistentialMetatype", + "printedName": "OneSignalCore.OSLocation.Type", + "children": [ + { + "kind": "TypeNominal", + "name": "OSLocation", + "printedName": "OneSignalCore.OSLocation", + "usr": "c:objc(pl)OSLocation" + } + ] + } + ], + "declKind": "Accessor", + "usr": "s:So9OneSignalC0aB9FrameworkE8LocationSo10OSLocation_pXpvgZ", + "mangledName": "$sSo9OneSignalC0aB9FrameworkE8LocationSo10OSLocation_pXpvgZ", + "moduleName": "OneSignalFramework", + "static": true, + "declAttributes": [ + "Final" + ], + "isFromExtension": true, + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "LiveActivities", + "printedName": "LiveActivities", + "children": [ + { + "kind": "TypeNominal", + "name": "ExistentialMetatype", + "printedName": "OneSignalFramework.OSLiveActivities.Type", + "children": [ + { + "kind": "TypeNominal", + "name": "OSLiveActivities", + "printedName": "OneSignalFramework.OSLiveActivities", + "usr": "c:objc(pl)OSLiveActivities" + } + ] + } + ], + "declKind": "Var", + "usr": "s:So9OneSignalC0aB9FrameworkE14LiveActivitiesSo06OSLiveE0_pXpvpZ", + "mangledName": "$sSo9OneSignalC0aB9FrameworkE14LiveActivitiesSo06OSLiveE0_pXpvpZ", + "moduleName": "OneSignalFramework", + "static": true, + "declAttributes": [ + "Final" + ], + "isFromExtension": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "ExistentialMetatype", + "printedName": "OneSignalFramework.OSLiveActivities.Type", + "children": [ + { + "kind": "TypeNominal", + "name": "OSLiveActivities", + "printedName": "OneSignalFramework.OSLiveActivities", + "usr": "c:objc(pl)OSLiveActivities" + } + ] + } + ], + "declKind": "Accessor", + "usr": "s:So9OneSignalC0aB9FrameworkE14LiveActivitiesSo06OSLiveE0_pXpvgZ", + "mangledName": "$sSo9OneSignalC0aB9FrameworkE14LiveActivitiesSo06OSLiveE0_pXpvgZ", + "moduleName": "OneSignalFramework", + "static": true, + "declAttributes": [ + "Final" + ], + "isFromExtension": true, + "accessorKind": "get" + } + ] + } + ], + "declKind": "Class", + "usr": "c:objc(cs)OneSignal", + "moduleName": "OneSignalFramework", + "isOpen": true, + "objc_name": "OneSignal", + "declAttributes": [ + "ObjC", + "Dynamic" + ], + "superclassUsr": "c:objc(cs)NSObject", + "isExternal": true, + "inheritsConvenienceInitializers": true, + "superclassNames": [ + "ObjectiveC.NSObject" + ], + "conformances": [ + { + "kind": "Conformance", + "name": "Equatable", + "printedName": "Equatable", + "usr": "s:SQ", + "mangledName": "$sSQ" + }, + { + "kind": "Conformance", + "name": "Hashable", + "printedName": "Hashable", + "usr": "s:SH", + "mangledName": "$sSH" + }, + { + "kind": "Conformance", + "name": "CVarArg", + "printedName": "CVarArg", + "usr": "s:s7CVarArgP", + "mangledName": "$ss7CVarArgP" + }, + { + "kind": "Conformance", + "name": "_KeyValueCodingAndObservingPublishing", + "printedName": "_KeyValueCodingAndObservingPublishing", + "usr": "s:10Foundation37_KeyValueCodingAndObservingPublishingP", + "mangledName": "$s10Foundation37_KeyValueCodingAndObservingPublishingP" + }, + { + "kind": "Conformance", + "name": "_KeyValueCodingAndObserving", + "printedName": "_KeyValueCodingAndObserving", + "usr": "s:10Foundation27_KeyValueCodingAndObservingP", + "mangledName": "$s10Foundation27_KeyValueCodingAndObservingP" + }, + { + "kind": "Conformance", + "name": "CustomStringConvertible", + "printedName": "CustomStringConvertible", + "usr": "s:s23CustomStringConvertibleP", + "mangledName": "$ss23CustomStringConvertibleP" + }, + { + "kind": "Conformance", + "name": "CustomDebugStringConvertible", + "printedName": "CustomDebugStringConvertible", + "usr": "s:s28CustomDebugStringConvertibleP", + "mangledName": "$ss28CustomDebugStringConvertibleP" + } + ] + }, + { + "kind": "TypeDecl", + "name": "OSDebug", + "printedName": "OSDebug", + "children": [ + { + "kind": "Function", + "name": "setAlertLevel", + "printedName": "setAlertLevel(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "ONE_S_LOG_LEVEL", + "printedName": "OneSignalCore.ONE_S_LOG_LEVEL", + "usr": "c:@E@ONE_S_LOG_LEVEL" + } + ], + "declKind": "Func", + "usr": "s:So7OSDebugP18OneSignalFrameworkE13setAlertLevelyySo15ONE_S_LOG_LEVELVFZ", + "mangledName": "$sSo7OSDebugP18OneSignalFrameworkE13setAlertLevelyySo15ONE_S_LOG_LEVELVFZ", + "moduleName": "OneSignalFramework", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalCore.OSDebug>", + "sugared_genericSig": "", + "static": true, + "isFromExtension": true, + "funcSelfKind": "NonMutating" + } + ], + "declKind": "Protocol", + "usr": "c:objc(pl)OSDebug", + "moduleName": "OneSignalCore", + "genericSig": "<τ_0_0 : ObjectiveC.NSObjectProtocol>", + "sugared_genericSig": "", + "objc_name": "OSDebug", + "declAttributes": [ + "ObjC", + "Dynamic" + ], + "isExternal": true + }, + { + "kind": "TypeDecl", + "name": "OSInAppMessages", + "printedName": "OSInAppMessages", + "children": [ + { + "kind": "Var", + "name": "paused", + "printedName": "paused", + "children": [ + { + "kind": "TypeNominal", + "name": "Bool", + "printedName": "Swift.Bool", + "usr": "s:Sb" + } + ], + "declKind": "Var", + "usr": "s:So15OSInAppMessagesP18OneSignalFrameworkE6pausedSbvpZ", + "mangledName": "$sSo15OSInAppMessagesP18OneSignalFrameworkE6pausedSbvpZ", + "moduleName": "OneSignalFramework", + "static": true, + "isFromExtension": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "Bool", + "printedName": "Swift.Bool", + "usr": "s:Sb" + } + ], + "declKind": "Accessor", + "usr": "s:So15OSInAppMessagesP18OneSignalFrameworkE6pausedSbvgZ", + "mangledName": "$sSo15OSInAppMessagesP18OneSignalFrameworkE6pausedSbvgZ", + "moduleName": "OneSignalFramework", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalCore.OSInAppMessages>", + "sugared_genericSig": "", + "static": true, + "isFromExtension": true, + "accessorKind": "get" + }, + { + "kind": "Accessor", + "name": "Set", + "printedName": "Set()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "Bool", + "printedName": "Swift.Bool", + "usr": "s:Sb" + } + ], + "declKind": "Accessor", + "usr": "s:So15OSInAppMessagesP18OneSignalFrameworkE6pausedSbvsZ", + "mangledName": "$sSo15OSInAppMessagesP18OneSignalFrameworkE6pausedSbvsZ", + "moduleName": "OneSignalFramework", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalCore.OSInAppMessages>", + "sugared_genericSig": "", + "static": true, + "isFromExtension": true, + "accessorKind": "set" + }, + { + "kind": "Accessor", + "name": "Modify", + "printedName": "Modify()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + } + ], + "declKind": "Accessor", + "usr": "s:So15OSInAppMessagesP18OneSignalFrameworkE6pausedSbvMZ", + "mangledName": "$sSo15OSInAppMessagesP18OneSignalFrameworkE6pausedSbvMZ", + "moduleName": "OneSignalFramework", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalCore.OSInAppMessages>", + "sugared_genericSig": "", + "static": true, + "implicit": true, + "isFromExtension": true, + "accessorKind": "_modify" + } + ] + }, + { + "kind": "Function", + "name": "addLifecycleListener", + "printedName": "addLifecycleListener(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "OSInAppMessageLifecycleListener", + "printedName": "OneSignalCore.OSInAppMessageLifecycleListener", + "usr": "c:objc(pl)OSInAppMessageLifecycleListener" + } + ], + "declKind": "Func", + "usr": "s:So15OSInAppMessagesP18OneSignalFrameworkE20addLifecycleListeneryySo0ab7MessagehI0_pFZ", + "mangledName": "$sSo15OSInAppMessagesP18OneSignalFrameworkE20addLifecycleListeneryySo0ab7MessagehI0_pFZ", + "moduleName": "OneSignalFramework", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalCore.OSInAppMessages>", + "sugared_genericSig": "", + "static": true, + "isFromExtension": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "removeLifecycleListener", + "printedName": "removeLifecycleListener(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "OSInAppMessageLifecycleListener", + "printedName": "OneSignalCore.OSInAppMessageLifecycleListener", + "usr": "c:objc(pl)OSInAppMessageLifecycleListener" + } + ], + "declKind": "Func", + "usr": "s:So15OSInAppMessagesP18OneSignalFrameworkE23removeLifecycleListeneryySo0ab7MessagehI0_pFZ", + "mangledName": "$sSo15OSInAppMessagesP18OneSignalFrameworkE23removeLifecycleListeneryySo0ab7MessagehI0_pFZ", + "moduleName": "OneSignalFramework", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalCore.OSInAppMessages>", + "sugared_genericSig": "", + "static": true, + "isFromExtension": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "addClickListener", + "printedName": "addClickListener(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "OSInAppMessageClickListener", + "printedName": "OneSignalCore.OSInAppMessageClickListener", + "usr": "c:objc(pl)OSInAppMessageClickListener" + } + ], + "declKind": "Func", + "usr": "s:So15OSInAppMessagesP18OneSignalFrameworkE16addClickListeneryySo0ab7MessagehI0_pFZ", + "mangledName": "$sSo15OSInAppMessagesP18OneSignalFrameworkE16addClickListeneryySo0ab7MessagehI0_pFZ", + "moduleName": "OneSignalFramework", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalCore.OSInAppMessages>", + "sugared_genericSig": "", + "static": true, + "isFromExtension": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "removeClickListener", + "printedName": "removeClickListener(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "OSInAppMessageClickListener", + "printedName": "OneSignalCore.OSInAppMessageClickListener", + "usr": "c:objc(pl)OSInAppMessageClickListener" + } + ], + "declKind": "Func", + "usr": "s:So15OSInAppMessagesP18OneSignalFrameworkE19removeClickListeneryySo0ab7MessagehI0_pFZ", + "mangledName": "$sSo15OSInAppMessagesP18OneSignalFrameworkE19removeClickListeneryySo0ab7MessagehI0_pFZ", + "moduleName": "OneSignalFramework", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalCore.OSInAppMessages>", + "sugared_genericSig": "", + "static": true, + "isFromExtension": true, + "funcSelfKind": "NonMutating" + } + ], + "declKind": "Protocol", + "usr": "c:objc(pl)OSInAppMessages", + "moduleName": "OneSignalCore", + "genericSig": "<τ_0_0 : ObjectiveC.NSObjectProtocol>", + "sugared_genericSig": "", + "objc_name": "OSInAppMessages", + "declAttributes": [ + "ObjC", + "Dynamic" + ], + "isExternal": true + }, + { + "kind": "TypeDecl", + "name": "OSSession", + "printedName": "OSSession", + "children": [ + { + "kind": "Function", + "name": "addOutcome", + "printedName": "addOutcome(_:_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + }, + { + "kind": "TypeNominal", + "name": "NSNumber", + "printedName": "Foundation.NSNumber", + "usr": "c:objc(cs)NSNumber" + } + ], + "declKind": "Func", + "usr": "s:So9OSSessionP18OneSignalFrameworkE10addOutcomeyySS_So8NSNumberCtFZ", + "mangledName": "$sSo9OSSessionP18OneSignalFrameworkE10addOutcomeyySS_So8NSNumberCtFZ", + "moduleName": "OneSignalFramework", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalOutcomes.OSSession>", + "sugared_genericSig": "", + "static": true, + "isFromExtension": true, + "funcSelfKind": "NonMutating" + } + ], + "declKind": "Protocol", + "usr": "c:objc(pl)OSSession", + "moduleName": "OneSignalOutcomes", + "genericSig": "<τ_0_0 : ObjectiveC.NSObjectProtocol>", + "sugared_genericSig": "", + "objc_name": "OSSession", + "declAttributes": [ + "ObjC", + "Dynamic" + ], + "isExternal": true + }, + { + "kind": "TypeDecl", + "name": "OSNotifications", + "printedName": "OSNotifications", + "children": [ + { + "kind": "Var", + "name": "permission", + "printedName": "permission", + "children": [ + { + "kind": "TypeNominal", + "name": "Bool", + "printedName": "Swift.Bool", + "usr": "s:Sb" + } + ], + "declKind": "Var", + "usr": "s:So15OSNotificationsP18OneSignalFrameworkE10permissionSbvpZ", + "mangledName": "$sSo15OSNotificationsP18OneSignalFrameworkE10permissionSbvpZ", + "moduleName": "OneSignalFramework", + "static": true, + "isFromExtension": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "Bool", + "printedName": "Swift.Bool", + "usr": "s:Sb" + } + ], + "declKind": "Accessor", + "usr": "s:So15OSNotificationsP18OneSignalFrameworkE10permissionSbvgZ", + "mangledName": "$sSo15OSNotificationsP18OneSignalFrameworkE10permissionSbvgZ", + "moduleName": "OneSignalFramework", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalNotifications.OSNotifications>", + "sugared_genericSig": "", + "static": true, + "isFromExtension": true, + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "canRequestPermission", + "printedName": "canRequestPermission", + "children": [ + { + "kind": "TypeNominal", + "name": "Bool", + "printedName": "Swift.Bool", + "usr": "s:Sb" + } + ], + "declKind": "Var", + "usr": "s:So15OSNotificationsP18OneSignalFrameworkE20canRequestPermissionSbvpZ", + "mangledName": "$sSo15OSNotificationsP18OneSignalFrameworkE20canRequestPermissionSbvpZ", + "moduleName": "OneSignalFramework", + "static": true, + "isFromExtension": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "Bool", + "printedName": "Swift.Bool", + "usr": "s:Sb" + } + ], + "declKind": "Accessor", + "usr": "s:So15OSNotificationsP18OneSignalFrameworkE20canRequestPermissionSbvgZ", + "mangledName": "$sSo15OSNotificationsP18OneSignalFrameworkE20canRequestPermissionSbvgZ", + "moduleName": "OneSignalFramework", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalNotifications.OSNotifications>", + "sugared_genericSig": "", + "static": true, + "isFromExtension": true, + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "permissionNative", + "printedName": "permissionNative", + "children": [ + { + "kind": "TypeNominal", + "name": "OSNotificationPermission", + "printedName": "OneSignalNotifications.OSNotificationPermission", + "usr": "c:@E@OSNotificationPermission" + } + ], + "declKind": "Var", + "usr": "s:So15OSNotificationsP18OneSignalFrameworkE16permissionNativeSo24OSNotificationPermissionVvpZ", + "mangledName": "$sSo15OSNotificationsP18OneSignalFrameworkE16permissionNativeSo24OSNotificationPermissionVvpZ", + "moduleName": "OneSignalFramework", + "static": true, + "isFromExtension": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "OSNotificationPermission", + "printedName": "OneSignalNotifications.OSNotificationPermission", + "usr": "c:@E@OSNotificationPermission" + } + ], + "declKind": "Accessor", + "usr": "s:So15OSNotificationsP18OneSignalFrameworkE16permissionNativeSo24OSNotificationPermissionVvgZ", + "mangledName": "$sSo15OSNotificationsP18OneSignalFrameworkE16permissionNativeSo24OSNotificationPermissionVvgZ", + "moduleName": "OneSignalFramework", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalNotifications.OSNotifications>", + "sugared_genericSig": "", + "static": true, + "isFromExtension": true, + "accessorKind": "get" + } + ] + }, + { + "kind": "Function", + "name": "registerForProvisionalAuthorization", + "printedName": "registerForProvisionalAuthorization(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "((Swift.Bool) -> ())?", + "children": [ + { + "kind": "TypeFunc", + "name": "Function", + "printedName": "(Swift.Bool) -> ()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "Bool", + "printedName": "Swift.Bool", + "usr": "s:Sb" + } + ] + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Func", + "usr": "s:So15OSNotificationsP18OneSignalFrameworkE35registerForProvisionalAuthorizationyyySbcSgFZ", + "mangledName": "$sSo15OSNotificationsP18OneSignalFrameworkE35registerForProvisionalAuthorizationyyySbcSgFZ", + "moduleName": "OneSignalFramework", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalNotifications.OSNotifications>", + "sugared_genericSig": "", + "static": true, + "isFromExtension": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "addPermissionObserver", + "printedName": "addPermissionObserver(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "OSNotificationPermissionObserver", + "printedName": "OneSignalNotifications.OSNotificationPermissionObserver", + "usr": "c:objc(pl)OSNotificationPermissionObserver" + } + ], + "declKind": "Func", + "usr": "s:So15OSNotificationsP18OneSignalFrameworkE21addPermissionObserveryySo014OSNotificationfG0_pFZ", + "mangledName": "$sSo15OSNotificationsP18OneSignalFrameworkE21addPermissionObserveryySo014OSNotificationfG0_pFZ", + "moduleName": "OneSignalFramework", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalNotifications.OSNotifications>", + "sugared_genericSig": "", + "static": true, + "isFromExtension": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "removePermissionObserver", + "printedName": "removePermissionObserver(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "OSNotificationPermissionObserver", + "printedName": "OneSignalNotifications.OSNotificationPermissionObserver", + "usr": "c:objc(pl)OSNotificationPermissionObserver" + } + ], + "declKind": "Func", + "usr": "s:So15OSNotificationsP18OneSignalFrameworkE24removePermissionObserveryySo014OSNotificationfG0_pFZ", + "mangledName": "$sSo15OSNotificationsP18OneSignalFrameworkE24removePermissionObserveryySo014OSNotificationfG0_pFZ", + "moduleName": "OneSignalFramework", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalNotifications.OSNotifications>", + "sugared_genericSig": "", + "static": true, + "isFromExtension": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "addClickListener", + "printedName": "addClickListener(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "OSNotificationClickListener", + "printedName": "OneSignalNotifications.OSNotificationClickListener", + "usr": "c:objc(pl)OSNotificationClickListener" + } + ], + "declKind": "Func", + "usr": "s:So15OSNotificationsP18OneSignalFrameworkE16addClickListeneryySo014OSNotificationfG0_pFZ", + "mangledName": "$sSo15OSNotificationsP18OneSignalFrameworkE16addClickListeneryySo014OSNotificationfG0_pFZ", + "moduleName": "OneSignalFramework", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalNotifications.OSNotifications>", + "sugared_genericSig": "", + "static": true, + "isFromExtension": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "removeClickListener", + "printedName": "removeClickListener(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "OSNotificationClickListener", + "printedName": "OneSignalNotifications.OSNotificationClickListener", + "usr": "c:objc(pl)OSNotificationClickListener" + } + ], + "declKind": "Func", + "usr": "s:So15OSNotificationsP18OneSignalFrameworkE19removeClickListeneryySo014OSNotificationfG0_pFZ", + "mangledName": "$sSo15OSNotificationsP18OneSignalFrameworkE19removeClickListeneryySo014OSNotificationfG0_pFZ", + "moduleName": "OneSignalFramework", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalNotifications.OSNotifications>", + "sugared_genericSig": "", + "static": true, + "isFromExtension": true, + "funcSelfKind": "NonMutating" + } + ], + "declKind": "Protocol", + "usr": "c:objc(pl)OSNotifications", + "moduleName": "OneSignalNotifications", + "genericSig": "<τ_0_0 : ObjectiveC.NSObjectProtocol>", + "sugared_genericSig": "", + "objc_name": "OSNotifications", + "declAttributes": [ + "ObjC", + "Dynamic" + ], + "isExternal": true + }, + { + "kind": "TypeDecl", + "name": "OSLocation", + "printedName": "OSLocation", + "children": [ + { + "kind": "Var", + "name": "isShared", + "printedName": "isShared", + "children": [ + { + "kind": "TypeNominal", + "name": "Bool", + "printedName": "Swift.Bool", + "usr": "s:Sb" + } + ], + "declKind": "Var", + "usr": "s:So10OSLocationP18OneSignalFrameworkE8isSharedSbvpZ", + "mangledName": "$sSo10OSLocationP18OneSignalFrameworkE8isSharedSbvpZ", + "moduleName": "OneSignalFramework", + "static": true, + "isFromExtension": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "Bool", + "printedName": "Swift.Bool", + "usr": "s:Sb" + } + ], + "declKind": "Accessor", + "usr": "s:So10OSLocationP18OneSignalFrameworkE8isSharedSbvgZ", + "mangledName": "$sSo10OSLocationP18OneSignalFrameworkE8isSharedSbvgZ", + "moduleName": "OneSignalFramework", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalCore.OSLocation>", + "sugared_genericSig": "", + "static": true, + "isFromExtension": true, + "accessorKind": "get" + }, + { + "kind": "Accessor", + "name": "Set", + "printedName": "Set()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "Bool", + "printedName": "Swift.Bool", + "usr": "s:Sb" + } + ], + "declKind": "Accessor", + "usr": "s:So10OSLocationP18OneSignalFrameworkE8isSharedSbvsZ", + "mangledName": "$sSo10OSLocationP18OneSignalFrameworkE8isSharedSbvsZ", + "moduleName": "OneSignalFramework", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalCore.OSLocation>", + "sugared_genericSig": "", + "static": true, + "isFromExtension": true, + "accessorKind": "set" + }, + { + "kind": "Accessor", + "name": "Modify", + "printedName": "Modify()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + } + ], + "declKind": "Accessor", + "usr": "s:So10OSLocationP18OneSignalFrameworkE8isSharedSbvMZ", + "mangledName": "$sSo10OSLocationP18OneSignalFrameworkE8isSharedSbvMZ", + "moduleName": "OneSignalFramework", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalCore.OSLocation>", + "sugared_genericSig": "", + "static": true, + "implicit": true, + "isFromExtension": true, + "accessorKind": "_modify" + } + ] + } + ], + "declKind": "Protocol", + "usr": "c:objc(pl)OSLocation", + "moduleName": "OneSignalCore", + "genericSig": "<τ_0_0 : ObjectiveC.NSObjectProtocol>", + "sugared_genericSig": "", + "objc_name": "OSLocation", + "declAttributes": [ + "ObjC", + "Dynamic" + ], + "isExternal": true + } + ], + "json_format_version": 8 + }, + "ConstValues": [] +} \ No newline at end of file diff --git a/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignalFramework.xcframework/ios-arm64/OneSignalFramework.framework/Modules/OneSignalFramework.swiftmodule/arm64-apple-ios.private.swiftinterface b/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignalFramework.xcframework/ios-arm64/OneSignalFramework.framework/Modules/OneSignalFramework.swiftmodule/arm64-apple-ios.private.swiftinterface new file mode 100644 index 000000000..27d336f5a --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignalFramework.xcframework/ios-arm64/OneSignalFramework.framework/Modules/OneSignalFramework.swiftmodule/arm64-apple-ios.private.swiftinterface @@ -0,0 +1,74 @@ +// swift-interface-format-version: 1.0 +// swift-compiler-version: Apple Swift version 5.7.1 (swiftlang-5.7.1.135.3 clang-1400.0.29.51) +// swift-module-flags: -target arm64-apple-ios11.0 -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -O -module-name OneSignalFramework +// swift-module-flags-ignorable: -enable-bare-slash-regex +import Foundation +import OneSignalCore +@_exported import OneSignalFramework +import OneSignalNotifications +import OneSignalOutcomes +import OneSignalUser +import Swift +import _Concurrency +import _StringProcessing +extension OneSignalFramework.OneSignal { + public static var User: OneSignalUser.OSUser { + get + } + public static var Notifications: OneSignalNotifications.OSNotifications.Type { + get + } + public static var Session: OneSignalOutcomes.OSSession.Type { + get + } + public static var InAppMessages: OneSignalCore.OSInAppMessages.Type { + get + } + public static var Debug: OneSignalCore.OSDebug.Type { + get + } + public static var Location: OneSignalCore.OSLocation.Type { + get + } + public static var LiveActivities: OneSignalFramework.OSLiveActivities.Type { + get + } +} +extension OneSignalCore.OSDebug { + public static func setAlertLevel(_ logLevel: OneSignalCore.ONE_S_LOG_LEVEL) +} +extension OneSignalCore.OSInAppMessages { + public static var paused: Swift.Bool { + get + set + } + public static func addLifecycleListener(_ listener: OneSignalCore.OSInAppMessageLifecycleListener) + public static func removeLifecycleListener(_ listener: OneSignalCore.OSInAppMessageLifecycleListener) + public static func addClickListener(_ listener: OneSignalCore.OSInAppMessageClickListener) + public static func removeClickListener(_ listener: OneSignalCore.OSInAppMessageClickListener) +} +extension OneSignalOutcomes.OSSession { + public static func addOutcome(_ name: Swift.String, _ value: Foundation.NSNumber) +} +extension OneSignalNotifications.OSNotifications { + public static var permission: Swift.Bool { + get + } + public static var canRequestPermission: Swift.Bool { + get + } + public static var permissionNative: OneSignalNotifications.OSNotificationPermission { + get + } + public static func registerForProvisionalAuthorization(_ block: OneSignalNotifications.OSUserResponseBlock?) + public static func addPermissionObserver(_ observer: OneSignalNotifications.OSNotificationPermissionObserver) + public static func removePermissionObserver(_ observer: OneSignalNotifications.OSNotificationPermissionObserver) + public static func addClickListener(_ listener: OneSignalNotifications.OSNotificationClickListener) + public static func removeClickListener(_ listener: OneSignalNotifications.OSNotificationClickListener) +} +extension OneSignalCore.OSLocation { + public static var isShared: Swift.Bool { + get + set + } +} diff --git a/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignalFramework.xcframework/ios-arm64/OneSignalFramework.framework/Modules/OneSignalFramework.swiftmodule/arm64-apple-ios.swiftdoc b/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignalFramework.xcframework/ios-arm64/OneSignalFramework.framework/Modules/OneSignalFramework.swiftmodule/arm64-apple-ios.swiftdoc new file mode 100644 index 000000000..e198b799e Binary files /dev/null and b/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignalFramework.xcframework/ios-arm64/OneSignalFramework.framework/Modules/OneSignalFramework.swiftmodule/arm64-apple-ios.swiftdoc differ diff --git a/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignalFramework.xcframework/ios-arm64/OneSignalFramework.framework/Modules/OneSignalFramework.swiftmodule/arm64-apple-ios.swiftinterface b/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignalFramework.xcframework/ios-arm64/OneSignalFramework.framework/Modules/OneSignalFramework.swiftmodule/arm64-apple-ios.swiftinterface new file mode 100644 index 000000000..27d336f5a --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignalFramework.xcframework/ios-arm64/OneSignalFramework.framework/Modules/OneSignalFramework.swiftmodule/arm64-apple-ios.swiftinterface @@ -0,0 +1,74 @@ +// swift-interface-format-version: 1.0 +// swift-compiler-version: Apple Swift version 5.7.1 (swiftlang-5.7.1.135.3 clang-1400.0.29.51) +// swift-module-flags: -target arm64-apple-ios11.0 -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -O -module-name OneSignalFramework +// swift-module-flags-ignorable: -enable-bare-slash-regex +import Foundation +import OneSignalCore +@_exported import OneSignalFramework +import OneSignalNotifications +import OneSignalOutcomes +import OneSignalUser +import Swift +import _Concurrency +import _StringProcessing +extension OneSignalFramework.OneSignal { + public static var User: OneSignalUser.OSUser { + get + } + public static var Notifications: OneSignalNotifications.OSNotifications.Type { + get + } + public static var Session: OneSignalOutcomes.OSSession.Type { + get + } + public static var InAppMessages: OneSignalCore.OSInAppMessages.Type { + get + } + public static var Debug: OneSignalCore.OSDebug.Type { + get + } + public static var Location: OneSignalCore.OSLocation.Type { + get + } + public static var LiveActivities: OneSignalFramework.OSLiveActivities.Type { + get + } +} +extension OneSignalCore.OSDebug { + public static func setAlertLevel(_ logLevel: OneSignalCore.ONE_S_LOG_LEVEL) +} +extension OneSignalCore.OSInAppMessages { + public static var paused: Swift.Bool { + get + set + } + public static func addLifecycleListener(_ listener: OneSignalCore.OSInAppMessageLifecycleListener) + public static func removeLifecycleListener(_ listener: OneSignalCore.OSInAppMessageLifecycleListener) + public static func addClickListener(_ listener: OneSignalCore.OSInAppMessageClickListener) + public static func removeClickListener(_ listener: OneSignalCore.OSInAppMessageClickListener) +} +extension OneSignalOutcomes.OSSession { + public static func addOutcome(_ name: Swift.String, _ value: Foundation.NSNumber) +} +extension OneSignalNotifications.OSNotifications { + public static var permission: Swift.Bool { + get + } + public static var canRequestPermission: Swift.Bool { + get + } + public static var permissionNative: OneSignalNotifications.OSNotificationPermission { + get + } + public static func registerForProvisionalAuthorization(_ block: OneSignalNotifications.OSUserResponseBlock?) + public static func addPermissionObserver(_ observer: OneSignalNotifications.OSNotificationPermissionObserver) + public static func removePermissionObserver(_ observer: OneSignalNotifications.OSNotificationPermissionObserver) + public static func addClickListener(_ listener: OneSignalNotifications.OSNotificationClickListener) + public static func removeClickListener(_ listener: OneSignalNotifications.OSNotificationClickListener) +} +extension OneSignalCore.OSLocation { + public static var isShared: Swift.Bool { + get + set + } +} diff --git a/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignalFramework.xcframework/ios-arm64/OneSignalFramework.framework/Modules/module.modulemap b/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignalFramework.xcframework/ios-arm64/OneSignalFramework.framework/Modules/module.modulemap new file mode 100644 index 000000000..fc1a467a1 --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignalFramework.xcframework/ios-arm64/OneSignalFramework.framework/Modules/module.modulemap @@ -0,0 +1,11 @@ +framework module OneSignalFramework { + umbrella header "OneSignalFramework.h" + + export * + module * { export * } +} + +module OneSignalFramework.Swift { + header "OneSignalFramework-Swift.h" + requires objc +} diff --git a/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignalFramework.xcframework/ios-arm64/OneSignalFramework.framework/OneSignalFramework b/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignalFramework.xcframework/ios-arm64/OneSignalFramework.framework/OneSignalFramework new file mode 100755 index 000000000..9b6c570a2 Binary files /dev/null and b/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignalFramework.xcframework/ios-arm64/OneSignalFramework.framework/OneSignalFramework differ diff --git a/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignalFramework.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalFramework.framework/Headers b/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignalFramework.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalFramework.framework/Headers new file mode 120000 index 000000000..a177d2a6b --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignalFramework.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalFramework.framework/Headers @@ -0,0 +1 @@ +Versions/Current/Headers \ No newline at end of file diff --git a/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignalFramework.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalFramework.framework/Modules b/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignalFramework.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalFramework.framework/Modules new file mode 120000 index 000000000..5736f3186 --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignalFramework.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalFramework.framework/Modules @@ -0,0 +1 @@ +Versions/Current/Modules \ No newline at end of file diff --git a/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignalFramework.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalFramework.framework/OneSignalFramework b/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignalFramework.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalFramework.framework/OneSignalFramework new file mode 120000 index 000000000..c72c47f98 --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignalFramework.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalFramework.framework/OneSignalFramework @@ -0,0 +1 @@ +Versions/Current/OneSignalFramework \ No newline at end of file diff --git a/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignalFramework.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalFramework.framework/Resources b/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignalFramework.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalFramework.framework/Resources new file mode 120000 index 000000000..953ee36f3 --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignalFramework.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalFramework.framework/Resources @@ -0,0 +1 @@ +Versions/Current/Resources \ No newline at end of file diff --git a/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignalFramework.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalFramework.framework/Versions/A/Headers/OneSignalFramework-Swift.h b/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignalFramework.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalFramework.framework/Versions/A/Headers/OneSignalFramework-Swift.h new file mode 100644 index 000000000..205508631 --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignalFramework.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalFramework.framework/Versions/A/Headers/OneSignalFramework-Swift.h @@ -0,0 +1,526 @@ +#if 0 +#elif defined(__arm64__) && __arm64__ +// Generated by Apple Swift version 5.7.1 (swiftlang-5.7.1.135.3 clang-1400.0.29.51) +#ifndef ONESIGNALFRAMEWORK_SWIFT_H +#define ONESIGNALFRAMEWORK_SWIFT_H +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wgcc-compat" + +#if !defined(__has_include) +# define __has_include(x) 0 +#endif +#if !defined(__has_attribute) +# define __has_attribute(x) 0 +#endif +#if !defined(__has_feature) +# define __has_feature(x) 0 +#endif +#if !defined(__has_warning) +# define __has_warning(x) 0 +#endif + +#if __has_include() +# include +#endif + +#pragma clang diagnostic ignored "-Wduplicate-method-match" +#pragma clang diagnostic ignored "-Wauto-import" +#if defined(__OBJC__) +#include +#endif +#if defined(__cplusplus) +#include +#include +#include +#else +#include +#include +#include +#endif + +#if !defined(SWIFT_TYPEDEFS) +# define SWIFT_TYPEDEFS 1 +# if __has_include() +# include +# elif !defined(__cplusplus) +typedef uint_least16_t char16_t; +typedef uint_least32_t char32_t; +# endif +typedef float swift_float2 __attribute__((__ext_vector_type__(2))); +typedef float swift_float3 __attribute__((__ext_vector_type__(3))); +typedef float swift_float4 __attribute__((__ext_vector_type__(4))); +typedef double swift_double2 __attribute__((__ext_vector_type__(2))); +typedef double swift_double3 __attribute__((__ext_vector_type__(3))); +typedef double swift_double4 __attribute__((__ext_vector_type__(4))); +typedef int swift_int2 __attribute__((__ext_vector_type__(2))); +typedef int swift_int3 __attribute__((__ext_vector_type__(3))); +typedef int swift_int4 __attribute__((__ext_vector_type__(4))); +typedef unsigned int swift_uint2 __attribute__((__ext_vector_type__(2))); +typedef unsigned int swift_uint3 __attribute__((__ext_vector_type__(3))); +typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4))); +#endif + +#if !defined(SWIFT_PASTE) +# define SWIFT_PASTE_HELPER(x, y) x##y +# define SWIFT_PASTE(x, y) SWIFT_PASTE_HELPER(x, y) +#endif +#if !defined(SWIFT_METATYPE) +# define SWIFT_METATYPE(X) Class +#endif +#if !defined(SWIFT_CLASS_PROPERTY) +# if __has_feature(objc_class_property) +# define SWIFT_CLASS_PROPERTY(...) __VA_ARGS__ +# else +# define SWIFT_CLASS_PROPERTY(...) +# endif +#endif + +#if __has_attribute(objc_runtime_name) +# define SWIFT_RUNTIME_NAME(X) __attribute__((objc_runtime_name(X))) +#else +# define SWIFT_RUNTIME_NAME(X) +#endif +#if __has_attribute(swift_name) +# define SWIFT_COMPILE_NAME(X) __attribute__((swift_name(X))) +#else +# define SWIFT_COMPILE_NAME(X) +#endif +#if __has_attribute(objc_method_family) +# define SWIFT_METHOD_FAMILY(X) __attribute__((objc_method_family(X))) +#else +# define SWIFT_METHOD_FAMILY(X) +#endif +#if __has_attribute(noescape) +# define SWIFT_NOESCAPE __attribute__((noescape)) +#else +# define SWIFT_NOESCAPE +#endif +#if __has_attribute(ns_consumed) +# define SWIFT_RELEASES_ARGUMENT __attribute__((ns_consumed)) +#else +# define SWIFT_RELEASES_ARGUMENT +#endif +#if __has_attribute(warn_unused_result) +# define SWIFT_WARN_UNUSED_RESULT __attribute__((warn_unused_result)) +#else +# define SWIFT_WARN_UNUSED_RESULT +#endif +#if __has_attribute(noreturn) +# define SWIFT_NORETURN __attribute__((noreturn)) +#else +# define SWIFT_NORETURN +#endif +#if !defined(SWIFT_CLASS_EXTRA) +# define SWIFT_CLASS_EXTRA +#endif +#if !defined(SWIFT_PROTOCOL_EXTRA) +# define SWIFT_PROTOCOL_EXTRA +#endif +#if !defined(SWIFT_ENUM_EXTRA) +# define SWIFT_ENUM_EXTRA +#endif +#if !defined(SWIFT_CLASS) +# if __has_attribute(objc_subclassing_restricted) +# define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_CLASS_EXTRA +# define SWIFT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA +# else +# define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA +# define SWIFT_CLASS_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA +# endif +#endif +#if !defined(SWIFT_RESILIENT_CLASS) +# if __has_attribute(objc_class_stub) +# define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME) __attribute__((objc_class_stub)) +# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_class_stub)) SWIFT_CLASS_NAMED(SWIFT_NAME) +# else +# define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME) +# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) SWIFT_CLASS_NAMED(SWIFT_NAME) +# endif +#endif + +#if !defined(SWIFT_PROTOCOL) +# define SWIFT_PROTOCOL(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA +# define SWIFT_PROTOCOL_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA +#endif + +#if !defined(SWIFT_EXTENSION) +# define SWIFT_EXTENSION(M) SWIFT_PASTE(M##_Swift_, __LINE__) +#endif + +#if !defined(OBJC_DESIGNATED_INITIALIZER) +# if __has_attribute(objc_designated_initializer) +# define OBJC_DESIGNATED_INITIALIZER __attribute__((objc_designated_initializer)) +# else +# define OBJC_DESIGNATED_INITIALIZER +# endif +#endif +#if !defined(SWIFT_ENUM_ATTR) +# if defined(__has_attribute) && __has_attribute(enum_extensibility) +# define SWIFT_ENUM_ATTR(_extensibility) __attribute__((enum_extensibility(_extensibility))) +# else +# define SWIFT_ENUM_ATTR(_extensibility) +# endif +#endif +#if !defined(SWIFT_ENUM) +# define SWIFT_ENUM(_type, _name, _extensibility) enum _name : _type _name; enum SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type +# if __has_feature(generalized_swift_name) +# define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) enum _name : _type _name SWIFT_COMPILE_NAME(SWIFT_NAME); enum SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type +# else +# define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) SWIFT_ENUM(_type, _name, _extensibility) +# endif +#endif +#if !defined(SWIFT_UNAVAILABLE) +# define SWIFT_UNAVAILABLE __attribute__((unavailable)) +#endif +#if !defined(SWIFT_UNAVAILABLE_MSG) +# define SWIFT_UNAVAILABLE_MSG(msg) __attribute__((unavailable(msg))) +#endif +#if !defined(SWIFT_AVAILABILITY) +# define SWIFT_AVAILABILITY(plat, ...) __attribute__((availability(plat, __VA_ARGS__))) +#endif +#if !defined(SWIFT_WEAK_IMPORT) +# define SWIFT_WEAK_IMPORT __attribute__((weak_import)) +#endif +#if !defined(SWIFT_DEPRECATED) +# define SWIFT_DEPRECATED __attribute__((deprecated)) +#endif +#if !defined(SWIFT_DEPRECATED_MSG) +# define SWIFT_DEPRECATED_MSG(...) __attribute__((deprecated(__VA_ARGS__))) +#endif +#if __has_feature(attribute_diagnose_if_objc) +# define SWIFT_DEPRECATED_OBJC(Msg) __attribute__((diagnose_if(1, Msg, "warning"))) +#else +# define SWIFT_DEPRECATED_OBJC(Msg) SWIFT_DEPRECATED_MSG(Msg) +#endif +#if defined(__OBJC__) +#if !defined(IBSegueAction) +# define IBSegueAction +#endif +#endif +#if !defined(SWIFT_EXTERN) +# if defined(__cplusplus) +# define SWIFT_EXTERN extern "C" +# else +# define SWIFT_EXTERN extern +# endif +#endif +#if !defined(SWIFT_CALL) +# define SWIFT_CALL __attribute__((swiftcall)) +#endif +#if defined(__cplusplus) +#if !defined(SWIFT_NOEXCEPT) +# define SWIFT_NOEXCEPT noexcept +#endif +#else +#if !defined(SWIFT_NOEXCEPT) +# define SWIFT_NOEXCEPT +#endif +#endif +#if defined(__cplusplus) +#if !defined(SWIFT_CXX_INT_DEFINED) +#define SWIFT_CXX_INT_DEFINED +namespace swift { +using Int = ptrdiff_t; +using UInt = size_t; +} +#endif +#endif +#if defined(__OBJC__) +#if __has_feature(modules) +#if __has_warning("-Watimport-in-framework-header") +#pragma clang diagnostic ignored "-Watimport-in-framework-header" +#endif +#endif + +#endif +#pragma clang diagnostic ignored "-Wproperty-attribute-mismatch" +#pragma clang diagnostic ignored "-Wduplicate-method-arg" +#if __has_warning("-Wpragma-clang-attribute") +# pragma clang diagnostic ignored "-Wpragma-clang-attribute" +#endif +#pragma clang diagnostic ignored "-Wunknown-pragmas" +#pragma clang diagnostic ignored "-Wnullability" +#pragma clang diagnostic ignored "-Wdollar-in-identifier-extension" + +#if __has_attribute(external_source_symbol) +# pragma push_macro("any") +# undef any +# pragma clang attribute push(__attribute__((external_source_symbol(language="Swift", defined_in="OneSignalFramework",generated_declaration))), apply_to=any(function,enum,objc_interface,objc_category,objc_protocol)) +# pragma pop_macro("any") +#endif + +#if defined(__OBJC__) + +#endif +#if defined(__cplusplus) +#endif +#if __has_attribute(external_source_symbol) +# pragma clang attribute pop +#endif +#pragma clang diagnostic pop +#endif + +#elif defined(__x86_64__) && __x86_64__ +// Generated by Apple Swift version 5.7.1 (swiftlang-5.7.1.135.3 clang-1400.0.29.51) +#ifndef ONESIGNALFRAMEWORK_SWIFT_H +#define ONESIGNALFRAMEWORK_SWIFT_H +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wgcc-compat" + +#if !defined(__has_include) +# define __has_include(x) 0 +#endif +#if !defined(__has_attribute) +# define __has_attribute(x) 0 +#endif +#if !defined(__has_feature) +# define __has_feature(x) 0 +#endif +#if !defined(__has_warning) +# define __has_warning(x) 0 +#endif + +#if __has_include() +# include +#endif + +#pragma clang diagnostic ignored "-Wduplicate-method-match" +#pragma clang diagnostic ignored "-Wauto-import" +#if defined(__OBJC__) +#include +#endif +#if defined(__cplusplus) +#include +#include +#include +#else +#include +#include +#include +#endif + +#if !defined(SWIFT_TYPEDEFS) +# define SWIFT_TYPEDEFS 1 +# if __has_include() +# include +# elif !defined(__cplusplus) +typedef uint_least16_t char16_t; +typedef uint_least32_t char32_t; +# endif +typedef float swift_float2 __attribute__((__ext_vector_type__(2))); +typedef float swift_float3 __attribute__((__ext_vector_type__(3))); +typedef float swift_float4 __attribute__((__ext_vector_type__(4))); +typedef double swift_double2 __attribute__((__ext_vector_type__(2))); +typedef double swift_double3 __attribute__((__ext_vector_type__(3))); +typedef double swift_double4 __attribute__((__ext_vector_type__(4))); +typedef int swift_int2 __attribute__((__ext_vector_type__(2))); +typedef int swift_int3 __attribute__((__ext_vector_type__(3))); +typedef int swift_int4 __attribute__((__ext_vector_type__(4))); +typedef unsigned int swift_uint2 __attribute__((__ext_vector_type__(2))); +typedef unsigned int swift_uint3 __attribute__((__ext_vector_type__(3))); +typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4))); +#endif + +#if !defined(SWIFT_PASTE) +# define SWIFT_PASTE_HELPER(x, y) x##y +# define SWIFT_PASTE(x, y) SWIFT_PASTE_HELPER(x, y) +#endif +#if !defined(SWIFT_METATYPE) +# define SWIFT_METATYPE(X) Class +#endif +#if !defined(SWIFT_CLASS_PROPERTY) +# if __has_feature(objc_class_property) +# define SWIFT_CLASS_PROPERTY(...) __VA_ARGS__ +# else +# define SWIFT_CLASS_PROPERTY(...) +# endif +#endif + +#if __has_attribute(objc_runtime_name) +# define SWIFT_RUNTIME_NAME(X) __attribute__((objc_runtime_name(X))) +#else +# define SWIFT_RUNTIME_NAME(X) +#endif +#if __has_attribute(swift_name) +# define SWIFT_COMPILE_NAME(X) __attribute__((swift_name(X))) +#else +# define SWIFT_COMPILE_NAME(X) +#endif +#if __has_attribute(objc_method_family) +# define SWIFT_METHOD_FAMILY(X) __attribute__((objc_method_family(X))) +#else +# define SWIFT_METHOD_FAMILY(X) +#endif +#if __has_attribute(noescape) +# define SWIFT_NOESCAPE __attribute__((noescape)) +#else +# define SWIFT_NOESCAPE +#endif +#if __has_attribute(ns_consumed) +# define SWIFT_RELEASES_ARGUMENT __attribute__((ns_consumed)) +#else +# define SWIFT_RELEASES_ARGUMENT +#endif +#if __has_attribute(warn_unused_result) +# define SWIFT_WARN_UNUSED_RESULT __attribute__((warn_unused_result)) +#else +# define SWIFT_WARN_UNUSED_RESULT +#endif +#if __has_attribute(noreturn) +# define SWIFT_NORETURN __attribute__((noreturn)) +#else +# define SWIFT_NORETURN +#endif +#if !defined(SWIFT_CLASS_EXTRA) +# define SWIFT_CLASS_EXTRA +#endif +#if !defined(SWIFT_PROTOCOL_EXTRA) +# define SWIFT_PROTOCOL_EXTRA +#endif +#if !defined(SWIFT_ENUM_EXTRA) +# define SWIFT_ENUM_EXTRA +#endif +#if !defined(SWIFT_CLASS) +# if __has_attribute(objc_subclassing_restricted) +# define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_CLASS_EXTRA +# define SWIFT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA +# else +# define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA +# define SWIFT_CLASS_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA +# endif +#endif +#if !defined(SWIFT_RESILIENT_CLASS) +# if __has_attribute(objc_class_stub) +# define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME) __attribute__((objc_class_stub)) +# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_class_stub)) SWIFT_CLASS_NAMED(SWIFT_NAME) +# else +# define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME) +# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) SWIFT_CLASS_NAMED(SWIFT_NAME) +# endif +#endif + +#if !defined(SWIFT_PROTOCOL) +# define SWIFT_PROTOCOL(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA +# define SWIFT_PROTOCOL_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA +#endif + +#if !defined(SWIFT_EXTENSION) +# define SWIFT_EXTENSION(M) SWIFT_PASTE(M##_Swift_, __LINE__) +#endif + +#if !defined(OBJC_DESIGNATED_INITIALIZER) +# if __has_attribute(objc_designated_initializer) +# define OBJC_DESIGNATED_INITIALIZER __attribute__((objc_designated_initializer)) +# else +# define OBJC_DESIGNATED_INITIALIZER +# endif +#endif +#if !defined(SWIFT_ENUM_ATTR) +# if defined(__has_attribute) && __has_attribute(enum_extensibility) +# define SWIFT_ENUM_ATTR(_extensibility) __attribute__((enum_extensibility(_extensibility))) +# else +# define SWIFT_ENUM_ATTR(_extensibility) +# endif +#endif +#if !defined(SWIFT_ENUM) +# define SWIFT_ENUM(_type, _name, _extensibility) enum _name : _type _name; enum SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type +# if __has_feature(generalized_swift_name) +# define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) enum _name : _type _name SWIFT_COMPILE_NAME(SWIFT_NAME); enum SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type +# else +# define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) SWIFT_ENUM(_type, _name, _extensibility) +# endif +#endif +#if !defined(SWIFT_UNAVAILABLE) +# define SWIFT_UNAVAILABLE __attribute__((unavailable)) +#endif +#if !defined(SWIFT_UNAVAILABLE_MSG) +# define SWIFT_UNAVAILABLE_MSG(msg) __attribute__((unavailable(msg))) +#endif +#if !defined(SWIFT_AVAILABILITY) +# define SWIFT_AVAILABILITY(plat, ...) __attribute__((availability(plat, __VA_ARGS__))) +#endif +#if !defined(SWIFT_WEAK_IMPORT) +# define SWIFT_WEAK_IMPORT __attribute__((weak_import)) +#endif +#if !defined(SWIFT_DEPRECATED) +# define SWIFT_DEPRECATED __attribute__((deprecated)) +#endif +#if !defined(SWIFT_DEPRECATED_MSG) +# define SWIFT_DEPRECATED_MSG(...) __attribute__((deprecated(__VA_ARGS__))) +#endif +#if __has_feature(attribute_diagnose_if_objc) +# define SWIFT_DEPRECATED_OBJC(Msg) __attribute__((diagnose_if(1, Msg, "warning"))) +#else +# define SWIFT_DEPRECATED_OBJC(Msg) SWIFT_DEPRECATED_MSG(Msg) +#endif +#if defined(__OBJC__) +#if !defined(IBSegueAction) +# define IBSegueAction +#endif +#endif +#if !defined(SWIFT_EXTERN) +# if defined(__cplusplus) +# define SWIFT_EXTERN extern "C" +# else +# define SWIFT_EXTERN extern +# endif +#endif +#if !defined(SWIFT_CALL) +# define SWIFT_CALL __attribute__((swiftcall)) +#endif +#if defined(__cplusplus) +#if !defined(SWIFT_NOEXCEPT) +# define SWIFT_NOEXCEPT noexcept +#endif +#else +#if !defined(SWIFT_NOEXCEPT) +# define SWIFT_NOEXCEPT +#endif +#endif +#if defined(__cplusplus) +#if !defined(SWIFT_CXX_INT_DEFINED) +#define SWIFT_CXX_INT_DEFINED +namespace swift { +using Int = ptrdiff_t; +using UInt = size_t; +} +#endif +#endif +#if defined(__OBJC__) +#if __has_feature(modules) +#if __has_warning("-Watimport-in-framework-header") +#pragma clang diagnostic ignored "-Watimport-in-framework-header" +#endif +#endif + +#endif +#pragma clang diagnostic ignored "-Wproperty-attribute-mismatch" +#pragma clang diagnostic ignored "-Wduplicate-method-arg" +#if __has_warning("-Wpragma-clang-attribute") +# pragma clang diagnostic ignored "-Wpragma-clang-attribute" +#endif +#pragma clang diagnostic ignored "-Wunknown-pragmas" +#pragma clang diagnostic ignored "-Wnullability" +#pragma clang diagnostic ignored "-Wdollar-in-identifier-extension" + +#if __has_attribute(external_source_symbol) +# pragma push_macro("any") +# undef any +# pragma clang attribute push(__attribute__((external_source_symbol(language="Swift", defined_in="OneSignalFramework",generated_declaration))), apply_to=any(function,enum,objc_interface,objc_category,objc_protocol)) +# pragma pop_macro("any") +#endif + +#if defined(__OBJC__) + +#endif +#if defined(__cplusplus) +#endif +#if __has_attribute(external_source_symbol) +# pragma clang attribute pop +#endif +#pragma clang diagnostic pop +#endif + +#else +#error unsupported Swift architecture +#endif diff --git a/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignalFramework.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalFramework.framework/Versions/A/Headers/OneSignalFramework.h b/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignalFramework.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalFramework.framework/Versions/A/Headers/OneSignalFramework.h new file mode 100755 index 000000000..5cffcce44 --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignalFramework.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalFramework.framework/Versions/A/Headers/OneSignalFramework.h @@ -0,0 +1,116 @@ +/** + Modified MIT License + + Copyright 2017 OneSignal + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + 1. The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + 2. All copies of substantial portions of the Software may only be used in connection + with services provided by OneSignal. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + */ + +/** + ### Setting up the SDK ### + Follow the documentation from https://documentation.onesignal.com/docs/ios-sdk-setupto setup OneSignal in your app. + + ### API Reference ### + Follow the documentation from https://documentation.onesignal.com/docs/ios-sdk-api for a detailed explanation of the API. + + ### Troubleshoot ### + Follow the documentation from https://documentation.onesignal.com/docs/troubleshooting-ios to fix common problems. + + For help on how to upgrade your code from 1.* SDK to 2.*: https://documentation.onesignal.com/docs/upgrading-to-ios-sdk-20 + + ### More ### + iOS Push Cert: https://documentation.onesignal.com/docs/generating-an-ios-push-certificate +*/ + +#import +#import +#import +#import +#import +#import +#import +#import "OneSignalLiveActivityController.h" + +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wstrict-prototypes" +#pragma clang diagnostic ignored "-Wnullability-completeness" + +typedef void (^OSWebOpenURLResultBlock)(BOOL shouldOpen); + +/*Block for generic results on success and errors on failure*/ +typedef void (^OSResultSuccessBlock)(NSDictionary* result); +typedef void (^OSFailureBlock)(NSError* error); + +// ======= OneSignal Class Interface ========= +@interface OneSignal : NSObject + ++ (NSString* _Nonnull)sdkVersionRaw; ++ (NSString* _Nonnull)sdkSemanticVersion; + +#pragma mark User ++ (id)User NS_REFINED_FOR_SWIFT; ++ (void)login:(NSString * _Nonnull)externalId; ++ (void)login:(NSString * _Nonnull)externalId withToken:(NSString * _Nullable)token +NS_SWIFT_NAME(login(externalId:token:)); ++ (void)logout; + +#pragma mark Notifications ++ (Class)Notifications NS_REFINED_FOR_SWIFT; + +#pragma mark Initialization ++ (void)setLaunchOptions:(nullable NSDictionary*)newLaunchOptions; // meant for use by wrappers ++ (void)initialize:(nonnull NSString*)newAppId withLaunchOptions:(nullable NSDictionary*)launchOptions; ++ (void)setProvidesNotificationSettingsView:(BOOL)providesView; + +#pragma mark Live Activity ++ (Class)LiveActivities NS_REFINED_FOR_SWIFT; + +#pragma mark Logging ++ (Class)Debug NS_REFINED_FOR_SWIFT; + +#pragma mark Privacy Consent +/** + * Set to `true` if your application requires privacy consent. + * Consent should be provided prior to the invocation of `initialize` to ensure compliance. + */ ++ (void)setConsentRequired:(BOOL)required; ++ (void)setConsentGiven:(BOOL)granted; + +#pragma mark In-App Messaging ++ (Class)InAppMessages NS_REFINED_FOR_SWIFT; + +#pragma mark Location ++ (Class)Location NS_REFINED_FOR_SWIFT; + +#pragma mark Session ++ (Class)Session NS_REFINED_FOR_SWIFT; + +#pragma mark Extension +// iOS 10 only +// Process from Notification Service Extension. +// Used for iOS Media Attachemtns and Action Buttons. ++ (UNMutableNotificationContent*)didReceiveNotificationExtensionRequest:(UNNotificationRequest* _Nonnull)request withMutableNotificationContent:(UNMutableNotificationContent* _Nullable)replacementContent __deprecated_msg("Please use didReceiveNotificationExtensionRequest:withMutableNotificationContent:withContentHandler: instead."); ++ (UNMutableNotificationContent*)didReceiveNotificationExtensionRequest:(UNNotificationRequest* _Nonnull)request withMutableNotificationContent:(UNMutableNotificationContent* _Nullable)replacementContent withContentHandler:(void (^)(UNNotificationContent *_Nonnull))contentHandler; ++ (UNMutableNotificationContent*)serviceExtensionTimeWillExpireRequest:(UNNotificationRequest* _Nonnull)request withMutableNotificationContent:(UNMutableNotificationContent* _Nullable)replacementContent; +@end + +#pragma clang diagnostic pop diff --git a/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignalFramework.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalFramework.framework/Versions/A/Headers/OneSignalLiveActivityController.h b/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignalFramework.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalFramework.framework/Versions/A/Headers/OneSignalLiveActivityController.h new file mode 100644 index 000000000..43233bc0e --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignalFramework.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalFramework.framework/Versions/A/Headers/OneSignalLiveActivityController.h @@ -0,0 +1,47 @@ +/** + * Modified MIT License + * + * Copyright 2023 OneSignal + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * 1. The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * 2. All copies of substantial portions of the Software may only be used in connection + * with services provided by OneSignal. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#ifndef OneSignalLiveActivityController_h +#define OneSignalLiveActivityController_h + +#import + +/** + Public API for the LiveActivities namespace. + */ +@protocol OSLiveActivities ++ (void)enter:(NSString * _Nonnull)activityId withToken:(NSString * _Nonnull)token; ++ (void)enter:(NSString * _Nonnull)activityId withToken:(NSString * _Nonnull)token withSuccess:(OSResultSuccessBlock _Nullable)successBlock withFailure:(OSFailureBlock _Nullable)failureBlock; ++ (void)exit:(NSString * _Nonnull)activityId; ++ (void)exit:(NSString * _Nonnull)activityId withSuccess:(OSResultSuccessBlock _Nullable)successBlock withFailure:(OSFailureBlock _Nullable)failureBlock; +@end + +@interface OneSignalLiveActivityController: NSObject ++ (Class_Nonnull)LiveActivities; +@end + +#endif /* OneSignalLiveActivityController_h */ diff --git a/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignalFramework.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalFramework.framework/Versions/A/Modules/OneSignalFramework.swiftmodule/arm64-apple-ios-macabi.abi.json b/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignalFramework.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalFramework.framework/Versions/A/Modules/OneSignalFramework.swiftmodule/arm64-apple-ios-macabi.abi.json new file mode 100644 index 000000000..8069d9ff4 --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignalFramework.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalFramework.framework/Versions/A/Modules/OneSignalFramework.swiftmodule/arm64-apple-ios-macabi.abi.json @@ -0,0 +1,1261 @@ +{ + "ABIRoot": { + "kind": "Root", + "name": "TopLevel", + "printedName": "TopLevel", + "children": [ + { + "kind": "Import", + "name": "Foundation", + "printedName": "Foundation", + "declKind": "Import", + "moduleName": "OneSignalFramework", + "declAttributes": [ + "RawDocComment" + ] + }, + { + "kind": "Import", + "name": "OneSignalUser", + "printedName": "OneSignalUser", + "declKind": "Import", + "moduleName": "OneSignalFramework" + }, + { + "kind": "Import", + "name": "OneSignalOutcomes", + "printedName": "OneSignalOutcomes", + "declKind": "Import", + "moduleName": "OneSignalFramework" + }, + { + "kind": "Import", + "name": "OneSignalNotifications", + "printedName": "OneSignalNotifications", + "declKind": "Import", + "moduleName": "OneSignalFramework" + }, + { + "kind": "Import", + "name": "OneSignalCore", + "printedName": "OneSignalCore", + "declKind": "Import", + "moduleName": "OneSignalFramework" + }, + { + "kind": "TypeDecl", + "name": "OneSignal", + "printedName": "OneSignal", + "children": [ + { + "kind": "Var", + "name": "User", + "printedName": "User", + "children": [ + { + "kind": "TypeNominal", + "name": "OSUser", + "printedName": "OneSignalUser.OSUser", + "usr": "c:@M@OneSignalUser@objc(pl)OSUser" + } + ], + "declKind": "Var", + "usr": "s:So9OneSignalC0aB9FrameworkE4User0abD06OSUser_pvpZ", + "mangledName": "$sSo9OneSignalC0aB9FrameworkE4User0abD06OSUser_pvpZ", + "moduleName": "OneSignalFramework", + "static": true, + "declAttributes": [ + "Final" + ], + "isFromExtension": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "OSUser", + "printedName": "OneSignalUser.OSUser", + "usr": "c:@M@OneSignalUser@objc(pl)OSUser" + } + ], + "declKind": "Accessor", + "usr": "s:So9OneSignalC0aB9FrameworkE4User0abD06OSUser_pvgZ", + "mangledName": "$sSo9OneSignalC0aB9FrameworkE4User0abD06OSUser_pvgZ", + "moduleName": "OneSignalFramework", + "static": true, + "declAttributes": [ + "Final" + ], + "isFromExtension": true, + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "Notifications", + "printedName": "Notifications", + "children": [ + { + "kind": "TypeNominal", + "name": "ExistentialMetatype", + "printedName": "OneSignalNotifications.OSNotifications.Type", + "children": [ + { + "kind": "TypeNominal", + "name": "OSNotifications", + "printedName": "OneSignalNotifications.OSNotifications", + "usr": "c:objc(pl)OSNotifications" + } + ] + } + ], + "declKind": "Var", + "usr": "s:So9OneSignalC0aB9FrameworkE13NotificationsSo15OSNotifications_pXpvpZ", + "mangledName": "$sSo9OneSignalC0aB9FrameworkE13NotificationsSo15OSNotifications_pXpvpZ", + "moduleName": "OneSignalFramework", + "static": true, + "declAttributes": [ + "Final" + ], + "isFromExtension": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "ExistentialMetatype", + "printedName": "OneSignalNotifications.OSNotifications.Type", + "children": [ + { + "kind": "TypeNominal", + "name": "OSNotifications", + "printedName": "OneSignalNotifications.OSNotifications", + "usr": "c:objc(pl)OSNotifications" + } + ] + } + ], + "declKind": "Accessor", + "usr": "s:So9OneSignalC0aB9FrameworkE13NotificationsSo15OSNotifications_pXpvgZ", + "mangledName": "$sSo9OneSignalC0aB9FrameworkE13NotificationsSo15OSNotifications_pXpvgZ", + "moduleName": "OneSignalFramework", + "static": true, + "declAttributes": [ + "Final" + ], + "isFromExtension": true, + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "Session", + "printedName": "Session", + "children": [ + { + "kind": "TypeNominal", + "name": "ExistentialMetatype", + "printedName": "OneSignalOutcomes.OSSession.Type", + "children": [ + { + "kind": "TypeNominal", + "name": "OSSession", + "printedName": "OneSignalOutcomes.OSSession", + "usr": "c:objc(pl)OSSession" + } + ] + } + ], + "declKind": "Var", + "usr": "s:So9OneSignalC0aB9FrameworkE7SessionSo9OSSession_pXpvpZ", + "mangledName": "$sSo9OneSignalC0aB9FrameworkE7SessionSo9OSSession_pXpvpZ", + "moduleName": "OneSignalFramework", + "static": true, + "declAttributes": [ + "Final" + ], + "isFromExtension": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "ExistentialMetatype", + "printedName": "OneSignalOutcomes.OSSession.Type", + "children": [ + { + "kind": "TypeNominal", + "name": "OSSession", + "printedName": "OneSignalOutcomes.OSSession", + "usr": "c:objc(pl)OSSession" + } + ] + } + ], + "declKind": "Accessor", + "usr": "s:So9OneSignalC0aB9FrameworkE7SessionSo9OSSession_pXpvgZ", + "mangledName": "$sSo9OneSignalC0aB9FrameworkE7SessionSo9OSSession_pXpvgZ", + "moduleName": "OneSignalFramework", + "static": true, + "declAttributes": [ + "Final" + ], + "isFromExtension": true, + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "InAppMessages", + "printedName": "InAppMessages", + "children": [ + { + "kind": "TypeNominal", + "name": "ExistentialMetatype", + "printedName": "OneSignalCore.OSInAppMessages.Type", + "children": [ + { + "kind": "TypeNominal", + "name": "OSInAppMessages", + "printedName": "OneSignalCore.OSInAppMessages", + "usr": "c:objc(pl)OSInAppMessages" + } + ] + } + ], + "declKind": "Var", + "usr": "s:So9OneSignalC0aB9FrameworkE13InAppMessagesSo04OSIneF0_pXpvpZ", + "mangledName": "$sSo9OneSignalC0aB9FrameworkE13InAppMessagesSo04OSIneF0_pXpvpZ", + "moduleName": "OneSignalFramework", + "static": true, + "declAttributes": [ + "Final" + ], + "isFromExtension": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "ExistentialMetatype", + "printedName": "OneSignalCore.OSInAppMessages.Type", + "children": [ + { + "kind": "TypeNominal", + "name": "OSInAppMessages", + "printedName": "OneSignalCore.OSInAppMessages", + "usr": "c:objc(pl)OSInAppMessages" + } + ] + } + ], + "declKind": "Accessor", + "usr": "s:So9OneSignalC0aB9FrameworkE13InAppMessagesSo04OSIneF0_pXpvgZ", + "mangledName": "$sSo9OneSignalC0aB9FrameworkE13InAppMessagesSo04OSIneF0_pXpvgZ", + "moduleName": "OneSignalFramework", + "static": true, + "declAttributes": [ + "Final" + ], + "isFromExtension": true, + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "Debug", + "printedName": "Debug", + "children": [ + { + "kind": "TypeNominal", + "name": "ExistentialMetatype", + "printedName": "OneSignalCore.OSDebug.Type", + "children": [ + { + "kind": "TypeNominal", + "name": "OSDebug", + "printedName": "OneSignalCore.OSDebug", + "usr": "c:objc(pl)OSDebug" + } + ] + } + ], + "declKind": "Var", + "usr": "s:So9OneSignalC0aB9FrameworkE5DebugSo7OSDebug_pXpvpZ", + "mangledName": "$sSo9OneSignalC0aB9FrameworkE5DebugSo7OSDebug_pXpvpZ", + "moduleName": "OneSignalFramework", + "static": true, + "declAttributes": [ + "Final" + ], + "isFromExtension": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "ExistentialMetatype", + "printedName": "OneSignalCore.OSDebug.Type", + "children": [ + { + "kind": "TypeNominal", + "name": "OSDebug", + "printedName": "OneSignalCore.OSDebug", + "usr": "c:objc(pl)OSDebug" + } + ] + } + ], + "declKind": "Accessor", + "usr": "s:So9OneSignalC0aB9FrameworkE5DebugSo7OSDebug_pXpvgZ", + "mangledName": "$sSo9OneSignalC0aB9FrameworkE5DebugSo7OSDebug_pXpvgZ", + "moduleName": "OneSignalFramework", + "static": true, + "declAttributes": [ + "Final" + ], + "isFromExtension": true, + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "Location", + "printedName": "Location", + "children": [ + { + "kind": "TypeNominal", + "name": "ExistentialMetatype", + "printedName": "OneSignalCore.OSLocation.Type", + "children": [ + { + "kind": "TypeNominal", + "name": "OSLocation", + "printedName": "OneSignalCore.OSLocation", + "usr": "c:objc(pl)OSLocation" + } + ] + } + ], + "declKind": "Var", + "usr": "s:So9OneSignalC0aB9FrameworkE8LocationSo10OSLocation_pXpvpZ", + "mangledName": "$sSo9OneSignalC0aB9FrameworkE8LocationSo10OSLocation_pXpvpZ", + "moduleName": "OneSignalFramework", + "static": true, + "declAttributes": [ + "Final" + ], + "isFromExtension": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "ExistentialMetatype", + "printedName": "OneSignalCore.OSLocation.Type", + "children": [ + { + "kind": "TypeNominal", + "name": "OSLocation", + "printedName": "OneSignalCore.OSLocation", + "usr": "c:objc(pl)OSLocation" + } + ] + } + ], + "declKind": "Accessor", + "usr": "s:So9OneSignalC0aB9FrameworkE8LocationSo10OSLocation_pXpvgZ", + "mangledName": "$sSo9OneSignalC0aB9FrameworkE8LocationSo10OSLocation_pXpvgZ", + "moduleName": "OneSignalFramework", + "static": true, + "declAttributes": [ + "Final" + ], + "isFromExtension": true, + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "LiveActivities", + "printedName": "LiveActivities", + "children": [ + { + "kind": "TypeNominal", + "name": "ExistentialMetatype", + "printedName": "OneSignalFramework.OSLiveActivities.Type", + "children": [ + { + "kind": "TypeNominal", + "name": "OSLiveActivities", + "printedName": "OneSignalFramework.OSLiveActivities", + "usr": "c:objc(pl)OSLiveActivities" + } + ] + } + ], + "declKind": "Var", + "usr": "s:So9OneSignalC0aB9FrameworkE14LiveActivitiesSo06OSLiveE0_pXpvpZ", + "mangledName": "$sSo9OneSignalC0aB9FrameworkE14LiveActivitiesSo06OSLiveE0_pXpvpZ", + "moduleName": "OneSignalFramework", + "static": true, + "declAttributes": [ + "Final" + ], + "isFromExtension": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "ExistentialMetatype", + "printedName": "OneSignalFramework.OSLiveActivities.Type", + "children": [ + { + "kind": "TypeNominal", + "name": "OSLiveActivities", + "printedName": "OneSignalFramework.OSLiveActivities", + "usr": "c:objc(pl)OSLiveActivities" + } + ] + } + ], + "declKind": "Accessor", + "usr": "s:So9OneSignalC0aB9FrameworkE14LiveActivitiesSo06OSLiveE0_pXpvgZ", + "mangledName": "$sSo9OneSignalC0aB9FrameworkE14LiveActivitiesSo06OSLiveE0_pXpvgZ", + "moduleName": "OneSignalFramework", + "static": true, + "declAttributes": [ + "Final" + ], + "isFromExtension": true, + "accessorKind": "get" + } + ] + } + ], + "declKind": "Class", + "usr": "c:objc(cs)OneSignal", + "moduleName": "OneSignalFramework", + "isOpen": true, + "objc_name": "OneSignal", + "declAttributes": [ + "ObjC", + "Dynamic" + ], + "superclassUsr": "c:objc(cs)NSObject", + "isExternal": true, + "inheritsConvenienceInitializers": true, + "superclassNames": [ + "ObjectiveC.NSObject" + ], + "conformances": [ + { + "kind": "Conformance", + "name": "Equatable", + "printedName": "Equatable", + "usr": "s:SQ", + "mangledName": "$sSQ" + }, + { + "kind": "Conformance", + "name": "Hashable", + "printedName": "Hashable", + "usr": "s:SH", + "mangledName": "$sSH" + }, + { + "kind": "Conformance", + "name": "CVarArg", + "printedName": "CVarArg", + "usr": "s:s7CVarArgP", + "mangledName": "$ss7CVarArgP" + }, + { + "kind": "Conformance", + "name": "_KeyValueCodingAndObservingPublishing", + "printedName": "_KeyValueCodingAndObservingPublishing", + "usr": "s:10Foundation37_KeyValueCodingAndObservingPublishingP", + "mangledName": "$s10Foundation37_KeyValueCodingAndObservingPublishingP" + }, + { + "kind": "Conformance", + "name": "_KeyValueCodingAndObserving", + "printedName": "_KeyValueCodingAndObserving", + "usr": "s:10Foundation27_KeyValueCodingAndObservingP", + "mangledName": "$s10Foundation27_KeyValueCodingAndObservingP" + }, + { + "kind": "Conformance", + "name": "CustomStringConvertible", + "printedName": "CustomStringConvertible", + "usr": "s:s23CustomStringConvertibleP", + "mangledName": "$ss23CustomStringConvertibleP" + }, + { + "kind": "Conformance", + "name": "CustomDebugStringConvertible", + "printedName": "CustomDebugStringConvertible", + "usr": "s:s28CustomDebugStringConvertibleP", + "mangledName": "$ss28CustomDebugStringConvertibleP" + } + ] + }, + { + "kind": "TypeDecl", + "name": "OSDebug", + "printedName": "OSDebug", + "children": [ + { + "kind": "Function", + "name": "setAlertLevel", + "printedName": "setAlertLevel(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "ONE_S_LOG_LEVEL", + "printedName": "OneSignalCore.ONE_S_LOG_LEVEL", + "usr": "c:@E@ONE_S_LOG_LEVEL" + } + ], + "declKind": "Func", + "usr": "s:So7OSDebugP18OneSignalFrameworkE13setAlertLevelyySo15ONE_S_LOG_LEVELVFZ", + "mangledName": "$sSo7OSDebugP18OneSignalFrameworkE13setAlertLevelyySo15ONE_S_LOG_LEVELVFZ", + "moduleName": "OneSignalFramework", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalCore.OSDebug>", + "sugared_genericSig": "", + "static": true, + "isFromExtension": true, + "funcSelfKind": "NonMutating" + } + ], + "declKind": "Protocol", + "usr": "c:objc(pl)OSDebug", + "moduleName": "OneSignalCore", + "genericSig": "<τ_0_0 : ObjectiveC.NSObjectProtocol>", + "sugared_genericSig": "", + "objc_name": "OSDebug", + "declAttributes": [ + "ObjC", + "Dynamic" + ], + "isExternal": true + }, + { + "kind": "TypeDecl", + "name": "OSInAppMessages", + "printedName": "OSInAppMessages", + "children": [ + { + "kind": "Var", + "name": "paused", + "printedName": "paused", + "children": [ + { + "kind": "TypeNominal", + "name": "Bool", + "printedName": "Swift.Bool", + "usr": "s:Sb" + } + ], + "declKind": "Var", + "usr": "s:So15OSInAppMessagesP18OneSignalFrameworkE6pausedSbvpZ", + "mangledName": "$sSo15OSInAppMessagesP18OneSignalFrameworkE6pausedSbvpZ", + "moduleName": "OneSignalFramework", + "static": true, + "isFromExtension": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "Bool", + "printedName": "Swift.Bool", + "usr": "s:Sb" + } + ], + "declKind": "Accessor", + "usr": "s:So15OSInAppMessagesP18OneSignalFrameworkE6pausedSbvgZ", + "mangledName": "$sSo15OSInAppMessagesP18OneSignalFrameworkE6pausedSbvgZ", + "moduleName": "OneSignalFramework", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalCore.OSInAppMessages>", + "sugared_genericSig": "", + "static": true, + "isFromExtension": true, + "accessorKind": "get" + }, + { + "kind": "Accessor", + "name": "Set", + "printedName": "Set()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "Bool", + "printedName": "Swift.Bool", + "usr": "s:Sb" + } + ], + "declKind": "Accessor", + "usr": "s:So15OSInAppMessagesP18OneSignalFrameworkE6pausedSbvsZ", + "mangledName": "$sSo15OSInAppMessagesP18OneSignalFrameworkE6pausedSbvsZ", + "moduleName": "OneSignalFramework", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalCore.OSInAppMessages>", + "sugared_genericSig": "", + "static": true, + "isFromExtension": true, + "accessorKind": "set" + }, + { + "kind": "Accessor", + "name": "Modify", + "printedName": "Modify()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + } + ], + "declKind": "Accessor", + "usr": "s:So15OSInAppMessagesP18OneSignalFrameworkE6pausedSbvMZ", + "mangledName": "$sSo15OSInAppMessagesP18OneSignalFrameworkE6pausedSbvMZ", + "moduleName": "OneSignalFramework", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalCore.OSInAppMessages>", + "sugared_genericSig": "", + "static": true, + "implicit": true, + "isFromExtension": true, + "accessorKind": "_modify" + } + ] + }, + { + "kind": "Function", + "name": "addLifecycleListener", + "printedName": "addLifecycleListener(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "OSInAppMessageLifecycleListener", + "printedName": "OneSignalCore.OSInAppMessageLifecycleListener", + "usr": "c:objc(pl)OSInAppMessageLifecycleListener" + } + ], + "declKind": "Func", + "usr": "s:So15OSInAppMessagesP18OneSignalFrameworkE20addLifecycleListeneryySo0ab7MessagehI0_pFZ", + "mangledName": "$sSo15OSInAppMessagesP18OneSignalFrameworkE20addLifecycleListeneryySo0ab7MessagehI0_pFZ", + "moduleName": "OneSignalFramework", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalCore.OSInAppMessages>", + "sugared_genericSig": "", + "static": true, + "isFromExtension": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "removeLifecycleListener", + "printedName": "removeLifecycleListener(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "OSInAppMessageLifecycleListener", + "printedName": "OneSignalCore.OSInAppMessageLifecycleListener", + "usr": "c:objc(pl)OSInAppMessageLifecycleListener" + } + ], + "declKind": "Func", + "usr": "s:So15OSInAppMessagesP18OneSignalFrameworkE23removeLifecycleListeneryySo0ab7MessagehI0_pFZ", + "mangledName": "$sSo15OSInAppMessagesP18OneSignalFrameworkE23removeLifecycleListeneryySo0ab7MessagehI0_pFZ", + "moduleName": "OneSignalFramework", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalCore.OSInAppMessages>", + "sugared_genericSig": "", + "static": true, + "isFromExtension": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "addClickListener", + "printedName": "addClickListener(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "OSInAppMessageClickListener", + "printedName": "OneSignalCore.OSInAppMessageClickListener", + "usr": "c:objc(pl)OSInAppMessageClickListener" + } + ], + "declKind": "Func", + "usr": "s:So15OSInAppMessagesP18OneSignalFrameworkE16addClickListeneryySo0ab7MessagehI0_pFZ", + "mangledName": "$sSo15OSInAppMessagesP18OneSignalFrameworkE16addClickListeneryySo0ab7MessagehI0_pFZ", + "moduleName": "OneSignalFramework", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalCore.OSInAppMessages>", + "sugared_genericSig": "", + "static": true, + "isFromExtension": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "removeClickListener", + "printedName": "removeClickListener(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "OSInAppMessageClickListener", + "printedName": "OneSignalCore.OSInAppMessageClickListener", + "usr": "c:objc(pl)OSInAppMessageClickListener" + } + ], + "declKind": "Func", + "usr": "s:So15OSInAppMessagesP18OneSignalFrameworkE19removeClickListeneryySo0ab7MessagehI0_pFZ", + "mangledName": "$sSo15OSInAppMessagesP18OneSignalFrameworkE19removeClickListeneryySo0ab7MessagehI0_pFZ", + "moduleName": "OneSignalFramework", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalCore.OSInAppMessages>", + "sugared_genericSig": "", + "static": true, + "isFromExtension": true, + "funcSelfKind": "NonMutating" + } + ], + "declKind": "Protocol", + "usr": "c:objc(pl)OSInAppMessages", + "moduleName": "OneSignalCore", + "genericSig": "<τ_0_0 : ObjectiveC.NSObjectProtocol>", + "sugared_genericSig": "", + "objc_name": "OSInAppMessages", + "declAttributes": [ + "ObjC", + "Dynamic" + ], + "isExternal": true + }, + { + "kind": "TypeDecl", + "name": "OSSession", + "printedName": "OSSession", + "children": [ + { + "kind": "Function", + "name": "addOutcome", + "printedName": "addOutcome(_:_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + }, + { + "kind": "TypeNominal", + "name": "NSNumber", + "printedName": "Foundation.NSNumber", + "usr": "c:objc(cs)NSNumber" + } + ], + "declKind": "Func", + "usr": "s:So9OSSessionP18OneSignalFrameworkE10addOutcomeyySS_So8NSNumberCtFZ", + "mangledName": "$sSo9OSSessionP18OneSignalFrameworkE10addOutcomeyySS_So8NSNumberCtFZ", + "moduleName": "OneSignalFramework", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalOutcomes.OSSession>", + "sugared_genericSig": "", + "static": true, + "isFromExtension": true, + "funcSelfKind": "NonMutating" + } + ], + "declKind": "Protocol", + "usr": "c:objc(pl)OSSession", + "moduleName": "OneSignalOutcomes", + "genericSig": "<τ_0_0 : ObjectiveC.NSObjectProtocol>", + "sugared_genericSig": "", + "objc_name": "OSSession", + "declAttributes": [ + "ObjC", + "Dynamic" + ], + "isExternal": true + }, + { + "kind": "TypeDecl", + "name": "OSNotifications", + "printedName": "OSNotifications", + "children": [ + { + "kind": "Var", + "name": "permission", + "printedName": "permission", + "children": [ + { + "kind": "TypeNominal", + "name": "Bool", + "printedName": "Swift.Bool", + "usr": "s:Sb" + } + ], + "declKind": "Var", + "usr": "s:So15OSNotificationsP18OneSignalFrameworkE10permissionSbvpZ", + "mangledName": "$sSo15OSNotificationsP18OneSignalFrameworkE10permissionSbvpZ", + "moduleName": "OneSignalFramework", + "static": true, + "isFromExtension": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "Bool", + "printedName": "Swift.Bool", + "usr": "s:Sb" + } + ], + "declKind": "Accessor", + "usr": "s:So15OSNotificationsP18OneSignalFrameworkE10permissionSbvgZ", + "mangledName": "$sSo15OSNotificationsP18OneSignalFrameworkE10permissionSbvgZ", + "moduleName": "OneSignalFramework", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalNotifications.OSNotifications>", + "sugared_genericSig": "", + "static": true, + "isFromExtension": true, + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "canRequestPermission", + "printedName": "canRequestPermission", + "children": [ + { + "kind": "TypeNominal", + "name": "Bool", + "printedName": "Swift.Bool", + "usr": "s:Sb" + } + ], + "declKind": "Var", + "usr": "s:So15OSNotificationsP18OneSignalFrameworkE20canRequestPermissionSbvpZ", + "mangledName": "$sSo15OSNotificationsP18OneSignalFrameworkE20canRequestPermissionSbvpZ", + "moduleName": "OneSignalFramework", + "static": true, + "isFromExtension": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "Bool", + "printedName": "Swift.Bool", + "usr": "s:Sb" + } + ], + "declKind": "Accessor", + "usr": "s:So15OSNotificationsP18OneSignalFrameworkE20canRequestPermissionSbvgZ", + "mangledName": "$sSo15OSNotificationsP18OneSignalFrameworkE20canRequestPermissionSbvgZ", + "moduleName": "OneSignalFramework", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalNotifications.OSNotifications>", + "sugared_genericSig": "", + "static": true, + "isFromExtension": true, + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "permissionNative", + "printedName": "permissionNative", + "children": [ + { + "kind": "TypeNominal", + "name": "OSNotificationPermission", + "printedName": "OneSignalNotifications.OSNotificationPermission", + "usr": "c:@E@OSNotificationPermission" + } + ], + "declKind": "Var", + "usr": "s:So15OSNotificationsP18OneSignalFrameworkE16permissionNativeSo24OSNotificationPermissionVvpZ", + "mangledName": "$sSo15OSNotificationsP18OneSignalFrameworkE16permissionNativeSo24OSNotificationPermissionVvpZ", + "moduleName": "OneSignalFramework", + "static": true, + "isFromExtension": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "OSNotificationPermission", + "printedName": "OneSignalNotifications.OSNotificationPermission", + "usr": "c:@E@OSNotificationPermission" + } + ], + "declKind": "Accessor", + "usr": "s:So15OSNotificationsP18OneSignalFrameworkE16permissionNativeSo24OSNotificationPermissionVvgZ", + "mangledName": "$sSo15OSNotificationsP18OneSignalFrameworkE16permissionNativeSo24OSNotificationPermissionVvgZ", + "moduleName": "OneSignalFramework", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalNotifications.OSNotifications>", + "sugared_genericSig": "", + "static": true, + "isFromExtension": true, + "accessorKind": "get" + } + ] + }, + { + "kind": "Function", + "name": "registerForProvisionalAuthorization", + "printedName": "registerForProvisionalAuthorization(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "((Swift.Bool) -> ())?", + "children": [ + { + "kind": "TypeFunc", + "name": "Function", + "printedName": "(Swift.Bool) -> ()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "Bool", + "printedName": "Swift.Bool", + "usr": "s:Sb" + } + ] + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Func", + "usr": "s:So15OSNotificationsP18OneSignalFrameworkE35registerForProvisionalAuthorizationyyySbcSgFZ", + "mangledName": "$sSo15OSNotificationsP18OneSignalFrameworkE35registerForProvisionalAuthorizationyyySbcSgFZ", + "moduleName": "OneSignalFramework", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalNotifications.OSNotifications>", + "sugared_genericSig": "", + "static": true, + "isFromExtension": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "addPermissionObserver", + "printedName": "addPermissionObserver(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "OSNotificationPermissionObserver", + "printedName": "OneSignalNotifications.OSNotificationPermissionObserver", + "usr": "c:objc(pl)OSNotificationPermissionObserver" + } + ], + "declKind": "Func", + "usr": "s:So15OSNotificationsP18OneSignalFrameworkE21addPermissionObserveryySo014OSNotificationfG0_pFZ", + "mangledName": "$sSo15OSNotificationsP18OneSignalFrameworkE21addPermissionObserveryySo014OSNotificationfG0_pFZ", + "moduleName": "OneSignalFramework", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalNotifications.OSNotifications>", + "sugared_genericSig": "", + "static": true, + "isFromExtension": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "removePermissionObserver", + "printedName": "removePermissionObserver(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "OSNotificationPermissionObserver", + "printedName": "OneSignalNotifications.OSNotificationPermissionObserver", + "usr": "c:objc(pl)OSNotificationPermissionObserver" + } + ], + "declKind": "Func", + "usr": "s:So15OSNotificationsP18OneSignalFrameworkE24removePermissionObserveryySo014OSNotificationfG0_pFZ", + "mangledName": "$sSo15OSNotificationsP18OneSignalFrameworkE24removePermissionObserveryySo014OSNotificationfG0_pFZ", + "moduleName": "OneSignalFramework", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalNotifications.OSNotifications>", + "sugared_genericSig": "", + "static": true, + "isFromExtension": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "addClickListener", + "printedName": "addClickListener(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "OSNotificationClickListener", + "printedName": "OneSignalNotifications.OSNotificationClickListener", + "usr": "c:objc(pl)OSNotificationClickListener" + } + ], + "declKind": "Func", + "usr": "s:So15OSNotificationsP18OneSignalFrameworkE16addClickListeneryySo014OSNotificationfG0_pFZ", + "mangledName": "$sSo15OSNotificationsP18OneSignalFrameworkE16addClickListeneryySo014OSNotificationfG0_pFZ", + "moduleName": "OneSignalFramework", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalNotifications.OSNotifications>", + "sugared_genericSig": "", + "static": true, + "isFromExtension": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "removeClickListener", + "printedName": "removeClickListener(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "OSNotificationClickListener", + "printedName": "OneSignalNotifications.OSNotificationClickListener", + "usr": "c:objc(pl)OSNotificationClickListener" + } + ], + "declKind": "Func", + "usr": "s:So15OSNotificationsP18OneSignalFrameworkE19removeClickListeneryySo014OSNotificationfG0_pFZ", + "mangledName": "$sSo15OSNotificationsP18OneSignalFrameworkE19removeClickListeneryySo014OSNotificationfG0_pFZ", + "moduleName": "OneSignalFramework", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalNotifications.OSNotifications>", + "sugared_genericSig": "", + "static": true, + "isFromExtension": true, + "funcSelfKind": "NonMutating" + } + ], + "declKind": "Protocol", + "usr": "c:objc(pl)OSNotifications", + "moduleName": "OneSignalNotifications", + "genericSig": "<τ_0_0 : ObjectiveC.NSObjectProtocol>", + "sugared_genericSig": "", + "objc_name": "OSNotifications", + "declAttributes": [ + "ObjC", + "Dynamic" + ], + "isExternal": true + }, + { + "kind": "TypeDecl", + "name": "OSLocation", + "printedName": "OSLocation", + "children": [ + { + "kind": "Var", + "name": "isShared", + "printedName": "isShared", + "children": [ + { + "kind": "TypeNominal", + "name": "Bool", + "printedName": "Swift.Bool", + "usr": "s:Sb" + } + ], + "declKind": "Var", + "usr": "s:So10OSLocationP18OneSignalFrameworkE8isSharedSbvpZ", + "mangledName": "$sSo10OSLocationP18OneSignalFrameworkE8isSharedSbvpZ", + "moduleName": "OneSignalFramework", + "static": true, + "isFromExtension": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "Bool", + "printedName": "Swift.Bool", + "usr": "s:Sb" + } + ], + "declKind": "Accessor", + "usr": "s:So10OSLocationP18OneSignalFrameworkE8isSharedSbvgZ", + "mangledName": "$sSo10OSLocationP18OneSignalFrameworkE8isSharedSbvgZ", + "moduleName": "OneSignalFramework", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalCore.OSLocation>", + "sugared_genericSig": "", + "static": true, + "isFromExtension": true, + "accessorKind": "get" + }, + { + "kind": "Accessor", + "name": "Set", + "printedName": "Set()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "Bool", + "printedName": "Swift.Bool", + "usr": "s:Sb" + } + ], + "declKind": "Accessor", + "usr": "s:So10OSLocationP18OneSignalFrameworkE8isSharedSbvsZ", + "mangledName": "$sSo10OSLocationP18OneSignalFrameworkE8isSharedSbvsZ", + "moduleName": "OneSignalFramework", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalCore.OSLocation>", + "sugared_genericSig": "", + "static": true, + "isFromExtension": true, + "accessorKind": "set" + }, + { + "kind": "Accessor", + "name": "Modify", + "printedName": "Modify()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + } + ], + "declKind": "Accessor", + "usr": "s:So10OSLocationP18OneSignalFrameworkE8isSharedSbvMZ", + "mangledName": "$sSo10OSLocationP18OneSignalFrameworkE8isSharedSbvMZ", + "moduleName": "OneSignalFramework", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalCore.OSLocation>", + "sugared_genericSig": "", + "static": true, + "implicit": true, + "isFromExtension": true, + "accessorKind": "_modify" + } + ] + } + ], + "declKind": "Protocol", + "usr": "c:objc(pl)OSLocation", + "moduleName": "OneSignalCore", + "genericSig": "<τ_0_0 : ObjectiveC.NSObjectProtocol>", + "sugared_genericSig": "", + "objc_name": "OSLocation", + "declAttributes": [ + "ObjC", + "Dynamic" + ], + "isExternal": true + } + ], + "json_format_version": 8 + }, + "ConstValues": [] +} \ No newline at end of file diff --git a/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignalFramework.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalFramework.framework/Versions/A/Modules/OneSignalFramework.swiftmodule/arm64-apple-ios-macabi.private.swiftinterface b/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignalFramework.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalFramework.framework/Versions/A/Modules/OneSignalFramework.swiftmodule/arm64-apple-ios-macabi.private.swiftinterface new file mode 100644 index 000000000..8d8d542bc --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignalFramework.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalFramework.framework/Versions/A/Modules/OneSignalFramework.swiftmodule/arm64-apple-ios-macabi.private.swiftinterface @@ -0,0 +1,74 @@ +// swift-interface-format-version: 1.0 +// swift-compiler-version: Apple Swift version 5.7.1 (swiftlang-5.7.1.135.3 clang-1400.0.29.51) +// swift-module-flags: -target arm64-apple-ios13.1-macabi -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -O -module-name OneSignalFramework +// swift-module-flags-ignorable: -enable-bare-slash-regex +import Foundation +import OneSignalCore +@_exported import OneSignalFramework +import OneSignalNotifications +import OneSignalOutcomes +import OneSignalUser +import Swift +import _Concurrency +import _StringProcessing +extension OneSignalFramework.OneSignal { + public static var User: OneSignalUser.OSUser { + get + } + public static var Notifications: OneSignalNotifications.OSNotifications.Type { + get + } + public static var Session: OneSignalOutcomes.OSSession.Type { + get + } + public static var InAppMessages: OneSignalCore.OSInAppMessages.Type { + get + } + public static var Debug: OneSignalCore.OSDebug.Type { + get + } + public static var Location: OneSignalCore.OSLocation.Type { + get + } + public static var LiveActivities: OneSignalFramework.OSLiveActivities.Type { + get + } +} +extension OneSignalCore.OSDebug { + public static func setAlertLevel(_ logLevel: OneSignalCore.ONE_S_LOG_LEVEL) +} +extension OneSignalCore.OSInAppMessages { + public static var paused: Swift.Bool { + get + set + } + public static func addLifecycleListener(_ listener: OneSignalCore.OSInAppMessageLifecycleListener) + public static func removeLifecycleListener(_ listener: OneSignalCore.OSInAppMessageLifecycleListener) + public static func addClickListener(_ listener: OneSignalCore.OSInAppMessageClickListener) + public static func removeClickListener(_ listener: OneSignalCore.OSInAppMessageClickListener) +} +extension OneSignalOutcomes.OSSession { + public static func addOutcome(_ name: Swift.String, _ value: Foundation.NSNumber) +} +extension OneSignalNotifications.OSNotifications { + public static var permission: Swift.Bool { + get + } + public static var canRequestPermission: Swift.Bool { + get + } + public static var permissionNative: OneSignalNotifications.OSNotificationPermission { + get + } + public static func registerForProvisionalAuthorization(_ block: OneSignalNotifications.OSUserResponseBlock?) + public static func addPermissionObserver(_ observer: OneSignalNotifications.OSNotificationPermissionObserver) + public static func removePermissionObserver(_ observer: OneSignalNotifications.OSNotificationPermissionObserver) + public static func addClickListener(_ listener: OneSignalNotifications.OSNotificationClickListener) + public static func removeClickListener(_ listener: OneSignalNotifications.OSNotificationClickListener) +} +extension OneSignalCore.OSLocation { + public static var isShared: Swift.Bool { + get + set + } +} diff --git a/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignalFramework.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalFramework.framework/Versions/A/Modules/OneSignalFramework.swiftmodule/arm64-apple-ios-macabi.swiftdoc b/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignalFramework.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalFramework.framework/Versions/A/Modules/OneSignalFramework.swiftmodule/arm64-apple-ios-macabi.swiftdoc new file mode 100644 index 000000000..d4526674e Binary files /dev/null and b/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignalFramework.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalFramework.framework/Versions/A/Modules/OneSignalFramework.swiftmodule/arm64-apple-ios-macabi.swiftdoc differ diff --git a/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignalFramework.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalFramework.framework/Versions/A/Modules/OneSignalFramework.swiftmodule/arm64-apple-ios-macabi.swiftinterface b/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignalFramework.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalFramework.framework/Versions/A/Modules/OneSignalFramework.swiftmodule/arm64-apple-ios-macabi.swiftinterface new file mode 100644 index 000000000..8d8d542bc --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignalFramework.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalFramework.framework/Versions/A/Modules/OneSignalFramework.swiftmodule/arm64-apple-ios-macabi.swiftinterface @@ -0,0 +1,74 @@ +// swift-interface-format-version: 1.0 +// swift-compiler-version: Apple Swift version 5.7.1 (swiftlang-5.7.1.135.3 clang-1400.0.29.51) +// swift-module-flags: -target arm64-apple-ios13.1-macabi -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -O -module-name OneSignalFramework +// swift-module-flags-ignorable: -enable-bare-slash-regex +import Foundation +import OneSignalCore +@_exported import OneSignalFramework +import OneSignalNotifications +import OneSignalOutcomes +import OneSignalUser +import Swift +import _Concurrency +import _StringProcessing +extension OneSignalFramework.OneSignal { + public static var User: OneSignalUser.OSUser { + get + } + public static var Notifications: OneSignalNotifications.OSNotifications.Type { + get + } + public static var Session: OneSignalOutcomes.OSSession.Type { + get + } + public static var InAppMessages: OneSignalCore.OSInAppMessages.Type { + get + } + public static var Debug: OneSignalCore.OSDebug.Type { + get + } + public static var Location: OneSignalCore.OSLocation.Type { + get + } + public static var LiveActivities: OneSignalFramework.OSLiveActivities.Type { + get + } +} +extension OneSignalCore.OSDebug { + public static func setAlertLevel(_ logLevel: OneSignalCore.ONE_S_LOG_LEVEL) +} +extension OneSignalCore.OSInAppMessages { + public static var paused: Swift.Bool { + get + set + } + public static func addLifecycleListener(_ listener: OneSignalCore.OSInAppMessageLifecycleListener) + public static func removeLifecycleListener(_ listener: OneSignalCore.OSInAppMessageLifecycleListener) + public static func addClickListener(_ listener: OneSignalCore.OSInAppMessageClickListener) + public static func removeClickListener(_ listener: OneSignalCore.OSInAppMessageClickListener) +} +extension OneSignalOutcomes.OSSession { + public static func addOutcome(_ name: Swift.String, _ value: Foundation.NSNumber) +} +extension OneSignalNotifications.OSNotifications { + public static var permission: Swift.Bool { + get + } + public static var canRequestPermission: Swift.Bool { + get + } + public static var permissionNative: OneSignalNotifications.OSNotificationPermission { + get + } + public static func registerForProvisionalAuthorization(_ block: OneSignalNotifications.OSUserResponseBlock?) + public static func addPermissionObserver(_ observer: OneSignalNotifications.OSNotificationPermissionObserver) + public static func removePermissionObserver(_ observer: OneSignalNotifications.OSNotificationPermissionObserver) + public static func addClickListener(_ listener: OneSignalNotifications.OSNotificationClickListener) + public static func removeClickListener(_ listener: OneSignalNotifications.OSNotificationClickListener) +} +extension OneSignalCore.OSLocation { + public static var isShared: Swift.Bool { + get + set + } +} diff --git a/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignalFramework.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalFramework.framework/Versions/A/Modules/OneSignalFramework.swiftmodule/x86_64-apple-ios-macabi.abi.json b/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignalFramework.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalFramework.framework/Versions/A/Modules/OneSignalFramework.swiftmodule/x86_64-apple-ios-macabi.abi.json new file mode 100644 index 000000000..8069d9ff4 --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignalFramework.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalFramework.framework/Versions/A/Modules/OneSignalFramework.swiftmodule/x86_64-apple-ios-macabi.abi.json @@ -0,0 +1,1261 @@ +{ + "ABIRoot": { + "kind": "Root", + "name": "TopLevel", + "printedName": "TopLevel", + "children": [ + { + "kind": "Import", + "name": "Foundation", + "printedName": "Foundation", + "declKind": "Import", + "moduleName": "OneSignalFramework", + "declAttributes": [ + "RawDocComment" + ] + }, + { + "kind": "Import", + "name": "OneSignalUser", + "printedName": "OneSignalUser", + "declKind": "Import", + "moduleName": "OneSignalFramework" + }, + { + "kind": "Import", + "name": "OneSignalOutcomes", + "printedName": "OneSignalOutcomes", + "declKind": "Import", + "moduleName": "OneSignalFramework" + }, + { + "kind": "Import", + "name": "OneSignalNotifications", + "printedName": "OneSignalNotifications", + "declKind": "Import", + "moduleName": "OneSignalFramework" + }, + { + "kind": "Import", + "name": "OneSignalCore", + "printedName": "OneSignalCore", + "declKind": "Import", + "moduleName": "OneSignalFramework" + }, + { + "kind": "TypeDecl", + "name": "OneSignal", + "printedName": "OneSignal", + "children": [ + { + "kind": "Var", + "name": "User", + "printedName": "User", + "children": [ + { + "kind": "TypeNominal", + "name": "OSUser", + "printedName": "OneSignalUser.OSUser", + "usr": "c:@M@OneSignalUser@objc(pl)OSUser" + } + ], + "declKind": "Var", + "usr": "s:So9OneSignalC0aB9FrameworkE4User0abD06OSUser_pvpZ", + "mangledName": "$sSo9OneSignalC0aB9FrameworkE4User0abD06OSUser_pvpZ", + "moduleName": "OneSignalFramework", + "static": true, + "declAttributes": [ + "Final" + ], + "isFromExtension": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "OSUser", + "printedName": "OneSignalUser.OSUser", + "usr": "c:@M@OneSignalUser@objc(pl)OSUser" + } + ], + "declKind": "Accessor", + "usr": "s:So9OneSignalC0aB9FrameworkE4User0abD06OSUser_pvgZ", + "mangledName": "$sSo9OneSignalC0aB9FrameworkE4User0abD06OSUser_pvgZ", + "moduleName": "OneSignalFramework", + "static": true, + "declAttributes": [ + "Final" + ], + "isFromExtension": true, + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "Notifications", + "printedName": "Notifications", + "children": [ + { + "kind": "TypeNominal", + "name": "ExistentialMetatype", + "printedName": "OneSignalNotifications.OSNotifications.Type", + "children": [ + { + "kind": "TypeNominal", + "name": "OSNotifications", + "printedName": "OneSignalNotifications.OSNotifications", + "usr": "c:objc(pl)OSNotifications" + } + ] + } + ], + "declKind": "Var", + "usr": "s:So9OneSignalC0aB9FrameworkE13NotificationsSo15OSNotifications_pXpvpZ", + "mangledName": "$sSo9OneSignalC0aB9FrameworkE13NotificationsSo15OSNotifications_pXpvpZ", + "moduleName": "OneSignalFramework", + "static": true, + "declAttributes": [ + "Final" + ], + "isFromExtension": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "ExistentialMetatype", + "printedName": "OneSignalNotifications.OSNotifications.Type", + "children": [ + { + "kind": "TypeNominal", + "name": "OSNotifications", + "printedName": "OneSignalNotifications.OSNotifications", + "usr": "c:objc(pl)OSNotifications" + } + ] + } + ], + "declKind": "Accessor", + "usr": "s:So9OneSignalC0aB9FrameworkE13NotificationsSo15OSNotifications_pXpvgZ", + "mangledName": "$sSo9OneSignalC0aB9FrameworkE13NotificationsSo15OSNotifications_pXpvgZ", + "moduleName": "OneSignalFramework", + "static": true, + "declAttributes": [ + "Final" + ], + "isFromExtension": true, + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "Session", + "printedName": "Session", + "children": [ + { + "kind": "TypeNominal", + "name": "ExistentialMetatype", + "printedName": "OneSignalOutcomes.OSSession.Type", + "children": [ + { + "kind": "TypeNominal", + "name": "OSSession", + "printedName": "OneSignalOutcomes.OSSession", + "usr": "c:objc(pl)OSSession" + } + ] + } + ], + "declKind": "Var", + "usr": "s:So9OneSignalC0aB9FrameworkE7SessionSo9OSSession_pXpvpZ", + "mangledName": "$sSo9OneSignalC0aB9FrameworkE7SessionSo9OSSession_pXpvpZ", + "moduleName": "OneSignalFramework", + "static": true, + "declAttributes": [ + "Final" + ], + "isFromExtension": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "ExistentialMetatype", + "printedName": "OneSignalOutcomes.OSSession.Type", + "children": [ + { + "kind": "TypeNominal", + "name": "OSSession", + "printedName": "OneSignalOutcomes.OSSession", + "usr": "c:objc(pl)OSSession" + } + ] + } + ], + "declKind": "Accessor", + "usr": "s:So9OneSignalC0aB9FrameworkE7SessionSo9OSSession_pXpvgZ", + "mangledName": "$sSo9OneSignalC0aB9FrameworkE7SessionSo9OSSession_pXpvgZ", + "moduleName": "OneSignalFramework", + "static": true, + "declAttributes": [ + "Final" + ], + "isFromExtension": true, + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "InAppMessages", + "printedName": "InAppMessages", + "children": [ + { + "kind": "TypeNominal", + "name": "ExistentialMetatype", + "printedName": "OneSignalCore.OSInAppMessages.Type", + "children": [ + { + "kind": "TypeNominal", + "name": "OSInAppMessages", + "printedName": "OneSignalCore.OSInAppMessages", + "usr": "c:objc(pl)OSInAppMessages" + } + ] + } + ], + "declKind": "Var", + "usr": "s:So9OneSignalC0aB9FrameworkE13InAppMessagesSo04OSIneF0_pXpvpZ", + "mangledName": "$sSo9OneSignalC0aB9FrameworkE13InAppMessagesSo04OSIneF0_pXpvpZ", + "moduleName": "OneSignalFramework", + "static": true, + "declAttributes": [ + "Final" + ], + "isFromExtension": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "ExistentialMetatype", + "printedName": "OneSignalCore.OSInAppMessages.Type", + "children": [ + { + "kind": "TypeNominal", + "name": "OSInAppMessages", + "printedName": "OneSignalCore.OSInAppMessages", + "usr": "c:objc(pl)OSInAppMessages" + } + ] + } + ], + "declKind": "Accessor", + "usr": "s:So9OneSignalC0aB9FrameworkE13InAppMessagesSo04OSIneF0_pXpvgZ", + "mangledName": "$sSo9OneSignalC0aB9FrameworkE13InAppMessagesSo04OSIneF0_pXpvgZ", + "moduleName": "OneSignalFramework", + "static": true, + "declAttributes": [ + "Final" + ], + "isFromExtension": true, + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "Debug", + "printedName": "Debug", + "children": [ + { + "kind": "TypeNominal", + "name": "ExistentialMetatype", + "printedName": "OneSignalCore.OSDebug.Type", + "children": [ + { + "kind": "TypeNominal", + "name": "OSDebug", + "printedName": "OneSignalCore.OSDebug", + "usr": "c:objc(pl)OSDebug" + } + ] + } + ], + "declKind": "Var", + "usr": "s:So9OneSignalC0aB9FrameworkE5DebugSo7OSDebug_pXpvpZ", + "mangledName": "$sSo9OneSignalC0aB9FrameworkE5DebugSo7OSDebug_pXpvpZ", + "moduleName": "OneSignalFramework", + "static": true, + "declAttributes": [ + "Final" + ], + "isFromExtension": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "ExistentialMetatype", + "printedName": "OneSignalCore.OSDebug.Type", + "children": [ + { + "kind": "TypeNominal", + "name": "OSDebug", + "printedName": "OneSignalCore.OSDebug", + "usr": "c:objc(pl)OSDebug" + } + ] + } + ], + "declKind": "Accessor", + "usr": "s:So9OneSignalC0aB9FrameworkE5DebugSo7OSDebug_pXpvgZ", + "mangledName": "$sSo9OneSignalC0aB9FrameworkE5DebugSo7OSDebug_pXpvgZ", + "moduleName": "OneSignalFramework", + "static": true, + "declAttributes": [ + "Final" + ], + "isFromExtension": true, + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "Location", + "printedName": "Location", + "children": [ + { + "kind": "TypeNominal", + "name": "ExistentialMetatype", + "printedName": "OneSignalCore.OSLocation.Type", + "children": [ + { + "kind": "TypeNominal", + "name": "OSLocation", + "printedName": "OneSignalCore.OSLocation", + "usr": "c:objc(pl)OSLocation" + } + ] + } + ], + "declKind": "Var", + "usr": "s:So9OneSignalC0aB9FrameworkE8LocationSo10OSLocation_pXpvpZ", + "mangledName": "$sSo9OneSignalC0aB9FrameworkE8LocationSo10OSLocation_pXpvpZ", + "moduleName": "OneSignalFramework", + "static": true, + "declAttributes": [ + "Final" + ], + "isFromExtension": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "ExistentialMetatype", + "printedName": "OneSignalCore.OSLocation.Type", + "children": [ + { + "kind": "TypeNominal", + "name": "OSLocation", + "printedName": "OneSignalCore.OSLocation", + "usr": "c:objc(pl)OSLocation" + } + ] + } + ], + "declKind": "Accessor", + "usr": "s:So9OneSignalC0aB9FrameworkE8LocationSo10OSLocation_pXpvgZ", + "mangledName": "$sSo9OneSignalC0aB9FrameworkE8LocationSo10OSLocation_pXpvgZ", + "moduleName": "OneSignalFramework", + "static": true, + "declAttributes": [ + "Final" + ], + "isFromExtension": true, + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "LiveActivities", + "printedName": "LiveActivities", + "children": [ + { + "kind": "TypeNominal", + "name": "ExistentialMetatype", + "printedName": "OneSignalFramework.OSLiveActivities.Type", + "children": [ + { + "kind": "TypeNominal", + "name": "OSLiveActivities", + "printedName": "OneSignalFramework.OSLiveActivities", + "usr": "c:objc(pl)OSLiveActivities" + } + ] + } + ], + "declKind": "Var", + "usr": "s:So9OneSignalC0aB9FrameworkE14LiveActivitiesSo06OSLiveE0_pXpvpZ", + "mangledName": "$sSo9OneSignalC0aB9FrameworkE14LiveActivitiesSo06OSLiveE0_pXpvpZ", + "moduleName": "OneSignalFramework", + "static": true, + "declAttributes": [ + "Final" + ], + "isFromExtension": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "ExistentialMetatype", + "printedName": "OneSignalFramework.OSLiveActivities.Type", + "children": [ + { + "kind": "TypeNominal", + "name": "OSLiveActivities", + "printedName": "OneSignalFramework.OSLiveActivities", + "usr": "c:objc(pl)OSLiveActivities" + } + ] + } + ], + "declKind": "Accessor", + "usr": "s:So9OneSignalC0aB9FrameworkE14LiveActivitiesSo06OSLiveE0_pXpvgZ", + "mangledName": "$sSo9OneSignalC0aB9FrameworkE14LiveActivitiesSo06OSLiveE0_pXpvgZ", + "moduleName": "OneSignalFramework", + "static": true, + "declAttributes": [ + "Final" + ], + "isFromExtension": true, + "accessorKind": "get" + } + ] + } + ], + "declKind": "Class", + "usr": "c:objc(cs)OneSignal", + "moduleName": "OneSignalFramework", + "isOpen": true, + "objc_name": "OneSignal", + "declAttributes": [ + "ObjC", + "Dynamic" + ], + "superclassUsr": "c:objc(cs)NSObject", + "isExternal": true, + "inheritsConvenienceInitializers": true, + "superclassNames": [ + "ObjectiveC.NSObject" + ], + "conformances": [ + { + "kind": "Conformance", + "name": "Equatable", + "printedName": "Equatable", + "usr": "s:SQ", + "mangledName": "$sSQ" + }, + { + "kind": "Conformance", + "name": "Hashable", + "printedName": "Hashable", + "usr": "s:SH", + "mangledName": "$sSH" + }, + { + "kind": "Conformance", + "name": "CVarArg", + "printedName": "CVarArg", + "usr": "s:s7CVarArgP", + "mangledName": "$ss7CVarArgP" + }, + { + "kind": "Conformance", + "name": "_KeyValueCodingAndObservingPublishing", + "printedName": "_KeyValueCodingAndObservingPublishing", + "usr": "s:10Foundation37_KeyValueCodingAndObservingPublishingP", + "mangledName": "$s10Foundation37_KeyValueCodingAndObservingPublishingP" + }, + { + "kind": "Conformance", + "name": "_KeyValueCodingAndObserving", + "printedName": "_KeyValueCodingAndObserving", + "usr": "s:10Foundation27_KeyValueCodingAndObservingP", + "mangledName": "$s10Foundation27_KeyValueCodingAndObservingP" + }, + { + "kind": "Conformance", + "name": "CustomStringConvertible", + "printedName": "CustomStringConvertible", + "usr": "s:s23CustomStringConvertibleP", + "mangledName": "$ss23CustomStringConvertibleP" + }, + { + "kind": "Conformance", + "name": "CustomDebugStringConvertible", + "printedName": "CustomDebugStringConvertible", + "usr": "s:s28CustomDebugStringConvertibleP", + "mangledName": "$ss28CustomDebugStringConvertibleP" + } + ] + }, + { + "kind": "TypeDecl", + "name": "OSDebug", + "printedName": "OSDebug", + "children": [ + { + "kind": "Function", + "name": "setAlertLevel", + "printedName": "setAlertLevel(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "ONE_S_LOG_LEVEL", + "printedName": "OneSignalCore.ONE_S_LOG_LEVEL", + "usr": "c:@E@ONE_S_LOG_LEVEL" + } + ], + "declKind": "Func", + "usr": "s:So7OSDebugP18OneSignalFrameworkE13setAlertLevelyySo15ONE_S_LOG_LEVELVFZ", + "mangledName": "$sSo7OSDebugP18OneSignalFrameworkE13setAlertLevelyySo15ONE_S_LOG_LEVELVFZ", + "moduleName": "OneSignalFramework", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalCore.OSDebug>", + "sugared_genericSig": "", + "static": true, + "isFromExtension": true, + "funcSelfKind": "NonMutating" + } + ], + "declKind": "Protocol", + "usr": "c:objc(pl)OSDebug", + "moduleName": "OneSignalCore", + "genericSig": "<τ_0_0 : ObjectiveC.NSObjectProtocol>", + "sugared_genericSig": "", + "objc_name": "OSDebug", + "declAttributes": [ + "ObjC", + "Dynamic" + ], + "isExternal": true + }, + { + "kind": "TypeDecl", + "name": "OSInAppMessages", + "printedName": "OSInAppMessages", + "children": [ + { + "kind": "Var", + "name": "paused", + "printedName": "paused", + "children": [ + { + "kind": "TypeNominal", + "name": "Bool", + "printedName": "Swift.Bool", + "usr": "s:Sb" + } + ], + "declKind": "Var", + "usr": "s:So15OSInAppMessagesP18OneSignalFrameworkE6pausedSbvpZ", + "mangledName": "$sSo15OSInAppMessagesP18OneSignalFrameworkE6pausedSbvpZ", + "moduleName": "OneSignalFramework", + "static": true, + "isFromExtension": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "Bool", + "printedName": "Swift.Bool", + "usr": "s:Sb" + } + ], + "declKind": "Accessor", + "usr": "s:So15OSInAppMessagesP18OneSignalFrameworkE6pausedSbvgZ", + "mangledName": "$sSo15OSInAppMessagesP18OneSignalFrameworkE6pausedSbvgZ", + "moduleName": "OneSignalFramework", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalCore.OSInAppMessages>", + "sugared_genericSig": "", + "static": true, + "isFromExtension": true, + "accessorKind": "get" + }, + { + "kind": "Accessor", + "name": "Set", + "printedName": "Set()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "Bool", + "printedName": "Swift.Bool", + "usr": "s:Sb" + } + ], + "declKind": "Accessor", + "usr": "s:So15OSInAppMessagesP18OneSignalFrameworkE6pausedSbvsZ", + "mangledName": "$sSo15OSInAppMessagesP18OneSignalFrameworkE6pausedSbvsZ", + "moduleName": "OneSignalFramework", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalCore.OSInAppMessages>", + "sugared_genericSig": "", + "static": true, + "isFromExtension": true, + "accessorKind": "set" + }, + { + "kind": "Accessor", + "name": "Modify", + "printedName": "Modify()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + } + ], + "declKind": "Accessor", + "usr": "s:So15OSInAppMessagesP18OneSignalFrameworkE6pausedSbvMZ", + "mangledName": "$sSo15OSInAppMessagesP18OneSignalFrameworkE6pausedSbvMZ", + "moduleName": "OneSignalFramework", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalCore.OSInAppMessages>", + "sugared_genericSig": "", + "static": true, + "implicit": true, + "isFromExtension": true, + "accessorKind": "_modify" + } + ] + }, + { + "kind": "Function", + "name": "addLifecycleListener", + "printedName": "addLifecycleListener(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "OSInAppMessageLifecycleListener", + "printedName": "OneSignalCore.OSInAppMessageLifecycleListener", + "usr": "c:objc(pl)OSInAppMessageLifecycleListener" + } + ], + "declKind": "Func", + "usr": "s:So15OSInAppMessagesP18OneSignalFrameworkE20addLifecycleListeneryySo0ab7MessagehI0_pFZ", + "mangledName": "$sSo15OSInAppMessagesP18OneSignalFrameworkE20addLifecycleListeneryySo0ab7MessagehI0_pFZ", + "moduleName": "OneSignalFramework", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalCore.OSInAppMessages>", + "sugared_genericSig": "", + "static": true, + "isFromExtension": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "removeLifecycleListener", + "printedName": "removeLifecycleListener(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "OSInAppMessageLifecycleListener", + "printedName": "OneSignalCore.OSInAppMessageLifecycleListener", + "usr": "c:objc(pl)OSInAppMessageLifecycleListener" + } + ], + "declKind": "Func", + "usr": "s:So15OSInAppMessagesP18OneSignalFrameworkE23removeLifecycleListeneryySo0ab7MessagehI0_pFZ", + "mangledName": "$sSo15OSInAppMessagesP18OneSignalFrameworkE23removeLifecycleListeneryySo0ab7MessagehI0_pFZ", + "moduleName": "OneSignalFramework", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalCore.OSInAppMessages>", + "sugared_genericSig": "", + "static": true, + "isFromExtension": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "addClickListener", + "printedName": "addClickListener(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "OSInAppMessageClickListener", + "printedName": "OneSignalCore.OSInAppMessageClickListener", + "usr": "c:objc(pl)OSInAppMessageClickListener" + } + ], + "declKind": "Func", + "usr": "s:So15OSInAppMessagesP18OneSignalFrameworkE16addClickListeneryySo0ab7MessagehI0_pFZ", + "mangledName": "$sSo15OSInAppMessagesP18OneSignalFrameworkE16addClickListeneryySo0ab7MessagehI0_pFZ", + "moduleName": "OneSignalFramework", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalCore.OSInAppMessages>", + "sugared_genericSig": "", + "static": true, + "isFromExtension": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "removeClickListener", + "printedName": "removeClickListener(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "OSInAppMessageClickListener", + "printedName": "OneSignalCore.OSInAppMessageClickListener", + "usr": "c:objc(pl)OSInAppMessageClickListener" + } + ], + "declKind": "Func", + "usr": "s:So15OSInAppMessagesP18OneSignalFrameworkE19removeClickListeneryySo0ab7MessagehI0_pFZ", + "mangledName": "$sSo15OSInAppMessagesP18OneSignalFrameworkE19removeClickListeneryySo0ab7MessagehI0_pFZ", + "moduleName": "OneSignalFramework", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalCore.OSInAppMessages>", + "sugared_genericSig": "", + "static": true, + "isFromExtension": true, + "funcSelfKind": "NonMutating" + } + ], + "declKind": "Protocol", + "usr": "c:objc(pl)OSInAppMessages", + "moduleName": "OneSignalCore", + "genericSig": "<τ_0_0 : ObjectiveC.NSObjectProtocol>", + "sugared_genericSig": "", + "objc_name": "OSInAppMessages", + "declAttributes": [ + "ObjC", + "Dynamic" + ], + "isExternal": true + }, + { + "kind": "TypeDecl", + "name": "OSSession", + "printedName": "OSSession", + "children": [ + { + "kind": "Function", + "name": "addOutcome", + "printedName": "addOutcome(_:_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + }, + { + "kind": "TypeNominal", + "name": "NSNumber", + "printedName": "Foundation.NSNumber", + "usr": "c:objc(cs)NSNumber" + } + ], + "declKind": "Func", + "usr": "s:So9OSSessionP18OneSignalFrameworkE10addOutcomeyySS_So8NSNumberCtFZ", + "mangledName": "$sSo9OSSessionP18OneSignalFrameworkE10addOutcomeyySS_So8NSNumberCtFZ", + "moduleName": "OneSignalFramework", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalOutcomes.OSSession>", + "sugared_genericSig": "", + "static": true, + "isFromExtension": true, + "funcSelfKind": "NonMutating" + } + ], + "declKind": "Protocol", + "usr": "c:objc(pl)OSSession", + "moduleName": "OneSignalOutcomes", + "genericSig": "<τ_0_0 : ObjectiveC.NSObjectProtocol>", + "sugared_genericSig": "", + "objc_name": "OSSession", + "declAttributes": [ + "ObjC", + "Dynamic" + ], + "isExternal": true + }, + { + "kind": "TypeDecl", + "name": "OSNotifications", + "printedName": "OSNotifications", + "children": [ + { + "kind": "Var", + "name": "permission", + "printedName": "permission", + "children": [ + { + "kind": "TypeNominal", + "name": "Bool", + "printedName": "Swift.Bool", + "usr": "s:Sb" + } + ], + "declKind": "Var", + "usr": "s:So15OSNotificationsP18OneSignalFrameworkE10permissionSbvpZ", + "mangledName": "$sSo15OSNotificationsP18OneSignalFrameworkE10permissionSbvpZ", + "moduleName": "OneSignalFramework", + "static": true, + "isFromExtension": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "Bool", + "printedName": "Swift.Bool", + "usr": "s:Sb" + } + ], + "declKind": "Accessor", + "usr": "s:So15OSNotificationsP18OneSignalFrameworkE10permissionSbvgZ", + "mangledName": "$sSo15OSNotificationsP18OneSignalFrameworkE10permissionSbvgZ", + "moduleName": "OneSignalFramework", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalNotifications.OSNotifications>", + "sugared_genericSig": "", + "static": true, + "isFromExtension": true, + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "canRequestPermission", + "printedName": "canRequestPermission", + "children": [ + { + "kind": "TypeNominal", + "name": "Bool", + "printedName": "Swift.Bool", + "usr": "s:Sb" + } + ], + "declKind": "Var", + "usr": "s:So15OSNotificationsP18OneSignalFrameworkE20canRequestPermissionSbvpZ", + "mangledName": "$sSo15OSNotificationsP18OneSignalFrameworkE20canRequestPermissionSbvpZ", + "moduleName": "OneSignalFramework", + "static": true, + "isFromExtension": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "Bool", + "printedName": "Swift.Bool", + "usr": "s:Sb" + } + ], + "declKind": "Accessor", + "usr": "s:So15OSNotificationsP18OneSignalFrameworkE20canRequestPermissionSbvgZ", + "mangledName": "$sSo15OSNotificationsP18OneSignalFrameworkE20canRequestPermissionSbvgZ", + "moduleName": "OneSignalFramework", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalNotifications.OSNotifications>", + "sugared_genericSig": "", + "static": true, + "isFromExtension": true, + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "permissionNative", + "printedName": "permissionNative", + "children": [ + { + "kind": "TypeNominal", + "name": "OSNotificationPermission", + "printedName": "OneSignalNotifications.OSNotificationPermission", + "usr": "c:@E@OSNotificationPermission" + } + ], + "declKind": "Var", + "usr": "s:So15OSNotificationsP18OneSignalFrameworkE16permissionNativeSo24OSNotificationPermissionVvpZ", + "mangledName": "$sSo15OSNotificationsP18OneSignalFrameworkE16permissionNativeSo24OSNotificationPermissionVvpZ", + "moduleName": "OneSignalFramework", + "static": true, + "isFromExtension": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "OSNotificationPermission", + "printedName": "OneSignalNotifications.OSNotificationPermission", + "usr": "c:@E@OSNotificationPermission" + } + ], + "declKind": "Accessor", + "usr": "s:So15OSNotificationsP18OneSignalFrameworkE16permissionNativeSo24OSNotificationPermissionVvgZ", + "mangledName": "$sSo15OSNotificationsP18OneSignalFrameworkE16permissionNativeSo24OSNotificationPermissionVvgZ", + "moduleName": "OneSignalFramework", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalNotifications.OSNotifications>", + "sugared_genericSig": "", + "static": true, + "isFromExtension": true, + "accessorKind": "get" + } + ] + }, + { + "kind": "Function", + "name": "registerForProvisionalAuthorization", + "printedName": "registerForProvisionalAuthorization(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "((Swift.Bool) -> ())?", + "children": [ + { + "kind": "TypeFunc", + "name": "Function", + "printedName": "(Swift.Bool) -> ()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "Bool", + "printedName": "Swift.Bool", + "usr": "s:Sb" + } + ] + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Func", + "usr": "s:So15OSNotificationsP18OneSignalFrameworkE35registerForProvisionalAuthorizationyyySbcSgFZ", + "mangledName": "$sSo15OSNotificationsP18OneSignalFrameworkE35registerForProvisionalAuthorizationyyySbcSgFZ", + "moduleName": "OneSignalFramework", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalNotifications.OSNotifications>", + "sugared_genericSig": "", + "static": true, + "isFromExtension": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "addPermissionObserver", + "printedName": "addPermissionObserver(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "OSNotificationPermissionObserver", + "printedName": "OneSignalNotifications.OSNotificationPermissionObserver", + "usr": "c:objc(pl)OSNotificationPermissionObserver" + } + ], + "declKind": "Func", + "usr": "s:So15OSNotificationsP18OneSignalFrameworkE21addPermissionObserveryySo014OSNotificationfG0_pFZ", + "mangledName": "$sSo15OSNotificationsP18OneSignalFrameworkE21addPermissionObserveryySo014OSNotificationfG0_pFZ", + "moduleName": "OneSignalFramework", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalNotifications.OSNotifications>", + "sugared_genericSig": "", + "static": true, + "isFromExtension": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "removePermissionObserver", + "printedName": "removePermissionObserver(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "OSNotificationPermissionObserver", + "printedName": "OneSignalNotifications.OSNotificationPermissionObserver", + "usr": "c:objc(pl)OSNotificationPermissionObserver" + } + ], + "declKind": "Func", + "usr": "s:So15OSNotificationsP18OneSignalFrameworkE24removePermissionObserveryySo014OSNotificationfG0_pFZ", + "mangledName": "$sSo15OSNotificationsP18OneSignalFrameworkE24removePermissionObserveryySo014OSNotificationfG0_pFZ", + "moduleName": "OneSignalFramework", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalNotifications.OSNotifications>", + "sugared_genericSig": "", + "static": true, + "isFromExtension": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "addClickListener", + "printedName": "addClickListener(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "OSNotificationClickListener", + "printedName": "OneSignalNotifications.OSNotificationClickListener", + "usr": "c:objc(pl)OSNotificationClickListener" + } + ], + "declKind": "Func", + "usr": "s:So15OSNotificationsP18OneSignalFrameworkE16addClickListeneryySo014OSNotificationfG0_pFZ", + "mangledName": "$sSo15OSNotificationsP18OneSignalFrameworkE16addClickListeneryySo014OSNotificationfG0_pFZ", + "moduleName": "OneSignalFramework", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalNotifications.OSNotifications>", + "sugared_genericSig": "", + "static": true, + "isFromExtension": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "removeClickListener", + "printedName": "removeClickListener(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "OSNotificationClickListener", + "printedName": "OneSignalNotifications.OSNotificationClickListener", + "usr": "c:objc(pl)OSNotificationClickListener" + } + ], + "declKind": "Func", + "usr": "s:So15OSNotificationsP18OneSignalFrameworkE19removeClickListeneryySo014OSNotificationfG0_pFZ", + "mangledName": "$sSo15OSNotificationsP18OneSignalFrameworkE19removeClickListeneryySo014OSNotificationfG0_pFZ", + "moduleName": "OneSignalFramework", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalNotifications.OSNotifications>", + "sugared_genericSig": "", + "static": true, + "isFromExtension": true, + "funcSelfKind": "NonMutating" + } + ], + "declKind": "Protocol", + "usr": "c:objc(pl)OSNotifications", + "moduleName": "OneSignalNotifications", + "genericSig": "<τ_0_0 : ObjectiveC.NSObjectProtocol>", + "sugared_genericSig": "", + "objc_name": "OSNotifications", + "declAttributes": [ + "ObjC", + "Dynamic" + ], + "isExternal": true + }, + { + "kind": "TypeDecl", + "name": "OSLocation", + "printedName": "OSLocation", + "children": [ + { + "kind": "Var", + "name": "isShared", + "printedName": "isShared", + "children": [ + { + "kind": "TypeNominal", + "name": "Bool", + "printedName": "Swift.Bool", + "usr": "s:Sb" + } + ], + "declKind": "Var", + "usr": "s:So10OSLocationP18OneSignalFrameworkE8isSharedSbvpZ", + "mangledName": "$sSo10OSLocationP18OneSignalFrameworkE8isSharedSbvpZ", + "moduleName": "OneSignalFramework", + "static": true, + "isFromExtension": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "Bool", + "printedName": "Swift.Bool", + "usr": "s:Sb" + } + ], + "declKind": "Accessor", + "usr": "s:So10OSLocationP18OneSignalFrameworkE8isSharedSbvgZ", + "mangledName": "$sSo10OSLocationP18OneSignalFrameworkE8isSharedSbvgZ", + "moduleName": "OneSignalFramework", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalCore.OSLocation>", + "sugared_genericSig": "", + "static": true, + "isFromExtension": true, + "accessorKind": "get" + }, + { + "kind": "Accessor", + "name": "Set", + "printedName": "Set()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "Bool", + "printedName": "Swift.Bool", + "usr": "s:Sb" + } + ], + "declKind": "Accessor", + "usr": "s:So10OSLocationP18OneSignalFrameworkE8isSharedSbvsZ", + "mangledName": "$sSo10OSLocationP18OneSignalFrameworkE8isSharedSbvsZ", + "moduleName": "OneSignalFramework", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalCore.OSLocation>", + "sugared_genericSig": "", + "static": true, + "isFromExtension": true, + "accessorKind": "set" + }, + { + "kind": "Accessor", + "name": "Modify", + "printedName": "Modify()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + } + ], + "declKind": "Accessor", + "usr": "s:So10OSLocationP18OneSignalFrameworkE8isSharedSbvMZ", + "mangledName": "$sSo10OSLocationP18OneSignalFrameworkE8isSharedSbvMZ", + "moduleName": "OneSignalFramework", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalCore.OSLocation>", + "sugared_genericSig": "", + "static": true, + "implicit": true, + "isFromExtension": true, + "accessorKind": "_modify" + } + ] + } + ], + "declKind": "Protocol", + "usr": "c:objc(pl)OSLocation", + "moduleName": "OneSignalCore", + "genericSig": "<τ_0_0 : ObjectiveC.NSObjectProtocol>", + "sugared_genericSig": "", + "objc_name": "OSLocation", + "declAttributes": [ + "ObjC", + "Dynamic" + ], + "isExternal": true + } + ], + "json_format_version": 8 + }, + "ConstValues": [] +} \ No newline at end of file diff --git a/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignalFramework.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalFramework.framework/Versions/A/Modules/OneSignalFramework.swiftmodule/x86_64-apple-ios-macabi.private.swiftinterface b/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignalFramework.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalFramework.framework/Versions/A/Modules/OneSignalFramework.swiftmodule/x86_64-apple-ios-macabi.private.swiftinterface new file mode 100644 index 000000000..503ad7be9 --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignalFramework.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalFramework.framework/Versions/A/Modules/OneSignalFramework.swiftmodule/x86_64-apple-ios-macabi.private.swiftinterface @@ -0,0 +1,74 @@ +// swift-interface-format-version: 1.0 +// swift-compiler-version: Apple Swift version 5.7.1 (swiftlang-5.7.1.135.3 clang-1400.0.29.51) +// swift-module-flags: -target x86_64-apple-ios13.1-macabi -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -O -module-name OneSignalFramework +// swift-module-flags-ignorable: -enable-bare-slash-regex +import Foundation +import OneSignalCore +@_exported import OneSignalFramework +import OneSignalNotifications +import OneSignalOutcomes +import OneSignalUser +import Swift +import _Concurrency +import _StringProcessing +extension OneSignalFramework.OneSignal { + public static var User: OneSignalUser.OSUser { + get + } + public static var Notifications: OneSignalNotifications.OSNotifications.Type { + get + } + public static var Session: OneSignalOutcomes.OSSession.Type { + get + } + public static var InAppMessages: OneSignalCore.OSInAppMessages.Type { + get + } + public static var Debug: OneSignalCore.OSDebug.Type { + get + } + public static var Location: OneSignalCore.OSLocation.Type { + get + } + public static var LiveActivities: OneSignalFramework.OSLiveActivities.Type { + get + } +} +extension OneSignalCore.OSDebug { + public static func setAlertLevel(_ logLevel: OneSignalCore.ONE_S_LOG_LEVEL) +} +extension OneSignalCore.OSInAppMessages { + public static var paused: Swift.Bool { + get + set + } + public static func addLifecycleListener(_ listener: OneSignalCore.OSInAppMessageLifecycleListener) + public static func removeLifecycleListener(_ listener: OneSignalCore.OSInAppMessageLifecycleListener) + public static func addClickListener(_ listener: OneSignalCore.OSInAppMessageClickListener) + public static func removeClickListener(_ listener: OneSignalCore.OSInAppMessageClickListener) +} +extension OneSignalOutcomes.OSSession { + public static func addOutcome(_ name: Swift.String, _ value: Foundation.NSNumber) +} +extension OneSignalNotifications.OSNotifications { + public static var permission: Swift.Bool { + get + } + public static var canRequestPermission: Swift.Bool { + get + } + public static var permissionNative: OneSignalNotifications.OSNotificationPermission { + get + } + public static func registerForProvisionalAuthorization(_ block: OneSignalNotifications.OSUserResponseBlock?) + public static func addPermissionObserver(_ observer: OneSignalNotifications.OSNotificationPermissionObserver) + public static func removePermissionObserver(_ observer: OneSignalNotifications.OSNotificationPermissionObserver) + public static func addClickListener(_ listener: OneSignalNotifications.OSNotificationClickListener) + public static func removeClickListener(_ listener: OneSignalNotifications.OSNotificationClickListener) +} +extension OneSignalCore.OSLocation { + public static var isShared: Swift.Bool { + get + set + } +} diff --git a/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignalFramework.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalFramework.framework/Versions/A/Modules/OneSignalFramework.swiftmodule/x86_64-apple-ios-macabi.swiftdoc b/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignalFramework.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalFramework.framework/Versions/A/Modules/OneSignalFramework.swiftmodule/x86_64-apple-ios-macabi.swiftdoc new file mode 100644 index 000000000..2b5efdc54 Binary files /dev/null and b/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignalFramework.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalFramework.framework/Versions/A/Modules/OneSignalFramework.swiftmodule/x86_64-apple-ios-macabi.swiftdoc differ diff --git a/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignalFramework.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalFramework.framework/Versions/A/Modules/OneSignalFramework.swiftmodule/x86_64-apple-ios-macabi.swiftinterface b/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignalFramework.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalFramework.framework/Versions/A/Modules/OneSignalFramework.swiftmodule/x86_64-apple-ios-macabi.swiftinterface new file mode 100644 index 000000000..503ad7be9 --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignalFramework.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalFramework.framework/Versions/A/Modules/OneSignalFramework.swiftmodule/x86_64-apple-ios-macabi.swiftinterface @@ -0,0 +1,74 @@ +// swift-interface-format-version: 1.0 +// swift-compiler-version: Apple Swift version 5.7.1 (swiftlang-5.7.1.135.3 clang-1400.0.29.51) +// swift-module-flags: -target x86_64-apple-ios13.1-macabi -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -O -module-name OneSignalFramework +// swift-module-flags-ignorable: -enable-bare-slash-regex +import Foundation +import OneSignalCore +@_exported import OneSignalFramework +import OneSignalNotifications +import OneSignalOutcomes +import OneSignalUser +import Swift +import _Concurrency +import _StringProcessing +extension OneSignalFramework.OneSignal { + public static var User: OneSignalUser.OSUser { + get + } + public static var Notifications: OneSignalNotifications.OSNotifications.Type { + get + } + public static var Session: OneSignalOutcomes.OSSession.Type { + get + } + public static var InAppMessages: OneSignalCore.OSInAppMessages.Type { + get + } + public static var Debug: OneSignalCore.OSDebug.Type { + get + } + public static var Location: OneSignalCore.OSLocation.Type { + get + } + public static var LiveActivities: OneSignalFramework.OSLiveActivities.Type { + get + } +} +extension OneSignalCore.OSDebug { + public static func setAlertLevel(_ logLevel: OneSignalCore.ONE_S_LOG_LEVEL) +} +extension OneSignalCore.OSInAppMessages { + public static var paused: Swift.Bool { + get + set + } + public static func addLifecycleListener(_ listener: OneSignalCore.OSInAppMessageLifecycleListener) + public static func removeLifecycleListener(_ listener: OneSignalCore.OSInAppMessageLifecycleListener) + public static func addClickListener(_ listener: OneSignalCore.OSInAppMessageClickListener) + public static func removeClickListener(_ listener: OneSignalCore.OSInAppMessageClickListener) +} +extension OneSignalOutcomes.OSSession { + public static func addOutcome(_ name: Swift.String, _ value: Foundation.NSNumber) +} +extension OneSignalNotifications.OSNotifications { + public static var permission: Swift.Bool { + get + } + public static var canRequestPermission: Swift.Bool { + get + } + public static var permissionNative: OneSignalNotifications.OSNotificationPermission { + get + } + public static func registerForProvisionalAuthorization(_ block: OneSignalNotifications.OSUserResponseBlock?) + public static func addPermissionObserver(_ observer: OneSignalNotifications.OSNotificationPermissionObserver) + public static func removePermissionObserver(_ observer: OneSignalNotifications.OSNotificationPermissionObserver) + public static func addClickListener(_ listener: OneSignalNotifications.OSNotificationClickListener) + public static func removeClickListener(_ listener: OneSignalNotifications.OSNotificationClickListener) +} +extension OneSignalCore.OSLocation { + public static var isShared: Swift.Bool { + get + set + } +} diff --git a/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignalFramework.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalFramework.framework/Versions/A/Modules/module.modulemap b/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignalFramework.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalFramework.framework/Versions/A/Modules/module.modulemap new file mode 100644 index 000000000..fc1a467a1 --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignalFramework.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalFramework.framework/Versions/A/Modules/module.modulemap @@ -0,0 +1,11 @@ +framework module OneSignalFramework { + umbrella header "OneSignalFramework.h" + + export * + module * { export * } +} + +module OneSignalFramework.Swift { + header "OneSignalFramework-Swift.h" + requires objc +} diff --git a/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignalFramework.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalFramework.framework/Versions/A/OneSignalFramework b/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignalFramework.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalFramework.framework/Versions/A/OneSignalFramework new file mode 100755 index 000000000..44e8b96eb Binary files /dev/null and b/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignalFramework.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalFramework.framework/Versions/A/OneSignalFramework differ diff --git a/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignal.xcframework/ios-arm64_x86_64-maccatalyst/OneSignal.framework/Versions/A/Resources/Info.plist b/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignalFramework.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalFramework.framework/Versions/A/Resources/Info.plist similarity index 92% rename from iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignal.xcframework/ios-arm64_x86_64-maccatalyst/OneSignal.framework/Versions/A/Resources/Info.plist rename to iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignalFramework.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalFramework.framework/Versions/A/Resources/Info.plist index 2db21e3d3..2f087683f 100644 --- a/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignal.xcframework/ios-arm64_x86_64-maccatalyst/OneSignal.framework/Versions/A/Resources/Info.plist +++ b/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignalFramework.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalFramework.framework/Versions/A/Resources/Info.plist @@ -3,17 +3,17 @@ BuildMachineOSBuild - 22G90 + 22G91 CFBundleDevelopmentRegion en CFBundleExecutable - OneSignal + OneSignalFramework CFBundleIdentifier com.onesignal.OneSignal-Dynamic CFBundleInfoDictionaryVersion 6.0 CFBundleName - OneSignal + OneSignalFramework CFBundlePackageType FMWK CFBundleShortVersionString diff --git a/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignalFramework.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalFramework.framework/Versions/Current b/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignalFramework.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalFramework.framework/Versions/Current new file mode 120000 index 000000000..8c7e5a667 --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignalFramework.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalFramework.framework/Versions/Current @@ -0,0 +1 @@ +A \ No newline at end of file diff --git a/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignalFramework.xcframework/ios-arm64_x86_64-simulator/OneSignalFramework.framework/Headers/OneSignalFramework-Swift.h b/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignalFramework.xcframework/ios-arm64_x86_64-simulator/OneSignalFramework.framework/Headers/OneSignalFramework-Swift.h new file mode 100644 index 000000000..205508631 --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignalFramework.xcframework/ios-arm64_x86_64-simulator/OneSignalFramework.framework/Headers/OneSignalFramework-Swift.h @@ -0,0 +1,526 @@ +#if 0 +#elif defined(__arm64__) && __arm64__ +// Generated by Apple Swift version 5.7.1 (swiftlang-5.7.1.135.3 clang-1400.0.29.51) +#ifndef ONESIGNALFRAMEWORK_SWIFT_H +#define ONESIGNALFRAMEWORK_SWIFT_H +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wgcc-compat" + +#if !defined(__has_include) +# define __has_include(x) 0 +#endif +#if !defined(__has_attribute) +# define __has_attribute(x) 0 +#endif +#if !defined(__has_feature) +# define __has_feature(x) 0 +#endif +#if !defined(__has_warning) +# define __has_warning(x) 0 +#endif + +#if __has_include() +# include +#endif + +#pragma clang diagnostic ignored "-Wduplicate-method-match" +#pragma clang diagnostic ignored "-Wauto-import" +#if defined(__OBJC__) +#include +#endif +#if defined(__cplusplus) +#include +#include +#include +#else +#include +#include +#include +#endif + +#if !defined(SWIFT_TYPEDEFS) +# define SWIFT_TYPEDEFS 1 +# if __has_include() +# include +# elif !defined(__cplusplus) +typedef uint_least16_t char16_t; +typedef uint_least32_t char32_t; +# endif +typedef float swift_float2 __attribute__((__ext_vector_type__(2))); +typedef float swift_float3 __attribute__((__ext_vector_type__(3))); +typedef float swift_float4 __attribute__((__ext_vector_type__(4))); +typedef double swift_double2 __attribute__((__ext_vector_type__(2))); +typedef double swift_double3 __attribute__((__ext_vector_type__(3))); +typedef double swift_double4 __attribute__((__ext_vector_type__(4))); +typedef int swift_int2 __attribute__((__ext_vector_type__(2))); +typedef int swift_int3 __attribute__((__ext_vector_type__(3))); +typedef int swift_int4 __attribute__((__ext_vector_type__(4))); +typedef unsigned int swift_uint2 __attribute__((__ext_vector_type__(2))); +typedef unsigned int swift_uint3 __attribute__((__ext_vector_type__(3))); +typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4))); +#endif + +#if !defined(SWIFT_PASTE) +# define SWIFT_PASTE_HELPER(x, y) x##y +# define SWIFT_PASTE(x, y) SWIFT_PASTE_HELPER(x, y) +#endif +#if !defined(SWIFT_METATYPE) +# define SWIFT_METATYPE(X) Class +#endif +#if !defined(SWIFT_CLASS_PROPERTY) +# if __has_feature(objc_class_property) +# define SWIFT_CLASS_PROPERTY(...) __VA_ARGS__ +# else +# define SWIFT_CLASS_PROPERTY(...) +# endif +#endif + +#if __has_attribute(objc_runtime_name) +# define SWIFT_RUNTIME_NAME(X) __attribute__((objc_runtime_name(X))) +#else +# define SWIFT_RUNTIME_NAME(X) +#endif +#if __has_attribute(swift_name) +# define SWIFT_COMPILE_NAME(X) __attribute__((swift_name(X))) +#else +# define SWIFT_COMPILE_NAME(X) +#endif +#if __has_attribute(objc_method_family) +# define SWIFT_METHOD_FAMILY(X) __attribute__((objc_method_family(X))) +#else +# define SWIFT_METHOD_FAMILY(X) +#endif +#if __has_attribute(noescape) +# define SWIFT_NOESCAPE __attribute__((noescape)) +#else +# define SWIFT_NOESCAPE +#endif +#if __has_attribute(ns_consumed) +# define SWIFT_RELEASES_ARGUMENT __attribute__((ns_consumed)) +#else +# define SWIFT_RELEASES_ARGUMENT +#endif +#if __has_attribute(warn_unused_result) +# define SWIFT_WARN_UNUSED_RESULT __attribute__((warn_unused_result)) +#else +# define SWIFT_WARN_UNUSED_RESULT +#endif +#if __has_attribute(noreturn) +# define SWIFT_NORETURN __attribute__((noreturn)) +#else +# define SWIFT_NORETURN +#endif +#if !defined(SWIFT_CLASS_EXTRA) +# define SWIFT_CLASS_EXTRA +#endif +#if !defined(SWIFT_PROTOCOL_EXTRA) +# define SWIFT_PROTOCOL_EXTRA +#endif +#if !defined(SWIFT_ENUM_EXTRA) +# define SWIFT_ENUM_EXTRA +#endif +#if !defined(SWIFT_CLASS) +# if __has_attribute(objc_subclassing_restricted) +# define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_CLASS_EXTRA +# define SWIFT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA +# else +# define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA +# define SWIFT_CLASS_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA +# endif +#endif +#if !defined(SWIFT_RESILIENT_CLASS) +# if __has_attribute(objc_class_stub) +# define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME) __attribute__((objc_class_stub)) +# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_class_stub)) SWIFT_CLASS_NAMED(SWIFT_NAME) +# else +# define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME) +# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) SWIFT_CLASS_NAMED(SWIFT_NAME) +# endif +#endif + +#if !defined(SWIFT_PROTOCOL) +# define SWIFT_PROTOCOL(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA +# define SWIFT_PROTOCOL_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA +#endif + +#if !defined(SWIFT_EXTENSION) +# define SWIFT_EXTENSION(M) SWIFT_PASTE(M##_Swift_, __LINE__) +#endif + +#if !defined(OBJC_DESIGNATED_INITIALIZER) +# if __has_attribute(objc_designated_initializer) +# define OBJC_DESIGNATED_INITIALIZER __attribute__((objc_designated_initializer)) +# else +# define OBJC_DESIGNATED_INITIALIZER +# endif +#endif +#if !defined(SWIFT_ENUM_ATTR) +# if defined(__has_attribute) && __has_attribute(enum_extensibility) +# define SWIFT_ENUM_ATTR(_extensibility) __attribute__((enum_extensibility(_extensibility))) +# else +# define SWIFT_ENUM_ATTR(_extensibility) +# endif +#endif +#if !defined(SWIFT_ENUM) +# define SWIFT_ENUM(_type, _name, _extensibility) enum _name : _type _name; enum SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type +# if __has_feature(generalized_swift_name) +# define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) enum _name : _type _name SWIFT_COMPILE_NAME(SWIFT_NAME); enum SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type +# else +# define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) SWIFT_ENUM(_type, _name, _extensibility) +# endif +#endif +#if !defined(SWIFT_UNAVAILABLE) +# define SWIFT_UNAVAILABLE __attribute__((unavailable)) +#endif +#if !defined(SWIFT_UNAVAILABLE_MSG) +# define SWIFT_UNAVAILABLE_MSG(msg) __attribute__((unavailable(msg))) +#endif +#if !defined(SWIFT_AVAILABILITY) +# define SWIFT_AVAILABILITY(plat, ...) __attribute__((availability(plat, __VA_ARGS__))) +#endif +#if !defined(SWIFT_WEAK_IMPORT) +# define SWIFT_WEAK_IMPORT __attribute__((weak_import)) +#endif +#if !defined(SWIFT_DEPRECATED) +# define SWIFT_DEPRECATED __attribute__((deprecated)) +#endif +#if !defined(SWIFT_DEPRECATED_MSG) +# define SWIFT_DEPRECATED_MSG(...) __attribute__((deprecated(__VA_ARGS__))) +#endif +#if __has_feature(attribute_diagnose_if_objc) +# define SWIFT_DEPRECATED_OBJC(Msg) __attribute__((diagnose_if(1, Msg, "warning"))) +#else +# define SWIFT_DEPRECATED_OBJC(Msg) SWIFT_DEPRECATED_MSG(Msg) +#endif +#if defined(__OBJC__) +#if !defined(IBSegueAction) +# define IBSegueAction +#endif +#endif +#if !defined(SWIFT_EXTERN) +# if defined(__cplusplus) +# define SWIFT_EXTERN extern "C" +# else +# define SWIFT_EXTERN extern +# endif +#endif +#if !defined(SWIFT_CALL) +# define SWIFT_CALL __attribute__((swiftcall)) +#endif +#if defined(__cplusplus) +#if !defined(SWIFT_NOEXCEPT) +# define SWIFT_NOEXCEPT noexcept +#endif +#else +#if !defined(SWIFT_NOEXCEPT) +# define SWIFT_NOEXCEPT +#endif +#endif +#if defined(__cplusplus) +#if !defined(SWIFT_CXX_INT_DEFINED) +#define SWIFT_CXX_INT_DEFINED +namespace swift { +using Int = ptrdiff_t; +using UInt = size_t; +} +#endif +#endif +#if defined(__OBJC__) +#if __has_feature(modules) +#if __has_warning("-Watimport-in-framework-header") +#pragma clang diagnostic ignored "-Watimport-in-framework-header" +#endif +#endif + +#endif +#pragma clang diagnostic ignored "-Wproperty-attribute-mismatch" +#pragma clang diagnostic ignored "-Wduplicate-method-arg" +#if __has_warning("-Wpragma-clang-attribute") +# pragma clang diagnostic ignored "-Wpragma-clang-attribute" +#endif +#pragma clang diagnostic ignored "-Wunknown-pragmas" +#pragma clang diagnostic ignored "-Wnullability" +#pragma clang diagnostic ignored "-Wdollar-in-identifier-extension" + +#if __has_attribute(external_source_symbol) +# pragma push_macro("any") +# undef any +# pragma clang attribute push(__attribute__((external_source_symbol(language="Swift", defined_in="OneSignalFramework",generated_declaration))), apply_to=any(function,enum,objc_interface,objc_category,objc_protocol)) +# pragma pop_macro("any") +#endif + +#if defined(__OBJC__) + +#endif +#if defined(__cplusplus) +#endif +#if __has_attribute(external_source_symbol) +# pragma clang attribute pop +#endif +#pragma clang diagnostic pop +#endif + +#elif defined(__x86_64__) && __x86_64__ +// Generated by Apple Swift version 5.7.1 (swiftlang-5.7.1.135.3 clang-1400.0.29.51) +#ifndef ONESIGNALFRAMEWORK_SWIFT_H +#define ONESIGNALFRAMEWORK_SWIFT_H +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wgcc-compat" + +#if !defined(__has_include) +# define __has_include(x) 0 +#endif +#if !defined(__has_attribute) +# define __has_attribute(x) 0 +#endif +#if !defined(__has_feature) +# define __has_feature(x) 0 +#endif +#if !defined(__has_warning) +# define __has_warning(x) 0 +#endif + +#if __has_include() +# include +#endif + +#pragma clang diagnostic ignored "-Wduplicate-method-match" +#pragma clang diagnostic ignored "-Wauto-import" +#if defined(__OBJC__) +#include +#endif +#if defined(__cplusplus) +#include +#include +#include +#else +#include +#include +#include +#endif + +#if !defined(SWIFT_TYPEDEFS) +# define SWIFT_TYPEDEFS 1 +# if __has_include() +# include +# elif !defined(__cplusplus) +typedef uint_least16_t char16_t; +typedef uint_least32_t char32_t; +# endif +typedef float swift_float2 __attribute__((__ext_vector_type__(2))); +typedef float swift_float3 __attribute__((__ext_vector_type__(3))); +typedef float swift_float4 __attribute__((__ext_vector_type__(4))); +typedef double swift_double2 __attribute__((__ext_vector_type__(2))); +typedef double swift_double3 __attribute__((__ext_vector_type__(3))); +typedef double swift_double4 __attribute__((__ext_vector_type__(4))); +typedef int swift_int2 __attribute__((__ext_vector_type__(2))); +typedef int swift_int3 __attribute__((__ext_vector_type__(3))); +typedef int swift_int4 __attribute__((__ext_vector_type__(4))); +typedef unsigned int swift_uint2 __attribute__((__ext_vector_type__(2))); +typedef unsigned int swift_uint3 __attribute__((__ext_vector_type__(3))); +typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4))); +#endif + +#if !defined(SWIFT_PASTE) +# define SWIFT_PASTE_HELPER(x, y) x##y +# define SWIFT_PASTE(x, y) SWIFT_PASTE_HELPER(x, y) +#endif +#if !defined(SWIFT_METATYPE) +# define SWIFT_METATYPE(X) Class +#endif +#if !defined(SWIFT_CLASS_PROPERTY) +# if __has_feature(objc_class_property) +# define SWIFT_CLASS_PROPERTY(...) __VA_ARGS__ +# else +# define SWIFT_CLASS_PROPERTY(...) +# endif +#endif + +#if __has_attribute(objc_runtime_name) +# define SWIFT_RUNTIME_NAME(X) __attribute__((objc_runtime_name(X))) +#else +# define SWIFT_RUNTIME_NAME(X) +#endif +#if __has_attribute(swift_name) +# define SWIFT_COMPILE_NAME(X) __attribute__((swift_name(X))) +#else +# define SWIFT_COMPILE_NAME(X) +#endif +#if __has_attribute(objc_method_family) +# define SWIFT_METHOD_FAMILY(X) __attribute__((objc_method_family(X))) +#else +# define SWIFT_METHOD_FAMILY(X) +#endif +#if __has_attribute(noescape) +# define SWIFT_NOESCAPE __attribute__((noescape)) +#else +# define SWIFT_NOESCAPE +#endif +#if __has_attribute(ns_consumed) +# define SWIFT_RELEASES_ARGUMENT __attribute__((ns_consumed)) +#else +# define SWIFT_RELEASES_ARGUMENT +#endif +#if __has_attribute(warn_unused_result) +# define SWIFT_WARN_UNUSED_RESULT __attribute__((warn_unused_result)) +#else +# define SWIFT_WARN_UNUSED_RESULT +#endif +#if __has_attribute(noreturn) +# define SWIFT_NORETURN __attribute__((noreturn)) +#else +# define SWIFT_NORETURN +#endif +#if !defined(SWIFT_CLASS_EXTRA) +# define SWIFT_CLASS_EXTRA +#endif +#if !defined(SWIFT_PROTOCOL_EXTRA) +# define SWIFT_PROTOCOL_EXTRA +#endif +#if !defined(SWIFT_ENUM_EXTRA) +# define SWIFT_ENUM_EXTRA +#endif +#if !defined(SWIFT_CLASS) +# if __has_attribute(objc_subclassing_restricted) +# define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_CLASS_EXTRA +# define SWIFT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA +# else +# define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA +# define SWIFT_CLASS_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA +# endif +#endif +#if !defined(SWIFT_RESILIENT_CLASS) +# if __has_attribute(objc_class_stub) +# define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME) __attribute__((objc_class_stub)) +# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_class_stub)) SWIFT_CLASS_NAMED(SWIFT_NAME) +# else +# define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME) +# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) SWIFT_CLASS_NAMED(SWIFT_NAME) +# endif +#endif + +#if !defined(SWIFT_PROTOCOL) +# define SWIFT_PROTOCOL(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA +# define SWIFT_PROTOCOL_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA +#endif + +#if !defined(SWIFT_EXTENSION) +# define SWIFT_EXTENSION(M) SWIFT_PASTE(M##_Swift_, __LINE__) +#endif + +#if !defined(OBJC_DESIGNATED_INITIALIZER) +# if __has_attribute(objc_designated_initializer) +# define OBJC_DESIGNATED_INITIALIZER __attribute__((objc_designated_initializer)) +# else +# define OBJC_DESIGNATED_INITIALIZER +# endif +#endif +#if !defined(SWIFT_ENUM_ATTR) +# if defined(__has_attribute) && __has_attribute(enum_extensibility) +# define SWIFT_ENUM_ATTR(_extensibility) __attribute__((enum_extensibility(_extensibility))) +# else +# define SWIFT_ENUM_ATTR(_extensibility) +# endif +#endif +#if !defined(SWIFT_ENUM) +# define SWIFT_ENUM(_type, _name, _extensibility) enum _name : _type _name; enum SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type +# if __has_feature(generalized_swift_name) +# define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) enum _name : _type _name SWIFT_COMPILE_NAME(SWIFT_NAME); enum SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type +# else +# define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) SWIFT_ENUM(_type, _name, _extensibility) +# endif +#endif +#if !defined(SWIFT_UNAVAILABLE) +# define SWIFT_UNAVAILABLE __attribute__((unavailable)) +#endif +#if !defined(SWIFT_UNAVAILABLE_MSG) +# define SWIFT_UNAVAILABLE_MSG(msg) __attribute__((unavailable(msg))) +#endif +#if !defined(SWIFT_AVAILABILITY) +# define SWIFT_AVAILABILITY(plat, ...) __attribute__((availability(plat, __VA_ARGS__))) +#endif +#if !defined(SWIFT_WEAK_IMPORT) +# define SWIFT_WEAK_IMPORT __attribute__((weak_import)) +#endif +#if !defined(SWIFT_DEPRECATED) +# define SWIFT_DEPRECATED __attribute__((deprecated)) +#endif +#if !defined(SWIFT_DEPRECATED_MSG) +# define SWIFT_DEPRECATED_MSG(...) __attribute__((deprecated(__VA_ARGS__))) +#endif +#if __has_feature(attribute_diagnose_if_objc) +# define SWIFT_DEPRECATED_OBJC(Msg) __attribute__((diagnose_if(1, Msg, "warning"))) +#else +# define SWIFT_DEPRECATED_OBJC(Msg) SWIFT_DEPRECATED_MSG(Msg) +#endif +#if defined(__OBJC__) +#if !defined(IBSegueAction) +# define IBSegueAction +#endif +#endif +#if !defined(SWIFT_EXTERN) +# if defined(__cplusplus) +# define SWIFT_EXTERN extern "C" +# else +# define SWIFT_EXTERN extern +# endif +#endif +#if !defined(SWIFT_CALL) +# define SWIFT_CALL __attribute__((swiftcall)) +#endif +#if defined(__cplusplus) +#if !defined(SWIFT_NOEXCEPT) +# define SWIFT_NOEXCEPT noexcept +#endif +#else +#if !defined(SWIFT_NOEXCEPT) +# define SWIFT_NOEXCEPT +#endif +#endif +#if defined(__cplusplus) +#if !defined(SWIFT_CXX_INT_DEFINED) +#define SWIFT_CXX_INT_DEFINED +namespace swift { +using Int = ptrdiff_t; +using UInt = size_t; +} +#endif +#endif +#if defined(__OBJC__) +#if __has_feature(modules) +#if __has_warning("-Watimport-in-framework-header") +#pragma clang diagnostic ignored "-Watimport-in-framework-header" +#endif +#endif + +#endif +#pragma clang diagnostic ignored "-Wproperty-attribute-mismatch" +#pragma clang diagnostic ignored "-Wduplicate-method-arg" +#if __has_warning("-Wpragma-clang-attribute") +# pragma clang diagnostic ignored "-Wpragma-clang-attribute" +#endif +#pragma clang diagnostic ignored "-Wunknown-pragmas" +#pragma clang diagnostic ignored "-Wnullability" +#pragma clang diagnostic ignored "-Wdollar-in-identifier-extension" + +#if __has_attribute(external_source_symbol) +# pragma push_macro("any") +# undef any +# pragma clang attribute push(__attribute__((external_source_symbol(language="Swift", defined_in="OneSignalFramework",generated_declaration))), apply_to=any(function,enum,objc_interface,objc_category,objc_protocol)) +# pragma pop_macro("any") +#endif + +#if defined(__OBJC__) + +#endif +#if defined(__cplusplus) +#endif +#if __has_attribute(external_source_symbol) +# pragma clang attribute pop +#endif +#pragma clang diagnostic pop +#endif + +#else +#error unsupported Swift architecture +#endif diff --git a/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignalFramework.xcframework/ios-arm64_x86_64-simulator/OneSignalFramework.framework/Headers/OneSignalFramework.h b/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignalFramework.xcframework/ios-arm64_x86_64-simulator/OneSignalFramework.framework/Headers/OneSignalFramework.h new file mode 100755 index 000000000..5cffcce44 --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignalFramework.xcframework/ios-arm64_x86_64-simulator/OneSignalFramework.framework/Headers/OneSignalFramework.h @@ -0,0 +1,116 @@ +/** + Modified MIT License + + Copyright 2017 OneSignal + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + 1. The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + 2. All copies of substantial portions of the Software may only be used in connection + with services provided by OneSignal. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + */ + +/** + ### Setting up the SDK ### + Follow the documentation from https://documentation.onesignal.com/docs/ios-sdk-setupto setup OneSignal in your app. + + ### API Reference ### + Follow the documentation from https://documentation.onesignal.com/docs/ios-sdk-api for a detailed explanation of the API. + + ### Troubleshoot ### + Follow the documentation from https://documentation.onesignal.com/docs/troubleshooting-ios to fix common problems. + + For help on how to upgrade your code from 1.* SDK to 2.*: https://documentation.onesignal.com/docs/upgrading-to-ios-sdk-20 + + ### More ### + iOS Push Cert: https://documentation.onesignal.com/docs/generating-an-ios-push-certificate +*/ + +#import +#import +#import +#import +#import +#import +#import +#import "OneSignalLiveActivityController.h" + +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wstrict-prototypes" +#pragma clang diagnostic ignored "-Wnullability-completeness" + +typedef void (^OSWebOpenURLResultBlock)(BOOL shouldOpen); + +/*Block for generic results on success and errors on failure*/ +typedef void (^OSResultSuccessBlock)(NSDictionary* result); +typedef void (^OSFailureBlock)(NSError* error); + +// ======= OneSignal Class Interface ========= +@interface OneSignal : NSObject + ++ (NSString* _Nonnull)sdkVersionRaw; ++ (NSString* _Nonnull)sdkSemanticVersion; + +#pragma mark User ++ (id)User NS_REFINED_FOR_SWIFT; ++ (void)login:(NSString * _Nonnull)externalId; ++ (void)login:(NSString * _Nonnull)externalId withToken:(NSString * _Nullable)token +NS_SWIFT_NAME(login(externalId:token:)); ++ (void)logout; + +#pragma mark Notifications ++ (Class)Notifications NS_REFINED_FOR_SWIFT; + +#pragma mark Initialization ++ (void)setLaunchOptions:(nullable NSDictionary*)newLaunchOptions; // meant for use by wrappers ++ (void)initialize:(nonnull NSString*)newAppId withLaunchOptions:(nullable NSDictionary*)launchOptions; ++ (void)setProvidesNotificationSettingsView:(BOOL)providesView; + +#pragma mark Live Activity ++ (Class)LiveActivities NS_REFINED_FOR_SWIFT; + +#pragma mark Logging ++ (Class)Debug NS_REFINED_FOR_SWIFT; + +#pragma mark Privacy Consent +/** + * Set to `true` if your application requires privacy consent. + * Consent should be provided prior to the invocation of `initialize` to ensure compliance. + */ ++ (void)setConsentRequired:(BOOL)required; ++ (void)setConsentGiven:(BOOL)granted; + +#pragma mark In-App Messaging ++ (Class)InAppMessages NS_REFINED_FOR_SWIFT; + +#pragma mark Location ++ (Class)Location NS_REFINED_FOR_SWIFT; + +#pragma mark Session ++ (Class)Session NS_REFINED_FOR_SWIFT; + +#pragma mark Extension +// iOS 10 only +// Process from Notification Service Extension. +// Used for iOS Media Attachemtns and Action Buttons. ++ (UNMutableNotificationContent*)didReceiveNotificationExtensionRequest:(UNNotificationRequest* _Nonnull)request withMutableNotificationContent:(UNMutableNotificationContent* _Nullable)replacementContent __deprecated_msg("Please use didReceiveNotificationExtensionRequest:withMutableNotificationContent:withContentHandler: instead."); ++ (UNMutableNotificationContent*)didReceiveNotificationExtensionRequest:(UNNotificationRequest* _Nonnull)request withMutableNotificationContent:(UNMutableNotificationContent* _Nullable)replacementContent withContentHandler:(void (^)(UNNotificationContent *_Nonnull))contentHandler; ++ (UNMutableNotificationContent*)serviceExtensionTimeWillExpireRequest:(UNNotificationRequest* _Nonnull)request withMutableNotificationContent:(UNMutableNotificationContent* _Nullable)replacementContent; +@end + +#pragma clang diagnostic pop diff --git a/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignalFramework.xcframework/ios-arm64_x86_64-simulator/OneSignalFramework.framework/Headers/OneSignalLiveActivityController.h b/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignalFramework.xcframework/ios-arm64_x86_64-simulator/OneSignalFramework.framework/Headers/OneSignalLiveActivityController.h new file mode 100644 index 000000000..43233bc0e --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignalFramework.xcframework/ios-arm64_x86_64-simulator/OneSignalFramework.framework/Headers/OneSignalLiveActivityController.h @@ -0,0 +1,47 @@ +/** + * Modified MIT License + * + * Copyright 2023 OneSignal + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * 1. The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * 2. All copies of substantial portions of the Software may only be used in connection + * with services provided by OneSignal. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#ifndef OneSignalLiveActivityController_h +#define OneSignalLiveActivityController_h + +#import + +/** + Public API for the LiveActivities namespace. + */ +@protocol OSLiveActivities ++ (void)enter:(NSString * _Nonnull)activityId withToken:(NSString * _Nonnull)token; ++ (void)enter:(NSString * _Nonnull)activityId withToken:(NSString * _Nonnull)token withSuccess:(OSResultSuccessBlock _Nullable)successBlock withFailure:(OSFailureBlock _Nullable)failureBlock; ++ (void)exit:(NSString * _Nonnull)activityId; ++ (void)exit:(NSString * _Nonnull)activityId withSuccess:(OSResultSuccessBlock _Nullable)successBlock withFailure:(OSFailureBlock _Nullable)failureBlock; +@end + +@interface OneSignalLiveActivityController: NSObject ++ (Class_Nonnull)LiveActivities; +@end + +#endif /* OneSignalLiveActivityController_h */ diff --git a/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignal.xcframework/ios-arm64_x86_64-simulator/OneSignal.framework/Info.plist b/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignalFramework.xcframework/ios-arm64_x86_64-simulator/OneSignalFramework.framework/Info.plist similarity index 53% rename from iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignal.xcframework/ios-arm64_x86_64-simulator/OneSignal.framework/Info.plist rename to iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignalFramework.xcframework/ios-arm64_x86_64-simulator/OneSignalFramework.framework/Info.plist index f02a12f3e..e55a1d0d2 100644 Binary files a/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignal.xcframework/ios-arm64_x86_64-simulator/OneSignal.framework/Info.plist and b/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignalFramework.xcframework/ios-arm64_x86_64-simulator/OneSignalFramework.framework/Info.plist differ diff --git a/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignalFramework.xcframework/ios-arm64_x86_64-simulator/OneSignalFramework.framework/Modules/OneSignalFramework.swiftmodule/arm64-apple-ios-simulator.abi.json b/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignalFramework.xcframework/ios-arm64_x86_64-simulator/OneSignalFramework.framework/Modules/OneSignalFramework.swiftmodule/arm64-apple-ios-simulator.abi.json new file mode 100644 index 000000000..8069d9ff4 --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignalFramework.xcframework/ios-arm64_x86_64-simulator/OneSignalFramework.framework/Modules/OneSignalFramework.swiftmodule/arm64-apple-ios-simulator.abi.json @@ -0,0 +1,1261 @@ +{ + "ABIRoot": { + "kind": "Root", + "name": "TopLevel", + "printedName": "TopLevel", + "children": [ + { + "kind": "Import", + "name": "Foundation", + "printedName": "Foundation", + "declKind": "Import", + "moduleName": "OneSignalFramework", + "declAttributes": [ + "RawDocComment" + ] + }, + { + "kind": "Import", + "name": "OneSignalUser", + "printedName": "OneSignalUser", + "declKind": "Import", + "moduleName": "OneSignalFramework" + }, + { + "kind": "Import", + "name": "OneSignalOutcomes", + "printedName": "OneSignalOutcomes", + "declKind": "Import", + "moduleName": "OneSignalFramework" + }, + { + "kind": "Import", + "name": "OneSignalNotifications", + "printedName": "OneSignalNotifications", + "declKind": "Import", + "moduleName": "OneSignalFramework" + }, + { + "kind": "Import", + "name": "OneSignalCore", + "printedName": "OneSignalCore", + "declKind": "Import", + "moduleName": "OneSignalFramework" + }, + { + "kind": "TypeDecl", + "name": "OneSignal", + "printedName": "OneSignal", + "children": [ + { + "kind": "Var", + "name": "User", + "printedName": "User", + "children": [ + { + "kind": "TypeNominal", + "name": "OSUser", + "printedName": "OneSignalUser.OSUser", + "usr": "c:@M@OneSignalUser@objc(pl)OSUser" + } + ], + "declKind": "Var", + "usr": "s:So9OneSignalC0aB9FrameworkE4User0abD06OSUser_pvpZ", + "mangledName": "$sSo9OneSignalC0aB9FrameworkE4User0abD06OSUser_pvpZ", + "moduleName": "OneSignalFramework", + "static": true, + "declAttributes": [ + "Final" + ], + "isFromExtension": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "OSUser", + "printedName": "OneSignalUser.OSUser", + "usr": "c:@M@OneSignalUser@objc(pl)OSUser" + } + ], + "declKind": "Accessor", + "usr": "s:So9OneSignalC0aB9FrameworkE4User0abD06OSUser_pvgZ", + "mangledName": "$sSo9OneSignalC0aB9FrameworkE4User0abD06OSUser_pvgZ", + "moduleName": "OneSignalFramework", + "static": true, + "declAttributes": [ + "Final" + ], + "isFromExtension": true, + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "Notifications", + "printedName": "Notifications", + "children": [ + { + "kind": "TypeNominal", + "name": "ExistentialMetatype", + "printedName": "OneSignalNotifications.OSNotifications.Type", + "children": [ + { + "kind": "TypeNominal", + "name": "OSNotifications", + "printedName": "OneSignalNotifications.OSNotifications", + "usr": "c:objc(pl)OSNotifications" + } + ] + } + ], + "declKind": "Var", + "usr": "s:So9OneSignalC0aB9FrameworkE13NotificationsSo15OSNotifications_pXpvpZ", + "mangledName": "$sSo9OneSignalC0aB9FrameworkE13NotificationsSo15OSNotifications_pXpvpZ", + "moduleName": "OneSignalFramework", + "static": true, + "declAttributes": [ + "Final" + ], + "isFromExtension": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "ExistentialMetatype", + "printedName": "OneSignalNotifications.OSNotifications.Type", + "children": [ + { + "kind": "TypeNominal", + "name": "OSNotifications", + "printedName": "OneSignalNotifications.OSNotifications", + "usr": "c:objc(pl)OSNotifications" + } + ] + } + ], + "declKind": "Accessor", + "usr": "s:So9OneSignalC0aB9FrameworkE13NotificationsSo15OSNotifications_pXpvgZ", + "mangledName": "$sSo9OneSignalC0aB9FrameworkE13NotificationsSo15OSNotifications_pXpvgZ", + "moduleName": "OneSignalFramework", + "static": true, + "declAttributes": [ + "Final" + ], + "isFromExtension": true, + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "Session", + "printedName": "Session", + "children": [ + { + "kind": "TypeNominal", + "name": "ExistentialMetatype", + "printedName": "OneSignalOutcomes.OSSession.Type", + "children": [ + { + "kind": "TypeNominal", + "name": "OSSession", + "printedName": "OneSignalOutcomes.OSSession", + "usr": "c:objc(pl)OSSession" + } + ] + } + ], + "declKind": "Var", + "usr": "s:So9OneSignalC0aB9FrameworkE7SessionSo9OSSession_pXpvpZ", + "mangledName": "$sSo9OneSignalC0aB9FrameworkE7SessionSo9OSSession_pXpvpZ", + "moduleName": "OneSignalFramework", + "static": true, + "declAttributes": [ + "Final" + ], + "isFromExtension": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "ExistentialMetatype", + "printedName": "OneSignalOutcomes.OSSession.Type", + "children": [ + { + "kind": "TypeNominal", + "name": "OSSession", + "printedName": "OneSignalOutcomes.OSSession", + "usr": "c:objc(pl)OSSession" + } + ] + } + ], + "declKind": "Accessor", + "usr": "s:So9OneSignalC0aB9FrameworkE7SessionSo9OSSession_pXpvgZ", + "mangledName": "$sSo9OneSignalC0aB9FrameworkE7SessionSo9OSSession_pXpvgZ", + "moduleName": "OneSignalFramework", + "static": true, + "declAttributes": [ + "Final" + ], + "isFromExtension": true, + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "InAppMessages", + "printedName": "InAppMessages", + "children": [ + { + "kind": "TypeNominal", + "name": "ExistentialMetatype", + "printedName": "OneSignalCore.OSInAppMessages.Type", + "children": [ + { + "kind": "TypeNominal", + "name": "OSInAppMessages", + "printedName": "OneSignalCore.OSInAppMessages", + "usr": "c:objc(pl)OSInAppMessages" + } + ] + } + ], + "declKind": "Var", + "usr": "s:So9OneSignalC0aB9FrameworkE13InAppMessagesSo04OSIneF0_pXpvpZ", + "mangledName": "$sSo9OneSignalC0aB9FrameworkE13InAppMessagesSo04OSIneF0_pXpvpZ", + "moduleName": "OneSignalFramework", + "static": true, + "declAttributes": [ + "Final" + ], + "isFromExtension": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "ExistentialMetatype", + "printedName": "OneSignalCore.OSInAppMessages.Type", + "children": [ + { + "kind": "TypeNominal", + "name": "OSInAppMessages", + "printedName": "OneSignalCore.OSInAppMessages", + "usr": "c:objc(pl)OSInAppMessages" + } + ] + } + ], + "declKind": "Accessor", + "usr": "s:So9OneSignalC0aB9FrameworkE13InAppMessagesSo04OSIneF0_pXpvgZ", + "mangledName": "$sSo9OneSignalC0aB9FrameworkE13InAppMessagesSo04OSIneF0_pXpvgZ", + "moduleName": "OneSignalFramework", + "static": true, + "declAttributes": [ + "Final" + ], + "isFromExtension": true, + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "Debug", + "printedName": "Debug", + "children": [ + { + "kind": "TypeNominal", + "name": "ExistentialMetatype", + "printedName": "OneSignalCore.OSDebug.Type", + "children": [ + { + "kind": "TypeNominal", + "name": "OSDebug", + "printedName": "OneSignalCore.OSDebug", + "usr": "c:objc(pl)OSDebug" + } + ] + } + ], + "declKind": "Var", + "usr": "s:So9OneSignalC0aB9FrameworkE5DebugSo7OSDebug_pXpvpZ", + "mangledName": "$sSo9OneSignalC0aB9FrameworkE5DebugSo7OSDebug_pXpvpZ", + "moduleName": "OneSignalFramework", + "static": true, + "declAttributes": [ + "Final" + ], + "isFromExtension": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "ExistentialMetatype", + "printedName": "OneSignalCore.OSDebug.Type", + "children": [ + { + "kind": "TypeNominal", + "name": "OSDebug", + "printedName": "OneSignalCore.OSDebug", + "usr": "c:objc(pl)OSDebug" + } + ] + } + ], + "declKind": "Accessor", + "usr": "s:So9OneSignalC0aB9FrameworkE5DebugSo7OSDebug_pXpvgZ", + "mangledName": "$sSo9OneSignalC0aB9FrameworkE5DebugSo7OSDebug_pXpvgZ", + "moduleName": "OneSignalFramework", + "static": true, + "declAttributes": [ + "Final" + ], + "isFromExtension": true, + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "Location", + "printedName": "Location", + "children": [ + { + "kind": "TypeNominal", + "name": "ExistentialMetatype", + "printedName": "OneSignalCore.OSLocation.Type", + "children": [ + { + "kind": "TypeNominal", + "name": "OSLocation", + "printedName": "OneSignalCore.OSLocation", + "usr": "c:objc(pl)OSLocation" + } + ] + } + ], + "declKind": "Var", + "usr": "s:So9OneSignalC0aB9FrameworkE8LocationSo10OSLocation_pXpvpZ", + "mangledName": "$sSo9OneSignalC0aB9FrameworkE8LocationSo10OSLocation_pXpvpZ", + "moduleName": "OneSignalFramework", + "static": true, + "declAttributes": [ + "Final" + ], + "isFromExtension": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "ExistentialMetatype", + "printedName": "OneSignalCore.OSLocation.Type", + "children": [ + { + "kind": "TypeNominal", + "name": "OSLocation", + "printedName": "OneSignalCore.OSLocation", + "usr": "c:objc(pl)OSLocation" + } + ] + } + ], + "declKind": "Accessor", + "usr": "s:So9OneSignalC0aB9FrameworkE8LocationSo10OSLocation_pXpvgZ", + "mangledName": "$sSo9OneSignalC0aB9FrameworkE8LocationSo10OSLocation_pXpvgZ", + "moduleName": "OneSignalFramework", + "static": true, + "declAttributes": [ + "Final" + ], + "isFromExtension": true, + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "LiveActivities", + "printedName": "LiveActivities", + "children": [ + { + "kind": "TypeNominal", + "name": "ExistentialMetatype", + "printedName": "OneSignalFramework.OSLiveActivities.Type", + "children": [ + { + "kind": "TypeNominal", + "name": "OSLiveActivities", + "printedName": "OneSignalFramework.OSLiveActivities", + "usr": "c:objc(pl)OSLiveActivities" + } + ] + } + ], + "declKind": "Var", + "usr": "s:So9OneSignalC0aB9FrameworkE14LiveActivitiesSo06OSLiveE0_pXpvpZ", + "mangledName": "$sSo9OneSignalC0aB9FrameworkE14LiveActivitiesSo06OSLiveE0_pXpvpZ", + "moduleName": "OneSignalFramework", + "static": true, + "declAttributes": [ + "Final" + ], + "isFromExtension": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "ExistentialMetatype", + "printedName": "OneSignalFramework.OSLiveActivities.Type", + "children": [ + { + "kind": "TypeNominal", + "name": "OSLiveActivities", + "printedName": "OneSignalFramework.OSLiveActivities", + "usr": "c:objc(pl)OSLiveActivities" + } + ] + } + ], + "declKind": "Accessor", + "usr": "s:So9OneSignalC0aB9FrameworkE14LiveActivitiesSo06OSLiveE0_pXpvgZ", + "mangledName": "$sSo9OneSignalC0aB9FrameworkE14LiveActivitiesSo06OSLiveE0_pXpvgZ", + "moduleName": "OneSignalFramework", + "static": true, + "declAttributes": [ + "Final" + ], + "isFromExtension": true, + "accessorKind": "get" + } + ] + } + ], + "declKind": "Class", + "usr": "c:objc(cs)OneSignal", + "moduleName": "OneSignalFramework", + "isOpen": true, + "objc_name": "OneSignal", + "declAttributes": [ + "ObjC", + "Dynamic" + ], + "superclassUsr": "c:objc(cs)NSObject", + "isExternal": true, + "inheritsConvenienceInitializers": true, + "superclassNames": [ + "ObjectiveC.NSObject" + ], + "conformances": [ + { + "kind": "Conformance", + "name": "Equatable", + "printedName": "Equatable", + "usr": "s:SQ", + "mangledName": "$sSQ" + }, + { + "kind": "Conformance", + "name": "Hashable", + "printedName": "Hashable", + "usr": "s:SH", + "mangledName": "$sSH" + }, + { + "kind": "Conformance", + "name": "CVarArg", + "printedName": "CVarArg", + "usr": "s:s7CVarArgP", + "mangledName": "$ss7CVarArgP" + }, + { + "kind": "Conformance", + "name": "_KeyValueCodingAndObservingPublishing", + "printedName": "_KeyValueCodingAndObservingPublishing", + "usr": "s:10Foundation37_KeyValueCodingAndObservingPublishingP", + "mangledName": "$s10Foundation37_KeyValueCodingAndObservingPublishingP" + }, + { + "kind": "Conformance", + "name": "_KeyValueCodingAndObserving", + "printedName": "_KeyValueCodingAndObserving", + "usr": "s:10Foundation27_KeyValueCodingAndObservingP", + "mangledName": "$s10Foundation27_KeyValueCodingAndObservingP" + }, + { + "kind": "Conformance", + "name": "CustomStringConvertible", + "printedName": "CustomStringConvertible", + "usr": "s:s23CustomStringConvertibleP", + "mangledName": "$ss23CustomStringConvertibleP" + }, + { + "kind": "Conformance", + "name": "CustomDebugStringConvertible", + "printedName": "CustomDebugStringConvertible", + "usr": "s:s28CustomDebugStringConvertibleP", + "mangledName": "$ss28CustomDebugStringConvertibleP" + } + ] + }, + { + "kind": "TypeDecl", + "name": "OSDebug", + "printedName": "OSDebug", + "children": [ + { + "kind": "Function", + "name": "setAlertLevel", + "printedName": "setAlertLevel(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "ONE_S_LOG_LEVEL", + "printedName": "OneSignalCore.ONE_S_LOG_LEVEL", + "usr": "c:@E@ONE_S_LOG_LEVEL" + } + ], + "declKind": "Func", + "usr": "s:So7OSDebugP18OneSignalFrameworkE13setAlertLevelyySo15ONE_S_LOG_LEVELVFZ", + "mangledName": "$sSo7OSDebugP18OneSignalFrameworkE13setAlertLevelyySo15ONE_S_LOG_LEVELVFZ", + "moduleName": "OneSignalFramework", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalCore.OSDebug>", + "sugared_genericSig": "", + "static": true, + "isFromExtension": true, + "funcSelfKind": "NonMutating" + } + ], + "declKind": "Protocol", + "usr": "c:objc(pl)OSDebug", + "moduleName": "OneSignalCore", + "genericSig": "<τ_0_0 : ObjectiveC.NSObjectProtocol>", + "sugared_genericSig": "", + "objc_name": "OSDebug", + "declAttributes": [ + "ObjC", + "Dynamic" + ], + "isExternal": true + }, + { + "kind": "TypeDecl", + "name": "OSInAppMessages", + "printedName": "OSInAppMessages", + "children": [ + { + "kind": "Var", + "name": "paused", + "printedName": "paused", + "children": [ + { + "kind": "TypeNominal", + "name": "Bool", + "printedName": "Swift.Bool", + "usr": "s:Sb" + } + ], + "declKind": "Var", + "usr": "s:So15OSInAppMessagesP18OneSignalFrameworkE6pausedSbvpZ", + "mangledName": "$sSo15OSInAppMessagesP18OneSignalFrameworkE6pausedSbvpZ", + "moduleName": "OneSignalFramework", + "static": true, + "isFromExtension": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "Bool", + "printedName": "Swift.Bool", + "usr": "s:Sb" + } + ], + "declKind": "Accessor", + "usr": "s:So15OSInAppMessagesP18OneSignalFrameworkE6pausedSbvgZ", + "mangledName": "$sSo15OSInAppMessagesP18OneSignalFrameworkE6pausedSbvgZ", + "moduleName": "OneSignalFramework", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalCore.OSInAppMessages>", + "sugared_genericSig": "", + "static": true, + "isFromExtension": true, + "accessorKind": "get" + }, + { + "kind": "Accessor", + "name": "Set", + "printedName": "Set()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "Bool", + "printedName": "Swift.Bool", + "usr": "s:Sb" + } + ], + "declKind": "Accessor", + "usr": "s:So15OSInAppMessagesP18OneSignalFrameworkE6pausedSbvsZ", + "mangledName": "$sSo15OSInAppMessagesP18OneSignalFrameworkE6pausedSbvsZ", + "moduleName": "OneSignalFramework", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalCore.OSInAppMessages>", + "sugared_genericSig": "", + "static": true, + "isFromExtension": true, + "accessorKind": "set" + }, + { + "kind": "Accessor", + "name": "Modify", + "printedName": "Modify()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + } + ], + "declKind": "Accessor", + "usr": "s:So15OSInAppMessagesP18OneSignalFrameworkE6pausedSbvMZ", + "mangledName": "$sSo15OSInAppMessagesP18OneSignalFrameworkE6pausedSbvMZ", + "moduleName": "OneSignalFramework", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalCore.OSInAppMessages>", + "sugared_genericSig": "", + "static": true, + "implicit": true, + "isFromExtension": true, + "accessorKind": "_modify" + } + ] + }, + { + "kind": "Function", + "name": "addLifecycleListener", + "printedName": "addLifecycleListener(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "OSInAppMessageLifecycleListener", + "printedName": "OneSignalCore.OSInAppMessageLifecycleListener", + "usr": "c:objc(pl)OSInAppMessageLifecycleListener" + } + ], + "declKind": "Func", + "usr": "s:So15OSInAppMessagesP18OneSignalFrameworkE20addLifecycleListeneryySo0ab7MessagehI0_pFZ", + "mangledName": "$sSo15OSInAppMessagesP18OneSignalFrameworkE20addLifecycleListeneryySo0ab7MessagehI0_pFZ", + "moduleName": "OneSignalFramework", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalCore.OSInAppMessages>", + "sugared_genericSig": "", + "static": true, + "isFromExtension": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "removeLifecycleListener", + "printedName": "removeLifecycleListener(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "OSInAppMessageLifecycleListener", + "printedName": "OneSignalCore.OSInAppMessageLifecycleListener", + "usr": "c:objc(pl)OSInAppMessageLifecycleListener" + } + ], + "declKind": "Func", + "usr": "s:So15OSInAppMessagesP18OneSignalFrameworkE23removeLifecycleListeneryySo0ab7MessagehI0_pFZ", + "mangledName": "$sSo15OSInAppMessagesP18OneSignalFrameworkE23removeLifecycleListeneryySo0ab7MessagehI0_pFZ", + "moduleName": "OneSignalFramework", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalCore.OSInAppMessages>", + "sugared_genericSig": "", + "static": true, + "isFromExtension": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "addClickListener", + "printedName": "addClickListener(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "OSInAppMessageClickListener", + "printedName": "OneSignalCore.OSInAppMessageClickListener", + "usr": "c:objc(pl)OSInAppMessageClickListener" + } + ], + "declKind": "Func", + "usr": "s:So15OSInAppMessagesP18OneSignalFrameworkE16addClickListeneryySo0ab7MessagehI0_pFZ", + "mangledName": "$sSo15OSInAppMessagesP18OneSignalFrameworkE16addClickListeneryySo0ab7MessagehI0_pFZ", + "moduleName": "OneSignalFramework", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalCore.OSInAppMessages>", + "sugared_genericSig": "", + "static": true, + "isFromExtension": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "removeClickListener", + "printedName": "removeClickListener(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "OSInAppMessageClickListener", + "printedName": "OneSignalCore.OSInAppMessageClickListener", + "usr": "c:objc(pl)OSInAppMessageClickListener" + } + ], + "declKind": "Func", + "usr": "s:So15OSInAppMessagesP18OneSignalFrameworkE19removeClickListeneryySo0ab7MessagehI0_pFZ", + "mangledName": "$sSo15OSInAppMessagesP18OneSignalFrameworkE19removeClickListeneryySo0ab7MessagehI0_pFZ", + "moduleName": "OneSignalFramework", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalCore.OSInAppMessages>", + "sugared_genericSig": "", + "static": true, + "isFromExtension": true, + "funcSelfKind": "NonMutating" + } + ], + "declKind": "Protocol", + "usr": "c:objc(pl)OSInAppMessages", + "moduleName": "OneSignalCore", + "genericSig": "<τ_0_0 : ObjectiveC.NSObjectProtocol>", + "sugared_genericSig": "", + "objc_name": "OSInAppMessages", + "declAttributes": [ + "ObjC", + "Dynamic" + ], + "isExternal": true + }, + { + "kind": "TypeDecl", + "name": "OSSession", + "printedName": "OSSession", + "children": [ + { + "kind": "Function", + "name": "addOutcome", + "printedName": "addOutcome(_:_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + }, + { + "kind": "TypeNominal", + "name": "NSNumber", + "printedName": "Foundation.NSNumber", + "usr": "c:objc(cs)NSNumber" + } + ], + "declKind": "Func", + "usr": "s:So9OSSessionP18OneSignalFrameworkE10addOutcomeyySS_So8NSNumberCtFZ", + "mangledName": "$sSo9OSSessionP18OneSignalFrameworkE10addOutcomeyySS_So8NSNumberCtFZ", + "moduleName": "OneSignalFramework", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalOutcomes.OSSession>", + "sugared_genericSig": "", + "static": true, + "isFromExtension": true, + "funcSelfKind": "NonMutating" + } + ], + "declKind": "Protocol", + "usr": "c:objc(pl)OSSession", + "moduleName": "OneSignalOutcomes", + "genericSig": "<τ_0_0 : ObjectiveC.NSObjectProtocol>", + "sugared_genericSig": "", + "objc_name": "OSSession", + "declAttributes": [ + "ObjC", + "Dynamic" + ], + "isExternal": true + }, + { + "kind": "TypeDecl", + "name": "OSNotifications", + "printedName": "OSNotifications", + "children": [ + { + "kind": "Var", + "name": "permission", + "printedName": "permission", + "children": [ + { + "kind": "TypeNominal", + "name": "Bool", + "printedName": "Swift.Bool", + "usr": "s:Sb" + } + ], + "declKind": "Var", + "usr": "s:So15OSNotificationsP18OneSignalFrameworkE10permissionSbvpZ", + "mangledName": "$sSo15OSNotificationsP18OneSignalFrameworkE10permissionSbvpZ", + "moduleName": "OneSignalFramework", + "static": true, + "isFromExtension": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "Bool", + "printedName": "Swift.Bool", + "usr": "s:Sb" + } + ], + "declKind": "Accessor", + "usr": "s:So15OSNotificationsP18OneSignalFrameworkE10permissionSbvgZ", + "mangledName": "$sSo15OSNotificationsP18OneSignalFrameworkE10permissionSbvgZ", + "moduleName": "OneSignalFramework", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalNotifications.OSNotifications>", + "sugared_genericSig": "", + "static": true, + "isFromExtension": true, + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "canRequestPermission", + "printedName": "canRequestPermission", + "children": [ + { + "kind": "TypeNominal", + "name": "Bool", + "printedName": "Swift.Bool", + "usr": "s:Sb" + } + ], + "declKind": "Var", + "usr": "s:So15OSNotificationsP18OneSignalFrameworkE20canRequestPermissionSbvpZ", + "mangledName": "$sSo15OSNotificationsP18OneSignalFrameworkE20canRequestPermissionSbvpZ", + "moduleName": "OneSignalFramework", + "static": true, + "isFromExtension": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "Bool", + "printedName": "Swift.Bool", + "usr": "s:Sb" + } + ], + "declKind": "Accessor", + "usr": "s:So15OSNotificationsP18OneSignalFrameworkE20canRequestPermissionSbvgZ", + "mangledName": "$sSo15OSNotificationsP18OneSignalFrameworkE20canRequestPermissionSbvgZ", + "moduleName": "OneSignalFramework", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalNotifications.OSNotifications>", + "sugared_genericSig": "", + "static": true, + "isFromExtension": true, + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "permissionNative", + "printedName": "permissionNative", + "children": [ + { + "kind": "TypeNominal", + "name": "OSNotificationPermission", + "printedName": "OneSignalNotifications.OSNotificationPermission", + "usr": "c:@E@OSNotificationPermission" + } + ], + "declKind": "Var", + "usr": "s:So15OSNotificationsP18OneSignalFrameworkE16permissionNativeSo24OSNotificationPermissionVvpZ", + "mangledName": "$sSo15OSNotificationsP18OneSignalFrameworkE16permissionNativeSo24OSNotificationPermissionVvpZ", + "moduleName": "OneSignalFramework", + "static": true, + "isFromExtension": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "OSNotificationPermission", + "printedName": "OneSignalNotifications.OSNotificationPermission", + "usr": "c:@E@OSNotificationPermission" + } + ], + "declKind": "Accessor", + "usr": "s:So15OSNotificationsP18OneSignalFrameworkE16permissionNativeSo24OSNotificationPermissionVvgZ", + "mangledName": "$sSo15OSNotificationsP18OneSignalFrameworkE16permissionNativeSo24OSNotificationPermissionVvgZ", + "moduleName": "OneSignalFramework", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalNotifications.OSNotifications>", + "sugared_genericSig": "", + "static": true, + "isFromExtension": true, + "accessorKind": "get" + } + ] + }, + { + "kind": "Function", + "name": "registerForProvisionalAuthorization", + "printedName": "registerForProvisionalAuthorization(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "((Swift.Bool) -> ())?", + "children": [ + { + "kind": "TypeFunc", + "name": "Function", + "printedName": "(Swift.Bool) -> ()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "Bool", + "printedName": "Swift.Bool", + "usr": "s:Sb" + } + ] + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Func", + "usr": "s:So15OSNotificationsP18OneSignalFrameworkE35registerForProvisionalAuthorizationyyySbcSgFZ", + "mangledName": "$sSo15OSNotificationsP18OneSignalFrameworkE35registerForProvisionalAuthorizationyyySbcSgFZ", + "moduleName": "OneSignalFramework", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalNotifications.OSNotifications>", + "sugared_genericSig": "", + "static": true, + "isFromExtension": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "addPermissionObserver", + "printedName": "addPermissionObserver(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "OSNotificationPermissionObserver", + "printedName": "OneSignalNotifications.OSNotificationPermissionObserver", + "usr": "c:objc(pl)OSNotificationPermissionObserver" + } + ], + "declKind": "Func", + "usr": "s:So15OSNotificationsP18OneSignalFrameworkE21addPermissionObserveryySo014OSNotificationfG0_pFZ", + "mangledName": "$sSo15OSNotificationsP18OneSignalFrameworkE21addPermissionObserveryySo014OSNotificationfG0_pFZ", + "moduleName": "OneSignalFramework", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalNotifications.OSNotifications>", + "sugared_genericSig": "", + "static": true, + "isFromExtension": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "removePermissionObserver", + "printedName": "removePermissionObserver(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "OSNotificationPermissionObserver", + "printedName": "OneSignalNotifications.OSNotificationPermissionObserver", + "usr": "c:objc(pl)OSNotificationPermissionObserver" + } + ], + "declKind": "Func", + "usr": "s:So15OSNotificationsP18OneSignalFrameworkE24removePermissionObserveryySo014OSNotificationfG0_pFZ", + "mangledName": "$sSo15OSNotificationsP18OneSignalFrameworkE24removePermissionObserveryySo014OSNotificationfG0_pFZ", + "moduleName": "OneSignalFramework", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalNotifications.OSNotifications>", + "sugared_genericSig": "", + "static": true, + "isFromExtension": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "addClickListener", + "printedName": "addClickListener(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "OSNotificationClickListener", + "printedName": "OneSignalNotifications.OSNotificationClickListener", + "usr": "c:objc(pl)OSNotificationClickListener" + } + ], + "declKind": "Func", + "usr": "s:So15OSNotificationsP18OneSignalFrameworkE16addClickListeneryySo014OSNotificationfG0_pFZ", + "mangledName": "$sSo15OSNotificationsP18OneSignalFrameworkE16addClickListeneryySo014OSNotificationfG0_pFZ", + "moduleName": "OneSignalFramework", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalNotifications.OSNotifications>", + "sugared_genericSig": "", + "static": true, + "isFromExtension": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "removeClickListener", + "printedName": "removeClickListener(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "OSNotificationClickListener", + "printedName": "OneSignalNotifications.OSNotificationClickListener", + "usr": "c:objc(pl)OSNotificationClickListener" + } + ], + "declKind": "Func", + "usr": "s:So15OSNotificationsP18OneSignalFrameworkE19removeClickListeneryySo014OSNotificationfG0_pFZ", + "mangledName": "$sSo15OSNotificationsP18OneSignalFrameworkE19removeClickListeneryySo014OSNotificationfG0_pFZ", + "moduleName": "OneSignalFramework", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalNotifications.OSNotifications>", + "sugared_genericSig": "", + "static": true, + "isFromExtension": true, + "funcSelfKind": "NonMutating" + } + ], + "declKind": "Protocol", + "usr": "c:objc(pl)OSNotifications", + "moduleName": "OneSignalNotifications", + "genericSig": "<τ_0_0 : ObjectiveC.NSObjectProtocol>", + "sugared_genericSig": "", + "objc_name": "OSNotifications", + "declAttributes": [ + "ObjC", + "Dynamic" + ], + "isExternal": true + }, + { + "kind": "TypeDecl", + "name": "OSLocation", + "printedName": "OSLocation", + "children": [ + { + "kind": "Var", + "name": "isShared", + "printedName": "isShared", + "children": [ + { + "kind": "TypeNominal", + "name": "Bool", + "printedName": "Swift.Bool", + "usr": "s:Sb" + } + ], + "declKind": "Var", + "usr": "s:So10OSLocationP18OneSignalFrameworkE8isSharedSbvpZ", + "mangledName": "$sSo10OSLocationP18OneSignalFrameworkE8isSharedSbvpZ", + "moduleName": "OneSignalFramework", + "static": true, + "isFromExtension": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "Bool", + "printedName": "Swift.Bool", + "usr": "s:Sb" + } + ], + "declKind": "Accessor", + "usr": "s:So10OSLocationP18OneSignalFrameworkE8isSharedSbvgZ", + "mangledName": "$sSo10OSLocationP18OneSignalFrameworkE8isSharedSbvgZ", + "moduleName": "OneSignalFramework", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalCore.OSLocation>", + "sugared_genericSig": "", + "static": true, + "isFromExtension": true, + "accessorKind": "get" + }, + { + "kind": "Accessor", + "name": "Set", + "printedName": "Set()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "Bool", + "printedName": "Swift.Bool", + "usr": "s:Sb" + } + ], + "declKind": "Accessor", + "usr": "s:So10OSLocationP18OneSignalFrameworkE8isSharedSbvsZ", + "mangledName": "$sSo10OSLocationP18OneSignalFrameworkE8isSharedSbvsZ", + "moduleName": "OneSignalFramework", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalCore.OSLocation>", + "sugared_genericSig": "", + "static": true, + "isFromExtension": true, + "accessorKind": "set" + }, + { + "kind": "Accessor", + "name": "Modify", + "printedName": "Modify()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + } + ], + "declKind": "Accessor", + "usr": "s:So10OSLocationP18OneSignalFrameworkE8isSharedSbvMZ", + "mangledName": "$sSo10OSLocationP18OneSignalFrameworkE8isSharedSbvMZ", + "moduleName": "OneSignalFramework", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalCore.OSLocation>", + "sugared_genericSig": "", + "static": true, + "implicit": true, + "isFromExtension": true, + "accessorKind": "_modify" + } + ] + } + ], + "declKind": "Protocol", + "usr": "c:objc(pl)OSLocation", + "moduleName": "OneSignalCore", + "genericSig": "<τ_0_0 : ObjectiveC.NSObjectProtocol>", + "sugared_genericSig": "", + "objc_name": "OSLocation", + "declAttributes": [ + "ObjC", + "Dynamic" + ], + "isExternal": true + } + ], + "json_format_version": 8 + }, + "ConstValues": [] +} \ No newline at end of file diff --git a/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignalFramework.xcframework/ios-arm64_x86_64-simulator/OneSignalFramework.framework/Modules/OneSignalFramework.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface b/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignalFramework.xcframework/ios-arm64_x86_64-simulator/OneSignalFramework.framework/Modules/OneSignalFramework.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface new file mode 100644 index 000000000..1a6e22368 --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignalFramework.xcframework/ios-arm64_x86_64-simulator/OneSignalFramework.framework/Modules/OneSignalFramework.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface @@ -0,0 +1,74 @@ +// swift-interface-format-version: 1.0 +// swift-compiler-version: Apple Swift version 5.7.1 (swiftlang-5.7.1.135.3 clang-1400.0.29.51) +// swift-module-flags: -target arm64-apple-ios11.0-simulator -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -O -module-name OneSignalFramework +// swift-module-flags-ignorable: -enable-bare-slash-regex +import Foundation +import OneSignalCore +@_exported import OneSignalFramework +import OneSignalNotifications +import OneSignalOutcomes +import OneSignalUser +import Swift +import _Concurrency +import _StringProcessing +extension OneSignalFramework.OneSignal { + public static var User: OneSignalUser.OSUser { + get + } + public static var Notifications: OneSignalNotifications.OSNotifications.Type { + get + } + public static var Session: OneSignalOutcomes.OSSession.Type { + get + } + public static var InAppMessages: OneSignalCore.OSInAppMessages.Type { + get + } + public static var Debug: OneSignalCore.OSDebug.Type { + get + } + public static var Location: OneSignalCore.OSLocation.Type { + get + } + public static var LiveActivities: OneSignalFramework.OSLiveActivities.Type { + get + } +} +extension OneSignalCore.OSDebug { + public static func setAlertLevel(_ logLevel: OneSignalCore.ONE_S_LOG_LEVEL) +} +extension OneSignalCore.OSInAppMessages { + public static var paused: Swift.Bool { + get + set + } + public static func addLifecycleListener(_ listener: OneSignalCore.OSInAppMessageLifecycleListener) + public static func removeLifecycleListener(_ listener: OneSignalCore.OSInAppMessageLifecycleListener) + public static func addClickListener(_ listener: OneSignalCore.OSInAppMessageClickListener) + public static func removeClickListener(_ listener: OneSignalCore.OSInAppMessageClickListener) +} +extension OneSignalOutcomes.OSSession { + public static func addOutcome(_ name: Swift.String, _ value: Foundation.NSNumber) +} +extension OneSignalNotifications.OSNotifications { + public static var permission: Swift.Bool { + get + } + public static var canRequestPermission: Swift.Bool { + get + } + public static var permissionNative: OneSignalNotifications.OSNotificationPermission { + get + } + public static func registerForProvisionalAuthorization(_ block: OneSignalNotifications.OSUserResponseBlock?) + public static func addPermissionObserver(_ observer: OneSignalNotifications.OSNotificationPermissionObserver) + public static func removePermissionObserver(_ observer: OneSignalNotifications.OSNotificationPermissionObserver) + public static func addClickListener(_ listener: OneSignalNotifications.OSNotificationClickListener) + public static func removeClickListener(_ listener: OneSignalNotifications.OSNotificationClickListener) +} +extension OneSignalCore.OSLocation { + public static var isShared: Swift.Bool { + get + set + } +} diff --git a/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignalFramework.xcframework/ios-arm64_x86_64-simulator/OneSignalFramework.framework/Modules/OneSignalFramework.swiftmodule/arm64-apple-ios-simulator.swiftdoc b/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignalFramework.xcframework/ios-arm64_x86_64-simulator/OneSignalFramework.framework/Modules/OneSignalFramework.swiftmodule/arm64-apple-ios-simulator.swiftdoc new file mode 100644 index 000000000..b4158e8fe Binary files /dev/null and b/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignalFramework.xcframework/ios-arm64_x86_64-simulator/OneSignalFramework.framework/Modules/OneSignalFramework.swiftmodule/arm64-apple-ios-simulator.swiftdoc differ diff --git a/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignalFramework.xcframework/ios-arm64_x86_64-simulator/OneSignalFramework.framework/Modules/OneSignalFramework.swiftmodule/arm64-apple-ios-simulator.swiftinterface b/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignalFramework.xcframework/ios-arm64_x86_64-simulator/OneSignalFramework.framework/Modules/OneSignalFramework.swiftmodule/arm64-apple-ios-simulator.swiftinterface new file mode 100644 index 000000000..1a6e22368 --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignalFramework.xcframework/ios-arm64_x86_64-simulator/OneSignalFramework.framework/Modules/OneSignalFramework.swiftmodule/arm64-apple-ios-simulator.swiftinterface @@ -0,0 +1,74 @@ +// swift-interface-format-version: 1.0 +// swift-compiler-version: Apple Swift version 5.7.1 (swiftlang-5.7.1.135.3 clang-1400.0.29.51) +// swift-module-flags: -target arm64-apple-ios11.0-simulator -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -O -module-name OneSignalFramework +// swift-module-flags-ignorable: -enable-bare-slash-regex +import Foundation +import OneSignalCore +@_exported import OneSignalFramework +import OneSignalNotifications +import OneSignalOutcomes +import OneSignalUser +import Swift +import _Concurrency +import _StringProcessing +extension OneSignalFramework.OneSignal { + public static var User: OneSignalUser.OSUser { + get + } + public static var Notifications: OneSignalNotifications.OSNotifications.Type { + get + } + public static var Session: OneSignalOutcomes.OSSession.Type { + get + } + public static var InAppMessages: OneSignalCore.OSInAppMessages.Type { + get + } + public static var Debug: OneSignalCore.OSDebug.Type { + get + } + public static var Location: OneSignalCore.OSLocation.Type { + get + } + public static var LiveActivities: OneSignalFramework.OSLiveActivities.Type { + get + } +} +extension OneSignalCore.OSDebug { + public static func setAlertLevel(_ logLevel: OneSignalCore.ONE_S_LOG_LEVEL) +} +extension OneSignalCore.OSInAppMessages { + public static var paused: Swift.Bool { + get + set + } + public static func addLifecycleListener(_ listener: OneSignalCore.OSInAppMessageLifecycleListener) + public static func removeLifecycleListener(_ listener: OneSignalCore.OSInAppMessageLifecycleListener) + public static func addClickListener(_ listener: OneSignalCore.OSInAppMessageClickListener) + public static func removeClickListener(_ listener: OneSignalCore.OSInAppMessageClickListener) +} +extension OneSignalOutcomes.OSSession { + public static func addOutcome(_ name: Swift.String, _ value: Foundation.NSNumber) +} +extension OneSignalNotifications.OSNotifications { + public static var permission: Swift.Bool { + get + } + public static var canRequestPermission: Swift.Bool { + get + } + public static var permissionNative: OneSignalNotifications.OSNotificationPermission { + get + } + public static func registerForProvisionalAuthorization(_ block: OneSignalNotifications.OSUserResponseBlock?) + public static func addPermissionObserver(_ observer: OneSignalNotifications.OSNotificationPermissionObserver) + public static func removePermissionObserver(_ observer: OneSignalNotifications.OSNotificationPermissionObserver) + public static func addClickListener(_ listener: OneSignalNotifications.OSNotificationClickListener) + public static func removeClickListener(_ listener: OneSignalNotifications.OSNotificationClickListener) +} +extension OneSignalCore.OSLocation { + public static var isShared: Swift.Bool { + get + set + } +} diff --git a/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignalFramework.xcframework/ios-arm64_x86_64-simulator/OneSignalFramework.framework/Modules/OneSignalFramework.swiftmodule/x86_64-apple-ios-simulator.abi.json b/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignalFramework.xcframework/ios-arm64_x86_64-simulator/OneSignalFramework.framework/Modules/OneSignalFramework.swiftmodule/x86_64-apple-ios-simulator.abi.json new file mode 100644 index 000000000..8069d9ff4 --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignalFramework.xcframework/ios-arm64_x86_64-simulator/OneSignalFramework.framework/Modules/OneSignalFramework.swiftmodule/x86_64-apple-ios-simulator.abi.json @@ -0,0 +1,1261 @@ +{ + "ABIRoot": { + "kind": "Root", + "name": "TopLevel", + "printedName": "TopLevel", + "children": [ + { + "kind": "Import", + "name": "Foundation", + "printedName": "Foundation", + "declKind": "Import", + "moduleName": "OneSignalFramework", + "declAttributes": [ + "RawDocComment" + ] + }, + { + "kind": "Import", + "name": "OneSignalUser", + "printedName": "OneSignalUser", + "declKind": "Import", + "moduleName": "OneSignalFramework" + }, + { + "kind": "Import", + "name": "OneSignalOutcomes", + "printedName": "OneSignalOutcomes", + "declKind": "Import", + "moduleName": "OneSignalFramework" + }, + { + "kind": "Import", + "name": "OneSignalNotifications", + "printedName": "OneSignalNotifications", + "declKind": "Import", + "moduleName": "OneSignalFramework" + }, + { + "kind": "Import", + "name": "OneSignalCore", + "printedName": "OneSignalCore", + "declKind": "Import", + "moduleName": "OneSignalFramework" + }, + { + "kind": "TypeDecl", + "name": "OneSignal", + "printedName": "OneSignal", + "children": [ + { + "kind": "Var", + "name": "User", + "printedName": "User", + "children": [ + { + "kind": "TypeNominal", + "name": "OSUser", + "printedName": "OneSignalUser.OSUser", + "usr": "c:@M@OneSignalUser@objc(pl)OSUser" + } + ], + "declKind": "Var", + "usr": "s:So9OneSignalC0aB9FrameworkE4User0abD06OSUser_pvpZ", + "mangledName": "$sSo9OneSignalC0aB9FrameworkE4User0abD06OSUser_pvpZ", + "moduleName": "OneSignalFramework", + "static": true, + "declAttributes": [ + "Final" + ], + "isFromExtension": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "OSUser", + "printedName": "OneSignalUser.OSUser", + "usr": "c:@M@OneSignalUser@objc(pl)OSUser" + } + ], + "declKind": "Accessor", + "usr": "s:So9OneSignalC0aB9FrameworkE4User0abD06OSUser_pvgZ", + "mangledName": "$sSo9OneSignalC0aB9FrameworkE4User0abD06OSUser_pvgZ", + "moduleName": "OneSignalFramework", + "static": true, + "declAttributes": [ + "Final" + ], + "isFromExtension": true, + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "Notifications", + "printedName": "Notifications", + "children": [ + { + "kind": "TypeNominal", + "name": "ExistentialMetatype", + "printedName": "OneSignalNotifications.OSNotifications.Type", + "children": [ + { + "kind": "TypeNominal", + "name": "OSNotifications", + "printedName": "OneSignalNotifications.OSNotifications", + "usr": "c:objc(pl)OSNotifications" + } + ] + } + ], + "declKind": "Var", + "usr": "s:So9OneSignalC0aB9FrameworkE13NotificationsSo15OSNotifications_pXpvpZ", + "mangledName": "$sSo9OneSignalC0aB9FrameworkE13NotificationsSo15OSNotifications_pXpvpZ", + "moduleName": "OneSignalFramework", + "static": true, + "declAttributes": [ + "Final" + ], + "isFromExtension": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "ExistentialMetatype", + "printedName": "OneSignalNotifications.OSNotifications.Type", + "children": [ + { + "kind": "TypeNominal", + "name": "OSNotifications", + "printedName": "OneSignalNotifications.OSNotifications", + "usr": "c:objc(pl)OSNotifications" + } + ] + } + ], + "declKind": "Accessor", + "usr": "s:So9OneSignalC0aB9FrameworkE13NotificationsSo15OSNotifications_pXpvgZ", + "mangledName": "$sSo9OneSignalC0aB9FrameworkE13NotificationsSo15OSNotifications_pXpvgZ", + "moduleName": "OneSignalFramework", + "static": true, + "declAttributes": [ + "Final" + ], + "isFromExtension": true, + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "Session", + "printedName": "Session", + "children": [ + { + "kind": "TypeNominal", + "name": "ExistentialMetatype", + "printedName": "OneSignalOutcomes.OSSession.Type", + "children": [ + { + "kind": "TypeNominal", + "name": "OSSession", + "printedName": "OneSignalOutcomes.OSSession", + "usr": "c:objc(pl)OSSession" + } + ] + } + ], + "declKind": "Var", + "usr": "s:So9OneSignalC0aB9FrameworkE7SessionSo9OSSession_pXpvpZ", + "mangledName": "$sSo9OneSignalC0aB9FrameworkE7SessionSo9OSSession_pXpvpZ", + "moduleName": "OneSignalFramework", + "static": true, + "declAttributes": [ + "Final" + ], + "isFromExtension": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "ExistentialMetatype", + "printedName": "OneSignalOutcomes.OSSession.Type", + "children": [ + { + "kind": "TypeNominal", + "name": "OSSession", + "printedName": "OneSignalOutcomes.OSSession", + "usr": "c:objc(pl)OSSession" + } + ] + } + ], + "declKind": "Accessor", + "usr": "s:So9OneSignalC0aB9FrameworkE7SessionSo9OSSession_pXpvgZ", + "mangledName": "$sSo9OneSignalC0aB9FrameworkE7SessionSo9OSSession_pXpvgZ", + "moduleName": "OneSignalFramework", + "static": true, + "declAttributes": [ + "Final" + ], + "isFromExtension": true, + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "InAppMessages", + "printedName": "InAppMessages", + "children": [ + { + "kind": "TypeNominal", + "name": "ExistentialMetatype", + "printedName": "OneSignalCore.OSInAppMessages.Type", + "children": [ + { + "kind": "TypeNominal", + "name": "OSInAppMessages", + "printedName": "OneSignalCore.OSInAppMessages", + "usr": "c:objc(pl)OSInAppMessages" + } + ] + } + ], + "declKind": "Var", + "usr": "s:So9OneSignalC0aB9FrameworkE13InAppMessagesSo04OSIneF0_pXpvpZ", + "mangledName": "$sSo9OneSignalC0aB9FrameworkE13InAppMessagesSo04OSIneF0_pXpvpZ", + "moduleName": "OneSignalFramework", + "static": true, + "declAttributes": [ + "Final" + ], + "isFromExtension": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "ExistentialMetatype", + "printedName": "OneSignalCore.OSInAppMessages.Type", + "children": [ + { + "kind": "TypeNominal", + "name": "OSInAppMessages", + "printedName": "OneSignalCore.OSInAppMessages", + "usr": "c:objc(pl)OSInAppMessages" + } + ] + } + ], + "declKind": "Accessor", + "usr": "s:So9OneSignalC0aB9FrameworkE13InAppMessagesSo04OSIneF0_pXpvgZ", + "mangledName": "$sSo9OneSignalC0aB9FrameworkE13InAppMessagesSo04OSIneF0_pXpvgZ", + "moduleName": "OneSignalFramework", + "static": true, + "declAttributes": [ + "Final" + ], + "isFromExtension": true, + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "Debug", + "printedName": "Debug", + "children": [ + { + "kind": "TypeNominal", + "name": "ExistentialMetatype", + "printedName": "OneSignalCore.OSDebug.Type", + "children": [ + { + "kind": "TypeNominal", + "name": "OSDebug", + "printedName": "OneSignalCore.OSDebug", + "usr": "c:objc(pl)OSDebug" + } + ] + } + ], + "declKind": "Var", + "usr": "s:So9OneSignalC0aB9FrameworkE5DebugSo7OSDebug_pXpvpZ", + "mangledName": "$sSo9OneSignalC0aB9FrameworkE5DebugSo7OSDebug_pXpvpZ", + "moduleName": "OneSignalFramework", + "static": true, + "declAttributes": [ + "Final" + ], + "isFromExtension": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "ExistentialMetatype", + "printedName": "OneSignalCore.OSDebug.Type", + "children": [ + { + "kind": "TypeNominal", + "name": "OSDebug", + "printedName": "OneSignalCore.OSDebug", + "usr": "c:objc(pl)OSDebug" + } + ] + } + ], + "declKind": "Accessor", + "usr": "s:So9OneSignalC0aB9FrameworkE5DebugSo7OSDebug_pXpvgZ", + "mangledName": "$sSo9OneSignalC0aB9FrameworkE5DebugSo7OSDebug_pXpvgZ", + "moduleName": "OneSignalFramework", + "static": true, + "declAttributes": [ + "Final" + ], + "isFromExtension": true, + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "Location", + "printedName": "Location", + "children": [ + { + "kind": "TypeNominal", + "name": "ExistentialMetatype", + "printedName": "OneSignalCore.OSLocation.Type", + "children": [ + { + "kind": "TypeNominal", + "name": "OSLocation", + "printedName": "OneSignalCore.OSLocation", + "usr": "c:objc(pl)OSLocation" + } + ] + } + ], + "declKind": "Var", + "usr": "s:So9OneSignalC0aB9FrameworkE8LocationSo10OSLocation_pXpvpZ", + "mangledName": "$sSo9OneSignalC0aB9FrameworkE8LocationSo10OSLocation_pXpvpZ", + "moduleName": "OneSignalFramework", + "static": true, + "declAttributes": [ + "Final" + ], + "isFromExtension": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "ExistentialMetatype", + "printedName": "OneSignalCore.OSLocation.Type", + "children": [ + { + "kind": "TypeNominal", + "name": "OSLocation", + "printedName": "OneSignalCore.OSLocation", + "usr": "c:objc(pl)OSLocation" + } + ] + } + ], + "declKind": "Accessor", + "usr": "s:So9OneSignalC0aB9FrameworkE8LocationSo10OSLocation_pXpvgZ", + "mangledName": "$sSo9OneSignalC0aB9FrameworkE8LocationSo10OSLocation_pXpvgZ", + "moduleName": "OneSignalFramework", + "static": true, + "declAttributes": [ + "Final" + ], + "isFromExtension": true, + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "LiveActivities", + "printedName": "LiveActivities", + "children": [ + { + "kind": "TypeNominal", + "name": "ExistentialMetatype", + "printedName": "OneSignalFramework.OSLiveActivities.Type", + "children": [ + { + "kind": "TypeNominal", + "name": "OSLiveActivities", + "printedName": "OneSignalFramework.OSLiveActivities", + "usr": "c:objc(pl)OSLiveActivities" + } + ] + } + ], + "declKind": "Var", + "usr": "s:So9OneSignalC0aB9FrameworkE14LiveActivitiesSo06OSLiveE0_pXpvpZ", + "mangledName": "$sSo9OneSignalC0aB9FrameworkE14LiveActivitiesSo06OSLiveE0_pXpvpZ", + "moduleName": "OneSignalFramework", + "static": true, + "declAttributes": [ + "Final" + ], + "isFromExtension": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "ExistentialMetatype", + "printedName": "OneSignalFramework.OSLiveActivities.Type", + "children": [ + { + "kind": "TypeNominal", + "name": "OSLiveActivities", + "printedName": "OneSignalFramework.OSLiveActivities", + "usr": "c:objc(pl)OSLiveActivities" + } + ] + } + ], + "declKind": "Accessor", + "usr": "s:So9OneSignalC0aB9FrameworkE14LiveActivitiesSo06OSLiveE0_pXpvgZ", + "mangledName": "$sSo9OneSignalC0aB9FrameworkE14LiveActivitiesSo06OSLiveE0_pXpvgZ", + "moduleName": "OneSignalFramework", + "static": true, + "declAttributes": [ + "Final" + ], + "isFromExtension": true, + "accessorKind": "get" + } + ] + } + ], + "declKind": "Class", + "usr": "c:objc(cs)OneSignal", + "moduleName": "OneSignalFramework", + "isOpen": true, + "objc_name": "OneSignal", + "declAttributes": [ + "ObjC", + "Dynamic" + ], + "superclassUsr": "c:objc(cs)NSObject", + "isExternal": true, + "inheritsConvenienceInitializers": true, + "superclassNames": [ + "ObjectiveC.NSObject" + ], + "conformances": [ + { + "kind": "Conformance", + "name": "Equatable", + "printedName": "Equatable", + "usr": "s:SQ", + "mangledName": "$sSQ" + }, + { + "kind": "Conformance", + "name": "Hashable", + "printedName": "Hashable", + "usr": "s:SH", + "mangledName": "$sSH" + }, + { + "kind": "Conformance", + "name": "CVarArg", + "printedName": "CVarArg", + "usr": "s:s7CVarArgP", + "mangledName": "$ss7CVarArgP" + }, + { + "kind": "Conformance", + "name": "_KeyValueCodingAndObservingPublishing", + "printedName": "_KeyValueCodingAndObservingPublishing", + "usr": "s:10Foundation37_KeyValueCodingAndObservingPublishingP", + "mangledName": "$s10Foundation37_KeyValueCodingAndObservingPublishingP" + }, + { + "kind": "Conformance", + "name": "_KeyValueCodingAndObserving", + "printedName": "_KeyValueCodingAndObserving", + "usr": "s:10Foundation27_KeyValueCodingAndObservingP", + "mangledName": "$s10Foundation27_KeyValueCodingAndObservingP" + }, + { + "kind": "Conformance", + "name": "CustomStringConvertible", + "printedName": "CustomStringConvertible", + "usr": "s:s23CustomStringConvertibleP", + "mangledName": "$ss23CustomStringConvertibleP" + }, + { + "kind": "Conformance", + "name": "CustomDebugStringConvertible", + "printedName": "CustomDebugStringConvertible", + "usr": "s:s28CustomDebugStringConvertibleP", + "mangledName": "$ss28CustomDebugStringConvertibleP" + } + ] + }, + { + "kind": "TypeDecl", + "name": "OSDebug", + "printedName": "OSDebug", + "children": [ + { + "kind": "Function", + "name": "setAlertLevel", + "printedName": "setAlertLevel(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "ONE_S_LOG_LEVEL", + "printedName": "OneSignalCore.ONE_S_LOG_LEVEL", + "usr": "c:@E@ONE_S_LOG_LEVEL" + } + ], + "declKind": "Func", + "usr": "s:So7OSDebugP18OneSignalFrameworkE13setAlertLevelyySo15ONE_S_LOG_LEVELVFZ", + "mangledName": "$sSo7OSDebugP18OneSignalFrameworkE13setAlertLevelyySo15ONE_S_LOG_LEVELVFZ", + "moduleName": "OneSignalFramework", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalCore.OSDebug>", + "sugared_genericSig": "", + "static": true, + "isFromExtension": true, + "funcSelfKind": "NonMutating" + } + ], + "declKind": "Protocol", + "usr": "c:objc(pl)OSDebug", + "moduleName": "OneSignalCore", + "genericSig": "<τ_0_0 : ObjectiveC.NSObjectProtocol>", + "sugared_genericSig": "", + "objc_name": "OSDebug", + "declAttributes": [ + "ObjC", + "Dynamic" + ], + "isExternal": true + }, + { + "kind": "TypeDecl", + "name": "OSInAppMessages", + "printedName": "OSInAppMessages", + "children": [ + { + "kind": "Var", + "name": "paused", + "printedName": "paused", + "children": [ + { + "kind": "TypeNominal", + "name": "Bool", + "printedName": "Swift.Bool", + "usr": "s:Sb" + } + ], + "declKind": "Var", + "usr": "s:So15OSInAppMessagesP18OneSignalFrameworkE6pausedSbvpZ", + "mangledName": "$sSo15OSInAppMessagesP18OneSignalFrameworkE6pausedSbvpZ", + "moduleName": "OneSignalFramework", + "static": true, + "isFromExtension": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "Bool", + "printedName": "Swift.Bool", + "usr": "s:Sb" + } + ], + "declKind": "Accessor", + "usr": "s:So15OSInAppMessagesP18OneSignalFrameworkE6pausedSbvgZ", + "mangledName": "$sSo15OSInAppMessagesP18OneSignalFrameworkE6pausedSbvgZ", + "moduleName": "OneSignalFramework", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalCore.OSInAppMessages>", + "sugared_genericSig": "", + "static": true, + "isFromExtension": true, + "accessorKind": "get" + }, + { + "kind": "Accessor", + "name": "Set", + "printedName": "Set()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "Bool", + "printedName": "Swift.Bool", + "usr": "s:Sb" + } + ], + "declKind": "Accessor", + "usr": "s:So15OSInAppMessagesP18OneSignalFrameworkE6pausedSbvsZ", + "mangledName": "$sSo15OSInAppMessagesP18OneSignalFrameworkE6pausedSbvsZ", + "moduleName": "OneSignalFramework", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalCore.OSInAppMessages>", + "sugared_genericSig": "", + "static": true, + "isFromExtension": true, + "accessorKind": "set" + }, + { + "kind": "Accessor", + "name": "Modify", + "printedName": "Modify()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + } + ], + "declKind": "Accessor", + "usr": "s:So15OSInAppMessagesP18OneSignalFrameworkE6pausedSbvMZ", + "mangledName": "$sSo15OSInAppMessagesP18OneSignalFrameworkE6pausedSbvMZ", + "moduleName": "OneSignalFramework", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalCore.OSInAppMessages>", + "sugared_genericSig": "", + "static": true, + "implicit": true, + "isFromExtension": true, + "accessorKind": "_modify" + } + ] + }, + { + "kind": "Function", + "name": "addLifecycleListener", + "printedName": "addLifecycleListener(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "OSInAppMessageLifecycleListener", + "printedName": "OneSignalCore.OSInAppMessageLifecycleListener", + "usr": "c:objc(pl)OSInAppMessageLifecycleListener" + } + ], + "declKind": "Func", + "usr": "s:So15OSInAppMessagesP18OneSignalFrameworkE20addLifecycleListeneryySo0ab7MessagehI0_pFZ", + "mangledName": "$sSo15OSInAppMessagesP18OneSignalFrameworkE20addLifecycleListeneryySo0ab7MessagehI0_pFZ", + "moduleName": "OneSignalFramework", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalCore.OSInAppMessages>", + "sugared_genericSig": "", + "static": true, + "isFromExtension": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "removeLifecycleListener", + "printedName": "removeLifecycleListener(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "OSInAppMessageLifecycleListener", + "printedName": "OneSignalCore.OSInAppMessageLifecycleListener", + "usr": "c:objc(pl)OSInAppMessageLifecycleListener" + } + ], + "declKind": "Func", + "usr": "s:So15OSInAppMessagesP18OneSignalFrameworkE23removeLifecycleListeneryySo0ab7MessagehI0_pFZ", + "mangledName": "$sSo15OSInAppMessagesP18OneSignalFrameworkE23removeLifecycleListeneryySo0ab7MessagehI0_pFZ", + "moduleName": "OneSignalFramework", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalCore.OSInAppMessages>", + "sugared_genericSig": "", + "static": true, + "isFromExtension": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "addClickListener", + "printedName": "addClickListener(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "OSInAppMessageClickListener", + "printedName": "OneSignalCore.OSInAppMessageClickListener", + "usr": "c:objc(pl)OSInAppMessageClickListener" + } + ], + "declKind": "Func", + "usr": "s:So15OSInAppMessagesP18OneSignalFrameworkE16addClickListeneryySo0ab7MessagehI0_pFZ", + "mangledName": "$sSo15OSInAppMessagesP18OneSignalFrameworkE16addClickListeneryySo0ab7MessagehI0_pFZ", + "moduleName": "OneSignalFramework", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalCore.OSInAppMessages>", + "sugared_genericSig": "", + "static": true, + "isFromExtension": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "removeClickListener", + "printedName": "removeClickListener(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "OSInAppMessageClickListener", + "printedName": "OneSignalCore.OSInAppMessageClickListener", + "usr": "c:objc(pl)OSInAppMessageClickListener" + } + ], + "declKind": "Func", + "usr": "s:So15OSInAppMessagesP18OneSignalFrameworkE19removeClickListeneryySo0ab7MessagehI0_pFZ", + "mangledName": "$sSo15OSInAppMessagesP18OneSignalFrameworkE19removeClickListeneryySo0ab7MessagehI0_pFZ", + "moduleName": "OneSignalFramework", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalCore.OSInAppMessages>", + "sugared_genericSig": "", + "static": true, + "isFromExtension": true, + "funcSelfKind": "NonMutating" + } + ], + "declKind": "Protocol", + "usr": "c:objc(pl)OSInAppMessages", + "moduleName": "OneSignalCore", + "genericSig": "<τ_0_0 : ObjectiveC.NSObjectProtocol>", + "sugared_genericSig": "", + "objc_name": "OSInAppMessages", + "declAttributes": [ + "ObjC", + "Dynamic" + ], + "isExternal": true + }, + { + "kind": "TypeDecl", + "name": "OSSession", + "printedName": "OSSession", + "children": [ + { + "kind": "Function", + "name": "addOutcome", + "printedName": "addOutcome(_:_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + }, + { + "kind": "TypeNominal", + "name": "NSNumber", + "printedName": "Foundation.NSNumber", + "usr": "c:objc(cs)NSNumber" + } + ], + "declKind": "Func", + "usr": "s:So9OSSessionP18OneSignalFrameworkE10addOutcomeyySS_So8NSNumberCtFZ", + "mangledName": "$sSo9OSSessionP18OneSignalFrameworkE10addOutcomeyySS_So8NSNumberCtFZ", + "moduleName": "OneSignalFramework", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalOutcomes.OSSession>", + "sugared_genericSig": "", + "static": true, + "isFromExtension": true, + "funcSelfKind": "NonMutating" + } + ], + "declKind": "Protocol", + "usr": "c:objc(pl)OSSession", + "moduleName": "OneSignalOutcomes", + "genericSig": "<τ_0_0 : ObjectiveC.NSObjectProtocol>", + "sugared_genericSig": "", + "objc_name": "OSSession", + "declAttributes": [ + "ObjC", + "Dynamic" + ], + "isExternal": true + }, + { + "kind": "TypeDecl", + "name": "OSNotifications", + "printedName": "OSNotifications", + "children": [ + { + "kind": "Var", + "name": "permission", + "printedName": "permission", + "children": [ + { + "kind": "TypeNominal", + "name": "Bool", + "printedName": "Swift.Bool", + "usr": "s:Sb" + } + ], + "declKind": "Var", + "usr": "s:So15OSNotificationsP18OneSignalFrameworkE10permissionSbvpZ", + "mangledName": "$sSo15OSNotificationsP18OneSignalFrameworkE10permissionSbvpZ", + "moduleName": "OneSignalFramework", + "static": true, + "isFromExtension": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "Bool", + "printedName": "Swift.Bool", + "usr": "s:Sb" + } + ], + "declKind": "Accessor", + "usr": "s:So15OSNotificationsP18OneSignalFrameworkE10permissionSbvgZ", + "mangledName": "$sSo15OSNotificationsP18OneSignalFrameworkE10permissionSbvgZ", + "moduleName": "OneSignalFramework", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalNotifications.OSNotifications>", + "sugared_genericSig": "", + "static": true, + "isFromExtension": true, + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "canRequestPermission", + "printedName": "canRequestPermission", + "children": [ + { + "kind": "TypeNominal", + "name": "Bool", + "printedName": "Swift.Bool", + "usr": "s:Sb" + } + ], + "declKind": "Var", + "usr": "s:So15OSNotificationsP18OneSignalFrameworkE20canRequestPermissionSbvpZ", + "mangledName": "$sSo15OSNotificationsP18OneSignalFrameworkE20canRequestPermissionSbvpZ", + "moduleName": "OneSignalFramework", + "static": true, + "isFromExtension": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "Bool", + "printedName": "Swift.Bool", + "usr": "s:Sb" + } + ], + "declKind": "Accessor", + "usr": "s:So15OSNotificationsP18OneSignalFrameworkE20canRequestPermissionSbvgZ", + "mangledName": "$sSo15OSNotificationsP18OneSignalFrameworkE20canRequestPermissionSbvgZ", + "moduleName": "OneSignalFramework", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalNotifications.OSNotifications>", + "sugared_genericSig": "", + "static": true, + "isFromExtension": true, + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "permissionNative", + "printedName": "permissionNative", + "children": [ + { + "kind": "TypeNominal", + "name": "OSNotificationPermission", + "printedName": "OneSignalNotifications.OSNotificationPermission", + "usr": "c:@E@OSNotificationPermission" + } + ], + "declKind": "Var", + "usr": "s:So15OSNotificationsP18OneSignalFrameworkE16permissionNativeSo24OSNotificationPermissionVvpZ", + "mangledName": "$sSo15OSNotificationsP18OneSignalFrameworkE16permissionNativeSo24OSNotificationPermissionVvpZ", + "moduleName": "OneSignalFramework", + "static": true, + "isFromExtension": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "OSNotificationPermission", + "printedName": "OneSignalNotifications.OSNotificationPermission", + "usr": "c:@E@OSNotificationPermission" + } + ], + "declKind": "Accessor", + "usr": "s:So15OSNotificationsP18OneSignalFrameworkE16permissionNativeSo24OSNotificationPermissionVvgZ", + "mangledName": "$sSo15OSNotificationsP18OneSignalFrameworkE16permissionNativeSo24OSNotificationPermissionVvgZ", + "moduleName": "OneSignalFramework", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalNotifications.OSNotifications>", + "sugared_genericSig": "", + "static": true, + "isFromExtension": true, + "accessorKind": "get" + } + ] + }, + { + "kind": "Function", + "name": "registerForProvisionalAuthorization", + "printedName": "registerForProvisionalAuthorization(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "((Swift.Bool) -> ())?", + "children": [ + { + "kind": "TypeFunc", + "name": "Function", + "printedName": "(Swift.Bool) -> ()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "Bool", + "printedName": "Swift.Bool", + "usr": "s:Sb" + } + ] + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Func", + "usr": "s:So15OSNotificationsP18OneSignalFrameworkE35registerForProvisionalAuthorizationyyySbcSgFZ", + "mangledName": "$sSo15OSNotificationsP18OneSignalFrameworkE35registerForProvisionalAuthorizationyyySbcSgFZ", + "moduleName": "OneSignalFramework", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalNotifications.OSNotifications>", + "sugared_genericSig": "", + "static": true, + "isFromExtension": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "addPermissionObserver", + "printedName": "addPermissionObserver(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "OSNotificationPermissionObserver", + "printedName": "OneSignalNotifications.OSNotificationPermissionObserver", + "usr": "c:objc(pl)OSNotificationPermissionObserver" + } + ], + "declKind": "Func", + "usr": "s:So15OSNotificationsP18OneSignalFrameworkE21addPermissionObserveryySo014OSNotificationfG0_pFZ", + "mangledName": "$sSo15OSNotificationsP18OneSignalFrameworkE21addPermissionObserveryySo014OSNotificationfG0_pFZ", + "moduleName": "OneSignalFramework", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalNotifications.OSNotifications>", + "sugared_genericSig": "", + "static": true, + "isFromExtension": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "removePermissionObserver", + "printedName": "removePermissionObserver(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "OSNotificationPermissionObserver", + "printedName": "OneSignalNotifications.OSNotificationPermissionObserver", + "usr": "c:objc(pl)OSNotificationPermissionObserver" + } + ], + "declKind": "Func", + "usr": "s:So15OSNotificationsP18OneSignalFrameworkE24removePermissionObserveryySo014OSNotificationfG0_pFZ", + "mangledName": "$sSo15OSNotificationsP18OneSignalFrameworkE24removePermissionObserveryySo014OSNotificationfG0_pFZ", + "moduleName": "OneSignalFramework", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalNotifications.OSNotifications>", + "sugared_genericSig": "", + "static": true, + "isFromExtension": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "addClickListener", + "printedName": "addClickListener(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "OSNotificationClickListener", + "printedName": "OneSignalNotifications.OSNotificationClickListener", + "usr": "c:objc(pl)OSNotificationClickListener" + } + ], + "declKind": "Func", + "usr": "s:So15OSNotificationsP18OneSignalFrameworkE16addClickListeneryySo014OSNotificationfG0_pFZ", + "mangledName": "$sSo15OSNotificationsP18OneSignalFrameworkE16addClickListeneryySo014OSNotificationfG0_pFZ", + "moduleName": "OneSignalFramework", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalNotifications.OSNotifications>", + "sugared_genericSig": "", + "static": true, + "isFromExtension": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "removeClickListener", + "printedName": "removeClickListener(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "OSNotificationClickListener", + "printedName": "OneSignalNotifications.OSNotificationClickListener", + "usr": "c:objc(pl)OSNotificationClickListener" + } + ], + "declKind": "Func", + "usr": "s:So15OSNotificationsP18OneSignalFrameworkE19removeClickListeneryySo014OSNotificationfG0_pFZ", + "mangledName": "$sSo15OSNotificationsP18OneSignalFrameworkE19removeClickListeneryySo014OSNotificationfG0_pFZ", + "moduleName": "OneSignalFramework", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalNotifications.OSNotifications>", + "sugared_genericSig": "", + "static": true, + "isFromExtension": true, + "funcSelfKind": "NonMutating" + } + ], + "declKind": "Protocol", + "usr": "c:objc(pl)OSNotifications", + "moduleName": "OneSignalNotifications", + "genericSig": "<τ_0_0 : ObjectiveC.NSObjectProtocol>", + "sugared_genericSig": "", + "objc_name": "OSNotifications", + "declAttributes": [ + "ObjC", + "Dynamic" + ], + "isExternal": true + }, + { + "kind": "TypeDecl", + "name": "OSLocation", + "printedName": "OSLocation", + "children": [ + { + "kind": "Var", + "name": "isShared", + "printedName": "isShared", + "children": [ + { + "kind": "TypeNominal", + "name": "Bool", + "printedName": "Swift.Bool", + "usr": "s:Sb" + } + ], + "declKind": "Var", + "usr": "s:So10OSLocationP18OneSignalFrameworkE8isSharedSbvpZ", + "mangledName": "$sSo10OSLocationP18OneSignalFrameworkE8isSharedSbvpZ", + "moduleName": "OneSignalFramework", + "static": true, + "isFromExtension": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "Bool", + "printedName": "Swift.Bool", + "usr": "s:Sb" + } + ], + "declKind": "Accessor", + "usr": "s:So10OSLocationP18OneSignalFrameworkE8isSharedSbvgZ", + "mangledName": "$sSo10OSLocationP18OneSignalFrameworkE8isSharedSbvgZ", + "moduleName": "OneSignalFramework", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalCore.OSLocation>", + "sugared_genericSig": "", + "static": true, + "isFromExtension": true, + "accessorKind": "get" + }, + { + "kind": "Accessor", + "name": "Set", + "printedName": "Set()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "Bool", + "printedName": "Swift.Bool", + "usr": "s:Sb" + } + ], + "declKind": "Accessor", + "usr": "s:So10OSLocationP18OneSignalFrameworkE8isSharedSbvsZ", + "mangledName": "$sSo10OSLocationP18OneSignalFrameworkE8isSharedSbvsZ", + "moduleName": "OneSignalFramework", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalCore.OSLocation>", + "sugared_genericSig": "", + "static": true, + "isFromExtension": true, + "accessorKind": "set" + }, + { + "kind": "Accessor", + "name": "Modify", + "printedName": "Modify()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + } + ], + "declKind": "Accessor", + "usr": "s:So10OSLocationP18OneSignalFrameworkE8isSharedSbvMZ", + "mangledName": "$sSo10OSLocationP18OneSignalFrameworkE8isSharedSbvMZ", + "moduleName": "OneSignalFramework", + "genericSig": "<τ_0_0 where τ_0_0 : OneSignalCore.OSLocation>", + "sugared_genericSig": "", + "static": true, + "implicit": true, + "isFromExtension": true, + "accessorKind": "_modify" + } + ] + } + ], + "declKind": "Protocol", + "usr": "c:objc(pl)OSLocation", + "moduleName": "OneSignalCore", + "genericSig": "<τ_0_0 : ObjectiveC.NSObjectProtocol>", + "sugared_genericSig": "", + "objc_name": "OSLocation", + "declAttributes": [ + "ObjC", + "Dynamic" + ], + "isExternal": true + } + ], + "json_format_version": 8 + }, + "ConstValues": [] +} \ No newline at end of file diff --git a/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignalFramework.xcframework/ios-arm64_x86_64-simulator/OneSignalFramework.framework/Modules/OneSignalFramework.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface b/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignalFramework.xcframework/ios-arm64_x86_64-simulator/OneSignalFramework.framework/Modules/OneSignalFramework.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface new file mode 100644 index 000000000..07e42f205 --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignalFramework.xcframework/ios-arm64_x86_64-simulator/OneSignalFramework.framework/Modules/OneSignalFramework.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface @@ -0,0 +1,74 @@ +// swift-interface-format-version: 1.0 +// swift-compiler-version: Apple Swift version 5.7.1 (swiftlang-5.7.1.135.3 clang-1400.0.29.51) +// swift-module-flags: -target x86_64-apple-ios11.0-simulator -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -O -module-name OneSignalFramework +// swift-module-flags-ignorable: -enable-bare-slash-regex +import Foundation +import OneSignalCore +@_exported import OneSignalFramework +import OneSignalNotifications +import OneSignalOutcomes +import OneSignalUser +import Swift +import _Concurrency +import _StringProcessing +extension OneSignalFramework.OneSignal { + public static var User: OneSignalUser.OSUser { + get + } + public static var Notifications: OneSignalNotifications.OSNotifications.Type { + get + } + public static var Session: OneSignalOutcomes.OSSession.Type { + get + } + public static var InAppMessages: OneSignalCore.OSInAppMessages.Type { + get + } + public static var Debug: OneSignalCore.OSDebug.Type { + get + } + public static var Location: OneSignalCore.OSLocation.Type { + get + } + public static var LiveActivities: OneSignalFramework.OSLiveActivities.Type { + get + } +} +extension OneSignalCore.OSDebug { + public static func setAlertLevel(_ logLevel: OneSignalCore.ONE_S_LOG_LEVEL) +} +extension OneSignalCore.OSInAppMessages { + public static var paused: Swift.Bool { + get + set + } + public static func addLifecycleListener(_ listener: OneSignalCore.OSInAppMessageLifecycleListener) + public static func removeLifecycleListener(_ listener: OneSignalCore.OSInAppMessageLifecycleListener) + public static func addClickListener(_ listener: OneSignalCore.OSInAppMessageClickListener) + public static func removeClickListener(_ listener: OneSignalCore.OSInAppMessageClickListener) +} +extension OneSignalOutcomes.OSSession { + public static func addOutcome(_ name: Swift.String, _ value: Foundation.NSNumber) +} +extension OneSignalNotifications.OSNotifications { + public static var permission: Swift.Bool { + get + } + public static var canRequestPermission: Swift.Bool { + get + } + public static var permissionNative: OneSignalNotifications.OSNotificationPermission { + get + } + public static func registerForProvisionalAuthorization(_ block: OneSignalNotifications.OSUserResponseBlock?) + public static func addPermissionObserver(_ observer: OneSignalNotifications.OSNotificationPermissionObserver) + public static func removePermissionObserver(_ observer: OneSignalNotifications.OSNotificationPermissionObserver) + public static func addClickListener(_ listener: OneSignalNotifications.OSNotificationClickListener) + public static func removeClickListener(_ listener: OneSignalNotifications.OSNotificationClickListener) +} +extension OneSignalCore.OSLocation { + public static var isShared: Swift.Bool { + get + set + } +} diff --git a/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignalFramework.xcframework/ios-arm64_x86_64-simulator/OneSignalFramework.framework/Modules/OneSignalFramework.swiftmodule/x86_64-apple-ios-simulator.swiftdoc b/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignalFramework.xcframework/ios-arm64_x86_64-simulator/OneSignalFramework.framework/Modules/OneSignalFramework.swiftmodule/x86_64-apple-ios-simulator.swiftdoc new file mode 100644 index 000000000..774848fb6 Binary files /dev/null and b/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignalFramework.xcframework/ios-arm64_x86_64-simulator/OneSignalFramework.framework/Modules/OneSignalFramework.swiftmodule/x86_64-apple-ios-simulator.swiftdoc differ diff --git a/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignalFramework.xcframework/ios-arm64_x86_64-simulator/OneSignalFramework.framework/Modules/OneSignalFramework.swiftmodule/x86_64-apple-ios-simulator.swiftinterface b/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignalFramework.xcframework/ios-arm64_x86_64-simulator/OneSignalFramework.framework/Modules/OneSignalFramework.swiftmodule/x86_64-apple-ios-simulator.swiftinterface new file mode 100644 index 000000000..07e42f205 --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignalFramework.xcframework/ios-arm64_x86_64-simulator/OneSignalFramework.framework/Modules/OneSignalFramework.swiftmodule/x86_64-apple-ios-simulator.swiftinterface @@ -0,0 +1,74 @@ +// swift-interface-format-version: 1.0 +// swift-compiler-version: Apple Swift version 5.7.1 (swiftlang-5.7.1.135.3 clang-1400.0.29.51) +// swift-module-flags: -target x86_64-apple-ios11.0-simulator -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -O -module-name OneSignalFramework +// swift-module-flags-ignorable: -enable-bare-slash-regex +import Foundation +import OneSignalCore +@_exported import OneSignalFramework +import OneSignalNotifications +import OneSignalOutcomes +import OneSignalUser +import Swift +import _Concurrency +import _StringProcessing +extension OneSignalFramework.OneSignal { + public static var User: OneSignalUser.OSUser { + get + } + public static var Notifications: OneSignalNotifications.OSNotifications.Type { + get + } + public static var Session: OneSignalOutcomes.OSSession.Type { + get + } + public static var InAppMessages: OneSignalCore.OSInAppMessages.Type { + get + } + public static var Debug: OneSignalCore.OSDebug.Type { + get + } + public static var Location: OneSignalCore.OSLocation.Type { + get + } + public static var LiveActivities: OneSignalFramework.OSLiveActivities.Type { + get + } +} +extension OneSignalCore.OSDebug { + public static func setAlertLevel(_ logLevel: OneSignalCore.ONE_S_LOG_LEVEL) +} +extension OneSignalCore.OSInAppMessages { + public static var paused: Swift.Bool { + get + set + } + public static func addLifecycleListener(_ listener: OneSignalCore.OSInAppMessageLifecycleListener) + public static func removeLifecycleListener(_ listener: OneSignalCore.OSInAppMessageLifecycleListener) + public static func addClickListener(_ listener: OneSignalCore.OSInAppMessageClickListener) + public static func removeClickListener(_ listener: OneSignalCore.OSInAppMessageClickListener) +} +extension OneSignalOutcomes.OSSession { + public static func addOutcome(_ name: Swift.String, _ value: Foundation.NSNumber) +} +extension OneSignalNotifications.OSNotifications { + public static var permission: Swift.Bool { + get + } + public static var canRequestPermission: Swift.Bool { + get + } + public static var permissionNative: OneSignalNotifications.OSNotificationPermission { + get + } + public static func registerForProvisionalAuthorization(_ block: OneSignalNotifications.OSUserResponseBlock?) + public static func addPermissionObserver(_ observer: OneSignalNotifications.OSNotificationPermissionObserver) + public static func removePermissionObserver(_ observer: OneSignalNotifications.OSNotificationPermissionObserver) + public static func addClickListener(_ listener: OneSignalNotifications.OSNotificationClickListener) + public static func removeClickListener(_ listener: OneSignalNotifications.OSNotificationClickListener) +} +extension OneSignalCore.OSLocation { + public static var isShared: Swift.Bool { + get + set + } +} diff --git a/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignalFramework.xcframework/ios-arm64_x86_64-simulator/OneSignalFramework.framework/Modules/module.modulemap b/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignalFramework.xcframework/ios-arm64_x86_64-simulator/OneSignalFramework.framework/Modules/module.modulemap new file mode 100644 index 000000000..fc1a467a1 --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignalFramework.xcframework/ios-arm64_x86_64-simulator/OneSignalFramework.framework/Modules/module.modulemap @@ -0,0 +1,11 @@ +framework module OneSignalFramework { + umbrella header "OneSignalFramework.h" + + export * + module * { export * } +} + +module OneSignalFramework.Swift { + header "OneSignalFramework-Swift.h" + requires objc +} diff --git a/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignalFramework.xcframework/ios-arm64_x86_64-simulator/OneSignalFramework.framework/OneSignalFramework b/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignalFramework.xcframework/ios-arm64_x86_64-simulator/OneSignalFramework.framework/OneSignalFramework new file mode 100755 index 000000000..361b22d56 Binary files /dev/null and b/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignalFramework.xcframework/ios-arm64_x86_64-simulator/OneSignalFramework.framework/OneSignalFramework differ diff --git a/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignalFramework.xcframework/ios-arm64_x86_64-simulator/OneSignalFramework.framework/_CodeSignature/CodeResources b/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignalFramework.xcframework/ios-arm64_x86_64-simulator/OneSignalFramework.framework/_CodeSignature/CodeResources new file mode 100644 index 000000000..75a6f027d --- /dev/null +++ b/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignalFramework.xcframework/ios-arm64_x86_64-simulator/OneSignalFramework.framework/_CodeSignature/CodeResources @@ -0,0 +1,256 @@ + + + + + files + + Headers/OneSignalFramework-Swift.h + + 2+tByJGua9zICz3YItQ4SMnQg3A= + + Headers/OneSignalFramework.h + + 9itK0IPZMMHkFz9QtBRytQstVAg= + + Headers/OneSignalLiveActivityController.h + + sLkeDG3/Xeo28t3Ky7I7B5l5xNU= + + Info.plist + + 3VhqXi53CHkubEe+/zHHqUl3I80= + + Modules/OneSignalFramework.swiftmodule/arm64-apple-ios-simulator.abi.json + + 6Wdqq8AYVRUGszzCAxY/aAwYBWY= + + Modules/OneSignalFramework.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface + + FDTTViGtVAyU253pqKyPnQ7n/QQ= + + Modules/OneSignalFramework.swiftmodule/arm64-apple-ios-simulator.swiftdoc + + 1iuW4sV6gIWtWQvZpYJ0Y6w+4Es= + + Modules/OneSignalFramework.swiftmodule/arm64-apple-ios-simulator.swiftinterface + + FDTTViGtVAyU253pqKyPnQ7n/QQ= + + Modules/OneSignalFramework.swiftmodule/arm64-apple-ios-simulator.swiftmodule + + FcVtnBR3ocmlt/jsAksdcJTuU4k= + + Modules/OneSignalFramework.swiftmodule/x86_64-apple-ios-simulator.abi.json + + 6Wdqq8AYVRUGszzCAxY/aAwYBWY= + + Modules/OneSignalFramework.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface + + 8221OfgIc3D7J3T8qObnKWhO9tc= + + Modules/OneSignalFramework.swiftmodule/x86_64-apple-ios-simulator.swiftdoc + + 6rCjJpTtNirJkqkYWGA8kPi6mFA= + + Modules/OneSignalFramework.swiftmodule/x86_64-apple-ios-simulator.swiftinterface + + 8221OfgIc3D7J3T8qObnKWhO9tc= + + Modules/OneSignalFramework.swiftmodule/x86_64-apple-ios-simulator.swiftmodule + + Z7GoK2pf3j5gkVuh4f/Llq/v1Y4= + + Modules/module.modulemap + + 1KqmkcIhSUBPW8iZkf/Z4P2a52Y= + + + files2 + + Headers/OneSignalFramework-Swift.h + + hash2 + + 0yMcCvCfA5xSymmrQMVwZel/Bx1RRLKu97XOebuNg4E= + + + Headers/OneSignalFramework.h + + hash2 + + NEzaMnk9bedEnbooLAx15Lgb7BtmzSYH0IXKZVLoFks= + + + Headers/OneSignalLiveActivityController.h + + hash2 + + +oO3N49+XSJuiujvebt9LPrE3ttxWo9qaX8GbOJi6ao= + + + Modules/OneSignalFramework.swiftmodule/arm64-apple-ios-simulator.abi.json + + hash2 + + hTFfQXVKES1b5ZUKX+ING+p5RT3M9PzesVhgDFiu9wg= + + + Modules/OneSignalFramework.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface + + hash2 + + wjQEOV2MVyNv2dCDpbihW7PW5vf7YbF1UTk/f+3Lm6s= + + + Modules/OneSignalFramework.swiftmodule/arm64-apple-ios-simulator.swiftdoc + + hash2 + + ANKtVOou8eGq4RbF0bIFz0CG5Qrwt3ZgHRnuPJh4wkg= + + + Modules/OneSignalFramework.swiftmodule/arm64-apple-ios-simulator.swiftinterface + + hash2 + + wjQEOV2MVyNv2dCDpbihW7PW5vf7YbF1UTk/f+3Lm6s= + + + Modules/OneSignalFramework.swiftmodule/arm64-apple-ios-simulator.swiftmodule + + hash2 + + Mpy3sM+rXq04voGSYQy2clsl6BuFDUvcjK2RbGPx3tM= + + + Modules/OneSignalFramework.swiftmodule/x86_64-apple-ios-simulator.abi.json + + hash2 + + hTFfQXVKES1b5ZUKX+ING+p5RT3M9PzesVhgDFiu9wg= + + + Modules/OneSignalFramework.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface + + hash2 + + atUnWFndyCayzgpUMVWNs37Jl4H3xGxB93TQbbn7tsQ= + + + Modules/OneSignalFramework.swiftmodule/x86_64-apple-ios-simulator.swiftdoc + + hash2 + + 7QWi8kcrrXy8tJXvTWXjUM4OCdFDnu1eAdtMYC17bUI= + + + Modules/OneSignalFramework.swiftmodule/x86_64-apple-ios-simulator.swiftinterface + + hash2 + + atUnWFndyCayzgpUMVWNs37Jl4H3xGxB93TQbbn7tsQ= + + + Modules/OneSignalFramework.swiftmodule/x86_64-apple-ios-simulator.swiftmodule + + hash2 + + 6T8Er1k/Bwpb/s4xDvU0vl94duEGh4YC79gxDLKJUhI= + + + Modules/module.modulemap + + hash2 + + uYyaBTiMLs8etIRoMNFdTIeKglpV+7S9AKNWsoMjzZk= + + + + rules + + ^.* + + ^.*\.lproj/ + + optional + + weight + 1000 + + ^.*\.lproj/locversion.plist$ + + omit + + weight + 1100 + + ^Base\.lproj/ + + weight + 1010 + + ^version.plist$ + + + rules2 + + .*\.dSYM($|/) + + weight + 11 + + ^(.*/)?\.DS_Store$ + + omit + + weight + 2000 + + ^.* + + ^.*\.lproj/ + + optional + + weight + 1000 + + ^.*\.lproj/locversion.plist$ + + omit + + weight + 1100 + + ^Base\.lproj/ + + weight + 1010 + + ^Info\.plist$ + + omit + + weight + 20 + + ^PkgInfo$ + + omit + + weight + 20 + + ^embedded\.provisionprofile$ + + weight + 20 + + ^version\.plist$ + + weight + 20 + + + + diff --git a/iOS_SDK/OneSignalSDK/Source/DelayedConsentInitializationParameters.h b/iOS_SDK/OneSignalSDK/Source/DelayedConsentInitializationParameters.h index 98f2e97e9..2abc2a51a 100644 --- a/iOS_SDK/OneSignalSDK/Source/DelayedConsentInitializationParameters.h +++ b/iOS_SDK/OneSignalSDK/Source/DelayedConsentInitializationParameters.h @@ -26,7 +26,6 @@ */ #import -#import "OneSignal.h" @interface DelayedConsentInitializationParameters : NSObject diff --git a/iOS_SDK/OneSignalSDK/Source/LanguageProviderDevice.m b/iOS_SDK/OneSignalSDK/Source/LanguageProviderDevice.m deleted file mode 100644 index 28a47566a..000000000 --- a/iOS_SDK/OneSignalSDK/Source/LanguageProviderDevice.m +++ /dev/null @@ -1,41 +0,0 @@ -/** - * Modified MIT License - * - * Copyright 2021 OneSignal - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * 1. The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * 2. All copies of substantial portions of the Software may only be used in connection - * with services provided by OneSignal. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ - -#import "LanguageProviderDevice.h" -#import "OneSignalHelper.h" -#import "LanguageContext.h" - -@implementation LanguageProviderDevice - -- (NSString *)language { - let preferredLanguages = [NSLocale preferredLanguages]; - if (preferredLanguages && preferredLanguages.count > 0) - return [preferredLanguages objectAtIndex:0]; - return DEFAULT_LANGUAGE; -} - -@end diff --git a/iOS_SDK/OneSignalSDK/Source/OSAttributedFocusTimeProcessor.h b/iOS_SDK/OneSignalSDK/Source/OSAttributedFocusTimeProcessor.h index f1e22266f..06dd96f3c 100644 --- a/iOS_SDK/OneSignalSDK/Source/OSAttributedFocusTimeProcessor.h +++ b/iOS_SDK/OneSignalSDK/Source/OSAttributedFocusTimeProcessor.h @@ -26,7 +26,6 @@ */ #import -#import "OneSignalCommonDefines.h" #import "OSBaseFocusTimeProcessor.h" @interface OSAttributedFocusTimeProcessor : OSBaseFocusTimeProcessor diff --git a/iOS_SDK/OneSignalSDK/Source/OSAttributedFocusTimeProcessor.m b/iOS_SDK/OneSignalSDK/Source/OSAttributedFocusTimeProcessor.m index cce58cef6..1efd0e931 100644 --- a/iOS_SDK/OneSignalSDK/Source/OSAttributedFocusTimeProcessor.m +++ b/iOS_SDK/OneSignalSDK/Source/OSAttributedFocusTimeProcessor.m @@ -26,15 +26,15 @@ */ #import #import +#import "OneSignalFramework.h" #import "OSAttributedFocusTimeProcessor.h" -#import "OSStateSynchronizer.h" +#import @interface OneSignal () -+ (OSStateSynchronizer *)stateSynchronizer; ++ (void)sendSessionEndOutcomes:(NSNumber*)totalTimeActive params:(OSFocusCallParams *)params onSuccess:(OSResultSuccessBlock _Nonnull)successBlock onFailure:(OSFailureBlock _Nonnull)failureBlock; @end @implementation OSAttributedFocusTimeProcessor { - UIBackgroundTaskIdentifier delayBackgroundTask; NSTimer* restCallTimer; } @@ -43,21 +43,10 @@ @implementation OSAttributedFocusTimeProcessor { - (instancetype)init { self = [super init]; - delayBackgroundTask = UIBackgroundTaskInvalid; - return self; -} - -- (void)beginDelayBackgroundTask { - delayBackgroundTask = [UIApplication.sharedApplication beginBackgroundTaskWithExpirationHandler:^{ - [self endDelayBackgroundTask]; - }]; -} + [OSBackgroundTaskManager setTaskInvalid:ATTRIBUTED_FOCUS_TASK]; + [OSBackgroundTaskManager setTaskInvalid:SEND_SESSION_TIME_TO_USER_TASK]; -- (void)endDelayBackgroundTask { - [OneSignal onesignalLog:ONE_S_LL_DEBUG - message:[NSString stringWithFormat:@"OSAttributedFocusTimeProcessor:endDelayBackgroundTask:%lu", (unsigned long)delayBackgroundTask]]; - [UIApplication.sharedApplication endBackgroundTask:delayBackgroundTask]; - delayBackgroundTask = UIBackgroundTaskInvalid; + return self; } - (int)getMinSessionTime { @@ -71,7 +60,7 @@ - (NSString*)unsentActiveTimeUserDefaultsKey { - (void)sendOnFocusCall:(OSFocusCallParams *)params { let unsentActive = [super getUnsentActiveTime]; let totalTimeActive = unsentActive + params.timeElapsed; - [OneSignal onesignalLog:ONE_S_LL_DEBUG + [OneSignalLog onesignalLog:ONE_S_LL_DEBUG message:[NSString stringWithFormat:@"sendOnFocusCall attributed with totalTimeActive %f", totalTimeActive]]; [super saveUnsentActiveTime:totalTimeActive]; @@ -80,48 +69,63 @@ - (void)sendOnFocusCall:(OSFocusCallParams *)params { - (void)sendUnsentActiveTime:(OSFocusCallParams *)params { let unsentActive = [super getUnsentActiveTime]; - [OneSignal onesignalLog:ONE_S_LL_DEBUG + [OneSignalLog onesignalLog:ONE_S_LL_DEBUG message:[NSString stringWithFormat:@"sendUnsentActiveTime attributed with unsentActive %f", unsentActive]]; [self sendOnFocusCallWithParams:params totalTimeActive:unsentActive]; } - (void)sendOnFocusCallWithParams:(OSFocusCallParams *)params totalTimeActive:(NSTimeInterval)totalTimeActive { - if (!params.userId) + // Don't send influenced session with time < 1 seconds + if (totalTimeActive < 1) { + [OneSignalLog onesignalLog:ONE_S_LL_DEBUG message:[NSString stringWithFormat:@"sendSessionEndOutcomes not sending active time %f", totalTimeActive]]; return; + } - [self beginDelayBackgroundTask]; + [OSBackgroundTaskManager beginBackgroundTask:ATTRIBUTED_FOCUS_TASK]; + [OSBackgroundTaskManager beginBackgroundTask:SEND_SESSION_TIME_TO_USER_TASK]; + if (params.onSessionEnded) { - [self sendBackgroundAttributedFocusPingWithParams:params withTotalTimeActive:@(totalTimeActive)]; + [self sendBackgroundAttributedSessionTimeWithParams:params withTotalTimeActive:@(totalTimeActive)]; return; } restCallTimer = [NSTimer scheduledTimerWithTimeInterval:DELAY_TIME target:self - selector:@selector(sendBackgroundAttributedFocusPingWithNSTimer:) + selector:@selector(sendBackgroundAttributedSessionTimeWithNSTimer:) userInfo:@{@"params": params, @"time": @(totalTimeActive)} repeats:false]; } -- (void)sendBackgroundAttributedFocusPingWithNSTimer:(NSTimer*)timer { +- (void)sendBackgroundAttributedSessionTimeWithNSTimer:(NSTimer*)timer { let userInfo = (NSDictionary*)timer.userInfo; let params = (OSFocusCallParams*)userInfo[@"params"]; let totalTimeActive = (NSNumber*)userInfo[@"time"]; - [self sendBackgroundAttributedFocusPingWithParams:params withTotalTimeActive:totalTimeActive]; + [self sendBackgroundAttributedSessionTimeWithParams:params withTotalTimeActive:totalTimeActive]; } -- (void)sendBackgroundAttributedFocusPingWithParams:(OSFocusCallParams *)params withTotalTimeActive:(NSNumber*)totalTimeActive { - dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{ - [OneSignal onesignalLog:ONE_S_LL_DEBUG message:@"beginBackgroundAttributedFocusTask start"]; +- (void)sendBackgroundAttributedSessionTimeWithParams:(OSFocusCallParams *)params withTotalTimeActive:(NSNumber*)totalTimeActive { + [OneSignalLog onesignalLog:ONE_S_LL_DEBUG message:@"OSAttributedFocusTimeProcessor:sendBackgroundAttributedSessionTimeWithParams start"]; - [OneSignal.stateSynchronizer sendOnFocusTime:totalTimeActive params:params withSuccess:^(NSDictionary *result) { + dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{ + [OneSignalUserManagerImpl.sharedInstance updateSessionWithSessionCount:nil sessionTime:totalTimeActive refreshDeviceMetadata:false sendImmediately:true onSuccess:^{ [super saveUnsentActiveTime:0]; - [OneSignal onesignalLog:ONE_S_LL_DEBUG message:@"sendOnFocusCallWithParams attributed succeed, saveUnsentActiveTime with 0"]; - [self endDelayBackgroundTask]; - } onFailure:^(NSDictionary *errors) { - [OneSignal onesignalLog:ONE_S_LL_DEBUG message:@"sendOnFocusCallWithParams attributed failed, will retry on next open"]; - [self endDelayBackgroundTask]; + [OneSignalLog onesignalLog:ONE_S_LL_DEBUG message:@"sendBackgroundAttributed session time succeed, saveUnsentActiveTime with 0"]; + [OSBackgroundTaskManager endBackgroundTask:SEND_SESSION_TIME_TO_USER_TASK]; + } onFailure:^{ + [OneSignalLog onesignalLog:ONE_S_LL_ERROR message:@"sendBackgroundAttributed session time failed, will retry on next open"]; + [OSBackgroundTaskManager endBackgroundTask:SEND_SESSION_TIME_TO_USER_TASK]; + }]; + }); + + dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{ + [OneSignal sendSessionEndOutcomes:totalTimeActive params:params onSuccess:^(NSDictionary *result) { + [OneSignalLog onesignalLog:ONE_S_LL_DEBUG message:@"sendBackgroundAttributed succeed"]; + [OSBackgroundTaskManager endBackgroundTask:ATTRIBUTED_FOCUS_TASK]; + } onFailure:^(NSError *error) { + [OneSignalLog onesignalLog:ONE_S_LL_ERROR message:@"sendBackgroundAttributed failed, will retry on next open"]; + [OSBackgroundTaskManager endBackgroundTask:ATTRIBUTED_FOCUS_TASK]; }]; }); } @@ -132,7 +136,9 @@ - (void)cancelDelayedJob { [restCallTimer invalidate]; restCallTimer = nil; - [self endDelayBackgroundTask]; + [OSBackgroundTaskManager endBackgroundTask:ATTRIBUTED_FOCUS_TASK]; + [OSBackgroundTaskManager endBackgroundTask:SEND_SESSION_TIME_TO_USER_TASK]; + } @end diff --git a/iOS_SDK/OneSignalSDK/Source/OSBackgroundTaskHandlerImpl.h b/iOS_SDK/OneSignalSDK/Source/OSBackgroundTaskHandlerImpl.h new file mode 100644 index 000000000..3f57de113 --- /dev/null +++ b/iOS_SDK/OneSignalSDK/Source/OSBackgroundTaskHandlerImpl.h @@ -0,0 +1,33 @@ +/* + Modified MIT License + + Copyright 2022 OneSignal + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + 1. The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + 2. All copies of substantial portions of the Software may only be used in connection + with services provided by OneSignal. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + */ + +#import +#import + +@interface OSBackgroundTaskHandlerImpl : NSObject + +@end diff --git a/iOS_SDK/OneSignalSDK/Source/OSBackgroundTaskHandlerImpl.m b/iOS_SDK/OneSignalSDK/Source/OSBackgroundTaskHandlerImpl.m new file mode 100644 index 000000000..79b2dac43 --- /dev/null +++ b/iOS_SDK/OneSignalSDK/Source/OSBackgroundTaskHandlerImpl.m @@ -0,0 +1,70 @@ +/* + Modified MIT License + + Copyright 2022 OneSignal + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + 1. The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + 2. All copies of substantial portions of the Software may only be used in connection + with services provided by OneSignal. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + */ + +#import "OSBackgroundTaskHandlerImpl.h" +#import +#import +#import + +@implementation OSBackgroundTaskHandlerImpl + +NSMutableDictionary *tasks; + +- (instancetype)init { + self = [super init]; + tasks = [NSMutableDictionary new]; + return self; +} + +- (void)beginBackgroundTask:(NSString * _Nonnull)taskIdentifier { + [OneSignalLog onesignalLog:ONE_S_LL_DEBUG + message:[NSString stringWithFormat: + @"OSBackgroundTaskManagerImpl:beginBackgroundTask: %@", taskIdentifier]]; + UIBackgroundTaskIdentifier uiIdentifier = [UIApplication.sharedApplication beginBackgroundTaskWithExpirationHandler:^{ + [OneSignalLog onesignalLog:ONE_S_LL_DEBUG + message:[NSString stringWithFormat: + @"OSBackgroundTaskManagerImpl: expirationHandler called for %@", taskIdentifier]]; + [self endBackgroundTask:taskIdentifier]; + }]; + tasks[taskIdentifier] = [NSNumber numberWithUnsignedLong:uiIdentifier]; +} + +- (void)endBackgroundTask:(NSString * _Nonnull)taskIdentifier { + UIBackgroundTaskIdentifier uiIdentifier = [[tasks objectForKey:taskIdentifier] unsignedLongValue]; + [OneSignalLog onesignalLog:ONE_S_LL_DEBUG + message:[NSString stringWithFormat: + @"OSBackgroundTaskManagerImpl:endBackgroundTask: %@ with UIBackgroundTaskIdentifier %lu", + taskIdentifier, (unsigned long)uiIdentifier]]; + [UIApplication.sharedApplication endBackgroundTask:uiIdentifier]; + [self setTaskInvalid:taskIdentifier]; +} + +- (void)setTaskInvalid:(NSString * _Nonnull)taskIdentifier { + tasks[taskIdentifier] = [NSNumber numberWithUnsignedLong:UIBackgroundTaskInvalid]; +} + +@end diff --git a/iOS_SDK/OneSignalSDK/Source/OSBaseFocusTimeProcessor.m b/iOS_SDK/OneSignalSDK/Source/OSBaseFocusTimeProcessor.m index d0a465869..2fb3321a9 100644 --- a/iOS_SDK/OneSignalSDK/Source/OSBaseFocusTimeProcessor.m +++ b/iOS_SDK/OneSignalSDK/Source/OSBaseFocusTimeProcessor.m @@ -25,7 +25,6 @@ * THE SOFTWARE. */ -#import "OneSignal.h" #import "OSBaseFocusTimeProcessor.h" #import "OneSignalInternal.h" @@ -41,7 +40,7 @@ - (int)getMinSessionTime { } - (BOOL)hasMinSyncTime:(NSTimeInterval)activeTime { - [OneSignal onesignalLog:ONE_S_LL_DEBUG message:[NSString stringWithFormat:@"OSBaseFocusTimeProcessor hasMinSyncTime getMinSessionTime: %d activeTime: %f", [self getMinSessionTime], activeTime]]; + [OneSignalLog onesignalLog:ONE_S_LL_DEBUG message:[NSString stringWithFormat:@"OSBaseFocusTimeProcessor hasMinSyncTime getMinSessionTime: %d activeTime: %f", [self getMinSessionTime], activeTime]]; return activeTime >= [self getMinSessionTime]; } diff --git a/iOS_SDK/OneSignalSDK/Source/OSDeviceState.m b/iOS_SDK/OneSignalSDK/Source/OSDeviceState.m deleted file mode 100644 index 1a7bceb59..000000000 --- a/iOS_SDK/OneSignalSDK/Source/OSDeviceState.m +++ /dev/null @@ -1,90 +0,0 @@ -/** -* Modified MIT License -* -* Copyright 2020 OneSignal -* -* Permission is hereby granted, free of charge, to any person obtaining a copy -* of this software and associated documentation files (the "Software"), to deal -* in the Software without restriction, including without limitation the rights -* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -* copies of the Software, and to permit persons to whom the Software is -* furnished to do so, subject to the following conditions: -* -* 1. The above copyright notice and this permission notice shall be included in -* all copies or substantial portions of the Software. -* -* 2. All copies of substantial portions of the Software may only be used in connection -* with services provided by OneSignal. -* -* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -* THE SOFTWARE. -*/ - -#import -#import "OneSignal.h" -#import "OneSignalInternal.h" -#import "OneSignalHelper.h" -#import "OneSignalCommonDefines.h" - -@implementation OSDeviceState - -- (id)init { - return [[OSDeviceState alloc] initWithSubscriptionState:[OneSignal getPermissionSubscriptionState]]; -} - -- (instancetype)initWithSubscriptionState:(OSPermissionSubscriptionState *)state { - self = [super init]; - if (self) { - _hasNotificationPermission = [[state permissionStatus] reachable]; - - _isPushDisabled = [[state subscriptionStatus] isPushDisabled]; - - _isSubscribed = [[state subscriptionStatus] isSubscribed]; - - _notificationPermissionStatus = [[state permissionStatus] status]; - - _userId = [[state subscriptionStatus] userId]; - - _pushToken = [[state subscriptionStatus] pushToken]; - - _emailUserId = [[state emailSubscriptionStatus] emailUserId]; - - _emailAddress = [[state emailSubscriptionStatus] emailAddress]; - - _isEmailSubscribed = [[state emailSubscriptionStatus] isSubscribed]; - - _smsNumber = [[state smsSubscriptionStatus] smsNumber]; - - _smsUserId = [[state smsSubscriptionStatus] smsUserId]; - - _isSMSSubscribed = [[state smsSubscriptionStatus] isSubscribed]; - } - return self; -} - -// Convert the class into a NSDictionary -- (NSDictionary *_Nonnull)jsonRepresentation { - let json = [NSMutableDictionary new]; - - json[@"hasNotificationPermission"] = @(_hasNotificationPermission); - json[@"isPushDisabled"] = @(_isPushDisabled); - json[@"isSubscribed"] = @(_isSubscribed); - json[@"userId"] = _userId; - json[@"pushToken"] = _pushToken; - json[@"emailUserId"] = _emailUserId; - json[@"emailAddress"] = _emailAddress; - json[@"isEmailSubscribed"] = @(_isEmailSubscribed); - json[@"smsUserId"] = _smsUserId; - json[@"smsNumber"] = _smsNumber; - json[@"isSMSSubscribed"] = @(_isSMSSubscribed); - json[@"notificationPermissionStatus"] = @(_notificationPermissionStatus); - - return json; -} - -@end diff --git a/iOS_SDK/OneSignalSDK/Source/OSEmailSubscription.h b/iOS_SDK/OneSignalSDK/Source/OSEmailSubscription.h deleted file mode 100644 index 4cac92e39..000000000 --- a/iOS_SDK/OneSignalSDK/Source/OSEmailSubscription.h +++ /dev/null @@ -1,74 +0,0 @@ -/** - * Modified MIT License - * - * Copyright 2017 OneSignal - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * 1. The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * 2. All copies of substantial portions of the Software may only be used in connection - * with services provided by OneSignal. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ - -#import - -#import "OneSignal.h" - -#import "OSObservable.h" - -#import "OSPermission.h" - - - -@protocol OSEmailSubscriptionStateObserver --(void)onChanged:(OSEmailSubscriptionState*)state; -@end - - -typedef OSObservable*, OSEmailSubscriptionState*> ObservableEmailSubscriptionStateType; -typedef OSObservable*, OSEmailSubscriptionStateChanges*> ObservableEmailSubscriptionStateChangesType; - - -@interface OSEmailSubscriptionState () -@property (nonatomic) ObservableEmailSubscriptionStateType *observable; -@property (strong, nonatomic) NSString *emailAuthCode; -@property (nonatomic) BOOL requiresEmailAuth; -- (void)persist; -- (void)setEmailUserId:(NSString *)emailUserId; -- (void)setEmailAddress:(NSString *)emailAddress; -- (BOOL)isEmailSetup; -- (BOOL)compare:(OSEmailSubscriptionState *)from; -@end - - -@interface OSEmailSubscriptionStateChanges () -@property (readwrite) OSEmailSubscriptionState* to; -@property (readwrite) OSEmailSubscriptionState* from; -@end - - -@interface OSEmailSubscriptionChangedInternalObserver : NSObject -+ (void)fireChangesObserver:(OSEmailSubscriptionState*)state; -@end - - -@interface OneSignal (EmailSubscriptionAdditions) -@property (class) OSEmailSubscriptionState *lastEmailSubscriptionState; -@property (class) OSEmailSubscriptionState *currentEmailSubscriptionState; -@property (class) ObservableEmailSubscriptionStateChangesType *emailSubscriptionStateChangesObserver; -@end diff --git a/iOS_SDK/OneSignalSDK/Source/OSEmailSubscription.m b/iOS_SDK/OneSignalSDK/Source/OSEmailSubscription.m deleted file mode 100644 index 625b54c9d..000000000 --- a/iOS_SDK/OneSignalSDK/Source/OSEmailSubscription.m +++ /dev/null @@ -1,142 +0,0 @@ -/** - * Modified MIT License - * - * Copyright 2017 OneSignal - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * 1. The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * 2. All copies of substantial portions of the Software may only be used in connection - * with services provided by OneSignal. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ - -#import "OneSignalHelper.h" -#import "OSEmailSubscription.h" - -@implementation OSEmailSubscriptionState - -- (ObservableEmailSubscriptionStateType *)observable { - if (!_observable) - _observable = [OSObservable new]; - return _observable; -} - -- (instancetype)init { - let standardUserDefaults = OneSignalUserDefaults.initStandard; - _emailAddress = [standardUserDefaults getSavedStringForKey:OSUD_EMAIL_ADDRESS defaultValue:nil]; - _requiresEmailAuth = [standardUserDefaults getSavedBoolForKey:OSUD_REQUIRE_EMAIL_AUTH defaultValue:false]; - _emailAuthCode = [standardUserDefaults getSavedStringForKey:OSUD_EMAIL_AUTH_CODE defaultValue:nil]; - _emailUserId = [standardUserDefaults getSavedStringForKey:OSUD_EMAIL_PLAYER_ID defaultValue:nil]; - - return self; -} - --(BOOL)isSubscribed { - return self.emailUserId != nil; -} - -- (void)persist { - let standardUserDefaults = OneSignalUserDefaults.initStandard; - [standardUserDefaults saveStringForKey:OSUD_EMAIL_ADDRESS withValue:_emailAddress]; - [standardUserDefaults saveBoolForKey:OSUD_REQUIRE_EMAIL_AUTH withValue:_requiresEmailAuth]; - [standardUserDefaults saveStringForKey:OSUD_EMAIL_AUTH_CODE withValue:_emailAuthCode]; - [standardUserDefaults saveStringForKey:OSUD_EMAIL_PLAYER_ID withValue:_emailUserId]; -} - -- (NSString *)description { - @synchronized (self) { - return [NSString stringWithFormat:@"", self.emailAddress, self.emailUserId, self.emailAuthCode]; - } -} - -- (instancetype)copyWithZone:(NSZone *)zone { - OSEmailSubscriptionState *copy = [OSEmailSubscriptionState new]; - - if (copy) { - copy->_requiresEmailAuth = _requiresEmailAuth; - copy->_emailAuthCode = [_emailAuthCode copy]; - copy->_emailUserId = [_emailUserId copy]; - copy->_emailAddress = [_emailAddress copy]; - } - - return copy; -} - -- (void)setEmailUserId:(NSString *)emailUserId { - BOOL changed = emailUserId != _emailUserId; - _emailUserId = emailUserId; - - if (changed) - [self.observable notifyChange:self]; -} - -- (void)setEmailAddress:(NSString *)emailAddress { - _emailAddress = emailAddress; -} - -- (BOOL)isEmailSetup { - return _emailUserId && (!_requiresEmailAuth || _emailAuthCode); -} - -- (NSDictionary *)toDictionary { - return @{ - @"emailUserId": _emailUserId ?: [NSNull null], - @"emailAddress": _emailAddress ?: [NSNull null], - @"isSubscribed": @(self.isSubscribed) - }; -} - --(BOOL)compare:(OSEmailSubscriptionState *)from { - return ![self.emailAddress ?: @"" isEqualToString:from.emailAddress ?: @""] || ![self.emailUserId ?: @"" isEqualToString:from.emailUserId ?: @""]; -} - -@end - - -@implementation OSEmailSubscriptionChangedInternalObserver - -- (void)onChanged:(OSEmailSubscriptionState*)state { - [OSEmailSubscriptionChangedInternalObserver fireChangesObserver:state]; -} - -+ (void)fireChangesObserver:(OSEmailSubscriptionState*)state { - OSEmailSubscriptionStateChanges* stateChanges = [[OSEmailSubscriptionStateChanges alloc] init]; - stateChanges.from = OneSignal.lastEmailSubscriptionState; - stateChanges.to = [state copy]; - - BOOL hasReceiver = [OneSignal.emailSubscriptionStateChangesObserver notifyChange:stateChanges]; - if (hasReceiver) { - OneSignal.lastEmailSubscriptionState = [state copy]; - [OneSignal.lastEmailSubscriptionState persist]; - } -} - -@end - -@implementation OSEmailSubscriptionStateChanges -- (NSString*)description { - static NSString* format = @""; - return [NSString stringWithFormat:format, _from, _to]; -} - -- (NSDictionary*)toDictionary { - return @{@"from": [_from toDictionary], - @"to": [_to toDictionary]}; -} - -@end diff --git a/iOS_SDK/OneSignalSDK/Source/OSFocusCallParams.h b/iOS_SDK/OneSignalSDK/Source/OSFocusCallParams.h index 06f480dcb..af7be5d9a 100644 --- a/iOS_SDK/OneSignalSDK/Source/OSFocusCallParams.h +++ b/iOS_SDK/OneSignalSDK/Source/OSFocusCallParams.h @@ -30,21 +30,11 @@ @interface OSFocusCallParams : NSObject @property (nonatomic, readonly) NSString *appId; -@property (nonatomic, readonly) NSString *userId; -@property (nonatomic, readonly) NSString *emailUserId; -@property (nonatomic, readonly) NSString *emailAuthToken; -@property (nonatomic, readonly) NSString *externalIdAuthToken; -@property (nonatomic, readonly) NSNumber *netType; @property (nonatomic, readonly) NSArray *influenceParams; @property (nonatomic, readonly) NSTimeInterval timeElapsed; @property (nonatomic, readonly) BOOL onSessionEnded; - (id)initWithParamsAppId:(NSString *)appId - userId:(NSString *)userId - emailUserId:(NSString *)emailUserId - emailAuthToken:(NSString *)emailAuthToken - externalIdAuthToken:(NSString *)externalIdAuthToken - netType:(NSNumber *)netType timeElapsed:(NSTimeInterval)timeElapsed influenceParams:(NSArray *)influenceParams onSessionEnded:(BOOL)onSessionEnded; diff --git a/iOS_SDK/OneSignalSDK/Source/OSFocusCallParams.m b/iOS_SDK/OneSignalSDK/Source/OSFocusCallParams.m index 63851019a..564cdc598 100644 --- a/iOS_SDK/OneSignalSDK/Source/OSFocusCallParams.m +++ b/iOS_SDK/OneSignalSDK/Source/OSFocusCallParams.m @@ -31,20 +31,10 @@ @implementation OSFocusCallParams - (id)initWithParamsAppId:(NSString *)appId - userId:(NSString *)userId - emailUserId:(NSString *)emailUserId - emailAuthToken:(NSString *)emailAuthToken - externalIdAuthToken:(NSString *)externalIdAuthToken - netType:(NSNumber *)netType timeElapsed:(NSTimeInterval)timeElapsed influenceParams:(NSArray *)influenceParams onSessionEnded:(BOOL)onSessionEnded { _appId = appId; - _userId = userId; - _emailUserId = emailUserId; - _emailAuthToken = emailAuthToken; - _externalIdAuthToken = externalIdAuthToken; - _netType = netType; _timeElapsed = timeElapsed; _influenceParams = influenceParams; _onSessionEnded = onSessionEnded; @@ -53,6 +43,6 @@ - (id)initWithParamsAppId:(NSString *)appId - (NSString *)description { - return [NSString stringWithFormat:@"OSFocusCallParams appId: %@ userId: %@ emailUserId: %@ emailAuthToken: %@ externalIdAuthToken: %@ netType: %@ timeElapsed: %f influenceParams: %@ onSessionEnded: %@", _appId, _userId, _emailUserId, _emailAuthToken, _externalIdAuthToken, _netType, _timeElapsed, _influenceParams.description, _onSessionEnded ? @"YES" : @"NO"]; + return [NSString stringWithFormat:@"OSFocusCallParams appId: %@ timeElapsed: %f influenceParams: %@ onSessionEnded: %@", _appId, _timeElapsed, _influenceParams.description, _onSessionEnded ? @"YES" : @"NO"]; } @end diff --git a/iOS_SDK/OneSignalSDK/Source/OSFocusTimeProcessorFactory.m b/iOS_SDK/OneSignalSDK/Source/OSFocusTimeProcessorFactory.m index 246260f21..e5c80b270 100644 --- a/iOS_SDK/OneSignalSDK/Source/OSFocusTimeProcessorFactory.m +++ b/iOS_SDK/OneSignalSDK/Source/OSFocusTimeProcessorFactory.m @@ -45,7 +45,7 @@ + (void)cancelFocusCall { let timeProcesor = [self.focusTimeProcessors objectForKey:key]; [timeProcesor cancelDelayedJob]; } - [OneSignal onesignalLog:ONE_S_LL_DEBUG message:[NSString stringWithFormat:@"cancelFocusCall of %@", self.focusTimeProcessors]]; + [OneSignalLog onesignalLog:ONE_S_LL_DEBUG message:[NSString stringWithFormat:@"cancelFocusCall of %@", self.focusTimeProcessors]]; } + (void)resetUnsentActiveTime { @@ -54,7 +54,7 @@ + (void)resetUnsentActiveTime { [timeProcesor resetUnsentActiveTime]; } - [OneSignal onesignalLog:ONE_S_LL_DEBUG message:[NSString stringWithFormat:@"resetUnsentActiveTime of %@", self.focusTimeProcessors]]; + [OneSignalLog onesignalLog:ONE_S_LL_DEBUG message:[NSString stringWithFormat:@"resetUnsentActiveTime of %@", self.focusTimeProcessors]]; } + (OSBaseFocusTimeProcessor *)createTimeProcessorWithInfluences:(NSArray *)lastInfluences focusEventType:(FocusEventType)focusEventType { @@ -86,7 +86,7 @@ + (OSBaseFocusTimeProcessor *)createTimeProcessorWithInfluences:(NSArray -#import "OSInAppMessageAction.h" - - -@interface OSRequestInAppMessageViewed : OneSignalRequest -+ (instancetype _Nonnull)withAppId:(NSString * _Nonnull)appId withPlayerId:(NSString * _Nonnull)playerId withMessageId:(NSString * _Nonnull)messageId forVariantId:(NSString * _Nonnull)variantId; -@end - -@interface OSRequestInAppMessagePageViewed : OneSignalRequest -+ (instancetype _Nonnull)withAppId:(NSString * _Nonnull)appId withPlayerId:(NSString * _Nonnull)playerId withMessageId:(NSString * _Nonnull)messageId withPageId:(NSString * _Nonnull)pageId forVariantId:(NSString * _Nonnull)variantId; -@end - -@interface OSRequestLoadInAppMessageContent : OneSignalRequest -+ (instancetype _Nonnull)withAppId:(NSString * _Nonnull)appId withMessageId:(NSString * _Nonnull)messageId withVariantId:(NSString * _Nonnull)variant; -@end - -@interface OSRequestLoadInAppMessagePreviewContent : OneSignalRequest -+ (instancetype _Nonnull)withAppId:(NSString * _Nonnull)appId previewUUID:(NSString * _Nonnull)previewUUID; -@end - -@interface OSRequestInAppMessageClicked : OneSignalRequest -+ (instancetype _Nonnull)withAppId:(NSString * _Nonnull)appId - withPlayerId:(NSString * _Nonnull)playerId - withMessageId:(NSString * _Nonnull)messageId - forVariantId:(NSString * _Nonnull)variantId - withAction:(OSInAppMessageAction * _Nonnull)action; -@end diff --git a/iOS_SDK/OneSignalSDK/Source/OSLocationRequests.h b/iOS_SDK/OneSignalSDK/Source/OSLocationRequests.h deleted file mode 100644 index 93c15ab17..000000000 --- a/iOS_SDK/OneSignalSDK/Source/OSLocationRequests.h +++ /dev/null @@ -1,15 +0,0 @@ -// -// OSLocationRequests.h -// OneSignal -// -// Created by Elliot Mawby on 9/28/21. -// Copyright © 2021 Hiptic. All rights reserved. -// -#import -#import "OneSignalLocation.h" - -@interface OSRequestSendLocation : OneSignalRequest -+ (instancetype _Nonnull)withUserId:(NSString * _Nonnull)userId appId:(NSString * _Nonnull)appId location:(os_last_location * _Nonnull)coordinate networkType:(NSNumber * _Nonnull)netType backgroundState:(BOOL)backgroundState emailAuthHashToken:(NSString * _Nullable)emailAuthHash externalIdAuthToken:(NSString * _Nullable)externalIdAuthToken; - -+ (instancetype _Nonnull)withUserId:(NSString * _Nonnull)userId appId:(NSString * _Nonnull)appId location:(os_last_location * _Nonnull)coordinate networkType:(NSNumber * _Nonnull)netType backgroundState:(BOOL)backgroundState smsAuthHashToken:(NSString * _Nullable)smsAuthHash externalIdAuthToken:(NSString * _Nullable)externalIdAuthToken; -@end diff --git a/iOS_SDK/OneSignalSDK/Source/OSLocationRequests.m b/iOS_SDK/OneSignalSDK/Source/OSLocationRequests.m deleted file mode 100644 index 26717ea7e..000000000 --- a/iOS_SDK/OneSignalSDK/Source/OSLocationRequests.m +++ /dev/null @@ -1,45 +0,0 @@ -// -// OSLocationRequests.m -// OneSignal -// -// Created by Elliot Mawby on 9/28/21. -// Copyright © 2021 Hiptic. All rights reserved. -// - -#import -#import "OSLocationRequests.h" - -@implementation OSRequestSendLocation -+ (instancetype _Nonnull)withUserId:(NSString * _Nonnull)userId appId:(NSString * _Nonnull)appId location:(os_last_location * _Nonnull)coordinate networkType:(NSNumber * _Nonnull)netType backgroundState:(BOOL)backgroundState emailAuthHashToken:(NSString * _Nullable)emailAuthHash externalIdAuthToken:(NSString * _Nullable)externalIdAuthToken { - return [self withUserId:userId appId:appId location:coordinate networkType:netType backgroundState:backgroundState authHashToken:emailAuthHash authHashTokenKey:@"email_auth_hash" externalIdAuthToken:externalIdAuthToken]; -} - -+ (instancetype)withUserId:(NSString *)userId appId:(NSString *)appId location:(os_last_location *)coordinate networkType:(NSNumber *)netType backgroundState:(BOOL)backgroundState smsAuthHashToken:(NSString *)smsAuthHash externalIdAuthToken:(NSString *)externalIdAuthToken { - return [self withUserId:userId appId:appId location:coordinate networkType:netType backgroundState:backgroundState authHashToken:smsAuthHash authHashTokenKey:@"sms_auth_hash" externalIdAuthToken:externalIdAuthToken]; -} - -+ (instancetype)withUserId:(NSString *)userId appId:(NSString *)appId location:(os_last_location *)coordinate networkType:(NSNumber *)netType backgroundState:(BOOL)backgroundState authHashToken:(NSString *)authHashToken authHashTokenKey:(NSString *)authHashKey externalIdAuthToken:(NSString *)externalIdAuthToken { - let request = [OSRequestSendLocation new]; - - let params = [NSMutableDictionary new]; - params[@"app_id"] = appId; - params[@"lat"] = @(coordinate->cords.latitude); - params[@"long"] = @(coordinate->cords.longitude); - params[@"loc_acc_vert"] = @(coordinate->verticalAccuracy); - params[@"loc_acc"] = @(coordinate->horizontalAccuracy); - params[@"net_type"] = netType; - params[@"loc_bg"] = @(backgroundState); - - if (authHashToken && authHashToken.length > 0 && authHashKey) - params[authHashKey] = authHashToken; - - if (externalIdAuthToken && externalIdAuthToken.length > 0) - params[@"external_user_id_auth_hash"] = externalIdAuthToken; - - request.parameters = params; - request.method = PUT; - request.path = [NSString stringWithFormat:@"players/%@", userId]; - - return request; -} -@end diff --git a/iOS_SDK/OneSignalSDK/Source/OSMigrationController.h b/iOS_SDK/OneSignalSDK/Source/OSMigrationController.h index 8cf4689e5..aeb2254ef 100644 --- a/iOS_SDK/OneSignalSDK/Source/OSMigrationController.h +++ b/iOS_SDK/OneSignalSDK/Source/OSMigrationController.h @@ -25,8 +25,6 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -#import "OneSignal.h" - #ifndef OSMigrationController_h #define OSMigrationController_h diff --git a/iOS_SDK/OneSignalSDK/Source/OSMigrationController.m b/iOS_SDK/OneSignalSDK/Source/OSMigrationController.m index 89e825165..0f8574702 100644 --- a/iOS_SDK/OneSignalSDK/Source/OSMigrationController.m +++ b/iOS_SDK/OneSignalSDK/Source/OSMigrationController.m @@ -28,10 +28,9 @@ of this software and associated documentation files (the "Software"), to deal #import #import "OSMigrationController.h" #import -#import "OneSignal.h" -#import "OSInAppMessagingDefines.h" +#import "OneSignalFramework.h" +#import #import "OneSignalHelper.h" -#import "OSInAppMessageInternal.h" @interface OneSignal () + (OSInfluenceDataRepository *)influenceDataRepository; @@ -42,8 +41,10 @@ @implementation OSMigrationController - (void)migrate { [self migrateToVersion_02_14_00_AndGreater]; - [self migrateIAMRedisplayCache]; - [self migrateToOSInAppMessageInternal]; + let oneSignalInAppMessages = NSClassFromString(@"OneSignalInAppMessages"); + if (oneSignalInAppMessages != nil && [oneSignalInAppMessages respondsToSelector:@selector(migrate)]) { + [oneSignalInAppMessages performSelector:@selector(migrate)]; + } [self saveCurrentSDKVersion]; } @@ -55,7 +56,7 @@ - (void)migrateToVersion_02_14_00_AndGreater { let uniqueCacheOutcomeVersion = 21403; long sdkVersion = [OneSignalUserDefaults.initShared getSavedIntegerForKey:OSUD_CACHED_SDK_VERSION defaultValue:0]; if (sdkVersion < influenceVersion) { - [OneSignal onesignalLog:ONE_S_LL_DEBUG message:[NSString stringWithFormat:@"Migrating OSIndirectNotification from version: %ld", sdkVersion]]; + [OneSignalLog onesignalLog:ONE_S_LL_DEBUG message:[NSString stringWithFormat:@"Migrating OSIndirectNotification from version: %ld", sdkVersion]]; [NSKeyedUnarchiver setClass:[OSIndirectInfluence class] forClassName:@"OSIndirectNotification"]; NSArray * indirectInfluenceData = [[OSInfluenceDataRepository sharedInfluenceDataRepository] lastNotificationsReceivedData]; @@ -66,7 +67,7 @@ - (void)migrateToVersion_02_14_00_AndGreater { } if (sdkVersion < uniqueCacheOutcomeVersion) { - [OneSignal onesignalLog:ONE_S_LL_DEBUG message:[NSString stringWithFormat:@"Migrating OSUniqueOutcomeNotification from version: %ld", sdkVersion]]; + [OneSignalLog onesignalLog:ONE_S_LL_DEBUG message:[NSString stringWithFormat:@"Migrating OSUniqueOutcomeNotification from version: %ld", sdkVersion]]; [NSKeyedUnarchiver setClass:[OSCachedUniqueOutcome class] forClassName:@"OSUniqueOutcomeNotification"]; NSArray * attributedCacheUniqueOutcomeEvents = [[OSOutcomeEventsCache sharedOutcomeEventsCache] getAttributedUniqueOutcomeEventSent]; @@ -77,67 +78,6 @@ - (void)migrateToVersion_02_14_00_AndGreater { } } -// Devices could potentially have bad data in the OS_IAM_REDISPLAY_DICTIONARY -// that was saved as a dictionary and not CodeableData. Try to detect if that is the case -// and save it is as CodeableData instead. -- (void)migrateIAMRedisplayCache { - let iamRedisplayCacheFixVersion = 30203; - long sdkVersion = [OneSignalUserDefaults.initShared getSavedIntegerForKey:OSUD_CACHED_SDK_VERSION defaultValue:0]; - if (sdkVersion >= iamRedisplayCacheFixVersion) - return; - - @try { - __unused NSMutableDictionary *redisplayDict =[[NSMutableDictionary alloc] initWithDictionary:[OneSignalUserDefaults.initStandard - getSavedCodeableDataForKey:OS_IAM_REDISPLAY_DICTIONARY - defaultValue:[NSMutableDictionary new]]]; - } @catch (NSException *exception) { - @try { - // The redisplay IAMs might have been saved as a dictionary. - // Try to read them as a dictionary and then save them as a codeable. - NSMutableDictionary *redisplayDict = [[NSMutableDictionary alloc] initWithDictionary:[OneSignalUserDefaults.initStandard - getSavedDictionaryForKey:OS_IAM_REDISPLAY_DICTIONARY - defaultValue:[NSMutableDictionary new]]]; - [OneSignalUserDefaults.initStandard saveCodeableDataForKey:OS_IAM_REDISPLAY_DICTIONARY - withValue:redisplayDict]; - } @catch (NSException *exception) { - //Clear the cached redisplay dictionary of bad data - [OneSignalUserDefaults.initStandard saveCodeableDataForKey:OS_IAM_REDISPLAY_DICTIONARY - withValue:nil]; - } - } -} - -// OSInAppMessage has been made public -// The old class has been renamed to OSInAppMessageInternal -// We must set the new class name to the unarchiver to avoid crashing -- (void)migrateToOSInAppMessageInternal { - let nameChangeVersion = 30700; - long sdkVersion = [OneSignalUserDefaults.initShared getSavedIntegerForKey:OSUD_CACHED_SDK_VERSION defaultValue:0]; - [NSKeyedUnarchiver setClass:[OSInAppMessageInternal class] forClassName:@"OSInAppMessage"]; - if (sdkVersion < nameChangeVersion) { - [OneSignal onesignalLog:ONE_S_LL_DEBUG message:[NSString stringWithFormat:@"Migrating OSInAppMessage from version: %ld", sdkVersion]]; - - [NSKeyedUnarchiver setClass:[OSInAppMessageInternal class] forClassName:@"OSInAppMessage"]; - // Messages Array - NSArray *messages = [OneSignalUserDefaults.initStandard getSavedCodeableDataForKey:OS_IAM_MESSAGES_ARRAY - defaultValue:[NSArray new]]; - if (messages && messages.count) { - [NSKeyedArchiver setClassName:@"OSInAppMessageInternal" forClass:[OSInAppMessageInternal class]]; - [OneSignalUserDefaults.initStandard saveCodeableDataForKey:OS_IAM_MESSAGES_ARRAY withValue:messages]; - } else { - [OneSignalUserDefaults.initStandard saveCodeableDataForKey:OS_IAM_MESSAGES_ARRAY withValue:nil]; - } - - // Redisplay Messages Dict - NSMutableDictionary *redisplayedInAppMessages = [[NSMutableDictionary alloc] initWithDictionary:[OneSignalUserDefaults.initStandard getSavedCodeableDataForKey:OS_IAM_REDISPLAY_DICTIONARY defaultValue:[NSMutableDictionary new]]]; - if (redisplayedInAppMessages && redisplayedInAppMessages.count) { - [OneSignalUserDefaults.initStandard saveCodeableDataForKey:OS_IAM_REDISPLAY_DICTIONARY withValue:redisplayedInAppMessages]; - } else { - [OneSignalUserDefaults.initStandard saveCodeableDataForKey:OS_IAM_REDISPLAY_DICTIONARY withValue:nil]; - } - } -} - - (void)saveCurrentSDKVersion { let currentVersion = [[OneSignal sdkVersionRaw] intValue]; [OneSignalUserDefaults.initShared saveIntegerForKey:OSUD_CACHED_SDK_VERSION withValue:currentVersion]; diff --git a/iOS_SDK/OneSignalSDK/Source/OSNotification+OneSignal.m b/iOS_SDK/OneSignalSDK/Source/OSNotification+OneSignal.m deleted file mode 100644 index efaaafc03..000000000 --- a/iOS_SDK/OneSignalSDK/Source/OSNotification+OneSignal.m +++ /dev/null @@ -1,46 +0,0 @@ -/** - * Modified MIT License - * - * Copyright 2021OneSignal - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * 1. The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * 2. All copies of substantial portions of the Software may only be used in connection - * with services provided by OneSignal. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ - - -#import "OSNotification+OneSignal.h" -#import -@implementation OSNotification (OneSignal) - - (OSNotificationDisplayResponse)getCompletionBlock { - OSNotificationDisplayResponse block = ^(OSNotification *notification){ - /* - If notification is null here then display was cancelled and we need to - reset the badge count to the value prior to receipt of this notif - */ - if (!notification) { - NSInteger previousBadgeCount = [UIApplication sharedApplication].applicationIconBadgeNumber; - [OneSignalUserDefaults.initShared saveIntegerForKey:ONESIGNAL_BADGE_KEY withValue:previousBadgeCount]; - } - [self complete:notification]; - }; - return block; - } -@end diff --git a/iOS_SDK/OneSignalSDK/Source/OSPendingCallbacks.h b/iOS_SDK/OneSignalSDK/Source/OSPendingCallbacks.h index 44f4f0392..fb746e67a 100644 --- a/iOS_SDK/OneSignalSDK/Source/OSPendingCallbacks.h +++ b/iOS_SDK/OneSignalSDK/Source/OSPendingCallbacks.h @@ -25,7 +25,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -#import "OneSignal.h" +#import "OneSignalFramework.h" #ifndef OSPendingCallbacks_h #define OSPendingCallbacks_h diff --git a/iOS_SDK/OneSignalSDK/Source/OSPlayerTags.h b/iOS_SDK/OneSignalSDK/Source/OSPlayerTags.h deleted file mode 100644 index d384e8eb6..000000000 --- a/iOS_SDK/OneSignalSDK/Source/OSPlayerTags.h +++ /dev/null @@ -1,52 +0,0 @@ -/** -Modified MIT License - -Copyright 2021 OneSignal - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -1. The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -2. All copies of substantial portions of the Software may only be used in connection -with services provided by OneSignal. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -*/ - -@interface OSPlayerTags : NSObject - -@property (nonatomic, strong, nullable, readonly) NSDictionary *tagsToSend; - -- (NSDictionary *_Nullable) allTags; - -- (void)setTags:(NSDictionary *_Nullable)tags; - -- (void)addTags:(NSDictionary *_Nonnull)tags; - -- (void)addTagValue:(NSString *_Nonnull)value forKey:(NSString *_Nullable)key; - -- (void)deleteTags:(NSArray *_Nonnull)keys; - -- (void)setTagsToSend:(NSDictionary * _Nullable)tagsToSend; - -- (void)addTagsToSend:(NSDictionary * _Nullable)tags; - -- (NSString *_Nullable)tagValueForKey:(NSString *_Nonnull)key; - -- (void)saveTagsToUserDefaults; - -- (NSDictionary *_Nonnull)toDictionary; - -@end diff --git a/iOS_SDK/OneSignalSDK/Source/OSPlayerTags.m b/iOS_SDK/OneSignalSDK/Source/OSPlayerTags.m deleted file mode 100644 index d7cc44762..000000000 --- a/iOS_SDK/OneSignalSDK/Source/OSPlayerTags.m +++ /dev/null @@ -1,130 +0,0 @@ -/** -Modified MIT License - -Copyright 2021 OneSignal - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -1. The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -2. All copies of substantial portions of the Software may only be used in connection -with services provided by OneSignal. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -*/ - -#import -#import "OSPlayerTags.h" -#import "OneSignalHelper.h" - -@implementation OSPlayerTags - -NSDictionary *_tags; -NSDictionary *_tagsToSend; - --(id)init { - self = [super init]; - if (self) { - _tags = [NSDictionary new]; - _tagsToSend = [NSDictionary new]; - [self loadTagsFromUserDefaults]; - } - return self; -} - -- (NSDictionary *)toDictionary { - NSMutableDictionary *dataDict = [NSMutableDictionary dictionaryWithObjectsAndKeys: - _tags, @"tags", - nil]; - return dataDict; -} - -- (NSDictionary *)tagsToSend { - return _tagsToSend; -} - -- (void)addTagsToSend:(NSDictionary *)tags { - NSMutableDictionary *newTagsToSend = [NSMutableDictionary dictionaryWithDictionary:_tagsToSend]; - [newTagsToSend addEntriesFromDictionary:tags]; - [self setTagsToSend:newTagsToSend]; -} - -- (void)setTagsToSend:(NSDictionary *)tagsToSend { - _tagsToSend = tagsToSend; - [self addTags:tagsToSend]; -} - -- (NSDictionary *)allTags { - return _tags; -} - -- (NSString *)tagValueForKey:(NSString *)key { - return _tags[key]; -} - -- (void)setTags:(NSDictionary *)tags { - _tags = tags; -} - -- (void)addTags:(NSDictionary *)tags { - NSMutableDictionary *newDict = [NSMutableDictionary dictionaryWithDictionary:_tags]; - for (NSString *key in tags.allKeys) { - [newDict setValue:tags[key] forKey:key]; - } - [self setTags:newDict]; -} - -- (void)deleteTags:(NSArray *)keys { - NSMutableDictionary *newDict = [NSMutableDictionary dictionaryWithDictionary:_tags]; - for (NSString *key in keys) { - [newDict removeObjectForKey:key]; - } - _tags = newDict; - - NSMutableDictionary *newToSendDict = [NSMutableDictionary dictionaryWithDictionary:_tagsToSend]; - for (NSString *key in keys) { - [newToSendDict removeObjectForKey:key]; - } - _tagsToSend = newToSendDict; -} - -- (void)addTagValue:(NSString *)value forKey:(NSString *)key { - NSMutableDictionary *newDict = [NSMutableDictionary dictionaryWithDictionary:_tags]; - newDict[key] = value; - _tags = newDict; -} - -- (void)loadTagsFromUserDefaults { - let standardUserDefaults = OneSignalUserDefaults.initStandard; - _tags = [standardUserDefaults getSavedDictionaryForKey:OSUD_PLAYER_TAGS defaultValue:nil]; -} - -- (void)removeNSNullFromTags { - NSMutableDictionary *tagsDict = [NSMutableDictionary dictionaryWithDictionary:_tags]; - for (id key in tagsDict.allKeys) { - if ([tagsDict[key] isKindOfClass:[NSNull class]]) { - tagsDict[key] = nil; - } - } - _tags = tagsDict; -} - -- (void)saveTagsToUserDefaults { - [self removeNSNullFromTags]; - let standardUserDefaults = OneSignalUserDefaults.initStandard; - [standardUserDefaults saveDictionaryForKey:OSUD_PLAYER_TAGS withValue:_tags]; -} - -@end diff --git a/iOS_SDK/OneSignalSDK/Source/OSSMSSubscription.h b/iOS_SDK/OneSignalSDK/Source/OSSMSSubscription.h deleted file mode 100644 index 35f78150b..000000000 --- a/iOS_SDK/OneSignalSDK/Source/OSSMSSubscription.h +++ /dev/null @@ -1,65 +0,0 @@ -/** - * Modified MIT License - * - * Copyright 2021 OneSignal - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * 1. The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * 2. All copies of substantial portions of the Software may only be used in connection - * with services provided by OneSignal. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ - -#import - -#import "OneSignal.h" -#import "OSObservable.h" -#import "OSPermission.h" - -@protocol OSSMSubscriptionStateObserver --(void)onChanged:(OSSMSSubscriptionState*)state; -@end - -typedef OSObservable *, OSSMSSubscriptionState *> ObservableSMSSubscriptionStateType; -typedef OSObservable *, OSSMSSubscriptionStateChanges *> ObservableSMSSubscriptionStateChangesType; - -@interface OSSMSSubscriptionState () -@property (nonatomic) ObservableSMSSubscriptionStateType *observable; -@property (strong, nonatomic) NSString *smsAuthCode; -@property (nonatomic) BOOL requiresSMSAuth; -- (void)persist; -- (void)setSMSUserId:(NSString *)smsUserId; -- (void)setSMSNumber:(NSString *)smsNumber; -- (BOOL)isSMSSetup; -- (BOOL)compare:(OSSMSSubscriptionState *)from; -@end - -@interface OSSMSSubscriptionStateChanges () -@property (readwrite) OSSMSSubscriptionState* to; -@property (readwrite) OSSMSSubscriptionState* from; -@end - -@interface OSSMSSubscriptionChangedInternalObserver : NSObject -+ (void)fireChangesObserver:(OSSMSSubscriptionState*)state; -@end - -@interface OneSignal (SMSSubscriptionAdditions) -@property (class) OSSMSSubscriptionState *lastSMSSubscriptionState; -@property (class) OSSMSSubscriptionState *currentSMSSubscriptionState; -@property (class) ObservableSMSSubscriptionStateChangesType *smsSubscriptionStateChangesObserver; -@end diff --git a/iOS_SDK/OneSignalSDK/Source/OSSMSSubscription.m b/iOS_SDK/OneSignalSDK/Source/OSSMSSubscription.m deleted file mode 100644 index 15b333dc4..000000000 --- a/iOS_SDK/OneSignalSDK/Source/OSSMSSubscription.m +++ /dev/null @@ -1,142 +0,0 @@ -/** - * Modified MIT License - * - * Copyright 2021 OneSignal - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * 1. The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * 2. All copies of substantial portions of the Software may only be used in connection - * with services provided by OneSignal. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ - -#import "OneSignalHelper.h" -#import "OSSMSSubscription.h" - -@implementation OSSMSSubscriptionState - -- (ObservableSMSSubscriptionStateType *)observable { - if (!_observable) - _observable = [OSObservable new]; - return _observable; -} - -- (instancetype)init { - let standardUserDefaults = OneSignalUserDefaults.initStandard; - _smsNumber = [standardUserDefaults getSavedStringForKey:OSUD_SMS_NUMBER defaultValue:nil]; - _requiresSMSAuth = [standardUserDefaults getSavedBoolForKey:OSUD_REQUIRE_SMS_AUTH defaultValue:false]; - _smsAuthCode = [standardUserDefaults getSavedStringForKey:OSUD_SMS_AUTH_CODE defaultValue:nil]; - _smsUserId = [standardUserDefaults getSavedStringForKey:OSUD_SMS_PLAYER_ID defaultValue:nil]; - - return self; -} - --(BOOL)isSubscribed { - return self.smsUserId != nil; -} - -- (void)persist { - let standardUserDefaults = OneSignalUserDefaults.initStandard; - [standardUserDefaults saveStringForKey:OSUD_SMS_NUMBER withValue:_smsNumber]; - [standardUserDefaults saveBoolForKey:OSUD_REQUIRE_SMS_AUTH withValue:_requiresSMSAuth]; - [standardUserDefaults saveStringForKey:OSUD_SMS_AUTH_CODE withValue:_smsAuthCode]; - [standardUserDefaults saveStringForKey:OSUD_SMS_PLAYER_ID withValue:_smsUserId]; -} - -- (NSString *)description { - @synchronized (self) { - return [NSString stringWithFormat:@"", - self.smsNumber, self.smsUserId, self.smsAuthCode, self.requiresSMSAuth ? @"YES" : @"NO"]; - } -} - -- (instancetype)copyWithZone:(NSZone *)zone { - OSSMSSubscriptionState *copy = [OSSMSSubscriptionState new]; - - if (copy) { - copy->_requiresSMSAuth = _requiresSMSAuth; - copy->_smsAuthCode = [_smsAuthCode copy]; - copy->_smsUserId = [_smsUserId copy]; - copy->_smsNumber = [_smsNumber copy]; - } - - return copy; -} - -- (void)setSMSUserId:(NSString *)smsUserId { - BOOL changed = smsUserId != _smsUserId; - _smsUserId = smsUserId; - - if (changed) - [self.observable notifyChange:self]; -} - -- (void)setSMSNumber:(NSString *)smsNumber { - _smsNumber = smsNumber; -} - -- (BOOL)isSMSSetup { - return _smsUserId && (!_requiresSMSAuth || _smsAuthCode); -} - -- (NSDictionary *)toDictionary { - return @{ - @"smsUserId": _smsUserId ?: [NSNull null], - @"smsNumber": _smsNumber ?: [NSNull null], - @"isSubscribed": @(self.isSubscribed) - }; -} - --(BOOL)compare:(OSSMSSubscriptionState *)from { - return ![self.smsNumber ?: @"" isEqualToString:from.smsNumber ?: @""] || ![self.smsUserId ?: @"" isEqualToString:from.smsUserId ?: @""]; -} - -@end - -@implementation OSSMSSubscriptionChangedInternalObserver - -- (void)onChanged:(OSSMSSubscriptionState*)state { - [OSSMSSubscriptionChangedInternalObserver fireChangesObserver:state]; -} - -+ (void)fireChangesObserver:(OSSMSSubscriptionState*)state { - OSSMSSubscriptionStateChanges* stateChanges = [[OSSMSSubscriptionStateChanges alloc] init]; - stateChanges.from = OneSignal.lastSMSSubscriptionState; - stateChanges.to = [state copy]; - - BOOL hasReceiver = [OneSignal.smsSubscriptionStateChangesObserver notifyChange:stateChanges]; - if (hasReceiver) { - OneSignal.lastSMSSubscriptionState = [state copy]; - [OneSignal.lastSMSSubscriptionState persist]; - } -} - -@end - -@implementation OSSMSSubscriptionStateChanges -- (NSString*)description { - static NSString* format = @""; - return [NSString stringWithFormat:format, _from, _to]; -} - -- (NSDictionary*)toDictionary { - return @{@"from": [_from toDictionary], - @"to": [_to toDictionary]}; -} - -@end diff --git a/iOS_SDK/OneSignalSDK/Source/OSStateSynchronizer.h b/iOS_SDK/OneSignalSDK/Source/OSStateSynchronizer.h deleted file mode 100644 index 8b9f107dd..000000000 --- a/iOS_SDK/OneSignalSDK/Source/OSStateSynchronizer.h +++ /dev/null @@ -1,87 +0,0 @@ -/** -Modified MIT License - -Copyright 2021 OneSignal - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -1. The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -2. All copies of substantial portions of the Software may only be used in connection -with services provided by OneSignal. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -*/ - -#import "OneSignal.h" -#import "OSUserState.h" -#import -#import "OneSignalLocation.h" -#import "OSFocusCallParams.h" -#import "OSEmailSubscription.h" -#import "OSSubscription.h" -#import "OSSMSSubscription.h" - -@interface OSStateSynchronizer : NSObject - -- (instancetype _Nonnull)initWithSubscriptionState:(OSSubscriptionState * _Nonnull)subscriptionState - withEmailSubscriptionState:(OSEmailSubscriptionState * _Nonnull)emailSubscriptionState - withSMSSubscriptionState:(OSSMSSubscriptionState * _Nonnull)smsSubscriptionState; - -- (void)registerUserWithState:(OSUserState * _Nonnull)registrationState - withSuccess:(OSMultipleSuccessBlock _Nullable)successBlock - onFailure:(OSMultipleFailureBlock _Nullable)failureBlock; - -- (void)setExternalUserId:(NSString * _Nonnull)externalId -withExternalIdAuthHashToken:(NSString * _Nullable)hashToken - withAppId:(NSString * _Nonnull)appId - withSuccess:(OSUpdateExternalUserIdSuccessBlock _Nullable)successBlock - withFailure:(OSUpdateExternalUserIdFailureBlock _Nullable)failureBlock; - -- (void)setSMSNumber:(NSString * _Nonnull)smsNumber -withSMSAuthHashToken:(NSString * _Nullable)hashToken - withAppId:(NSString * _Nonnull)appId - withSuccess:(OSSMSSuccessBlock _Nullable)successBlock - withFailure:(OSSMSFailureBlock _Nullable)failureBlock; - -- (void)logoutSMSWithAppId:(NSString * _Nonnull)appId - withSuccess:(OSSMSSuccessBlock _Nullable)successBlock - withFailure:(OSSMSFailureBlock _Nullable)failureBlock; - -- (void)sendTagsWithAppId:(NSString * _Nonnull)appId - sendingTags:(NSDictionary * _Nonnull)tag - networkType:(NSNumber * _Nonnull)networkType - processingCallbacks:(NSArray * _Nullable)nowProcessingCallbacks; - -- (void)sendPurchases:(NSArray * _Nonnull)purchases appId:(NSString * _Nonnull)appId; - -- (void)sendBadgeCount:(NSNumber * _Nonnull)badgeCount appId:(NSString * _Nonnull)appId; - -- (void)sendLocation:(os_last_location * _Nonnull)lastLocation - appId:(NSString * _Nonnull)appId - networkType:(NSNumber * _Nonnull)networkType - backgroundState:(BOOL)background; - -- (void)sendOnFocusTime:(NSNumber * _Nonnull)totalTimeActive - params:(OSFocusCallParams * _Nonnull)params - withSuccess:(OSMultipleSuccessBlock _Nullable)successBlock - onFailure:(OSMultipleFailureBlock _Nullable)failureBlock; - -- (void)updateLanguage:(NSString * _Nonnull)language - appId:(NSString * _Nonnull)appId - withSuccess:(OSUpdateLanguageSuccessBlock _Nullable)successBlock - withFailure:(OSUpdateLanguageFailureBlock _Nullable)failureBlock; - -@end diff --git a/iOS_SDK/OneSignalSDK/Source/OSStateSynchronizer.m b/iOS_SDK/OneSignalSDK/Source/OSStateSynchronizer.m deleted file mode 100644 index b8c1d3d2b..000000000 --- a/iOS_SDK/OneSignalSDK/Source/OSStateSynchronizer.m +++ /dev/null @@ -1,419 +0,0 @@ -/** -Modified MIT License - -Copyright 2021 OneSignal - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -1. The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -2. All copies of substantial portions of the Software may only be used in connection -with services provided by OneSignal. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -*/ - -#import -#import "OSStateSynchronizer.h" -#import "OSUserStateSynchronizer.h" -#import "OSUserStatePushSynchronizer.h" -#import "OSUserStateEmailSynchronizer.h" -#import "OSUserStateSMSSynchronizer.h" -#import -#import "OSPendingCallbacks.h" - -@interface OneSignal () - -+ (int)getNotificationTypes; -+ (BOOL)isEmailSetup; -+ (BOOL)shouldUpdateExternalUserId:(NSString*)externalId withRequests:(NSDictionary*)requests; -+ (NSMutableDictionary*)getDuplicateExternalUserIdResponse:(NSString*)externalId withRequests:(NSDictionary*)requests; -+ (void)emailChangedWithNewEmailPlayerId:(NSString * _Nullable)emailPlayerId; -+ (void)setUserId:(NSString *)userId; -+ (void)setEmailUserId:(NSString *)emailUserId; -+ (void)saveExternalIdAuthToken:(NSString *)hashToken; -+ (void)saveSMSNumber:(NSString *)smsNumber withAuthToken:(NSString *)smsAuthToken userId:(NSString *)smsPlayerId; -+ (void)registerUserFinished; -+ (void)registerUserSuccessful; -@end - -@interface OSStateSynchronizer () - -@property (strong, nonatomic, readwrite, nonnull) NSDictionary *userStateSynchronizers; -@property (strong, nonatomic, readwrite, nonnull) OSSubscriptionState *currentSubscriptionState; -@property (strong, nonatomic, readwrite, nonnull) OSEmailSubscriptionState *currentEmailSubscriptionState; -@property (strong, nonatomic, readwrite, nonnull) OSSMSSubscriptionState *currentSMSSubscriptionState; - -@end - -@implementation OSStateSynchronizer - -- (instancetype)initWithSubscriptionState:(OSSubscriptionState *)subscriptionState - withEmailSubscriptionState:(OSEmailSubscriptionState *)emailSubscriptionState - withSMSSubscriptionState:(OSSMSSubscriptionState * _Nonnull)smsSubscriptionState { - self = [super init]; - if (self) { - _userStateSynchronizers = @{ - OS_PUSH : [[OSUserStatePushSynchronizer alloc] initWithSubscriptionState:subscriptionState], - OS_EMAIL : [[OSUserStateEmailSynchronizer alloc] initWithEmailSubscriptionState:emailSubscriptionState withSubcriptionState:subscriptionState], - OS_SMS : [[OSUserStateSMSSynchronizer alloc] initWithSMSSubscriptionState:smsSubscriptionState withSubcriptionState:subscriptionState] - }; - _currentSubscriptionState = subscriptionState; - _currentEmailSubscriptionState = emailSubscriptionState; - _currentSMSSubscriptionState = smsSubscriptionState; - } - return self; -} - -- (OSUserStateSynchronizer *)getPushStateSynchronizer { - return [_userStateSynchronizers objectForKey:OS_PUSH]; -} - -- (OSUserStateSynchronizer *)getEmailStateSynchronizer { - if ([self.currentEmailSubscriptionState isEmailSetup]) - return [_userStateSynchronizers objectForKey:OS_EMAIL]; - else - return nil; -} - -- (OSUserStateSynchronizer *)getSMSStateSynchronizer { - if ([self.currentSMSSubscriptionState isSMSSetup]) - return [_userStateSynchronizers objectForKey:OS_SMS]; - else - return nil; -} - -- (NSArray * _Nonnull)getStateSynchronizers { - NSMutableArray *stateSynchronizers = [NSMutableArray new]; - - let pushStateSyncronizer = [self getPushStateSynchronizer]; - let emailStateSyncronizer = [self getEmailStateSynchronizer]; - let smsStateSyncronizer = [self getSMSStateSynchronizer]; - [stateSynchronizers addObject:pushStateSyncronizer]; - - if (emailStateSyncronizer) - [stateSynchronizers addObject:emailStateSyncronizer]; - - if (smsStateSyncronizer) - [stateSynchronizers addObject:smsStateSyncronizer]; - - return stateSynchronizers; -} - -- (void)registerUserWithState:(OSUserState *)registrationState withSuccess:(OSMultipleSuccessBlock)successBlock onFailure:(OSMultipleFailureBlock)failureBlock { - let stateSyncronizer = [self getStateSynchronizers]; - let requests = [NSMutableDictionary new]; - for (OSUserStateSynchronizer* userStateSynchronizer in stateSyncronizer) { - let registrationData = [userStateSynchronizer getRegistrationData:registrationState]; - requests[userStateSynchronizer.getChannelId] = [userStateSynchronizer registerUserWithData:registrationData]; - } - - if (![self getEmailStateSynchronizer]) { - // If no email is setup clear the email external user id - [OneSignalUserDefaults.initStandard saveStringForKey:OSUD_EMAIL_EXTERNAL_USER_ID withValue:nil]; - } - - [OneSignalClient.sharedClient executeSimultaneousRequests:requests withSuccess:^(NSDictionary *results) { - [OneSignal onesignalLog:ONE_S_LL_VERBOSE message:[NSString stringWithFormat:@"on_session result: %@", results]]; - [OneSignal registerUserSuccessful]; - - // If the external user ID was sent as part of this request, we need to save it - // Cache the external id if it exists within the registration payload - if (registrationState.externalUserId) - [OneSignalUserDefaults.initStandard saveStringForKey:OSUD_EXTERNAL_USER_ID withValue:registrationState.externalUserId]; - - if (registrationState.externalUserIdHash) { - self.currentSubscriptionState.externalIdAuthCode = registrationState.externalUserIdHash; - - // Call persistAsFrom in order to save the externalIdAuthCode to NSUserDefaults - [self.currentSubscriptionState persist]; - } - - // Update email player ID - if (results[OS_EMAIL] && results[OS_EMAIL][@"id"]) { - - // Check to see if the email player_id or email_auth_token are different from what were previously saved - // if so, we should update the server with this change - if (self.currentEmailSubscriptionState.emailUserId && - ![self.currentEmailSubscriptionState.emailUserId isEqualToString:results[OS_EMAIL][@"id"]] && - self.currentEmailSubscriptionState.emailAuthCode) { - [OneSignal emailChangedWithNewEmailPlayerId:results[OS_EMAIL][@"id"]]; - [OneSignalUserDefaults.initStandard saveStringForKey:OSUD_EMAIL_EXTERNAL_USER_ID withValue:nil]; - } - - self.currentEmailSubscriptionState.emailUserId = results[OS_EMAIL][@"id"]; - [OneSignalUserDefaults.initStandard saveStringForKey:OSUD_EMAIL_PLAYER_ID withValue:self.currentEmailSubscriptionState.emailUserId]; - - // Email successfully updated, so if there was an external user id we should cache it for email now - if (registrationState.externalUserId) - [OneSignalUserDefaults.initStandard saveStringForKey:OSUD_EMAIL_EXTERNAL_USER_ID withValue:registrationState.externalUserId]; - - } - - // Update push player id - if (results.count > 0 && results[OS_PUSH][@"id"]) { - self.currentSubscriptionState.userId = results[OS_PUSH][@"id"]; - - // Player record was deleted so we should reset external user id - let cachedPlayerId = [OneSignalUserDefaults.initStandard getSavedStringForKey:OSUD_PLAYER_ID_TO defaultValue:nil]; - if (cachedPlayerId && ![results[OS_PUSH][@"id"] isEqualToString:cachedPlayerId]) { - [OneSignal onesignalLog:ONE_S_LL_VERBOSE message:[NSString stringWithFormat: @"Player id has changed. Clearing cached external user id"]]; - [OneSignalUserDefaults.initStandard saveStringForKey:OSUD_EXTERNAL_USER_ID withValue:nil]; - } - - // Save player_id to both standard and shared NSUserDefaults - [OneSignalUserDefaults.initStandard saveStringForKey:OSUD_PLAYER_ID_TO withValue:self.currentSubscriptionState.userId]; - [OneSignalUserDefaults.initShared saveStringForKey:OSUD_PLAYER_ID_TO withValue:self.currentSubscriptionState.userId]; - } - - if (successBlock) - successBlock(results); - } onFailure:^(NSDictionary *errors) { - for (NSString *key in @[OS_PUSH, OS_EMAIL]) - [OneSignal onesignalLog:ONE_S_LL_ERROR message:[NSString stringWithFormat: @"Encountered error during %@ registration with OneSignal: %@", key, errors[key]]]; - - [OneSignal registerUserFinished]; - if (failureBlock) - failureBlock(errors); - }]; -} - -- (void)setExternalUserId:(NSString *)externalId withExternalIdAuthHashToken:(NSString *)hashToken withAppId:(NSString *)appId withSuccess:(OSUpdateExternalUserIdSuccessBlock _Nullable)successBlock withFailure:(OSUpdateExternalUserIdFailureBlock _Nullable)failureBlock { - let stateSyncronizer = [self getStateSynchronizers]; - let requests = [NSMutableDictionary new]; - for (OSUserStateSynchronizer* userStateSynchronizer in stateSyncronizer) { - requests[userStateSynchronizer.getChannelId] = [userStateSynchronizer setExternalUserId:externalId - withExternalIdAuthHashToken:hashToken - withAppId:appId]; - } - - [OneSignalClient.sharedClient executeSimultaneousRequests:requests withCompletion:^(NSDictionary *results) { - if (results[OS_PUSH] && results[OS_PUSH][OS_SUCCESS] && [results[OS_PUSH][OS_SUCCESS] boolValue]) { - [OneSignalUserDefaults.initStandard saveStringForKey:OSUD_EXTERNAL_USER_ID withValue:externalId]; - - [OneSignal saveExternalIdAuthToken:hashToken]; - } - - if (results[OS_EMAIL] && results[OS_EMAIL][OS_SUCCESS] && [results[OS_EMAIL][OS_SUCCESS] boolValue]) - [OneSignalUserDefaults.initStandard saveStringForKey:OSUD_EMAIL_EXTERNAL_USER_ID withValue:externalId]; - - if (successBlock) - successBlock(results); - }]; -} - -- (void)setSMSNumber:(NSString *)smsNumber -withSMSAuthHashToken:(NSString *)hashToken - withAppId:(NSString *)appId - withSuccess:(OSSMSSuccessBlock)successBlock - withFailure:(OSSMSFailureBlock)failureBlock { - // If the user already has a onesignal sms player_id, then we should call update the device token - // otherwise, we should call Create Device - // Since developers may be making UI changes when this call finishes, we will call callbacks on the main thread. - if (_currentSMSSubscriptionState.smsNumber) { - let userId = _currentSMSSubscriptionState.smsUserId; - [OneSignalClient.sharedClient executeRequest:[OSRequestUpdateDeviceToken withUserId:userId appId:appId deviceToken:smsNumber smsAuthToken:hashToken externalIdAuthToken:self.currentSubscriptionState.externalIdAuthCode] onSuccess:^(NSDictionary *result) { - [OneSignal saveSMSNumber:smsNumber withAuthToken:hashToken userId:userId]; - [self callSMSSuccessBlockOnMainThread:successBlock withSMSNumber:smsNumber]; - } onFailure:^(NSError *error) { - [self callFailureBlockOnMainThread:failureBlock withError:error]; - }]; - } else { - [OneSignalClient.sharedClient executeRequest:[OSRequestCreateDevice withAppId:appId withDeviceType:@(DEVICE_TYPE_SMS) withSMSNumber:smsNumber withPlayerId:_currentSubscriptionState.userId withSMSAuthHash:hashToken withExternalUserId:[OneSignalUserDefaults.initStandard getSavedStringForKey:OSUD_EXTERNAL_USER_ID defaultValue:nil] withExternalIdAuthToken:self.currentSubscriptionState.externalIdAuthCode] onSuccess:^(NSDictionary *result) { - let smsPlayerId = (NSString*)result[@"id"]; - - if (smsPlayerId) { - [OneSignal saveSMSNumber:smsNumber withAuthToken:hashToken userId:smsPlayerId]; - - [OneSignalClient.sharedClient executeRequest:[OSRequestUpdateDeviceToken withUserId:self.currentSubscriptionState.userId appId:appId deviceToken:smsNumber smsAuthToken:hashToken externalIdAuthToken:self.currentSubscriptionState.externalIdAuthCode] onSuccess:^(NSDictionary *result) { - [self callSMSSuccessBlockOnMainThread:successBlock withSMSNumber:smsNumber]; - } onFailure:^(NSError *error) { - [self callFailureBlockOnMainThread:failureBlock withError:error]; - }]; - } else { - NSError *error = [NSError errorWithDomain:@"com.onesignal.sms" code:0 userInfo:@{@"error" : @"Missing OneSignal SMS Player ID"}]; - [self callFailureBlockOnMainThread:failureBlock withError:error]; - } - } onFailure:^(NSError *error) { - [self callFailureBlockOnMainThread:failureBlock withError:error]; - }]; - } -} - -- (void)logoutSMSWithAppId:(NSString *)appId withSuccess:(OSSMSSuccessBlock)successBlock withFailure:(OSSMSFailureBlock)failureBlock { - NSString *smsNumber = self.currentSMSSubscriptionState.smsNumber; - [OneSignal saveSMSNumber:nil withAuthToken:nil userId:nil]; - - [self callSMSSuccessBlockOnMainThread:successBlock withSMSNumber:smsNumber]; -} - -- (void)sendTagsWithAppId:(NSString *)appId - sendingTags:(NSDictionary *)tags - networkType:(NSNumber *)networkType - processingCallbacks:(NSArray *)nowProcessingCallbacks { - let stateSyncronizer = [self getStateSynchronizers]; - let requests = [NSMutableDictionary new]; - for (OSUserStateSynchronizer* userStateSynchronizer in stateSyncronizer) { - requests[userStateSynchronizer.getChannelId] = [userStateSynchronizer sendTagsWithAppId:appId sendingTags:tags networkType:networkType]; - } - - [OneSignalClient.sharedClient executeSimultaneousRequests:requests withSuccess:^(NSDictionary *results) { - // The tags for email & push are identical so it doesn't matter what we return in the success block - if (nowProcessingCallbacks) { - NSDictionary *resultTags = [self getFirstResultByChannelPriority:results]; - - for (OSPendingCallbacks *callbackSet in nowProcessingCallbacks) - if (callbackSet.successBlock) - callbackSet.successBlock(resultTags); - } - } onFailure:^(NSDictionary *errors) { - if (nowProcessingCallbacks) { - NSError *error = (NSError *)[self getFirstResultByChannelPriority:errors]; - for (OSPendingCallbacks *callbackSet in nowProcessingCallbacks) { - if (callbackSet.failureBlock) { - callbackSet.failureBlock(error); - } - } - } - }]; -} - -- (void)sendPurchases:(NSArray *)purchases appId:(NSString *)appId { - if (!_currentSubscriptionState.userId) - return; - - let stateSyncronizer = [self getStateSynchronizers]; - let requests = [NSMutableDictionary new]; - for (OSUserStateSynchronizer* userStateSynchronizer in stateSyncronizer) { - requests[userStateSynchronizer.getChannelId] = [userStateSynchronizer sendPurchases:purchases appId:appId]; - } - - [OneSignalClient.sharedClient executeSimultaneousRequests:requests withSuccess:nil onFailure:nil]; -} - -- (void)sendBadgeCount:(NSNumber *)badgeCount appId:(NSString *)appId { - let stateSyncronizer = [self getStateSynchronizers]; - let requests = [NSMutableDictionary new]; - for (OSUserStateSynchronizer* userStateSynchronizer in stateSyncronizer) { - requests[userStateSynchronizer.getChannelId] = [userStateSynchronizer sendBadgeCount:badgeCount appId:appId]; - } - - [OneSignalClient.sharedClient executeSimultaneousRequests:requests withSuccess:nil onFailure:nil]; -} - -- (void)sendLocation:(os_last_location *)lastLocation - appId:(NSString *)appId - networkType:(NSNumber *)networkType - backgroundState:(BOOL)background { - let stateSyncronizer = [self getStateSynchronizers]; - let requests = [NSMutableDictionary new]; - for (OSUserStateSynchronizer* userStateSynchronizer in stateSyncronizer) { - requests[userStateSynchronizer.getChannelId] = [userStateSynchronizer sendLocation:lastLocation appId:appId networkType:networkType backgroundState:background]; - } - - [OneSignalClient.sharedClient executeSimultaneousRequests:requests withSuccess:nil onFailure:nil]; -} - -- (void)sendOnFocusTime:(NSNumber*)totalTimeActive - params:(OSFocusCallParams *)params - withSuccess:(OSMultipleSuccessBlock)successBlock - onFailure:(OSMultipleFailureBlock)failureBlock { - let stateSyncronizer = [self getStateSynchronizers]; - let requests = [NSMutableDictionary new]; - for (OSUserStateSynchronizer* userStateSynchronizer in stateSyncronizer) { - // For email we omit additionalFieldsToAddToOnFocusPayload as we don't want to add - // outcome fields which would double report the influence time - NSArray *influenceParams = nil; - if ([userStateSynchronizer.getChannelId isEqual:OS_PUSH]) - influenceParams = params.influenceParams; - - requests[userStateSynchronizer.getChannelId] = [userStateSynchronizer sendOnFocusTime:totalTimeActive appId:params.appId netType:params.netType influenceParams:influenceParams]; - } - - [OneSignalClient.sharedClient executeSimultaneousRequests:requests withSuccess:^(NSDictionary *result) { - if (successBlock) - successBlock(result); - } onFailure:^(NSDictionary *errors) { - if (failureBlock) - failureBlock(errors); - }]; -} - --(id)getFirstResultByChannelPriority:(NSDictionary *)results { - id result; - for (NSString* channelId in OS_CHANNELS) { - result = results[channelId]; - if (result) - return result; - } - - return nil; -} - -- (void)callFailureBlockOnMainThread:(OSFailureBlock)failureBlock withError:(NSError *)error { - if (failureBlock) { - dispatch_async(dispatch_get_main_queue(), ^{ - failureBlock(error); - }); - } -} - -- (void)callSMSSuccessBlockOnMainThread:(OSSMSSuccessBlock)successBlock withSMSNumber:(NSString *)smsNumber { - if (successBlock) { - dispatch_async(dispatch_get_main_queue(), ^{ - let response = [NSMutableDictionary new]; - [response setValue:smsNumber forKey:SMS_NUMBER_KEY]; - successBlock(response); - }); - } -} - -- (void)updateLanguage:(NSString * _Nonnull)language - appId:(NSString * _Nonnull)appId - withSuccess:(OSUpdateLanguageSuccessBlock)successBlock - withFailure:(OSUpdateLanguageFailureBlock)failureBlock { - let stateSyncronizer = [self getStateSynchronizers]; - let requests = [NSMutableDictionary new]; - for (OSUserStateSynchronizer* userStateSynchronizer in stateSyncronizer) { - requests[userStateSynchronizer.getChannelId] = [userStateSynchronizer setLanguage:language withAppId:appId]; - } - - [OneSignalClient.sharedClient executeSimultaneousRequests:requests withSuccess:^(NSDictionary *results) { - if (results[OS_PUSH] && results[OS_PUSH][OS_SUCCESS] && [results[OS_PUSH][OS_SUCCESS] boolValue]) { - [OneSignalUserDefaults.initStandard saveStringForKey:OSUD_LANGUAGE withValue:language]; - } - else if (results[OS_EMAIL] && results[OS_EMAIL][OS_SUCCESS] && [results[OS_EMAIL][OS_SUCCESS] boolValue]) { - [OneSignalUserDefaults.initStandard saveStringForKey:OSUD_LANGUAGE withValue:language]; - } - else if (results[OS_SMS] && results[OS_SMS][OS_SUCCESS] && [results[OS_SMS][OS_SUCCESS] boolValue]) { - [OneSignalUserDefaults.initStandard saveStringForKey:OSUD_LANGUAGE withValue:language]; - } - else { - NSError *error = [NSError errorWithDomain:@"com.onesignal.language" code:0 userInfo:@{@"error" : @"Network Error"}]; - failureBlock(error); - return; - } - - if (successBlock) - successBlock(results); - } onFailure:^(NSDictionary *errors) { - if (failureBlock) { - NSError *error = (NSError *)[self getFirstResultByChannelPriority:errors]; - failureBlock(error); - } - }]; -} - -@end diff --git a/iOS_SDK/OneSignalSDK/Source/OSSubscription.h b/iOS_SDK/OneSignalSDK/Source/OSSubscription.h deleted file mode 100644 index b58fb0229..000000000 --- a/iOS_SDK/OneSignalSDK/Source/OSSubscription.h +++ /dev/null @@ -1,102 +0,0 @@ -/** - * Modified MIT License - * - * Copyright 2017 OneSignal - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * 1. The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * 2. All copies of substantial portions of the Software may only be used in connection - * with services provided by OneSignal. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ -#import - -#import "OneSignal.h" - -#import "OSObservable.h" - -#import "OSPermission.h" - -// Redefines are done so we can make properites writeable and backed internal variables accesiable to the SDK. -// Basicly the C# equivlent of a public gettter with an internal settter. - - -@protocol OSSubscriptionStateObserver --(void)onChanged:(OSSubscriptionState*)state; -@end - - -typedef OSObservable*, OSSubscriptionState*> ObservableSubscriptionStateType; - -// Redefine OSSubscriptionState -@interface OSSubscriptionState () { -@protected BOOL _isPushDisabled; -@protected NSString* _userId; -@protected NSString* _pushToken; -} - -// @property (readonly, nonatomic) BOOL subscribed; // (yes only if userId, pushToken, and setSubscription exists / are true) -@property (readwrite, nonatomic) BOOL isPushDisabled; // returns value of disablePush. -@property (readwrite, nonatomic) NSString* userId; // AKA OneSignal PlayerId -@property (readwrite, nonatomic) NSString* pushToken; // AKA Apple Device Token -@property (strong, nonatomic) NSString *externalIdAuthCode; -@property (nonatomic) ObservableSubscriptionStateType* observable; - -- (instancetype)initAsToWithPermision:(BOOL)permission; -- (instancetype)initAsFrom; -- (void)persist; - -@end - - -// Redefine OSSubscriptionState -@interface OSSubscriptionState () - -@property (nonatomic) BOOL accpeted; -- (void)setAccepted:(BOOL)inAccpeted; -- (void)persistAsFrom; -- (BOOL)compare:(OSSubscriptionState*)from; - -@property (nonatomic) BOOL delayedObserverUpdate; - -@end - -// Redefine OSSubscriptionStateChanges -@interface OSSubscriptionStateChanges () - -@property (readwrite) OSSubscriptionState* to; -@property (readwrite) OSSubscriptionState* from; - -@end - - -typedef OSObservable*, OSSubscriptionStateChanges*> ObservableSubscriptionStateChangesType; - -@interface OSSubscriptionChangedInternalObserver : NSObject -+ (void)fireChangesObserver:(OSSubscriptionState*)state; -@end - -@interface OneSignal (SubscriptionAdditions) - -@property (class) OSSubscriptionState* lastSubscriptionState; -@property (class) OSSubscriptionState* currentSubscriptionState; - -// Used to manage observers added by the app developer. -@property (class) ObservableSubscriptionStateChangesType* subscriptionStateChangesObserver; - -@end diff --git a/iOS_SDK/OneSignalSDK/Source/OSSubscription.m b/iOS_SDK/OneSignalSDK/Source/OSSubscription.m deleted file mode 100644 index 4956177f0..000000000 --- a/iOS_SDK/OneSignalSDK/Source/OSSubscription.m +++ /dev/null @@ -1,205 +0,0 @@ -/** - * Modified MIT License - * - * Copyright 2017 OneSignal - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * 1. The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * 2. All copies of substantial portions of the Software may only be used in connection - * with services provided by OneSignal. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ - -#import "OSSubscription.h" -#import "OneSignalHelper.h" - -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wundeclared-selector" - -@implementation OSSubscriptionState - -- (ObservableSubscriptionStateType*)observable { - if (!_observable) - _observable = [OSObservable new]; - return _observable; -} - -- (instancetype)initAsToWithPermision:(BOOL)permission { - _accpeted = permission; - - let standardUserDefaults = OneSignalUserDefaults.initStandard; - _userId = [standardUserDefaults getSavedStringForKey:OSUD_PLAYER_ID_TO defaultValue:nil]; - _pushToken = [standardUserDefaults getSavedStringForKey:OSUD_PUSH_TOKEN_TO defaultValue:nil]; - _isPushDisabled = [standardUserDefaults keyExists:OSUD_USER_SUBSCRIPTION_TO]; - _externalIdAuthCode = [standardUserDefaults getSavedStringForKey:OSUD_EXTERNAL_ID_AUTH_CODE defaultValue:nil]; - - return self; -} - -- (BOOL)compare:(OSSubscriptionState*)from { - return ![self.userId ?: @"" isEqualToString:from.userId ?: @""] || - ![self.pushToken ?: @"" isEqualToString:from.pushToken ?: @""] || - self.isPushDisabled != from.isPushDisabled || - self.accpeted != from.accpeted; -} - -- (instancetype)initAsFrom { - let standardUserDefaults = OneSignalUserDefaults.initStandard; - _accpeted = [standardUserDefaults getSavedBoolForKey:OSUD_PERMISSION_ACCEPTED_FROM defaultValue:false]; - _userId = [standardUserDefaults getSavedStringForKey:OSUD_PLAYER_ID_FROM defaultValue:nil]; - _pushToken = [standardUserDefaults getSavedStringForKey:OSUD_PUSH_TOKEN_FROM defaultValue:nil]; - _isPushDisabled = ![standardUserDefaults getSavedBoolForKey:OSUD_USER_SUBSCRIPTION_FROM defaultValue:NO]; - _externalIdAuthCode = [standardUserDefaults getSavedStringForKey:OSUD_EXTERNAL_ID_AUTH_CODE defaultValue:nil]; - - return self; -} - -- (void)persist { - let standardUserDefaults = OneSignalUserDefaults.initStandard; - [standardUserDefaults saveObjectForKey:OSUD_EXTERNAL_ID_AUTH_CODE withValue:_externalIdAuthCode]; -} - -- (void)persistAsFrom { - NSString* strUserSubscriptionSetting = nil; - if (_isPushDisabled) - strUserSubscriptionSetting = @"no"; - - let standardUserDefaults = OneSignalUserDefaults.initStandard; - [standardUserDefaults saveBoolForKey:OSUD_PERMISSION_ACCEPTED_FROM withValue:_accpeted]; - [standardUserDefaults saveStringForKey:OSUD_PLAYER_ID_FROM withValue:_userId]; - [standardUserDefaults saveObjectForKey:OSUD_PUSH_TOKEN_FROM withValue:_pushToken]; - [standardUserDefaults saveObjectForKey:OSUD_USER_SUBSCRIPTION_FROM withValue:strUserSubscriptionSetting]; - [standardUserDefaults saveObjectForKey:OSUD_EXTERNAL_ID_AUTH_CODE withValue:_externalIdAuthCode]; -} - -- (instancetype)copyWithZone:(NSZone*)zone { - OSSubscriptionState* copy = [[[self class] alloc] init]; - - if (copy) { - copy->_userId = [_userId copy]; - copy->_pushToken = [_pushToken copy]; - copy->_isPushDisabled = _isPushDisabled; - copy->_accpeted = _accpeted; - } - - return copy; -} - -- (void)onChanged:(OSPermissionState*)state { - [self setAccepted:state.accepted]; -} - -- (void)setUserId:(NSString*)userId { - BOOL changed = ![[NSString stringWithString:userId] isEqualToString:_userId]; - _userId = userId; - if (self.observable && changed) - [self.observable notifyChange:self]; -} - -- (void)setPushToken:(NSString*)pushToken { - BOOL changed = ![[NSString stringWithString:pushToken] isEqualToString:_pushToken]; - _pushToken = pushToken; - if (changed) { - [OneSignalUserDefaults.initStandard saveStringForKey:OSUD_PUSH_TOKEN_TO withValue:_pushToken]; - - if (self.observable) - [self.observable notifyChange:self]; - } -} - -- (void)setIsPushDisabled:(BOOL)isPushDisabled { - BOOL changed = isPushDisabled != _isPushDisabled; - _isPushDisabled = isPushDisabled; - - if (self.observable && changed) - [self.observable notifyChange:self]; -} - - -- (void)setAccepted:(BOOL)inAccpeted { - BOOL lastSubscribed = self.isSubscribed; - - // checks to see if we should delay the observer update - // This is to prevent a problem where the observer gets updated - // before the OneSignal server does. (11f7f49841339317a334c5ec928db7edccb21cfe) - - if ([OneSignal performSelector:@selector(shouldDelaySubscriptionSettingsUpdate)]) { - self.delayedObserverUpdate = true; - return; - } - - _accpeted = inAccpeted; - if (lastSubscribed != self.isSubscribed) - [self.observable notifyChange:self]; -} - -- (BOOL)isSubscribed { - return _userId && _pushToken && !_isPushDisabled && _accpeted; -} - -- (NSString*)description { - static NSString* format = @""; - return [NSString stringWithFormat:format, self.userId, self.pushToken, self.isPushDisabled, self.isSubscribed, self.externalIdAuthCode]; -} - -- (NSDictionary*)toDictionary { - return @{ - @"userId": _userId ?: [NSNull null], - @"pushToken": _pushToken ?: [NSNull null], - @"isPushDisabled": @(_isPushDisabled), - @"isSubscribed": @(self.isSubscribed) - }; -} - -@end - - -@implementation OSSubscriptionChangedInternalObserver - -- (void)onChanged:(OSSubscriptionState*)state { - [OSSubscriptionChangedInternalObserver fireChangesObserver:state]; -} - -+ (void)fireChangesObserver:(OSSubscriptionState*)state { - OSSubscriptionStateChanges* stateChanges = [OSSubscriptionStateChanges alloc]; - stateChanges.from = OneSignal.lastSubscriptionState; - stateChanges.to = [state copy]; - if (OneSignal.isRegisterUserSuccessful) { - BOOL hasReceiver = [OneSignal.subscriptionStateChangesObserver notifyChange:stateChanges]; - - if (hasReceiver) { - OneSignal.lastSubscriptionState = [state copy]; - [OneSignal.lastSubscriptionState persistAsFrom]; - } - } -} - -@end - -@implementation OSSubscriptionStateChanges -- (NSString*)description { - static NSString* format = @""; - return [NSString stringWithFormat:format, _from, _to]; -} - -- (NSDictionary*)toDictionary { - return @{@"from": [_from toDictionary], - @"to": [_to toDictionary]}; -} - -@end diff --git a/iOS_SDK/OneSignalSDK/Source/OSUnattributedFocusTimeProcessor.m b/iOS_SDK/OneSignalSDK/Source/OSUnattributedFocusTimeProcessor.m index 1bc5da68b..e10da24eb 100644 --- a/iOS_SDK/OneSignalSDK/Source/OSUnattributedFocusTimeProcessor.m +++ b/iOS_SDK/OneSignalSDK/Source/OSUnattributedFocusTimeProcessor.m @@ -26,39 +26,20 @@ */ #import #import +#import #import "OSUnattributedFocusTimeProcessor.h" -#import "OSStateSynchronizer.h" +#import -@interface OneSignal () -+ (OSStateSynchronizer *)stateSynchronizer; -@end - -@implementation OSUnattributedFocusTimeProcessor { - UIBackgroundTaskIdentifier focusBackgroundTask; -} +@implementation OSUnattributedFocusTimeProcessor static let UNATTRIBUTED_MIN_SESSION_TIME_SEC = 60; - (instancetype)init { self = [super init]; - focusBackgroundTask = UIBackgroundTaskInvalid; + [OSBackgroundTaskManager setTaskInvalid:UNATTRIBUTED_FOCUS_TASK]; return self; } -- (void)beginBackgroundFocusTask { - focusBackgroundTask = [UIApplication.sharedApplication beginBackgroundTaskWithExpirationHandler:^{ - [self endBackgroundFocusTask]; - }]; -} - -- (void)endBackgroundFocusTask { - [OneSignal onesignalLog:ONE_S_LL_DEBUG - message:[NSString stringWithFormat:@"OSUnattributedFocusTimeProcessor:endDelayBackgroundTask:%lu", (unsigned long)focusBackgroundTask]]; - [UIApplication.sharedApplication endBackgroundTask: focusBackgroundTask]; - focusBackgroundTask = UIBackgroundTaskInvalid; - [OneSignal onesignalLog:ONE_S_LL_DEBUG message:@"endBackgroundFocusTask called"]; -} - - (int)getMinSessionTime { return UNATTRIBUTED_MIN_SESSION_TIME_SEC; } @@ -71,10 +52,10 @@ - (void)sendOnFocusCall:(OSFocusCallParams *)params { let unsentActive = [super getUnsentActiveTime]; let totalTimeActive = unsentActive + params.timeElapsed; - [OneSignal onesignalLog:ONE_S_LL_DEBUG message:[NSString stringWithFormat:@"sendOnFocusCall unattributed with totalTimeActive %f", totalTimeActive]]; + [OneSignalLog onesignalLog:ONE_S_LL_DEBUG message:[NSString stringWithFormat:@"sendOnFocusCall unattributed with totalTimeActive %f", totalTimeActive]]; if (![super hasMinSyncTime:totalTimeActive]) { - [OneSignal onesignalLog:ONE_S_LL_DEBUG message:[NSString stringWithFormat:@"unattributed influence saveUnsentActiveTime %f", totalTimeActive]]; + [OneSignalLog onesignalLog:ONE_S_LL_DEBUG message:[NSString stringWithFormat:@"unattributed influence saveUnsentActiveTime %f", totalTimeActive]]; [super saveUnsentActiveTime:totalTimeActive]; return; } @@ -84,26 +65,25 @@ - (void)sendOnFocusCall:(OSFocusCallParams *)params { - (void)sendUnsentActiveTime:(OSFocusCallParams *)params { let unsentActive = [super getUnsentActiveTime]; - [OneSignal onesignalLog:ONE_S_LL_DEBUG message:[NSString stringWithFormat:@"sendUnsentActiveTime unattributed with unsentActive %f", unsentActive]]; + [OneSignalLog onesignalLog:ONE_S_LL_DEBUG message:[NSString stringWithFormat:@"sendUnsentActiveTime unattributed with unsentActive %f", unsentActive]]; [self sendOnFocusCallWithParams:params totalTimeActive:unsentActive]; } - (void)sendOnFocusCallWithParams:(OSFocusCallParams *)params totalTimeActive:(NSTimeInterval)totalTimeActive { - if (!params.userId) - return; - + // should dispatch_async? dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{ - [self beginBackgroundFocusTask]; - [OneSignal onesignalLog:ONE_S_LL_DEBUG message:@"beginBackgroundFocusTask start"]; - - [OneSignal.stateSynchronizer sendOnFocusTime:@(totalTimeActive) params:params withSuccess:^(NSDictionary *result) { + [OSBackgroundTaskManager beginBackgroundTask:UNATTRIBUTED_FOCUS_TASK]; + + [OneSignalLog onesignalLog:ONE_S_LL_DEBUG message:@"OSUnattributedFocusTimeProcessor:sendOnFocusCallWithParams start"]; + + [OneSignalUserManagerImpl.sharedInstance updateSessionWithSessionCount:nil sessionTime:@(totalTimeActive) refreshDeviceMetadata:false sendImmediately:true onSuccess:^{ [super saveUnsentActiveTime:0]; - [OneSignal onesignalLog:ONE_S_LL_DEBUG message:@"sendOnFocusCallWithParams unattributed succeed, saveUnsentActiveTime with 0"]; - [self endBackgroundFocusTask]; - } onFailure:^(NSDictionary *errors) { - [OneSignal onesignalLog:ONE_S_LL_DEBUG message:@"sendOnFocusCallWithParams unattributed failed, will retry on next open"]; - [self endBackgroundFocusTask]; + [OneSignalLog onesignalLog:ONE_S_LL_DEBUG message:@"sendOnFocusCallWithParams unattributed succeed, saveUnsentActiveTime with 0"]; + [OSBackgroundTaskManager endBackgroundTask:UNATTRIBUTED_FOCUS_TASK]; + } onFailure:^{ + [OneSignalLog onesignalLog:ONE_S_LL_WARN message:@"sendOnFocusCallWithParams unattributed failed, will retry on next open"]; + [OSBackgroundTaskManager endBackgroundTask:UNATTRIBUTED_FOCUS_TASK]; }]; }); } diff --git a/iOS_SDK/OneSignalSDK/Source/OSUserState.h b/iOS_SDK/OneSignalSDK/Source/OSUserState.h deleted file mode 100644 index 69fa8bd92..000000000 --- a/iOS_SDK/OneSignalSDK/Source/OSUserState.h +++ /dev/null @@ -1,54 +0,0 @@ -/** -Modified MIT License - -Copyright 2021 OneSignal - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -1. The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -2. All copies of substantial portions of the Software may only be used in connection -with services provided by OneSignal. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -*/ - -#import "OSLocationState.h" - -@interface OSUserState : NSObject - -@property (strong, nonatomic, readwrite, nullable) NSString *appId; -@property (strong, nonatomic, readwrite, nullable) NSString *deviceOs; -@property (strong, nonatomic, readwrite, nullable) NSNumber *timezone; -@property (strong, nonatomic, readwrite, nullable) NSString *timezoneId; -@property (strong, nonatomic, readwrite, nullable) NSString *sdk; -@property (strong, nonatomic, readwrite, nullable) NSString *sdkType; -@property (strong, nonatomic, readwrite, nullable) NSString *externalUserId; -@property (strong, nonatomic, readwrite, nullable) NSString *externalUserIdHash; -@property (strong, nonatomic, readwrite, nullable) NSString *deviceModel; -@property (strong, nonatomic, readwrite, nullable) NSString *gameVersion; -@property (nonatomic, readwrite) BOOL isRooted; -@property (strong, nonatomic, readwrite, nullable) NSNumber *netType; -@property (strong, nonatomic, readwrite, nullable) NSString *iOSBundle; -@property (strong, nonatomic, readwrite, nullable) NSString *language; -@property (strong, nonatomic, readwrite, nullable) NSNumber *notificationTypes; -@property (strong, nonatomic, readwrite, nullable) NSString *carrier; -@property (strong, nonatomic, readwrite, nullable) NSNumber *testType; -@property (strong, nonatomic, readwrite, nullable) NSDictionary* tags; -@property (strong, nonatomic, readwrite, nullable) OSLocationState *locationState; - -- (NSDictionary *_Nonnull)toDictionary; - -@end diff --git a/iOS_SDK/OneSignalSDK/Source/OSUserState.m b/iOS_SDK/OneSignalSDK/Source/OSUserState.m deleted file mode 100644 index 028d0b68e..000000000 --- a/iOS_SDK/OneSignalSDK/Source/OSUserState.m +++ /dev/null @@ -1,77 +0,0 @@ -/** -Modified MIT License - -Copyright 2021 OneSignal - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -1. The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -2. All copies of substantial portions of the Software may only be used in connection -with services provided by OneSignal. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -*/ - - -#import -#import "OSUserState.h" - -@implementation OSUserState - -- (NSDictionary*)toDictionary { - NSMutableDictionary *dataDic = [NSMutableDictionary dictionaryWithObjectsAndKeys: - _appId, @"app_id", - _deviceOs, @"device_os", - _timezone, @"timezone", - _timezoneId, @"timezone_id", - _sdk, @"sdk", - nil]; - - if (_externalUserId) - dataDic[@"external_user_id"] = _externalUserId; - if (_externalUserIdHash) - dataDic[@"external_user_id_auth_hash"] = _externalUserIdHash; - if (_deviceModel) - dataDic[@"device_model"] = _deviceModel; - if (_gameVersion) - dataDic[@"game_version"] = _gameVersion; - if (self.isRooted) - dataDic[@"rooted"] = @YES; - - dataDic[@"net_type"] = _netType; - - if (_sdk) - dataDic[@"sdk_type"] = _sdk; - if (_iOSBundle) - dataDic[@"ios_bundle"] = _iOSBundle; - if (_language) - dataDic[@"language"] = _language; - - dataDic[@"notification_types"] = _notificationTypes; - - if (_carrier) - dataDic[@"carrier"] = _carrier; - if (_testType) - dataDic[@"test_type"] = _testType; - if (_tags) - dataDic[@"tags"] = _tags; - if (_locationState) - [dataDic addEntriesFromDictionary:_locationState.toDictionary]; - - return dataDic; -} - -@end diff --git a/iOS_SDK/OneSignalSDK/Source/OSUserStateEmailSynchronizer.m b/iOS_SDK/OneSignalSDK/Source/OSUserStateEmailSynchronizer.m deleted file mode 100644 index 6bf462d49..000000000 --- a/iOS_SDK/OneSignalSDK/Source/OSUserStateEmailSynchronizer.m +++ /dev/null @@ -1,97 +0,0 @@ -/** -Modified MIT License - -Copyright 2021 OneSignal - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -1. The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -2. All copies of substantial portions of the Software may only be used in connection -with services provided by OneSignal. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -*/ - -#import -#import "OSUserStateEmailSynchronizer.h" -#import "OSEmailSubscription.h" -#import "OSSubscription.h" - -@interface OSUserStateEmailSynchronizer () - -@property (strong, nonatomic, readwrite, nonnull) OSEmailSubscriptionState *currentEmailSubscriptionState; -@property (strong, nonatomic, readwrite, nonnull) OSSubscriptionState *currentSubscriptionState; - -@end - -@implementation OSUserStateEmailSynchronizer - -- (instancetype)initWithEmailSubscriptionState:(OSEmailSubscriptionState *)emailSubscriptionState - withSubcriptionState:(OSSubscriptionState *)subscriptionState { - self = [super init]; - if (self) { - _currentEmailSubscriptionState = emailSubscriptionState; - _currentSubscriptionState = subscriptionState; - } - return self; -} - -- (NSString *)getId { - return _currentEmailSubscriptionState.emailUserId; -} - -- (NSString *)getIdAuthHashToken { - return _currentEmailSubscriptionState.emailAuthCode; -} - -- (NSString *)getExternalIdAuthHashToken { - return _currentSubscriptionState.externalIdAuthCode; -} - -- (NSString *)getEmailAuthHashToken { - return [self getIdAuthHashToken]; -} - -- (NSString *)getChannelId { - return OS_EMAIL; -} - -- (NSNumber *)getDeviceType { - return @(DEVICE_TYPE_EMAIL); -} - -- (NSDictionary *)getRegistrationData:(OSUserState *)registrationState { - NSMutableDictionary *emailDataDic = (NSMutableDictionary *)[registrationState.toDictionary mutableCopy]; - emailDataDic[@"device_type"] = self.getDeviceType; - emailDataDic[@"email_auth_hash"] = self.getEmailAuthHashToken; - emailDataDic[@"identifier"] = _currentEmailSubscriptionState.emailAddress; - emailDataDic[@"device_player_id"] = _currentSubscriptionState.userId; - [emailDataDic removeObjectForKey:@"notification_types"]; - - // If push device has external id we want to add it to the email device also - if (registrationState.externalUserId) - emailDataDic[@"external_user_id"] = registrationState.externalUserId; - - return emailDataDic; -} - -- (OSRequestUpdateExternalUserId *)setExternalUserId:(NSString *)externalId - withExternalIdAuthHashToken:(NSString *)hashToken - withAppId:(NSString *)appId { - return [OSRequestUpdateExternalUserId withUserId:externalId withUserIdHashToken:hashToken withOneSignalUserId:[self getId] withEmailHashToken:[self getEmailAuthHashToken] appId:appId]; -} - -@end diff --git a/iOS_SDK/OneSignalSDK/Source/OSUserStatePushSynchronizer.m b/iOS_SDK/OneSignalSDK/Source/OSUserStatePushSynchronizer.m deleted file mode 100644 index de669cc20..000000000 --- a/iOS_SDK/OneSignalSDK/Source/OSUserStatePushSynchronizer.m +++ /dev/null @@ -1,79 +0,0 @@ -/** -Modified MIT License - -Copyright 2021 OneSignal - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -1. The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -2. All copies of substantial portions of the Software may only be used in connection -with services provided by OneSignal. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -*/ - -#import -#import "OSUserStatePushSynchronizer.h" -#import "OSSubscription.h" - -@interface OSUserStatePushSynchronizer () - -@property (strong, nonatomic, readwrite, nonnull) OSSubscriptionState *currentSubscriptionState; - -@end - -@implementation OSUserStatePushSynchronizer - -- (instancetype)initWithSubscriptionState:(OSSubscriptionState *)subscriptionState { - self = [super init]; - if (self) - _currentSubscriptionState = subscriptionState; - return self; -} - -- (NSString *)getId { - return _currentSubscriptionState.userId; -} - -- (NSString *)getIdAuthHashToken { - return _currentSubscriptionState.externalIdAuthCode; -} - -- (NSString *)getExternalIdAuthHashToken { - return [self getIdAuthHashToken]; -} - -- (NSString *)getEmailAuthHashToken { - return nil; -} - -- (NSString *)getChannelId { - return OS_PUSH; -} - -- (NSNumber *)getDeviceType { - return @(DEVICE_TYPE_PUSH); -} - -- (NSDictionary *)getRegistrationData:(OSUserState *)registrationState { - NSMutableDictionary *pushDataDic = (NSMutableDictionary *)[registrationState.toDictionary mutableCopy]; - pushDataDic[@"identifier"] = _currentSubscriptionState.pushToken; - pushDataDic[@"device_type"] = self.getDeviceType; - - return pushDataDic; -} - -@end diff --git a/iOS_SDK/OneSignalSDK/Source/OSUserStateSMSSynchronizer.m b/iOS_SDK/OneSignalSDK/Source/OSUserStateSMSSynchronizer.m deleted file mode 100644 index 92c4029ef..000000000 --- a/iOS_SDK/OneSignalSDK/Source/OSUserStateSMSSynchronizer.m +++ /dev/null @@ -1,117 +0,0 @@ -/** -Modified MIT License - -Copyright 2021 OneSignal - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -1. The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -2. All copies of substantial portions of the Software may only be used in connection -with services provided by OneSignal. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -*/ - -#import -#import "OSUserStateSMSSynchronizer.h" -#import "OSSMSSubscription.h" -#import "OSSubscription.h" - -@interface OSUserStateSMSSynchronizer () - -@property (strong, nonatomic, readwrite, nonnull) OSSMSSubscriptionState *currentSMSSubscriptionState; -@property (strong, nonatomic, readwrite, nonnull) OSSubscriptionState *currentSubscriptionState; - -@end - -@implementation OSUserStateSMSSynchronizer - -- (instancetype)initWithSMSSubscriptionState:(OSSMSSubscriptionState *)smsSubscriptionState - withSubcriptionState:(OSSubscriptionState *)subscriptionState { - self = [super init]; - if (self) { - _currentSMSSubscriptionState = smsSubscriptionState; - _currentSubscriptionState = subscriptionState; - } - return self; -} - -- (NSString *)getId { - return _currentSMSSubscriptionState.smsUserId; -} - -- (NSString *)getIdAuthHashToken { - return _currentSMSSubscriptionState.smsAuthCode; -} - -- (NSString *)getExternalIdAuthHashToken { - return _currentSubscriptionState.externalIdAuthCode; -} - -- (NSString *)getEmailAuthHashToken { - return nil; -} - -- (NSString *)getSMSAuthHashToken { - return [self getIdAuthHashToken]; -} - -- (NSString *)getChannelId { - return OS_SMS; -} - -- (NSNumber *)getDeviceType { - return @(DEVICE_TYPE_SMS); -} - -- (NSDictionary *)getRegistrationData:(OSUserState *)registrationState { - NSMutableDictionary *smsDataDic = (NSMutableDictionary *)[registrationState.toDictionary mutableCopy]; - smsDataDic[@"device_type"] = self.getDeviceType; - smsDataDic[SMS_NUMBER_AUTH_HASH_KEY] = self.getSMSAuthHashToken; - smsDataDic[SMS_NUMBER_KEY] = _currentSMSSubscriptionState.smsNumber; - smsDataDic[@"device_player_id"] = _currentSubscriptionState.userId; - [smsDataDic removeObjectForKey:@"notification_types"]; - - // If push device has external id we want to add it to the SMS device also - if (registrationState.externalUserId) - smsDataDic[@"external_user_id"] = registrationState.externalUserId; - - return smsDataDic; -} - -- (OSRequestUpdateExternalUserId *)setExternalUserId:(NSString *)externalId - withExternalIdAuthHashToken:(NSString *)hashToken - withAppId:(NSString *)appId { - return [OSRequestUpdateExternalUserId withUserId:externalId withUserIdHashToken:hashToken withOneSignalUserId:[self getId] withSMSHashToken:[self getSMSAuthHashToken] appId:appId]; -} - -- (OSRequestUpdateLanguage *)setLanguage:(NSString *)language - withAppId:(NSString *)appId { - return [OSRequestUpdateLanguage withUserId:[self getId] appId:appId language:language smsAuthToken:[self getSMSAuthHashToken] externalIdAuthToken:[self getExternalIdAuthHashToken]]; -} - -- (OSRequestSendTagsToServer *)sendTagsWithAppId:(NSString *)appId - sendingTags:(NSDictionary *)tags - networkType:(NSNumber *)networkType{ - return [OSRequestSendTagsToServer withUserId:[self getId] appId:appId tags:tags networkType:networkType withSMSAuthHashToken:[self getSMSAuthHashToken] withExternalIdAuthHashToken:[self getExternalIdAuthHashToken]]; -} - -- (OSRequestBadgeCount *)sendBadgeCount:(NSNumber *)badgeCount - appId:(NSString *)appId{ - return [OSRequestBadgeCount withUserId:[self getId] appId:appId badgeCount:badgeCount smsAuthToken:[self getSMSAuthHashToken] externalIdAuthToken:[self getExternalIdAuthHashToken]]; -} - -@end diff --git a/iOS_SDK/OneSignalSDK/Source/OSUserStateSynchronizer.h b/iOS_SDK/OneSignalSDK/Source/OSUserStateSynchronizer.h deleted file mode 100644 index dc0831791..000000000 --- a/iOS_SDK/OneSignalSDK/Source/OSUserStateSynchronizer.h +++ /dev/null @@ -1,81 +0,0 @@ -/** -Modified MIT License - -Copyright 2021 OneSignal - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -1. The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -2. All copies of substantial portions of the Software may only be used in connection -with services provided by OneSignal. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -*/ - -#import "OneSignal.h" -#import -#import "OneSignalLocation.h" -#import "OSUserState.h" -#import "OSLocationRequests.h" -#import "OSFocusRequests.h" -#import "OSSubscription.h" - -@interface OSUserStateSynchronizer : NSObject - -- (NSString * _Nonnull)getId; - -- (NSString * _Nullable)getIdAuthHashToken; - -- (NSString * _Nullable)getExternalIdAuthHashToken; - -- (NSString * _Nullable)getEmailAuthHashToken; - -- (NSString * _Nonnull)getChannelId; - -- (NSNumber * _Nonnull)getDeviceType; - -- (NSDictionary * _Nonnull)getRegistrationData:(OSUserState * _Nonnull)registrationState; - -- (OSRequestRegisterUser * _Nonnull)registerUserWithData:(NSDictionary * _Nonnull)registrationDatad; - -- (OSRequestUpdateExternalUserId * _Nonnull)setExternalUserId:(NSString * _Nonnull)externalId - withExternalIdAuthHashToken:(NSString * _Nullable)hashToken - withAppId:(NSString * _Nonnull)appId; - -- (OSRequestSendTagsToServer * _Nonnull)sendTagsWithAppId:(NSString * _Nonnull)appId - sendingTags:(NSDictionary * _Nonnull)tags - networkType:(NSNumber * _Nonnull)networkType; - -- (OSRequestUpdateLanguage * _Nonnull)setLanguage:(NSString * _Nonnull)language - withAppId:(NSString * _Nonnull)appId; - -- (OSRequestSendPurchases * _Nonnull)sendPurchases:(NSArray * _Nonnull)purchases - appId:(NSString * _Nonnull)appId; - -- (OSRequestBadgeCount * _Nonnull)sendBadgeCount:(NSNumber * _Nonnull)badgeCount - appId:(NSString * _Nonnull)appId; - -- (OSRequestSendLocation * _Nonnull)sendLocation:(os_last_location * _Nonnull)lastLocation - appId:(NSString * _Nonnull)appId - networkType:(NSNumber * _Nonnull)networkType - backgroundState:(BOOL)background; - -- (OSRequestOnFocus * _Nonnull)sendOnFocusTime:(NSNumber * _Nonnull)activeTime - appId:(NSString * _Nonnull)appId - netType:(NSNumber * _Nonnull)netType - influenceParams:(NSArray * _Nullable)influenceParams; - -@end diff --git a/iOS_SDK/OneSignalSDK/Source/OSUserStateSynchronizer.m b/iOS_SDK/OneSignalSDK/Source/OSUserStateSynchronizer.m deleted file mode 100644 index f20098f64..000000000 --- a/iOS_SDK/OneSignalSDK/Source/OSUserStateSynchronizer.m +++ /dev/null @@ -1,93 +0,0 @@ -/** -Modified MIT License - -Copyright 2021 OneSignal - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -1. The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -2. All copies of substantial portions of the Software may only be used in connection -with services provided by OneSignal. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -*/ - -#import -#import "OSUserStateSynchronizer.h" -#import "OSMacros.h" - -@implementation OSUserStateSynchronizer - -- (NSString *)getId { mustOverride(); } - -- (NSString *)getIdAuthHashToken{ mustOverride(); }; - -- (NSString *)getExternalIdAuthHashToken { mustOverride(); } - -- (NSString *)getEmailAuthHashToken { mustOverride(); } - -- (NSNumber *)getDeviceType { mustOverride(); } - -- (NSString *)getChannelId { mustOverride(); } - -- (NSDictionary *)getRegistrationData:(OSUserState *)registrationState { mustOverride(); } - -- (OSRequestRegisterUser *)registerUserWithData:(NSDictionary *)registrationData { - return [OSRequestRegisterUser withData:registrationData userId:[self getId]]; -} - -- (OSRequestUpdateExternalUserId *)setExternalUserId:(NSString *)externalId - withExternalIdAuthHashToken:(NSString *)hashToken - withAppId:(NSString *)appId { - return [OSRequestUpdateExternalUserId withUserId:externalId withUserIdHashToken:hashToken withOneSignalUserId:[self getId] appId:appId]; -} - -- (OSRequestUpdateLanguage *)setLanguage:(NSString *)language - withAppId:(NSString *)appId { - return [OSRequestUpdateLanguage withUserId:[self getId] appId:appId language:language emailAuthToken:[self getEmailAuthHashToken] externalIdAuthToken:[self getExternalIdAuthHashToken]]; -} - -- (OSRequestSendTagsToServer *)sendTagsWithAppId:(NSString *)appId - sendingTags:(NSDictionary *)tags - networkType:(NSNumber *)networkType{ - return [OSRequestSendTagsToServer withUserId:[self getId] appId:appId tags:tags networkType:networkType withEmailAuthHashToken:[self getEmailAuthHashToken] withExternalIdAuthHashToken:[self getExternalIdAuthHashToken]]; -} - -- (OSRequestSendPurchases *)sendPurchases:(NSArray *)purchases - appId:(NSString *)appId { - return [OSRequestSendPurchases withUserId:[self getId] externalIdAuthToken:[self getIdAuthHashToken] appId:appId withPurchases:purchases]; -} - -- (OSRequestBadgeCount *)sendBadgeCount:(NSNumber *)badgeCount - appId:(NSString *)appId{ - return [OSRequestBadgeCount withUserId:[self getId] appId:appId badgeCount:badgeCount emailAuthToken:[self getEmailAuthHashToken] externalIdAuthToken:[self getExternalIdAuthHashToken]]; -} - -- (OSRequestSendLocation *)sendLocation:(os_last_location *)lastLocation - appId:(NSString *)appId - networkType:(NSNumber *)networkType - backgroundState:(BOOL)background{ - return [OSRequestSendLocation withUserId:[self getId] appId:appId location:lastLocation networkType:networkType backgroundState:background emailAuthHashToken:[self getEmailAuthHashToken] externalIdAuthToken:[self getExternalIdAuthHashToken]]; -} - -- (OSRequestOnFocus *)sendOnFocusTime:(NSNumber *)activeTime - appId:(NSString *)appId - netType:(NSNumber *)netType - influenceParams:(NSArray *)influenceParams { - return [OSRequestOnFocus withUserId:[self getId] appId:appId activeTime:activeTime netType:netType deviceType:[self getDeviceType] influenceParams:influenceParams]; -} - -@end diff --git a/iOS_SDK/OneSignalSDK/Source/OneSignal.h b/iOS_SDK/OneSignalSDK/Source/OneSignal.h deleted file mode 100755 index a85aa7bd7..000000000 --- a/iOS_SDK/OneSignalSDK/Source/OneSignal.h +++ /dev/null @@ -1,463 +0,0 @@ -/** - Modified MIT License - - Copyright 2017 OneSignal - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - 1. The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - 2. All copies of substantial portions of the Software may only be used in connection - with services provided by OneSignal. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - */ - -/** - ### Setting up the SDK ### - Follow the documentation from https://documentation.onesignal.com/docs/ios-sdk-setupto setup OneSignal in your app. - - ### API Reference ### - Follow the documentation from https://documentation.onesignal.com/docs/ios-sdk-api for a detailed explanation of the API. - - ### Troubleshoot ### - Follow the documentation from https://documentation.onesignal.com/docs/troubleshooting-ios to fix common problems. - - For help on how to upgrade your code from 1.* SDK to 2.*: https://documentation.onesignal.com/docs/upgrading-to-ios-sdk-20 - - ### More ### - iOS Push Cert: https://documentation.onesignal.com/docs/generating-an-ios-push-certificate -*/ - -#import -#import -#import -#import -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wstrict-prototypes" -#pragma clang diagnostic ignored "-Wnullability-completeness" - -@interface OSInAppMessage : NSObject - -@property (strong, nonatomic, nonnull) NSString *messageId; - -// Convert the object into a NSDictionary -- (NSDictionary *_Nonnull)jsonRepresentation; - -@end - - -@interface OSInAppMessageTag : NSObject - -@property (strong, nonatomic, nullable) NSDictionary *tagsToAdd; -@property (strong, nonatomic, nullable) NSArray *tagsToRemove; - -// Convert the class into a NSDictionary -- (NSDictionary *_Nonnull)jsonRepresentation; - -@end - -@interface OSInAppMessageAction : NSObject - -// The action name attached to the IAM action -@property (strong, nonatomic, nullable) NSString *clickName; - -// The URL (if any) that should be opened when the action occurs -@property (strong, nonatomic, nullable) NSURL *clickUrl; - -//UUID for the page in an IAM Carousel -@property (strong, nonatomic, nullable) NSString *pageId; - -// Whether or not the click action is first click on the IAM -@property (nonatomic) BOOL firstClick; - -// Whether or not the click action dismisses the message -@property (nonatomic) BOOL closesMessage; - -// The outcome to send for this action -@property (strong, nonatomic, nullable) NSArray *outcomes; - -// The tags to send for this action -@property (strong, nonatomic, nullable) OSInAppMessageTag *tags; - -// Convert the class into a NSDictionary -- (NSDictionary *_Nonnull)jsonRepresentation; - -@end - -@protocol OSInAppMessageDelegate -@optional -- (void)handleMessageAction:(OSInAppMessageAction * _Nonnull)action NS_SWIFT_NAME(handleMessageAction(action:)); -@end - -@protocol OSInAppMessageLifecycleHandler -@optional -- (void)onWillDisplayInAppMessage:(OSInAppMessage *)message; -- (void)onDidDisplayInAppMessage:(OSInAppMessage *)message; -- (void)onWillDismissInAppMessage:(OSInAppMessage *)message; -- (void)onDidDismissInAppMessage:(OSInAppMessage *)message; -@end - -typedef NS_ENUM(NSInteger, OSNotificationPermission) { - // The user has not yet made a choice regarding whether your app can show notifications. - OSNotificationPermissionNotDetermined = 0, - - // The application is not authorized to post user notifications. - OSNotificationPermissionDenied, - - // The application is authorized to post user notifications. - OSNotificationPermissionAuthorized, - - // the application is only authorized to post Provisional notifications (direct to history) - OSNotificationPermissionProvisional, - - // the application is authorized to send notifications for 8 hours. Only used by App Clips. - OSNotificationPermissionEphemeral -}; - -// Permission Classes -@interface OSPermissionState : NSObject - -@property (readonly, nonatomic) BOOL reachable; -@property (readonly, nonatomic) BOOL hasPrompted; -@property (readonly, nonatomic) BOOL providesAppNotificationSettings; -@property (readonly, nonatomic) OSNotificationPermission status; -- (NSDictionary* _Nonnull)toDictionary; - -@end - -@interface OSPermissionStateChanges : NSObject - -@property (readonly, nonnull) OSPermissionState* to; -@property (readonly, nonnull) OSPermissionState* from; -- (NSDictionary* _Nonnull)toDictionary; - -@end - -// Subscription Classes -@interface OSSubscriptionState : NSObject - -@property (readonly, nonatomic) BOOL isSubscribed; // (yes only if userId, pushToken, and setSubscription exists / are true) -@property (readonly, nonatomic) BOOL isPushDisabled; // returns value of disablePush. -@property (readonly, nonatomic, nullable) NSString* userId; // AKA OneSignal PlayerId -@property (readonly, nonatomic, nullable) NSString* pushToken; // AKA Apple Device Token -- (NSDictionary* _Nonnull)toDictionary; - -@end - -@interface OSSubscriptionStateChanges : NSObject -@property (readonly, nonnull) OSSubscriptionState* to; -@property (readonly, nonnull) OSSubscriptionState* from; -- (NSDictionary* _Nonnull)toDictionary; -@end - -@interface OSEmailSubscriptionState : NSObject -@property (readonly, nonatomic, nullable) NSString *emailUserId; // The new Email user ID -@property (readonly, nonatomic, nullable) NSString *emailAddress; -@property (readonly, nonatomic) BOOL isSubscribed; -- (NSDictionary* _Nonnull)toDictionary; -@end - -@interface OSEmailSubscriptionStateChanges : NSObject -@property (readonly, nonnull) OSEmailSubscriptionState* to; -@property (readonly, nonnull) OSEmailSubscriptionState* from; -- (NSDictionary* _Nonnull)toDictionary; -@end - -@interface OSSMSSubscriptionState : NSObject -@property (readonly, nonatomic, nullable) NSString* smsUserId; -@property (readonly, nonatomic, nullable) NSString *smsNumber; -@property (readonly, nonatomic) BOOL isSubscribed; -- (NSDictionary* _Nonnull)toDictionary; -@end - -@interface OSSMSSubscriptionStateChanges : NSObject -@property (readonly, nonnull) OSSMSSubscriptionState* to; -@property (readonly, nonnull) OSSMSSubscriptionState* from; -- (NSDictionary* _Nonnull)toDictionary; -@end - -@protocol OSPermissionObserver -- (void)onOSPermissionChanged:(OSPermissionStateChanges* _Nonnull)stateChanges; -@end - -@protocol OSSubscriptionObserver -- (void)onOSSubscriptionChanged:(OSSubscriptionStateChanges* _Nonnull)stateChanges; -@end - -@protocol OSEmailSubscriptionObserver -- (void)onOSEmailSubscriptionChanged:(OSEmailSubscriptionStateChanges* _Nonnull)stateChanges; -@end - -@protocol OSSMSSubscriptionObserver -- (void)onOSSMSSubscriptionChanged:(OSSMSSubscriptionStateChanges* _Nonnull)stateChanges; -@end - -@interface OSDeviceState : NSObject -/** - * Get the app's notification permission - * @return false if the user disabled notifications for the app, otherwise true - */ -@property (readonly) BOOL hasNotificationPermission; -/** - * Get whether the user is subscribed to OneSignal notifications or not - * @return false if the user is not subscribed to OneSignal notifications, otherwise true - */ -@property (readonly) BOOL isPushDisabled; -/** - * Get whether the user is subscribed - * @return true if isNotificationEnabled, isUserSubscribed, getUserId and getPushToken are true, otherwise false - */ -@property (readonly) BOOL isSubscribed; -/** - * Get the user notification permision status - * @return OSNotificationPermission -*/ -@property (readonly) OSNotificationPermission notificationPermissionStatus; -/** - * Get user id from registration (player id) - * @return user id if user is registered, otherwise null - */ -@property (readonly, nullable) NSString* userId; -/** - * Get apple deice push token - * @return push token if available, otherwise null - */ -@property (readonly, nullable) NSString* pushToken; -/** - * Get the user email id - * @return email id if user address was registered, otherwise null - */ -@property (readonly, nullable) NSString* emailUserId; -/** - * Get the user email - * @return email address if set, otherwise null - */ -@property (readonly, nullable) NSString* emailAddress; - -@property (readonly) BOOL isEmailSubscribed; - -/** - * Get the user sms id - * @return sms id if user sms number was registered, otherwise null - */ -@property (readonly, nullable) NSString* smsUserId; -/** - * Get the user sms number, number may start with + and continue with numbers or contain only numbers - * e.g: +11231231231 or 11231231231 - * @return sms number if set, otherwise null - */ -@property (readonly, nullable) NSString* smsNumber; - -@property (readonly) BOOL isSMSSubscribed; - -// Convert the class into a NSDictionary -- (NSDictionary *_Nonnull)jsonRepresentation; - -@end - -typedef void (^OSWebOpenURLResultBlock)(BOOL shouldOpen); - -/*Block for generic results on success and errors on failure*/ -typedef void (^OSResultSuccessBlock)(NSDictionary* result); -typedef void (^OSFailureBlock)(NSError* error); - - -// ======= OneSignal Class Interface ========= -@interface OneSignal : NSObject - -+ (NSString*)appId; -+ (NSString* _Nonnull)sdkVersionRaw; -+ (NSString* _Nonnull)sdkSemanticVersion; - -+ (void)disablePush:(BOOL)disable; - -// Only used for wrapping SDKs, such as Unity, Cordova, Xamarin, etc. -+ (void)setMSDKType:(NSString* _Nonnull)type; - -#pragma mark Initialization -+ (void)setAppId:(NSString* _Nonnull)newAppId; -+ (void)initWithLaunchOptions:(NSDictionary* _Nullable)launchOptions; -+ (void)setLaunchURLsInApp:(BOOL)launchInApp; -+ (void)setProvidesNotificationSettingsView:(BOOL)providesView; - - -#pragma mark Live Activity -+ (void)enterLiveActivity:(NSString * _Nonnull)activityId withToken:(NSString * _Nonnull)token; -+ (void)enterLiveActivity:(NSString * _Nonnull)activityId withToken:(NSString * _Nonnull)token withSuccess:(OSResultSuccessBlock _Nullable)successBlock withFailure:(OSFailureBlock _Nullable)failureBlock; - -+ (void)exitLiveActivity:(NSString * _Nonnull)activityId; -+ (void)exitLiveActivity:(NSString * _Nonnull)activityId withSuccess:(OSResultSuccessBlock _Nullable)successBlock withFailure:(OSFailureBlock _Nullable)failureBlock; - -#pragma mark Logging -+ (void)setLogLevel:(ONE_S_LOG_LEVEL)logLevel visualLevel:(ONE_S_LOG_LEVEL)visualLogLevel; -+ (void)onesignalLog:(ONE_S_LOG_LEVEL)logLevel message:(NSString* _Nonnull)message; - -#pragma mark Prompt For Push -typedef void(^OSUserResponseBlock)(BOOL accepted); - -+ (void)promptForPushNotificationsWithUserResponse:(OSUserResponseBlock)block; -+ (void)promptForPushNotificationsWithUserResponse:(OSUserResponseBlock)block fallbackToSettings:(BOOL)fallback; -+ (void)registerForProvisionalAuthorization:(OSUserResponseBlock)block; -+ (OSDeviceState*)getDeviceState; - -#pragma mark Privacy Consent -+ (void)consentGranted:(BOOL)granted; -// Tells your application if privacy consent is still needed from the current user -+ (BOOL)requiresUserPrivacyConsent; -+ (void)setRequiresUserPrivacyConsent:(BOOL)required; - -#pragma mark Public Handlers - -// If the completion block is not called within 25 seconds of this block being called in notificationWillShowInForegroundHandler then the completion will be automatically fired. -typedef void (^OSNotificationWillShowInForegroundBlock)(OSNotification * _Nonnull notification, OSNotificationDisplayResponse _Nonnull completion); -typedef void (^OSNotificationOpenedBlock)(OSNotificationOpenedResult * _Nonnull result); -typedef void (^OSInAppMessageClickBlock)(OSInAppMessageAction * _Nonnull action); - -+ (void)setNotificationWillShowInForegroundHandler:(OSNotificationWillShowInForegroundBlock _Nullable)block; -+ (void)setNotificationOpenedHandler:(OSNotificationOpenedBlock _Nullable)block; -+ (void)setInAppMessageClickHandler:(OSInAppMessageClickBlock _Nullable)block; -+ (void)setInAppMessageLifecycleHandler:(NSObject *_Nullable)delegate; - -#pragma mark Post Notification -+ (void)postNotification:(NSDictionary* _Nonnull)jsonData; -+ (void)postNotification:(NSDictionary* _Nonnull)jsonData onSuccess:(OSResultSuccessBlock _Nullable)successBlock onFailure:(OSFailureBlock _Nullable)failureBlock; -+ (void)postNotificationWithJsonString:(NSString* _Nonnull)jsonData onSuccess:(OSResultSuccessBlock _Nullable)successBlock onFailure:(OSFailureBlock _Nullable)failureBlock; - -#pragma mark Location -// - Request and track user's location -+ (void)promptLocation; -+ (void)setLocationShared:(BOOL)enable; -+ (BOOL)isLocationShared; - -#pragma mark Tags -+ (void)sendTag:(NSString* _Nonnull)key value:(NSString* _Nonnull)value onSuccess:(OSResultSuccessBlock _Nullable)successBlock onFailure:(OSFailureBlock _Nullable)failureBlock; -+ (void)sendTag:(NSString* _Nonnull)key value:(NSString* _Nonnull)value; -+ (void)sendTags:(NSDictionary* _Nonnull)keyValuePair onSuccess:(OSResultSuccessBlock _Nullable)successBlock onFailure:(OSFailureBlock _Nullable)failureBlock; -+ (void)sendTags:(NSDictionary* _Nonnull)keyValuePair; -+ (void)sendTagsWithJsonString:(NSString* _Nonnull)jsonString; -+ (void)getTags:(OSResultSuccessBlock _Nullable)successBlock onFailure:(OSFailureBlock _Nullable)failureBlock; -+ (void)getTags:(OSResultSuccessBlock _Nullable)successBlock; -+ (void)deleteTag:(NSString* _Nonnull)key onSuccess:(OSResultSuccessBlock _Nullable)successBlock onFailure:(OSFailureBlock _Nullable)failureBlock; -+ (void)deleteTag:(NSString* _Nonnull)key; -+ (void)deleteTags:(NSArray* _Nonnull)keys onSuccess:(OSResultSuccessBlock _Nullable)successBlock onFailure:(OSFailureBlock _Nullable)failureBlock; -+ (void)deleteTags:(NSArray *_Nonnull)keys; -+ (void)deleteTagsWithJsonString:(NSString* _Nonnull)jsonString; - -#pragma mark Permission, Subscription, and Email Observers -NS_ASSUME_NONNULL_BEGIN - -+ (void)addPermissionObserver:(NSObject*)observer; -+ (void)removePermissionObserver:(NSObject*)observer; - -+ (void)addSubscriptionObserver:(NSObject*)observer; -+ (void)removeSubscriptionObserver:(NSObject*)observer; - -+ (void)addEmailSubscriptionObserver:(NSObject*)observer; -+ (void)removeEmailSubscriptionObserver:(NSObject*)observer; - -+ (void)addSMSSubscriptionObserver:(NSObject*)observer; -+ (void)removeSMSSubscriptionObserver:(NSObject*)observer; -NS_ASSUME_NONNULL_END - -#pragma mark Email -// Typedefs defining completion blocks for email & simultaneous HTTP requests -typedef void (^OSEmailFailureBlock)(NSError *error); -typedef void (^OSEmailSuccessBlock)(); - -// Allows you to set the email for this user. -// Email Auth Token is a (recommended) optional parameter that should *NOT* be generated on the client. -// For security purposes, the emailAuthToken should be generated by your backend server. -// If you do not have a backend server for your application, use the version of thge setEmail: method without an emailAuthToken parameter. -+ (void)setEmail:(NSString * _Nonnull)email withEmailAuthHashToken:(NSString * _Nullable)hashToken; -+ (void)setEmail:(NSString * _Nonnull)email withEmailAuthHashToken:(NSString * _Nullable)hashToken withSuccess:(OSEmailSuccessBlock _Nullable)successBlock withFailure:(OSEmailFailureBlock _Nullable)failureBlock; - -// Sets email without an authentication token -+ (void)setEmail:(NSString * _Nonnull)email; -+ (void)setEmail:(NSString * _Nonnull)email withSuccess:(OSEmailSuccessBlock _Nullable)successBlock withFailure:(OSEmailFailureBlock _Nullable)failureBlock; - -// Logs the device out of the current email. -+ (void)logoutEmail; -+ (void)logoutEmailWithSuccess:(OSEmailSuccessBlock _Nullable)successBlock withFailure:(OSEmailFailureBlock _Nullable)failureBlock; - -#pragma mark SMS -// Typedefs defining completion blocks for SMS & simultaneous HTTP requests -typedef void (^OSSMSFailureBlock)(NSError *error); -typedef void (^OSSMSSuccessBlock)(NSDictionary *results); - -// Allows you to set the SMS for this user. SMS number may start with + and continue with numbers or contain only numbers -// e.g: +11231231231 or 11231231231 -// SMS Auth Token is a (recommended) optional parameter that should *NOT* be generated on the client. -// For security purposes, the smsAuthToken should be generated by your backend server. -// If you do not have a backend server for your application, use the version of thge setSMSNumber: method without an smsAuthToken parameter. -+ (void)setSMSNumber:(NSString * _Nonnull)smsNumber withSMSAuthHashToken:(NSString * _Nullable)hashToken; -+ (void)setSMSNumber:(NSString * _Nonnull)smsNumber withSMSAuthHashToken:(NSString * _Nullable)hashToken withSuccess:(OSSMSSuccessBlock _Nullable)successBlock withFailure:(OSSMSFailureBlock _Nullable)failureBlock; - -// Sets SMS without an authentication token -+ (void)setSMSNumber:(NSString * _Nonnull)smsNumber; -+ (void)setSMSNumber:(NSString * _Nonnull)smsNumber withSuccess:(OSSMSSuccessBlock _Nullable)successBlock withFailure:(OSSMSFailureBlock _Nullable)failureBlock; - -// Logs the device out of the current sms number. -+ (void)logoutSMSNumber; -+ (void)logoutSMSNumberWithSuccess:(OSSMSSuccessBlock _Nullable)successBlock withFailure:(OSSMSFailureBlock _Nullable)failureBlock; - -#pragma mark Language -// Typedefs defining completion blocks for updating language -typedef void (^OSUpdateLanguageFailureBlock)(NSError *error); -typedef void (^OSUpdateLanguageSuccessBlock)(); - -// Language input ISO 639-1 code representation for user input language -+ (void)setLanguage:(NSString * _Nonnull)language; -+ (void)setLanguage:(NSString * _Nonnull)language withSuccess:(OSUpdateLanguageSuccessBlock _Nullable)successBlock withFailure:(OSUpdateLanguageFailureBlock)failureBlock; - -#pragma mark External User Id -// Typedefs defining completion blocks for updating the external user id -typedef void (^OSUpdateExternalUserIdFailureBlock)(NSError *error); -typedef void (^OSUpdateExternalUserIdSuccessBlock)(NSDictionary *results); - -+ (void)setExternalUserId:(NSString * _Nonnull)externalId; -+ (void)setExternalUserId:(NSString * _Nonnull)externalId withSuccess:(OSUpdateExternalUserIdSuccessBlock _Nullable)successBlock withFailure:(OSUpdateExternalUserIdFailureBlock _Nullable)failureBlock; -+ (void)setExternalUserId:(NSString *)externalId withExternalIdAuthHashToken:(NSString *)hashToken withSuccess:(OSUpdateExternalUserIdSuccessBlock _Nullable)successBlock withFailure:(OSUpdateExternalUserIdFailureBlock _Nullable)failureBlock; -+ (void)removeExternalUserId; -+ (void)removeExternalUserId:(OSUpdateExternalUserIdSuccessBlock _Nullable)successBlock withFailure:(OSUpdateExternalUserIdFailureBlock _Nullable)failureBlock; - -#pragma mark In-App Messaging -+ (BOOL)isInAppMessagingPaused; -+ (void)pauseInAppMessages:(BOOL)pause; -+ (void)addTrigger:(NSString * _Nonnull)key withValue:(id _Nonnull)value; -+ (void)addTriggers:(NSDictionary * _Nonnull)triggers; -+ (void)removeTriggerForKey:(NSString * _Nonnull)key; -+ (void)removeTriggersForKeys:(NSArray * _Nonnull)keys; -+ (NSDictionary * _Nonnull)getTriggers; -+ (id _Nullable)getTriggerValueForKey:(NSString * _Nonnull)key; - -#pragma mark Outcomes -+ (void)sendOutcome:(NSString * _Nonnull)name; -+ (void)sendOutcome:(NSString * _Nonnull)name onSuccess:(OSSendOutcomeSuccess _Nullable)success; -+ (void)sendUniqueOutcome:(NSString * _Nonnull)name; -+ (void)sendUniqueOutcome:(NSString * _Nonnull)name onSuccess:(OSSendOutcomeSuccess _Nullable)success; -+ (void)sendOutcomeWithValue:(NSString * _Nonnull)name value:(NSNumber * _Nonnull)value; -+ (void)sendOutcomeWithValue:(NSString * _Nonnull)name value:(NSNumber * _Nonnull)value onSuccess:(OSSendOutcomeSuccess _Nullable)success; - -#pragma mark Extension -// iOS 10 only -// Process from Notification Service Extension. -// Used for iOS Media Attachemtns and Action Buttons. -+ (UNMutableNotificationContent*)didReceiveNotificationExtensionRequest:(UNNotificationRequest* _Nonnull)request withMutableNotificationContent:(UNMutableNotificationContent* _Nullable)replacementContent __deprecated_msg("Please use didReceiveNotificationExtensionRequest:withMutableNotificationContent:withContentHandler: instead."); -+ (UNMutableNotificationContent*)didReceiveNotificationExtensionRequest:(UNNotificationRequest* _Nonnull)request withMutableNotificationContent:(UNMutableNotificationContent* _Nullable)replacementContent withContentHandler:(void (^)(UNNotificationContent *_Nonnull))contentHandler; -+ (UNMutableNotificationContent*)serviceExtensionTimeWillExpireRequest:(UNNotificationRequest* _Nonnull)request withMutableNotificationContent:(UNMutableNotificationContent* _Nullable)replacementContent; -@end - -#pragma clang diagnostic pop diff --git a/iOS_SDK/OneSignalSDK/Source/OneSignal.m b/iOS_SDK/OneSignalSDK/Source/OneSignal.m index 095659826..d135c4f71 100755 --- a/iOS_SDK/OneSignalSDK/Source/OneSignal.m +++ b/iOS_SDK/OneSignalSDK/Source/OneSignal.m @@ -25,26 +25,27 @@ * THE SOFTWARE. */ -#import "OneSignal.h" +#import "OneSignalFramework.h" #import "OneSignalInternal.h" #import "OneSignalTracker.h" #import "OneSignalTrackIAP.h" -#import "OneSignalLocation.h" -#import "OneSignalReachability.h" #import "OneSignalJailbreakDetection.h" #import "OneSignalMobileProvision.h" #import "OneSignalHelper.h" -#import "UNUserNotificationCenter+OneSignal.h" + +// #import "UNUserNotificationCenter+OneSignal.h" // TODO: This is in Notifications #import "OneSignalSelectorHelpers.h" #import "UIApplicationDelegate+OneSignal.h" #import "OSNotification+Internal.h" -#import "OneSignalCacheCleaner.h" #import "OSMigrationController.h" -#import "OSRemoteParamController.h" +#import "OSBackgroundTaskHandlerImpl.h" +#import "OSFocusCallParams.h" + +#import +#import +#import -#import "OneSignalNotificationSettings.h" -#import "OneSignalNotificationSettingsIOS10.h" -#import "OneSignalNotificationSettingsIOS9.h" +// TODO: ^ if no longer support ios 9 + 10 after user model, need to address all stuffs #import #import "OneSignalExtension/OneSignalExtension.h" @@ -60,28 +61,15 @@ #import #import + //#import +// #import #import -#import "OneSignalSetEmailParameters.h" -#import "OneSignalSetSMSParameters.h" -#import "OneSignalSetExternalIdParameters.h" -#import "OneSignalSetLanguageParameters.h" #import "DelayedConsentInitializationParameters.h" #import "OneSignalDialogController.h" -#import "OSMessagingController.h" -#import "OSInAppMessageAction.h" -#import "OSInAppMessageInternal.h" - -#import "OSUserState.h" -#import "OSLocationState.h" -#import "OSStateSynchronizer.h" #import "OneSignalLifecycleObserver.h" -#import "OSPlayerTags.h" - -#import "LanguageProviderAppDefined.h" -#import "LanguageContext.h" #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wundeclared-selector" @@ -89,94 +77,14 @@ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wdeprecated-declarations" -/* Enable the default in-app launch urls*/ -NSString* const kOSSettingsKeyInAppLaunchURL = @"kOSSettingsKeyInAppLaunchURL"; - -/* Omit no appId error logging, for use with wrapper SDKs. */ -NSString* const kOSSettingsKeyInOmitNoAppIdLogging = @"kOSSettingsKeyInOmitNoAppIdLogging"; - -/* Used to determine if the app is able to present it's own customized Notification Settings view (iOS 12+) */ -NSString* const kOSSettingsKeyProvidesAppNotificationSettings = @"kOSSettingsKeyProvidesAppNotificationSettings"; - -@implementation OSPermissionSubscriptionState -- (NSString*)description { - static NSString* format = @""; - return [NSString stringWithFormat:format, _permissionStatus, _subscriptionStatus]; -} -- (NSDictionary*)toDictionary { - return @{@"permissionStatus": [_permissionStatus toDictionary], - @"subscriptionStatus": [_subscriptionStatus toDictionary], - @"emailSubscriptionStatus" : [_emailSubscriptionStatus toDictionary] - }; -} -@end - -@interface OSPendingLiveActivityUpdate: NSObject - @property NSString* token; - @property NSString* activityId; - @property BOOL isEnter; - @property OSResultSuccessBlock successBlock; - @property OSFailureBlock failureBlock; - - (id)initWith:(NSString * _Nonnull)activityId - withToken:(NSString * _Nonnull)token - isEnter:(BOOL)isEnter - withSuccess:(OSResultSuccessBlock _Nullable)successBlock - withFailure:(OSFailureBlock _Nullable)failureBlock; -@end -@implementation OSPendingLiveActivityUpdate - -- (id)initWith:(NSString *)activityId - withToken:(NSString *)token - isEnter:(BOOL)isEnter - withSuccess:(OSResultSuccessBlock)successBlock - withFailure:(OSFailureBlock)failureBlock { - self.token = token; - self.activityId = activityId; - self.isEnter = isEnter; - self.successBlock = successBlock; - self.failureBlock = failureBlock; - return self; -}; -@end - @interface OneSignal (SessionStatusDelegate) @end @implementation OneSignal -static NSString* mSDKType = @"native"; -static BOOL coldStartFromTapOnNotification = NO; -static BOOL shouldDelaySubscriptionUpdate = false; - -/* - if setEmail: was called before the device was registered (push playerID = nil), - then the call to setEmail: also gets delayed - this property stores the parameters so that once registration is complete - we can finish setEmail: -*/ -static OneSignalSetEmailParameters *delayedEmailParameters; -static OneSignalSetSMSParameters *_delayedSMSParameters; -+ (OneSignalSetSMSParameters *)delayedSMSParameters { - return _delayedSMSParameters; -} -static OneSignalSetExternalIdParameters *delayedExternalIdParameters; -static OneSignalSetLanguageParameters *delayedLanguageParameters; - -static NSMutableArray* pendingSendTagCallbacks; -static OSResultSuccessBlock pendingGetTagsSuccessBlock; -static OSFailureBlock pendingGetTagsFailureBlock; - -static NSMutableArray* pendingLiveActivityUpdates; - // Has attempted to register for push notifications with Apple since app was installed. static BOOL registeredWithApple = NO; -// UIApplication-registerForRemoteNotifications has been called but a success or failure has not triggered yet. -static BOOL waitingForApnsResponse = false; - -// Under Capabilities is "Background Modes" > "Remote notifications" enabled. -static BOOL backgroundModesEnabled = false; - // Indicates if initialization of the SDK has been delayed until the user gives privacy consent static BOOL delayedInitializationForPrivacyConsent = false; @@ -187,207 +95,17 @@ + (DelayedConsentInitializationParameters *)delayedInitParameters { return _delayedInitParameters; } -static NSString* appId; static NSDictionary* launchOptions; static NSDictionary* appSettings; -// Make sure launchOptions have been set -// We need this BOOL because launchOptions can be null so simply null checking -// won't validate whether or not launchOptions have been set -static BOOL hasSetLaunchOptions = false; // Ensure we only initlize the SDK once even if the public method is called more // Called after successfully calling setAppId and setLaunchOptions static BOOL initDone = false; -//used to ensure registration occurs even if APNS does not respond -static NSDate *initializationTime; -static NSTimeInterval maxApnsWait = APNS_TIMEOUT; -static NSTimeInterval reattemptRegistrationInterval = REGISTRATION_DELAY_SECONDS; - -// Set when the app is launched -static NSDate *sessionLaunchTime; - -static OneSignalTrackIAP* trackIAPPurchase; -NSString* emailToSet; -static LanguageContext* languageContext; - -int mLastNotificationTypes = -1; -static int mSubscriptionStatus = -1; - -BOOL disableBadgeClearing = NO; -BOOL requestedProvisionalAuthorization = false; -BOOL usesAutoPrompt = false; - -static BOOL requiresUserIdAuth = false; -static BOOL providesAppNotificationSettings = false; - -static BOOL performedOnSessionRequest = false; -static NSString *pendingExternalUserId; -static NSString *pendingExternalUserIdHashToken; - -// iOS version implementation -static NSObject *_osNotificationSettings; -+ (NSObject *)osNotificationSettings { - if (!_osNotificationSettings) { - if ([OneSignalHelper isIOSVersionGreaterThanOrEqual:@"10.0"]) { - _osNotificationSettings = [OneSignalNotificationSettingsIOS10 new]; - } else { - _osNotificationSettings = [OneSignalNotificationSettingsIOS9 new]; - } - } - return _osNotificationSettings; -} - -// static property def for currentPermissionState -static OSPermissionState* _currentPermissionState; -+ (OSPermissionState*)currentPermissionState { - if (!_currentPermissionState) { - _currentPermissionState = [OSPermissionState alloc]; - _currentPermissionState = [_currentPermissionState initAsTo]; - [self lastPermissionState]; // Trigger creation - [_currentPermissionState.observable addObserver:[OSPermissionChangedInternalObserver alloc]]; - } - return _currentPermissionState; -} - -// static property def for previous OSSubscriptionState -static OSPermissionState* _lastPermissionState; -+ (OSPermissionState*)lastPermissionState { - if (!_lastPermissionState) - _lastPermissionState = [[OSPermissionState alloc] initAsFrom]; - return _lastPermissionState; -} -+ (void)setLastPermissionState:(OSPermissionState *)lastPermissionState { - _lastPermissionState = lastPermissionState; -} - -static OSEmailSubscriptionState* _currentEmailSubscriptionState; -+ (OSEmailSubscriptionState *)currentEmailSubscriptionState { - if (!_currentEmailSubscriptionState) { - _currentEmailSubscriptionState = [[OSEmailSubscriptionState alloc] init]; - - [_currentEmailSubscriptionState.observable addObserver:[OSEmailSubscriptionChangedInternalObserver alloc]]; - } - return _currentEmailSubscriptionState; -} - -static OSEmailSubscriptionState *_lastEmailSubscriptionState; -+ (OSEmailSubscriptionState *)lastEmailSubscriptionState { - if (!_lastEmailSubscriptionState) { - _lastEmailSubscriptionState = [[OSEmailSubscriptionState alloc] init]; - } - return _lastEmailSubscriptionState; -} - -+ (void)setLastEmailSubscriptionState:(OSEmailSubscriptionState *)lastEmailSubscriptionState { - _lastEmailSubscriptionState = lastEmailSubscriptionState; -} - -static OSSMSSubscriptionState* _currentSMSSubscriptionState; -+ (OSSMSSubscriptionState *)currentSMSSubscriptionState { - if (!_currentSMSSubscriptionState) { - _currentSMSSubscriptionState = [[OSSMSSubscriptionState alloc] init]; - - [_currentSMSSubscriptionState.observable addObserver:[OSSMSSubscriptionChangedInternalObserver alloc]]; - } - return _currentSMSSubscriptionState; -} - -static OSSMSSubscriptionState *_lastSMSSubscriptionState; -+ (OSSMSSubscriptionState *)lastSMSSubscriptionState { - if (!_lastSMSSubscriptionState) { - _lastSMSSubscriptionState = [[OSSMSSubscriptionState alloc] init]; - } - return _lastSMSSubscriptionState; -} - -+ (void)setLastSMSSubscriptionState:(OSSMSSubscriptionState *)lastSMSSubscriptionState { - _lastSMSSubscriptionState = lastSMSSubscriptionState; -} - -// static property def for current OSSubscriptionState -static OSSubscriptionState* _currentSubscriptionState; -+ (OSSubscriptionState*)currentSubscriptionState { - if (!_currentSubscriptionState) { - _currentSubscriptionState = [OSSubscriptionState alloc]; - _currentSubscriptionState = [_currentSubscriptionState initAsToWithPermision:self.currentPermissionState.accepted]; - mLastNotificationTypes = _currentPermissionState.notificationTypes; - [self.currentPermissionState.observable addObserver:_currentSubscriptionState]; - [_currentSubscriptionState.observable addObserver:[OSSubscriptionChangedInternalObserver alloc]]; - } - return _currentSubscriptionState; -} - -static OSSubscriptionState* _lastSubscriptionState; -+ (OSSubscriptionState*)lastSubscriptionState { - if (!_lastSubscriptionState) { - _lastSubscriptionState = [OSSubscriptionState alloc]; - _lastSubscriptionState = [_lastSubscriptionState initAsFrom]; - } - return _lastSubscriptionState; -} -+ (void)setLastSubscriptionState:(OSSubscriptionState*)lastSubscriptionState { - _lastSubscriptionState = lastSubscriptionState; -} - -static OSStateSynchronizer *_stateSynchronizer; -+ (OSStateSynchronizer*)stateSynchronizer { - if (!_stateSynchronizer) - _stateSynchronizer = [[OSStateSynchronizer alloc] initWithSubscriptionState:OneSignal.currentSubscriptionState withEmailSubscriptionState:OneSignal.currentEmailSubscriptionState - withSMSSubscriptionState:OneSignal.currentSMSSubscriptionState]; - return _stateSynchronizer; -} - -// static property def to add developer's OSPermissionStateChanges observers to. -static ObserablePermissionStateChangesType* _permissionStateChangesObserver; -+ (ObserablePermissionStateChangesType*)permissionStateChangesObserver { - if (!_permissionStateChangesObserver) - _permissionStateChangesObserver = [[OSObservable alloc] initWithChangeSelector:@selector(onOSPermissionChanged:)]; - return _permissionStateChangesObserver; -} - -static ObservableSubscriptionStateChangesType* _subscriptionStateChangesObserver; -+ (ObservableSubscriptionStateChangesType*)subscriptionStateChangesObserver { - if (!_subscriptionStateChangesObserver) - _subscriptionStateChangesObserver = [[OSObservable alloc] initWithChangeSelector:@selector(onOSSubscriptionChanged:)]; - return _subscriptionStateChangesObserver; -} - -static ObservableEmailSubscriptionStateChangesType* _emailSubscriptionStateChangesObserver; -+ (ObservableEmailSubscriptionStateChangesType *)emailSubscriptionStateChangesObserver { - if (!_emailSubscriptionStateChangesObserver) - _emailSubscriptionStateChangesObserver = [[OSObservable alloc] initWithChangeSelector:@selector(onOSEmailSubscriptionChanged:)]; - return _emailSubscriptionStateChangesObserver; -} - -static ObservableSMSSubscriptionStateChangesType* _smsSubscriptionStateChangesObserver; -+ (ObservableSMSSubscriptionStateChangesType *)smsSubscriptionStateChangesObserver { - if (!_smsSubscriptionStateChangesObserver) - _smsSubscriptionStateChangesObserver = [[OSObservable alloc] initWithChangeSelector:@selector(onOSSMSSubscriptionChanged:)]; - return _smsSubscriptionStateChangesObserver; -} - -static OSPlayerTags *_playerTags; -+ (OSPlayerTags *)playerTags { - if (!_playerTags) { - _playerTags = [OSPlayerTags new]; - } - return _playerTags; -} - -+ (void)setMSubscriptionStatus:(NSNumber*)status { - mSubscriptionStatus = [status intValue]; -} - -+ (OSDeviceState *)getDeviceState { - return [[OSDeviceState alloc] initWithSubscriptionState:[OneSignal getPermissionSubscriptionState]]; -} +// Used to track last time SDK was initialized, for whether or not to start a new session +static NSTimeInterval initializationTime; -static OSRemoteParamController* _remoteParamController; -+ (OSRemoteParamController *)getRemoteParamController { - if (!_remoteParamController) - _remoteParamController = [OSRemoteParamController new]; - return _remoteParamController; -} +//// Set when the app is launched +//static NSDate *sessionLaunchTime; /* Indicates if the iOS params request has started @@ -415,33 +133,11 @@ + (OneSignalReceiveReceiptsController*)receiveReceiptsController { return _receiveReceiptsController; } -static AppEntryAction _appEntryState = APP_CLOSE; -+ (AppEntryAction)appEntryState { - return _appEntryState; -} - -+ (void)setAppEntryState:(AppEntryAction)appEntryState { - _appEntryState = appEntryState; -} - -static OSOutcomeEventsFactory *_outcomeEventFactory; -+ (OSOutcomeEventsFactory *)outcomeEventFactory { - return _outcomeEventFactory; -} - -static OneSignalOutcomeEventsController *_outcomeEventsController; -+ (OneSignalOutcomeEventsController *)getOutcomeEventsController { - return _outcomeEventsController; -} - -+ (NSString*)appId { - return appId; -} - + (NSString*)sdkVersionRaw { return ONESIGNAL_VERSION; } +// TODO: Is this method used by wrappers? It is not used by this SDK. Can we remove? + (NSString*)sdkSemanticVersion { // examples: // ONESIGNAL_VERSION = @"020402" returns 2.4.2 @@ -453,2587 +149,574 @@ + (NSString*)sdkSemanticVersion { return [ONESIGNAL_VERSION one_getSemanticVersion]; } -+ (OSPlayerTags *)getPlayerTags { - return self.playerTags; -} - -+ (NSString*)mUserId { - return self.currentSubscriptionState.userId; -} +//TODO: This is related to unit tests and will change with um tests ++ (void)clearStatics { + [OneSignalConfigManager setAppId:nil]; + launchOptions = false; + appSettings = nil; + initDone = false; + + [OSNotificationsManager clearStatics]; + registeredWithApple = false; + + _downloadedParameters = false; + _didCallDownloadParameters = false; + +// sessionLaunchTime = [NSDate date]; -+ (void)setUserId:(NSString *)userId { - self.currentSubscriptionState.userId = userId; -} -// This is set to true even if register user fails -+ (void)registerUserFinished { - _registerUserFinished = true; -} -// If successful then register user is also finished -+ (void)registerUserSuccessful { - _registerUserSuccessful = true; - [OneSignal registerUserFinished]; + [OSOutcomes clearStatics]; + + [OSSessionManager resetSharedSessionManager]; } -+ (NSString *)mEmailAuthToken { - return self.currentEmailSubscriptionState.emailAuthCode; -} +#pragma mark Namespaces -+ (NSString *)mEmailUserId { - return self.currentEmailSubscriptionState.emailUserId; ++ (id)User { + return [OneSignalUserManagerImpl.sharedInstance User]; } -+ (void)setEmailUserId:(NSString *)emailUserId { - self.currentEmailSubscriptionState.emailUserId = emailUserId; ++ (void)login:(NSString * _Nonnull)externalId { + // return if no app_id / the user has not granted privacy permissions + if ([OneSignalConfigManager shouldAwaitAppIdAndLogMissingPrivacyConsentForMethod:@"login"]) { + return; + } + [OneSignalUserManagerImpl.sharedInstance loginWithExternalId:externalId token:nil]; + // refine Swift name for Obj-C? But doesn't matter as much since this isn't public API } -+ (NSString *)mExternalIdAuthToken { - return self.currentSubscriptionState.externalIdAuthCode; ++ (void)login:(NSString * _Nonnull)externalId withToken:(NSString * _Nullable)token { + // TODO: Need to await download iOS params + // return if no app_id / the user has not granted privacy permissions + if ([OneSignalConfigManager shouldAwaitAppIdAndLogMissingPrivacyConsentForMethod:@"login"]) { + return; + } + [OneSignalUserManagerImpl.sharedInstance loginWithExternalId:externalId token:token]; } -+ (void)saveEmailAddress:(NSString *)email withAuthToken:(NSString *)emailAuthToken userId:(NSString *)emailPlayerId { - self.currentEmailSubscriptionState.emailAddress = email; - self.currentEmailSubscriptionState.emailAuthCode = emailAuthToken; - self.currentEmailSubscriptionState.emailUserId = emailPlayerId; - - //call persistAsFrom in order to save the emailAuthToken & playerId to NSUserDefaults - [self.currentEmailSubscriptionState persist]; - - [OneSignal onesignalLog:ONE_S_LL_VERBOSE message:[NSString stringWithFormat:@"CurrentEmailSubscriptionState after saveEmailAddress: %@", self.currentEmailSubscriptionState.description]]; ++ (void)logout { + [OneSignalUserManagerImpl.sharedInstance logout]; } +#pragma mark: Namespaces -+ (NSString *)getSMSAuthToken { - return self.currentSMSSubscriptionState.smsAuthCode; -} - -+ (NSString *)getSMSUserId { - return self.currentSMSSubscriptionState.smsUserId; ++ (Class)Notifications { + return [OSNotificationsManager Notifications]; } -+ (void)saveSMSNumber:(NSString *)smsNumber withAuthToken:(NSString *)smsAuthToken userId:(NSString *)smsPlayerId { - [self.currentSMSSubscriptionState setSMSNumber:smsNumber]; - self.currentSMSSubscriptionState.smsAuthCode = smsAuthToken; - [self.currentSMSSubscriptionState setSMSUserId:smsPlayerId]; - - //call persistAsFrom in order to save the smsNumber & playerId to NSUserDefaults - [self.currentSMSSubscriptionState persist]; - - [OneSignal onesignalLog:ONE_S_LL_VERBOSE message:[NSString stringWithFormat:@"CurrentSMSSubscriptionState after saveSMSNumber: %@", self.currentSMSSubscriptionState.description]]; ++ (Class)Session { + return [OSOutcomes Session]; } -+ (void)saveExternalIdAuthToken:(NSString *)hashToken { - self.currentSubscriptionState.externalIdAuthCode = hashToken; - // Call persistAsFrom in order to save the externalIdAuthCode to NSUserDefaults - [self.currentSubscriptionState persist]; ++ (Class)InAppMessages { + let oneSignalInAppMessages = NSClassFromString(@"OneSignalInAppMessages"); + if (oneSignalInAppMessages != nil && [oneSignalInAppMessages respondsToSelector:@selector(InAppMessages)]) { + return [oneSignalInAppMessages performSelector:@selector(InAppMessages)]; + } else { + [OneSignalLog onesignalLog:ONE_S_LL_ERROR message:@"OneSignalInAppMessages not found. In order to use OneSignal's In App Messaging features the OneSignalInAppMessages module must be added."]; + return [OSStubInAppMessages InAppMessages]; + } } -+ (void)setMSDKType:(NSString*)type { - mSDKType = type; ++ (Class)LiveActivities { + return [OneSignalLiveActivityController LiveActivities]; } -+ (void)setWaitingForApnsResponse:(BOOL)value { - waitingForApnsResponse = value; ++ (Class)Location { + let oneSignalLocationManager = NSClassFromString(@"OneSignalLocationManager"); + if (oneSignalLocationManager != nil && [oneSignalLocationManager respondsToSelector:@selector(Location)]) { + return [oneSignalLocationManager performSelector:@selector(Location)]; + } else { + return [OSStubLocation Location]; + } } -// Used for testing purposes to decrease the amount of time the -// SDK will spend waiting for a response from APNS before it -// gives up and registers with OneSignal anyways -+ (void)setDelayIntervals:(NSTimeInterval)apnsMaxWait withRegistrationDelay:(NSTimeInterval)registrationDelay { - reattemptRegistrationInterval = registrationDelay; - maxApnsWait = apnsMaxWait; ++ (Class)Debug { + return [OneSignalLog Debug]; } -+ (void)clearStatics { - appId = nil; - launchOptions = false; - appSettings = nil; - hasSetLaunchOptions = false; - initDone = false; - usesAutoPrompt = false; - requestedProvisionalAuthorization = false; - - registeredWithApple = false; - _osNotificationSettings = nil; - waitingForApnsResponse = false; - waitingForOneSReg = false; - isOnSessionSuccessfulForCurrentState = false; - mLastNotificationTypes = -1; - - _stateSynchronizer = nil; - - _lastPermissionState = nil; - _currentPermissionState = nil; - - _currentEmailSubscriptionState = nil; - _lastEmailSubscriptionState = nil; - _lastSubscriptionState = nil; - _currentSubscriptionState = nil; - _currentSMSSubscriptionState = nil; - _lastSMSSubscriptionState = nil; - - _permissionStateChangesObserver = nil; - - _downloadedParameters = false; - _didCallDownloadParameters = false; - - maxApnsWait = APNS_TIMEOUT; - reattemptRegistrationInterval = REGISTRATION_DELAY_SECONDS; - - sessionLaunchTime = [NSDate date]; - performedOnSessionRequest = false; - pendingExternalUserId = nil; - pendingExternalUserIdHashToken = nil; - - _outcomeEventFactory = nil; - _outcomeEventsController = nil; - - _registerUserFinished = false; - _registerUserSuccessful = false; - - _delayedSMSParameters = nil; - - [OSSessionManager resetSharedSessionManager]; -} +#pragma mark Initialization -// Set to false as soon as it's read. -+ (BOOL)coldStartFromTapOnNotification { - BOOL val = coldStartFromTapOnNotification; - coldStartFromTapOnNotification = NO; - return val; +/* + This should be set from all OneSignal entry points. + Note: wrappers may call this method with a null appId. + */ ++ (void)initialize:(nonnull NSString*)newAppId withLaunchOptions:(nullable NSDictionary*)launchOptions { + [self setAppId:newAppId]; + [self setLaunchOptions:launchOptions]; + [self init]; } -+ (BOOL)shouldDelaySubscriptionSettingsUpdate { - return shouldDelaySubscriptionUpdate; ++ (NSString * _Nullable)getCachedAppId { + let prevAppId = [OneSignalUserDefaults.initStandard getSavedStringForKey:OSUD_APP_ID defaultValue:nil]; + if (!prevAppId) { + [OneSignalLog onesignalLog:ONE_S_LL_INFO message:@"Waiting for setAppId(appId) with a valid appId to complete OneSignal init!"]; + } else { + let logMessage = [NSString stringWithFormat:@"Initializing OneSignal with cached appId: '%@'.", prevAppId]; + [OneSignalLog onesignalLog:ONE_S_LL_INFO message:logMessage]; + } + return prevAppId; } /* 1/2 steps in OneSignal init, relying on setLaunchOptions (usage order does not matter) Sets the app id OneSignal should use in the application - This is should be set from all OneSignal entry points */ -+ (void)setAppId:(nonnull NSString*)newAppId { - [OneSignal onesignalLog:ONE_S_LL_VERBOSE message:[NSString stringWithFormat:@"setAppId(id) called with appId: %@!", newAppId]]; +// TODO: For release, note this change in migration guide: +// No longer reading appID from plist @"OneSignal_APPID" and @"GameThrive_APPID" ++ (void)setAppId:(nullable NSString*)newAppId { + [OneSignalLog onesignalLog:ONE_S_LL_VERBOSE message:[NSString stringWithFormat:@"setAppId called with appId: %@!", newAppId]]; if (!newAppId || newAppId.length == 0) { - [OneSignal onesignalLog:ONE_S_LL_WARN message:@"appId set, but please call setLaunchOptions(launchOptions) to complete OneSignal init!"]; - return; - } else if (appId && ![newAppId isEqualToString:appId]) { + NSString* cachedAppId = [self getCachedAppId]; + if (cachedAppId) { + [OneSignalConfigManager setAppId:cachedAppId]; + } else { + return; + } + } else if ([OneSignalConfigManager getAppId] && ![newAppId isEqualToString:[OneSignalConfigManager getAppId]]) { // Pre-check on app id to make sure init of SDK is performed properly // Usually when the app id is changed during runtime so that SDK is reinitialized properly initDone = false; + [OneSignalConfigManager setAppId:newAppId]; + } else { + [OneSignalConfigManager setAppId:newAppId]; } - appId = newAppId; + [self handleAppIdChange:[OneSignalConfigManager getAppId]]; +} - [OneSignal onesignalLog:ONE_S_LL_VERBOSE message:@"setAppId(id) finished, checking if launchOptions has been set before proceeding...!"]; - if (!hasSetLaunchOptions) { - [OneSignal onesignalLog:ONE_S_LL_WARN message:@"appId set, but please call setLaunchOptions(launchOptions) to complete OneSignal init!"]; - return; ++ (BOOL)isValidAppId:(NSString*)appId { + if (!appId || ![[NSUUID alloc] initWithUUIDString:appId]) { + [OneSignalLog onesignalLog:ONE_S_LL_FATAL message:[NSString stringWithFormat:@"OneSignal AppId: %@ - AppId is null or format is invalid, stopping initialization.\nExample usage: 'b2f7f966-d8cc-11e4-bed1-df8f05be55ba'\n", appId]]; + return false; } - - [OneSignal onesignalLog:ONE_S_LL_VERBOSE message:@"setAppId(id) successful and launchOptions are set, initializing OneSignal..."]; - [self init]; + return true; } /* 1/2 steps in OneSignal init, relying on setAppId (usage order does not matter) Sets the iOS sepcific app settings Method must be called to successfully init OneSignal + Note: While this is called via `initialize`, it is also called directly from wrapper SDKs. */ -+ (void)initWithLaunchOptions:(nullable NSDictionary*)newLaunchOptions { - [OneSignal onesignalLog:ONE_S_LL_VERBOSE message:[NSString stringWithFormat:@"setLaunchOptions() called with launchOptions: %@!", launchOptions.description]]; ++ (void)setLaunchOptions:(nullable NSDictionary*)newLaunchOptions { + [OneSignalLog onesignalLog:ONE_S_LL_VERBOSE message:[NSString stringWithFormat:@"setLaunchOptions() called with launchOptions: %@!", launchOptions.description]]; - launchOptions = newLaunchOptions; - hasSetLaunchOptions = true; - - [OneSignal onesignalLog:ONE_S_LL_VERBOSE message:@"setLaunchOptions(id) finished, checking if appId has been set before proceeding...!"]; - if (!appId || appId.length == 0) { - // Read from .plist if not passed in with this method call - appId = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"OneSignal_APPID"]; - if (!appId) { - - appId = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"GameThrive_APPID"]; - if (!appId) { - - let prevAppId = [OneSignalUserDefaults.initStandard getSavedStringForKey:OSUD_APP_ID defaultValue:nil]; - if (!prevAppId) { - [OneSignal onesignalLog:ONE_S_LL_INFO message:@"launchOptions set, now waiting for setAppId(appId) with a valid appId to complete OneSignal init!"]; - } else { - let logMessage = [NSString stringWithFormat:@"launchOptions set, initializing OneSignal with cached appId: '%@'.", prevAppId]; - [OneSignal onesignalLog:ONE_S_LL_INFO message:logMessage]; - [self setAppId:prevAppId]; - } - return; - } - } + // Don't continue if the newLaunchOptions are nil + if (!newLaunchOptions) { + return; } - [OneSignal onesignalLog:ONE_S_LL_VERBOSE message:@"setLaunchOptions(launchOptions) successful and appId is set, initializing OneSignal..."]; - [self init]; -} - -+ (BOOL)shouldSuppressURL { - // if the plist key does not exist default to false - // the plist value specifies whether the user wants to open an url using default browser or OSWebView - NSDictionary *bundleDict = [[NSBundle mainBundle] infoDictionary]; - BOOL shouldSuppress = [bundleDict[ONESIGNAL_SUPRESS_LAUNCH_URLS] boolValue]; - return shouldSuppress ?: false; -} - -+ (void)setLaunchURLsInApp:(BOOL)launchInApp { - NSMutableDictionary *newSettings = [[NSMutableDictionary alloc] initWithDictionary:appSettings]; - newSettings[kOSSettingsKeyInAppLaunchURL] = launchInApp ? @true : @false; - appSettings = newSettings; - // This allows this method to have an effect after init is called - [self enableInAppLaunchURL:launchInApp]; + launchOptions = newLaunchOptions; + + // Cold start from tap on a remote notification + // NOTE: launchOptions may be nil if tapping on a notification's action button. + NSDictionary* userInfo = [launchOptions objectForKey:UIApplicationLaunchOptionsRemoteNotificationKey]; + if (userInfo) + [OSNotificationsManager setColdStartFromTapOnNotification:YES]; } + (void)setProvidesNotificationSettingsView:(BOOL)providesView { - NSMutableDictionary *newSettings = [[NSMutableDictionary alloc] initWithDictionary:appSettings]; - newSettings[kOSSettingsKeyProvidesAppNotificationSettings] = providesView ? @true : @false; - appSettings = newSettings; + if (providesView && [OSDeviceUtils isIOSVersionGreaterThanOrEqual:@"12.0"]) { + [OSNotificationsManager setProvidesNotificationSettingsView: providesView]; + } } -#pragma mark: LIVE ACTIVITIES - +#pragma mark Initialization -+ (void)addPendingLiveActivityUpdate:(NSString * _Nonnull)activityId - withToken:(NSString * _Nullable)token - isEnter:(BOOL)isEnter - withSuccess:(OSResultSuccessBlock _Nullable)successBlock - withFailure:(OSFailureBlock _Nullable)failureBlock { - OSPendingLiveActivityUpdate *pendingLiveActivityUpdate = [[OSPendingLiveActivityUpdate alloc] initWith:activityId withToken:token isEnter:isEnter withSuccess:successBlock withFailure:failureBlock]; ++ (BOOL)shouldStartNewSession { + // return if the user has not granted privacy permissions + if ([OSPrivacyConsentController shouldLogMissingPrivacyConsentErrorWithMethodName:nil]) + return false; + + // TODO: There used to be many additional checks here but for now, let's omit. Consider adding them or variants later. - if (!pendingLiveActivityUpdates) { - pendingLiveActivityUpdates = [NSMutableArray new]; + // The SDK hasn't finished initializing yet, init() will start the new session + if (!initDone) { + [OneSignalLog onesignalLog:ONE_S_LL_DEBUG message:[NSString stringWithFormat:@"shouldStartNewSession:initDone: %d", initDone]]; + return false; } - [pendingLiveActivityUpdates addObject:pendingLiveActivityUpdate]; + + NSTimeInterval now = [[NSDate date] timeIntervalSince1970]; + NSTimeInterval lastTimeClosed = [OneSignalUserDefaults.initStandard getSavedDoubleForKey:OSUD_APP_LAST_CLOSED_TIME defaultValue:0]; + + // Make sure last time we closed app was more than 30 secs ago + const int minTimeThreshold = 30; + NSTimeInterval timeSinceLastClosed = now - lastTimeClosed; + NSTimeInterval timeSinceInitialization = now - initializationTime; + + [OneSignalLog onesignalLog:ONE_S_LL_DEBUG message:[NSString stringWithFormat:@"shouldStartNewSession:timeSinceLastClosed: %f", timeSinceLastClosed]]; + [OneSignalLog onesignalLog:ONE_S_LL_DEBUG message:[NSString stringWithFormat:@"shouldStartNewSession:timeSinceInitialization: %f", timeSinceInitialization]]; + + return MIN(timeSinceLastClosed, timeSinceInitialization) >= minTimeThreshold; } -+ (void)executePendingLiveActivityUpdates { - if(pendingLiveActivityUpdates.count <= 0) { ++ (void)startNewSession:(BOOL)fromInit { + // If not called from init, need to check if we should start a new session + if (!fromInit && ![self shouldStartNewSession]) { return; } - OSPendingLiveActivityUpdate * updateToProcess = [pendingLiveActivityUpdates objectAtIndex:0]; - [pendingLiveActivityUpdates removeObjectAtIndex: 0]; - if (updateToProcess.isEnter) { - [OneSignalClient.sharedClient executeRequest:[OSRequestLiveActivityEnter withUserId:self.currentSubscriptionState.userId appId:appId activityId:updateToProcess.activityId token:updateToProcess.token] - onSuccess:^(NSDictionary *result) { - [self callSuccessBlockOnMainThread:updateToProcess.successBlock withResult:result]; - [self executePendingLiveActivityUpdates]; - } onFailure:^(NSError *error) { - [self callFailureBlockOnMainThread:updateToProcess.failureBlock withError:error]; - [self executePendingLiveActivityUpdates]; - }]; - } else { - [OneSignalClient.sharedClient executeRequest:[OSRequestLiveActivityExit withUserId:self.currentSubscriptionState.userId appId:appId activityId:updateToProcess.activityId] - onSuccess:^(NSDictionary *result) { - [self callSuccessBlockOnMainThread:updateToProcess.successBlock withResult:result]; - [self executePendingLiveActivityUpdates]; - } onFailure:^(NSError *error) { - [self callFailureBlockOnMainThread:updateToProcess.failureBlock withError:error]; - [self executePendingLiveActivityUpdates]; - }]; - } + [OneSignalLog onesignalLog:ONE_S_LL_VERBOSE message:@"startNewSession"]; + + // Run on the main queue as it is possible for this to be called from multiple queues. + // Also some of the code in the method is not thread safe such as _outcomeEventsController. + [OneSignalHelper dispatch_async_on_main_queue:^{ + [self startNewSessionInternal]; + }]; } -+ (void)enterLiveActivity:(NSString * _Nonnull)activityId withToken:(NSString * _Nonnull)token { ++ (void)startNewSessionInternal { + [OneSignalLog onesignalLog:ONE_S_LL_VERBOSE message:@"startNewSessionInternal"]; - if ([OSPrivacyConsentController shouldLogMissingPrivacyConsentErrorWithMethodName:@"enterLiveActivity:"]) + // return if the user has not granted privacy permissions + if ([OSPrivacyConsentController shouldLogMissingPrivacyConsentErrorWithMethodName:nil]) return; - - [self enterLiveActivity:activityId withToken:token withSuccess:nil withFailure:nil]; -} -+ (void)enterLiveActivity:(NSString * _Nonnull)activityId withToken:(NSString * _Nonnull)token withSuccess:(OSResultSuccessBlock _Nullable)successBlock withFailure:(OSFailureBlock _Nullable)failureBlock{ + [OSOutcomes.sharedController clearOutcomes]; + + [[OSSessionManager sharedSessionManager] restartSessionIfNeeded]; - if ([OSPrivacyConsentController shouldLogMissingPrivacyConsentErrorWithMethodName:@"enterLiveActivity:onSuccess:onFailure:"]) { - if (failureBlock) { - NSError *error = [NSError errorWithDomain:@"com.onesignal.tags" code:0 userInfo:@{@"error" : @"Your application has called enterLiveActivity:onSuccess:onFailure: before the user granted privacy permission. Please call `consentGranted(bool)` in order to provide user privacy consent"}]; - failureBlock(error); - } - return; + [OneSignalTrackFirebaseAnalytics trackInfluenceOpenEvent]; + + // Clear last location after attaching data to user state or not + let oneSignalLocation = NSClassFromString(@"OneSignalLocation"); + if (oneSignalLocation != nil && [oneSignalLocation respondsToSelector:@selector(clearLastLocation)]) { + [oneSignalLocation performSelector:@selector(clearLastLocation)]; } + + [OSNotificationsManager sendNotificationTypesUpdateToDelegate]; + // TODO: Figure out if Create User also sets session_count automatically on backend + [OneSignalUserManagerImpl.sharedInstance startNewSession]; - if(self.currentSubscriptionState.userId) { - [OneSignalClient.sharedClient executeRequest:[OSRequestLiveActivityEnter withUserId:self.currentSubscriptionState.userId appId:appId activityId:activityId token:token] - onSuccess:^(NSDictionary *result) { - [self callSuccessBlockOnMainThread:successBlock withResult:result]; - } onFailure:^(NSError *error) { - [self callFailureBlockOnMainThread:failureBlock withError:error]; - }]; - } else { - [self addPendingLiveActivityUpdate:activityId withToken:token isEnter:true withSuccess:successBlock withFailure:failureBlock]; + // This is almost always going to be nil the first time. + // The OSMessagingController is an OSPushSubscriptionObserver so that we pull IAMs once we have the sub id + NSString *subscriptionId = OneSignalUserManagerImpl.sharedInstance.pushSubscriptionId; + if (subscriptionId) { + let oneSignalInAppMessages = NSClassFromString(@"OneSignalInAppMessages"); + if (oneSignalInAppMessages != nil && [oneSignalInAppMessages respondsToSelector:@selector(getInAppMessagesFromServer:)]) { + [oneSignalInAppMessages performSelector:@selector(getInAppMessagesFromServer:) withObject:subscriptionId]; + } } -} - -+ (void)exitLiveActivity:(NSString * _Nonnull)activityId{ - if ([OSPrivacyConsentController shouldLogMissingPrivacyConsentErrorWithMethodName:@"enterLiveActivity:"]) - return; + // The below means there are NO IAMs until on_session returns + // because they can be ended, paused, or deleted from the server, or your segment has changed and you're no longer eligible + + // ^ Do the "on_session" call, send session_count++ + // on success: + // [OneSignalLocation sendLocation]; + // [self executePendingLiveActivityUpdates]; + // [self receivedInAppMessageJson:results[@"push"][@"in_app_messages"]]; // go to controller - [self exitLiveActivity:activityId withSuccess:nil withFailure:nil]; + // on failure: + // [OSMessagingController.sharedInstance updateInAppMessagesFromCache]; // go to controller } -+ (void)exitLiveActivity:(NSString * _Nonnull)activityId withSuccess:(OSResultSuccessBlock _Nullable)successBlock withFailure:(OSFailureBlock _Nullable)failureBlock{ ++ (void)startInAppMessages { + let oneSignalInAppMessages = NSClassFromString(@"OneSignalInAppMessages"); + if (oneSignalInAppMessages != nil && [oneSignalInAppMessages respondsToSelector:@selector(start)]) { + [oneSignalInAppMessages performSelector:@selector(start)]; + } +} - if ([OSPrivacyConsentController shouldLogMissingPrivacyConsentErrorWithMethodName:@"exitLiveActivity:onSuccess:onFailure:"]) { - if (failureBlock) { - NSError *error = [NSError errorWithDomain:@"com.onesignal.tags" code:0 userInfo:@{@"error" : @"Your application has called exitLiveActivity:onSuccess:onFailure: before the user granted privacy permission. Please call `consentGranted(bool)` in order to provide user privacy consent"}]; - failureBlock(error); - } - return; ++ (void)startOutcomes { + [OSOutcomes start]; + [OSOutcomes.sharedController cleanUniqueOutcomeNotifications]; // TODO: should this actually be in new session instead of init +} + ++ (void)startLocation { + let oneSignalLocation = NSClassFromString(@"OneSignalLocation"); + if (oneSignalLocation != nil && [oneSignalLocation respondsToSelector:@selector(start)]) { + [oneSignalLocation performSelector:@selector(start)]; } - if(self.currentSubscriptionState.userId) { - [OneSignalClient.sharedClient executeRequest:[OSRequestLiveActivityExit withUserId:self.currentSubscriptionState.userId appId:appId activityId:activityId] - onSuccess:^(NSDictionary *result) { - [self callSuccessBlockOnMainThread:successBlock withResult:result]; - } onFailure:^(NSError *error) { - [self callFailureBlockOnMainThread:failureBlock withError:error]; - }]; - } else { - [self addPendingLiveActivityUpdate:activityId withToken:nil isEnter:false withSuccess:successBlock withFailure:failureBlock]; +} + ++ (void)startTrackFirebaseAnalytics { + if ([OneSignalTrackFirebaseAnalytics libraryExists]) { + [OneSignalTrackFirebaseAnalytics init]; } } -+ (void)setNotificationWillShowInForegroundHandler:(OSNotificationWillShowInForegroundBlock)block { - [OneSignal onesignalLog:ONE_S_LL_VERBOSE message:@"Notification will show in foreground handler set successfully"]; - [OneSignalHelper setNotificationWillShowInForegroundBlock:block]; ++ (void)startTrackIAP { + if ([OneSignalTrackIAP canTrack]) + [OneSignalTrackIAP sharedInstance]; // start observing purchases } -+ (void)setNotificationOpenedHandler:(OSNotificationOpenedBlock)block { - [OneSignal onesignalLog:ONE_S_LL_VERBOSE message:@"Notification opened handler set successfully"]; - [OneSignalHelper setNotificationOpenedBlock:block]; ++ (void)startLifecycleObserver { + [OneSignalLifecycleObserver registerLifecycleObserver]; } -+ (void)setInAppMessageClickHandler:(OSInAppMessageClickBlock)block { - [OneSignal onesignalLog:ONE_S_LL_VERBOSE message:@"In app message click handler set successfully"]; - [OSMessagingController.sharedInstance setInAppMessageClickHandler:block]; ++ (void)startUserManager { + [OneSignalUserManagerImpl.sharedInstance start]; + [OSNotificationsManager sendPushTokenToDelegate]; } -+ (void)setInAppMessageLifecycleHandler:(NSObject *_Nullable)delegate; { - [OneSignal onesignalLog:ONE_S_LL_VERBOSE message:@"In app message delegate set successfully"]; - [OSMessagingController.sharedInstance setInAppMessageDelegate:delegate]; ++ (void)delayInitializationForPrivacyConsent { + [OneSignalLog onesignalLog:ONE_S_LL_VERBOSE message:@"Delayed initialization of the OneSignal SDK until the user provides privacy consent using the setPrivacyConsent() method"]; + delayedInitializationForPrivacyConsent = true; + _delayedInitParameters = [[DelayedConsentInitializationParameters alloc] initWithLaunchOptions:launchOptions withAppId:[OneSignalConfigManager getAppId]]; + // Init was not successful, set appId back to nil + [OneSignalConfigManager setAppId:nil]; } /* Called after setAppId and setLaunchOptions, depending on which one is called last (order does not matter) */ + (void)init { - [[OSMigrationController new] migrate]; - // using classes as delegates is not best practice. We should consider using a shared instance of a class instead - [OSSessionManager sharedSessionManager].delegate = (id)self; - if ([self requiresUserPrivacyConsent]) { - [OneSignal onesignalLog:ONE_S_LL_VERBOSE message:@"Delayed initialization of the OneSignal SDK until the user provides privacy consent using the consentGranted() method"]; - delayedInitializationForPrivacyConsent = true; - _delayedInitParameters = [[DelayedConsentInitializationParameters alloc] initWithLaunchOptions:launchOptions withAppId:appId]; - // Init was not successful, set appId back to nil - appId = nil; + [OneSignalLog onesignalLog:ONE_S_LL_VERBOSE message:[NSString stringWithFormat:@"launchOptions is set and appId of %@ is set, initializing OneSignal...", [OneSignalConfigManager getAppId]]]; + + // TODO: We moved this check to the top of this method, we should test this. + if (initDone) { return; } - languageContext = [LanguageContext new]; - - [OneSignalCacheCleaner cleanCachedUserData]; - [OneSignal checkIfApplicationImplementsDeprecatedMethods]; - - let success = [self handleAppIdChange:appId]; - if (!success) - return; + [[OSMigrationController new] migrate]; + + OSBackgroundTaskManager.taskHandler = [OSBackgroundTaskHandlerImpl new]; + [self registerForAPNsToken]; + // Wrapper SDK's call init twice and pass null as the appId on the first call // the app ID is required to download parameters, so do not download params until the appID is provided - if (!_didCallDownloadParameters && appId && appId != (id)[NSNull null]) - [self downloadIOSParamsWithAppId:appId]; - - [self initSettings:appSettings]; - - if (initDone) + if (!_didCallDownloadParameters && [OneSignalConfigManager getAppId] && [OneSignalConfigManager getAppId] != (id)[NSNull null]) + [self downloadIOSParamsWithAppId:[OneSignalConfigManager getAppId]]; + + // using classes as delegates is not best practice. We should consider using a shared instance of a class instead + [OSSessionManager sharedSessionManager].delegate = (id)self; + + if ([OSPrivacyConsentController requiresUserPrivacyConsent]) { + [self delayInitializationForPrivacyConsent]; + return; + } + + // Now really initializing the SDK! + + // Invalid app ids reaching here will cause failure + if (![self isValidAppId:[OneSignalConfigManager getAppId]]) return; - initializationTime = [NSDate date]; - - // Outcomes init - _outcomeEventFactory = [[OSOutcomeEventsFactory alloc] initWithCache:[OSOutcomeEventsCache sharedOutcomeEventsCache]]; - _outcomeEventsController = [[OneSignalOutcomeEventsController alloc] initWithSessionManager:[OSSessionManager sharedSessionManager] outcomeEventsFactory:_outcomeEventFactory]; - - if (appId && [self isLocationShared]) - [OneSignalLocation getLocation:false fallbackToSettings:false withCompletionHandler:nil]; - + // TODO: Consider the implications of `registerUserInternal` previously running on the main_queue + // Some of its calls have been moved into `init` here below /* - * No need to call the handleNotificationOpened:userInfo as it will be called from one of the following selectors - * - application:didReceiveRemoteNotification:fetchCompletionHandler - * - userNotificationCenter:didReceiveNotificationResponse:withCompletionHandler (iOS10) + // Run on the main queue as it is possible for this to be called from multiple queues. + // Also some of the code in the method is not thread safe such as _outcomeEventsController. + [OneSignalHelper dispatch_async_on_main_queue:^{ + [self registerUserInternal]; + }]; */ - - // Cold start from tap on a remote notification - // NOTE: launchOptions may be nil if tapping on a notification's action button. - NSDictionary* userInfo = [launchOptions objectForKey:UIApplicationLaunchOptionsRemoteNotificationKey]; - if (userInfo) - coldStartFromTapOnNotification = YES; - - [self clearBadgeCount:false]; - - if (!trackIAPPurchase && [OneSignalTrackIAP canTrack]) - trackIAPPurchase = [OneSignalTrackIAP new]; - - if ([OneSignalTrackFirebaseAnalytics libraryExists]) - [OneSignalTrackFirebaseAnalytics init]; - - [OneSignalLifecycleObserver registerLifecycleObserver]; - - initDone = true; -} - -+ (NSString *)appGroupKey { - return [OneSignalUserDefaults appGroupName]; -} - -+ (BOOL)handleAppIdChange:(NSString*)appId { - // TODO: Maybe in the future we can make a file with add app ids and validate that way? - if ([@"b2f7f966-d8cc-11e4-bed1-df8f05be55ba" isEqualToString:appId] || - [@"5eb5a37e-b458-11e3-ac11-000c2940e62c" isEqualToString:appId]) { - [OneSignal onesignalLog:ONE_S_LL_WARN message:@"OneSignal Example AppID detected, please update to your app's id found on OneSignal.com"]; - } - - let standardUserDefaults = OneSignalUserDefaults.initStandard; - let prevAppId = [standardUserDefaults getSavedStringForKey:OSUD_APP_ID defaultValue:nil]; - - // Handle changes to the app id, this might happen on a developer's device when testing - // Will also run the first time OneSignal is initialized - if (appId && ![appId isEqualToString:prevAppId]) { - initDone = false; - _downloadedParameters = false; - _didCallDownloadParameters = false; - - let sharedUserDefaults = OneSignalUserDefaults.initShared; - - [standardUserDefaults saveStringForKey:OSUD_APP_ID withValue:appId]; - - // Remove player_id from both standard and shared NSUserDefaults - [standardUserDefaults removeValueForKey:OSUD_PLAYER_ID_TO]; - [sharedUserDefaults removeValueForKey:OSUD_PLAYER_ID_TO]; - } - - // Always save appId and player_id as it will not be present on shared if: - // - Updating from an older SDK - // - Updating to an app that didn't have App Groups setup before - [OneSignalUserDefaults.initShared saveStringForKey:OSUD_APP_ID withValue:appId]; - [OneSignalUserDefaults.initShared saveStringForKey:OSUD_PLAYER_ID_TO withValue:self.currentSubscriptionState.userId]; - - // Invalid app ids reaching here will cause failure - if (!appId || ![[NSUUID alloc] initWithUUIDString:appId]) { - [OneSignal onesignalLog:ONE_S_LL_FATAL message:@"OneSignal AppId format is invalid.\nExample: 'b2f7f966-d8cc-11e4-bed1-df8f05be55ba'\n"]; - return false; - } - - return true; -} - -+ (void)initSettings:(NSDictionary*)settings { - registeredWithApple = self.currentPermissionState.accepted; - - let standardUserDefaults = OneSignalUserDefaults.initStandard; - // Check if disabled in-app launch url if passed a NO - if (settings[kOSSettingsKeyInAppLaunchURL] && [settings[kOSSettingsKeyInAppLaunchURL] isKindOfClass:[NSNumber class]]) - [self enableInAppLaunchURL:[settings[kOSSettingsKeyInAppLaunchURL] boolValue]]; - else if (![standardUserDefaults keyExists:OSUD_NOTIFICATION_OPEN_LAUNCH_URL]) { - // Only need to default to true if the app doesn't already have this setting saved in NSUserDefaults - [self enableInAppLaunchURL:true]; - } - - // Always NO, can be cleaned up in a future commit - usesAutoPrompt = NO; - - if (settings[kOSSettingsKeyProvidesAppNotificationSettings] && [settings[kOSSettingsKeyProvidesAppNotificationSettings] isKindOfClass:[NSNumber class]] && [OneSignalHelper isIOSVersionGreaterThanOrEqual:@"12.0"]) - providesAppNotificationSettings = [settings[kOSSettingsKeyProvidesAppNotificationSettings] boolValue]; - - // Register with Apple's APNS server if we registed once before or if auto-prompt hasn't been disabled. - if (usesAutoPrompt || (registeredWithApple && !self.currentPermissionState.ephemeral)) { - [self registerForPushNotifications]; - } else { - [self checkProvisionalAuthorizationStatus]; - [self registerForAPNsToken]; - } - - if (self.currentSubscriptionState.userId) - [self registerUser]; - else { - [self.osNotificationSettings getNotificationPermissionState:^(OSPermissionState *state) { - if (state.answeredPrompt) - [self registerUser]; - else - [self registerUserAfterDelay]; - }]; - } -} - -// Checks to see if we should register for APNS' new Provisional authorization -// (also known as Direct to History). -// This behavior is determined by the OneSignal Parameters request -+ (void)checkProvisionalAuthorizationStatus { - if ([OSPrivacyConsentController shouldLogMissingPrivacyConsentErrorWithMethodName:nil]) - return; - - BOOL usesProvisional = [OneSignalUserDefaults.initStandard getSavedBoolForKey:OSUD_USES_PROVISIONAL_PUSH_AUTHORIZATION defaultValue:false]; - - // if iOS parameters for this app have never downloaded, this method - // should return - if (!usesProvisional || requestedProvisionalAuthorization) - return; - - requestedProvisionalAuthorization = true; - - [self.osNotificationSettings registerForProvisionalAuthorization:nil]; -} - -+ (void)registerForProvisionalAuthorization:(OSUserResponseBlock)block { - if ([OneSignalHelper isIOSVersionGreaterThanOrEqual:@"12.0"]) - [self.osNotificationSettings registerForProvisionalAuthorization:block]; - else - [OneSignal onesignalLog:ONE_S_LL_WARN message:@"registerForProvisionalAuthorization is only available in iOS 12+."]; -} - -+ (void)setRequiresUserPrivacyConsent:(BOOL)required { - let remoteParamController = [self getRemoteParamController]; - - // Already set by remote params - if ([remoteParamController hasPrivacyConsentKey]) - return; - - if ([self requiresUserPrivacyConsent] && !required) { - [OneSignal onesignalLog:ONE_S_LL_ERROR message:@"Cannot change requiresUserPrivacyConsent() from TRUE to FALSE"]; - return; - } - - [remoteParamController savePrivacyConsentRequired:required]; -} - -+ (BOOL)requiresUserPrivacyConsent { - return [OSPrivacyConsentController requiresUserPrivacyConsent]; -} - -+ (void)consentGranted:(BOOL)granted { - [OSPrivacyConsentController consentGranted:granted]; - - if (!granted || !delayedInitializationForPrivacyConsent || _delayedInitParameters == nil) - return; - // Try to init again using delayed params (order does not matter) - [self setAppId:_delayedInitParameters.appId]; - [self initWithLaunchOptions:_delayedInitParameters.launchOptions]; - - delayedInitializationForPrivacyConsent = false; - _delayedInitParameters = nil; -} - -// the iOS SDK used to call these selectors as a convenience but has stopped due to concerns about private API usage -// the SDK will now print warnings when a developer's app implements these selectors -+ (void)checkIfApplicationImplementsDeprecatedMethods { - dispatch_async(dispatch_get_main_queue(), ^{ - for (NSString *selectorName in DEPRECATED_SELECTORS) - if ([[[UIApplication sharedApplication] delegate] respondsToSelector:NSSelectorFromString(selectorName)]) - [OneSignal onesignalLog:ONE_S_LL_WARN message:[NSString stringWithFormat:@"OneSignal has detected that your application delegate implements a deprecated method (%@). Please note that this method has been officially deprecated and the OneSignal SDK will no longer call it. You should use UNUserNotificationCenter instead", selectorName]]; - }); -} - -+ (void)downloadIOSParamsWithAppId:(NSString *)appId { - [OneSignal onesignalLog:ONE_S_LL_DEBUG message:@"Downloading iOS parameters for this application"]; - _didCallDownloadParameters = true; - [OneSignalClient.sharedClient executeRequest:[OSRequestGetIosParams withUserId:self.currentSubscriptionState.userId appId:appId] onSuccess:^(NSDictionary *result) { - if (result[IOS_REQUIRES_EMAIL_AUTHENTICATION]) { - self.currentEmailSubscriptionState.requiresEmailAuth = [result[IOS_REQUIRES_EMAIL_AUTHENTICATION] boolValue]; - - // checks if a call to setEmail: was delayed due to missing 'requiresEmailAuth' parameter - if (delayedEmailParameters && self.currentSubscriptionState.userId) { - [self setEmail:delayedEmailParameters.email withEmailAuthHashToken:delayedEmailParameters.authToken withSuccess:delayedEmailParameters.successBlock withFailure:delayedEmailParameters.failureBlock]; - delayedEmailParameters = nil; - } - } - - if (result[IOS_REQUIRES_SMS_AUTHENTICATION]) { - self.currentSMSSubscriptionState.requiresSMSAuth = [result[IOS_REQUIRES_SMS_AUTHENTICATION] boolValue]; - - // checks if a call to setSMSNumber: was delayed due to missing 'requiresSMSAuth' parameter - if (_delayedSMSParameters && self.currentSubscriptionState.userId) { - [self setSMSNumber:_delayedSMSParameters.smsNumber withSMSAuthHashToken:_delayedSMSParameters.authToken withSuccess:_delayedSMSParameters.successBlock withFailure:_delayedSMSParameters.failureBlock]; - _delayedSMSParameters = nil; - } - } - - if (result[IOS_REQUIRES_USER_ID_AUTHENTICATION]) - requiresUserIdAuth = [result[IOS_REQUIRES_USER_ID_AUTHENTICATION] boolValue]; - - if (!usesAutoPrompt && result[IOS_USES_PROVISIONAL_AUTHORIZATION] != (id)[NSNull null]) { - [OneSignalUserDefaults.initStandard saveBoolForKey:OSUD_USES_PROVISIONAL_PUSH_AUTHORIZATION withValue:[result[IOS_USES_PROVISIONAL_AUTHORIZATION] boolValue]]; - - [self checkProvisionalAuthorizationStatus]; - } - - if (result[IOS_RECEIVE_RECEIPTS_ENABLE] != (id)[NSNull null]) - [OneSignalUserDefaults.initShared saveBoolForKey:OSUD_RECEIVE_RECEIPTS_ENABLED withValue:[result[IOS_RECEIVE_RECEIPTS_ENABLE] boolValue]]; - - //TODO: move all remote param logic to new OSRemoteParamController - [[self getRemoteParamController] saveRemoteParams:result]; - - if (result[OUTCOMES_PARAM] && result[OUTCOMES_PARAM][IOS_OUTCOMES_V2_SERVICE_ENABLE]) - [[OSOutcomeEventsCache sharedOutcomeEventsCache] saveOutcomesV2ServiceEnabled:[result[OUTCOMES_PARAM][IOS_OUTCOMES_V2_SERVICE_ENABLE] boolValue]]; - - [[OSTrackerFactory sharedTrackerFactory] saveInfluenceParams:result]; - [OneSignalTrackFirebaseAnalytics updateFromDownloadParams:result]; - - _downloadedParameters = true; - - // Checks if a call to setExternalUserId: was delayed due to missing 'require_user_id_auth' parameter - // If at this point we don't have user Id, then under register user the delayedExternalIdParameters will be used - if (delayedExternalIdParameters && self.currentSubscriptionState.userId) { - [self setExternalUserId:delayedExternalIdParameters.externalId withExternalIdAuthHashToken:delayedExternalIdParameters.authToken withSuccess:delayedExternalIdParameters.successBlock withFailure:delayedExternalIdParameters.failureBlock]; - delayedExternalIdParameters = nil; - } - } onFailure:^(NSError *error) { - _didCallDownloadParameters = false; - }]; -} - -//presents the settings page to control/customize push notification settings -+ (void)presentAppSettings { - - //only supported in 10+ - if ([OneSignalHelper isIOSVersionLessThan:@"10.0"]) - return; - - let url = [NSURL URLWithString:UIApplicationOpenSettingsURLString]; - - if (!url) - return; - - if ([[UIApplication sharedApplication] canOpenURL:url]) { - [[UIApplication sharedApplication] openURL:url options:@{} completionHandler:nil]; - } else { - [OneSignal onesignalLog:ONE_S_LL_ERROR message:@"Unable to open settings for this application"]; - } -} - -// iOS 12+ only -// A boolean indicating if the app provides its own custom Notifications Settings UI -// If this is set to TRUE via the kOSSettingsKeyProvidesAppNotificationSettings init -// parameter, the SDK will request authorization from the User Notification Center -+ (BOOL)providesAppNotificationSettings { - return providesAppNotificationSettings; -} - -// iOS 9+, only tries to register for an APNs token -+ (BOOL)registerForAPNsToken { - - if (waitingForApnsResponse) - return true; - - id backgroundModes = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"UIBackgroundModes"]; - backgroundModesEnabled = (backgroundModes && [backgroundModes containsObject:@"remote-notification"]); - - // Only try to register for a pushToken if: - // - The user accepted notifications - // - "Background Modes" > "Remote Notifications" are enabled in Xcode - if (![self.osNotificationSettings getNotificationPermissionState].accepted && !backgroundModesEnabled) - return false; - - // Don't attempt to register again if there was a non-recoverable error. - if (mSubscriptionStatus < -9) - return false; - - [OneSignal onesignalLog:ONE_S_LL_VERBOSE message:@"Firing registerForRemoteNotifications"]; - - waitingForApnsResponse = true; - [OneSignalHelper dispatch_async_on_main_queue:^{ - [[UIApplication sharedApplication] registerForRemoteNotifications]; - }]; - - return true; -} - -// if user has disabled push notifications & fallback == true, -// the SDK will prompt the user to open notification Settings for this app -+ (void)promptForPushNotificationsWithUserResponse:(OSUserResponseBlock)block fallbackToSettings:(BOOL)fallback { - - if (self.currentPermissionState.hasPrompted == true && self.osNotificationSettings.getNotificationTypes == 0 && fallback) { - //show settings - - let localizedTitle = NSLocalizedString(@"Open Settings", @"A title saying that the user can open iOS Settings"); - let localizedSettingsActionTitle = NSLocalizedString(@"Open Settings", @"A button allowing the user to open the Settings app"); - let localizedCancelActionTitle = NSLocalizedString(@"Cancel", @"A button allowing the user to close the Settings prompt"); - - //the developer can provide a custom message in Info.plist if they choose. - var localizedMessage = (NSString *)[[NSBundle mainBundle] objectForInfoDictionaryKey:FALLBACK_TO_SETTINGS_MESSAGE]; - - if (!localizedMessage) - localizedMessage = NSLocalizedString(@"You currently have notifications turned off for this application. You can open Settings to re-enable them", @"A message explaining that users can open Settings to re-enable push notifications"); - - - [[OneSignalDialogController sharedInstance] presentDialogWithTitle:localizedTitle withMessage:localizedMessage withActions:@[localizedSettingsActionTitle] cancelTitle:localizedCancelActionTitle withActionCompletion:^(int tappedActionIndex) { - if (block) - block(false); - //completion is called on the main thread - if (tappedActionIndex > -1) - [self presentAppSettings]; - }]; - - return; - } - - [self promptForPushNotificationsWithUserResponse:block]; -} - -+ (void)promptForPushNotificationsWithUserResponse:(OSUserResponseBlock)block { - - // return if the user has not granted privacy permissions - if ([OSPrivacyConsentController shouldLogMissingPrivacyConsentErrorWithMethodName:@"promptForPushNotificationsWithUserResponse:"]) - return; - - [OneSignal onesignalLog:ONE_S_LL_VERBOSE message:[NSString stringWithFormat:@"registerForPushNotifications Called:waitingForApnsResponse: %d", waitingForApnsResponse]]; - - self.currentPermissionState.hasPrompted = true; - - [self.osNotificationSettings promptForNotifications:block]; -} - -// This registers for a push token and prompts the user for notifiations permisions -// Will trigger didRegisterForRemoteNotificationsWithDeviceToken on the AppDelegate when APNs responses. -+ (void)registerForPushNotifications { - - // return if the user has not granted privacy permissions - if ([OSPrivacyConsentController shouldLogMissingPrivacyConsentErrorWithMethodName:@"registerForPushNotifications:"]) - return; - - [self promptForPushNotificationsWithUserResponse:nil]; -} - - -+ (OSPermissionSubscriptionState*)getPermissionSubscriptionState { - OSPermissionSubscriptionState* status = [OSPermissionSubscriptionState alloc]; - - status.subscriptionStatus = self.currentSubscriptionState; - status.permissionStatus = self.currentPermissionState; - status.emailSubscriptionStatus = self.currentEmailSubscriptionState; - status.smsSubscriptionStatus = self.currentSMSSubscriptionState; - - return status; -} - -// onOSPermissionChanged should only fire if something changed. -+ (void)addPermissionObserver:(NSObject*)observer { - [self.permissionStateChangesObserver addObserver:observer]; - - if ([self.currentPermissionState compare:self.lastPermissionState]) - [OSPermissionChangedInternalObserver fireChangesObserver:self.currentPermissionState]; -} -+ (void)removePermissionObserver:(NSObject*)observer { - [self.permissionStateChangesObserver removeObserver:observer]; -} - -// onOSSubscriptionChanged should only fire if something changed. -+ (void)addSubscriptionObserver:(NSObject*)observer { - [self.subscriptionStateChangesObserver addObserver:observer]; - - if ([self.currentSubscriptionState compare:self.lastSubscriptionState]) - [OSSubscriptionChangedInternalObserver fireChangesObserver:self.currentSubscriptionState]; -} - -+ (void)removeSubscriptionObserver:(NSObject*)observer { - [self.subscriptionStateChangesObserver removeObserver:observer]; -} - -+ (void)addEmailSubscriptionObserver:(NSObject*)observer { - [self.emailSubscriptionStateChangesObserver addObserver:observer]; - - if ([self.currentEmailSubscriptionState compare:self.lastEmailSubscriptionState]) - [OSEmailSubscriptionChangedInternalObserver fireChangesObserver:self.currentEmailSubscriptionState]; -} - -+ (void)removeEmailSubscriptionObserver:(NSObject*)observer { - [self.emailSubscriptionStateChangesObserver removeObserver:observer]; -} - -+ (void)addSMSSubscriptionObserver:(NSObject*)observer { - [self.smsSubscriptionStateChangesObserver addObserver:observer]; - - if ([self.currentSMSSubscriptionState compare:self.lastSMSSubscriptionState]) - [OSSMSSubscriptionChangedInternalObserver fireChangesObserver:self.currentSMSSubscriptionState]; -} - -+ (void)removeSMSSubscriptionObserver:(NSObject*)observer { - [self.smsSubscriptionStateChangesObserver removeObserver:observer]; -} - -+ (void)sendTagsWithJsonString:(NSString*)jsonString { - - // return if the user has not granted privacy permissions - if ([OSPrivacyConsentController shouldLogMissingPrivacyConsentErrorWithMethodName:@"sendTagsWithJsonString:"]) - return; - - NSError* jsonError; - - NSData* data = [jsonString dataUsingEncoding:NSUTF8StringEncoding]; - NSDictionary* keyValuePairs = [NSJSONSerialization JSONObjectWithData:data options:kNilOptions error:&jsonError]; - if (jsonError == nil) { - [self sendTags:keyValuePairs]; - } else { - [OneSignal onesignalLog:ONE_S_LL_WARN message:[NSString stringWithFormat: @"sendTags JSON Parse Error: %@", jsonError]]; - [OneSignal onesignalLog:ONE_S_LL_WARN message:[NSString stringWithFormat: @"sendTags JSON Parse Error, JSON: %@", jsonString]]; - } -} - -+ (void)sendTags:(NSDictionary*)keyValuePair { - - // return if the user has not granted privacy permissions - if ([OSPrivacyConsentController shouldLogMissingPrivacyConsentErrorWithMethodName:@"sendTags:"]) - return; - - [self sendTags:keyValuePair onSuccess:nil onFailure:nil]; -} - -+ (void)sendTags:(NSDictionary*)keyValuePair onSuccess:(OSResultSuccessBlock)successBlock onFailure:(OSFailureBlock)failureBlock { - - // return if the user has not granted privacy permissions - if ([OSPrivacyConsentController shouldLogMissingPrivacyConsentErrorWithMethodName:@"sendTags:onSuccess:onFailure:"]) { - if (failureBlock) { - NSError *error = [NSError errorWithDomain:@"com.onesignal.tags" code:0 userInfo:@{@"error" : @"Your application has called sendTags:onSuccess:onFailure: before the user granted privacy permission. Please call `consentGranted(bool)` in order to provide user privacy consent"}]; - failureBlock(error); - } - return; - } - - - if (![NSJSONSerialization isValidJSONObject:keyValuePair]) { - NSString *errorMessage = [NSString stringWithFormat:@"sendTags JSON Invalid: The following key/value pairs you attempted to send as tags are not valid JSON: %@", keyValuePair]; - [OneSignal onesignalLog:ONE_S_LL_WARN message:errorMessage]; - if (failureBlock) { - NSError *error = [NSError errorWithDomain:@"com.onesignal.tags" code:0 userInfo:@{@"error" : errorMessage}]; - failureBlock(error); - } - return; - } - - for (NSString *key in [keyValuePair allKeys]) { - if ([keyValuePair[key] isKindOfClass:[NSDictionary class]]) { - NSString *errorMessage = @"sendTags Tags JSON must not contain nested objects"; - [OneSignal onesignalLog:ONE_S_LL_WARN message:errorMessage]; - if (failureBlock) { - NSError *error = [NSError errorWithDomain:@"com.onesignal.tags" code:0 userInfo:@{@"error" : errorMessage}]; - failureBlock(error); - } - return; - } - } - - if (!self.playerTags.tagsToSend) { - [self.playerTags setTagsToSend: [keyValuePair mutableCopy]]; - } else { - [self.playerTags addTagsToSend:keyValuePair]; - } - - if (successBlock || failureBlock) { - if (!pendingSendTagCallbacks) - pendingSendTagCallbacks = [[NSMutableArray alloc] init]; - OSPendingCallbacks *pendingCallbacks = [OSPendingCallbacks new]; - pendingCallbacks.successBlock = successBlock; - pendingCallbacks.failureBlock = failureBlock; - [pendingSendTagCallbacks addObject:pendingCallbacks]; - } - - [NSObject cancelPreviousPerformRequestsWithTarget:self selector:@selector(sendTagsToServer) object:nil]; - - // Can't send tags yet as there isn't a player_id. - // tagsToSend will be sent with the POST create player call later in this case. - if (self.currentSubscriptionState.userId) - [OneSignalHelper performSelector:@selector(sendTagsToServer) onMainThreadOnObject:self withObject:nil afterDelay:5]; -} - -+ (void)sendTagsOnBackground { - if (!self.playerTags.tagsToSend || self.playerTags.tagsToSend.count <= 0 || !self.currentSubscriptionState.userId) - return; - - [NSObject cancelPreviousPerformRequestsWithTarget:self selector:@selector(sendTagsToServer) object:nil]; - [OneSignalHelper dispatch_async_on_main_queue:^{ - [self sendTagsToServer]; - }]; -} - -// Called only with a delay to batch network calls. -+ (void)sendTagsToServer { - - // return if the user has not granted privacy permissions - if ([OSPrivacyConsentController shouldLogMissingPrivacyConsentErrorWithMethodName:nil]) - return; - - if (!self.playerTags.tagsToSend) - return; - - [self.playerTags saveTagsToUserDefaults]; - NSDictionary* nowSendingTags = self.playerTags.tagsToSend; - [self.playerTags setTagsToSend: nil]; - - NSArray* nowProcessingCallbacks = pendingSendTagCallbacks; - pendingSendTagCallbacks = nil; - [OneSignal.stateSynchronizer sendTagsWithAppId:self.appId sendingTags:nowSendingTags networkType:[OneSignalHelper getNetType] processingCallbacks:nowProcessingCallbacks]; -} - -+ (void)sendTag:(NSString*)key value:(NSString*)value { - - // return if the user has not granted privacy permissions - if ([OSPrivacyConsentController shouldLogMissingPrivacyConsentErrorWithMethodName:@"sendTag:value:"]) - return; - - [self sendTag:key value:value onSuccess:nil onFailure:nil]; -} - -+ (void)sendTag:(NSString*)key value:(NSString*)value onSuccess:(OSResultSuccessBlock)successBlock onFailure:(OSFailureBlock)failureBlock { - - // return if the user has not granted privacy permissions - if ([OSPrivacyConsentController shouldLogMissingPrivacyConsentErrorWithMethodName:@"sendTag:value:onSuccess:onFailure:"]) - return; - - [self sendTags:[NSDictionary dictionaryWithObjectsAndKeys: value, key, nil] onSuccess:successBlock onFailure:failureBlock]; -} - -+ (void)getTags:(OSResultSuccessBlock)successBlock onFailure:(OSFailureBlock)failureBlock { - - // return if the user has not granted privacy permissions - if ([OSPrivacyConsentController shouldLogMissingPrivacyConsentErrorWithMethodName:@"getTags:onFailure:"]) - return; - - if (!self.currentSubscriptionState.userId) { - pendingGetTagsSuccessBlock = successBlock; - pendingGetTagsFailureBlock = failureBlock; - return; - } - - [OneSignalClient.sharedClient executeRequest:[OSRequestGetTags withUserId:self.currentSubscriptionState.userId appId:self.appId] onSuccess:^(NSDictionary *result) { - [self.playerTags addTags:[result objectForKey:@"tags"]]; - successBlock([result objectForKey:@"tags"]); - } onFailure:failureBlock]; - -} - -+ (void)getTags:(OSResultSuccessBlock)successBlock { - - // return if the user has not granted privacy permissions - if ([OSPrivacyConsentController shouldLogMissingPrivacyConsentErrorWithMethodName:@"getTags:"]) - return; - - [self getTags:successBlock onFailure:nil]; -} - - -+ (void)deleteTag:(NSString*)key onSuccess:(OSResultSuccessBlock)successBlock onFailure:(OSFailureBlock)failureBlock { - - // return if the user has not granted privacy permissions - if ([OSPrivacyConsentController shouldLogMissingPrivacyConsentErrorWithMethodName:@"deleteTag:onSuccess:onFailure:"]) - return; - - [self deleteTags:@[key] onSuccess:successBlock onFailure:failureBlock]; -} - -+ (void)deleteTag:(NSString*)key { - - // return if the user has not granted privacy permissions - if ([OSPrivacyConsentController shouldLogMissingPrivacyConsentErrorWithMethodName:@"deleteTag:"]) - return; - - [self deleteTags:@[key] onSuccess:nil onFailure:nil]; -} - -+ (void)deleteTags:(NSArray*)keys { - - // return if the user has not granted privacy permissions - if ([OSPrivacyConsentController shouldLogMissingPrivacyConsentErrorWithMethodName:@"deleteTags:"]) - return; - - [self deleteTags:keys onSuccess:nil onFailure:nil]; -} - -+ (void)deleteTagsWithJsonString:(NSString*)jsonString { - - // return if the user has not granted privacy permissions - if ([OSPrivacyConsentController shouldLogMissingPrivacyConsentErrorWithMethodName:@"deleteTagsWithJsonString:"]) - return; - - NSError* jsonError; - - NSData* data = [jsonString dataUsingEncoding:NSUTF8StringEncoding]; - NSArray* keys = [NSJSONSerialization JSONObjectWithData:data options:NSJSONReadingMutableContainers error:&jsonError]; - if (jsonError == nil) - [self deleteTags:keys]; - else { - [OneSignal onesignalLog:ONE_S_LL_WARN message:[NSString stringWithFormat: @"deleteTags JSON Parse Error: %@", jsonError]]; - [OneSignal onesignalLog:ONE_S_LL_WARN message:[NSString stringWithFormat: @"deleteTags JSON Parse Error, JSON: %@", jsonString]]; - } -} - -+ (void)deleteTags:(NSArray*)keys onSuccess:(OSResultSuccessBlock)successBlock onFailure:(OSFailureBlock)failureBlock { - NSMutableDictionary* tags = [[NSMutableDictionary alloc] init]; - for (NSString* key in keys) { - if (!self.playerTags.tagsToSend || !self.playerTags.tagsToSend[key]) { - tags[key] = @""; - } - } - [self.playerTags deleteTags:keys]; - [self sendTags:tags onSuccess:successBlock onFailure:failureBlock]; -} - - -+ (void)postNotification:(NSDictionary*)jsonData { - - // return if the user has not granted privacy permissions - if ([OSPrivacyConsentController shouldLogMissingPrivacyConsentErrorWithMethodName:@"postNotification:"]) - return; - - [self postNotification:jsonData onSuccess:nil onFailure:nil]; -} - -+ (void)postNotification:(NSDictionary*)jsonData onSuccess:(OSResultSuccessBlock)successBlock onFailure:(OSFailureBlock)failureBlock { - - // return if the user has not granted privacy permissions - if ([OSPrivacyConsentController shouldLogMissingPrivacyConsentErrorWithMethodName:@"postNotification:onSuccess:onFailure:"]) - return; - - NSMutableDictionary *json = [jsonData mutableCopy]; - - [OneSignal convertDatesToISO8061Strings:json]; //convert any dates to NSString's - - [OneSignalClient.sharedClient executeRequest:[OSRequestPostNotification withAppId:self.appId withJson:json] onSuccess:^(NSDictionary *result) { - dispatch_async(dispatch_get_main_queue(), ^{ - NSData* jsonData = [NSJSONSerialization dataWithJSONObject:result options:0 error:nil]; - NSString* jsonResultsString = [[NSString alloc] initWithData:jsonData encoding:NSUTF8StringEncoding]; - - [OneSignal onesignalLog:ONE_S_LL_DEBUG message:[NSString stringWithFormat: @"HTTP create notification success %@", jsonResultsString]]; - if (successBlock) - successBlock(result); - }); - } onFailure:^(NSError *error) { - dispatch_async(dispatch_get_main_queue(), ^{ - [OneSignal onesignalLog:ONE_S_LL_ERROR message: @"Create notification failed"]; - [OneSignal onesignalLog:ONE_S_LL_INFO message:[NSString stringWithFormat: @"%@", error]]; - if (failureBlock) - failureBlock(error); - }); - }]; -} - -+ (void)postNotificationWithJsonString:(NSString*)jsonString onSuccess:(OSResultSuccessBlock)successBlock onFailure:(OSFailureBlock)failureBlock { - - // return if the user has not granted privacy permissions - if ([OSPrivacyConsentController shouldLogMissingPrivacyConsentErrorWithMethodName:@"postNotificationWithJsonString:onSuccess:onFailure:"]) - return; - - NSError* jsonError; - - NSData* data = [jsonString dataUsingEncoding:NSUTF8StringEncoding]; - NSDictionary* jsonData = [NSJSONSerialization JSONObjectWithData:data options:kNilOptions error:&jsonError]; - if (jsonError == nil && jsonData != nil) - [self postNotification:jsonData onSuccess:successBlock onFailure:failureBlock]; - else { - [OneSignal onesignalLog:ONE_S_LL_WARN message:[NSString stringWithFormat: @"postNotification JSON Parse Error: %@", jsonError]]; - [OneSignal onesignalLog:ONE_S_LL_WARN message:[NSString stringWithFormat: @"postNotification JSON Parse Error, JSON: %@", jsonString]]; - } -} - -+ (void)convertDatesToISO8061Strings:(NSMutableDictionary *)dictionary { - NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init]; - NSLocale *enUSPOSIXLocale = [NSLocale localeWithLocaleIdentifier:@"en_US_POSIX"]; - [dateFormatter setLocale:enUSPOSIXLocale]; - [dateFormatter setDateFormat:@"yyyy-MM-dd'T'HH:mm:ssZZZZZ"]; - - for (NSString *key in dictionary.allKeys) { - id value = dictionary[key]; - - if ([value isKindOfClass:[NSDate class]]) - dictionary[key] = [dateFormatter stringFromDate:(NSDate *)value]; - } -} - -+ (NSString*)parseNSErrorAsJsonString:(NSError*)error { - NSString* jsonResponse; - - if (error.userInfo && error.userInfo[@"returned"]) { - @try { - NSData* jsonData = [NSJSONSerialization dataWithJSONObject:error.userInfo[@"returned"] options:0 error:nil]; - jsonResponse = [[NSString alloc] initWithData:jsonData encoding:NSUTF8StringEncoding]; - } @catch(NSException* e) { - [OneSignal onesignalLog:ONE_S_LL_ERROR message:[NSString stringWithFormat:@"%@", e]]; - [OneSignal onesignalLog:ONE_S_LL_ERROR message:[NSString stringWithFormat:@"%@", [NSThread callStackSymbols]]]; - jsonResponse = @"{\"error\": \"Unknown error parsing error response.\"}"; - } - } - else - jsonResponse = @"{\"error\": \"HTTP no response error\"}"; - - return jsonResponse; -} - -+ (void)enableInAppLaunchURL:(BOOL)enable { - [OneSignalUserDefaults.initStandard saveBoolForKey:OSUD_NOTIFICATION_OPEN_LAUNCH_URL withValue:enable]; -} - -+ (void)disablePush:(BOOL)disable { - // return if the user has not granted privacy permissions - if ([OSPrivacyConsentController shouldLogMissingPrivacyConsentErrorWithMethodName:@"disablePush:"]) - return; - - NSString* value = nil; - if (disable) - value = @"no"; - - [OneSignalUserDefaults.initStandard saveObjectForKey:OSUD_USER_SUBSCRIPTION_TO withValue:value]; - - shouldDelaySubscriptionUpdate = true; - - self.currentSubscriptionState.isPushDisabled = disable; - - if (appId) - [OneSignal sendNotificationTypesUpdate]; -} - -+ (void)setLocationShared:(BOOL)enable { - let remoteController = [self getRemoteParamController]; - - // Already set by remote params - if ([remoteController hasLocationKey]) - return; - - [self startLocationSharedWithFlag:enable]; -} - -+ (void)startLocationSharedWithFlag:(BOOL)enable { - [OneSignal onesignalLog:ONE_S_LL_VERBOSE message:[NSString stringWithFormat:@"startLocationSharedWithFlag called with status: %d", (int) enable]]; - - let remoteController = [self getRemoteParamController]; - [remoteController saveLocationShared:enable]; - - if (!enable) { - [OneSignal onesignalLog:ONE_S_LL_VERBOSE message:@"startLocationSharedWithFlag set false, clearing last location!"]; - [OneSignalLocation clearLastLocation]; - } -} - -+ (void)promptLocation { - [self promptLocationFallbackToSettings:false completionHandler:nil]; -} - -+ (void)promptLocationFallbackToSettings:(BOOL)fallback completionHandler:(void (^)(PromptActionResult result))completionHandler { - // return if the user has not granted privacy permissions - if ([OSPrivacyConsentController shouldLogMissingPrivacyConsentErrorWithMethodName:@"promptLocation"]) - return; - - [OneSignalLocation getLocation:true fallbackToSettings:fallback withCompletionHandler:completionHandler]; -} - -+ (BOOL)isLocationShared { - return [[self getRemoteParamController] isLocationShared]; -} - -+ (void)handleDidFailRegisterForRemoteNotification:(NSError*)err { - waitingForApnsResponse = false; - - if (err.code == 3000) { - [OneSignal setSubscriptionErrorStatus:ERROR_PUSH_CAPABLILITY_DISABLED]; - [OneSignal onesignalLog:ONE_S_LL_ERROR message:@"ERROR! 'Push Notifications' capability missing! Add the capability in Xcode under 'Target' -> '' -> 'Signing & Capabilities' then click the '+ Capability' button."]; - } - else if (err.code == 3010) { - [OneSignal setSubscriptionErrorStatus:ERROR_PUSH_SIMULATOR_NOT_SUPPORTED]; - [OneSignal onesignalLog:ONE_S_LL_ERROR message:[NSString stringWithFormat:@"Error! iOS Simulator does not support push! Please test on a real iOS device. Error: %@", err]]; - } - else { - [OneSignal setSubscriptionErrorStatus:ERROR_PUSH_UNKNOWN_APNS_ERROR]; - [OneSignal onesignalLog:ONE_S_LL_ERROR message:[NSString stringWithFormat:@"Error registering for Apple push notifications! Error: %@", err]]; - } -} - -+ (void)updateDeviceToken:(NSString*)deviceToken { - // return if the user has not granted privacy permissions - if ([OSPrivacyConsentController shouldLogMissingPrivacyConsentErrorWithMethodName:@"updateDeviceToken:onSuccess:onFailure:"]) - return; - - [OneSignal onesignalLog:ONE_S_LL_VERBOSE message:@"updateDeviceToken:onSuccess:onFailure:"]; - - let isPushTokenDifferent = ![deviceToken isEqualToString:self.currentSubscriptionState.pushToken]; - self.currentSubscriptionState.pushToken = deviceToken; - - if ([self shouldRegisterNow]) - [self registerUser]; - else if (isPushTokenDifferent) - [self playerPutForPushTokenAndNotificationTypes]; -} - -+ (void)playerPutForPushTokenAndNotificationTypes { - [OneSignal onesignalLog:ONE_S_LL_VERBOSE message:@"Calling OneSignal PUT to updated pushToken and/or notificationTypes!"]; - - let request = [OSRequestUpdateDeviceToken - withUserId:self.currentSubscriptionState.userId - appId:self.appId - deviceToken:self.currentSubscriptionState.pushToken - notificationTypes:@([self getNotificationTypes]) - externalIdAuthToken:[self mExternalIdAuthToken] - ]; - [OneSignalClient.sharedClient executeRequest:request onSuccess:nil onFailure:nil]; -} - -// Set to yes whenever a high priority registration fails ... need to make the next one a high priority to disregard the timer delay -bool immediateOnSessionRetry = NO; -+ (void)setImmediateOnSessionRetry:(BOOL)retry { - immediateOnSessionRetry = retry; -} - -+ (BOOL)isImmediatePlayerCreateOrOnSession { - return !self.currentSubscriptionState.userId || immediateOnSessionRetry; -} - -// True if we asked Apple for an APNS token the AppDelegate callback has not fired yet -static BOOL waitingForOneSReg = false; -// Esnure we call on_session only once while the app is infocus. -static BOOL isOnSessionSuccessfulForCurrentState = false; -+ (void)setIsOnSessionSuccessfulForCurrentState:(BOOL)value { - isOnSessionSuccessfulForCurrentState = value; -} - -static BOOL _registerUserFinished = false; -+ (BOOL)isRegisterUserFinished { - return _registerUserFinished || isOnSessionSuccessfulForCurrentState; -} - -static BOOL _registerUserSuccessful = false; -+ (BOOL)isRegisterUserSuccessful { - return _registerUserSuccessful || isOnSessionSuccessfulForCurrentState; -} - -static BOOL _trackedColdRestart = false; -+ (BOOL)shouldRegisterNow { - // return if the user has not granted privacy permissions - if ([OSPrivacyConsentController shouldLogMissingPrivacyConsentErrorWithMethodName:nil]) - return false; - - // Don't make a 2nd on_session if have in inflight one - [OneSignal onesignalLog:ONE_S_LL_VERBOSE message:[NSString stringWithFormat:@"shouldRegisterNow:waitingForOneSReg: %d", waitingForOneSReg]]; - if (waitingForOneSReg) - return false; - - [OneSignal onesignalLog:ONE_S_LL_VERBOSE message:[NSString stringWithFormat:@"shouldRegisterNow:isImmediatePlayerCreateOrOnSession: %d", [self isImmediatePlayerCreateOrOnSession]]]; - if ([self isImmediatePlayerCreateOrOnSession]) - return true; - - [OneSignal onesignalLog:ONE_S_LL_VERBOSE message:[NSString stringWithFormat:@"shouldRegisterNow:isOnSessionSuccessfulForCurrentState: %d", isOnSessionSuccessfulForCurrentState]]; - if (isOnSessionSuccessfulForCurrentState) - return false; - - NSTimeInterval now = [[NSDate date] timeIntervalSince1970]; - NSTimeInterval lastTimeClosed = [OneSignalUserDefaults.initStandard getSavedDoubleForKey:OSUD_APP_LAST_CLOSED_TIME defaultValue:0]; - - if (lastTimeClosed == 0) { - [OneSignal onesignalLog:ONE_S_LL_DEBUG message:@"shouldRegisterNow: lastTimeClosed: default."]; - return true; - } - - [OneSignal onesignalLog:ONE_S_LL_DEBUG message:[NSString stringWithFormat:@"shouldRegisterNow: lastTimeClosed: %f", lastTimeClosed]]; - - // Make sure last time we closed app was more than 30 secs ago - const int minTimeThreshold = 30; - NSTimeInterval delta = now - lastTimeClosed; - - return delta >= minTimeThreshold; -} - -+ (void)trackColdRestart { - [OneSignalLog onesignalLog:ONE_S_LL_VERBOSE message:@"trackColdRestart"]; - // Set to true even if it doesn't pass the sample check - _trackedColdRestart = true; - // Sample /track calls to avoid hitting our endpoint too hard - int randomSample = arc4random_uniform(100); - if (randomSample == 99) { - NSString *osUsageData = [NSString stringWithFormat:@"kind=sdk, version=%@, source=iOS_SDK, name=cold_restart, lockScreenApp=false", ONESIGNAL_VERSION]; - [[OneSignalClient sharedClient] executeRequest:[OSRequestTrackV1 trackUsageData:osUsageData appId:appId] onSuccess:^(NSDictionary *result) { - [OneSignalLog onesignalLog:ONE_S_LL_VERBOSE message:@"trackColdRestart: successfully tracked cold restart"]; - } onFailure:^(NSError *error) { - [OneSignalLog onesignalLog:ONE_S_LL_ERROR message:[NSString stringWithFormat:@"trackColdRestart: Failed to track cold restart: %@", error]]; - }]; - } -} - -+ (void)registerUserAfterDelay { - [OneSignal onesignalLog:ONE_S_LL_VERBOSE message:@"registerUserAfterDelay"]; - [NSObject cancelPreviousPerformRequestsWithTarget:self selector:@selector(registerUser) object:nil]; - [OneSignalHelper performSelector:@selector(registerUser) onMainThreadOnObject:self withObject:nil afterDelay:reattemptRegistrationInterval]; -} - -+ (void)registerUser { - // return if the user has not granted privacy permissions - if ([OSPrivacyConsentController shouldLogMissingPrivacyConsentErrorWithMethodName:nil]) - return; - - if ([self shouldRegisterUserAfterDelay]) { - [self registerUserAfterDelay]; - return; - } - - [self registerUserNow]; -} - -+(void)registerUserNow { - [OneSignal onesignalLog:ONE_S_LL_VERBOSE message:@"registerUserNow"]; - - // Run on the main queue as it is possible for this to be called from multiple queues. - // Also some of the code in the method is not thread safe such as _outcomeEventsController. - [OneSignalHelper dispatch_async_on_main_queue:^{ - [self registerUserInternal]; - }]; -} - -// We should delay registration if we are waiting on APNS -// But if APNS hasn't responded within 30 seconds (maxApnsWait), -// we should continue and register the user. -+ (BOOL)shouldRegisterUserAfterDelay { - [OneSignal onesignalLog:ONE_S_LL_VERBOSE message:[NSString stringWithFormat:@"registerUser:waitingForApnsResponse: %d", waitingForApnsResponse]]; - [OneSignal onesignalLog:ONE_S_LL_VERBOSE message:[NSString stringWithFormat:@"registerUser:initializationTime: %@", initializationTime]]; - - // If there isn't an initializationTime yet then the SDK hasn't finished initializing so we should delay - if (!initializationTime) - return true; - - if (!waitingForApnsResponse) - return false; - - return [[NSDate date] timeIntervalSinceDate:initializationTime] < maxApnsWait; -} - -+ (OSUserState *)createUserState { - let userState = [OSUserState new]; - userState.appId = appId; - userState.deviceOs = [[UIDevice currentDevice] systemVersion]; - userState.timezone = [NSNumber numberWithInt:(int)[[NSTimeZone localTimeZone] secondsFromGMT]]; - userState.timezoneId = [[NSTimeZone localTimeZone] name]; - userState.sdk = ONESIGNAL_VERSION; - - // should be set to true even before the API request is finished - performedOnSessionRequest = true; - - if (pendingExternalUserId && ![self.existingPushExternalUserId isEqualToString:pendingExternalUserId]) - userState.externalUserId = pendingExternalUserId; - - if (pendingExternalUserIdHashToken) - userState.externalUserIdHash = pendingExternalUserIdHashToken; - else if ([self mEmailAuthToken]) - userState.externalUserIdHash = [self mExternalIdAuthToken]; - - let deviceModel = [OneSignalHelper getDeviceVariant]; - if (deviceModel) - userState.deviceModel = deviceModel; - - let infoDictionary = [[NSBundle mainBundle] infoDictionary]; - NSString *version = infoDictionary[@"CFBundleShortVersionString"]; - if (version) - userState.gameVersion = version; - - if ([OneSignalJailbreakDetection isJailbroken]) - userState.isRooted = YES; - - userState.netType = [OneSignalHelper getNetType]; - - if (!self.currentSubscriptionState.userId) { - userState.sdkType = mSDKType; - userState.iOSBundle = [[NSBundle mainBundle] bundleIdentifier]; - } - - userState.language = [languageContext language]; - - let notificationTypes = [self getNotificationTypes]; - mLastNotificationTypes = notificationTypes; - userState.notificationTypes = [NSNumber numberWithInt:notificationTypes]; - - let CTTelephonyNetworkInfoClass = NSClassFromString(@"CTTelephonyNetworkInfo"); - if (CTTelephonyNetworkInfoClass) { - id instance = [[CTTelephonyNetworkInfoClass alloc] init]; - let carrierName = (NSString *)[[instance valueForKey:@"subscriberCellularProvider"] valueForKey:@"carrierName"]; - - if (carrierName) - userState.carrier = carrierName; - } - - #if TARGET_OS_SIMULATOR - userState.testType = [NSNumber numberWithInt:(int)UIApplicationReleaseDev]; - #else - let releaseMode = [OneSignalMobileProvision releaseMode]; - if (releaseMode == UIApplicationReleaseDev || releaseMode == UIApplicationReleaseAdHoc || releaseMode == UIApplicationReleaseWildcard) - userState.testType = [NSNumber numberWithInt:(int)releaseMode]; - #endif - - if (self.playerTags.tagsToSend) - userState.tags = self.playerTags.tagsToSend; - - if ([self isLocationShared] && [OneSignalLocation lastLocation]) { - [OneSignal onesignalLog:ONE_S_LL_VERBOSE message:@"Attaching device location to 'on_session' request payload"]; - let locationState = [OSLocationState new]; - locationState.latitude = [NSNumber numberWithDouble:[OneSignalLocation lastLocation]->cords.latitude]; - locationState.longitude = [NSNumber numberWithDouble:[OneSignalLocation lastLocation]->cords.longitude]; - locationState.verticalAccuracy = [NSNumber numberWithDouble:[OneSignalLocation lastLocation]->verticalAccuracy]; - locationState.accuracy = [NSNumber numberWithDouble:[OneSignalLocation lastLocation]->horizontalAccuracy]; - userState.locationState = locationState; - } else - [OneSignal onesignalLog:ONE_S_LL_VERBOSE message:@"Not sending location with 'on_session' request payload, setLocationShared is false or lastLocation is null"]; - - return userState; -} - -+ (void)registerUserInternal { - [OneSignal onesignalLog:ONE_S_LL_VERBOSE message:@"registerUserInternal"]; - _registerUserFinished = false; - _registerUserSuccessful = false; - - // return if the user has not granted privacy permissions - if ([OSPrivacyConsentController shouldLogMissingPrivacyConsentErrorWithMethodName:nil]) - return; - - // Make sure we only call create or on_session once per open of the app. - if (![self shouldRegisterNow]) - return; - - [_outcomeEventsController clearOutcomes]; - [[OSSessionManager sharedSessionManager] restartSessionIfNeeded:_appEntryState]; - - [OneSignalTrackFirebaseAnalytics trackInfluenceOpenEvent]; - - waitingForOneSReg = true; - [NSObject cancelPreviousPerformRequestsWithTarget:self selector:@selector(registerUser) object:nil]; - - NSArray* nowProcessingCallbacks; - let userState = [self createUserState]; - if (userState.tags) { - [self.playerTags addTags:userState.tags]; - [self.playerTags saveTagsToUserDefaults]; - [self.playerTags setTagsToSend: nil]; - - nowProcessingCallbacks = pendingSendTagCallbacks; - pendingSendTagCallbacks = nil; - } - - // Clear last location after attaching data to user state or not - [OneSignalLocation clearLastLocation]; - sessionLaunchTime = [NSDate date]; - - [OneSignal onesignalLog:ONE_S_LL_VERBOSE message:@"Calling OneSignal create/on_session"]; - [self.stateSynchronizer registerUserWithState:userState withSuccess:^(NSDictionary *results) { - immediateOnSessionRetry = NO; - waitingForOneSReg = false; - isOnSessionSuccessfulForCurrentState = true; - pendingExternalUserId = nil; - pendingExternalUserIdHashToken = nil; - - //update push player id - if (results.count > 0 && results[@"push"][@"id"]) { - if (delayedEmailParameters) { - // Call to setEmail: was delayed because the push player_id did not exist yet - [self setEmail:delayedEmailParameters.email withEmailAuthHashToken:delayedEmailParameters.authToken withSuccess:delayedEmailParameters.successBlock withFailure:delayedEmailParameters.failureBlock]; - delayedEmailParameters = nil; - } - - if (delayedExternalIdParameters) { - // Call to setExternalUserId: was delayed because the push player_id did not exist yet - [self setExternalUserId:delayedExternalIdParameters.externalId withExternalIdAuthHashToken:delayedExternalIdParameters.authToken withSuccess:delayedExternalIdParameters.successBlock withFailure:delayedExternalIdParameters.failureBlock]; - delayedExternalIdParameters = nil; - } - - if (_delayedSMSParameters) { - // Call to setSMSNumber: was delayed because the push player_id did not exist yet - [self setSMSNumber:_delayedSMSParameters.smsNumber withSMSAuthHashToken:_delayedSMSParameters.authToken withSuccess:_delayedSMSParameters.successBlock withFailure:_delayedSMSParameters.failureBlock]; - _delayedSMSParameters = nil; - } - - if (delayedLanguageParameters) { - // Call to setLanguage: was delayed because the push player_id did not exist yet - [self setLanguage:delayedLanguageParameters.language withSuccess:delayedLanguageParameters.successBlock withFailure:delayedLanguageParameters.failureBlock]; - delayedLanguageParameters = nil; - } - - if (nowProcessingCallbacks) { - for (OSPendingCallbacks *callbackSet in nowProcessingCallbacks) { - if (callbackSet.successBlock) - callbackSet.successBlock(userState.tags); - } - } - - if (self.playerTags.tagsToSend) { - [self performSelector:@selector(sendTagsToServer) withObject:nil afterDelay:5]; - } - - // Try to send location - [OneSignalLocation sendLocation]; - - if (emailToSet) { - [OneSignal setEmail:emailToSet]; - emailToSet = nil; - } - - [self sendNotificationTypesUpdate]; - - if (pendingGetTagsSuccessBlock) { - [OneSignal getTags:pendingGetTagsSuccessBlock onFailure:pendingGetTagsFailureBlock]; - pendingGetTagsSuccessBlock = nil; - pendingGetTagsFailureBlock = nil; - } - [self executePendingLiveActivityUpdates]; - } - - if (results[@"push"][@"in_app_messages"]) { - [self receivedInAppMessageJson:results[@"push"][@"in_app_messages"]]; - } - } onFailure:^(NSDictionary *errors) { - waitingForOneSReg = false; - - // If the failed registration is priority, force the next one to be a high priority - immediateOnSessionRetry = YES; - - let error = (NSError *)(errors[@"push"] ?: errors[@"email"]); - - if (nowProcessingCallbacks) { - for (OSPendingCallbacks *callbackSet in nowProcessingCallbacks) { - if (callbackSet.failureBlock) - callbackSet.failureBlock(error); - } - } - [OSMessagingController.sharedInstance updateInAppMessagesFromCache]; - }]; -} - -+ (void)receivedInAppMessageJson:(NSArray *)messagesJson { - let messages = [NSMutableArray new]; - - if (messagesJson) { - for (NSDictionary *messageJson in messagesJson) { - let message = [OSInAppMessageInternal instanceWithJson:messageJson]; - if (message) { - [messages addObject:message]; - } - } - - [OSMessagingController.sharedInstance updateInAppMessagesFromOnSession:messages]; - return; - } - - // Default is using cached IAMs in the messaging controller - [OSMessagingController.sharedInstance updateInAppMessagesFromCache]; -} - -+ (NSString*)getUsableDeviceToken { - if (mSubscriptionStatus < -1) - return NULL; - - return self.currentPermissionState.accepted ? self.currentSubscriptionState.pushToken : NULL; -} - -// Updates the server with the new user's notification setting or subscription status changes -+ (BOOL)sendNotificationTypesUpdate { - - // return if the user has not granted privacy permissions - if ([OSPrivacyConsentController shouldLogMissingPrivacyConsentErrorWithMethodName:nil]) - return false; - - // User changed notification settings for the app. - if ([self getNotificationTypes] != -1 && self.currentSubscriptionState.userId && mLastNotificationTypes != [self getNotificationTypes]) { - if (!self.currentSubscriptionState.pushToken) { - if ([self registerForAPNsToken]) - return true; - } - - mLastNotificationTypes = [self getNotificationTypes]; - - //delays observer update until the OneSignal server is notified - shouldDelaySubscriptionUpdate = true; - - [OneSignalClient.sharedClient executeRequest:[OSRequestUpdateNotificationTypes withUserId:self.currentSubscriptionState.userId appId:self.appId notificationTypes:@([self getNotificationTypes])] onSuccess:^(NSDictionary *result) { - - shouldDelaySubscriptionUpdate = false; - - if (self.currentSubscriptionState.delayedObserverUpdate) - [self.currentSubscriptionState setAccepted:[self getNotificationTypes] > 0]; - - } onFailure:nil]; - - return true; - } - - return false; -} - -// In-App Messaging Public Methods -+ (void)pauseInAppMessages:(BOOL)pause { - [OSMessagingController.sharedInstance setInAppMessagingPaused:pause]; -} - -+ (BOOL)isInAppMessagingPaused { - return [OSMessagingController.sharedInstance isInAppMessagingPaused]; -} - -+ (void)sendPurchases:(NSArray*)purchases { - // return if the user has not granted privacy permissions - if ([OSPrivacyConsentController shouldLogMissingPrivacyConsentErrorWithMethodName:nil]) - return; - - [OneSignal.stateSynchronizer sendPurchases:purchases appId:self.appId]; -} - -static NSString *_lastAppActiveMessageId; -+ (void)setLastAppActiveMessageId:(NSString*)value { _lastAppActiveMessageId = value; } - -static NSString *_lastnonActiveMessageId; -+ (void)setLastnonActiveMessageId:(NSString*)value { _lastnonActiveMessageId = value; } - -// Entry point for the following: -// - 1. (iOS all) - Opening notifications -// - 2. Notification received -// - 2A. iOS 9 - Notification received while app is in focus. -// - 2B. iOS 10 - Notification received/displayed while app is in focus. -// isActive is not always true for when the application is on foreground, we need differentiation -// between foreground and isActive -+ (void)notificationReceived:(NSDictionary*)messageDict wasOpened:(BOOL)opened { - if ([OSPrivacyConsentController shouldLogMissingPrivacyConsentErrorWithMethodName:nil]) - return; - - if (!appId) - return; - - // This method should not continue to be executed for non-OS push notifications - if (![OneSignalHelper isOneSignalPayload:messageDict]) - return; - - [OneSignal onesignalLog:ONE_S_LL_VERBOSE message:[NSString stringWithFormat:@"notificationReceived called! opened: %@", opened ? @"YES" : @"NO"]]; - - NSDictionary* customDict = [messageDict objectForKey:@"os_data"] ?: [messageDict objectForKey:@"custom"]; - - // Should be called first, other methods relay on this global state below. - [OneSignalHelper lastMessageReceived:messageDict]; - - BOOL isPreview = [[OSNotification parseWithApns:messageDict] additionalData][ONESIGNAL_IAM_PREVIEW] != nil; - - if (opened) { - // Prevent duplicate calls - let newId = [self checkForProcessedDups:customDict lastMessageId:_lastnonActiveMessageId]; - if ([@"dup" isEqualToString:newId]) { - [OneSignal onesignalLog:ONE_S_LL_VERBOSE message:@"Duplicate notif received. Not calling opened handler."]; - return; - } - if (newId) - _lastnonActiveMessageId = newId; - //app was in background / not running and opened due to a tap on a notification or an action check what type - OSNotificationActionType type = OSNotificationActionTypeOpened; - - if (messageDict[@"custom"][@"a"][@"actionSelected"] || messageDict[@"actionSelected"]) - type = OSNotificationActionTypeActionTaken; - - // Call Action Block - [OneSignal handleNotificationOpened:messageDict actionType:type]; - } else if (isPreview && [OneSignalHelper isIOSVersionGreaterThanOrEqual:@"10.0"]) { - let notification = [OSNotification parseWithApns:messageDict]; - [OneSignalHelper handleIAMPreview:notification]; - } -} - -+ (NSString*)checkForProcessedDups:(NSDictionary*)customDict lastMessageId:(NSString*)lastMessageId { - if (customDict && customDict[@"i"]) { - NSString* currentNotificationId = customDict[@"i"]; - if ([currentNotificationId isEqualToString:lastMessageId]) - return @"dup"; - return customDict[@"i"]; - } - return nil; -} - -+ (void)handleWillPresentNotificationInForegroundWithPayload:(NSDictionary *)payload withCompletion:(OSNotificationDisplayResponse)completion { - // check to make sure the app is in focus and it's a OneSignal notification - if (![OneSignalHelper isOneSignalPayload:payload] - || UIApplication.sharedApplication.applicationState == UIApplicationStateBackground) { - completion([OSNotification new]); - return; - } - //Only call the willShowInForegroundHandler for notifications not preview IAMs - - OSNotification *osNotification = [OSNotification parseWithApns:payload]; - if ([osNotification additionalData][ONESIGNAL_IAM_PREVIEW]) { - completion(nil); - return; - } - [OneSignalHelper handleWillShowInForegroundHandlerForNotification:osNotification completion:completion]; -} - -+ (void)handleNotificationOpened:(NSDictionary*)messageDict - actionType:(OSNotificationActionType)actionType { - - // return if the user has not granted privacy permissions - if ([OSPrivacyConsentController shouldLogMissingPrivacyConsentErrorWithMethodName:@"handleNotificationOpened:actionType:"]) - return; - - OSNotification *notification = [OSNotification parseWithApns:messageDict]; - if ([OneSignalHelper handleIAMPreview:notification]) - return; - - NSDictionary* customDict = [messageDict objectForKey:@"custom"] ?: [messageDict objectForKey:@"os_data"]; - // Notify backend that user opened the notification - NSString* messageId = [customDict objectForKey:@"i"]; - [OneSignal submitNotificationOpened:messageId]; - - let isActive = [UIApplication sharedApplication].applicationState == UIApplicationStateActive; - - [OneSignal onesignalLog:ONE_S_LL_VERBOSE message:[NSString stringWithFormat:@"handleNotificationOpened called! isActive: %@ notificationId: %@", - isActive ? @"YES" : @"NO", messageId]]; - - if (![OneSignal shouldSuppressURL]) { - // Try to fetch the open url to launch - [OneSignal launchWebURL:notification.launchURL]; - } - - [self clearBadgeCount:true]; - - NSString* actionID = NULL; - if (actionType == OSNotificationActionTypeActionTaken) { - actionID = messageDict[@"custom"][@"a"][@"actionSelected"]; - if(!actionID) - actionID = messageDict[@"actionSelected"]; - } - - // Call Action Block - [OneSignalHelper lastMessageReceived:messageDict]; - if (!isActive) { - OneSignal.appEntryState = NOTIFICATION_CLICK; - [[OSSessionManager sharedSessionManager] onDirectInfluenceFromNotificationOpen:_appEntryState withNotificationId:messageId]; - } - - [OneSignalHelper handleNotificationAction:actionType actionID:actionID]; -} - -+ (void)launchWebURL:(NSString*)openUrl { - - NSString* toOpenUrl = [OneSignalHelper trimURLSpacing:openUrl]; - - if (toOpenUrl && [OneSignalHelper verifyURL:toOpenUrl]) { - NSURL *url = [NSURL URLWithString:toOpenUrl]; - // Give the app resume animation time to finish when tapping on a notification from the notification center. - // Isn't a requirement but improves visual flow. - [OneSignalHelper performSelector:@selector(displayWebView:) withObject:url afterDelay:0.5]; - } - -} - -+ (void)submitNotificationOpened:(NSString*)messageId { - - // return if the user has not granted privacy permissions - if ([OSPrivacyConsentController shouldLogMissingPrivacyConsentErrorWithMethodName:nil]) - return; - - let standardUserDefaults = OneSignalUserDefaults.initStandard; - //(DUPLICATE Fix): Make sure we do not upload a notification opened twice for the same messageId - //Keep track of the Id for the last message sent - NSString* lastMessageId = [standardUserDefaults getSavedStringForKey:OSUD_LAST_MESSAGE_OPENED defaultValue:nil]; - //Only submit request if messageId not nil and: (lastMessage is nil or not equal to current one) - if(messageId && (!lastMessageId || ![lastMessageId isEqualToString:messageId])) { - [OneSignalClient.sharedClient executeRequest:[OSRequestSubmitNotificationOpened withUserId:self.currentSubscriptionState.userId - appId:self.appId - wasOpened:YES - messageId:messageId - withDeviceType:[NSNumber numberWithInt:DEVICE_TYPE_PUSH]] - onSuccess:nil - onFailure:nil]; - [standardUserDefaults saveStringForKey:OSUD_LAST_MESSAGE_OPENED withValue:messageId]; - } -} - -+ (BOOL)clearBadgeCount:(BOOL)fromNotifOpened { - - NSNumber *disableBadgeNumber = [[NSBundle mainBundle] objectForInfoDictionaryKey:ONESIGNAL_DISABLE_BADGE_CLEARING]; - - if (disableBadgeNumber) - disableBadgeClearing = [disableBadgeNumber boolValue]; - else - disableBadgeClearing = NO; - - if (disableBadgeClearing) - return false; - - bool wasBadgeSet = [UIApplication sharedApplication].applicationIconBadgeNumber > 0; - - if (fromNotifOpened || wasBadgeSet) { - [OneSignalHelper runOnMainThread:^{ - [[UIApplication sharedApplication] setApplicationIconBadgeNumber:0]; - }]; - } - - return wasBadgeSet; -} - -+ (int)getNotificationTypes { - [OneSignal onesignalLog:ONE_S_LL_VERBOSE message: [NSString stringWithFormat:@"getNotificationTypes:mSubscriptionStatus: %d", mSubscriptionStatus]]; - - if (mSubscriptionStatus < -9) - return mSubscriptionStatus; - - if (waitingForApnsResponse && !self.currentSubscriptionState.pushToken) - return ERROR_PUSH_DELEGATE_NEVER_FIRED; - - OSPermissionState* permissionStatus = [self.osNotificationSettings getNotificationPermissionState]; - - //only return the error statuses if not provisional - if (!permissionStatus.provisional && !permissionStatus.hasPrompted) - return ERROR_PUSH_NEVER_PROMPTED; - - if (!permissionStatus.provisional && !permissionStatus.answeredPrompt) - return ERROR_PUSH_PROMPT_NEVER_ANSWERED; - - if (self.currentSubscriptionState.isPushDisabled) - return -2; - - return permissionStatus.notificationTypes; -} - -+ (void)setSubscriptionErrorStatus:(int)errorType { - [OneSignal onesignalLog:ONE_S_LL_VERBOSE message: [NSString stringWithFormat:@"setSubscriptionErrorStatus: %d", errorType]]; - - mSubscriptionStatus = errorType; - if (self.currentSubscriptionState.userId) - [self sendNotificationTypesUpdate]; - else - [self registerUser]; -} - -// User just responed to the iOS native notification permission prompt. -// Also extra calls to registerUserNotificationSettings will fire this without prompting again. -+ (void)updateNotificationTypes:(int)notificationTypes { - - [OneSignal onesignalLog:ONE_S_LL_VERBOSE message:[NSString stringWithFormat:@"updateNotificationTypes called: %d", notificationTypes]]; - - if ([OneSignalHelper isIOSVersionLessThan:@"10.0"]) - [OneSignalUserDefaults.initStandard saveBoolForKey:OSUD_WAS_NOTIFICATION_PROMPT_ANSWERED_TO withValue:true]; - - BOOL startedRegister = [self registerForAPNsToken]; - - [OneSignal onesignalLog:ONE_S_LL_VERBOSE message:[NSString stringWithFormat:@"startedRegister: %d", startedRegister]]; - - [self.osNotificationSettings onNotificationPromptResponse:notificationTypes]; - - if (mSubscriptionStatus == -2) - return; - - if (!startedRegister && [self shouldRegisterNow]) - [self registerUser]; - else - [self sendNotificationTypesUpdate]; -} - -+ (void)didRegisterForRemoteNotifications:(UIApplication *)app - deviceToken:(NSData *)inDeviceToken { - if ([OSPrivacyConsentController shouldLogMissingPrivacyConsentErrorWithMethodName:nil]) - return; - - let parsedDeviceToken = [NSString hexStringFromData:inDeviceToken]; - - [OneSignal onesignalLog:ONE_S_LL_INFO message: [NSString stringWithFormat:@"Device Registered with Apple: %@", parsedDeviceToken]]; - - if (!parsedDeviceToken) { - [OneSignal onesignalLog:ONE_S_LL_ERROR message:@"Unable to convert APNS device token to a string"]; - return; - } - - waitingForApnsResponse = false; - - if (!appId) - return; - - [OneSignal updateDeviceToken:parsedDeviceToken]; -} - -+ (BOOL)receiveRemoteNotification:(UIApplication*)application UserInfo:(NSDictionary*)userInfo completionHandler:(void (^)(UIBackgroundFetchResult))completionHandler { - var startedBackgroundJob = false; - - NSDictionary* richData = nil; - // TODO: Look into why the userInfo payload would be different here for displaying vs opening.... - // Check for buttons or attachments pre-2.4.0 version - if ((userInfo[@"os_data"][@"buttons"] && [userInfo[@"os_data"][@"buttons"] isKindOfClass:[NSDictionary class]]) || userInfo[@"at"] || userInfo[@"o"]) - richData = userInfo; - - // Generate local notification for action button and/or attachments. - if (richData) { - let osNotification = [OSNotification parseWithApns:userInfo]; - - if ([OneSignalHelper isIOSVersionGreaterThanOrEqual:@"10.0"]) { - startedBackgroundJob = true; - [OneSignalHelper addNotificationRequest:osNotification completionHandler:completionHandler]; - } else { - let notification = [OneSignalHelper prepareUILocalNotification:osNotification]; - [[UIApplication sharedApplication] scheduleLocalNotification:notification]; - } - } - // Method was called due to a tap on a notification - Fire open notification - else if (application.applicationState == UIApplicationStateActive) { - [OneSignalHelper lastMessageReceived:userInfo]; - - if ([OneSignalHelper isDisplayableNotification:userInfo]) { - [OneSignal notificationReceived:userInfo wasOpened:YES]; - } - return startedBackgroundJob; - } - // content-available notification received in the background - else { - [OneSignalHelper lastMessageReceived:userInfo]; - } - - return startedBackgroundJob; -} - -// iOS 9 - Entry point when OneSignal action button notification is displayed or opened. -+ (void)processLocalActionBasedNotification:(UILocalNotification*) notification identifier:(NSString*)identifier { - if ([OSPrivacyConsentController shouldLogMissingPrivacyConsentErrorWithMethodName:nil]) - return; - - if (!notification.userInfo) - return; - - let userInfo = [OneSignalHelper formatApsPayloadIntoStandard:notification.userInfo identifier:identifier]; - - if (!userInfo) - return; - - let isActive = [[UIApplication sharedApplication] applicationState] == UIApplicationStateActive; - - [OneSignal notificationReceived:userInfo wasOpened:YES]; - - // Notification Tapped or notification Action Tapped - if (!isActive) - [self handleNotificationOpened:userInfo - actionType:OSNotificationActionTypeActionTaken]; -} - -// Called from the app's Notification Service Extension -+ (UNMutableNotificationContent*)didReceiveNotificationExtensionRequest:(UNNotificationRequest*)request withMutableNotificationContent:(UNMutableNotificationContent*)replacementContent { - return [OneSignalNotificationServiceExtensionHandler - didReceiveNotificationExtensionRequest:request - withMutableNotificationContent:replacementContent]; -} - -// Called from the app's Notification Service Extension. Calls contentHandler() to display the notification -+ (UNMutableNotificationContent*)didReceiveNotificationExtensionRequest:(UNNotificationRequest*)request withMutableNotificationContent:(UNMutableNotificationContent*)replacementContent - withContentHandler:(void (^)(UNNotificationContent * _Nonnull))contentHandler { - return [OneSignalNotificationServiceExtensionHandler - didReceiveNotificationExtensionRequest:request - withMutableNotificationContent:replacementContent - withContentHandler:contentHandler]; -} - - -// Called from the app's Notification Service Extension -+ (UNMutableNotificationContent*)serviceExtensionTimeWillExpireRequest:(UNNotificationRequest*)request withMutableNotificationContent:(UNMutableNotificationContent*)replacementContent { - return [OneSignalNotificationServiceExtensionHandler - serviceExtensionTimeWillExpireRequest:request - withMutableNotificationContent:replacementContent]; -} - -#pragma mark Email - -+ (void)callFailureBlockOnMainThread:(OSFailureBlock)failureBlock withError:(NSError *)error { - if (failureBlock) { - dispatch_async(dispatch_get_main_queue(), ^{ - failureBlock(error); - }); - } -} - -+ (void)callSuccessBlockOnMainThread:(OSResultSuccessBlock)successBlock withResult:(NSDictionary *)result{ - if (successBlock) { - dispatch_async(dispatch_get_main_queue(), ^{ - successBlock(result); - }); - } -} - -+ (void)callEmailSuccessBlockOnMainThread:(OSEmailSuccessBlock)successBlock { - if (successBlock) { - dispatch_async(dispatch_get_main_queue(), ^{ - successBlock(); - }); - } -} - -+ (void)setEmail:(NSString * _Nonnull)email { - - // return if the user has not granted privacy permissions - if ([OSPrivacyConsentController shouldLogMissingPrivacyConsentErrorWithMethodName:@"setEmail:"]) - return; - - [self setEmail:email withSuccess:nil withFailure:nil]; -} - -+ (void)setEmail:(NSString * _Nonnull)email withSuccess:(OSEmailSuccessBlock _Nullable)successBlock withFailure:(OSEmailFailureBlock _Nullable)failureBlock { - - // return if the user has not granted privacy permissions - if ([OSPrivacyConsentController shouldLogMissingPrivacyConsentErrorWithMethodName:@"setEmail:withSuccess:withFailure:"]) - return; - - [self setEmail:email withEmailAuthHashToken:nil withSuccess:successBlock withFailure:failureBlock]; -} - -+ (void)setEmail:(NSString * _Nonnull)email withEmailAuthHashToken:(NSString * _Nullable)hashToken { - - // return if the user has not granted privacy permissions - if ([OSPrivacyConsentController shouldLogMissingPrivacyConsentErrorWithMethodName:@"setEmail:withEmailAuthHashToken:"]) - return; - - [self setEmail:email withEmailAuthHashToken:hashToken withSuccess:nil withFailure:nil]; -} - -+ (void)setEmail:(NSString * _Nonnull)email withEmailAuthHashToken:(NSString * _Nullable)hashToken withSuccess:(OSEmailSuccessBlock _Nullable)successBlock withFailure:(OSEmailFailureBlock _Nullable)failureBlock { - - // Return if the user has not granted privacy permissions - if ([OSPrivacyConsentController shouldLogMissingPrivacyConsentErrorWithMethodName:@"setEmail:withEmailAuthHashToken:withSuccess:withFailure:"]) - return; - - // Some clients/wrappers may send NSNull instead of nil as the auth token - NSString *emailAuthToken = hashToken; - if (hashToken == (id)[NSNull null]) - emailAuthToken = nil; - - // Checks to ensure it is a valid email - if (![OneSignalHelper isValidEmail:email]) { - [OneSignal onesignalLog:ONE_S_LL_WARN message:[NSString stringWithFormat:@"Invalid email (%@) passed to setEmail", email]]; - if (failureBlock) - failureBlock([NSError errorWithDomain:@"com.onesignal" code:0 userInfo:@{@"error" : @"Email is invalid"}]); - return; - } - - // Checks to make sure that if email_auth is required, the user has passed in a hash token - if (self.currentEmailSubscriptionState.requiresEmailAuth && (!emailAuthToken || emailAuthToken.length == 0)) { - if (failureBlock) - failureBlock([NSError errorWithDomain:@"com.onesignal.email" code:0 userInfo:@{@"error" : @"Email authentication (auth token) is set to REQUIRED for this application. Please provide an auth token from your backend server or change the setting in the OneSignal dashboard."}]); - return; - } - - // If both the email address & hash token are the same, there's no need to make a network call here. - if ([self.currentEmailSubscriptionState.emailAddress isEqualToString:email] && ([self.currentEmailSubscriptionState.emailAuthCode isEqualToString:emailAuthToken] || (self.currentEmailSubscriptionState.emailAuthCode == nil && emailAuthToken == nil))) { - [OneSignal onesignalLog:ONE_S_LL_VERBOSE message:@"Email already exists, there is no need to call setEmail again"]; - if (successBlock) - successBlock(); - return; - } - - // If the iOS params (with the require_email_auth setting) has not been downloaded yet, we should delay the request - // however, if this method was called with an email auth code passed in, then there is no need to check this setting - // and we do not need to delay the request - if (!self.currentSubscriptionState.userId || (_downloadedParameters == false && emailAuthToken != nil)) { - [OneSignal onesignalLog:ONE_S_LL_VERBOSE message:@"iOS Parameters for this application has not yet been downloaded. Delaying call to setEmail: until the parameters have been downloaded."]; - delayedEmailParameters = [OneSignalSetEmailParameters withEmail:email withAuthToken:emailAuthToken withSuccess:successBlock withFailure:failureBlock]; - return; - } - - // If the user already has a onesignal email player_id, then we should call update the device token - // otherwise, we should call Create Device - // Since developers may be making UI changes when this call finishes, we will call callbacks on the main thread. - if (self.currentEmailSubscriptionState.emailUserId) { - [OneSignalClient.sharedClient executeRequest:[OSRequestUpdateDeviceToken withUserId:self.currentEmailSubscriptionState.emailUserId appId:self.appId deviceToken:email withParentId:nil emailAuthToken:emailAuthToken email:nil externalIdAuthToken:[self mExternalIdAuthToken]] onSuccess:^(NSDictionary *result) { - [self callEmailSuccessBlockOnMainThread:successBlock]; - } onFailure:^(NSError *error) { - [self callFailureBlockOnMainThread:failureBlock withError:error]; - }]; - } else { - [OneSignalClient.sharedClient executeRequest:[OSRequestCreateDevice withAppId:self.appId withDeviceType:[NSNumber numberWithInt:DEVICE_TYPE_EMAIL] withEmail:email withPlayerId:self.currentSubscriptionState.userId withEmailAuthHash:emailAuthToken withExternalUserId:[self existingPushExternalUserId] withExternalIdAuthToken:[self mExternalIdAuthToken]] onSuccess:^(NSDictionary *result) { - - let emailPlayerId = (NSString*)result[@"id"]; - - if (emailPlayerId) { - [OneSignal saveEmailAddress:email withAuthToken:emailAuthToken userId:emailPlayerId]; - [OneSignalClient.sharedClient executeRequest:[OSRequestUpdateDeviceToken withUserId:self.currentSubscriptionState.userId appId:self.appId deviceToken:nil withParentId:self.currentEmailSubscriptionState.emailUserId emailAuthToken:hashToken email:email externalIdAuthToken:[self mExternalIdAuthToken] ] onSuccess:^(NSDictionary *result) { - [self callEmailSuccessBlockOnMainThread:successBlock]; - } onFailure:^(NSError *error) { - [self callFailureBlockOnMainThread:failureBlock withError:error]; - }]; - } else { - [OneSignal onesignalLog:ONE_S_LL_ERROR message:@"Missing OneSignal Email Player ID"]; - } - } onFailure:^(NSError *error) { - [self callFailureBlockOnMainThread:failureBlock withError:error]; - }]; - } -} - -+ (void)logoutEmail { - - // return if the user has not granted privacy permissions - if ([OSPrivacyConsentController shouldLogMissingPrivacyConsentErrorWithMethodName:@"logoutEmail"]) - return; - - [self logoutEmailWithSuccess:nil withFailure:nil]; -} - -+ (void)logoutEmailWithSuccess:(OSEmailSuccessBlock _Nullable)successBlock withFailure:(OSEmailFailureBlock _Nullable)failureBlock { - - // return if the user has not granted privacy permissions - if ([OSPrivacyConsentController shouldLogMissingPrivacyConsentErrorWithMethodName:@"logoutEmailWithSuccess:withFailure:"]) - return; - - if (!self.currentEmailSubscriptionState.emailUserId) { - [OneSignal onesignalLog:ONE_S_LL_ERROR message:@"Email Player ID does not exist, cannot logout"]; - - if (failureBlock) - failureBlock([NSError errorWithDomain:@"com.onesignal" code:0 userInfo:@{@"error" : @"Attempted to log out of the user's email with OneSignal. The user does not currently have an email player ID and is not logged in, so it is not possible to log out of the email for this device"}]); - return; - } - - [OneSignalClient.sharedClient executeRequest:[OSRequestLogoutEmail withAppId:self.appId emailPlayerId:self.currentEmailSubscriptionState.emailUserId devicePlayerId:self.currentSubscriptionState.userId emailAuthHash:self.currentEmailSubscriptionState.emailAuthCode] onSuccess:^(NSDictionary *result) { - - [OneSignalUserDefaults.initStandard removeValueForKey:OSUD_EMAIL_PLAYER_ID]; - [OneSignal saveEmailAddress:nil withAuthToken:nil userId:nil]; - - [self callEmailSuccessBlockOnMainThread:successBlock]; - } onFailure:^(NSError *error) { - [self callFailureBlockOnMainThread:failureBlock withError:error]; - }]; -} - -+ (void)emailChangedWithNewEmailPlayerId:(NSString * _Nullable)emailPlayerId { - //make sure that the email player ID has changed otherwise there's no point in this request - if ([self.currentEmailSubscriptionState.emailUserId isEqualToString:emailPlayerId]) - return; - - self.currentEmailSubscriptionState.emailUserId = emailPlayerId; - - [self.currentEmailSubscriptionState persist]; - - let request = [OSRequestUpdateDeviceToken withUserId:self.currentSubscriptionState.userId - appId:self.appId - deviceToken:nil - withParentId:emailPlayerId - emailAuthToken:self.currentEmailSubscriptionState.emailAuthCode - email:self.currentEmailSubscriptionState.emailAddress - externalIdAuthToken:[self mExternalIdAuthToken]]; - [OneSignalClient.sharedClient executeRequest:request onSuccess:nil onFailure:^(NSError *error) { - [OneSignal onesignalLog:ONE_S_LL_ERROR message:[NSString stringWithFormat:@"Encountered an error updating this user's email player record: %@", error.description]]; - }]; -} - -#pragma mark SMS - -+ (void)setSMSNumber:(NSString *)smsNumber { - // return if the user has not granted privacy permissions - if ([OSPrivacyConsentController shouldLogMissingPrivacyConsentErrorWithMethodName:@"setSMSNumber:"]) - return; - - [self setSMSNumber:smsNumber withSMSAuthHashToken:nil withSuccess:nil withFailure:nil]; + [OSNotificationsManager clearBadgeCount:false]; + [self startOutcomes]; + [self startLocation]; + [self startTrackIAP]; + [self startTrackFirebaseAnalytics]; + [self startLifecycleObserver]; + //TODO: Should these be started in Dependency order? e.g. IAM depends on User Manager shared instance + [self startUserManager]; // By here, app_id exists, and consent is granted. + [self startInAppMessages]; + [self startNewSession:YES]; + + initializationTime = [[NSDate date] timeIntervalSince1970]; + initDone = true; } -+ (void)setSMSNumber:(NSString *)smsNumber withSuccess:(OSSMSSuccessBlock)successBlock withFailure:(OSSMSFailureBlock)failureBlock { - // return if the user has not granted privacy permissions - if ([OSPrivacyConsentController shouldLogMissingPrivacyConsentErrorWithMethodName:@"setSMSNumber:withSuccess:withFailure:"]) - return; - - [self setSMSNumber:smsNumber withSMSAuthHashToken:nil withSuccess:successBlock withFailure:failureBlock]; ++ (NSString *)appGroupKey { + return [OneSignalUserDefaults appGroupName]; } -+ (void)setSMSNumber:(NSString *)smsNumber withSMSAuthHashToken:(NSString *)hashToken { - // return if the user has not granted privacy permissions - if ([OSPrivacyConsentController shouldLogMissingPrivacyConsentErrorWithMethodName:@"setSMSNumber:withSMSAuthHashToken:"]) - return; ++ (void)handleAppIdChange:(NSString*)appId { + // TODO: Maybe in the future we can make a file with add app ids and validate that way? + if ([@"b2f7f966-d8cc-11e4-bed1-df8f05be55ba" isEqualToString:appId] || + [@"5eb5a37e-b458-11e3-ac11-000c2940e62c" isEqualToString:appId]) { + [OneSignalLog onesignalLog:ONE_S_LL_WARN message:@"OneSignal Example AppID detected, please update to your app's id found on OneSignal.com"]; + } - [self setSMSNumber:smsNumber withSMSAuthHashToken:hashToken withSuccess:nil withFailure:nil]; -} + let standardUserDefaults = OneSignalUserDefaults.initStandard; + let prevAppId = [standardUserDefaults getSavedStringForKey:OSUD_APP_ID defaultValue:nil]; -+ (void)setSMSNumber:(NSString *)smsNumber withSMSAuthHashToken:(NSString *)hashToken withSuccess:(OSSMSSuccessBlock)successBlock withFailure:(OSSMSFailureBlock)failureBlock { - // return if the user has not granted privacy permissions - if ([OSPrivacyConsentController shouldLogMissingPrivacyConsentErrorWithMethodName:@"setSMSNumber:withSMSAuthHashToken:withSuccess:withFailure:"]) - return; - - // Some clients/wrappers may send NSNull instead of nil as the auth token - NSString *smsAuthToken = hashToken; - if (hashToken == (id)[NSNull null]) - smsAuthToken = nil; - - // Checks to ensure it is a valid smsNumber - if (!smsNumber || [smsNumber length] == 0) { - [OneSignal onesignalLog:ONE_S_LL_WARN message:[NSString stringWithFormat:@"Invalid sms number (%@) passed to setSMSNumber", smsNumber]]; - if (failureBlock) - failureBlock([NSError errorWithDomain:@"com.onesignal.sms" code:0 userInfo:@{@"error" : @"SMS number is invalid"}]); - return; - } - - // Checks to make sure that if sms_auth is required, the user has passed in a hash token - if (self.currentSMSSubscriptionState.requiresSMSAuth && (!hashToken || hashToken.length == 0)) { - if (failureBlock) - failureBlock([NSError errorWithDomain:@"com.onesignal.sms" code:0 userInfo:@{@"error" : @"SMS authentication (auth token) is set to REQUIRED for this application. Please provide an auth token from your backend server or change the setting in the OneSignal dashboard."}]); - return; - } + // Handle changes to the app id, this might happen on a developer's device when testing + // Will also run the first time OneSignal is initialized + if (appId && ![appId isEqualToString:prevAppId]) { + initDone = false; + _downloadedParameters = false; + _didCallDownloadParameters = false; - // If both the sms number & hash token are the same, there's no need to make a network call here. - if ([self.currentSMSSubscriptionState.smsNumber isEqualToString:smsNumber] && ([self.currentSMSSubscriptionState.smsAuthCode isEqualToString:hashToken] || (self.currentSMSSubscriptionState.smsAuthCode == nil && hashToken == nil))) { - [OneSignal onesignalLog:ONE_S_LL_VERBOSE message:@"SMS number already exists, there is no need to call setSMSNumber again"]; - if (successBlock) { - let response = [NSMutableDictionary new]; - [response setValue:smsNumber forKey:SMS_NUMBER_KEY]; - successBlock(response); - } - return; - } - - // If the iOS params (with the require_sms_auth setting) has not been downloaded yet, we should delay the request - // however, if this method was called with an sms auth code passed in, then there is no need to check this setting - // and we do not need to delay the request - if (!self.currentSubscriptionState.userId || (_downloadedParameters == false && hashToken == nil)) { - [OneSignal onesignalLog:ONE_S_LL_VERBOSE message:@"iOS Parameters for this application has not yet been downloaded. Delaying call to setSMSNumber: until the parameters have been downloaded."]; - _delayedSMSParameters = [OneSignalSetSMSParameters withSMSNumber:smsNumber withAuthToken:hashToken withSuccess:successBlock withFailure:failureBlock]; - return; + let sharedUserDefaults = OneSignalUserDefaults.initShared; + + [standardUserDefaults saveStringForKey:OSUD_APP_ID withValue:appId]; + + // Remove player_id from both standard and shared NSUserDefaults + [standardUserDefaults removeValueForKey:OSUD_PUSH_SUBSCRIPTION_ID]; + [sharedUserDefaults removeValueForKey:OSUD_PUSH_SUBSCRIPTION_ID]; + [standardUserDefaults removeValueForKey:OSUD_LEGACY_PLAYER_ID]; + [sharedUserDefaults removeValueForKey:OSUD_LEGACY_PLAYER_ID]; + + // Clear all cached data, does not start User Module nor call logout. + [OneSignalUserManagerImpl.sharedInstance clearAllModelsFromStores]; } - [self.stateSynchronizer setSMSNumber:smsNumber withSMSAuthHashToken:hashToken withAppId:self.appId withSuccess:successBlock withFailure:failureBlock]; -} - -+ (void)logoutSMSNumber { - // return if the user has not granted privacy permissions - if ([OSPrivacyConsentController shouldLogMissingPrivacyConsentErrorWithMethodName:@"logoutSMSNumber"]) - return; - - [self logoutSMSNumberWithSuccess:nil withFailure:nil]; + // Always save appId and player_id as it will not be present on shared if: + // - Updating from an older SDK + // - Updating to an app that didn't have App Groups setup before + [OneSignalUserDefaults.initShared saveStringForKey:OSUD_APP_ID withValue:appId]; } -+ (void)logoutSMSNumberWithSuccess:(OSSMSSuccessBlock)successBlock withFailure:(OSSMSFailureBlock)failureBlock { - // return if the user has not granted privacy permissions - if ([OSPrivacyConsentController shouldLogMissingPrivacyConsentErrorWithMethodName:@"logoutSMSNumberWithSuccess:withFailure:"]) - return; ++ (void)registerForAPNsToken { + registeredWithApple = OSNotificationsManager.currentPermissionState.accepted; - if (!self.currentSMSSubscriptionState.smsUserId) { - [OneSignal onesignalLog:ONE_S_LL_ERROR message:@"SMS Player ID does not exist, cannot logout"]; - - if (failureBlock) - failureBlock([NSError errorWithDomain:@"com.onesignal.sms" code:0 userInfo:@{@"error" : @"Attempted to log out of the user's sms number with OneSignal. The user does not currently have an sms player ID and is not logged in, so it is not possible to log out of the sms number for this device"}]); - return; + // Register with Apple's APNS server if we registed once before or if auto-prompt hasn't been disabled. + if (registeredWithApple && !OSNotificationsManager.currentPermissionState.ephemeral) { + [OSNotificationsManager requestPermission:nil]; + } else { + [OSNotificationsManager checkProvisionalAuthorizationStatus]; + [OSNotificationsManager registerForAPNsToken]; } - - [self.stateSynchronizer logoutSMSWithAppId:self.appId withSuccess:successBlock withFailure:failureBlock]; } -+ (NSDate *)sessionLaunchTime { - return sessionLaunchTime; ++ (void)setConsentRequired:(BOOL)required { + [OSPrivacyConsentController setRequiresPrivacyConsent:required]; } -+ (void)addTrigger:(NSString *)key withValue:(id)value { - - // return if the user has not granted privacy permissions - if ([OSPrivacyConsentController shouldLogMissingPrivacyConsentErrorWithMethodName:@"addTrigger:withValue:"]) - return; - - if (!key) { - [OneSignal onesignalLog:ONE_S_LL_ERROR message:@"Attempted to set a trigger with a nil key."]; ++ (void)setConsentGiven:(BOOL)granted { + [OSPrivacyConsentController consentGranted:granted]; + + if (!granted || !delayedInitializationForPrivacyConsent || _delayedInitParameters == nil) return; - } - - [OSMessagingController.sharedInstance addTriggers:@{key : value}]; + // Try to init again using delayed params + [self initialize:_delayedInitParameters.appId withLaunchOptions:_delayedInitParameters.launchOptions]; + delayedInitializationForPrivacyConsent = false; + _delayedInitParameters = nil; } -+ (void)addTriggers:(NSDictionary *)triggers { - // return if the user has not granted privacy permissions - if ([OSPrivacyConsentController shouldLogMissingPrivacyConsentErrorWithMethodName:@"addTriggers:"]) - return; - - [OSMessagingController.sharedInstance addTriggers:triggers]; ++ (BOOL)getPrivacyConsent { + return [OSPrivacyConsentController getPrivacyConsent]; } -+ (void)removeTriggerForKey:(NSString *)key { - // return if the user has not granted privacy permissions - if ([OSPrivacyConsentController shouldLogMissingPrivacyConsentErrorWithMethodName:@"removeTriggerForKey:"]) - return; - - if (!key) { - [OneSignal onesignalLog:ONE_S_LL_ERROR message:@"Attempted to remove a trigger with a nil key."]; - return; - } ++ (void)downloadIOSParamsWithAppId:(NSString *)appId { + [OneSignalLog onesignalLog:ONE_S_LL_DEBUG message:@"Downloading iOS parameters for this application"]; + _didCallDownloadParameters = true; + // This will be nil unless we have a cached user + // TODO: Commented out. This will init the User Manager too early, and userId is not needed anyway. + // NSString *userId = OneSignalUserManagerImpl.sharedInstance.pushSubscriptionId; + NSString *userId = nil; - [OSMessagingController.sharedInstance removeTriggersForKeys:@[key]]; -} + [OneSignalClient.sharedClient executeRequest:[OSRequestGetIosParams withUserId:userId appId:appId] onSuccess:^(NSDictionary *result) { -+ (void)removeTriggersForKeys:(NSArray *)keys { - // return if the user has not granted privacy permissions - if ([OSPrivacyConsentController shouldLogMissingPrivacyConsentErrorWithMethodName:@"removeTriggerForKey:"]) - return; + if (result[IOS_REQUIRES_USER_ID_AUTHENTICATION]) { + OneSignalUserManagerImpl.sharedInstance.requiresUserAuth = [result[IOS_REQUIRES_USER_ID_AUTHENTICATION] boolValue]; + } - [OSMessagingController.sharedInstance removeTriggersForKeys:keys]; -} + if (result[IOS_USES_PROVISIONAL_AUTHORIZATION] != (id)[NSNull null]) { + [OneSignalUserDefaults.initStandard saveBoolForKey:OSUD_USES_PROVISIONAL_PUSH_AUTHORIZATION withValue:[result[IOS_USES_PROVISIONAL_AUTHORIZATION] boolValue]]; -+ (NSDictionary *)getTriggers { - // return if the user has not granted privacy permissions - if ([OSPrivacyConsentController shouldLogMissingPrivacyConsentErrorWithMethodName:@"getTriggers"]) - return @{}; + [OSNotificationsManager checkProvisionalAuthorizationStatus]; + } - return [OSMessagingController.sharedInstance getTriggers]; -} + if (result[IOS_RECEIVE_RECEIPTS_ENABLE] != (id)[NSNull null]) + [OneSignalUserDefaults.initShared saveBoolForKey:OSUD_RECEIVE_RECEIPTS_ENABLED withValue:[result[IOS_RECEIVE_RECEIPTS_ENABLE] boolValue]]; -+ (id)getTriggerValueForKey:(NSString *)key { - // return if the user has not granted privacy permissions - if ([OSPrivacyConsentController shouldLogMissingPrivacyConsentErrorWithMethodName:@"getTriggerValueForKey:"]) - return nil; + [[OSRemoteParamController sharedController] saveRemoteParams:result]; + if ([[OSRemoteParamController sharedController] hasLocationKey]) { + BOOL shared = [result[IOS_LOCATION_SHARED] boolValue]; + let oneSignalLocation = NSClassFromString(@"OneSignalLocation"); + if (oneSignalLocation != nil && [oneSignalLocation respondsToSelector:@selector(startLocationSharedWithFlag:)]) { + [OneSignalCoreHelper callSelector:@selector(startLocationSharedWithFlag:) onObject:oneSignalLocation withArg:shared]; + } + } + + if ([[OSRemoteParamController sharedController] hasPrivacyConsentKey]) { + BOOL required = [result[IOS_REQUIRES_USER_PRIVACY_CONSENT] boolValue]; + [[OSRemoteParamController sharedController] savePrivacyConsentRequired:required]; + [OSPrivacyConsentController setRequiresPrivacyConsent:required]; + } - return [OSMessagingController.sharedInstance getTriggerValueForKey:key]; -} + if (result[OUTCOMES_PARAM] && result[OUTCOMES_PARAM][IOS_OUTCOMES_V2_SERVICE_ENABLE]) + [[OSOutcomeEventsCache sharedOutcomeEventsCache] saveOutcomesV2ServiceEnabled:[result[OUTCOMES_PARAM][IOS_OUTCOMES_V2_SERVICE_ENABLE] boolValue]]; -+ (void)setLanguage:(NSString * _Nonnull)language { - // return if the user has not granted privacy permissions - if ([OSPrivacyConsentController shouldLogMissingPrivacyConsentErrorWithMethodName:@"setLanguage"]) - return; - - let languageProviderAppDefined = [LanguageProviderAppDefined new]; - [languageProviderAppDefined setLanguage:language]; - [languageContext setStrategy:languageProviderAppDefined]; - - //Can't send Language if there exists no language - if (language) - [self setLanguageOnServer:language WithSuccess:nil withFailure:nil]; -} + [[OSTrackerFactory sharedTrackerFactory] saveInfluenceParams:result]; + [OneSignalTrackFirebaseAnalytics updateFromDownloadParams:result]; -+ (void)setLanguage:(NSString * _Nonnull)language withSuccess:(OSUpdateLanguageSuccessBlock _Nullable)successBlock withFailure:(OSUpdateLanguageFailureBlock _Nullable)failureBlock { - // return if the user has not granted privacy permissions - if ([OSPrivacyConsentController shouldLogMissingPrivacyConsentErrorWithMethodName:@"setLanguage"]) - return; - - //Can't send Language if there exists not LanguageContext or language - if (languageContext.language) - [self setLanguageOnServer:language WithSuccess:successBlock withFailure:failureBlock]; -} + _downloadedParameters = true; -+ (void)setLanguageOnServer:(NSString * _Nonnull)language WithSuccess:(OSUpdateLanguageSuccessBlock)successBlock withFailure:(OSUpdateLanguageFailureBlock)failureBlock { - - if ([language isEqualToString:@""]) { - failureBlock([NSError errorWithDomain:@"com.onesignal.language" code:0 userInfo:@{@"error" : @"Empty Language Code"}]); - return; - } - - if (!self.currentSubscriptionState.userId || _downloadedParameters == false) { - [OneSignal onesignalLog:ONE_S_LL_VERBOSE message:@"iOS Parameters for this application has not yet been downloaded. Delaying call to setLanguage: until the parameters have been downloaded."]; - delayedLanguageParameters = [OneSignalSetLanguageParameters language:language withSuccess:successBlock withFailure:failureBlock]; - return; - } - - [OneSignal.stateSynchronizer updateLanguage:language appId:appId withSuccess:^(NSDictionary *results) { - if (successBlock) - successBlock(results); - } withFailure:^(NSError *error) { - if (failureBlock) - failureBlock([NSError errorWithDomain:@"com.onesignal.language" code:0 userInfo:@{@"error" : @"Network Error"}]); + } onFailure:^(NSError *error) { + _didCallDownloadParameters = false; }]; } -+ (void)setExternalUserId:(NSString * _Nonnull)externalId { - - // return if the user has not granted privacy permissions - if ([OSPrivacyConsentController shouldLogMissingPrivacyConsentErrorWithMethodName:@"setExternalUserId:"]) - return; +//TODO: consolidate in one place. Where??? ++ (void)launchWebURL:(NSString*)openUrl { - [self setExternalUserId:externalId withSuccess:nil withFailure:nil]; -} - -+ (void)setExternalUserId:(NSString * _Nonnull)externalId withSuccess:(OSUpdateExternalUserIdSuccessBlock _Nullable)successBlock withFailure:(OSUpdateExternalUserIdFailureBlock _Nullable)failureBlock { - // return if the user has not granted privacy permissions - if ([OSPrivacyConsentController shouldLogMissingPrivacyConsentErrorWithMethodName:@"setExternalUserId:withSuccess:withFailure:"]) - return; - - [self setExternalUserId:externalId withExternalIdAuthHashToken:nil withSuccess:successBlock withFailure:failureBlock]; -} - -+ (void)setExternalUserId:(NSString *)externalId withExternalIdAuthHashToken:(NSString *)hashToken withSuccess:(OSUpdateExternalUserIdSuccessBlock _Nullable)successBlock withFailure:(OSUpdateExternalUserIdFailureBlock _Nullable)failureBlock { - // return if the user has not granted privacy permissions - if ([OSPrivacyConsentController shouldLogMissingPrivacyConsentErrorWithMethodName:@"setExternalUserId:withExternalIdAuthHashToken:withSuccess:withFailure:"]) - return; - - // Can't set the external id if init is not done or the app id or user id has not ben set yet - if (!_downloadedParameters || !self.currentSubscriptionState.userId) { - // will be sent as part of the registration/on_session request - pendingExternalUserId = externalId; - pendingExternalUserIdHashToken = hashToken; - delayedExternalIdParameters = [OneSignalSetExternalIdParameters withExternalId:externalId withAuthToken:hashToken withSuccess:successBlock withFailure:failureBlock]; - return; - } else if (!appId) { - [OneSignal onesignalLog:ONE_S_LL_WARN message:@"Attempted to set external user id, but app_id is not set"]; - if (failureBlock) - failureBlock([NSError errorWithDomain:@"com.onesignal" code:0 userInfo:@{@"error" : [NSString stringWithFormat:@"%@ is not set", appId == nil ? @"app_id" : @"user_id"]}]); - return; - } else if (externalId.length > 0 && requiresUserIdAuth && (!hashToken || hashToken.length == 0)) { - [OneSignal onesignalLog:ONE_S_LL_ERROR message:@"External Id authentication (auth token) is set to REQUIRED for this application. Please provide an auth token from your backend server or change the setting in the OneSignal dashboard."]; - if (failureBlock) - failureBlock([NSError errorWithDomain:@"com.onesignal.externalUserId" code:0 userInfo:@{@"error" : @"External User Id authentication (auth token) is set to REQUIRED for this application. Please provide an auth token from your backend server or change the setting in the OneSignal dashboard."}]); - return; - } + NSString* toOpenUrl = [OneSignalCoreHelper trimURLSpacing:openUrl]; - // Remove external id case - if (externalId.length == 0) { - hashToken = self.currentSubscriptionState.externalIdAuthCode; + if (toOpenUrl && [OneSignalCoreHelper verifyURL:toOpenUrl]) { + NSURL *url = [NSURL URLWithString:toOpenUrl]; + // Give the app resume animation time to finish when tapping on a notification from the notification center. + // Isn't a requirement but improves visual flow. + [OneSignalHelper performSelector:@selector(displayWebView:) withObject:url afterDelay:0.5]; } - - [[self stateSynchronizer] setExternalUserId:externalId withExternalIdAuthHashToken:hashToken withAppId:appId withSuccess:successBlock withFailure:failureBlock]; -} - -+ (void)removeExternalUserId { - // return if the user has not granted privacy permissions - if ([OSPrivacyConsentController shouldLogMissingPrivacyConsentErrorWithMethodName:@"removeExternalUserId"]) - return; - - [self setExternalUserId:@""]; -} - -+ (void)removeExternalUserId:(OSUpdateExternalUserIdSuccessBlock _Nullable)successBlock withFailure:(OSUpdateExternalUserIdFailureBlock _Nullable)failureBlock { - // return if the user has not granted privacy permissions - if ([OSPrivacyConsentController shouldLogMissingPrivacyConsentErrorWithMethodName:@"removeExternalUserId:"]) - return; - - [self setExternalUserId:@"" withSuccess:successBlock withFailure:failureBlock]; + } -+ (NSString*)existingPushExternalUserId { - return [OneSignalUserDefaults.initStandard getSavedStringForKey:OSUD_EXTERNAL_USER_ID defaultValue:@""]; +// Called from the app's Notification Service Extension ++ (UNMutableNotificationContent*)didReceiveNotificationExtensionRequest:(UNNotificationRequest*)request withMutableNotificationContent:(UNMutableNotificationContent*)replacementContent { + return [OneSignalNotificationServiceExtensionHandler + didReceiveNotificationExtensionRequest:request + withMutableNotificationContent:replacementContent]; } -+ (NSString*)existingEmailExternalUserId { - return [OneSignalUserDefaults.initStandard getSavedStringForKey:OSUD_EMAIL_EXTERNAL_USER_ID defaultValue:@""]; +// Called from the app's Notification Service Extension. Calls contentHandler() to display the notification ++ (UNMutableNotificationContent*)didReceiveNotificationExtensionRequest:(UNNotificationRequest*)request withMutableNotificationContent:(UNMutableNotificationContent*)replacementContent + withContentHandler:(void (^)(UNNotificationContent * _Nonnull))contentHandler { + return [OneSignalNotificationServiceExtensionHandler + didReceiveNotificationExtensionRequest:request + withMutableNotificationContent:replacementContent + withContentHandler:contentHandler]; } -+ (BOOL)shouldUpdateExternalUserId:(NSString*)externalId withRequests:(NSDictionary*)requests { - // If we are not making a request to email user, no need to validate that external user id - bool updateExternalUserId = ![self.existingPushExternalUserId isEqualToString:externalId] - && !requests[@"email"]; - - bool updateEmailExternalUserId = (requests[@"email"] - && ![self.existingEmailExternalUserId isEqualToString:externalId]); - - return updateExternalUserId || updateEmailExternalUserId; +// Called from the app's Notification Service Extension ++ (UNMutableNotificationContent*)serviceExtensionTimeWillExpireRequest:(UNNotificationRequest*)request withMutableNotificationContent:(UNMutableNotificationContent*)replacementContent { + return [OneSignalNotificationServiceExtensionHandler + serviceExtensionTimeWillExpireRequest:request + withMutableNotificationContent:replacementContent]; } +// +////TODO: move to sessions/onfocus +//+ (NSDate *)sessionLaunchTime { +// return sessionLaunchTime; +//} /* Start of outcome module */ -+ (void)sendClickActionOutcomes:(NSArray *)outcomes { - if (!_outcomeEventsController) { - [OneSignal onesignalLog:ONE_S_LL_ERROR message:@"Make sure OneSignal init is called first"]; - return; - } - - [_outcomeEventsController sendClickActionOutcomes:outcomes appId:appId deviceType:[NSNumber numberWithInt:DEVICE_TYPE_PUSH]]; -} - -+ (void)sendOutcome:(NSString * _Nonnull)name { - [self sendOutcome:name onSuccess:nil]; -} - -+ (void)sendOutcome:(NSString * _Nonnull)name onSuccess:(OSSendOutcomeSuccess _Nullable)success { - // return if the user has not granted privacy permissions - if ([OSPrivacyConsentController shouldLogMissingPrivacyConsentErrorWithMethodName:@"sendOutcome:onSuccess:"]) - return; - - if (!_outcomeEventsController) { - [OneSignal onesignalLog:ONE_S_LL_ERROR message:@"Make sure OneSignal init is called first"]; - return; - } - - if (![self isValidOutcomeEntry:name]) - return; - - [_outcomeEventsController sendOutcomeEvent:name appId:appId deviceType:[NSNumber numberWithInt:DEVICE_TYPE_PUSH] successBlock:success]; -} - -+ (void)sendUniqueOutcome:(NSString * _Nonnull)name { - [self sendUniqueOutcome:name onSuccess:nil]; -} - -+ (void)sendUniqueOutcome:(NSString * _Nonnull)name onSuccess:(OSSendOutcomeSuccess _Nullable)success { - // return if the user has not granted privacy permissions - if ([OSPrivacyConsentController shouldLogMissingPrivacyConsentErrorWithMethodName:@"sendUniqueOutcome:onSuccess:"]) - return; - - if (!_outcomeEventsController) { - [OneSignal onesignalLog:ONE_S_LL_ERROR message:@"Make sure OneSignal init is called first"]; - return; - } - - if (![self isValidOutcomeEntry:name]) - return; - - [_outcomeEventsController sendUniqueOutcomeEvent:name appId:appId deviceType:[NSNumber numberWithInt:DEVICE_TYPE_PUSH] successBlock:success]; -} - -+ (void)sendOutcomeWithValue:(NSString * _Nonnull)name value:(NSNumber * _Nonnull)value { - [self sendOutcomeWithValue:name value:value onSuccess:nil]; -} - -+ (void)sendOutcomeWithValue:(NSString * _Nonnull)name value:(NSNumber * _Nonnull)value onSuccess:(OSSendOutcomeSuccess _Nullable)success { - // return if the user has not granted privacy permissions - if ([OSPrivacyConsentController shouldLogMissingPrivacyConsentErrorWithMethodName:@"sendOutcomeWithValue:value:onSuccess:"]) - return; - - if (!_outcomeEventsController) { - [OneSignal onesignalLog:ONE_S_LL_ERROR message:@"Make sure OneSignal init is called first"]; ++ (void)sendSessionEndOutcomes:(NSNumber*)totalTimeActive params:(OSFocusCallParams *)params onSuccess:(OSResultSuccessBlock _Nonnull)successBlock onFailure:(OSFailureBlock _Nonnull)failureBlock { + if (![OSOutcomes sharedController]) { + [OneSignalLog onesignalLog:ONE_S_LL_ERROR message:@"Make sure OneSignal init is called first"]; + if (failureBlock) { + failureBlock([NSError errorWithDomain:@"onesignal" code:0 userInfo:@{@"error" : @"Missing outcomes controller."}]); + } return; } - - if (![self isValidOutcomeEntry:name]) - return; - - if (![self isValidOutcomeValue:value]) + + NSString* onesignalId = OneSignalUserManagerImpl.sharedInstance.onesignalId; + NSString* pushSubscriptionId = OneSignalUserManagerImpl.sharedInstance.pushSubscriptionId; + + if (!onesignalId || !pushSubscriptionId) { + if (failureBlock) { + failureBlock([NSError errorWithDomain:@"onesignal" code:0 userInfo:@{@"error" : @"Missing onesignalId or pushSubscriptionId."}]); + } return; - - [_outcomeEventsController sendOutcomeEventWithValue:name value:value appId:appId deviceType:[NSNumber numberWithInt:DEVICE_TYPE_PUSH] successBlock:success]; -} - -+ (BOOL)isValidOutcomeEntry:(NSString * _Nonnull)name { - if (!name || [name length] == 0) { - [OneSignal onesignalLog:ONE_S_LL_ERROR message:@"Outcome name must not be null or empty"]; - return false; - } - - return true; -} - -+ (BOOL)isValidOutcomeValue:(NSNumber *)value { - if (!value || value.intValue <= 0) { - [OneSignal onesignalLog:ONE_S_LL_ERROR message:@"Outcome value must not be null or 0"]; - return false; - } - - return true; -} - -static ONE_S_LOG_LEVEL _visualLogLevel = ONE_S_LL_NONE; - -#pragma mark Logging -+ (void)setLogLevel:(ONE_S_LOG_LEVEL)logLevel visualLevel:(ONE_S_LOG_LEVEL)visualLogLevel { - [OneSignalLog setLogLevel:logLevel]; - _visualLogLevel = visualLogLevel; -} -+ (void)onesignalLog:(ONE_S_LOG_LEVEL)logLevel message:(NSString* _Nonnull)message { - [OneSignalLog onesignalLog:logLevel message:message]; - NSString* levelString; - switch (logLevel) { - case ONE_S_LL_FATAL: - levelString = @"FATAL: "; - break; - case ONE_S_LL_ERROR: - levelString = @"ERROR: "; - break; - case ONE_S_LL_WARN: - levelString = @"WARNING: "; - break; - case ONE_S_LL_INFO: - levelString = @"INFO: "; - break; - case ONE_S_LL_DEBUG: - levelString = @"DEBUG: "; - break; - case ONE_S_LL_VERBOSE: - levelString = @"VERBOSE: "; - break; - - default: - break; - } - if (logLevel <= _visualLogLevel) { - [[OneSignalDialogController sharedInstance] presentDialogWithTitle:levelString withMessage:message withActions:nil cancelTitle:NSLocalizedString(@"Close", @"Close button") withActionCompletion:nil]; + } + + [OSOutcomes.sharedController sendSessionEndOutcomes:totalTimeActive + appId:[OneSignalConfigManager getAppId] + pushSubscriptionId:pushSubscriptionId + onesignalId:onesignalId + influenceParams:params.influenceParams + onSuccess:successBlock + onFailure:failureBlock]; } @end @@ -3041,8 +724,8 @@ + (void)onesignalLog:(ONE_S_LOG_LEVEL)logLevel message:(NSString* _Nonnull)messa @implementation OneSignal (SessionStatusDelegate) + (void)onSessionEnding:(NSArray *)lastInfluences { - if (_outcomeEventsController) - [_outcomeEventsController clearOutcomes]; + if ([OSOutcomes sharedController]) + [OSOutcomes.sharedController clearOutcomes]; [OneSignalTracker onSessionEnded:lastInfluences]; } @@ -3072,10 +755,10 @@ @implementation UIApplication (OneSignal) + (void)load { if ([self shouldDisableBasedOnProcessArguments]) { - [OneSignal onesignalLog:ONE_S_LL_WARN message:@"OneSignal method swizzling is disabled. Make sure the feature is enabled for production."]; + [OneSignalLog onesignalLog:ONE_S_LL_WARN message:@"OneSignal method swizzling is disabled. Make sure the feature is enabled for production."]; return; } - [OneSignal onesignalLog:ONE_S_LL_VERBOSE message:@"UIApplication(OneSignal) LOADED!"]; + [OneSignalLog onesignalLog:ONE_S_LL_VERBOSE message:@"UIApplication(OneSignal) LOADED!"]; // Prevent Xcode storyboard rendering process from crashing with custom IBDesignable Views or from hostless unit tests or share-extension. // https://github.com/OneSignal/OneSignal-iOS-SDK/issues/160 @@ -3096,27 +779,17 @@ + (void)load { @selector(oneSignalLoadedTagSelector:) ); if (existing) { - [OneSignal onesignalLog:ONE_S_LL_WARN message:@"Already swizzled UIApplication.setDelegate. Make sure the OneSignal library wasn't loaded into the runtime twice!"]; + [OneSignalLog onesignalLog:ONE_S_LL_WARN message:@"Already swizzled UIApplication.setDelegate. Make sure the OneSignal library wasn't loaded into the runtime twice!"]; return; } - // Swizzle - UIApplication delegate - injectSelector( - [UIApplication class], - @selector(setDelegate:), - [OneSignalAppDelegate class], - @selector(setOneSignalDelegate:) - ); - injectSelector( - [UIApplication class], - @selector(setApplicationIconBadgeNumber:), - [OneSignalAppDelegate class], - @selector(onesignalSetApplicationIconBadgeNumber:) - ); - - [self setupUNUserNotificationCenterDelegate]; + [OSNotificationsManager start]; + [[OSMigrationController new] migrate]; - sessionLaunchTime = [NSDate date]; +// sessionLaunchTime = [NSDate date]; + // TODO: sessionLaunchTime used to always be set in load + + [OSDialogInstanceManager setSharedInstance:[OneSignalDialogController sharedInstance]]; } /* @@ -3129,14 +802,6 @@ - (void)onesignalSetApplicationIconBadgeNumber:(NSInteger)badge { [self onesignalSetApplicationIconBadgeNumber:badge]; } -+(void)setupUNUserNotificationCenterDelegate { - // Swizzle - UNUserNotificationCenter delegate - iOS 10+ - if (!NSClassFromString(@"UNUserNotificationCenter")) - return; - - [OneSignalUNUserNotificationCenter setup]; -} - +(BOOL) shouldDisableBasedOnProcessArguments { if ([NSProcessInfo.processInfo.arguments containsObject:@"DISABLE_ONESIGNAL_SWIZZLING"]) { return YES; diff --git a/iOS_SDK/OneSignalSDK/Source/OneSignalCacheCleaner.m b/iOS_SDK/OneSignalSDK/Source/OneSignalCacheCleaner.m deleted file mode 100644 index a312069b0..000000000 --- a/iOS_SDK/OneSignalSDK/Source/OneSignalCacheCleaner.m +++ /dev/null @@ -1,58 +0,0 @@ -/** -* Modified MIT License -* -* Copyright 2019 OneSignal -* -* Permission is hereby granted, free of charge, to any person obtaining a copy -* of this software and associated documentation files (the "Software"), to deal -* in the Software without restriction, including without limitation the rights -* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -* copies of the Software, and to permit persons to whom the Software is -* furnished to do so, subject to the following conditions: -* -* 1. The above copyright notice and this permission notice shall be included in -* all copies or substantial portions of the Software. -* -* 2. All copies of substantial portions of the Software may only be used in connection -* with services provided by OneSignal. -* -* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -* THE SOFTWARE. -*/ - -#import -#import "OneSignalCacheCleaner.h" -#import "OneSignalHelper.h" - -@implementation OneSignalCacheCleaner - -+ (void)cleanCachedUserData { - [self cleanUniqueOutcomeNotifications]; - [OneSignalHelper clearCachedMedia]; -} - -/* - Iterate through all stored cached OSUniqueOutcomeNotification and clean any items over 7 days old - */ -+ (void)cleanUniqueOutcomeNotifications { - NSArray *uniqueOutcomeNotifications = [OneSignalUserDefaults.initShared getSavedCodeableDataForKey:OSUD_CACHED_ATTRIBUTED_UNIQUE_OUTCOME_EVENT_NOTIFICATION_IDS_SENT defaultValue:nil]; - - NSTimeInterval timeInSeconds = [[NSDate date] timeIntervalSince1970]; - NSMutableArray *finalNotifications = [NSMutableArray new]; - for (OSCachedUniqueOutcome *notif in uniqueOutcomeNotifications) { - - // Save notif if it has been stored for less than or equal to a week - NSTimeInterval diff = timeInSeconds - [notif.timestamp doubleValue]; - if (diff <= WEEK_IN_SECONDS) - [finalNotifications addObject:notif]; - } - - [OneSignalUserDefaults.initShared saveCodeableDataForKey:OSUD_CACHED_ATTRIBUTED_UNIQUE_OUTCOME_EVENT_NOTIFICATION_IDS_SENT withValue:finalNotifications]; -} - -@end diff --git a/iOS_SDK/OneSignalSDK/Source/OneSignalDialogController.h b/iOS_SDK/OneSignalSDK/Source/OneSignalDialogController.h index 4810267e8..e7674b180 100644 --- a/iOS_SDK/OneSignalSDK/Source/OneSignalDialogController.h +++ b/iOS_SDK/OneSignalSDK/Source/OneSignalDialogController.h @@ -27,15 +27,12 @@ #import #import +#import NS_ASSUME_NONNULL_BEGIN -typedef void (^OSDialogActionCompletion)(int tappedActionIndex); -@interface OneSignalDialogController : NSObject +@interface OneSignalDialogController : NSObject + (instancetype _Nonnull)sharedInstance; -- (void)presentDialogWithTitle:(NSString * _Nonnull)title withMessage:(NSString * _Nonnull)message withActions:(NSArray * _Nullable)actionTitles cancelTitle:(NSString * _Nonnull)cancelTitle withActionCompletion:(OSDialogActionCompletion _Nullable)completion; - -- (void)clearQueue; @end NS_ASSUME_NONNULL_END diff --git a/iOS_SDK/OneSignalSDK/Source/OneSignalDialogController.m b/iOS_SDK/OneSignalSDK/Source/OneSignalDialogController.m index 991d9a60f..3377549f0 100644 --- a/iOS_SDK/OneSignalSDK/Source/OneSignalDialogController.m +++ b/iOS_SDK/OneSignalSDK/Source/OneSignalDialogController.m @@ -41,13 +41,6 @@ @interface OneSignalDialogController () @end -@interface OneSignal () - -+ (void)handleNotificationOpened:(NSDictionary*)messageDict - actionType:(OSNotificationActionType)actionType; - -@end - @implementation OneSignalDialogController + (instancetype _Nonnull)sharedInstance { @@ -62,16 +55,6 @@ + (instancetype _Nonnull)sharedInstance { return sharedInstance; } -- (NSArray *)getActionTitlesFromNotification:(OSNotification *)notification { - NSMutableArray *actionTitles = [NSMutableArray new]; - if (notification.actionButtons) { - for (id button in notification.actionButtons) { - [actionTitles addObject:button[@"text"]]; - } - } - return actionTitles; -} - - (void)presentDialogWithTitle:(NSString * _Nonnull)title withMessage:(NSString * _Nonnull)message withActions:(NSArray * _Nullable)actionTitles cancelTitle:(NSString * _Nonnull)cancelTitle withActionCompletion:(OSDialogActionCompletion _Nullable)completion { //ensure this UI code executes on the main thread diff --git a/iOS_SDK/OneSignalSDK/Source/OneSignalFramework.h b/iOS_SDK/OneSignalSDK/Source/OneSignalFramework.h new file mode 100755 index 000000000..5cffcce44 --- /dev/null +++ b/iOS_SDK/OneSignalSDK/Source/OneSignalFramework.h @@ -0,0 +1,116 @@ +/** + Modified MIT License + + Copyright 2017 OneSignal + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + 1. The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + 2. All copies of substantial portions of the Software may only be used in connection + with services provided by OneSignal. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + */ + +/** + ### Setting up the SDK ### + Follow the documentation from https://documentation.onesignal.com/docs/ios-sdk-setupto setup OneSignal in your app. + + ### API Reference ### + Follow the documentation from https://documentation.onesignal.com/docs/ios-sdk-api for a detailed explanation of the API. + + ### Troubleshoot ### + Follow the documentation from https://documentation.onesignal.com/docs/troubleshooting-ios to fix common problems. + + For help on how to upgrade your code from 1.* SDK to 2.*: https://documentation.onesignal.com/docs/upgrading-to-ios-sdk-20 + + ### More ### + iOS Push Cert: https://documentation.onesignal.com/docs/generating-an-ios-push-certificate +*/ + +#import +#import +#import +#import +#import +#import +#import +#import "OneSignalLiveActivityController.h" + +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wstrict-prototypes" +#pragma clang diagnostic ignored "-Wnullability-completeness" + +typedef void (^OSWebOpenURLResultBlock)(BOOL shouldOpen); + +/*Block for generic results on success and errors on failure*/ +typedef void (^OSResultSuccessBlock)(NSDictionary* result); +typedef void (^OSFailureBlock)(NSError* error); + +// ======= OneSignal Class Interface ========= +@interface OneSignal : NSObject + ++ (NSString* _Nonnull)sdkVersionRaw; ++ (NSString* _Nonnull)sdkSemanticVersion; + +#pragma mark User ++ (id)User NS_REFINED_FOR_SWIFT; ++ (void)login:(NSString * _Nonnull)externalId; ++ (void)login:(NSString * _Nonnull)externalId withToken:(NSString * _Nullable)token +NS_SWIFT_NAME(login(externalId:token:)); ++ (void)logout; + +#pragma mark Notifications ++ (Class)Notifications NS_REFINED_FOR_SWIFT; + +#pragma mark Initialization ++ (void)setLaunchOptions:(nullable NSDictionary*)newLaunchOptions; // meant for use by wrappers ++ (void)initialize:(nonnull NSString*)newAppId withLaunchOptions:(nullable NSDictionary*)launchOptions; ++ (void)setProvidesNotificationSettingsView:(BOOL)providesView; + +#pragma mark Live Activity ++ (Class)LiveActivities NS_REFINED_FOR_SWIFT; + +#pragma mark Logging ++ (Class)Debug NS_REFINED_FOR_SWIFT; + +#pragma mark Privacy Consent +/** + * Set to `true` if your application requires privacy consent. + * Consent should be provided prior to the invocation of `initialize` to ensure compliance. + */ ++ (void)setConsentRequired:(BOOL)required; ++ (void)setConsentGiven:(BOOL)granted; + +#pragma mark In-App Messaging ++ (Class)InAppMessages NS_REFINED_FOR_SWIFT; + +#pragma mark Location ++ (Class)Location NS_REFINED_FOR_SWIFT; + +#pragma mark Session ++ (Class)Session NS_REFINED_FOR_SWIFT; + +#pragma mark Extension +// iOS 10 only +// Process from Notification Service Extension. +// Used for iOS Media Attachemtns and Action Buttons. ++ (UNMutableNotificationContent*)didReceiveNotificationExtensionRequest:(UNNotificationRequest* _Nonnull)request withMutableNotificationContent:(UNMutableNotificationContent* _Nullable)replacementContent __deprecated_msg("Please use didReceiveNotificationExtensionRequest:withMutableNotificationContent:withContentHandler: instead."); ++ (UNMutableNotificationContent*)didReceiveNotificationExtensionRequest:(UNNotificationRequest* _Nonnull)request withMutableNotificationContent:(UNMutableNotificationContent* _Nullable)replacementContent withContentHandler:(void (^)(UNNotificationContent *_Nonnull))contentHandler; ++ (UNMutableNotificationContent*)serviceExtensionTimeWillExpireRequest:(UNNotificationRequest* _Nonnull)request withMutableNotificationContent:(UNMutableNotificationContent* _Nullable)replacementContent; +@end + +#pragma clang diagnostic pop diff --git a/iOS_SDK/OneSignalSDK/Source/OneSignalHelper.h b/iOS_SDK/OneSignalSDK/Source/OneSignalHelper.h index 66344f0ae..86c1e05ce 100644 --- a/iOS_SDK/OneSignalSDK/Source/OneSignalHelper.h +++ b/iOS_SDK/OneSignalSDK/Source/OneSignalHelper.h @@ -25,11 +25,8 @@ * THE SOFTWARE. */ -#import "OneSignal.h" #import "OneSignalInternal.h" -#import "OneSignalWebView.h" -#import "UIApplication+OneSignal.h" -#import "NSDateFormatter+OneSignal.h" +#import #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wdeprecated-declarations" @@ -37,40 +34,8 @@ @interface OneSignalHelper : NSObject // - Web -+ (OneSignalWebView*)webVC; + (void) displayWebView:(NSURL*)url; -// - Notification Opened -+ (NSMutableDictionary*) formatApsPayloadIntoStandard:(NSDictionary*)remoteUserInfo identifier:(NSString*)identifier; -+ (void)lastMessageReceived:(NSDictionary*)message; - -+ (void)setNotificationOpenedBlock:(OSNotificationOpenedBlock)block; -+ (void)setNotificationWillShowInForegroundBlock:(OSNotificationWillShowInForegroundBlock)block; -+ (void)handleWillShowInForegroundHandlerForNotification:(OSNotification *)notification completion:(OSNotificationDisplayResponse)completion; -+ (void)handleNotificationAction:(OSNotificationActionType)actionType actionID:(NSString*)actionID; -+ (BOOL)handleIAMPreview:(OSNotification *)notification; - -// - iOS 10 -+ (void)clearCachedMedia; -+ (UNNotificationRequest*)prepareUNNotificationRequest:(OSNotification*)notification; -+ (void)addNotificationRequest:(OSNotification*)notification completionHandler:(void (^)(UIBackgroundFetchResult))completionHandler; - -// - Notifications -+ (UILocalNotification*)prepareUILocalNotification:(OSNotification*)notification; -+ (BOOL)verifyURL:(NSString*)urlString; -+ (BOOL)isRemoteSilentNotification:(NSDictionary*)msg; -+ (BOOL)isDisplayableNotification:(NSDictionary*)msg; -+ (BOOL)isOneSignalPayload:(NSDictionary *)payload; - -// - Networking -+ (NSNumber*)getNetType; - -// Util -+ (NSString *)getCurrentDeviceVersion; -+ (BOOL)isIOSVersionGreaterThanOrEqual:(NSString *)version; -+ (BOOL)isIOSVersionLessThan:(NSString *)version; -+ (NSString*)getDeviceVariant; - // Threading + (void)runOnMainThread:(void(^)())block; + (void)dispatch_async_on_main_queue:(void(^)())block; @@ -80,7 +45,6 @@ + (BOOL) isValidEmail:(NSString*)email; + (NSString*)hashUsingSha1:(NSString*)string; + (NSString*)hashUsingMD5:(NSString*)string; -+ (NSString*)trimURLSpacing:(NSString*)url; + (BOOL)isTablet; #pragma clang diagnostic pop diff --git a/iOS_SDK/OneSignalSDK/Source/OneSignalHelper.m b/iOS_SDK/OneSignalSDK/Source/OneSignalHelper.m index fef164465..c7848b99d 100644 --- a/iOS_SDK/OneSignalSDK/Source/OneSignalHelper.m +++ b/iOS_SDK/OneSignalSDK/Source/OneSignalHelper.m @@ -29,16 +29,12 @@ #import #import #import -#import "OneSignalReachability.h" #import "OneSignalHelper.h" #import #import #import #import "OneSignalInternal.h" #import "OneSignalDialogController.h" -#import "OSMessagingController.h" -#import "OneSignalNotificationCategoryController.h" -#import "OSNotification+OneSignal.h" #define NOTIFICATION_TYPE_ALL 7 #pragma clang diagnostic push @@ -54,372 +50,13 @@ @interface OneSignal () + (NSString*)mUserId; @end -@implementation OSNotificationAction -@synthesize type = _type, actionId = _actionId; - --(id)initWithActionType:(OSNotificationActionType)type :(NSString*)actionID { - self = [super init]; - if(self) { - _type = type; - _actionId = actionID; - } - return self; -} - -@end - -@implementation OSNotificationOpenedResult -@synthesize notification = _notification, action = _action; - -- (id)initWithNotification:(OSNotification*)notification action:(OSNotificationAction*)action { - self = [super init]; - if(self) { - _notification = notification; - _action = action; - } - return self; -} - -- (NSString*)stringify { - NSError * err; - NSDictionary *jsonDictionary = [self jsonRepresentation]; - NSData * jsonData = [NSJSONSerialization dataWithJSONObject:jsonDictionary options:0 error:&err]; - return [[NSString alloc] initWithData:jsonData encoding:NSUTF8StringEncoding]; -} - -// Convert the class into a NSDictionary -- (NSDictionary *_Nonnull)jsonRepresentation { - NSError * jsonError = nil; - NSData *objectData = [[self.notification stringify] dataUsingEncoding:NSUTF8StringEncoding]; - NSDictionary *notifDict = [NSJSONSerialization JSONObjectWithData:objectData - options:NSJSONReadingMutableContainers - error:&jsonError]; - - NSMutableDictionary* obj = [NSMutableDictionary new]; - NSMutableDictionary* action = [NSMutableDictionary new]; - [action setObject:self.action.actionId forKeyedSubscript:@"actionID"]; - [obj setObject:action forKeyedSubscript:@"action"]; - [obj setObject:notifDict forKeyedSubscript:@"notification"]; - if(self.action.type) - [obj[@"action"] setObject:@(self.action.type) forKeyedSubscript: @"type"]; - - return obj; -} - -@end - @implementation OneSignalHelper -static var lastMessageID = @""; -static NSString *_lastMessageIdFromAction; - -NSDictionary* lastMessageReceived; -UIBackgroundTaskIdentifier mediaBackgroundTask; - -static NSMutableArray *unprocessedOpenedNotifis; - -+ (void)resetLocals { - [OneSignalHelper lastMessageReceived:nil]; - _lastMessageIdFromAction = nil; - lastMessageID = @""; - - notificationWillShowInForegroundHandler = nil; - notificationOpenedHandler = nil; - - unprocessedOpenedNotifis = nil; -} - -OSNotificationWillShowInForegroundBlock notificationWillShowInForegroundHandler; -+ (void)setNotificationWillShowInForegroundBlock:(OSNotificationWillShowInForegroundBlock)block { - notificationWillShowInForegroundHandler = block; -} - -OSNotificationOpenedBlock notificationOpenedHandler; -+ (void)setNotificationOpenedBlock:(OSNotificationOpenedBlock)block { - notificationOpenedHandler = block; - [self fireNotificationOpenedHandlerForUnprocessedEvents]; -} - -+ (NSMutableArray*)getUnprocessedOpenedNotifis { - if (!unprocessedOpenedNotifis) - unprocessedOpenedNotifis = [NSMutableArray new]; - return unprocessedOpenedNotifis; -} - -+ (void)addUnprocessedOpenedNotifi:(OSNotificationOpenedResult*)result { - [[self getUnprocessedOpenedNotifis] addObject:result]; -} - -+ (void)fireNotificationOpenedHandlerForUnprocessedEvents { - if (!notificationOpenedHandler) - return; - - for (OSNotificationOpenedResult* notification in [self getUnprocessedOpenedNotifis]) { - notificationOpenedHandler(notification); - } - unprocessedOpenedNotifis = [NSMutableArray new]; -} - -//Passed to the OnFocus to make sure dismissed when coming back into app -OneSignalWebView *webVC; -+ (OneSignalWebView*)webVC { - return webVC; -} - -+ (void)beginBackgroundMediaTask { - mediaBackgroundTask = [[UIApplication sharedApplication] beginBackgroundTaskWithExpirationHandler:^{ - [OneSignalHelper endBackgroundMediaTask]; - }]; -} - -+ (void)endBackgroundMediaTask { - [[UIApplication sharedApplication] endBackgroundTask: mediaBackgroundTask]; - mediaBackgroundTask = UIBackgroundTaskInvalid; -} - -+ (BOOL)isRemoteSilentNotification:(NSDictionary*)msg { - //no alert, sound, or badge payload - if(msg[@"badge"] || msg[@"aps"][@"badge"] || msg[@"m"] || msg[@"o"] || msg[@"s"] || (msg[@"title"] && [msg[@"title"] length] > 0) || msg[@"sound"] || msg[@"aps"][@"sound"] || msg[@"aps"][@"alert"] || msg[@"os_data"][@"buttons"]) - return false; - return true; -} - -+ (BOOL)isDisplayableNotification:(NSDictionary*)msg { - if ([self isRemoteSilentNotification:msg]) { - return false; - } - return msg[@"aps"][@"alert"] != nil; -} - -+ (void)lastMessageReceived:(NSDictionary*)message { - lastMessageReceived = message; -} + (NSString*)getAppName { return [[[NSBundle mainBundle] infoDictionary] objectForKey:(id)kCFBundleNameKey]; } -+ (NSMutableDictionary*)formatApsPayloadIntoStandard:(NSDictionary*)remoteUserInfo identifier:(NSString*)identifier { - NSMutableDictionary* userInfo, *customDict, *additionalData, *optionsDict; - BOOL is2dot4Format = false; - - if (remoteUserInfo[@"os_data"]) { - userInfo = [remoteUserInfo mutableCopy]; - additionalData = [NSMutableDictionary dictionary]; - - if (remoteUserInfo[@"os_data"][@"buttons"]) { - - is2dot4Format = [userInfo[@"os_data"][@"buttons"] isKindOfClass:[NSArray class]]; - if (is2dot4Format) - optionsDict = userInfo[@"os_data"][@"buttons"]; - else - optionsDict = userInfo[@"os_data"][@"buttons"][@"o"]; - } - } - else if (remoteUserInfo[@"custom"]) { - userInfo = [remoteUserInfo mutableCopy]; - customDict = [userInfo[@"custom"] mutableCopy]; - if (customDict[@"a"]) - additionalData = [[NSMutableDictionary alloc] initWithDictionary:customDict[@"a"]]; - else - additionalData = [[NSMutableDictionary alloc] init]; - optionsDict = userInfo[@"o"]; - } - else { - return nil; - } - - if (optionsDict) { - NSMutableArray* buttonArray = [[NSMutableArray alloc] init]; - for (NSDictionary* button in optionsDict) { - [buttonArray addObject: @{@"text" : button[@"n"], - @"id" : (button[@"i"] ? button[@"i"] : button[@"n"])}]; - } - additionalData[@"actionButtons"] = buttonArray; - } - - if (![@"com.apple.UNNotificationDefaultActionIdentifier" isEqualToString:identifier]) - additionalData[@"actionSelected"] = identifier; - - if ([additionalData count] == 0) - additionalData = nil; - else if (remoteUserInfo[@"os_data"]) { - [userInfo addEntriesFromDictionary:additionalData]; - if (!is2dot4Format && userInfo[@"os_data"][@"buttons"]) - userInfo[@"aps"] = @{@"alert" : userInfo[@"os_data"][@"buttons"][@"m"]}; - } - - else { - customDict[@"a"] = additionalData; - userInfo[@"custom"] = customDict; - - if (userInfo[@"m"]) - userInfo[@"aps"] = @{@"alert" : userInfo[@"m"]}; - } - - return userInfo; -} - -+ (void)handleWillShowInForegroundHandlerForNotification:(OSNotification *)notification completion:(OSNotificationDisplayResponse)completion { - [notification setCompletionBlock:completion]; - if (notificationWillShowInForegroundHandler) { - [notification startTimeoutTimer]; - notificationWillShowInForegroundHandler(notification, [notification getCompletionBlock]); - } else { - completion(notification); - } -} - -// Prevent the OSNotification blocks from firing if we receive a Non-OneSignal remote push -+ (BOOL)isOneSignalPayload:(NSDictionary *)payload { - if (!payload) - return NO; - return payload[@"custom"][@"i"] || payload[@"os_data"][@"i"]; -} - -+ (void)handleNotificationAction:(OSNotificationActionType)actionType actionID:(NSString*)actionID { - if (![self isOneSignalPayload:lastMessageReceived]) - return; - - OSNotificationAction *action = [[OSNotificationAction alloc] initWithActionType:actionType :actionID]; - OSNotification *notification = [OSNotification parseWithApns:lastMessageReceived]; - OSNotificationOpenedResult *result = [[OSNotificationOpenedResult alloc] initWithNotification:notification action:action]; - - // Prevent duplicate calls to same action - if ([notification.notificationId isEqualToString:_lastMessageIdFromAction]) - return; - _lastMessageIdFromAction = notification.notificationId; - - [OneSignalTrackFirebaseAnalytics trackOpenEvent:result]; - - if (!notificationOpenedHandler) { - [self addUnprocessedOpenedNotifi:result]; - return; - } - notificationOpenedHandler(result); -} - -+ (BOOL)handleIAMPreview:(OSNotification *)notification { - NSString *uuid = [notification additionalData][ONESIGNAL_IAM_PREVIEW]; - if (uuid) { - - [OneSignal onesignalLog:ONE_S_LL_VERBOSE message:@"IAM Preview Detected, Begin Handling"]; - OSInAppMessageInternal *message = [OSInAppMessageInternal instancePreviewFromNotification:notification]; - [[OSMessagingController sharedInstance] presentInAppPreviewMessage:message]; - return YES; - } - return NO; -} - -+ (NSNumber *)getNetType { - OneSignalReachability* reachability = [OneSignalReachability reachabilityForInternetConnection]; - NetworkStatus status = [reachability currentReachabilityStatus]; - if (status == ReachableViaWiFi) - return @0; - return @1; -} - -+ (NSString *)getCurrentDeviceVersion { - return [[UIDevice currentDevice] systemVersion]; -} - -+ (BOOL)isIOSVersionGreaterThanOrEqual:(NSString *)version { - return [[self getCurrentDeviceVersion] compare:version options:NSNumericSearch] != NSOrderedAscending; -} - -+ (BOOL)isIOSVersionLessThan:(NSString *)version { - return [[self getCurrentDeviceVersion] compare:version options:NSNumericSearch] == NSOrderedAscending; -} - -+ (NSString*)getSystemInfoMachine { - // e.g. @"x86_64" or @"iPhone9,3" - struct utsname systemInfo; - uname(&systemInfo); - return [NSString stringWithCString:systemInfo.machine - encoding:NSUTF8StringEncoding]; -} - -// This will get real device model if it is a real iOS device (Example iPhone8,2) -// If an iOS Simulator it will return "Simulator iPhone" or "Simulator iPad" -// If a macOS Catalyst app, return "Mac" -+ (NSString*)getDeviceVariant { - let systemInfoMachine = [self getSystemInfoMachine]; - - // x86_64 could mean an iOS Simulator or Catalyst app on macOS - #if TARGET_OS_MACCATALYST - return @"Mac"; - #elif TARGET_OS_SIMULATOR - let model = UIDevice.currentDevice.model; - if (model) { - return [@"Simulator " stringByAppendingString:model]; - } else { - return @"Simulator"; - } - #endif - return systemInfoMachine; -} - -// For iOS 9 -+ (UILocalNotification*)createUILocalNotification:(OSNotification*)osNotification { - let notification = [UILocalNotification new]; - - let category = [UIMutableUserNotificationCategory new]; - [category setIdentifier:@"__dynamic__"]; - - NSMutableArray* actionArray = [NSMutableArray new]; - for (NSDictionary* button in osNotification.actionButtons) { - let action = [UIMutableUserNotificationAction new]; - action.title = button[@"text"]; - action.identifier = button[@"id"]; - action.activationMode = UIUserNotificationActivationModeForeground; - action.destructive = false; - action.authenticationRequired = false; - - [actionArray addObject:action]; - // iOS 8 shows notification buttons in reverse in all cases but alerts. - // This flips it so the frist button is on the left. - if (actionArray.count == 2) - [category setActions:@[actionArray[1], actionArray[0]] - forContext:UIUserNotificationActionContextMinimal]; - } - - [category setActions:actionArray forContext:UIUserNotificationActionContextDefault]; - - var currentCategories = [[[UIApplication sharedApplication] currentUserNotificationSettings] categories]; - if (currentCategories) - currentCategories = [currentCategories setByAddingObject:category]; - else - currentCategories = [NSSet setWithObject:category]; - - let notificationSettings = [UIUserNotificationSettings - settingsForTypes:NOTIFICATION_TYPE_ALL - categories:currentCategories]; - - [[UIApplication sharedApplication] registerUserNotificationSettings:notificationSettings]; - notification.category = [category identifier]; - - return notification; -} - -// iOS 9 -+ (UILocalNotification*)prepareUILocalNotification:(OSNotification *)osNotification { - let notification = [self createUILocalNotification:osNotification]; - - notification.alertTitle = osNotification.title; - - notification.alertBody = osNotification.body; - - notification.userInfo = osNotification.rawPayload; - - notification.soundName = osNotification.sound; - if (notification.soundName == nil) - notification.soundName = UILocalNotificationDefaultSoundName; - - notification.applicationIconBadgeNumber = osNotification.badge; - - return notification; -} - //Shared instance as OneSignal is delegate CLLocationManagerDelegate static OneSignal* singleInstance = nil; + (OneSignal*)sharedInstance { @@ -430,122 +67,15 @@ + (OneSignal*)sharedInstance { return singleInstance; } -+(NSString*)randomStringWithLength:(int)length { - let letters = @"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"; - let randomString = [[NSMutableString alloc] initWithCapacity:length]; - for(var i = 0; i < length; i++) { - let ln = (uint32_t)letters.length; - let rand = arc4random_uniform(ln); - [randomString appendFormat:@"%C", [letters characterAtIndex:rand]]; - } - return randomString; -} - -+ (UNNotificationRequest*)prepareUNNotificationRequest:(OSNotification*)notification { - let content = [UNMutableNotificationContent new]; - - [OneSignalAttachmentHandler addActionButtons:notification toNotificationContent:content]; - - content.title = notification.title; - content.subtitle = notification.subtitle; - content.body = notification.body; - - content.userInfo = notification.rawPayload; - - if (notification.sound) - content.sound = [UNNotificationSound soundNamed:notification.sound]; - else - content.sound = UNNotificationSound.defaultSound; - - if (notification.badge != 0) - content.badge = [NSNumber numberWithInteger:notification.badge]; - - // Check if media attached - [OneSignalAttachmentHandler addAttachments:notification toNotificationContent:content]; - - let trigger = [UNTimeIntervalNotificationTrigger triggerWithTimeInterval:0.25 repeats:NO]; - let identifier = [self randomStringWithLength:16]; - return [UNNotificationRequest requestWithIdentifier:identifier content:content trigger:trigger]; -} - -+ (void)addNotificationRequest:(OSNotification*)notification - completionHandler:(void (^)(UIBackgroundFetchResult))completionHandler { - - // Start background thread to download media so we don't lock the main UI thread. - dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{ - [OneSignalHelper beginBackgroundMediaTask]; - - let notificationRequest = [OneSignalHelper prepareUNNotificationRequest:notification]; - [[UNUserNotificationCenter currentNotificationCenter] - addNotificationRequest:notificationRequest - withCompletionHandler:^(NSError * _Nullable error) {}]; - if (completionHandler) - completionHandler(UIBackgroundFetchResultNewData); - - [OneSignalHelper endBackgroundMediaTask]; - }); - -} - -// TODO: Add back after testing -+ (void)clearCachedMedia { - /* - if (!NSClassFromString(@"UNUserNotificationCenter")) - return; - - NSArray* cachedFiles = [[NSUserDefaults standardUserDefaults] objectForKey:OSUD_TEMP_CACHED_NOTIFICATION_MEDIA]; - if (cachedFiles) { - NSArray * paths = NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES); - for (NSString* file in cachedFiles) { - NSString* filePath = [paths[0] stringByAppendingPathComponent:file]; - NSError* error; - [[NSFileManager defaultManager] removeItemAtPath:filePath error:&error]; - } - [[NSUserDefaults standardUserDefaults] removeObjectForKey:OSUD_TEMP_CACHED_NOTIFICATION_MEDIA]; - } - */ -} - -+ (BOOL)verifyURL:(NSString *)urlString { - if (urlString) { - NSURL* url = [NSURL URLWithString:urlString]; - if (url) - return YES; - } - - return NO; -} - -+ (BOOL)isWWWScheme:(NSURL*)url { - NSString* urlScheme = [url.scheme lowercaseString]; - return [urlScheme isEqualToString:@"http"] || [urlScheme isEqualToString:@"https"]; -} - -+ (void)displayWebView:(NSURL*)url { - // Check if in-app or safari - __block BOOL inAppLaunch = [OneSignalUserDefaults.initStandard getSavedBoolForKey:OSUD_NOTIFICATION_OPEN_LAUNCH_URL defaultValue:false]; - - // If the URL contains itunes.apple.com, it's an app store link - // that should be opened using sharedApplication openURL - if ([[url absoluteString] rangeOfString:@"itunes.apple.com"].location != NSNotFound) { - inAppLaunch = NO; - } - ++ (void)displayWebView:(NSURL*)url { __block let openUrlBlock = ^void(BOOL shouldOpen) { if (!shouldOpen) return; [OneSignalHelper dispatch_async_on_main_queue: ^{ dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.25 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ - if (inAppLaunch && [self isWWWScheme:url]) { - if (!webVC) - webVC = [[OneSignalWebView alloc] init]; - webVC.url = url; - [webVC showInApp]; - } else { - // Keep dispatch_async. Without this the url can take an extra 2 to 10 secounds to open. - [[UIApplication sharedApplication] openURL:url]; - } + // Keep dispatch_async. Without this the url can take an extra 2 to 10 secounds to open. + [[UIApplication sharedApplication] openURL:url]; }); }]; }; @@ -600,13 +130,6 @@ + (NSString*)hashUsingMD5:(NSString*)string { return output; } -+ (NSString*)trimURLSpacing:(NSString*)url { - if (!url) - return url; - - return [url stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceCharacterSet]]; -} - + (BOOL)isTablet { return UIDevice.currentDevice.userInterfaceIdiom == UIUserInterfaceIdiomPad; } diff --git a/iOS_SDK/OneSignalSDK/Source/OneSignalInternal.h b/iOS_SDK/OneSignalSDK/Source/OneSignalInternal.h index dad8918c1..5a8f6cf3f 100644 --- a/iOS_SDK/OneSignalSDK/Source/OneSignalInternal.h +++ b/iOS_SDK/OneSignalSDK/Source/OneSignalInternal.h @@ -31,67 +31,17 @@ #ifndef OneSignalInternal_h #define OneSignalInternal_h -#import "OneSignal.h" +#import "OneSignalFramework.h" #import "OSObservable.h" #import "OneSignalNotificationSettings.h" #import "OSPermission.h" -#import "OSSubscription.h" -#import "OSEmailSubscription.h" -#import "OSPlayerTags.h" -#import "OSSMSSubscription.h" - -// Permission + Subscription - Redefine OSPermissionSubscriptionState -@interface OSPermissionSubscriptionState : NSObject - -@property (readwrite) OSPermissionState* _Nonnull permissionStatus; -@property (readwrite) OSSubscriptionState* _Nonnull subscriptionStatus; -@property (readwrite) OSEmailSubscriptionState* _Nonnull emailSubscriptionStatus; -@property (readwrite) OSSMSSubscriptionState* _Nonnull smsSubscriptionStatus; -- (NSDictionary* _Nonnull)toDictionary; - -@end @interface OneSignal (OneSignalInternal) -+ (void)updateNotificationTypes:(int)notificationTypes; -+ (BOOL)registerForAPNsToken; -+ (void)setWaitingForApnsResponse:(BOOL)value; -+ (BOOL)shouldPromptToShowURL; -+ (void)setIsOnSessionSuccessfulForCurrentState:(BOOL)value; -+ (BOOL)shouldRegisterNow; -+ (void)receivedInAppMessageJson:(NSArray *_Nullable)messagesJson; -+ (void)sendTagsOnBackground; - -+ (NSDate *_Nonnull)sessionLaunchTime; - -// Indicates if the app provides its own custom Notification customization settings UI -// To enable this, set kOSSettingsKeyProvidesAppNotificationSettings to true in init. -+ (BOOL)providesAppNotificationSettings; - -+ (NSString* _Nonnull)parseNSErrorAsJsonString:(NSError* _Nonnull)error; - @property (class, readonly) BOOL didCallDownloadParameters; @property (class, readonly) BOOL downloadedParameters; -//Indicates we have attempted to register the user and it has succeeded or failed -@property (class, readonly) BOOL isRegisterUserFinished; -//Indicates that registering the user was successful -@property (class, readonly) BOOL isRegisterUserSuccessful; - -@property (class) NSObject* _Nonnull osNotificationSettings; -@property (class) OSPermissionState* _Nonnull currentPermissionState; - -@property (class) AppEntryAction appEntryState; -@property (class) OSSessionManager* _Nonnull sessionManager; - -+ (OSPermissionSubscriptionState*_Nonnull)getPermissionSubscriptionState; - -+ (OSPlayerTags *_Nonnull)getPlayerTags; - -@end -@interface OSDeviceState (OSDeviceStateInternal) -- (instancetype _Nonnull)initWithSubscriptionState:(OSPermissionSubscriptionState *_Nonnull)state; @end #endif /* OneSignalInternal_h */ diff --git a/iOS_SDK/OneSignalSDK/Source/OneSignalLifecycleObserver.m b/iOS_SDK/OneSignalSDK/Source/OneSignalLifecycleObserver.m index b3ef24852..82011b306 100644 --- a/iOS_SDK/OneSignalSDK/Source/OneSignalLifecycleObserver.m +++ b/iOS_SDK/OneSignalSDK/Source/OneSignalLifecycleObserver.m @@ -27,12 +27,10 @@ of this software and associated documentation files (the "Software"), to deal #import #import "OneSignalLifecycleObserver.h" -#import "OneSignal.h" #import "OneSignalInternal.h" #import "OneSignalCommonDefines.h" #import "OneSignalTracker.h" -#import "OneSignalLocation.h" -#import "OSMessagingController.h" +#import #import "UIApplication+OneSignal.h" @implementation OneSignalLifecycleObserver @@ -60,7 +58,7 @@ + (void)registerLifecycleObserver { + (void)registerLifecycleObserverAsUIScene { if (@available(iOS 13.0, *)) { - [OneSignal onesignalLog:ONE_S_LL_VERBOSE message:@"registering for Scene Lifecycle notifications"]; + [OneSignalLog onesignalLog:ONE_S_LL_VERBOSE message:@"registering for Scene Lifecycle notifications"]; [[NSNotificationCenter defaultCenter] addObserver:[OneSignalLifecycleObserver sharedInstance] selector:@selector(didEnterBackground) name:@"UISceneDidEnterBackgroundNotification" object:nil]; [[NSNotificationCenter defaultCenter] addObserver:[OneSignalLifecycleObserver sharedInstance] selector:@selector(didBecomeActive) name:@"UISceneDidActivateNotification" object:nil]; [[NSNotificationCenter defaultCenter] addObserver:[OneSignalLifecycleObserver sharedInstance] selector:@selector(willResignActive) name:@"UISceneWillDeactivateNotification" object:nil]; @@ -68,7 +66,7 @@ + (void)registerLifecycleObserverAsUIScene { } + (void)registerLifecycleObserverAsUIApplication { - [OneSignal onesignalLog:ONE_S_LL_VERBOSE message:@"registering for Application Lifecycle notifications"]; + [OneSignalLog onesignalLog:ONE_S_LL_VERBOSE message:@"registering for Application Lifecycle notifications"]; [[NSNotificationCenter defaultCenter] addObserver:[OneSignalLifecycleObserver sharedInstance] selector:@selector(didEnterBackground) name:UIApplicationDidEnterBackgroundNotification object:nil]; [[NSNotificationCenter defaultCenter] addObserver:[OneSignalLifecycleObserver sharedInstance] selector:@selector(didBecomeActive) name:UIApplicationDidBecomeActiveNotification object:nil]; [[NSNotificationCenter defaultCenter] addObserver:[OneSignalLifecycleObserver sharedInstance] selector:@selector(willResignActive) name:UIApplicationWillResignActiveNotification object:nil]; @@ -79,33 +77,43 @@ + (void)removeObserver { } - (void)didBecomeActive { - [OneSignal onesignalLog:ONE_S_LL_VERBOSE message:@"application/scene didBecomeActive"]; + [OneSignalLog onesignalLog:ONE_S_LL_VERBOSE message:@"application/scene didBecomeActive"]; - if ([OneSignal appId]) { + if ([OneSignalConfigManager getAppId]) { [OneSignalTracker onFocus:NO]; - [OneSignalLocation onFocus:YES]; - [[OSMessagingController sharedInstance] onApplicationDidBecomeActive]; + let oneSignalLocation = NSClassFromString(@"OneSignalLocation"); + if (oneSignalLocation != nil && [oneSignalLocation respondsToSelector:@selector(onFocus:)]) { + [OneSignalCoreHelper callSelector:@selector(onFocus:) onObject:oneSignalLocation withArg:YES]; + } + let oneSignalInAppMessages = NSClassFromString(@"OneSignalInAppMessages"); + if (oneSignalInAppMessages != nil && [oneSignalInAppMessages respondsToSelector:@selector(onApplicationDidBecomeActive)]) { + [oneSignalInAppMessages performSelector:@selector(onApplicationDidBecomeActive)]; + } } } - (void)willResignActive { - [OneSignal onesignalLog:ONE_S_LL_VERBOSE message:@"application/scene willResignActive"]; - [OneSignalTracker willResignActiveTriggered]; - if ([OneSignal appId]) { + [OneSignalLog onesignalLog:ONE_S_LL_VERBOSE message:@"application/scene willResignActive"]; + + if ([OneSignalConfigManager getAppId]) { [OneSignalTracker onFocus:YES]; - [OneSignal sendTagsOnBackground]; + // TODO: Method no longer exists, transitions into flushing operation repo on backgrounding. + // [OneSignal sendTagsOnBackground]; } } - (void)didEnterBackground { - [OneSignal onesignalLog:ONE_S_LL_VERBOSE message:@"application/scene didEnterBackground"]; - [OneSignalTracker didEnterBackgroundTriggered]; - if ([OneSignal appId]) - [OneSignalLocation onFocus:NO]; + [OneSignalLog onesignalLog:ONE_S_LL_VERBOSE message:@"application/scene didEnterBackground"]; + if ([OneSignalConfigManager getAppId]) { + let oneSignalLocation = NSClassFromString(@"OneSignalLocation"); + if (oneSignalLocation != nil && [oneSignalLocation respondsToSelector:@selector(onFocus:)]) { + [OneSignalCoreHelper callSelector:@selector(onFocus:) onObject:oneSignalLocation withArg:NO]; + } + } } - (void)dealloc { - [OneSignal onesignalLog:ONE_S_LL_VERBOSE message:@"lifecycle observer deallocated"]; + [OneSignalLog onesignalLog:ONE_S_LL_VERBOSE message:@"lifecycle observer deallocated"]; [[NSNotificationCenter defaultCenter] removeObserver:self]; } diff --git a/iOS_SDK/OneSignalSDK/Source/OneSignalLiveActivityController.h b/iOS_SDK/OneSignalSDK/Source/OneSignalLiveActivityController.h new file mode 100644 index 000000000..43233bc0e --- /dev/null +++ b/iOS_SDK/OneSignalSDK/Source/OneSignalLiveActivityController.h @@ -0,0 +1,47 @@ +/** + * Modified MIT License + * + * Copyright 2023 OneSignal + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * 1. The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * 2. All copies of substantial portions of the Software may only be used in connection + * with services provided by OneSignal. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#ifndef OneSignalLiveActivityController_h +#define OneSignalLiveActivityController_h + +#import + +/** + Public API for the LiveActivities namespace. + */ +@protocol OSLiveActivities ++ (void)enter:(NSString * _Nonnull)activityId withToken:(NSString * _Nonnull)token; ++ (void)enter:(NSString * _Nonnull)activityId withToken:(NSString * _Nonnull)token withSuccess:(OSResultSuccessBlock _Nullable)successBlock withFailure:(OSFailureBlock _Nullable)failureBlock; ++ (void)exit:(NSString * _Nonnull)activityId; ++ (void)exit:(NSString * _Nonnull)activityId withSuccess:(OSResultSuccessBlock _Nullable)successBlock withFailure:(OSFailureBlock _Nullable)failureBlock; +@end + +@interface OneSignalLiveActivityController: NSObject ++ (Class_Nonnull)LiveActivities; +@end + +#endif /* OneSignalLiveActivityController_h */ diff --git a/iOS_SDK/OneSignalSDK/Source/OneSignalLiveActivityController.m b/iOS_SDK/OneSignalSDK/Source/OneSignalLiveActivityController.m new file mode 100644 index 000000000..d068ba405 --- /dev/null +++ b/iOS_SDK/OneSignalSDK/Source/OneSignalLiveActivityController.m @@ -0,0 +1,243 @@ +/** + * Modified MIT License + * + * Copyright 2023 OneSignal + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * 1. The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * 2. All copies of substantial portions of the Software may only be used in connection + * with services provided by OneSignal. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#import +#import +#import "OneSignalLiveActivityController.h" + +@interface OSPendingLiveActivityUpdate: NSObject + @property NSString* activityId; + @property NSString* appId; + @property NSString* token; + @property BOOL isEnter; + @property OSResultSuccessBlock successBlock; + @property OSFailureBlock failureBlock; + - (id)initWith:(NSString * _Nonnull)activityId + appId:(NSString * _Nonnull)appId + withToken:(NSString * _Nonnull)token + isEnter:(BOOL)isEnter + withSuccess:(OSResultSuccessBlock _Nullable)successBlock + withFailure:(OSFailureBlock _Nullable)failureBlock; +@end + +@implementation OSPendingLiveActivityUpdate + +- (id)initWith:(NSString * _Nonnull)activityId + appId:(NSString * _Nonnull)appId + withToken:(NSString *)token + isEnter:(BOOL)isEnter + withSuccess:(OSResultSuccessBlock)successBlock + withFailure:(OSFailureBlock)failureBlock { + self.token = token; + self.activityId = activityId; + self.appId = appId; + self.isEnter = isEnter; + self.successBlock = successBlock; + self.failureBlock = failureBlock; + return self; +}; +@end + +@implementation OneSignalLiveActivityController + +static NSMutableArray* pendingLiveActivityUpdates; +static NSString* subscriptionId; + +static OneSignalLiveActivityController *sharedInstance = nil; +static dispatch_once_t once; ++ (OneSignalLiveActivityController *)sharedInstance { + dispatch_once(&once, ^{ + sharedInstance = [OneSignalLiveActivityController new]; + }); + return sharedInstance; +} + ++ (Class)LiveActivities { + return self; +} + ++ (void)initialize { + subscriptionId = OneSignalUserManagerImpl.sharedInstance.pushSubscriptionId; + OneSignalLiveActivityController *shared = OneSignalLiveActivityController.sharedInstance; + [OneSignalUserManagerImpl.sharedInstance addObserver:shared]; +} + +- (void)onPushSubscriptionDidChangeWithState:(OSPushSubscriptionChangedState * _Nonnull)state { + if(state.current.id){ + subscriptionId = OneSignalUserManagerImpl.sharedInstance.pushSubscriptionId; + [OneSignalLiveActivityController executePendingLiveActivityUpdates]; + } +} + ++ (void)enter:(NSString * _Nonnull)activityId withToken:(NSString * _Nonnull)token { + + if ([OSPrivacyConsentController shouldLogMissingPrivacyConsentErrorWithMethodName:@"enterLiveActivity:"]) + return; + + [self enter:activityId withToken:token withSuccess:nil withFailure:nil]; +} + ++ (void)enter:(NSString * _Nonnull)activityId withToken:(NSString * _Nonnull)token withSuccess:(OSResultSuccessBlock _Nullable)successBlock withFailure:(OSFailureBlock _Nullable)failureBlock{ + + if ([OSPrivacyConsentController shouldLogMissingPrivacyConsentErrorWithMethodName:@"enterLiveActivity:onSuccess:onFailure:"]) { + if (failureBlock) { + NSError *error = [NSError errorWithDomain:@"OneSignal.LiveActivities" code:0 userInfo:@{@"error" : @"Your application has called enterLiveActivity:onSuccess:onFailure: before the user granted privacy permission. Please call `consentGranted(bool)` in order to provide user privacy consent"}]; + failureBlock(error); + } + return; + } + + [self enterLiveActivity:activityId appId:[OneSignalConfigManager getAppId] withToken:token withSuccess: successBlock withFailure: failureBlock]; +} + ++ (void)enterLiveActivity:(NSString * _Nonnull)activityId appId:(NSString *)appId withToken:(NSString * _Nonnull)token withSuccess:(OSResultSuccessBlock _Nullable)successBlock withFailure:(OSFailureBlock _Nullable)failureBlock{ + [OneSignalLog onesignalLog:ONE_S_LL_VERBOSE message:[NSString stringWithFormat:@"enterLiveActivity called with activityId: %@ token: %@", activityId, token]]; + + if ([OSPrivacyConsentController shouldLogMissingPrivacyConsentErrorWithMethodName:@"enterLiveActivity:onSuccess:onFailure:"]) { + if (failureBlock) { + NSError *error = [NSError errorWithDomain:@"OneSignal.LiveActivities" code:0 userInfo:@{@"error" : @"Your application has called enterLiveActivity:onSuccess:onFailure: before the user granted privacy permission. Please call `consentGranted(bool)` in order to provide user privacy consent"}]; + failureBlock(error); + } + return; + } + + if(subscriptionId) { + [OneSignalClient.sharedClient executeRequest:[OSRequestLiveActivityEnter withSubscriptionId:subscriptionId appId:appId activityId:activityId token:token] + onSuccess:^(NSDictionary *result) { + [self callSuccessBlockOnMainThread:successBlock withResult:result]; + } onFailure:^(NSError *error) { + [self callFailureBlockOnMainThread:failureBlock withError:error]; + }]; + } else { + [self addPendingLiveActivityUpdate:activityId appId:appId withToken:token isEnter:true withSuccess:successBlock withFailure:failureBlock]; + } +} + ++ (void)exit:(NSString * _Nonnull)activityId{ + + if ([OSPrivacyConsentController shouldLogMissingPrivacyConsentErrorWithMethodName:@"enterLiveActivity:"]) + return; + + [self exit:activityId withSuccess:nil withFailure:nil]; +} + ++ (void)exit:(NSString * _Nonnull)activityId withSuccess:(OSResultSuccessBlock _Nullable)successBlock withFailure:(OSFailureBlock _Nullable)failureBlock{ + + if ([OSPrivacyConsentController shouldLogMissingPrivacyConsentErrorWithMethodName:@"exitLiveActivity:onSuccess:onFailure:"]) { + if (failureBlock) { + NSError *error = [NSError errorWithDomain:@"OneSignal.LiveActivities" code:0 userInfo:@{@"error" : @"Your application has called exitLiveActivity:onSuccess:onFailure: before the user granted privacy permission. Please call `consentGranted(bool)` in order to provide user privacy consent"}]; + failureBlock(error); + } + return; + } + + [self exitLiveActivity:activityId appId:[OneSignalConfigManager getAppId] withSuccess: successBlock withFailure: failureBlock]; +} + ++ (void)exitLiveActivity:(NSString * _Nonnull)activityId appId:(NSString *)appId withSuccess:(OSResultSuccessBlock _Nullable)successBlock withFailure:(OSFailureBlock _Nullable)failureBlock{ + [OneSignalLog onesignalLog:ONE_S_LL_VERBOSE message:[NSString stringWithFormat:@"exitLiveActivity called with activityId: %@", activityId]]; + if ([OSPrivacyConsentController shouldLogMissingPrivacyConsentErrorWithMethodName:@"exitLiveActivity:onSuccess:onFailure:"]) { + if (failureBlock) { + NSError *error = [NSError errorWithDomain:@"OneSignal.LiveActivities" code:0 userInfo:@{@"error" : @"Your application has called exitLiveActivity:onSuccess:onFailure: before the user granted privacy permission. Please call `consentGranted(bool)` in order to provide user privacy consent"}]; + failureBlock(error); + } + return; + } + + if(subscriptionId) { + [OneSignalClient.sharedClient executeRequest:[OSRequestLiveActivityExit withSubscriptionId:subscriptionId appId:appId activityId:activityId] + onSuccess:^(NSDictionary *result) { + [self callSuccessBlockOnMainThread:successBlock withResult:result]; + } onFailure:^(NSError *error) { + [self callFailureBlockOnMainThread:failureBlock withError:error]; + }]; + } else { + [self addPendingLiveActivityUpdate:activityId appId:appId withToken:nil isEnter:false withSuccess:successBlock withFailure:failureBlock]; + } +} + ++ (void)callFailureBlockOnMainThread:(OSFailureBlock)failureBlock withError:(NSError *)error { + if (failureBlock) { + dispatch_async(dispatch_get_main_queue(), ^{ + failureBlock(error); + }); + } +} + ++ (void)callSuccessBlockOnMainThread:(OSResultSuccessBlock)successBlock withResult:(NSDictionary *)result{ + if (successBlock) { + dispatch_async(dispatch_get_main_queue(), ^{ + successBlock(result); + }); + } +} + ++ (void)addPendingLiveActivityUpdate:(NSString * _Nonnull)activityId + appId:(NSString * _Nonnull)appId + withToken:(NSString * _Nullable)token + isEnter:(BOOL)isEnter + withSuccess:(OSResultSuccessBlock _Nullable)successBlock + withFailure:(OSFailureBlock _Nullable)failureBlock { + [OneSignalLog onesignalLog:ONE_S_LL_VERBOSE message:[NSString stringWithFormat:@"addPendingLiveActivityUpdate called with activityId: %@", activityId]]; + OSPendingLiveActivityUpdate *pendingLiveActivityUpdate = [[OSPendingLiveActivityUpdate alloc] initWith:activityId appId:appId withToken:token isEnter:isEnter withSuccess:successBlock withFailure:failureBlock]; + + if (!pendingLiveActivityUpdates) { + pendingLiveActivityUpdates = [NSMutableArray new]; + } + [pendingLiveActivityUpdates addObject:pendingLiveActivityUpdate]; +} + ++ (void)executePendingLiveActivityUpdates { + subscriptionId = OneSignalUserManagerImpl.sharedInstance.pushSubscriptionId; + [OneSignalLog onesignalLog:ONE_S_LL_VERBOSE message:[NSString stringWithFormat:@"executePendingLiveActivityUpdates called with subscriptionId: %@", subscriptionId]]; + if(pendingLiveActivityUpdates.count <= 0) { + return; + } + + OSPendingLiveActivityUpdate * updateToProcess = [pendingLiveActivityUpdates objectAtIndex:0]; + [pendingLiveActivityUpdates removeObjectAtIndex: 0]; + if (updateToProcess.isEnter) { + [OneSignalClient.sharedClient executeRequest:[OSRequestLiveActivityEnter withSubscriptionId:subscriptionId appId:updateToProcess.appId activityId:updateToProcess.activityId token:updateToProcess.token] + onSuccess:^(NSDictionary *result) { + [self callSuccessBlockOnMainThread:updateToProcess.successBlock withResult:result]; + [self executePendingLiveActivityUpdates]; + } onFailure:^(NSError *error) { + [self callFailureBlockOnMainThread:updateToProcess.failureBlock withError:error]; + [self executePendingLiveActivityUpdates]; + }]; + } else { + [OneSignalClient.sharedClient executeRequest:[OSRequestLiveActivityExit withSubscriptionId:subscriptionId appId:updateToProcess.appId activityId:updateToProcess.activityId] + onSuccess:^(NSDictionary *result) { + [self callSuccessBlockOnMainThread:updateToProcess.successBlock withResult:result]; + [self executePendingLiveActivityUpdates]; + } onFailure:^(NSError *error) { + [self callFailureBlockOnMainThread:updateToProcess.failureBlock withError:error]; + [self executePendingLiveActivityUpdates]; + }]; + } +} +@end diff --git a/iOS_SDK/OneSignalSDK/Source/OneSignalNotificationSettingsIOS9.m b/iOS_SDK/OneSignalSDK/Source/OneSignalNotificationSettingsIOS9.m deleted file mode 100644 index 34bf6b510..000000000 --- a/iOS_SDK/OneSignalSDK/Source/OneSignalNotificationSettingsIOS9.m +++ /dev/null @@ -1,101 +0,0 @@ -/** - * Modified MIT License - * - * Copyright 2017 OneSignal - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * 1. The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * 2. All copies of substantial portions of the Software may only be used in connection - * with services provided by OneSignal. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ - -#import -#import "OneSignalNotificationSettingsIOS9.h" -#import "OneSignalInternal.h" - -#define NOTIFICATION_TYPE_ALL 7 - -@implementation OneSignalNotificationSettingsIOS9 { - void (^notificationPromptReponseCallback)(BOOL); -} - -- (void)getNotificationPermissionState:(void (^)(OSPermissionState *subscriptionStatus))completionHandler { - OSPermissionState* status = OneSignal.currentPermissionState; - #pragma clang diagnostic push - #pragma clang diagnostic ignored "-Wdeprecated" - status.notificationTypes = (int)UIApplication.sharedApplication.currentUserNotificationSettings.types; - #pragma clang diagnostic pop - status.accepted = status.notificationTypes > 0; - status.answeredPrompt = [OneSignalUserDefaults.initStandard getSavedBoolForKey:OSUD_WAS_NOTIFICATION_PROMPT_ANSWERED_TO defaultValue:false]; - status.provisional = false; - - completionHandler(status); -} - -- (OSPermissionState*)getNotificationPermissionState { - __block OSPermissionState* returnStatus = [OSPermissionState alloc]; - - [self getNotificationPermissionState:^(OSPermissionState *status) { - returnStatus = status; - }]; - - return returnStatus; -} - -- (int)getNotificationTypes { - #pragma clang diagnostic push - #pragma clang diagnostic ignored "-Wdeprecated" - return (int)UIApplication.sharedApplication.currentUserNotificationSettings.types; - #pragma clang diagnostic pop -} - -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wdeprecated-declarations" - -- (void)promptForNotifications:(void(^)(BOOL accepted))completionHandler { - UIApplication* sharedApp = [UIApplication sharedApplication]; - - NSSet* categories = sharedApp.currentUserNotificationSettings.categories; - [sharedApp registerUserNotificationSettings:[UIUserNotificationSettings settingsForTypes:NOTIFICATION_TYPE_ALL categories:categories]]; - - notificationPromptReponseCallback = completionHandler; - - [OneSignal registerForAPNsToken]; -} - -- (void)onNotificationPromptResponse:(int)notificationTypes { - BOOL accepted = notificationTypes > 0; - - if (notificationPromptReponseCallback) { - notificationPromptReponseCallback(accepted); - notificationPromptReponseCallback = nil; - } - - OneSignal.currentPermissionState.accepted = accepted; - OneSignal.currentPermissionState.answeredPrompt = true; -} - -- (void)registerForProvisionalAuthorization:(OSUserResponseBlock)block { - //empty implementation -} - - -#pragma GCC diagnostic pop - -@end diff --git a/iOS_SDK/OneSignalSDK/Source/OneSignalSetEmailParameters.m b/iOS_SDK/OneSignalSDK/Source/OneSignalSetEmailParameters.m deleted file mode 100644 index 933bda356..000000000 --- a/iOS_SDK/OneSignalSDK/Source/OneSignalSetEmailParameters.m +++ /dev/null @@ -1,43 +0,0 @@ -/** - * Modified MIT License - * - * Copyright 2017 OneSignal - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * 1. The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * 2. All copies of substantial portions of the Software may only be used in connection - * with services provided by OneSignal. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ - -#import "OneSignalSetEmailParameters.h" - -@implementation OneSignalSetEmailParameters - -+ (instancetype)withEmail:(NSString *)email withAuthToken:(NSString *)authToken withSuccess:(OSResultSuccessBlock)success withFailure:(OSFailureBlock)failure { - OneSignalSetEmailParameters *parameters = [OneSignalSetEmailParameters new]; - - parameters.email = email; - parameters.authToken = authToken; - parameters.successBlock = success; - parameters.failureBlock = failure; - - return parameters; -} - -@end diff --git a/iOS_SDK/OneSignalSDK/Source/OneSignalSetExternalIdParameters.h b/iOS_SDK/OneSignalSDK/Source/OneSignalSetExternalIdParameters.h deleted file mode 100644 index e481fd1bc..000000000 --- a/iOS_SDK/OneSignalSDK/Source/OneSignalSetExternalIdParameters.h +++ /dev/null @@ -1,40 +0,0 @@ -/** - * Modified MIT License - * - * Copyright 2020 OneSignal - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * 1. The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * 2. All copies of substantial portions of the Software may only be used in connection - * with services provided by OneSignal. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ - -#import -#import "OneSignal.h" - -@interface OneSignalSetExternalIdParameters : NSObject - -+ (instancetype)withExternalId:(NSString *)externalId withAuthToken:(NSString *)authToken withSuccess:(OSResultSuccessBlock)success withFailure:(OSFailureBlock)failure; - -@property (strong, nonatomic) NSString *externalId; -@property (strong, nonatomic) NSString *authToken; -@property (nonatomic) OSResultSuccessBlock successBlock; -@property (nonatomic) OSFailureBlock failureBlock; - -@end diff --git a/iOS_SDK/OneSignalSDK/Source/OneSignalSetExternalIdParameters.m b/iOS_SDK/OneSignalSDK/Source/OneSignalSetExternalIdParameters.m deleted file mode 100644 index 58502cb7b..000000000 --- a/iOS_SDK/OneSignalSDK/Source/OneSignalSetExternalIdParameters.m +++ /dev/null @@ -1,43 +0,0 @@ -/** - * Modified MIT License - * - * Copyright 2020 OneSignal - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * 1. The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * 2. All copies of substantial portions of the Software may only be used in connection - * with services provided by OneSignal. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ - -#import "OneSignalSetExternalIdParameters.h" - -@implementation OneSignalSetExternalIdParameters - -+ (instancetype)withExternalId:(NSString *)externalId withAuthToken:(NSString *)authToken withSuccess:(OSResultSuccessBlock)success withFailure:(OSFailureBlock)failure { - OneSignalSetExternalIdParameters *parameters = [OneSignalSetExternalIdParameters new]; - - parameters.externalId = externalId; - parameters.authToken = authToken; - parameters.successBlock = success; - parameters.failureBlock = failure; - - return parameters; -} - -@end diff --git a/iOS_SDK/OneSignalSDK/Source/OneSignalSetLanguageParameters.h b/iOS_SDK/OneSignalSDK/Source/OneSignalSetLanguageParameters.h deleted file mode 100644 index 39cfcd4ad..000000000 --- a/iOS_SDK/OneSignalSDK/Source/OneSignalSetLanguageParameters.h +++ /dev/null @@ -1,39 +0,0 @@ -/** - * Modified MIT License - * - * Copyright 2021 OneSignal - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * 1. The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * 2. All copies of substantial portions of the Software may only be used in connection - * with services provided by OneSignal. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ - -#import -#import "OneSignal.h" - -@interface OneSignalSetLanguageParameters : NSObject - -+ (instancetype _Nullable )language:(NSString * _Nonnull)language withSuccess:(OSUpdateLanguageSuccessBlock _Nullable)successBlock withFailure:(OSUpdateLanguageFailureBlock _Nullable)failureBlock; - -@property (strong, nonatomic, nonnull) NSString *language; -@property (nonatomic, nullable) OSResultSuccessBlock successBlock; -@property (nonatomic, nullable) OSFailureBlock failureBlock; - -@end diff --git a/iOS_SDK/OneSignalSDK/Source/OneSignalSetLanguageParameters.m b/iOS_SDK/OneSignalSDK/Source/OneSignalSetLanguageParameters.m deleted file mode 100644 index 8bc00077c..000000000 --- a/iOS_SDK/OneSignalSDK/Source/OneSignalSetLanguageParameters.m +++ /dev/null @@ -1,42 +0,0 @@ -/** - * Modified MIT License - * - * Copyright 2021 OneSignal - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * 1. The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * 2. All copies of substantial portions of the Software may only be used in connection - * with services provided by OneSignal. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ - -#import "OneSignalSetLanguageParameters.h" - -@implementation OneSignalSetLanguageParameters - -+ (instancetype)language:(NSString * _Nonnull)language withSuccess:(OSUpdateLanguageSuccessBlock _Nullable)success withFailure:(OSUpdateLanguageFailureBlock _Nullable)failure { - OneSignalSetLanguageParameters *parameters = [OneSignalSetLanguageParameters new]; - - parameters.language = language; - parameters.successBlock = success; - parameters.failureBlock = failure; - - return parameters; -} - -@end diff --git a/iOS_SDK/OneSignalSDK/Source/OneSignalSetSMSParameters.h b/iOS_SDK/OneSignalSDK/Source/OneSignalSetSMSParameters.h deleted file mode 100644 index b51a291b3..000000000 --- a/iOS_SDK/OneSignalSDK/Source/OneSignalSetSMSParameters.h +++ /dev/null @@ -1,40 +0,0 @@ -/** - * Modified MIT License - * - * Copyright 2021 OneSignal - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * 1. The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * 2. All copies of substantial portions of the Software may only be used in connection - * with services provided by OneSignal. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ - -#import -#import "OneSignal.h" - -@interface OneSignalSetSMSParameters : NSObject - -+ (instancetype)withSMSNumber:(NSString *)smsNumber withAuthToken:(NSString *)authToken withSuccess:(OSResultSuccessBlock)success withFailure:(OSFailureBlock)failure; - -@property (strong, nonatomic) NSString *smsNumber; -@property (strong, nonatomic) NSString *authToken; -@property (nonatomic) OSResultSuccessBlock successBlock; -@property (nonatomic) OSFailureBlock failureBlock; - -@end diff --git a/iOS_SDK/OneSignalSDK/Source/OneSignalSetSMSParameters.m b/iOS_SDK/OneSignalSDK/Source/OneSignalSetSMSParameters.m deleted file mode 100644 index aa712a75e..000000000 --- a/iOS_SDK/OneSignalSDK/Source/OneSignalSetSMSParameters.m +++ /dev/null @@ -1,43 +0,0 @@ -/** - * Modified MIT License - * - * Copyright 2021 OneSignal - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * 1. The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * 2. All copies of substantial portions of the Software may only be used in connection - * with services provided by OneSignal. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ - -#import "OneSignalSetSMSParameters.h" - -@implementation OneSignalSetSMSParameters - -+ (instancetype)withSMSNumber:(NSString *)smsNumber withAuthToken:(NSString *)authToken withSuccess:(OSResultSuccessBlock)success withFailure:(OSFailureBlock)failure { - OneSignalSetSMSParameters *parameters = [OneSignalSetSMSParameters new]; - - parameters.smsNumber = smsNumber; - parameters.authToken = authToken; - parameters.successBlock = success; - parameters.failureBlock = failure; - - return parameters; -} - -@end diff --git a/iOS_SDK/OneSignalSDK/Source/OneSignalSwiftInterface.swift b/iOS_SDK/OneSignalSDK/Source/OneSignalSwiftInterface.swift new file mode 100644 index 000000000..7a048ef4a --- /dev/null +++ b/iOS_SDK/OneSignalSDK/Source/OneSignalSwiftInterface.swift @@ -0,0 +1,147 @@ +/** + * Modified MIT License + * + * Copyright 2022 OneSignal + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * 1. The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * 2. All copies of substantial portions of the Software may only be used in connection + * with services provided by OneSignal. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +import Foundation + +import OneSignalUser +import OneSignalOutcomes +import OneSignalNotifications +import OneSignalCore + +public extension OneSignal { + static var User: OSUser { + return __user() + } + + static var Notifications: OSNotifications.Type { + return __notifications() + } + + static var Session: OSSession.Type { + return __session() + } + + static var InAppMessages: OSInAppMessages.Type { + return __inAppMessages() + } + + static var Debug: OSDebug.Type { + return __debug() + } + + static var Location: OSLocation.Type { + return __location() + } + + static var LiveActivities: OSLiveActivities.Type { + return __liveActivities() + } +} + +public extension OSDebug { + static func setAlertLevel(_ logLevel: ONE_S_LOG_LEVEL) { + __setAlert(logLevel) + } +} + +public extension OSInAppMessages { + static var paused: Bool { + get { + return __paused() + } + set { + __paused(newValue) + } + } + + static func addLifecycleListener(_ listener: OSInAppMessageLifecycleListener) { + __add(listener) + } + + static func removeLifecycleListener(_ listener: OSInAppMessageLifecycleListener) { + __remove(listener) + } + + static func addClickListener(_ listener: OSInAppMessageClickListener) { + __add(listener) + } + + static func removeClickListener(_ listener: OSInAppMessageClickListener) { + __remove(listener) + } +} + +public extension OSSession { + static func addOutcome(_ name: String, _ value: NSNumber) { + __addOutcome(withValue: name, value: value) + } +} + +public extension OSNotifications { + static var permission: Bool { + return __permission() + } + + static var canRequestPermission: Bool { + return __canRequestPermission() + } + + static var permissionNative: OSNotificationPermission { + return __permissionNative() + } + + static func registerForProvisionalAuthorization(_ block: OSUserResponseBlock?) { + return __register(forProvisionalAuthorization: block) + } + + static func addPermissionObserver(_ observer: OSNotificationPermissionObserver) { + return __add(observer) + } + + static func removePermissionObserver(_ observer: OSNotificationPermissionObserver) { + return __remove(observer) + } + + static func addClickListener(_ listener: OSNotificationClickListener) { + return __add(listener) + } + + static func removeClickListener(_ listener: OSNotificationClickListener) { + return __remove(listener) + } +} + +public extension OSLocation { + static var isShared: Bool { + get { + return __isShared() + } + set { + __setShared(newValue) + } + } +} diff --git a/iOS_SDK/OneSignalSDK/Source/OneSignalTrackIAP.h b/iOS_SDK/OneSignalSDK/Source/OneSignalTrackIAP.h index fe2c1cdde..8fafbdfcc 100644 --- a/iOS_SDK/OneSignalSDK/Source/OneSignalTrackIAP.h +++ b/iOS_SDK/OneSignalSDK/Source/OneSignalTrackIAP.h @@ -27,6 +27,7 @@ @interface OneSignalTrackIAP : NSObject + (BOOL)canTrack; ++ (OneSignalTrackIAP *)sharedInstance; - (id)init; @end diff --git a/iOS_SDK/OneSignalSDK/Source/OneSignalTrackIAP.m b/iOS_SDK/OneSignalSDK/Source/OneSignalTrackIAP.m index 7e878cf7c..8d3f5ad70 100644 --- a/iOS_SDK/OneSignalSDK/Source/OneSignalTrackIAP.m +++ b/iOS_SDK/OneSignalSDK/Source/OneSignalTrackIAP.m @@ -28,8 +28,7 @@ #import #import #import "OneSignalTrackIAP.h" -#import "OneSignal.h" - +#import @implementation OneSignalTrackIAP static Class skPaymentQueue; @@ -50,6 +49,17 @@ + (BOOL)canTrack { return (skPaymentQueue != nil && [skPaymentQueue respondsToSelector:@selector(canMakePayments)] && [skPaymentQueue performSelector:@selector(canMakePayments)]); } +static OneSignalTrackIAP* singleInstance = nil; ++( OneSignalTrackIAP *)sharedInstance { + @synchronized( singleInstance ) { + if( !singleInstance ) { + singleInstance = [OneSignalTrackIAP new]; + } + } + + return singleInstance; +} + - (id)init { self = [super init]; @@ -123,8 +133,9 @@ - (void)productsRequest:(id)request didReceiveResponse:(id)response { } } - if ([arrayOfPruchases count] > 0) - [[OneSignal class] performSelector:@selector(sendPurchases:) withObject:arrayOfPruchases]; + if ([arrayOfPruchases count] > 0) { + [OneSignalUserManagerImpl.sharedInstance sendPurchases:arrayOfPruchases]; + } } #pragma clang diagnostic pop diff --git a/iOS_SDK/OneSignalSDK/Source/OneSignalTracker.h b/iOS_SDK/OneSignalSDK/Source/OneSignalTracker.h index ad4888a06..2c7520658 100644 --- a/iOS_SDK/OneSignalSDK/Source/OneSignalTracker.h +++ b/iOS_SDK/OneSignalSDK/Source/OneSignalTracker.h @@ -31,7 +31,5 @@ + (void)onFocus:(BOOL)toBackground; + (void)onSessionEnded:(NSArray *) lastInfluences; -+ (void)willResignActiveTriggered; -+ (void)didEnterBackgroundTriggered; @end diff --git a/iOS_SDK/OneSignalSDK/Source/OneSignalTracker.m b/iOS_SDK/OneSignalSDK/Source/OneSignalTracker.m index 946a2f0ec..323f79f29 100644 --- a/iOS_SDK/OneSignalSDK/Source/OneSignalTracker.m +++ b/iOS_SDK/OneSignalSDK/Source/OneSignalTracker.m @@ -29,27 +29,22 @@ #import "OneSignalInternal.h" #import "OneSignalTracker.h" -#import "OneSignalHelper.h" #import "OneSignalWebView.h" #import #import #import "OSFocusTimeProcessorFactory.h" -#import "OSBaseFocusTimeProcessor.h" #import "OSFocusCallParams.h" #import "OSFocusInfluenceParam.h" -#import "OSMessagingController.h" -#import "OSStateSynchronizer.h" @interface OneSignal () -+ (void)registerUser; ++ (BOOL)shouldStartNewSession; ++ (void)startNewSession:(BOOL)fromInit; + (BOOL)sendNotificationTypesUpdate; -+ (BOOL)clearBadgeCount:(BOOL)fromNotifOpened; + (NSString*)mUserId; + (NSString *)mEmailUserId; + (NSString *)mEmailAuthToken; + (NSString *)mExternalIdAuthToken; -+ (OSStateSynchronizer *)stateSynchronizer; @end @@ -58,29 +53,18 @@ @implementation OneSignalTracker static UIBackgroundTaskIdentifier focusBackgroundTask; static NSTimeInterval lastOpenedTime; static BOOL lastOnFocusWasToBackground = YES; -static BOOL willResignActiveTriggered = NO; -static BOOL didEnterBackgroundTriggered = NO; + (void)resetLocals { [OSFocusTimeProcessorFactory resetUnsentActiveTime]; focusBackgroundTask = 0; lastOpenedTime = 0; lastOnFocusWasToBackground = YES; - [self resetBackgroundDetection]; } + (void)setLastOpenedTime:(NSTimeInterval)lastOpened { lastOpenedTime = lastOpened; } -+ (void)willResignActiveTriggered { - willResignActiveTriggered = YES; -} - -+ (void)didEnterBackgroundTriggered { - didEnterBackgroundTriggered = YES; -} - + (void)beginBackgroundFocusTask { focusBackgroundTask = [[UIApplication sharedApplication] beginBackgroundTaskWithExpirationHandler:^{ [OneSignalTracker endBackgroundFocusTask]; @@ -92,26 +76,10 @@ + (void)endBackgroundFocusTask { focusBackgroundTask = UIBackgroundTaskInvalid; } -/** - Returns true if application truly did come from a backgrounded state. - Returns false if the application bypassed `didEnterBackground` after entering `willResignActive`. - This can happen if the app resumes after a native dialog displays over the app or after the app is in a suspended state and not backgrounded. -**/ -+ (BOOL)applicationForegroundedFromBackgroundedState { - return !(willResignActiveTriggered && !didEnterBackgroundTriggered); -} - -+ (void)resetBackgroundDetection { - willResignActiveTriggered = NO; - didEnterBackgroundTriggered = NO; -} - + (void)onFocus:(BOOL)toBackground { // return if the user has not granted privacy permissions - if ([OneSignal requiresUserPrivacyConsent]) { - [self resetBackgroundDetection]; + if ([OSPrivacyConsentController requiresUserPrivacyConsent]) return; - } // Prevent the onFocus to be called twice when app being terminated // - Both WillResignActive and willTerminate @@ -127,51 +95,37 @@ + (void)onFocus:(BOOL)toBackground { } + (void)applicationForegrounded { - [OneSignal onesignalLog:ONE_S_LL_DEBUG message:@"Application Foregrounded started"]; - - BOOL fromBackgroundedState = [self applicationForegroundedFromBackgroundedState]; - [self resetBackgroundDetection]; - + [OneSignalLog onesignalLog:ONE_S_LL_DEBUG message:@"Application Foregrounded started"]; [OSFocusTimeProcessorFactory cancelFocusCall]; - if (OneSignal.appEntryState != NOTIFICATION_CLICK) - OneSignal.appEntryState = APP_OPEN; + if (OSSessionManager.sharedSessionManager.appEntryState != NOTIFICATION_CLICK) + OSSessionManager.sharedSessionManager.appEntryState = APP_OPEN; lastOpenedTime = [NSDate date].timeIntervalSince1970; // on_session tracking when resumming app. - if ([OneSignal shouldRegisterNow]) - [OneSignal registerUser]; + if ([OneSignal shouldStartNewSession]) + [OneSignal startNewSession:NO]; else { // This checks if notification permissions changed when app was backgrounded - [OneSignal sendNotificationTypesUpdate]; - [[OSSessionManager sharedSessionManager] attemptSessionUpgrade:OneSignal.appEntryState]; - if (fromBackgroundedState) { - // Use cached IAMs if app truly went into the background - [OneSignal receivedInAppMessageJson:nil]; - } + [OSNotificationsManager sendNotificationTypesUpdateToDelegate]; + [[OSSessionManager sharedSessionManager] attemptSessionUpgrade]; + // TODO: Here it used to call receivedInAppMessageJson with nil, this method no longer exists + // [OneSignal receivedInAppMessageJson:nil]; } - let wasBadgeSet = [OneSignal clearBadgeCount:false]; - - if (![OneSignal mUserId]) - return; - - // If badge was set, clear it on the server as well. - if (wasBadgeSet) - [OneSignal.stateSynchronizer sendBadgeCount:@0 appId:[OneSignal appId]]; + [OSNotificationsManager clearBadgeCount:false]; } + (void)applicationBackgrounded { - [OneSignal onesignalLog:ONE_S_LL_DEBUG message:@"Application Backgrounded started"]; - [OneSignal setIsOnSessionSuccessfulForCurrentState:false]; + [OneSignalLog onesignalLog:ONE_S_LL_DEBUG message:@"Application Backgrounded started"]; [self updateLastClosedTime]; let timeElapsed = [self getTimeFocusedElapsed]; if (timeElapsed < -1) return; - OneSignal.appEntryState = APP_CLOSE; + OSSessionManager.sharedSessionManager.appEntryState = APP_CLOSE; let influences = [[OSSessionManager sharedSessionManager] getSessionInfluences]; let focusCallParams = [self createFocusCallParams:influences onSessionEnded:false]; @@ -179,16 +133,20 @@ + (void)applicationBackgrounded { if (timeProcessor) [timeProcessor sendOnFocusCall:focusCallParams]; + // user module let them know app is backgrounded + [OneSignalUserManagerImpl.sharedInstance runBackgroundTasks]; } +// Note: This is not from app backgrounding +// The on_focus call is made right away. + (void)onSessionEnded:(NSArray *)lastInfluences { - [OneSignal onesignalLog:ONE_S_LL_DEBUG message:@"onSessionEnded started"]; + [OneSignalLog onesignalLog:ONE_S_LL_DEBUG message:@"onSessionEnded started"]; let timeElapsed = [self getTimeFocusedElapsed]; let focusCallParams = [self createFocusCallParams:lastInfluences onSessionEnded:true]; let timeProcessor = [OSFocusTimeProcessorFactory createTimeProcessorWithInfluences:lastInfluences focusEventType:END_SESSION]; if (!timeProcessor) { - [OneSignal onesignalLog:ONE_S_LL_DEBUG message:@"onSessionEnded no time processor to end"]; + [OneSignalLog onesignalLog:ONE_S_LL_DEBUG message:@"onSessionEnded no time processor to end"]; return; } @@ -212,12 +170,7 @@ + (OSFocusCallParams *)createFocusCallParams:(NSArray *)lastInflu [focusInfluenceParams addObject:focusInfluenceParam]; } - return [[OSFocusCallParams alloc] initWithParamsAppId:[OneSignal appId] - userId:[OneSignal mUserId] - emailUserId:[OneSignal mEmailUserId] - emailAuthToken:[OneSignal mEmailAuthToken] - externalIdAuthToken:[OneSignal mExternalIdAuthToken] - netType:[OneSignalHelper getNetType] + return [[OSFocusCallParams alloc] initWithParamsAppId:[OneSignalConfigManager getAppId] timeElapsed:timeElapsed influenceParams:focusInfluenceParams onSessionEnded:onSessionEnded]; diff --git a/iOS_SDK/OneSignalSDK/Source/OneSignalViewHelper.m b/iOS_SDK/OneSignalSDK/Source/OneSignalViewHelper.m deleted file mode 100644 index 282dc092a..000000000 --- a/iOS_SDK/OneSignalSDK/Source/OneSignalViewHelper.m +++ /dev/null @@ -1,72 +0,0 @@ -/** - * Modified MIT License - * - * Copyright 2016 OneSignal - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * 1. The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * 2. All copies of substantial portions of the Software may only be used in connection - * with services provided by OneSignal. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ - -#import -#import -#import "OneSignalViewHelper.h" - -@implementation OneSignalViewHelper : NSObject - -/* - Given a UIDeviceOrientation return the custom enum ViewOrientation - */ -+ (ViewOrientation)validateOrientation:(UIDeviceOrientation)orientation { - if (UIDeviceOrientationIsPortrait(orientation)) - return OrientationPortrait; - else if (UIDeviceOrientationIsLandscape(orientation)) - return OrientationLandscape; - - return OrientationInvalid; -} - -/* - Given a float convert it to the phone scaled CGFloat - Multiplies float by iPhones scale value - */ -+ (CGFloat)sizeToScale:(float)size { - float scale = [self getScreenScale]; - return (CGFloat) (size * scale); -} - -/* - Get currentDevice screen bounds - Contains point of origin (x, y) and the size (height, width) of the screen - Changes in regards to the phones current orientation - */ -+ (CGRect)getScreenBounds { - return UIScreen.mainScreen.bounds; -} - -/* - Get currentDevice screen scale - Important for specific constraints so that phones of different resolution scale properly - */ -+ (float)getScreenScale { - return UIScreen.mainScreen.scale; -} - -@end diff --git a/iOS_SDK/OneSignalSDK/Source/UIApplication+OneSignal.m b/iOS_SDK/OneSignalSDK/Source/UIApplication+OneSignal.m index d20280f36..e37f0e4c2 100644 --- a/iOS_SDK/OneSignalSDK/Source/UIApplication+OneSignal.m +++ b/iOS_SDK/OneSignalSDK/Source/UIApplication+OneSignal.m @@ -26,7 +26,7 @@ */ #import "UIApplication+OneSignal.h" -#import "OneSignalCommonDefines.h" +#import @implementation UIApplication (OneSignal) diff --git a/iOS_SDK/OneSignalSDK/Source/UIApplicationDelegate+OneSignal.m b/iOS_SDK/OneSignalSDK/Source/UIApplicationDelegate+OneSignal.m index 48d042c27..315c13728 100644 --- a/iOS_SDK/OneSignalSDK/Source/UIApplicationDelegate+OneSignal.m +++ b/iOS_SDK/OneSignalSDK/Source/UIApplicationDelegate+OneSignal.m @@ -29,32 +29,18 @@ #import #import "UIApplicationDelegate+OneSignal.h" -#import "OSNotification+Internal.h" -#import "OneSignal.h" +#import "OneSignalFramework.h" #import "OneSignalCommonDefines.h" #import "OneSignalTracker.h" -#import "OneSignalLocation.h" #import "OneSignalSelectorHelpers.h" -#import "OneSignalHelper.h" -#import "OSMessagingController.h" #import "SwizzlingForwarder.h" #import @interface OneSignal (UN_extra) -+ (void) didRegisterForRemoteNotifications:(UIApplication*)app deviceToken:(NSData*)inDeviceToken; -+ (void) handleDidFailRegisterForRemoteNotification:(NSError*)error; -+ (void) updateNotificationTypes:(int)notificationTypes; + (NSString*) appId; -+ (void)notificationReceived:(NSDictionary*)messageDict wasOpened:(BOOL)opened; -+ (BOOL) receiveRemoteNotification:(UIApplication*)application UserInfo:(NSDictionary*)userInfo completionHandler:(void (^)(UIBackgroundFetchResult))completionHandler; -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wdeprecated" -+ (void) processLocalActionBasedNotification:(UILocalNotification*) notification identifier:(NSString*)identifier; -#pragma clang diagnostic pop @end // This class hooks into the UIApplicationDelegate selectors to receive iOS 9 and older events. -// - UNUserNotificationCenter is used for iOS 10 // - Orignal implementations are called so other plugins and the developers AppDelegate is still called. @implementation OneSignalAppDelegate @@ -69,7 +55,7 @@ + (void) oneSignalLoadedTagSelector {} - (void) setOneSignalDelegate:(id)delegate { [OneSignalAppDelegate traceCall:@"setOneSignalDelegate:"]; - [OneSignal onesignalLog:ONE_S_LL_VERBOSE message:[NSString stringWithFormat:@"ONESIGNAL setOneSignalDelegate CALLED: %@", delegate]]; + [OneSignalLog onesignalLog:ONE_S_LL_VERBOSE message:[NSString stringWithFormat:@"ONESIGNAL setOneSignalDelegate CALLED: %@", delegate]]; if (swizzledClasses == nil) swizzledClasses = [NSMutableSet new]; @@ -83,31 +69,6 @@ - (void) setOneSignalDelegate:(id)delegate { [swizzledClasses addObject:delegateClass]; Class newClass = [OneSignalAppDelegate class]; - - // Need to keep this one for iOS 10 for content-available notifiations when the app is not in focus - // iOS 10 doesn't fire a selector on UNUserNotificationCenter in this cases most likely becuase - // UNNotificationServiceExtension (mutable-content) and UNNotificationContentExtension (with category) replaced it. - injectSelector( - delegateClass, - @selector(application:didReceiveRemoteNotification:fetchCompletionHandler:), - newClass, - @selector(oneSignalReceiveRemoteNotification:UserInfo:fetchCompletionHandler:) - ); - - injectSelector( - delegateClass, - @selector(application:didFailToRegisterForRemoteNotificationsWithError:), - newClass, - @selector(oneSignalDidFailRegisterForRemoteNotification:error:) - ); - - injectSelector( - delegateClass, - @selector(application:didRegisterForRemoteNotificationsWithDeviceToken:), - newClass, - @selector(oneSignalDidRegisterForRemoteNotifications:deviceToken:) - ); - // Used to track how long the app has been closed injectSelector( delegateClass, @@ -116,8 +77,6 @@ - (void) setOneSignalDelegate:(id)delegate { @selector(oneSignalApplicationWillTerminate:) ); - [OneSignalAppDelegate swizzlePreiOS10Methods:delegateClass]; - [self setOneSignalDelegate:delegate]; } @@ -137,180 +96,6 @@ + (BOOL)swizzledClassInHeirarchy:(Class)delegateClass { return false; } -+ (void)swizzlePreiOS10Methods:(Class)delegateClass { - if ([OneSignalHelper isIOSVersionGreaterThanOrEqual:@"10.0"]) - return; - - injectSelector( - delegateClass, - @selector(application:handleActionWithIdentifier:forLocalNotification:completionHandler:), - [OneSignalAppDelegate class], - @selector(oneSignalLocalNotificationOpened:handleActionWithIdentifier:forLocalNotification:completionHandler:) - ); - - // Starting with iOS 10 requestAuthorizationWithOptions has it's own callback - // We also check the permssion status from applicationDidBecomeActive: each time. - injectSelector( - delegateClass, - @selector(application:didRegisterUserNotificationSettings:), - [OneSignalAppDelegate class], - @selector(oneSignalDidRegisterUserNotifications:settings:) - ); - - injectSelector( - delegateClass, - @selector(application:didReceiveLocalNotification:), - [OneSignalAppDelegate class], - @selector(oneSignalLocalNotificationOpened:notification:) - ); -} - -- (void)oneSignalDidRegisterForRemoteNotifications:(UIApplication*)app deviceToken:(NSData*)inDeviceToken { - [OneSignalAppDelegate traceCall:@"oneSignalDidRegisterForRemoteNotifications:deviceToken:"]; - - [OneSignal didRegisterForRemoteNotifications:app deviceToken:inDeviceToken]; - - SwizzlingForwarder *forwarder = [[SwizzlingForwarder alloc] - initWithTarget:self - withYourSelector:@selector( - oneSignalDidRegisterForRemoteNotifications:deviceToken: - ) - withOriginalSelector:@selector( - application:didRegisterForRemoteNotificationsWithDeviceToken: - ) - ]; - [forwarder invokeWithArgs:@[app, inDeviceToken]]; -} - -- (void)oneSignalDidFailRegisterForRemoteNotification:(UIApplication*)app error:(NSError*)err { - [OneSignalAppDelegate traceCall:@"oneSignalDidFailRegisterForRemoteNotification:error:"]; - - if ([OneSignal appId]) - [OneSignal handleDidFailRegisterForRemoteNotification:err]; - - SwizzlingForwarder *forwarder = [[SwizzlingForwarder alloc] - initWithTarget:self - withYourSelector:@selector( - oneSignalDidFailRegisterForRemoteNotification:error: - ) - withOriginalSelector:@selector( - application:didFailToRegisterForRemoteNotificationsWithError: - ) - ]; - [forwarder invokeWithArgs:@[app, err]]; -} -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wdeprecated" -// iOS 9 Only -- (void)oneSignalDidRegisterUserNotifications:(UIApplication*)application settings:(UIUserNotificationSettings*)notificationSettings { - [OneSignalAppDelegate traceCall:@"oneSignalDidRegisterUserNotifications:settings:"]; - - if ([OneSignal appId]) - [OneSignal updateNotificationTypes:(int)notificationSettings.types]; - - if ([self respondsToSelector:@selector(oneSignalDidRegisterUserNotifications:settings:)]) - [self oneSignalDidRegisterUserNotifications:application settings:notificationSettings]; -} -#pragma clang diagnostic pop - -// Fires when a notication is opened or recieved while the app is in focus. -// - Also fires when the app is in the background and a notificaiton with content-available=1 is received. -// NOTE: completionHandler must only be called once! -// iOS 10 - This crashes the app if it is called twice! Crash will happen when the app is resumed. -// iOS 9 - Does not have this issue. -- (void) oneSignalReceiveRemoteNotification:(UIApplication*)application UserInfo:(NSDictionary*)userInfo fetchCompletionHandler:(void (^)(UIBackgroundFetchResult)) completionHandler { - [OneSignalAppDelegate traceCall:@"oneSignalReceiveRemoteNotification:UserInfo:fetchCompletionHandler:"]; - SwizzlingForwarder *forwarder = [[SwizzlingForwarder alloc] - initWithTarget:self - withYourSelector:@selector( - oneSignalReceiveRemoteNotification:UserInfo:fetchCompletionHandler: - ) - withOriginalSelector:@selector( - application:didReceiveRemoteNotification:fetchCompletionHandler: - ) - ]; - - BOOL startedBackgroundJob = false; - - if ([OneSignal appId]) { - let appState = [UIApplication sharedApplication].applicationState; - let isVisibleNotification = userInfo[@"aps"][@"alert"] != nil; - - // iOS 9 - Notification was tapped on - // https://medium.com/posts-from-emmerge/ios-push-notification-background-fetch-demystified-7090358bb66e - // - NOTE: We do not have the extra logic for the notifiation center or double tap home button cases - // of "inactive" on notification received the link above describes. - // Omiting that complex logic as iOS 9 usage stats are very low (12/11/2020) and these are rare cases. - if ([OneSignalHelper isIOSVersionLessThan:@"10.0"] && appState == UIApplicationStateInactive && isVisibleNotification) { - [OneSignal notificationReceived:userInfo wasOpened:YES]; - } - else if (appState == UIApplicationStateActive && isVisibleNotification) - [OneSignal notificationReceived:userInfo wasOpened:NO]; - else - startedBackgroundJob = [OneSignal receiveRemoteNotification:application UserInfo:userInfo completionHandler:forwarder.hasReceiver ? nil : completionHandler]; - } - - if (forwarder.hasReceiver) { - [forwarder invokeWithArgs:@[application, userInfo, completionHandler]]; - return; - } - - [OneSignalAppDelegate - forwardToDepercatedApplication:application - didReceiveRemoteNotification:userInfo]; - - if (!startedBackgroundJob) - completionHandler(UIBackgroundFetchResultNewData); -} - -// Forwards to application:didReceiveRemoteNotification: in the rare case -// that the app happens to use this BUT doesn't use -// UNUserNotificationCenterDelegate OR -// application:didReceiveRemoteNotification:fetchCompletionHandler: -// https://developer.apple.com/documentation/uikit/uiapplicationdelegate/1623117-application?language=objc -+(void)forwardToDepercatedApplication:(UIApplication*)application didReceiveRemoteNotification:(NSDictionary*)userInfo { - id originalDelegate = UIApplication.sharedApplication.delegate; - if (![originalDelegate respondsToSelector:@selector(application:didReceiveRemoteNotification:)]) - return; - - // Make sure we don't forward to this depreated selector on cold start - // from a notification open, since iOS itself doesn't call this either - if ([[OneSignal valueForKey:@"coldStartFromTapOnNotification"] boolValue]) - return; - - #pragma clang diagnostic push - #pragma clang diagnostic ignored "-Wdeprecated-declarations" - [originalDelegate application:application didReceiveRemoteNotification:userInfo]; - #pragma clang diagnostic pop -} - -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wdeprecated" -- (void) oneSignalLocalNotificationOpened:(UIApplication*)application handleActionWithIdentifier:(NSString*)identifier forLocalNotification:(UILocalNotification*)notification completionHandler:(void(^)()) completionHandler { -#pragma clang diagnostic pop - [OneSignalAppDelegate traceCall:@"oneSignalLocalNotificationOpened:handleActionWithIdentifier:forLocalNotification:completionHandler:"]; - - if ([OneSignal appId]) - [OneSignal processLocalActionBasedNotification:notification identifier:identifier]; - - if ([self respondsToSelector:@selector(oneSignalLocalNotificationOpened:handleActionWithIdentifier:forLocalNotification:completionHandler:)]) - [self oneSignalLocalNotificationOpened:application handleActionWithIdentifier:identifier forLocalNotification:notification completionHandler:completionHandler]; - - completionHandler(); -} -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wdeprecated" -- (void)oneSignalLocalNotificationOpened:(UIApplication*)application notification:(UILocalNotification*)notification { -#pragma clang diagnostic pop - [OneSignalAppDelegate traceCall:@"oneSignalLocalNotificationOpened:notification:"]; - - if ([OneSignal appId]) - [OneSignal processLocalActionBasedNotification:notification identifier:@"__DEFAULT__"]; - - if([self respondsToSelector:@selector(oneSignalLocalNotificationOpened:notification:)]) - [self oneSignalLocalNotificationOpened:application notification:notification]; -} - -(void)oneSignalApplicationWillTerminate:(UIApplication *)application { [OneSignalAppDelegate traceCall:@"oneSignalApplicationWillTerminate:"]; @@ -332,7 +117,7 @@ -(void)oneSignalApplicationWillTerminate:(UIApplication *)application { // Used to log all calls, also used in unit tests to observer // the OneSignalAppDelegate selectors get called. +(void) traceCall:(NSString*)selector { - [OneSignal onesignalLog:ONE_S_LL_VERBOSE message:selector]; + [OneSignalLog onesignalLog:ONE_S_LL_VERBOSE message:selector]; } @end diff --git a/iOS_SDK/OneSignalSDK/UnitTests/InAppMessagingIntegrationTests.m b/iOS_SDK/OneSignalSDK/UnitTests/InAppMessagingIntegrationTests.m index 5a4f68312..5b1ae9065 100644 --- a/iOS_SDK/OneSignalSDK/UnitTests/InAppMessagingIntegrationTests.m +++ b/iOS_SDK/OneSignalSDK/UnitTests/InAppMessagingIntegrationTests.m @@ -26,7 +26,7 @@ of this software and associated documentation files (the "Software"), to deal */ #import -#import "OneSignal.h" +#import "OneSignalFramework.h" #import "OneSignalUserDefaults.h" #import "OneSignalHelper.h" #import "OSInAppMessageInternal.h" @@ -835,15 +835,15 @@ - (void)testIAMClickedLaunchesAPIRequest { - (void)testIAMClickWithNoIDLogsError { let message = [OSInAppMessageTestHelper testMessageJsonWithTriggerPropertyName:OS_DYNAMIC_TRIGGER_KIND_SESSION_TIME withId:@"test_id1" withOperator:OSTriggerOperatorTypeLessThan withValue:@10.0]; - + let registrationResponse = [OSInAppMessageTestHelper testRegistrationJsonWithMessages:@[message]]; - + // the trigger should immediately evaluate to true and should // be shown once the SDK is fully initialized. [OneSignalClientOverrider setMockResponseForRequest:NSStringFromClass([OSRequestRegisterUser class]) withResponse:registrationResponse]; - + [UnitTestCommonMethods initOneSignal_andThreadWait]; - + // the message should now be displayed // simulate a button press (action) on the inapp message with a nil id let action = [OSInAppMessageAction new]; @@ -853,7 +853,7 @@ - (void)testIAMClickWithNoIDLogsError { action.clickId = nil; #pragma GCC diagnostic pop let testMessage = [OSInAppMessageInternal instanceWithJson:message]; - + [OSMessagingController.sharedInstance messageViewDidSelectAction:testMessage withAction:action]; // The action should not send a request due to the nil id but it should not crash XCTAssertEqualObjects(OneSignalClientOverrider.lastHTTPRequestType, NSStringFromClass([OSRequestRegisterUser class])); diff --git a/iOS_SDK/OneSignalSDK/UnitTests/OSInAppMessagingHelpers.m b/iOS_SDK/OneSignalSDK/UnitTests/OSInAppMessagingHelpers.m index 98f428980..f03fd2a9d 100644 --- a/iOS_SDK/OneSignalSDK/UnitTests/OSInAppMessagingHelpers.m +++ b/iOS_SDK/OneSignalSDK/UnitTests/OSInAppMessagingHelpers.m @@ -273,7 +273,7 @@ + (OSInAppMessageInternal *)testMessageWithTriggers:(NSArray #import "UnitTestCommonMethods.h" -#import "OneSignalLocation.h" +#import "OneSignalLocationManager.h" #import "OneSignalLocationOverrider.h" #import "OneSignalHelper.h" #import "OneSignalHelperOverrider.h" @@ -50,7 +50,7 @@ - (void)setUp { [UnitTestCommonMethods beforeEachTest:self]; // Clear last location stored - [OneSignalLocation clearLastLocation]; + [OneSignalLocationManager clearLastLocation]; OneSignalHelperOverrider.mockIOSVersion = 10; @@ -84,7 +84,7 @@ - (void)testLocationPromptAcceptedWithSetLocationShared_iOS9_WhenInUseUsage { // Simulate user granting location services [OneSignalLocationOverrider grantLocationServices]; // Last location should not exist since we are not sharing location - XCTAssertFalse([OneSignalLocation lastLocation]); + XCTAssertFalse([OneSignalLocationManager lastLocation]); // Set location shared true [OneSignal setLocationShared:true]; @@ -92,7 +92,7 @@ - (void)testLocationPromptAcceptedWithSetLocationShared_iOS9_WhenInUseUsage { [OneSignalLocationOverrider grantLocationServices]; [UnitTestCommonMethods runLongBackgroundThreads]; // Last location should exist since we are sharing location - XCTAssertTrue([OneSignalLocation lastLocation]); + XCTAssertTrue([OneSignalLocationManager lastLocation]); } - (void)testLocationPromptAcceptedWithSetLocationSharedTrueFromRemoteParams_iOS9_WhenInUseUsage { @@ -106,12 +106,12 @@ - (void)testLocationPromptAcceptedWithSetLocationSharedTrueFromRemoteParams_iOS9 // location_shared set as true on remote params XCTAssertTrue([OneSignal isLocationShared]); // Last location should not exist since we didn't grant permission - XCTAssertFalse([OneSignalLocation lastLocation]); + XCTAssertFalse([OneSignalLocationManager lastLocation]); // Simulate user granting location services [OneSignalLocationOverrider grantLocationServices]; [UnitTestCommonMethods runLongBackgroundThreads]; // Last location should exist since we are sharing location - XCTAssertTrue([OneSignalLocation lastLocation]); + XCTAssertTrue([OneSignalLocationManager lastLocation]); } - (void)testLocationPromptAcceptedWithSetLocationSharedFalseFromRemoteParams_iOS9_WhenInUseUsage { @@ -128,11 +128,11 @@ - (void)testLocationPromptAcceptedWithSetLocationSharedFalseFromRemoteParams_iOS // location_shared set as false on remote params XCTAssertFalse([OneSignal isLocationShared]); // Last location should not exist since we didn't grant permission - XCTAssertFalse([OneSignalLocation lastLocation]); + XCTAssertFalse([OneSignalLocationManager lastLocation]); // Simulate user granting location services [OneSignalLocationOverrider grantLocationServices]; // Last location should not exist since we are not sharing location - XCTAssertFalse([OneSignalLocation lastLocation]); + XCTAssertFalse([OneSignalLocationManager lastLocation]); } - (void)testLocationSharedTrueFromRemoteParams { @@ -143,12 +143,12 @@ - (void)testLocationSharedTrueFromRemoteParams { // location_shared set as true on remote params XCTAssertTrue([OneSignal isLocationShared]); // Last location should not exist since we didn't grant permission - XCTAssertFalse([OneSignalLocation lastLocation]); + XCTAssertFalse([OneSignalLocationManager lastLocation]); // Simulate user granting location services [OneSignalLocationOverrider grantLocationServices]; [UnitTestCommonMethods runLongBackgroundThreads]; // Last location should exist since we are sharing location - XCTAssertTrue([OneSignalLocation lastLocation]); + XCTAssertTrue([OneSignalLocationManager lastLocation]); } - (void)testLocationSharedFalseFromRemoteParams { @@ -162,11 +162,11 @@ - (void)testLocationSharedFalseFromRemoteParams { // location_shared set as false on remote params XCTAssertFalse([OneSignal isLocationShared]); // Last location should not exist since we didn't grant permission - XCTAssertFalse([OneSignalLocation lastLocation]); + XCTAssertFalse([OneSignalLocationManager lastLocation]); // Simulate user granting location services [OneSignalLocationOverrider grantLocationServices]; // Last location should not exist since we are not sharing location - XCTAssertFalse([OneSignalLocation lastLocation]); + XCTAssertFalse([OneSignalLocationManager lastLocation]); } - (void)testLocationSharedEnable_UserConfigurationOverrideByRemoteParams { @@ -225,7 +225,7 @@ - (void)assertUserConsent { //indicates initialization was delayed XCTAssertNil(OneSignal.appId); - XCTAssertTrue([OneSignal requiresUserPrivacyConsent]); + XCTAssertTrue([OneSignal requiresPrivacyConsent]); let latestHttpRequest = OneSignalClientOverrider.lastUrl; @@ -234,11 +234,11 @@ - (void)assertUserConsent { //if lastUrl is null, isEqualToString: will return false, so perform an equality check as well XCTAssertTrue([OneSignalClientOverrider.lastUrl isEqualToString:latestHttpRequest] || latestHttpRequest == OneSignalClientOverrider.lastUrl); - [OneSignal consentGranted:true]; + [OneSignal setPrivacyConsent:true]; XCTAssertTrue([@"b2f7f966-d8cc-11e4-bed1-df8f05be55ba" isEqualToString:OneSignal.appId]); - XCTAssertFalse([OneSignal requiresUserPrivacyConsent]); + XCTAssertFalse([OneSignal requiresPrivacyConsent]); } - (void)testUserPrivacyConsentRequired_ByRemoteParams { @@ -248,7 +248,7 @@ - (void)testUserPrivacyConsentRequired_ByRemoteParams { [UnitTestCommonMethods initOneSignal_andThreadWait]; // requires_user_privacy_consent set as true on remote params - XCTAssertTrue([OneSignal requiresUserPrivacyConsent]); + XCTAssertTrue([OneSignal requiresPrivacyConsent]); [NSBundleOverrider setPrivacyState:false]; } @@ -256,12 +256,12 @@ - (void)testUserPrivacyConsentNotRequired_ByRemoteParams { [UnitTestCommonMethods initOneSignal_andThreadWait]; // requires_user_privacy_consent set as false on remote params - XCTAssertFalse([OneSignal requiresUserPrivacyConsent]); + XCTAssertFalse([OneSignal requiresPrivacyConsent]); [NSBundleOverrider setPrivacyState:false]; } - (void)testUserPrivacyConsentRequired_UserConfigurationOverrideByRemoteParams { - [OneSignal setRequiresUserPrivacyConsent:false]; + [OneSignal setRequiresPrivacyConsent:false]; NSMutableDictionary *params = [[OneSignalClientOverrider remoteParamsResponse] mutableCopy]; [params setObject:@YES forKey:IOS_REQUIRES_USER_PRIVACY_CONSENT]; @@ -269,7 +269,7 @@ - (void)testUserPrivacyConsentRequired_UserConfigurationOverrideByRemoteParams { [UnitTestCommonMethods initOneSignal_andThreadWait]; // requires_user_privacy_consent set as true on remote params - XCTAssertTrue([OneSignal requiresUserPrivacyConsent]); + XCTAssertTrue([OneSignal requiresPrivacyConsent]); [NSBundleOverrider setPrivacyState:false]; } @@ -280,10 +280,10 @@ - (void)testUserPrivacyConsentRequired_UserConfigurationNotOverrideRemoteParams [UnitTestCommonMethods initOneSignal_andThreadWait]; // requires_user_privacy_consent set as true on remote params - XCTAssertTrue([OneSignal requiresUserPrivacyConsent]); + XCTAssertTrue([OneSignal requiresPrivacyConsent]); - [OneSignal setRequiresUserPrivacyConsent:false]; - XCTAssertTrue([OneSignal requiresUserPrivacyConsent]); + [OneSignal setRequiresPrivacyConsent:false]; + XCTAssertTrue([OneSignal requiresPrivacyConsent]); [NSBundleOverrider setPrivacyState:false]; } @@ -292,10 +292,10 @@ - (void)testUserPrivacyConsentNotRequired_UserConfigurationNotOverrideRemotePara [UnitTestCommonMethods initOneSignal_andThreadWait]; // requires_user_privacy_consent set as false on remote params - XCTAssertFalse([OneSignal requiresUserPrivacyConsent]); + XCTAssertFalse([OneSignal requiresPrivacyConsent]); - [OneSignal setRequiresUserPrivacyConsent:true]; - XCTAssertFalse([OneSignal requiresUserPrivacyConsent]); + [OneSignal setRequiresPrivacyConsent:true]; + XCTAssertFalse([OneSignal requiresPrivacyConsent]); [NSBundleOverrider setPrivacyState:false]; } diff --git a/iOS_SDK/OneSignalSDK/UnitTests/SMSTests.m b/iOS_SDK/OneSignalSDK/UnitTests/SMSTests.m index d31a6c0f8..bba5a33da 100644 --- a/iOS_SDK/OneSignalSDK/UnitTests/SMSTests.m +++ b/iOS_SDK/OneSignalSDK/UnitTests/SMSTests.m @@ -86,7 +86,8 @@ - (void)setUp { self.ONESIGNAL_EXTERNAL_USER_ID = @"test_external_user_id"; self.ONESIGNAL_EXTERNAL_USER_ID_HASH_TOKEN = @"test_external_user_id_hash_token"; - [OneSignal setLogLevel:ONE_S_LL_VERBOSE visualLevel:ONE_S_LL_NONE]; + [OneSignal.Debug setLogLevel:ONE_S_LL_VERBOSE]; + [OneSignal.Debug setVisualLevel:ONE_S_LL_NONE]; } /* diff --git a/iOS_SDK/OneSignalSDK/UnitTests/Shadows/OneSignalClientOverrider.m b/iOS_SDK/OneSignalSDK/UnitTests/Shadows/OneSignalClientOverrider.m index 6335329bd..83f07ec0b 100644 --- a/iOS_SDK/OneSignalSDK/UnitTests/Shadows/OneSignalClientOverrider.m +++ b/iOS_SDK/OneSignalSDK/UnitTests/Shadows/OneSignalClientOverrider.m @@ -223,7 +223,7 @@ + (void)finishExecutingRequest:(OneSignalRequest *)request onSuccess:(OSResultSu } else if (!parameters[@"app_id"]) { _XCTPrimitiveFail(currentTestInstance, @"All request must include an app_id"); } - + [self didCompleteRequest:request]; if (successBlock) { diff --git a/iOS_SDK/OneSignalSDK/UnitTests/Shadows/OneSignalLocationOverrider.m b/iOS_SDK/OneSignalSDK/UnitTests/Shadows/OneSignalLocationOverrider.m index a83dcb2f6..5a3467d82 100644 --- a/iOS_SDK/OneSignalSDK/UnitTests/Shadows/OneSignalLocationOverrider.m +++ b/iOS_SDK/OneSignalSDK/UnitTests/Shadows/OneSignalLocationOverrider.m @@ -31,7 +31,7 @@ #import "TestHelperFunctions.h" #import "OneSignalSelectorHelpers.h" #import "OneSignalHelperOverrider.h" -#import "OneSignalLocation.h" +#import "OneSignalLocationManager.h" #import "OneSignalLocationOverrider.h" @implementation OneSignalLocationOverrider @@ -51,7 +51,7 @@ @implementation OneSignalLocationOverrider + (void)load { - injectStaticSelector([OneSignalLocationOverrider class], @selector(overrideStarted), [OneSignalLocation class], @selector(started)); + injectStaticSelector([OneSignalLocationOverrider class], @selector(overrideStarted), [OneSignalLocationManager class], @selector(started)); injectStaticSelector([OneSignalLocationOverrider class], @selector(overrideAuthorizationStatus), [CLLocationManager class], @selector(authorizationStatus)); injectSelector( @@ -120,7 +120,7 @@ + (void)grantLocationServices { calledRequestAlwaysAuthorization = false; calledRequestWhenInUseAuthorization = false; - [OneSignalLocation internalGetLocation:true fallbackToSettings:false]; + [OneSignalLocationManager internalGetLocation:true fallbackToSettings:false]; } + (int)overrideAuthorizationStatus { diff --git a/iOS_SDK/OneSignalSDK/UnitTests/UIApplicationDelegateSwizzlingTests.m b/iOS_SDK/OneSignalSDK/UnitTests/UIApplicationDelegateSwizzlingTests.m index f810b6263..1603f0e10 100644 --- a/iOS_SDK/OneSignalSDK/UnitTests/UIApplicationDelegateSwizzlingTests.m +++ b/iOS_SDK/OneSignalSDK/UnitTests/UIApplicationDelegateSwizzlingTests.m @@ -566,7 +566,7 @@ - (UNNotificationResponse*)createOneSignalNotificationResponse { id userInfo = @{@"custom": @{ @"i": @"b2f7f966-d8cc-11e4-bed1-df8f05be55ba" } }; - + return [UnitTestCommonMethods createBasiciOSNotificationResponseWithPayload:userInfo]; } @@ -575,7 +575,6 @@ - (UNNotificationResponse*)createNonOneSignalNotificationResponse { } - (void)testNotificationOpenForwardsToLegacySelector { - AppDelegateForExistingSelectorsTest* myAppDelegate = [AppDelegateForExistingSelectorsTest new]; UIApplication.sharedApplication.delegate = myAppDelegate; @@ -590,9 +589,7 @@ - (void)testNotificationOpenForwardsToLegacySelector { ) ]); XCTAssertEqual([OneSignalAppDelegateOverrider callCountForSelector:@"oneSignalReceiveRemoteNotification:UserInfo:fetchCompletionHandler:"], 1); - - - + notifResponse = [self createNonOneSignalNotificationResponse]; notifCenter = [UNUserNotificationCenter currentNotificationCenter]; notifCenterDelegate = notifCenter.delegate; @@ -604,7 +601,6 @@ - (void)testNotificationOpenForwardsToLegacySelector { ) ]); XCTAssertEqual([OneSignalAppDelegateOverrider callCountForSelector:@"oneSignalReceiveRemoteNotification:UserInfo:fetchCompletionHandler:"], 2); - } - (void)testAppDelegateInheritsFromBaseMissingSelectors { diff --git a/iOS_SDK/OneSignalSDK/UnitTests/UnitTestCommonMethods.m b/iOS_SDK/OneSignalSDK/UnitTests/UnitTestCommonMethods.m index 293fe3f0e..af1a1c30c 100644 --- a/iOS_SDK/OneSignalSDK/UnitTests/UnitTestCommonMethods.m +++ b/iOS_SDK/OneSignalSDK/UnitTests/UnitTestCommonMethods.m @@ -51,7 +51,7 @@ #import "OSInAppMessagingHelpers.h" #import "OSOutcomeEventsCache.h" #import "OSInfluenceDataRepository.h" -#import "OneSignalLocation.h" +#import "OneSignalLocationManager.h" #import "OneSignalNotificationServiceExtensionHandler.h" #import "OneSignalTrackFirebaseAnalytics.h" #import "OSMessagingControllerOverrider.h" @@ -227,7 +227,8 @@ + (void)clearStateForAppRestart:(XCTestCase *)testCase { [UIAlertViewOverrider reset]; - [OneSignal setLogLevel:ONE_S_LL_INFO visualLevel:ONE_S_LL_NONE]; + [OneSignal.Debug setLogLevel:ONE_S_LL_INFO]; + [OneSignal.Debug setVisualLevel:ONE_S_LL_NONE]; [NSTimerOverrider reset]; [OneSignalLocationOverrider reset]; diff --git a/iOS_SDK/OneSignalSDK/UnitTests/UnitTests-Bridging-Header.h b/iOS_SDK/OneSignalSDK/UnitTests/UnitTests-Bridging-Header.h new file mode 100644 index 000000000..7da3e9dfe --- /dev/null +++ b/iOS_SDK/OneSignalSDK/UnitTests/UnitTests-Bridging-Header.h @@ -0,0 +1,5 @@ +// +// Use this file to import your target's public headers that you would like to expose to Swift. +// + +#import "OneSignal.h" diff --git a/iOS_SDK/OneSignalSDK/UnitTests/UnitTests.m b/iOS_SDK/OneSignalSDK/UnitTests/UnitTests.m index a3ae7b2dc..cc976855d 100644 --- a/iOS_SDK/OneSignalSDK/UnitTests/UnitTests.m +++ b/iOS_SDK/OneSignalSDK/UnitTests/UnitTests.m @@ -35,7 +35,6 @@ #import #import "UncaughtExceptionHandler.h" #import "OneSignal.h" -#import "OneSignalHelper.h" #import "OneSignalTracker.h" #import "OneSignalInternal.h" #import "NSString+OneSignal.h" @@ -70,7 +69,7 @@ #import "UIAlertViewOverrider.h" #import "OneSignalTrackFirebaseAnalyticsOverrider.h" #import "OneSignalClientOverrider.h" -#import "OneSignalLocation.h" +#import "OneSignalLocationManager.h" #import "OneSignalLocationOverrider.h" #import "UIDeviceOverrider.h" #import "OneSignalOverrider.h" @@ -112,7 +111,7 @@ - (void)setUp { // Only enable remote-notifications in UIBackgroundModes NSBundleOverrider.nsbundleDictionary = @{@"UIBackgroundModes": @[@"remote-notification"]}; // Clear last location stored - [OneSignalLocation clearLastLocation]; + [OneSignalLocationManager clearLastLocation]; // Clear callback external ids for push and email before each test self.CALLBACK_EXTERNAL_USER_ID = nil; @@ -169,7 +168,7 @@ - (void)testBasicInitTest { NSLog(@"CHECKING LAST HTTP REQUEST"); // final value should be "Simulator iPhone" or "Simulator iPad" - let deviceModel = [OneSignalHelper getDeviceVariant]; + let deviceModel = [OSDeviceUtils getDeviceVariant]; XCTAssertEqualObjects(OneSignalClientOverrider.lastHTTPRequest[@"app_id"], @"b2f7f966-d8cc-11e4-bed1-df8f05be55ba"); XCTAssertEqualObjects(OneSignalClientOverrider.lastHTTPRequest[@"identifier"], UIApplicationOverrider.mockAPNSToken); @@ -250,14 +249,13 @@ - (void)testInitOnSimulator { [UnitTestCommonMethods runBackgroundThreads]; // final value should be "Simulator iPhone" or "Simulator iPad" - let deviceModel = [OneSignalHelper getDeviceVariant]; + let deviceModel = [OSDeviceUtils getDeviceVariant]; XCTAssertEqualObjects(OneSignalClientOverrider.lastHTTPRequest[@"app_id"], @"b2f7f966-d8cc-11e4-bed1-df8f05be55ba"); XCTAssertNil(OneSignalClientOverrider.lastHTTPRequest[@"identifier"]); XCTAssertEqualObjects(OneSignalClientOverrider.lastHTTPRequest[@"notification_types"], @-15); XCTAssertEqualObjects(OneSignalClientOverrider.lastHTTPRequest[@"device_model"], deviceModel); XCTAssertEqualObjects(OneSignalClientOverrider.lastHTTPRequest[@"device_type"], @0); - XCTAssertEqual(OneSignalClientOverrider.lastHTTPRequest[@"test_type"], @1); XCTAssertEqualObjects(OneSignalClientOverrider.lastHTTPRequest[@"language"], @"en-US"); // 2nd init call should not fire another on_session call. @@ -918,50 +916,19 @@ - (void)testFirebaseAnalyticsInfluenceNotificationOpen { #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wdeprecated-declarations" [OneSignalExtension didReceiveNotificationExtensionRequest:response.notification.request - withMutableNotificationContent:nil]; + withMutableNotificationContent:nil]; #pragma clang diagnostic pop - // Note: we are no longer logging the notification received event to Firebase for iOS. - - // Trigger a new app session - [UnitTestCommonMethods backgroundApp]; - [UnitTestCommonMethods runBackgroundThreads]; - [NSDateOverrider advanceSystemTimeBy:41]; - [UnitTestCommonMethods foregroundApp]; - [UnitTestCommonMethods runBackgroundThreads]; - - // TODO: Test carry over causes this influence_open not to fire - // Since we opened the app under 2 mintues after receiving a notification - // an influence_open should be sent to firebase. + // Make sure we are tracking the notification received event to firebase. XCTAssertEqual(OneSignalTrackFirebaseAnalyticsOverrider.loggedEvents.count, 1); - id influence_open_event = @{ - @"os_notification_influence_open": @{ - @"campaign": @"Template Name - 1117f966-d8cc-11e4-bed1-df8f05be55bb", - @"medium": @"notification", - @"notification_id": @"b2f7f966-d8cc-11e4-bed1-df8f05be55ba", - @"source": @"OneSignal"} + id received_event = @{ + @"os_notification_received": @{ + @"campaign": @"Template Name - 1117f966-d8cc-11e4-bed1-df8f05be55bb", + @"medium": @"notification", + @"notification_id": @"b2f7f966-d8cc-11e4-bed1-df8f05be55ba", + @"source": @"OneSignal"} }; - XCTAssertEqualObjects(OneSignalTrackFirebaseAnalyticsOverrider.loggedEvents[0], influence_open_event); -} - -- (void)testFirebaseAnalyticsInfluenceNotificationOpenWitNilProperties { - // Start App once to download params - OneSignalTrackFirebaseAnalyticsOverrider.hasFIRAnalytics = true; - [UnitTestCommonMethods initOneSignal]; - [UnitTestCommonMethods foregroundApp]; - [UnitTestCommonMethods runBackgroundThreads]; - - // Notification is received. - // The Notification Service Extension runs where the notification received id tracked. - // Note: This is normally a separate process but can't emulate that here. - let response = [UnitTestCommonMethods createBasiciOSNotificationResponseWithPayload:@{}]; - #pragma clang diagnostic push - #pragma clang diagnostic ignored "-Wdeprecated-declarations" - [OneSignalExtension didReceiveNotificationExtensionRequest:response.notification.request - withMutableNotificationContent:nil]; - #pragma clang diagnostic pop - - // Note: we are no longer logging the notification received event to Firebase for iOS. + XCTAssertEqualObjects(OneSignalTrackFirebaseAnalyticsOverrider.loggedEvents[0], received_event); // Trigger a new app session [UnitTestCommonMethods backgroundApp]; @@ -973,14 +940,15 @@ - (void)testFirebaseAnalyticsInfluenceNotificationOpenWitNilProperties { // TODO: Test carry over causes this influence_open not to fire // Since we opened the app under 2 mintues after receiving a notification // an influence_open should be sent to firebase. - XCTAssertEqual(OneSignalTrackFirebaseAnalyticsOverrider.loggedEvents.count, 1); + XCTAssertEqual(OneSignalTrackFirebaseAnalyticsOverrider.loggedEvents.count, 2); id influence_open_event = @{ @"os_notification_influence_open": @{ - @"campaign": @"", - @"medium": @"notification", - @"source": @"OneSignal"} + @"campaign": @"Template Name - 1117f966-d8cc-11e4-bed1-df8f05be55bb", + @"medium": @"notification", + @"notification_id": @"b2f7f966-d8cc-11e4-bed1-df8f05be55ba", + @"source": @"OneSignal"} }; - XCTAssertEqualObjects(OneSignalTrackFirebaseAnalyticsOverrider.loggedEvents[0], influence_open_event); + XCTAssertEqualObjects(OneSignalTrackFirebaseAnalyticsOverrider.loggedEvents[1], influence_open_event); } - (void)testOSNotificationPayloadParsesTemplateFields { @@ -1772,7 +1740,7 @@ - (UNNotificationCategory*)unNotificagionCategoryWithId:(NSString*)identifier { // iOS 10 - Notification Service Extension test - (void) didReceiveNotificationExtensionRequestDontOverrideCateogoryWithUserInfo:(NSDictionary *)userInfo { - id notifResponse = [UnitTestCommonMethods createBasiciOSNotificationResponseWithPayload:userInfo]; + UNNotificationResponse *notifResponse = [UnitTestCommonMethods createBasiciOSNotificationResponseWithPayload:userInfo]; [[notifResponse notification].request.content setValue:@"some_category" forKey:@"categoryIdentifier"]; @@ -1832,7 +1800,7 @@ - (void) testDidReceiveNotificationExtensionRequestDontOverrideCateogory { @"att": @{ @"id": @"http://domain.com/file.jpg" } }}; - id notifResponse = [UnitTestCommonMethods createBasiciOSNotificationResponseWithPayload:userInfo]; + UNNotificationResponse * notifResponse = [UnitTestCommonMethods createBasiciOSNotificationResponseWithPayload:userInfo]; [[notifResponse notification].request.content setValue:@"some_category" forKey:@"categoryIdentifier"]; @@ -1884,7 +1852,7 @@ - (void)testAddingSharedKeysIfMissing { // 2. Remove shared keys to simulate the state of coming from a pre-2.12.1 version [OneSignalUserDefaults.initShared removeValueForKey:OSUD_APP_ID]; - [OneSignalUserDefaults.initShared removeValueForKey:OSUD_PLAYER_ID_TO]; + [OneSignalUserDefaults.initShared removeValueForKey:OSUD_PUSH_SUBSCRIPTION_ID]; // 3. Restart app [UnitTestCommonMethods backgroundApp]; @@ -1893,7 +1861,7 @@ - (void)testAddingSharedKeysIfMissing { // 4. Ensure values are present again XCTAssertNotNil([OneSignalUserDefaults.initShared getSavedSetForKey:OSUD_APP_ID defaultValue:nil]); - XCTAssertNotNil([OneSignalUserDefaults.initShared getSavedSetForKey:OSUD_PLAYER_ID_TO defaultValue:nil]); + XCTAssertNotNil([OneSignalUserDefaults.initShared getSavedSetForKey:OSUD_PUSH_SUBSCRIPTION_ID defaultValue:nil]); } // iOS 10 - Notification Service Extension test - local file @@ -1907,7 +1875,7 @@ - (void)testDidReceiveNotificationExtensionRequestLocalFile { @"att": @{ @"id": @"file.jpg" } }}; - id notifResponse = [UnitTestCommonMethods createBasiciOSNotificationResponseWithPayload:userInfo]; + UNNotificationResponse *notifResponse = [UnitTestCommonMethods createBasiciOSNotificationResponseWithPayload:userInfo]; #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wdeprecated-declarations" @@ -1931,7 +1899,7 @@ - (void) testServiceExtensionTimeWillExpireRequest { @"att": @{ @"id": @"http://domain.com/file.jpg" } }}; - id notifResponse = [UnitTestCommonMethods createBasiciOSNotificationResponseWithPayload:userInfo]; + UNNotificationResponse *notifResponse = [UnitTestCommonMethods createBasiciOSNotificationResponseWithPayload:userInfo]; UNMutableNotificationContent* content = [OneSignalExtension serviceExtensionTimeWillExpireRequest:[notifResponse notification].request withMutableNotificationContent:nil]; @@ -1954,7 +1922,7 @@ - (void) testServiceExtensionContentHandlerFired { @"att": @{ @"id": @"http://domain.com/file.jpg" } }}; - id notifResponse = [UnitTestCommonMethods createBasiciOSNotificationResponseWithPayload:userInfo]; + UNNotificationResponse *notifResponse = [UnitTestCommonMethods createBasiciOSNotificationResponseWithPayload:userInfo]; // create an expectation that is fulfilled when the contentHandler is fired and when didReceiveNotificationExtensionRequest // returns. This indicates that the semaphore waiting on the confirmed delivery has been signaled. @@ -1978,7 +1946,7 @@ - (void) testServiceExtensionContentHandlerFired { (void (^)(UNNotificationContent * _Nonnull))contentHandler */ -(void)testBuildOSRequest { - let request = [OSRequestSendTagsToServer withUserId:@"12345" appId:@"b2f7f966-d8cc-11e4-bed1-df8f05be55ba" tags:@{@"tag1" : @"test1", @"tag2" : @"test2"} networkType:[OneSignalHelper getNetType] withEmailAuthHashToken:nil withExternalIdAuthHashToken:nil]; + let request = [OSRequestSendTagsToServer withUserId:@"12345" appId:@"b2f7f966-d8cc-11e4-bed1-df8f05be55ba" tags:@{@"tag1" : @"test1", @"tag2" : @"test2"} networkType:[OSNetworkingUtils getNetType] withEmailAuthHashToken:nil withExternalIdAuthHashToken:nil]; XCTAssert([request.parameters[@"app_id"] isEqualToString:@"b2f7f966-d8cc-11e4-bed1-df8f05be55ba"]); XCTAssert([request.parameters[@"tags"][@"tag1"] isEqualToString:@"test1"]); @@ -1998,7 +1966,7 @@ -(void)testInvalidJSONTags { let invalidJson = @{@{@"invalid1" : @"invalid2"} : @"test"}; //Keys are required to be strings, this would crash the app if not handled appropriately - let request = [OSRequestSendTagsToServer withUserId:@"12345" appId:@"b2f7f966-d8cc-11e4-bed1-df8f05be55ba" tags:invalidJson networkType:[OneSignalHelper getNetType] withEmailAuthHashToken:nil withExternalIdAuthHashToken:nil]; + let request = [OSRequestSendTagsToServer withUserId:@"12345" appId:@"b2f7f966-d8cc-11e4-bed1-df8f05be55ba" tags:invalidJson networkType:[OSNetworkingUtils getNetType] withEmailAuthHashToken:nil withExternalIdAuthHashToken:nil]; let urlRequest = request.urlRequest; @@ -2224,7 +2192,7 @@ - (void)testOpenedHandlerNotFiredWhenOverridingDisplayType { } - (UNNotificationAttachment *)deliverNotificationWithJSON:(id)json { - id notifResponse = [UnitTestCommonMethods createBasiciOSNotificationResponseWithPayload:json]; + UNNotificationResponse *notifResponse = [UnitTestCommonMethods createBasiciOSNotificationResponseWithPayload:json]; [[notifResponse notification].request.content setValue:@"some_category" forKey:@"categoryIdentifier"]; @@ -2294,7 +2262,7 @@ the SDK will open iOS Settings (iOS 10 or higher) */ - (void)testOpenNotificationSettings { OneSignalHelperOverrider.mockIOSVersion = 10; - [[OneSignalDialogController sharedInstance] clearQueue]; + [[OSDialogInstanceManager sharedInstance] clearQueue]; //set up the test so that the user has declined the prompt. //we can then call prompt with Settings fallback. @@ -3127,13 +3095,13 @@ - (void)testHexStringFromDataWithInvalidValues { - (void)testGetDeviceVariant { - var deviceModel = [OneSignalHelper getDeviceVariant]; + var deviceModel = [OSDeviceUtils getDeviceVariant]; // Catalyst ("Mac") #if TARGET_OS_MACCATALYST XCTAssertEqualObjects(@"Mac", deviceModel); #elif TARGET_OS_SIMULATOR // Simulator iPhone - deviceModel = [OneSignalHelper getDeviceVariant]; + deviceModel = [OSDeviceUtils getDeviceVariant]; XCTAssertEqualObjects(@"Simulator iPhone", deviceModel); #else // Real iPhone @@ -3350,22 +3318,6 @@ - (void)testLaunchURL { XCTAssertFalse(OneSignalOverrider.launchWebURLWasCalled); } -- (void)testsetLaunchURLInAppAfterInit { - // 1. setLaunchURLsInApp to false - [OneSignal setLaunchURLsInApp:false]; - - // 2. Init OneSignal with app start - [UnitTestCommonMethods initOneSignal]; - [UnitTestCommonMethods runBackgroundThreads]; - - XCTAssertFalse([OneSignalUserDefaults.initStandard getSavedBoolForKey:OSUD_NOTIFICATION_OPEN_LAUNCH_URL defaultValue:false]); - - // 3. Change setLaunchURLsInApp to true - [OneSignal setLaunchURLsInApp:true]; - - XCTAssertTrue([OneSignalUserDefaults.initStandard getSavedBoolForKey:OSUD_NOTIFICATION_OPEN_LAUNCH_URL defaultValue:false]); -} - - (void)testTimezoneId { let mockTimezone = [NSTimeZone timeZoneWithName:@"Europe/London"]; @@ -3435,7 +3387,7 @@ - (void) testParseCollapseIdFromNotificationRequestWithCustom { @"ti": @"templateId123", @"tn": @"Template name" }}; - id notifResponse = [UnitTestCommonMethods createBasiciOSNotificationResponseWithPayload:apsCustom]; + UNNotificationResponse *notifResponse = [UnitTestCommonMethods createBasiciOSNotificationResponseWithPayload:apsCustom]; UNMutableNotificationContent* content = [OneSignal didReceiveNotificationExtensionRequest:[notifResponse notification].request withMutableNotificationContent:nil withContentHandler:nil]; @@ -3457,7 +3409,7 @@ - (void) testParseCollapseIdFromNotificationRequestWithOSData { @"ti": @"templateId123", @"tn": @"Template name" }}; - id notifResponse = [UnitTestCommonMethods createBasiciOSNotificationResponseWithPayload:apsOSData]; + UNNotificationResponse *notifResponse = [UnitTestCommonMethods createBasiciOSNotificationResponseWithPayload:apsOSData]; UNMutableNotificationContent* content = [OneSignal didReceiveNotificationExtensionRequest:[notifResponse notification].request withMutableNotificationContent:nil withContentHandler:nil]; @@ -3644,4 +3596,5 @@ - (void)testExitLiveActivityEarly { } + @end diff --git a/iOS_SDK/OneSignalSDK/UnitTests/UserModelObjcTests.m b/iOS_SDK/OneSignalSDK/UnitTests/UserModelObjcTests.m new file mode 100644 index 000000000..4869cb0f1 --- /dev/null +++ b/iOS_SDK/OneSignalSDK/UnitTests/UserModelObjcTests.m @@ -0,0 +1,210 @@ +/* + Modified MIT License + + Copyright 2022 OneSignal + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + 1. The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + 2. All copies of substantial portions of the Software may only be used in connection + with services provided by OneSignal. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + */ + +#import +#import "OneSignalFramework.h" + +@interface UserModelObjcTests : XCTestCase + +@end + + +@interface OSPushSubscriptionTestObserver: NSObject +- (void)onOSPushSubscriptionChangedWithPrevious:(OSPushSubscriptionState * _Nonnull)previous current:(OSPushSubscriptionState * _Nonnull)current; +@end + +@implementation OSPushSubscriptionTestObserver +- (void)onOSPushSubscriptionChangedWithPrevious:(OSPushSubscriptionState * _Nonnull)previous current:(OSPushSubscriptionState * _Nonnull)current { + NSLog(@"🔥 UnitTest:onOSPushSubscriptionChanged :%@ :%@", previous, current); + +} +@end + +@implementation UserModelObjcTests + +- (void)setUp { + // Put setup code here. This method is called before the invocation of each test method in the class. + [super setUp]; +} + +- (void)tearDown { + // Put teardown code here. This method is called after the invocation of each test method in the class. + [super tearDown]; +} + +/** + This test lays out the public APIs of the user model + */ +- (void)testUserModelMethodAccess { + + // User Identity + [OneSignal login:@"foo"]; + [OneSignal login:@"foo" withToken:@"someToken"]; + [OneSignal login:@"foo" withToken:nil]; + + [OneSignal logout]; + + // Aliases + [OneSignal.User addAliasWithLabel:@"foo" id:@"foo1"]; + [OneSignal.User addAliases:@{@"foo": @"foo1", @"bar": @"bar2"}]; + [OneSignal.User removeAlias:@"foo"]; + [OneSignal.User removeAliases:@[@"foo", @"bar"]]; + + // Tags + [OneSignal.User addTagWithKey:@"foo" value:@"bar"]; + [OneSignal.User addTags:@{@"foo": @"foo1", @"bar": @"bar2"}]; + [OneSignal.User removeTag:@"foo"]; + [OneSignal.User removeTags:@[@"foo", @"bar"]]; + + // Email + [OneSignal.User addEmail:@"person@example.com"]; + [OneSignal.User removeEmail:@"person@example.com"]; + + // SMS + [OneSignal.User addSmsNumber:@"+15551231234"]; + [OneSignal.User removeSmsNumber:@"+15551231234"]; + + // Triggers + [OneSignal.InAppMessages addTrigger:@"foo" withValue:@"bar"]; + [OneSignal.InAppMessages addTriggers:@{@"foo": @"foo1", @"bar": @"bar2"}]; + [OneSignal.InAppMessages removeTrigger:@"foo"]; + [OneSignal.InAppMessages removeTriggers:@[@"foo", @"bar"]]; + [OneSignal.InAppMessages clearTriggers]; +} + +/** + This is to collect things that should not work, but do for now. + */ +- (void)testTheseShouldNotWork { + // Should not be settable + // OneSignal.user.pushSubscription.token = [NSUUID new]; // <- Confirmed that users can't set token + // OneSignal.user.pushSubscription.subscriptionId = [NSUUID new]; // <- Confirmed that users can't set subscriptionId +} + +/** + Test the access of properties and methods, and setting properties related to the push subscription. + */ +- (void)testPushSubscriptionPropertiesAccess { + // TODO: Fix these unit tests +// // Create a user and mock pushSubscription +// id user = OneSignal.user; +// [user testCreatePushSubscriptionWithSubscriptionId:[NSUUID new] token:[NSUUID new] enabled:false]; +// +// // Access properties of the pushSubscription +// NSUUID* subscriptionId = user.pushSubscription.subscriptionId; +// NSUUID* token = user.pushSubscription.token; +// bool enabled = user.pushSubscription.enabled; // BOOL or bool preferred? +// +// // Set the enabled property of the pushSubscription +// user.pushSubscription.enabled = true; +// +// // Create a push subscription observer +// OSPushSubscriptionTestObserver* observer = [OSPushSubscriptionTestObserver new]; + + // Push subscription observers are not user-scoped +// [OneSignal addSubscriptionObserver:observer]; +// [OneSignal removeSubscriptionObserver:observer]; +} + +/** + Test the model repo hook up via a login with external ID and setting alias. + Test the operation repo hookup as well and check the deltas being enqueued and flushed. + */ +- (void)testModelAndOperationRepositoryHookUpWithLoginAndSetAlias { + // login an user with external ID + [OneSignal login:@"user01"]; + + // Check that deltas for alias (Identity) are created correctly and enqueued. + NSLog(@"🔥 Unit Tests adding alias label_01: user_01"); + [OneSignal.User addAliasWithLabel:@"label_01" id:@"user_01"]; + [OneSignal.User removeAlias:@"nonexistent"]; + [OneSignal.User removeAlias:@"label_01"]; + [OneSignal.User addAliasWithLabel:@"label_02" id:@"user_02"]; + [OneSignal.User addAliases:@{@"test1": @"user1", @"test2": @"user2", @"test3": @"user3"}]; + [OneSignal.User removeAliases:@[@"test1", @"label_01", @"test2"]]; + + [OneSignal.User addTagWithKey:@"foo" value:@"bar"]; + + // Sleep to allow the flush to be called 1 time. + [NSThread sleepForTimeInterval:6.0f]; +} + +/** + Test login and logout and creation of guest users. + */ +- (void)testLoginLogout { + // A guest user is created when OneSignal.User is accessed + [OneSignal.User addEmail:@"test@email.com"]; + + // ... and more to be added +} + +/** + Test email and sms subscriptions. 2 Deltas are created for each add. + */ +- (void)testEmailAndSmsSubscriptions { + [OneSignal.User addEmail:@"test@example.com"]; + [OneSignal.User addSmsNumber:@"+15551231234"]; + + // Sleep to allow the flush to be called 1 time. + [NSThread sleepForTimeInterval:6.0f]; +} + +/** + Test setLocation lat long + */ +- (void)testSetLocation { + [OneSignalUserManagerImpl.sharedInstance setLocationWithLatitude:37.5 longitude:122.3]; +} + +/** + Temp tester. + */ +- (void)testTempTester { + + [OneSignal.Notifications requestPermission:^(BOOL accepted) { + NSLog(@"🔥 promptForPushNotificationsWithUserResponse: %d", accepted); + }]; + + [OneSignal.Notifications requestPermission:^(BOOL accepted) { + NSLog(@"🔥 promptForPushNotificationsWithUserResponse: %d", accepted); + } fallbackToSettings:true]; + + // IAM Pausing + [OneSignal.InAppMessages paused:true]; + BOOL paused = [OneSignal.InAppMessages paused]; +} + +- (void)testOnJwtExpired { + // TODO: Fix autocompletion. It isn't auto completing parameter names which makes this unreadable + [OneSignal.User onJwtExpiredWithExpiredHandler:^(NSString * _Nonnull externalId, void (^ _Nonnull completion)(NSString * _Nonnull)) { + NSString *newToken = externalId; + completion(newToken); + }]; +} + +@end diff --git a/iOS_SDK/OneSignalSDK/UnitTests/UserModelSwiftTests.swift b/iOS_SDK/OneSignalSDK/UnitTests/UserModelSwiftTests.swift new file mode 100644 index 000000000..e1927aabb --- /dev/null +++ b/iOS_SDK/OneSignalSDK/UnitTests/UserModelSwiftTests.swift @@ -0,0 +1,199 @@ +/* + Modified MIT License + + Copyright 2022 OneSignal + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + 1. The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + 2. All copies of substantial portions of the Software may only be used in connection + with services provided by OneSignal. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + */ + +import XCTest +import OneSignalFramework + +// Non-class type 'OSPushSubscriptionTestObserver' cannot conform to class protocol 'OSPushSubscriptionObserver' +// ^ Cannot use a struct for an OSPushSubscriptionObserver + +class OSPushSubscriptionTestObserver: OSPushSubscriptionObserver { + func onOSPushSubscriptionChanged(stateChanges: OneSignalUser.OSPushSubscriptionStateChanges) { + print("🔥 onOSPushSubscriptionChanged \(stateChanges.from) -> \(stateChanges.to)") + // dump(stateChanges.from) -> uncomment for more verbose log during testing + // dump(stateChanges.to) -> uncomment for more verbose log during testing + } +} + +class UserModelSwiftTests: XCTestCase { + + override func setUpWithError() throws { + // Put setup code here. This method is called before the invocation of each test method in the class. + try super.setUpWithError() + } + + override func tearDownWithError() throws { + // Put teardown code here. This method is called after the invocation of each test method in the class. + try super.tearDownWithError() + } + + /** + This test lays out the public APIs of the user model + */ + func testUserModelMethodAccess() throws { + + // User Identity + OneSignal.login("foo") + OneSignal.login(externalId: "foo", token: "someToken") + OneSignal.login(externalId: "foo", token: nil) + OneSignal.logout() + + // Aliases + OneSignal.User.addAlias(label: "foo", id: "bar") + OneSignal.User.addAliases(["foo": "foo1", "bar": "bar2"]) + OneSignal.User.removeAlias("foo") + OneSignal.User.removeAliases(["foo", "bar"]) + + // Tags + OneSignal.User.addTag(key: "foo", value: "bar") + OneSignal.User.addTags(["foo": "foo1", "bar": "bar2"]) + OneSignal.User.removeTag("foo") + OneSignal.User.removeTags(["foo", "bar"]) + + // Email + OneSignal.User.addEmail("person@example.com") + _ = OneSignal.User.removeEmail("person@example.com") + + // SMS + OneSignal.User.addSmsNumber("+15551231234") + _ = OneSignal.User.removeSmsNumber("+15551231234") + + // Triggers + OneSignal.InAppMessages.addTrigger("foo", withValue: "bar") + OneSignal.InAppMessages.addTriggers(["foo": "foo1", "bar": "bar2"]) + OneSignal.InAppMessages.removeTrigger("foo") + OneSignal.InAppMessages.removeTriggers(["foo", "bar"]) + OneSignal.InAppMessages.clearTriggers() + + OneSignal.InAppMessages.setClickHandler { action in + NSLog("action \(action.description)") + } + OneSignal.InAppMessages.setLifecycleHandler(nil) + } + + /** + This is to collect things that should not work, but do for now. + */ + func testTheseShouldNotWork() throws { + // Should not be settable + // OneSignal.user.pushSubscription.token = UUID() // <- Confirmed that users can't set token + // OneSignal.user.pushSubscription.subscriptionId = UUID() // <- Confirmed that users can't set subscriptionId + } + + /** + Test the access of properties and methods, and setting properties related to the push subscription. + */ + func testPushSubscriptionPropertiesAccess() throws { + // TODO: Fix these unit tests + +// // Create a user and mock pushSubscription +// let user = OneSignal.user +// user.testCreatePushSubscription(subscriptionId: UUID(), token: UUID(), enabled: false) +// +// // Access properties of the pushSubscription +// _ = user.pushSubscription.subscriptionId +// _ = user.pushSubscription.token +// _ = user.pushSubscription.enabled +// +// // Set the enabled property of the pushSubscription +// user.pushSubscription.enabled = true +// +// // Create a push subscription observer +// let observer = OSPushSubscriptionTestObserver() + + // Push subscription observers are not user-scoped + // TODO: UM The following does not build as of now + // OneSignal.addSubscriptionObserver(observer) + // OneSignal.removeSubscriptionObserver(observer) + } + + /** + Test the model repo hook up via a login with external ID and setting alias. + Test the operation repo hookup as well and check the deltas being enqueued and flushed. + */ + func testModelAndOperationRepositoryHookUpWithLoginAndSetAlias() throws { + // login an user with external ID + OneSignal.login("user01") + + // Check that deltas for alias (Identity) are created correctly and enqueued. + print("🔥 Unit Tests adding alias label_01: user_01") + OneSignal.User.addAlias(label: "label_01", id: "user_01") + OneSignal.User.removeAlias("nonexistent") + OneSignal.User.removeAlias("label_01") + OneSignal.User.addAlias(label: "label_02", id: "user_02") + OneSignal.User.addAliases(["test1": "user1", "test2": "user2", "test3": "user3"]) + OneSignal.User.removeAliases(["test1", "label_01", "test2"]) + + OneSignal.User.addTag(key: "foo", value: "bar") + + // Sleep to allow the flush to be called 1 time. + Thread.sleep(forTimeInterval: 6) + } + + /** + Test login and logout and creation of guest users. + */ + func testLoginLogout() throws { + // A guest user is created when OneSignal.User is accessed + OneSignal.User.addEmail("test@email.com") + // ... and more to be added + } + + /** + Test email and sms subscriptions. 2 Deltas are created for each add. + */ + func testEmailAndSmsSubscriptions() throws { + OneSignal.User.addEmail("test@example.com") + OneSignal.User.addSmsNumber("+15551231234") + + // Sleep to allow the flush to be called 1 time. + Thread.sleep(forTimeInterval: 6) + } + + /** + Temp test. + */ + func testTempTester() throws { + OneSignal.Notifications.requestPermission { accepted in + print("🔥 promptForPushNotificationsWithUserResponse: \(accepted)") + } + OneSignal.Notifications.requestPermission({ accepted in + print("🔥 promptForPushNotificationsWithUserResponse: \(accepted)") + }, fallbackToSettings: true) + + // IAM pausing + OneSignal.InAppMessages.Paused = true + let paused = OneSignal.InAppMessages.Paused + } + + func testJWTTokenExpired() { + OneSignal.User.onJwtExpired { externalId, completion in + let newToken = externalId + "newtokenbasedonexternalid" + completion(newToken) + } + } +} diff --git a/iOS_SDK/OneSignalSDK/build_all_frameworks.sh b/iOS_SDK/OneSignalSDK/build_all_frameworks.sh index f8202d7a1..23d6e8451 100755 --- a/iOS_SDK/OneSignalSDK/build_all_frameworks.sh +++ b/iOS_SDK/OneSignalSDK/build_all_frameworks.sh @@ -40,13 +40,28 @@ create_xcframework() { ## BUILD ONESIGNAL CORE ## create_xcframework "OneSignal_Core" "OneSignalCore" "OneSignalCore" +## BUILD ONESIGNAL CORE ## +create_xcframework "OneSignal_OSCore" "OneSignalOSCore" "OneSignalOSCore" + ## BUILD ONESIGNAL OUTCOMES ## create_xcframework "OneSignal_Outcomes" "OneSignalOutcomes" "OneSignalOutcomes" ## BUILD ONESIGNAL EXTENSION ## create_xcframework "OneSignal_Extension" "OneSignalExtension" "OneSignalExtension" +## BUILD ONESIGNAL EXTENSION ## +create_xcframework "OneSignal_Notifications" "OneSignalNotifications" "OneSignalNotifications" + +## BUILD ONESIGNAL USER ## +create_xcframework "OneSignal_User" "OneSignalUser" "OneSignalUser" + +## BUILD ONESIGNAL USER ## +create_xcframework "OneSignal_Location" "OneSignalLocation" "OneSignalLocation" + +## BUILD ONESIGNAL USER ## +create_xcframework "OneSignal_InAppMessages" "OneSignalInAppMessages" "OneSignalInAppMessages" + ## BUILD ONESIGNAL ## -create_xcframework "OneSignal_XCFramework" "OneSignal" "OneSignalFramework" +create_xcframework "OneSignal_XCFramework" "OneSignalFramework" "OneSignalFramework" open "${WORKING_DIR}" diff --git a/iOS_SDK/OneSignalSDK/build_dynamic_framework.sh b/iOS_SDK/OneSignalSDK/build_dynamic_framework.sh deleted file mode 100755 index 4c0dacb18..000000000 --- a/iOS_SDK/OneSignalSDK/build_dynamic_framework.sh +++ /dev/null @@ -1,76 +0,0 @@ -# Generates a universal/fat framework that can be used in multiple architectures (x86_64 and arm64) to support both simulator and actual devices. -# Note: When complete, this build script takes the fat framework and moves it to the {project root}/iOS_SDK/OneSignalSDK/Framework folder -# -# INPUT ENVIRONMENTAL VARIABLES (set in Xcode project settings for our Aggregate targets) -# $ONESIGNAL_DESTINATION_PATH: The path where the final fat framework should be copied to -# eg: ${SRCROOT}/Framework -# -# $ONESIGNAL_OUTPUT_NAME: The name of the framework produced (ie. {OneSignal}.framework) -# -# $ONESIGNAL_TARGET_NAME: The name of the actual Xcode target that produces the framework -# -# #ONESIGNAL_MACH_O_TYPE: Determines if the project is build as a static or dynamic library - -set -e -set -o pipefail - -# Build x86 based framework to support iOS simulator -xcodebuild -configuration "${CONFIGURATION}" -project "${PROJECT_NAME}.xcodeproj" -target ${ONESIGNAL_TARGET_NAME} -sdk "iphonesimulator${SDK_VERSION}" "${ACTION}" ONLY_ACTIVE_ARCH=NO BITCODE_GENERATION_MODE=bitcode RUN_CLANG_STATIC_ANALYZER=NO CLANG_ENABLE_MODULE_DEBUGGING=NO BUILD_DIR="${BUILD_DIR}" BUILD_ROOT="${BUILD_ROOT}" SYMROOT="${SYMROOT}" MACH_O_TYPE=${ONESIGNAL_MACH_O_TYPE} -UseModernBuildSystem=NO - -# Build arm based framework to support actual iOS devices -xcodebuild -configuration "${CONFIGURATION}" -project "${PROJECT_NAME}.xcodeproj" -target ${ONESIGNAL_TARGET_NAME} -sdk "iphoneos${SDK_VERSION}" "${ACTION}" ONLY_ACTIVE_ARCH=NO BITCODE_GENERATION_MODE=bitcode RUN_CLANG_STATIC_ANALYZER=NO CLANG_ENABLE_MODULE_DEBUGGING=NO BUILD_DIR="${BUILD_DIR}" BUILD_ROOT="${BUILD_ROOT}" SYMROOT="${SYMROOT}" MACH_O_TYPE=${ONESIGNAL_MACH_O_TYPE} -UseModernBuildSystem=NO - -CURRENTCONFIG_DEVICE_DIR=${SYMROOT}/${CONFIGURATION}-iphoneos/${ONESIGNAL_OUTPUT_NAME}.framework -CURRENTCONFIG_SIMULATOR_DIR=${SYMROOT}/${CONFIGURATION}-iphonesimulator/${ONESIGNAL_OUTPUT_NAME}.framework -CREATING_UNIVERSAL_DIR=${SYMROOT}/${CONFIGURATION}-universal -FINAL_FRAMEWORK_LOCATION=${CREATING_UNIVERSAL_DIR}/${ONESIGNAL_OUTPUT_NAME}.framework -EXECUTABLE_DESTINATION=${FINAL_FRAMEWORK_LOCATION}/${ONESIGNAL_OUTPUT_NAME} - -rm -rf "${CREATING_UNIVERSAL_DIR}" -mkdir "${CREATING_UNIVERSAL_DIR}" - -# copy the device framework to the location -# when we use lipo to merge device/sim frameworks, it only -# merges the actual binary. Thus, we need to copy all of the -# Framework files (such as headers and modulemap) -cp -a "${CURRENTCONFIG_DEVICE_DIR}" "${FINAL_FRAMEWORK_LOCATION}" - -# This file gets replaced by lipo when building the fat/universal binary -rm "${FINAL_FRAMEWORK_LOCATION}/${ONESIGNAL_OUTPUT_NAME}" - -# Combine results -# use lipo to combine device & simulator binaries into one -lipo -create -output "${EXECUTABLE_DESTINATION}" "${CURRENTCONFIG_DEVICE_DIR}/${ONESIGNAL_OUTPUT_NAME}" "${CURRENTCONFIG_SIMULATOR_DIR}/${ONESIGNAL_OUTPUT_NAME}" - -# Move framework files to the location Versions/A/* and create -# symlinks at the root of the framework, and Versions/Current -cd $FINAL_FRAMEWORK_LOCATION - -declare -a files=("Headers" "Modules" "${ONESIGNAL_OUTPUT_NAME}") - -# Create the Versions folders -mkdir Versions -mkdir Versions/A -mkdir Versions/A/Resources - -# Move the framework files/folders -for name in "${files[@]}"; do - mv ${name} Versions/A/${name} -done - -# Create symlinks at the root of the framework -for name in "${files[@]}"; do - ln -s Versions/A/${name} ${name} -done - -# move info.plist into Resources and create appropriate symlinks -mv Info.plist Versions/A/Resources/Info.plist -ln -s Versions/A/Resources Resources - -# Create a symlink directory for 'Versions/A' called 'Current' -cd Versions -ln -s A Current - -# Copy the built product to the final destination in {repo}/iOS_SDK/OneSignalSDK/Framework -rm -rf "${ONESIGNAL_DESTINATION_PATH}/${ONESIGNAL_OUTPUT_NAME}.framework" -cp -a "${FINAL_FRAMEWORK_LOCATION}" "${ONESIGNAL_DESTINATION_PATH}/${ONESIGNAL_OUTPUT_NAME}.framework" \ No newline at end of file diff --git a/iOS_SDK/OneSignalSDK/build_fat_framework.sh b/iOS_SDK/OneSignalSDK/build_fat_framework.sh deleted file mode 100755 index 1823b82e8..000000000 --- a/iOS_SDK/OneSignalSDK/build_fat_framework.sh +++ /dev/null @@ -1,92 +0,0 @@ -#!/bin/bash -set -e - -WORKING_DIR=$(pwd) -DERIVED_DATA_RELATIVE_DIR=temp -BUILD_CONFIG="Debug" -BUILD_TYPE="staticlib" -BUILD_SCHEME="OneSignalFramework" -BUILD_PROJECT="OneSignal.xcodeproj" - -# NOTE: We are now supporting Xcode 11 as our oldest build target. -XCODEBUILD_OLDEST_SUPPORTED=/Applications/Xcode11.0.app/Contents/Developer/usr/bin/xcodebuild - -$XCODEBUILD_OLDEST_SUPPORTED -configuration ${BUILD_CONFIG} MACH_O_TYPE=${BUILD_TYPE} -sdk "iphonesimulator" ARCHS="x86_64 i386" -project ${BUILD_PROJECT} -scheme ${BUILD_SCHEME} SYMROOT="${DERIVED_DATA_RELATIVE_DIR}/" -$XCODEBUILD_OLDEST_SUPPORTED -configuration ${BUILD_CONFIG} MACH_O_TYPE=${BUILD_TYPE} -sdk "iphoneos" ARCHS="armv7 armv7s arm64 arm64e" -project ${BUILD_PROJECT} -scheme ${BUILD_SCHEME} SYMROOT="${DERIVED_DATA_RELATIVE_DIR}/" -$XCODEBUILD_OLDEST_SUPPORTED -configuration ${BUILD_CONFIG} ARCHS="x86_64h" VALID_ARCHS="x86_64h" -destination 'platform=macOS,variant=Mac Catalyst' MACH_O_TYPE=${BUILD_TYPE} -project ${BUILD_PROJECT} -scheme ${BUILD_SCHEME} SYMROOT="${DERIVED_DATA_RELATIVE_DIR}/" - -USER=$(id -un) -DERIVED_DATA_ONESIGNAL_DIR="${WORKING_DIR}/${DERIVED_DATA_RELATIVE_DIR}" - -# Use Debug configuration to expose symbols -CATALYST_DIR="${DERIVED_DATA_ONESIGNAL_DIR}/Debug-maccatalyst" -SIMULATOR_DIR="${DERIVED_DATA_ONESIGNAL_DIR}/Debug-iphonesimulator" -IPHONE_DIR="${DERIVED_DATA_ONESIGNAL_DIR}/Debug-iphoneos" - -CATALYST_OUTPUT_DIR=${CATALYST_DIR}/OneSignal.framework -SIMULATOR_OUTPUT_DIR=${SIMULATOR_DIR}/OneSignal.framework -IPHONE_OUTPUT_DIR=${IPHONE_DIR}/OneSignal.framework - -UNIVERSAL_DIR=${DERIVED_DATA_ONESIGNAL_DIR}/Debug-universal -FINAL_FRAMEWORK=${UNIVERSAL_DIR}/OneSignal.framework - -rm -rf "${UNIVERSAL_DIR}" -mkdir "${UNIVERSAL_DIR}" - -echo "> Making Final OneSignal with all Architecture. iOS, iOS Simulator(x86_64), Mac Catalyst(x86_64h)" -lipo -create -output "$UNIVERSAL_DIR"/OneSignal "${IPHONE_OUTPUT_DIR}"/OneSignal "${SIMULATOR_OUTPUT_DIR}"/OneSignal "${CATALYST_OUTPUT_DIR}"/OneSignal - -echo "> Copying Framework Structure to Universal Output Directory" -cp -a ${IPHONE_OUTPUT_DIR} ${UNIVERSAL_DIR} - -cd $UNIVERSAL_DIR -echo "> Moving OneSignal fat binary to Final Framework" -mv OneSignal OneSignal.framework - -cd $FINAL_FRAMEWORK - -declare -a files=("Headers" "Modules" "OneSignal") - -# Create the Versions folders -mkdir Versions -mkdir Versions/A -mkdir Versions/A/Resources - -# Move the framework files/folders -for name in "${files[@]}"; do - mv ${name} Versions/A/${name} -done - -# Create symlinks at the root of the framework -for name in "${files[@]}"; do - ln -s Versions/A/${name} ${name} -done - -# move info.plist into Resources and create appropriate symlinks -mv Info.plist Versions/A/Resources/Info.plist -ln -s Versions/A/Resources Resources - -# Create a symlink directory for 'Versions/A' called 'Current' -cd Versions -ln -s A Current - -RELEASE_OUTPUT_FRAMEWORK_DIR="${WORKING_DIR}/Framework/OneSignal.framework" - -# Copy the built product to the final destination in {repo}/iOS_SDK/OneSignalSDK/Framework -rm -rf "${WORKING_DIR}/Framework/OneSignal.framework" -cp -a "${FINAL_FRAMEWORK}" "${WORKING_DIR}/Framework/OneSignal.framework" - -echo "Copying public header for SwiftPM" -#Copy the public header to the SwiftPM public headers directory -rm -rf "${WORKING_DIR}/SwiftPM" -mkdir -p "${WORKING_DIR}/SwiftPM/Public/Headers/OneSignal" -cp -a "${WORKING_DIR}/Source/OneSignal.h" "${WORKING_DIR}/SwiftPM/Public/Headers/OneSignal/OneSignal.h" - -echo "Listing frameworks of final framework" -file "${RELEASE_OUTPUT_FRAMEWORK_DIR}/Versions/A/OneSignal" -ls -l "${RELEASE_OUTPUT_FRAMEWORK_DIR}/Versions/A/OneSignal" - -echo "Opening final release framework in Finder:${WORKING_DIR}/Framework/OneSignal.framework" -open "${WORKING_DIR}/Framework" - -echo "Done" diff --git a/iOS_SDK/OneSignalSDK/build_xcframework.sh b/iOS_SDK/OneSignalSDK/build_xcframework.sh deleted file mode 100755 index 5d6963655..000000000 --- a/iOS_SDK/OneSignalSDK/build_xcframework.sh +++ /dev/null @@ -1,37 +0,0 @@ -#!/bin/bash -set -e - -WORKING_DIR=$(pwd) - -FRAMEWORK_FOLDER_NAME="OneSignal_XCFramework" - -FRAMEWORK_NAME="OneSignal" - -FRAMEWORK_PATH="${WORKING_DIR}/${FRAMEWORK_FOLDER_NAME}/${FRAMEWORK_NAME}.xcframework" - -BUILD_SCHEME="OneSignalFramework" - -SIMULATOR_ARCHIVE_PATH="${WORKING_DIR}/${FRAMEWORK_FOLDER_NAME}/simulator.xcarchive" - -IOS_DEVICE_ARCHIVE_PATH="${WORKING_DIR}/${FRAMEWORK_FOLDER_NAME}/iOS.xcarchive" - -CATALYST_ARCHIVE_PATH="${WORKING_DIR}/${FRAMEWORK_FOLDER_NAME}/catalyst.xcarchive" - -rm -rf "${WORKING_DIR}/${FRAMEWORK_FOLDER_NAME}" -echo "Deleted ${FRAMEWORK_FOLDER_NAME}" -mkdir "${FRAMEWORK_FOLDER_NAME}" -echo "Created ${FRAMEWORK_FOLDER_NAME}" -echo "Archiving ${FRAMEWORK_NAME}" - -xcodebuild archive ONLY_ACTIVE_ARCH=NO -scheme ${BUILD_SCHEME} -destination="generic/platform=iOS Simulator" -archivePath "${SIMULATOR_ARCHIVE_PATH}" -sdk iphonesimulator SKIP_INSTALL=NO BUILD_LIBRARIES_FOR_DISTRIBUTION=YES - -xcodebuild archive -scheme ${BUILD_SCHEME} -destination="generic/platform=iOS" -archivePath "${IOS_DEVICE_ARCHIVE_PATH}" -sdk iphoneos SKIP_INSTALL=NO BUILD_LIBRARIES_FOR_DISTRIBUTION=YES - -xcodebuild archive -scheme ${BUILD_SCHEME} -destination='generic/platform=macOS,variant=Mac Catalyst' -archivePath "${CATALYST_ARCHIVE_PATH}" SKIP_INSTALL=NO BUILD_LIBRARIES_FOR_DISTRIBUTION=YES - -xcodebuild -create-xcframework -framework ${SIMULATOR_ARCHIVE_PATH}/Products/Library/Frameworks/${FRAMEWORK_NAME}.framework -framework ${IOS_DEVICE_ARCHIVE_PATH}/Products/Library/Frameworks/${FRAMEWORK_NAME}.framework -framework ${CATALYST_ARCHIVE_PATH}/Products/Library/Frameworks/${FRAMEWORK_NAME}.framework -output "${FRAMEWORK_PATH}" - -rm -rf "${SIMULATOR_ARCHIVE_PATH}" -rm -rf "${IOS_DEVICE_ARCHIVE_PATH}" -rm -rf "${CATALYST_ARCHIVE_PATH}" -open "${WORKING_DIR}/${FRAMEWORK_FOLDER_NAME}" diff --git a/iOS_SDK/OneSignalSDK/update_swift_package.sh b/iOS_SDK/OneSignalSDK/update_swift_package.sh index 92b7da22c..fbfee87dd 100755 --- a/iOS_SDK/OneSignalSDK/update_swift_package.sh +++ b/iOS_SDK/OneSignalSDK/update_swift_package.sh @@ -3,162 +3,72 @@ set -e WORKING_DIR=$(pwd) -## OneSignal Core ## -FRAMEWORK_FOLDER_NAME="OneSignal_Core" - -FRAMEWORK_NAME="OneSignalCore" - -FRAMEWORK_PATH="${WORKING_DIR}/${FRAMEWORK_FOLDER_NAME}/${FRAMEWORK_NAME}.xcframework" - -FRAMEWORK_ZIP_PATH="${WORKING_DIR}/${FRAMEWORK_FOLDER_NAME}/${FRAMEWORK_NAME}.xcframework.zip" - -SIMULATOR_ARCHIVE_PATH="${WORKING_DIR}/${FRAMEWORK_FOLDER_NAME}/simulator.xcarchive" - -IOS_DEVICE_ARCHIVE_PATH="${WORKING_DIR}/${FRAMEWORK_FOLDER_NAME}/iOS.xcarchive" - -CATALYST_ARCHIVE_PATH="${WORKING_DIR}/${FRAMEWORK_FOLDER_NAME}/catalyst.xcarchive" - -SWIFT_PACKAGE_DIRECTORY="${WORKING_DIR}/../.." - -SWIFT_PACKAGE_PATH="${SWIFT_PACKAGE_DIRECTORY}/Package.swift" - #Ask for the new release version number to be placed in the package URL echo -e "\033[1mEnter the new SDK release version number\033[0m" read VERSION_NUMBER -# Remove the old Zipped XCFramework and create a new Zip -echo "Removing old Zipped XCFramework ${FRAMEWORK_ZIP_PATH}" -rm -rf "${FRAMEWORK_ZIP_PATH}" -echo "Creating new Zipped XCFramework ${FRAMEWORK_ZIP_PATH}" -ditto -c -k --sequesterRsrc --keepParent "${FRAMEWORK_PATH}" "${FRAMEWORK_ZIP_PATH}" - -# Compute the checksum for the Zipped framework -echo "Computing package checksum and updating Package.swift ${SWIFT_PACKAGE_PATH}" -CHECKSUM=$(swift package compute-checksum "${FRAMEWORK_ZIP_PATH}") -SWIFT_PM_CHECKSUM_LINE=" checksum: \"${CHECKSUM}\"" - -# Use sed to remove line 62 from the Swift.package and replace it with the new checksum -sed -i '' "62s/.*/$SWIFT_PM_CHECKSUM_LINE/" "${SWIFT_PACKAGE_PATH}" -SWIFT_PM_URL_LINE=" url: \"https:\/\/github.com\/OneSignal\/OneSignal-iOS-SDK\/releases\/download\/${VERSION_NUMBER}\/OneSignalCore.xcframework.zip\"," -#Use sed to remove line 61 from the Swift.package and replace it with the new URL for the new release -sed -i '' "61s/.*/$SWIFT_PM_URL_LINE/" "${SWIFT_PACKAGE_PATH}" -#Open XCFramework folder to drag zip into new release -open "${WORKING_DIR}/${FRAMEWORK_FOLDER_NAME}" - -## OneSignal Outcomes ## -FRAMEWORK_FOLDER_NAME="OneSignal_Outcomes" - -FRAMEWORK_NAME="OneSignalOutcomes" - -FRAMEWORK_PATH="${WORKING_DIR}/${FRAMEWORK_FOLDER_NAME}/${FRAMEWORK_NAME}.xcframework" - -FRAMEWORK_ZIP_PATH="${WORKING_DIR}/${FRAMEWORK_FOLDER_NAME}/${FRAMEWORK_NAME}.xcframework.zip" - -SIMULATOR_ARCHIVE_PATH="${WORKING_DIR}/${FRAMEWORK_FOLDER_NAME}/simulator.xcarchive" +update_framework() { + FRAMEWORK_FOLDER_NAME=$1 -IOS_DEVICE_ARCHIVE_PATH="${WORKING_DIR}/${FRAMEWORK_FOLDER_NAME}/iOS.xcarchive" + FRAMEWORK_NAME=$2 -CATALYST_ARCHIVE_PATH="${WORKING_DIR}/${FRAMEWORK_FOLDER_NAME}/catalyst.xcarchive" + FRAMEWORK_PATH="${WORKING_DIR}/${FRAMEWORK_FOLDER_NAME}/${FRAMEWORK_NAME}.xcframework" -SWIFT_PACKAGE_DIRECTORY="${WORKING_DIR}/../.." + FRAMEWORK_ZIP_PATH="${WORKING_DIR}/${FRAMEWORK_FOLDER_NAME}/${FRAMEWORK_NAME}.xcframework.zip" -SWIFT_PACKAGE_PATH="${SWIFT_PACKAGE_DIRECTORY}/Package.swift" + SIMULATOR_ARCHIVE_PATH="${WORKING_DIR}/${FRAMEWORK_FOLDER_NAME}/simulator.xcarchive" -# Remove the old Zipped XCFramework and create a new Zip -echo "Removing old Zipped XCFramework ${FRAMEWORK_ZIP_PATH}" -rm -rf "${FRAMEWORK_ZIP_PATH}" -echo "Creating new Zipped XCFramework ${FRAMEWORK_ZIP_PATH}" -ditto -c -k --sequesterRsrc --keepParent "${FRAMEWORK_PATH}" "${FRAMEWORK_ZIP_PATH}" + IOS_DEVICE_ARCHIVE_PATH="${WORKING_DIR}/${FRAMEWORK_FOLDER_NAME}/iOS.xcarchive" -# Compute the checksum for the Zipped framework -echo "Computing package checksum and updating Package.swift ${SWIFT_PACKAGE_PATH}" -CHECKSUM=$(swift package compute-checksum "${FRAMEWORK_ZIP_PATH}") -SWIFT_PM_CHECKSUM_LINE=" checksum: \"${CHECKSUM}\"" + CATALYST_ARCHIVE_PATH="${WORKING_DIR}/${FRAMEWORK_FOLDER_NAME}/catalyst.xcarchive" -echo ${CHECKSUM} -# Use sed to remove line 57 from the Swift.package and replace it with the new checksum -sed -i '' "57s/.*/$SWIFT_PM_CHECKSUM_LINE/" "${SWIFT_PACKAGE_PATH}" -SWIFT_PM_URL_LINE=" url: \"https:\/\/github.com\/OneSignal\/OneSignal-iOS-SDK\/releases\/download\/${VERSION_NUMBER}\/OneSignalOutcomes.xcframework.zip\"," -#Use sed to remove line 56 from the Swift.package and replace it with the new URL for the new release -sed -i '' "56s/.*/$SWIFT_PM_URL_LINE/" "${SWIFT_PACKAGE_PATH}" -#Open XCFramework folder to drag zip into new release -open "${WORKING_DIR}/${FRAMEWORK_FOLDER_NAME}" + SWIFT_PACKAGE_DIRECTORY="${WORKING_DIR}/../.." -## OneSignal Extension ## -FRAMEWORK_FOLDER_NAME="OneSignal_Extension" + SWIFT_PACKAGE_PATH="${SWIFT_PACKAGE_DIRECTORY}/Package.swift" -FRAMEWORK_NAME="OneSignalExtension" + # Remove the old Zipped XCFramework and create a new Zip + echo "Removing old Zipped XCFramework ${FRAMEWORK_ZIP_PATH}" + rm -rf "${FRAMEWORK_ZIP_PATH}" + echo "Creating new Zipped XCFramework ${FRAMEWORK_ZIP_PATH}" + ditto -c -k --sequesterRsrc --keepParent "${FRAMEWORK_PATH}" "${FRAMEWORK_ZIP_PATH}" -FRAMEWORK_PATH="${WORKING_DIR}/${FRAMEWORK_FOLDER_NAME}/${FRAMEWORK_NAME}.xcframework" + # Compute the checksum for the Zipped framework + echo "Computing package checksum and updating Package.swift ${SWIFT_PACKAGE_PATH}" + CHECKSUM=$(swift package compute-checksum "${FRAMEWORK_ZIP_PATH}") + SWIFT_PM_CHECKSUM_LINE=" checksum: \"${CHECKSUM}\"" -FRAMEWORK_ZIP_PATH="${WORKING_DIR}/${FRAMEWORK_FOLDER_NAME}/${FRAMEWORK_NAME}.xcframework.zip" + # Use sed to remove line from the Swift.package and replace it with the new checksum + sed -i '' "$3s/.*/$SWIFT_PM_CHECKSUM_LINE/" "${SWIFT_PACKAGE_PATH}" + SWIFT_PM_URL_LINE=" url: \"https:\/\/github.com\/OneSignal\/OneSignal-iOS-SDK\/releases\/download\/${VERSION_NUMBER}\/${FRAMEWORK_NAME}.xcframework.zip\"," + #Use sed to remove line from the Swift.package and replace it with the new URL for the new release + sed -i '' "$4s/.*/$SWIFT_PM_URL_LINE/" "${SWIFT_PACKAGE_PATH}" + #Open XCFramework folder to drag zip into new release + open "${WORKING_DIR}/${FRAMEWORK_FOLDER_NAME}" +} -SIMULATOR_ARCHIVE_PATH="${WORKING_DIR}/${FRAMEWORK_FOLDER_NAME}/simulator.xcarchive" +## OneSignal Core ## +update_framework "OneSignal_Core" "OneSignalCore" "149" "148" -IOS_DEVICE_ARCHIVE_PATH="${WORKING_DIR}/${FRAMEWORK_FOLDER_NAME}/iOS.xcarchive" +## OneSignal OSCore ## +update_framework "OneSignal_OSCore" "OneSignalOSCore" "144" "143" -CATALYST_ARCHIVE_PATH="${WORKING_DIR}/${FRAMEWORK_FOLDER_NAME}/catalyst.xcarchive" +## OneSignal Outcomes ## +update_framework "OneSignal_Outcomes" "OneSignalOutcomes" "139" "138" -SWIFT_PACKAGE_DIRECTORY="${WORKING_DIR}/../.." +## OneSignal Extension ## +update_framework "OneSignal_Extension" "OneSignalExtension" "134" "133" -SWIFT_PACKAGE_PATH="${SWIFT_PACKAGE_DIRECTORY}/Package.swift" +## OneSignal Notifications ## +update_framework "OneSignal_Notifications" "OneSignalNotifications" "129" "128" -# Remove the old Zipped XCFramework and create a new Zip -echo "Removing old Zipped XCFramework ${FRAMEWORK_ZIP_PATH}" -rm -rf "${FRAMEWORK_ZIP_PATH}" -echo "Creating new Zipped XCFramework ${FRAMEWORK_ZIP_PATH}" -ditto -c -k --sequesterRsrc --keepParent "${FRAMEWORK_PATH}" "${FRAMEWORK_ZIP_PATH}" +## OneSignal User ## +update_framework "OneSignal_User" "OneSignalUser" "124" "123" -# Compute the checksum for the Zipped framework -echo "Computing package checksum and updating Package.swift ${SWIFT_PACKAGE_PATH}" -CHECKSUM=$(swift package compute-checksum "${FRAMEWORK_ZIP_PATH}") -SWIFT_PM_CHECKSUM_LINE=" checksum: \"${CHECKSUM}\"" +## OneSignal Location ## +update_framework "OneSignal_Location" "OneSignalLocation" "119" "118" -echo ${CHECKSUM} -# Use sed to remove line 52 from the Swift.package and replace it with the new checksum -sed -i '' "52s/.*/$SWIFT_PM_CHECKSUM_LINE/" "${SWIFT_PACKAGE_PATH}" -SWIFT_PM_URL_LINE=" url: \"https:\/\/github.com\/OneSignal\/OneSignal-iOS-SDK\/releases\/download\/${VERSION_NUMBER}\/OneSignalExtension.xcframework.zip\"," -#Use sed to remove line 51 from the Swift.package and replace it with the new URL for the new release -sed -i '' "51s/.*/$SWIFT_PM_URL_LINE/" "${SWIFT_PACKAGE_PATH}" -#Open XCFramework folder to drag zip into new release -open "${WORKING_DIR}/${FRAMEWORK_FOLDER_NAME}" +## OneSignal Location ## +update_framework "OneSignal_InAppMessages" "OneSignalInAppMessages" "114" "113" ## OneSignal ## -FRAMEWORK_FOLDER_NAME="OneSignal_XCFramework" - -FRAMEWORK_NAME="OneSignal" - -FRAMEWORK_PATH="${WORKING_DIR}/${FRAMEWORK_FOLDER_NAME}/${FRAMEWORK_NAME}.xcframework" - -FRAMEWORK_ZIP_PATH="${WORKING_DIR}/${FRAMEWORK_FOLDER_NAME}/${FRAMEWORK_NAME}.xcframework.zip" - -SIMULATOR_ARCHIVE_PATH="${WORKING_DIR}/${FRAMEWORK_FOLDER_NAME}/simulator.xcarchive" - -IOS_DEVICE_ARCHIVE_PATH="${WORKING_DIR}/${FRAMEWORK_FOLDER_NAME}/iOS.xcarchive" - -CATALYST_ARCHIVE_PATH="${WORKING_DIR}/${FRAMEWORK_FOLDER_NAME}/catalyst.xcarchive" - -SWIFT_PACKAGE_DIRECTORY="${WORKING_DIR}/../.." - -SWIFT_PACKAGE_PATH="${SWIFT_PACKAGE_DIRECTORY}/Package.swift" - -# Remove the old Zipped XCFramework and create a new Zip -echo "Removing old Zipped XCFramework ${FRAMEWORK_ZIP_PATH}" -rm -rf "${FRAMEWORK_ZIP_PATH}" -echo "Creating new Zipped XCFramework ${FRAMEWORK_ZIP_PATH}" -ditto -c -k --sequesterRsrc --keepParent "${FRAMEWORK_PATH}" "${FRAMEWORK_ZIP_PATH}" - -# Compute the checksum for the Zipped framework -echo "Computing package checksum and updating Package.swift ${SWIFT_PACKAGE_PATH}" -CHECKSUM=$(swift package compute-checksum "${FRAMEWORK_ZIP_PATH}") -SWIFT_PM_CHECKSUM_LINE=" checksum: \"${CHECKSUM}\"" - -echo ${CHECKSUM} -# Use sed to remove line 47 from the Swift.package and replace it with the new checksum -sed -i '' "47s/.*/$SWIFT_PM_CHECKSUM_LINE/" "${SWIFT_PACKAGE_PATH}" -SWIFT_PM_URL_LINE=" url: \"https:\/\/github.com\/OneSignal\/OneSignal-iOS-SDK\/releases\/download\/${VERSION_NUMBER}\/OneSignal.xcframework.zip\"," -#Use sed to remove line 46 from the Swift.package and replace it with the new URL for the new release -sed -i '' "46s/.*/$SWIFT_PM_URL_LINE/" "${SWIFT_PACKAGE_PATH}" -#Open XCFramework folder to drag zip into new release -open "${WORKING_DIR}/${FRAMEWORK_FOLDER_NAME}" - +update_framework "OneSignal_XCFramework" "OneSignalFramework" "109" "108"