diff --git a/.gitignore b/.gitignore index 27a0613..3ee130b 100644 --- a/.gitignore +++ b/.gitignore @@ -19,3 +19,4 @@ com.williamrijksen.onesignal-*.zip # dependency directories ios/Carthage/ +ios/dist/ diff --git a/README.md b/README.md index d081075..0ba94c9 100644 --- a/README.md +++ b/README.md @@ -20,8 +20,8 @@ Before setting up the Titanium SDK, you must generate the appropriate credential ```xml - com.williamrijksen.onesignal - com.williamrijksen.onesignal + com.williamrijksen.onesignal + com.williamrijksen.onesignal ``` 1. Configure your app into the App Settings panel for the right Platform (Android and/or iOS). @@ -41,6 +41,10 @@ Before setting up the Titanium SDK, you must generate the appropriate credential - [https://documentation.onesignal.com/docs/ios-sdk-setup#section-1-add-notification-service-extension](https://documentation.onesignal.com/docs/ios-sdk-setup#section-1-add-notification-service-extension) - [http://docs.appcelerator.com/platform/latest/#!/guide/Creating_iOS_Extensions_-_Siri_Intents](http://docs.appcelerator.com/platform/latest/#!/guide/Creating_iOS_Extensions_-_Siri_Intents) +#### Android + +If you have some build errors about Google Play service dependencies you will need to add `googleServices {disableVersionCheck = true}` to your build.gradle file. + ### Usage 1. Register device for Push Notifications diff --git a/android/build.gradle b/android/build.gradle new file mode 100644 index 0000000..9312a21 --- /dev/null +++ b/android/build.gradle @@ -0,0 +1,15 @@ +buildscript { + repositories { + mavenCentral() + gradlePluginPortal() + } + dependencies { + classpath 'gradle.plugin.com.onesignal:onesignal-gradle-plugin:[0.12.10, 0.99.99]' + } +} + +dependencies { + // Add the module's library dependencies here. + // See: https://developer.android.com/studio/build/dependencies + implementation 'com.onesignal:OneSignal:[4.0.0, 4.99.99]' +} diff --git a/android/lib/OneSignalSDK.jar b/android/lib/OneSignalSDK.jar deleted file mode 100644 index 6bfaea2..0000000 Binary files a/android/lib/OneSignalSDK.jar and /dev/null differ diff --git a/android/manifest b/android/manifest index e3fd35a..e072db9 100644 --- a/android/manifest +++ b/android/manifest @@ -2,9 +2,9 @@ # this is your module manifest and used by Titanium # during compilation, packaging, distribution, etc. # - # +# -version: 2.1.2 +version: 3.0.1 apiversion: 4 architectures: arm64-v8a armeabi-v7a x86 description: com.williamrijksen.onesignal @@ -17,4 +17,4 @@ name: com.williamrijksen.onesignal moduleid: com.williamrijksen.onesignal guid: 67065763-fd5e-4069-a877-6c7fd328f877 platform: android -minsdk: 8.3.1.GA +minsdk: 9.3.2.GA diff --git a/android/src/com/williamrijksen/onesignal/ComWilliamrijksenOnesignalModule.java b/android/src/com/williamrijksen/onesignal/ComWilliamrijksenOnesignalModule.java index d7c6865..06f5c97 100644 --- a/android/src/com/williamrijksen/onesignal/ComWilliamrijksenOnesignalModule.java +++ b/android/src/com/williamrijksen/onesignal/ComWilliamrijksenOnesignalModule.java @@ -1,15 +1,20 @@ package com.williamrijksen.onesignal; import android.app.Activity; +import android.content.Context; + import com.onesignal.OneSignal; import com.onesignal.OSNotification; +import com.onesignal.OSNotificationReceivedEvent; +import com.onesignal.OSNotificationOpenedResult; import com.onesignal.OSNotificationAction; -import com.onesignal.OSNotificationOpenResult; -import com.onesignal.OSNotificationPayload; import java.util.HashMap; +import android.content.pm.ApplicationInfo; +import android.content.pm.PackageManager; + import org.appcelerator.kroll.KrollModule; import org.appcelerator.kroll.KrollProxy; import org.appcelerator.kroll.annotations.Kroll; @@ -21,241 +26,217 @@ import org.appcelerator.titanium.util.TiConvert; import org.json.JSONObject; -@Kroll.module(name="ComWilliamrijksenOnesignal", id="com.williamrijksen.onesignal") -public class ComWilliamrijksenOnesignalModule extends KrollModule -{ - private static final String LCAT = "ComWilliamrijksenOnesignalModule"; - private static final boolean DBG = TiConfig.LOGD; - private static ComWilliamrijksenOnesignalModule module; - private static OSNotificationOpenResult openNotification; - - public static final OneSignal.LOG_LEVEL LOG_LEVEL_NONE = OneSignal.LOG_LEVEL.NONE; - public static final OneSignal.LOG_LEVEL LOG_LEVEL_DEBUG = OneSignal.LOG_LEVEL.DEBUG; - public static final OneSignal.LOG_LEVEL LOG_LEVEL_INFO = OneSignal.LOG_LEVEL.INFO; - public static final OneSignal.LOG_LEVEL LOG_LEVEL_WARN = OneSignal.LOG_LEVEL.WARN; - public static final OneSignal.LOG_LEVEL LOG_LEVEL_ERROR = OneSignal.LOG_LEVEL.ERROR; - public static final OneSignal.LOG_LEVEL LOG_LEVEL_FATAL = OneSignal.LOG_LEVEL.FATAL; - public static final OneSignal.LOG_LEVEL LOG_LEVEL_VERBOSE = OneSignal.LOG_LEVEL.VERBOSE; - - public ComWilliamrijksenOnesignalModule() - { - super(); - module = this; - } - - public static ComWilliamrijksenOnesignalModule getModuleInstance() - { - return module; - } - - private KrollFunction getTagsCallback = null; - private KrollFunction idsAvailableCallback = null; - - @Kroll.onAppCreate - public static void onAppCreate(TiApplication app) - { - Log.d(LCAT, "com.williamrijksen.onesignal inside onAppCreate"); - - OneSignal - .startInit(TiApplication.getInstance()) - .setNotificationReceivedHandler(new NotificationReceivedHandler()) - .setNotificationOpenedHandler(new NotificationOpenedHandler()) - .unsubscribeWhenNotificationsAreDisabled(true) - .inFocusDisplaying(OneSignal.OSInFocusDisplayOption.None) - .init(); - } - - public void listenerAdded(String type, int count, KrollProxy proxy) - { - Log.d(LCAT,"com.williamrijksen.onesignal added listener " + type); - if (type.equals("notificationOpened") && count == 1 && openNotification instanceof OSNotificationOpenResult) { - Log.d(LCAT,"com.williamrijksen.onesignal fire delayed event"); - try { - if (openNotification.notification.payload != null) { - JSONObject payload = openNotification.notification.payload.toJSONObject(); - payload.put("foreground", openNotification.notification.isAppInFocus); - proxy.fireEvent("notificationOpened", payload); - } - } catch (Throwable t) { - Log.d(LCAT, "com.williamrijksen.onesignal OSNotificationOpenResult could not be converted to JSON"); - } - openNotification = null; - } - } - - @Kroll.method - public void sendTag(Object tag) - { - HashMap dict = (HashMap ) tag; - String key = TiConvert.toString(dict, "key"); - String value = TiConvert.toString(dict, "value"); - OneSignal.sendTag(key, value); - } - - @Kroll.method - public void deleteTag(Object tag) - { - HashMap dict = (HashMap ) tag; - String key = TiConvert.toString(dict, "key"); - OneSignal.deleteTag(key); - } - - @Kroll.method - public boolean retrieveSubscribed(){ - return OneSignal.getPermissionSubscriptionState().getSubscriptionStatus().getSubscribed(); - } - - @Kroll.method - public String retrievePlayerId(){ - return OneSignal.getPermissionSubscriptionState().getSubscriptionStatus().getUserId(); - } - - @Kroll.method - public String retrieveToken(){ - return OneSignal.getPermissionSubscriptionState().getSubscriptionStatus().getPushToken(); - } - - @Kroll.method - public void setExternalUserId(String id) - { - OneSignal.setExternalUserId(id, new OneSignal.OSExternalUserIdUpdateCompletionHandler() { - @Override - public void onComplete(JSONObject results) { - Log.d(LCAT, "com.williamrijksen.onesignal Set external user id done with results: " + results.toString()); - } - }); - } - - @Kroll.method - public void removeExternalUserId() - { - OneSignal.removeExternalUserId(new OneSignal.OSExternalUserIdUpdateCompletionHandler() { - @Override - public void onComplete(JSONObject results) { - Log.d(LCAT, "com.williamrijksen.onesignal Remove external user id done with results: " + results.toString()); - } - }); - } - - @Kroll.method - public void setSubscription(boolean enable) - { - OneSignal.setSubscription(enable); - } - - @Kroll.method - public void getTags(KrollFunction handler) - { - getTagsCallback = handler; - OneSignal.getTags(new GetTagsHandler()); - } - - @Kroll.method - public void setLogLevel(HashMap args) - { - OneSignal.LOG_LEVEL logLevel = LOG_LEVEL_NONE; - OneSignal.LOG_LEVEL visualLevel = LOG_LEVEL_NONE; - - Object level = args.get("logLevel"); - if (level instanceof OneSignal.LOG_LEVEL) { - logLevel = (OneSignal.LOG_LEVEL) level; - } - - level = args.get("visualLevel"); - if (level instanceof OneSignal.LOG_LEVEL) { - visualLevel = (OneSignal.LOG_LEVEL) level; - } +@Kroll.module(name = "ComWilliamrijksenOnesignal", id = "com.williamrijksen.onesignal") +public class ComWilliamrijksenOnesignalModule extends KrollModule { + private static final String LCAT = "ComWilliamrijksenOnesignalModule"; + private static final boolean DBG = TiConfig.LOGD; + private static ComWilliamrijksenOnesignalModule module; + private static OSNotificationOpenedResult openNotification; + + + public static final OneSignal.LOG_LEVEL LOG_LEVEL_NONE = OneSignal.LOG_LEVEL.NONE; + public static final OneSignal.LOG_LEVEL LOG_LEVEL_DEBUG = OneSignal.LOG_LEVEL.DEBUG; + public static final OneSignal.LOG_LEVEL LOG_LEVEL_INFO = OneSignal.LOG_LEVEL.INFO; + public static final OneSignal.LOG_LEVEL LOG_LEVEL_WARN = OneSignal.LOG_LEVEL.WARN; + public static final OneSignal.LOG_LEVEL LOG_LEVEL_ERROR = OneSignal.LOG_LEVEL.ERROR; + public static final OneSignal.LOG_LEVEL LOG_LEVEL_FATAL = OneSignal.LOG_LEVEL.FATAL; + public static final OneSignal.LOG_LEVEL LOG_LEVEL_VERBOSE = OneSignal.LOG_LEVEL.VERBOSE; + + public ComWilliamrijksenOnesignalModule() { + super(); + module = this; + } + + public static ComWilliamrijksenOnesignalModule getModuleInstance() { + return module; + } + + private KrollFunction getTagsCallback = null; + private KrollFunction idsAvailableCallback = null; + + @Kroll.onAppCreate + public static void onAppCreate(TiApplication app) { + Log.d(LCAT, "com.williamrijksen.onesignal inside onAppCreate"); + + OneSignal.initWithContext(TiApplication.getInstance()); + OneSignal.setAppId(getAppId()); + OneSignal.setNotificationOpenedHandler(new NotificationOpenedHandler()); + } + + public void listenerAdded(String type, int count, KrollProxy proxy) { + Log.d(LCAT, "com.williamrijksen.onesignal added listener " + type); + if (type.equals("notificationOpened") && count == 1 && openNotification instanceof OSNotificationOpenedResult) { + Log.d(LCAT, "com.williamrijksen.onesignal fire delayed event"); + try { + if (openNotification.getNotification().getRawPayload() != null) { + JSONObject payload = openNotification.getNotification().toJSONObject(); + proxy.fireEvent("notificationOpened", payload); + } + } catch (Throwable t) { + Log.d(LCAT, "com.williamrijksen.onesignal OSNotificationOpenResult could not be converted to JSON"); + } + openNotification = null; + } + } + + private static String getAppId() { + try { + ApplicationInfo app = TiApplication.getInstance().getPackageManager().getApplicationInfo(TiApplication.getInstance().getPackageName(), PackageManager.GET_META_DATA); + return app.metaData.getString("onesignal_app_id"); + } catch (Exception e) { + return null; + } + } + + @Kroll.method + public boolean isRooted(){ + String[] places = {"/sbin/", "/system/bin/", "/system/xbin/", + "/data/local/xbin/", "/data/local/bin/", + "/system/sd/xbin/", "/system/bin/failsafe/", + "/data/local/"}; + + try { + for (String where : places) { + if (new java.io.File(where + "su").exists()) + return true; + } + } catch (Throwable ignore) { + // workaround crash issue in Lenovo devices + // issues #857 + } + return false; + } + + @Kroll.method + public void sendTag(HashMap dict) { + String key = TiConvert.toString(dict, "key"); + String value = TiConvert.toString(dict, "value"); + OneSignal.sendTag(key, value); + } + + @Kroll.method + public void deleteTag(HashMap dict) { + String key = TiConvert.toString(dict, "key"); + OneSignal.deleteTag(key); + } + + @Kroll.method + public boolean retrieveSubscribed() { + return OneSignal.getDeviceState().isSubscribed(); + } + + @Kroll.method + public String retrievePlayerId() { + return OneSignal.getDeviceState().getUserId(); + } + + @Kroll.method + public String retrieveToken() { + return OneSignal.getDeviceState().getPushToken(); + } + + @Kroll.method + public void setExternalUserId(String id) { + OneSignal.setExternalUserId(id, new OneSignal.OSExternalUserIdUpdateCompletionHandler() { + @Override + public void onSuccess(JSONObject results) { + Log.d(LCAT, "com.williamrijksen.onesignal Remove external user id done with results: " + results.toString()); + } + + @Override + public void onFailure(OneSignal.ExternalIdError error) { + + } + }); + } + + @Kroll.method + public void removeExternalUserId() { + OneSignal.removeExternalUserId(new OneSignal.OSExternalUserIdUpdateCompletionHandler() { + @Override + public void onSuccess(JSONObject results) { + Log.d(LCAT, "com.williamrijksen.onesignal Remove external user id done with results: " + results.toString()); + } + + @Override + public void onFailure(OneSignal.ExternalIdError error) { + + } + }); + } + + @Kroll.method + public void setSubscription(boolean enable) { + OneSignal.disablePush(enable); + } + + @Kroll.method + public void getTags(KrollFunction handler) { + getTagsCallback = handler; + OneSignal.getTags(new GetTagsHandler()); + } + + @Kroll.method + public void setLogLevel(HashMap args) { + OneSignal.LOG_LEVEL logLevel = LOG_LEVEL_NONE; + OneSignal.LOG_LEVEL visualLevel = LOG_LEVEL_NONE; + + Object level = args.get("logLevel"); + if (level instanceof OneSignal.LOG_LEVEL) { + logLevel = (OneSignal.LOG_LEVEL) level; + } + + level = args.get("visualLevel"); + if (level instanceof OneSignal.LOG_LEVEL) { + visualLevel = (OneSignal.LOG_LEVEL) level; + } OneSignal.setLogLevel(logLevel, visualLevel); - } - - private class GetTagsHandler implements OneSignal.GetTagsHandler - { - @Override - public void tagsAvailable(JSONObject tags) - { - HashMap dict = new HashMap(); - try { - dict.put("success", true); - dict.put("error", false); - dict.put("results", tags.toString()); - } catch (Exception e) { - dict.put("success", false); - dict.put("error", true); - e.printStackTrace(); - Log.d("error:", e.toString()); - } - - getTagsCallback.call(getKrollObject(), dict); - } - } - - private class IdsAvailableHandler implements OneSignal.IdsAvailableHandler - { - @Override - public void idsAvailable(String userId, String registrationId) - { - HashMap dict = new HashMap(); - try { - dict.put("userId", userId); - dict.put("pushToken", registrationId); - } catch (Exception e) { - Log.d("error:", e.toString()); - } - - idsAvailableCallback.call(getKrollObject(), dict); - } - } - - private static class NotificationOpenedHandler implements OneSignal.NotificationOpenedHandler - { - // This fires when a notification is opened by tapping on it. - @Override - public void notificationOpened(OSNotificationOpenResult result) - { - Log.d(LCAT, "com.williamrijksen.onesignal Notification opened handler"); - if (TiApplication.getAppCurrentActivity() != null && getModuleInstance() != null) { - try { - if (result.notification.payload != null) { - JSONObject payload = result.notification.payload.toJSONObject(); - payload.put("foreground", result.notification.isAppInFocus); - - if (getModuleInstance().hasListeners("notificationOpened")) { - getModuleInstance().fireEvent("notificationOpened", payload); - } else { - // save the notification for later processing - openNotification = result; - } - } - } catch (Throwable t) { - Log.d(LCAT, "com.williamrijksen.onesignal OSNotificationOpenResult could not be converted to JSON"); - } - } else { - // save the notification for later processing - openNotification = result; - } - } - } - - private static class NotificationReceivedHandler implements OneSignal.NotificationReceivedHandler - { - @Override - public void notificationReceived(OSNotification notification) - { - Log.d(LCAT, "com.williamrijksen.onesignal Notification received handler"); - if (TiApplication.getAppCurrentActivity() != null && getModuleInstance() != null) { - try { - if (notification.payload != null) { - JSONObject payload = notification.payload.toJSONObject(); - payload.put("foreground", notification.isAppInFocus); - - if (getModuleInstance().hasListeners("notificationReceived")) { - getModuleInstance().fireEvent("notificationReceived", payload); - } - } - } catch (Throwable t) { - Log.d(LCAT, "com.williamrijksen.onesignal OSNotification could not be converted to JSON"); - } - } - } - } + } + + private class GetTagsHandler implements OneSignal.OSGetTagsHandler { + @Override + public void tagsAvailable(JSONObject tags) { + HashMap dict = new HashMap(); + try { + dict.put("success", true); + dict.put("error", false); + dict.put("results", tags.toString()); + } catch (Exception e) { + dict.put("success", false); + dict.put("error", true); + e.printStackTrace(); + Log.d("error:", e.toString()); + } + + getTagsCallback.call(getKrollObject(), dict); + } + } + + private static class NotificationOpenedHandler implements OneSignal.OSNotificationOpenedHandler { + // This fires when a notification is opened by tapping on it. + @Override + public void notificationOpened(OSNotificationOpenedResult result) { + Log.d(LCAT, "com.williamrijksen.onesignal Notification opened handler"); + if (TiApplication.getAppCurrentActivity() != null && getModuleInstance() != null) { + try { + if (result.getNotification().getRawPayload() != null) { + JSONObject payload = result.getNotification().toJSONObject(); + + if (getModuleInstance().hasListeners("notificationOpened")) { + getModuleInstance().fireEvent("notificationOpened", payload); + } else { + // save the notification for later processing + openNotification = result; + } + } + } catch (Throwable t) { + Log.d(LCAT, "com.williamrijksen.onesignal OSNotificationOpenResult could not be converted to JSON"); + } + } else { + // save the notification for later processing + openNotification = result; + } + } + } + } diff --git a/android/src/com/williamrijksen/onesignal/NotificationReceivedHandler.java b/android/src/com/williamrijksen/onesignal/NotificationReceivedHandler.java new file mode 100644 index 0000000..14808cb --- /dev/null +++ b/android/src/com/williamrijksen/onesignal/NotificationReceivedHandler.java @@ -0,0 +1,35 @@ +package com.williamrijksen.onesignal; + +import android.content.Context; +import org.json.JSONObject; +import org.appcelerator.titanium.TiApplication; +import com.onesignal.OneSignal; +import org.appcelerator.kroll.common.Log; +import com.onesignal.OSNotification; +import com.onesignal.OSNotificationReceivedEvent; +import com.onesignal.OSNotificationOpenedResult; +import com.onesignal.OSNotificationAction; + +public class NotificationReceivedHandler implements OneSignal.OSRemoteNotificationReceivedHandler { + + private static final String LCAT = "ComWilliamrijksenOnesignalModule"; + + + @Override + public void remoteNotificationReceived(Context context, OSNotificationReceivedEvent notificationReceivedEvent) { + Log.d(LCAT, "com.williamrijksen.onesignal Notification received handler"); + if (TiApplication.getAppCurrentActivity() != null && ComWilliamrijksenOnesignalModule.getModuleInstance() != null) { + try { + if (notificationReceivedEvent.getNotification().getRawPayload() != null) { + JSONObject payload = notificationReceivedEvent.getNotification().toJSONObject(); + + if (ComWilliamrijksenOnesignalModule.getModuleInstance().hasListeners("notificationReceived")) { + ComWilliamrijksenOnesignalModule.getModuleInstance().fireEvent("notificationReceived", payload); + } + } + } catch (Throwable t) { + Log.d(LCAT, "com.williamrijksen.onesignal OSNotification could not be converted to JSON"); + } + } + } +} \ No newline at end of file diff --git a/android/timodule.xml b/android/timodule.xml index dbae2a6..0247eb8 100644 --- a/android/timodule.xml +++ b/android/timodule.xml @@ -7,34 +7,34 @@ + xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:tools="http://schemas.android.com/tools" + package="com.onesignal"> - + android:protectionLevel="signature"/> + - - + + - + - + - + - + @@ -56,9 +56,9 @@ - - - + + + @@ -76,43 +76,72 @@ - + - + + + + android:permission="android.permission.BIND_JOB_SERVICE"/> + android:permission="android.permission.BIND_JOB_SERVICE"/> + android:permission="android.permission.BIND_JOB_SERVICE"/> - + + android:permission="android.permission.BIND_JOB_SERVICE"/> + + + + + + + + + + + + + android:theme="@android:style/Theme.Translucent.NoTitleBar"/> - + - + - - + + - + - + - - - - + + + + + + + + + @@ -123,6 +152,6 @@ - ti.playservices + ti.playservices diff --git a/ios/Cartfile.resolved b/ios/Cartfile.resolved index 3060dc9..c0f91b4 100644 --- a/ios/Cartfile.resolved +++ b/ios/Cartfile.resolved @@ -1 +1 @@ -github "OneSignal/OneSignal-iOS-SDK" "2.14.3" +github "OneSignal/OneSignal-iOS-SDK" "3.8.0" diff --git a/ios/Classes/ComWilliamrijksenOnesignalModule.h b/ios/Classes/ComWilliamrijksenOnesignalModule.h index e7872aa..eac24a1 100644 --- a/ios/Classes/ComWilliamrijksenOnesignalModule.h +++ b/ios/Classes/ComWilliamrijksenOnesignalModule.h @@ -22,7 +22,7 @@ typedef void(^TagsResultHandler)(NSDictionary*, NSError*); - (void)sendTag:(id)args; - (void)deleteTag:(id)args; - (void)getTags:(id)value; -- (NSDictionary *)getPermissionSubscriptionState:(id)args; +- (NSDictionary *)getDeviceState:(id)args; - (void)setLogLevel:(id)args; - (void)postNotification:(id)arguments; diff --git a/ios/Classes/ComWilliamrijksenOnesignalModule.m b/ios/Classes/ComWilliamrijksenOnesignalModule.m index d89a527..f9bd0b3 100644 --- a/ios/Classes/ComWilliamrijksenOnesignalModule.m +++ b/ios/Classes/ComWilliamrijksenOnesignalModule.m @@ -48,29 +48,28 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:( NSLog(@"[DEBUG] com.williamrijksen.onesignal didFinishLaunchingWithOptions"); id notificationReceivedBlock = ^(OSNotification *notification) { - OSNotificationPayload* payload = notification.payload; - NSLog(@"[DEBUG] com.williamrijksen.onesignal notification received %@", payload); - [self fireEvent:NotificationReceived withObject:[OneSignalModuleHelper toDictionary:payload]]; + NSLog(@"[DEBUG] com.williamrijksen.onesignal notification received %@", notification); + [self fireEvent:NotificationReceived withObject:[OneSignalModuleHelper toDictionary:notification]]; }; id notificationOpenedBlock = ^(OSNotificationOpenedResult *result) { - OSNotificationPayload* payload = result.notification.payload; + OSNotification* payload = result.notification; NSLog(@"[DEBUG] com.williamrijksen.onesignal notification opened %@", payload); [self fireEvent:NotificationOpened withObject:[OneSignalModuleHelper toDictionary:payload]]; }; id onesignalInitSettings = @{ - kOSSettingsKeyAutoPrompt : @false + //kOSSettingsKeyAutoPrompt : @false }; NSString *OneSignalAppID = [[TiApp tiAppProperties] objectForKey:@"OneSignal_AppID"]; - [OneSignal initWithLaunchOptions:launchOptions - appId:OneSignalAppID - handleNotificationReceived:notificationReceivedBlock - handleNotificationAction:notificationOpenedBlock - settings:onesignalInitSettings]; + + + [OneSignal initWithLaunchOptions:launchOptions]; + [OneSignal setAppId:OneSignalAppID]; + + [OneSignal setLocationShared:YES]; - OneSignal.inFocusDisplayType = OSNotificationDisplayTypeNone; return YES; } @@ -80,7 +79,7 @@ - (void)_listenerAdded:(NSString*)type count:(int)count { if (count == 1 && [type isEqual:NotificationOpened]) { NSDictionary *initialNotificationPayload = [TiApp.app.launchOptions objectForKey:UIApplicationLaunchOptionsRemoteNotificationKey]; - OSNotificationPayload *oneSignalPayload = [OSNotificationPayload parseWithApns:initialNotificationPayload]; + OSNotification *oneSignalPayload = [OSNotification parseWithApns:initialNotificationPayload]; NSLog(@"[DEBUG] com.williamrijksen.onesignal FIRE cold boot NotificationOpened"); [self fireEvent:NotificationOpened withObject:[OneSignalModuleHelper toDictionary:oneSignalPayload]]; } @@ -90,17 +89,17 @@ - (void)_listenerAdded:(NSString*)type count:(int)count - (bool)retrieveSubscribed:(id)args { - return [OneSignal getPermissionSubscriptionState].subscriptionStatus.subscribed; + return [OneSignal getDeviceState].isSubscribed; } - (NSString *)retrievePlayerId:(id)args { - return [OneSignal getPermissionSubscriptionState].subscriptionStatus.userId; + return [OneSignal getDeviceState].userId; } - (NSString *)retrieveToken:(id)args { - return [OneSignal getPermissionSubscriptionState].subscriptionStatus.pushToken; + return [OneSignal getDeviceState].pushToken; } - (void)promptForPushNotificationsWithUserResponse:(id)args @@ -128,7 +127,7 @@ - (void)setSubscription:(id)arguments id args = arguments; ENSURE_UI_THREAD_1_ARG(args); ENSURE_SINGLE_ARG(args, NSNumber); - [OneSignal setSubscription:[TiUtils boolValue:args]]; + [OneSignal disablePush:[TiUtils boolValue:args]]; } - (void)setExternalUserId:(id)arguments @@ -137,8 +136,10 @@ - (void)setExternalUserId:(id)arguments ENSURE_UI_THREAD_1_ARG(args); ENSURE_SINGLE_ARG(args, NSString); - [OneSignal setExternalUserId:[TiUtils stringValue:args] withCompletion:^(NSDictionary *results) { + [OneSignal setExternalUserId:[TiUtils stringValue:args] withSuccess:^(NSDictionary *results) { NSLog(@"Set external user id update complete with results: %@", results.description); + } withFailure:^(NSError *error) { + }]; } @@ -146,9 +147,7 @@ - (void)removeExternalUserId:(id)arguments { id args = arguments; ENSURE_UI_THREAD_1_ARG(args); // not necessary but app was crashing without it - [OneSignal removeExternalUserId:^(NSDictionary *results) { - NSLog(@"Remove external user id complete with results: %@", results.description); - }]; + [OneSignal removeExternalUserId]; } - (void)sendTag:(id)arguments @@ -204,14 +203,14 @@ - (void)getTags:(id)args }]; } -- (NSDictionary *)getPermissionSubscriptionState:(id)args +- (NSDictionary *)getDeviceState:(id)args { // Maybe it should use OSDevice class instead in the future id value = args; - ENSURE_UI_THREAD(getPermissionSubscriptionState, value); + ENSURE_UI_THREAD(getDeviceState, value); - OSPermissionSubscriptionState* state = [OneSignal getPermissionSubscriptionState]; - return [state toDictionary]; + OSDeviceState* state = [OneSignal getDeviceState]; + return state.jsonRepresentation; } - (void)postNotification:(id)arguments @@ -231,6 +230,11 @@ - (void)postNotification:(id)arguments } } +- (bool)isRooted +{ + return [self isJailbroken]; +} + - (void)setLogLevel:(id)arguments { id args = arguments; @@ -246,6 +250,79 @@ - (void)setLogLevel:(id)arguments [OneSignal setLogLevel:[TiUtils intValue:logLevel] visualLevel:[TiUtils intValue:visualLevel]]; } +- (BOOL)isJailbroken { + +#if !(TARGET_IPHONE_SIMULATOR) + + FILE *file = fopen("/Applications/Cydia.app", "r"); + if (file) { + fclose(file); + return YES; + } + file = fopen("/Library/MobileSubstrate/MobileSubstrate.dylib", "r"); + if (file) { + fclose(file); + return YES; + } + + file = fopen("/bin/bash", "r"); + if (file) { + fclose(file); + return YES; + } + file = fopen("/usr/sbin/sshd", "r"); + if (file) { + fclose(file); + return YES; + } + file = fopen("/etc/apt", "r"); + if (file) { + fclose(file); + return YES; + } + file = fopen("/usr/bin/ssh", "r"); + if (file) { + fclose(file); + return YES; + } + + NSFileManager *fileManager = [NSFileManager defaultManager]; + + if ([fileManager fileExistsAtPath:@"/Applications/Cydia.app"]) + return YES; + else if ([fileManager fileExistsAtPath:@"/Library/MobileSubstrate/MobileSubstrate.dylib"]) + return YES; + else if ([fileManager fileExistsAtPath:@"/bin/bash"]) + return YES; + else if ([fileManager fileExistsAtPath:@"/usr/sbin/sshd"]) + return YES; + else if ([fileManager fileExistsAtPath:@"/etc/apt"]) + return YES; + else if ([fileManager fileExistsAtPath:@"/usr/bin/ssh"]) + return YES; + + // Omit logic below since they show warnings in the device log on iOS 9 devices. + if (NSFoundationVersionNumber > 1144.17) // NSFoundationVersionNumber_iOS_8_4 + return NO; + + // Check if the app can access outside of its sandbox + NSError *error = nil; + NSString *string = @"."; + [string writeToFile:@"/private/jailbreak.txt" atomically:YES encoding:NSUTF8StringEncoding error:&error]; + if (!error) + return YES; + else + [fileManager removeItemAtPath:@"/private/jailbreak.txt" error:nil]; + + // Check if the app can open a Cydia's URL scheme + if ([[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:@"cydia://package/com.example.package"]]) + return YES; + +#endif + + return NO; +} + MAKE_SYSTEM_PROP(LOG_LEVEL_NONE, ONE_S_LL_NONE); MAKE_SYSTEM_PROP(LOG_LEVEL_DEBUG, ONE_S_LL_DEBUG); MAKE_SYSTEM_PROP(LOG_LEVEL_INFO, ONE_S_LL_INFO); diff --git a/ios/Classes/OneSignalModuleHelper.h b/ios/Classes/OneSignalModuleHelper.h index a91f92a..1512dbb 100644 --- a/ios/Classes/OneSignalModuleHelper.h +++ b/ios/Classes/OneSignalModuleHelper.h @@ -10,6 +10,6 @@ @interface OneSignalModuleHelper : NSObject -+ (NSDictionary *)toDictionary: (OSNotificationPayload *)payload; ++ (NSDictionary *)toDictionary: (OSNotification *)payload; -@end \ No newline at end of file +@end diff --git a/ios/Classes/OneSignalModuleHelper.m b/ios/Classes/OneSignalModuleHelper.m index 1d061f2..fec9dd9 100644 --- a/ios/Classes/OneSignalModuleHelper.m +++ b/ios/Classes/OneSignalModuleHelper.m @@ -9,10 +9,10 @@ @implementation OneSignalModuleHelper -+ (NSDictionary *)toDictionary: (OSNotificationPayload *)payload ++ (NSDictionary *)toDictionary: (OSNotification *)payload { - return @{@"notificationID": payload.notificationID ?: [NSNull null], - @"templateID": payload.templateID ?: [NSNull null], + return @{@"notificationID": payload.notificationId ?: [NSNull null], + @"templateID": payload.templateId ?: [NSNull null], @"templateName": payload.templateName ?: [NSNull null], @"contentAvailable": @(payload.contentAvailable), @"mutableContent": @(payload.mutableContent), @@ -31,4 +31,4 @@ + (NSDictionary *)toDictionary: (OSNotificationPayload *)payload }; } -@end \ No newline at end of file +@end diff --git a/ios/com.williamrijksen.onesignal.xcodeproj/project.pbxproj b/ios/com.williamrijksen.onesignal.xcodeproj/project.pbxproj index 17791f3..2cfa30c 100644 --- a/ios/com.williamrijksen.onesignal.xcodeproj/project.pbxproj +++ b/ios/com.williamrijksen.onesignal.xcodeproj/project.pbxproj @@ -3,7 +3,7 @@ archiveVersion = 1; classes = { }; - objectVersion = 46; + objectVersion = 52; objects = { /* Begin PBXAggregateTarget section */ @@ -26,9 +26,11 @@ 24DD6CFA1134B3F500162E58 /* ComWilliamrijksenOnesignalModule.m in Sources */ = {isa = PBXBuildFile; fileRef = 24DD6CF81134B3F500162E58 /* ComWilliamrijksenOnesignalModule.m */; }; 4ACB5A1B218C674B00DB9BB6 /* OneSignalModuleHelper.m in Sources */ = {isa = PBXBuildFile; fileRef = 4ACB5A19218C674B00DB9BB6 /* OneSignalModuleHelper.m */; }; 4ACB5A1C218C674B00DB9BB6 /* OneSignalModuleHelper.h in Headers */ = {isa = PBXBuildFile; fileRef = 4ACB5A1A218C674B00DB9BB6 /* OneSignalModuleHelper.h */; }; + 4EED96D328DCF33E000B09D7 /* OneSignalCore.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4EED96D228DCF33E000B09D7 /* OneSignalCore.xcframework */; }; + 4EED96D528DCF3B8000B09D7 /* OneSignalOutcomes.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4EED96D428DCF3B8000B09D7 /* OneSignalOutcomes.xcframework */; }; + 5DDFD6DD26FB43F000402F0D /* OneSignal.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5DDFD6DC26FB43F000402F0D /* OneSignal.xcframework */; }; AA747D9F0F9514B9006C5449 /* ComWilliamrijksenOnesignal_Prefix.pch in Headers */ = {isa = PBXBuildFile; fileRef = AA747D9E0F9514B9006C5449 /* ComWilliamrijksenOnesignal_Prefix.pch */; }; AACBBE4A0F95108600F1A2B1 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AACBBE490F95108600F1A2B1 /* Foundation.framework */; }; - B3937AC424ACF29B0050FD11 /* OneSignal.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B3937AC324ACF29B0050FD11 /* OneSignal.framework */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -47,9 +49,11 @@ 24DD6D1B1134B66800162E58 /* titanium.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = titanium.xcconfig; sourceTree = ""; }; 4ACB5A19218C674B00DB9BB6 /* OneSignalModuleHelper.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = OneSignalModuleHelper.m; path = Classes/OneSignalModuleHelper.m; sourceTree = ""; }; 4ACB5A1A218C674B00DB9BB6 /* OneSignalModuleHelper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OneSignalModuleHelper.h; path = Classes/OneSignalModuleHelper.h; sourceTree = ""; }; + 4EED96D228DCF33E000B09D7 /* OneSignalCore.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = OneSignalCore.xcframework; path = platform/OneSignalCore.xcframework; sourceTree = ""; }; + 4EED96D428DCF3B8000B09D7 /* OneSignalOutcomes.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = OneSignalOutcomes.xcframework; path = platform/OneSignalOutcomes.xcframework; sourceTree = ""; }; + 5DDFD6DC26FB43F000402F0D /* OneSignal.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = OneSignal.xcframework; path = platform/OneSignal.xcframework; sourceTree = ""; }; AA747D9E0F9514B9006C5449 /* ComWilliamrijksenOnesignal_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ComWilliamrijksenOnesignal_Prefix.pch; sourceTree = SOURCE_ROOT; }; AACBBE490F95108600F1A2B1 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; - B3937AC324ACF29B0050FD11 /* OneSignal.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OneSignal.framework; path = platform/OneSignal.framework; sourceTree = ""; }; D2AAC07E0554694100DB518D /* libComWilliamrijksenOnesignal.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libComWilliamrijksenOnesignal.a; sourceTree = BUILT_PRODUCTS_DIR; }; /* End PBXFileReference section */ @@ -58,8 +62,10 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - B3937AC424ACF29B0050FD11 /* OneSignal.framework in Frameworks */, + 5DDFD6DD26FB43F000402F0D /* OneSignal.xcframework in Frameworks */, + 4EED96D328DCF33E000B09D7 /* OneSignalCore.xcframework in Frameworks */, AACBBE4A0F95108600F1A2B1 /* Foundation.framework in Frameworks */, + 4EED96D528DCF3B8000B09D7 /* OneSignalOutcomes.xcframework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -88,7 +94,9 @@ 0867D69AFE84028FC02AAC07 /* Frameworks */ = { isa = PBXGroup; children = ( - B3937AC324ACF29B0050FD11 /* OneSignal.framework */, + 4EED96D428DCF3B8000B09D7 /* OneSignalOutcomes.xcframework */, + 4EED96D228DCF33E000B09D7 /* OneSignalCore.xcframework */, + 5DDFD6DC26FB43F000402F0D /* OneSignal.xcframework */, AACBBE490F95108600F1A2B1 /* Foundation.framework */, ); name = Frameworks; @@ -218,9 +226,10 @@ baseConfigurationReference = 24DD6D1B1134B66800162E58 /* titanium.xcconfig */; buildSettings = { CLANG_ENABLE_MODULES = YES; - CODE_SIGN_IDENTITY = "iPhone Developer"; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + CODE_SIGN_IDENTITY = "Apple Development"; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "Apple Development"; DSTROOT = /tmp/ComWilliamrijksenOnesignal.dst; + EXCLUDED_ARCHS = ""; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", "$(PROJECT_DIR)/platform", @@ -241,8 +250,9 @@ GCC_WARN_UNUSED_VALUE = NO; GCC_WARN_UNUSED_VARIABLE = NO; INSTALL_PATH = /usr/local/lib; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; LIBRARY_SEARCH_PATHS = ""; + ONLY_ACTIVE_ARCH = YES; OTHER_CFLAGS = ( "-DDEBUG", "-DTI_POST_1_2", @@ -253,6 +263,7 @@ "PROVISIONING_PROFILE[sdk=iphoneos*]" = ""; RUN_CLANG_STATIC_ANALYZER = NO; SDKROOT = iphoneos; + SUPPORTS_MACCATALYST = NO; USER_HEADER_SEARCH_PATHS = ""; }; name = Debug; @@ -263,7 +274,9 @@ buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; CLANG_ENABLE_MODULES = YES; + CODE_SIGN_IDENTITY = "Apple Distribution"; DSTROOT = /tmp/ComWilliamrijksenOnesignal.dst; + EXCLUDED_ARCHS = ""; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", "$(PROJECT_DIR)/platform", @@ -284,13 +297,15 @@ GCC_WARN_UNUSED_VALUE = NO; GCC_WARN_UNUSED_VARIABLE = NO; INSTALL_PATH = /usr/local/lib; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; LIBRARY_SEARCH_PATHS = ""; + ONLY_ACTIVE_ARCH = YES; OTHER_CFLAGS = "-DTI_POST_1_2"; OTHER_LDFLAGS = "-ObjC"; PRODUCT_NAME = ComWilliamrijksenOnesignal; RUN_CLANG_STATIC_ANALYZER = NO; SDKROOT = iphoneos; + SUPPORTS_MACCATALYST = NO; USER_HEADER_SEARCH_PATHS = ""; }; name = Release; @@ -303,6 +318,7 @@ CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; DSTROOT = /tmp/ComWilliamrijksenOnesignal.dst; + EXCLUDED_ARCHS = ""; GCC_C_LANGUAGE_STANDARD = c99; GCC_OPTIMIZATION_LEVEL = 0; GCC_PRECOMPILE_PREFIX_HEADER = YES; @@ -319,7 +335,7 @@ GCC_WARN_UNUSED_VALUE = NO; GCC_WARN_UNUSED_VARIABLE = NO; INSTALL_PATH = /usr/local/lib; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; ONLY_ACTIVE_ARCH = YES; OTHER_CFLAGS = ( "-DDEBUG", @@ -342,6 +358,7 @@ ALWAYS_SEARCH_USER_PATHS = NO; CLANG_CXX_LIBRARY = "libstdc++"; DSTROOT = /tmp/ComWilliamrijksenOnesignal.dst; + EXCLUDED_ARCHS = ""; GCC_C_LANGUAGE_STANDARD = c99; GCC_MODEL_TUNING = G5; GCC_PRECOMPILE_PREFIX_HEADER = YES; @@ -358,7 +375,8 @@ GCC_WARN_UNUSED_VALUE = NO; GCC_WARN_UNUSED_VARIABLE = NO; INSTALL_PATH = /usr/local/lib; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; + ONLY_ACTIVE_ARCH = YES; OTHER_CFLAGS = "-DTI_POST_1_2"; OTHER_LDFLAGS = "-ObjC"; PRODUCT_NAME = ComWilliamrijksenOnesignal; diff --git a/ios/manifest b/ios/manifest index 3f59d41..7d1f43e 100644 --- a/ios/manifest +++ b/ios/manifest @@ -2,9 +2,10 @@ # this is your module manifest and used by Titanium # during compilation, packaging, distribution, etc. # -version: 2.2.2 +version: 3.1.0 apiversion: 2 -architectures: armv7 arm64 i386 x86_64 +architectures: arm64 x86_64 +mac: false description: com.williamrijksen.onesignal author: William Rijksen license: Specify your license @@ -15,4 +16,4 @@ name: com.williamrijksen.onesignal moduleid: com.williamrijksen.onesignal guid: 67065763-fd5e-4069-a877-6c7fd328f877 platform: iphone -minsdk: 8.3.1.GA +minsdk: 9.3.2.GA diff --git a/ios/platform/OneSignal.framework/Headers b/ios/platform/OneSignal.framework/Headers deleted file mode 120000 index d5ab97c..0000000 --- a/ios/platform/OneSignal.framework/Headers +++ /dev/null @@ -1 +0,0 @@ -Versions/A/Headers \ No newline at end of file diff --git a/ios/platform/OneSignal.framework/Modules b/ios/platform/OneSignal.framework/Modules deleted file mode 120000 index 751d64f..0000000 --- a/ios/platform/OneSignal.framework/Modules +++ /dev/null @@ -1 +0,0 @@ -Versions/A/Modules \ No newline at end of file diff --git a/ios/platform/OneSignal.framework/OneSignal b/ios/platform/OneSignal.framework/OneSignal deleted file mode 100755 index 9425709..0000000 Binary files a/ios/platform/OneSignal.framework/OneSignal and /dev/null differ diff --git a/ios/platform/OneSignal.framework/Resources b/ios/platform/OneSignal.framework/Resources deleted file mode 120000 index 186f014..0000000 --- a/ios/platform/OneSignal.framework/Resources +++ /dev/null @@ -1 +0,0 @@ -Versions/A/Resources \ No newline at end of file diff --git a/ios/platform/OneSignal.framework/Versions/A/Headers/OneSignal.h b/ios/platform/OneSignal.framework/Versions/A/Headers/OneSignal.h deleted file mode 100755 index af2001e..0000000 --- a/ios/platform/OneSignal.framework/Versions/A/Headers/OneSignal.h +++ /dev/null @@ -1,539 +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 - -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wstrict-prototypes" -#pragma clang diagnostic ignored "-Wnullability-completeness" - -/* The action type associated to an OSNotificationAction object */ -typedef NS_ENUM(NSUInteger, OSNotificationActionType) { - OSNotificationActionTypeOpened, - OSNotificationActionTypeActionTaken -}; - -/* The way a notification was displayed to the user */ -typedef NS_ENUM(NSUInteger, OSNotificationDisplayType) { - /*Notification is silent, or app is in focus but InAppAlertNotifications are disabled*/ - OSNotificationDisplayTypeNone, - - /*Default UIAlertController display*/ - OSNotificationDisplayTypeInAppAlert, - - /*iOS native notification display*/ - OSNotificationDisplayTypeNotification -}; - -@interface OSNotificationAction : NSObject - -/* The type of the notification action */ -@property(readonly)OSNotificationActionType type; - -/* The ID associated with the button tapped. NULL when the actionType is NotificationTapped or InAppAlertClosed */ -@property(readonly)NSString* actionID; - -@end - -/* Notification Payload Received Object */ -@interface OSNotificationPayload : NSObject - -/* Unique Message Identifier */ -@property(readonly)NSString* notificationID; - -/* Unique Template Identifier */ -@property(readonly)NSString* templateID; - -/* Name of Template */ -@property(readonly)NSString* templateName; - -/* True when the key content-available is set to 1 in the aps payload. - content-available is used to wake your app when the payload is received. - See Apple's documenation for more details. - https://developer.apple.com/documentation/uikit/uiapplicationdelegate/1623013-application -*/ -@property(readonly)BOOL contentAvailable; - -/* True when the key mutable-content is set to 1 in the aps payload. - mutable-content is used to wake your Notification Service Extension to modify a notification. - See Apple's documenation for more details. - https://developer.apple.com/documentation/usernotifications/unnotificationserviceextension - */ -@property(readonly)BOOL mutableContent; - -/* - Notification category key previously registered to display with. - This overrides OneSignal's actionButtons. - See Apple's documenation for more details. - https://developer.apple.com/library/content/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/SupportingNotificationsinYourApp.html#//apple_ref/doc/uid/TP40008194-CH4-SW26 -*/ -@property(readonly)NSString* category; - -/* The badge assigned to the application icon */ -@property(readonly)NSUInteger badge; -@property(readonly)NSInteger badgeIncrement; - -/* The sound parameter passed to the notification - By default set to UILocalNotificationDefaultSoundName */ -@property(readonly)NSString* sound; - -/* Main push content */ -@property(readonly)NSString* title; -@property(readonly)NSString* subtitle; -@property(readonly)NSString* body; - -/* Web address to launch within the app via a WKWebView */ -@property(readonly)NSString* launchURL; - -/* Additional key value properties set within the payload */ -@property(readonly)NSDictionary* additionalData; - -/* iOS 10+ : Attachments sent as part of the rich notification */ -@property(readonly)NSDictionary* attachments; - -/* Action buttons passed */ -@property(readonly)NSArray *actionButtons; - -/* Holds the original payload received - Keep the raw value for users that would like to root the push */ -@property(readonly)NSDictionary *rawPayload; - -/* iOS 10+ : Groups notifications into threads */ -@property(readonly)NSString *threadId; - -/* Parses an APS push payload into a OSNotificationPayload object. - Useful to call from your NotificationServiceExtension when the - didReceiveNotificationRequest:withContentHandler: method fires. */ -+ (instancetype)parseWithApns:(nonnull NSDictionary*)message; - -@end - -/* OneSignal OSNotification */ -@interface OSNotification : NSObject - -/* Notification Payload */ -@property(readonly)OSNotificationPayload* payload; - -/* Display method of the notification */ -@property(readonly)OSNotificationDisplayType displayType; - -/* Set to true when the user was able to see the notification and reacted to it - Set to false when app is in focus and in-app alerts are disabled, or the remote notification is silent. */ -@property(readonly, getter=wasShown)BOOL shown; - -/* Set to true if the app was in focus when the notification */ -@property(readonly, getter=wasAppInFocus)BOOL isAppInFocus; - -/* Set to true when the received notification is silent - Silent means there is no alert, sound, or badge payload in the aps dictionary - requires remote-notification within UIBackgroundModes array of the Info.plist */ -@property(readonly, getter=isSilentNotification)BOOL silentNotification; - -/* iOS 10+: Indicates whether or not the received notification has mutableContent : 1 assigned to its payload - Used for UNNotificationServiceExtension to launch extension. */ -@property(readonly, getter=hasMutableContent)BOOL mutableContent; - -/* Convert object into an NSString that can be convertible into a custom Dictionary / JSON Object */ -- (NSString*)stringify; - -@end - -@interface OSNotificationOpenedResult : NSObject - -@property(readonly)OSNotification* notification; -@property(readonly)OSNotificationAction *action; - -/* Convert object into an NSString that can be convertible into a custom Dictionary / JSON Object */ -- (NSString*)stringify; - -@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; - -/* 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; - -@end - -@protocol OSInAppMessageDelegate -@optional -- (void)handleMessageAction:(OSInAppMessageAction * _Nonnull)action NS_SWIFT_NAME(handleMessageAction(action:)); -@end - -/* OneSignal Influence Types */ -typedef NS_ENUM(NSUInteger, Session) { - DIRECT, - INDIRECT, - UNATTRIBUTED, - DISABLED -}; -/* OneSignal Influence Channels */ -typedef NS_ENUM(NSUInteger, OSInfluenceChannel) { - IN_APP_MESSAGE, - NOTIFICATION, -}; - -@interface OSOutcomeEvent : NSObject - -// Session enum (DIRECT, INDIRECT, UNATTRIBUTED, or DISABLED) to determine code route and request params -@property (nonatomic) Session session; - -// Notification ids for the current session -@property (strong, nonatomic, nullable) NSArray *notificationIds; - -// Id or name of the event -@property (strong, nonatomic, nonnull) NSString *name; - -// Time of the event occurring -@property (strong, nonatomic, nonnull) NSNumber *timestamp; - -// A weight to attach to the outcome name -@property (strong, nonatomic, nonnull) NSDecimalNumber *weight; - -// Convert the object into a NSDictionary -- (NSDictionary * _Nonnull)jsonRepresentation; - -@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 -}; - -// 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*)toDictionary; - -@end - -@interface OSPermissionStateChanges : NSObject - -@property (readonly) OSPermissionState* to; -@property (readonly) OSPermissionState* from; -- (NSDictionary*)toDictionary; - -@end - -@protocol OSPermissionObserver -- (void)onOSPermissionChanged:(OSPermissionStateChanges*)stateChanges; -@end - - -// Subscription Classes -@interface OSSubscriptionState : NSObject - -@property (readonly, nonatomic) BOOL subscribed; // (yes only if userId, pushToken, and setSubscription exists / are true) -@property (readonly, nonatomic) BOOL userSubscriptionSetting; // returns setSubscription state. -@property (readonly, nonatomic) NSString* userId; // AKA OneSignal PlayerId -@property (readonly, nonatomic) NSString* pushToken; // AKA Apple Device Token -- (NSDictionary*)toDictionary; - -@end - - -@interface OSEmailSubscriptionState : NSObject -@property (readonly, nonatomic) NSString* emailUserId; // The new Email user ID -@property (readonly, nonatomic) NSString *emailAddress; -@property (readonly, nonatomic) BOOL subscribed; -- (NSDictionary*)toDictionary; -@end - -@interface OSSubscriptionStateChanges : NSObject -@property (readonly) OSSubscriptionState* to; -@property (readonly) OSSubscriptionState* from; -- (NSDictionary*)toDictionary; -@end - -@interface OSEmailSubscriptionStateChanges : NSObject -@property (readonly) OSEmailSubscriptionState* to; -@property (readonly) OSEmailSubscriptionState* from; -- (NSDictionary*)toDictionary; -@end - -@protocol OSSubscriptionObserver -- (void)onOSSubscriptionChanged:(OSSubscriptionStateChanges*)stateChanges; -@end - -@protocol OSEmailSubscriptionObserver -- (void)onOSEmailSubscriptionChanged:(OSEmailSubscriptionStateChanges*)stateChanges; -@end - - - -// Permission+Subscription Classes -@interface OSPermissionSubscriptionState : NSObject - -@property (readonly) OSPermissionState* permissionStatus; -@property (readonly) OSSubscriptionState* subscriptionStatus; -@property (readonly) OSEmailSubscriptionState *emailSubscriptionStatus; -- (NSDictionary*)toDictionary; - -@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); - -/*Block for notifying availability of the User's ID and push token*/ -typedef void (^OSIdsAvailableBlock)(NSString* userId, NSString* pushToken); - -/*Block for handling the reception of a remote notification */ -typedef void (^OSHandleNotificationReceivedBlock)(OSNotification* notification); - -/*Block for handling a user reaction to a notification*/ -typedef void (^OSHandleNotificationActionBlock)(OSNotificationOpenedResult * result); - -/*Block for handling user click on an in app message*/ -typedef void (^OSHandleInAppMessageActionClickBlock)(OSInAppMessageAction* action); - -/*Block for handling outcome event being sent successfully*/ -typedef void (^OSSendOutcomeSuccess)(OSOutcomeEvent* outcome); - -/*Dictionary of keys to pass alongside the init settings*/ - -/*Let OneSignal directly prompt for push notifications on init*/ -extern NSString * const kOSSettingsKeyAutoPrompt; - -/*Enable the default in-app alerts*/ -extern NSString * const kOSSettingsKeyInAppAlerts; - -/*Enable In-App display of Launch URLs*/ -extern NSString * const kOSSettingsKeyInAppLaunchURL; - -/*Prompt user yes/no to open URL's from push notifications*/ -extern NSString * const kOSSSettingsKeyPromptBeforeOpeningPushURL; - -/* iOS 10 + - Set notification's in-focus display option. - Value must be an OSNotificationDisplayType enum -*/ -extern NSString * const kOSSettingsKeyInFocusDisplayOption; - - -/* iOS 12 + - Used to determine if the app is able to present it's - own customized Notification Settings view -*/ -extern NSString * const kOSSettingsKeyProvidesAppNotificationSettings; - -// ======= OneSignal Class Interface ========= -@interface OneSignal : NSObject - -extern NSString* const ONESIGNAL_VERSION; - -typedef NS_ENUM(NSUInteger, ONE_S_LOG_LEVEL) { - ONE_S_LL_NONE, ONE_S_LL_FATAL, ONE_S_LL_ERROR, ONE_S_LL_WARN, ONE_S_LL_INFO, ONE_S_LL_DEBUG, ONE_S_LL_VERBOSE -}; - - -/* - Initialize OneSignal. - Sends push token to OneSignal so you can later send notifications. - */ - -// - Initialization -+ (id)initWithLaunchOptions:(NSDictionary*)launchOptions appId:(NSString*)appId; -+ (id)initWithLaunchOptions:(NSDictionary*)launchOptions appId:(NSString*)appId handleNotificationAction:(OSHandleNotificationActionBlock)actionCallback; -+ (id)initWithLaunchOptions:(NSDictionary*)launchOptions appId:(NSString*)appId handleNotificationAction:(OSHandleNotificationActionBlock)actionCallback settings:(NSDictionary*)settings; -+ (id)initWithLaunchOptions:(NSDictionary*)launchOptions appId:(NSString*)appId handleNotificationReceived:(OSHandleNotificationReceivedBlock)receivedCallback handleNotificationAction:(OSHandleNotificationActionBlock)actionCallback settings:(NSDictionary*)settings; - -// - Privacy -+ (void)consentGranted:(BOOL)granted; -+ (BOOL)requiresUserPrivacyConsent; // tells your application if privacy consent is still needed from the current user -+ (void)setRequiresUserPrivacyConsent:(BOOL)required; //used by wrapper SDK's to require user privacy consent - -@property (class) OSNotificationDisplayType inFocusDisplayType; - -+ (NSString*)app_id; -+ (NSString*)sdk_version_raw; -+ (NSString*)sdk_semantic_version; - -// Only use if you set kOSSettingsKeyAutoPrompt to false -+ (void)registerForPushNotifications __deprecated_msg("Please use promptForPushNotificationsWithUserResponse instead."); -+ (void)promptForPushNotificationsWithUserResponse:(void(^)(BOOL accepted))completionHandler; -+ (void)promptForPushNotificationsWithUserResponse:(void (^)(BOOL accepted))completionHandler fallbackToSettings:(BOOL)fallback; - -// This method opens the iOS Settings app and navigates to the Push Notification Settings -// page for your app specifically -+ (void)presentAppSettings; -+ (void)registerForProvisionalAuthorization:(void(^)(BOOL accepted))completionHandler; - -// - Logging -+ (void)setLogLevel:(ONE_S_LOG_LEVEL)logLevel visualLevel:(ONE_S_LOG_LEVEL)visualLogLevel; -+ (void)onesignal_Log:(ONE_S_LOG_LEVEL)logLevel message:(NSString*)message; - -// - Tagging -+ (void)sendTag:(NSString*)key value:(NSString*)value onSuccess:(OSResultSuccessBlock)successBlock onFailure:(OSFailureBlock)failureBlock; -+ (void)sendTag:(NSString*)key value:(NSString*)value; -+ (void)sendTags:(NSDictionary*)keyValuePair onSuccess:(OSResultSuccessBlock)successBlock onFailure:(OSFailureBlock)failureBlock; -+ (void)sendTags:(NSDictionary*)keyValuePair; -+ (void)sendTagsWithJsonString:(NSString*)jsonString; -+ (void)getTags:(OSResultSuccessBlock)successBlock onFailure:(OSFailureBlock)failureBlock; -+ (void)getTags:(OSResultSuccessBlock)successBlock; -+ (void)deleteTag:(NSString*)key onSuccess:(OSResultSuccessBlock)successBlock onFailure:(OSFailureBlock)failureBlock; -+ (void)deleteTag:(NSString*)key; -+ (void)deleteTags:(NSArray*)keys onSuccess:(OSResultSuccessBlock)successBlock onFailure:(OSFailureBlock)failureBlock; -+ (void)deleteTags:(NSArray*)keys; -+ (void)deleteTagsWithJsonString:(NSString*)jsonString; -// Optional method that sends us the user's email as an anonymized hash so that we can better target and personalize notifications sent to that user across their devices. -// Sends as MD5 and SHA1 of the provided email -+ (void)syncHashedEmail:(NSString*)email __deprecated_msg("Please refer to our new Email methods/functionality such as setEmail(). This method will be removed in a future version of the OneSignal SDK"); - -// - Subscription and Permissions -+ (void)IdsAvailable:(OSIdsAvailableBlock)idsAvailableBlock __deprecated_msg("Please use getPermissionSubscriptionState or addSubscriptionObserver and addPermissionObserver instead."); - -+ (OSPermissionSubscriptionState*)getPermissionSubscriptionState; - -+ (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)setSubscription:(BOOL)enable; -+ (BOOL)isInAppMessagingPaused; -+ (void)pauseInAppMessages:(BOOL)pause; - -// - Posting Notification -+ (void)postNotification:(NSDictionary*)jsonData; -+ (void)postNotification:(NSDictionary*)jsonData onSuccess:(OSResultSuccessBlock)successBlock onFailure:(OSFailureBlock)failureBlock; -+ (void)postNotificationWithJsonString:(NSString*)jsonData onSuccess:(OSResultSuccessBlock)successBlock onFailure:(OSFailureBlock)failureBlock; -+ (NSString*)parseNSErrorAsJsonString:(NSError*)error; - -// - Request and track user's location -+ (void)promptLocation; -+ (void)setLocationShared:(BOOL)enable; -+ (BOOL)isLocationShared; - - -// Only used for wrapping SDKs, such as Unity, Cordova, Xamarin, etc. -+ (void)setMSDKType:(NSString*)type; - -+ (void)setInAppMessageClickHandler:(OSHandleInAppMessageActionClickBlock)delegate; - -// iOS 10 only -// Process from Notification Service Extension. -// Used for iOS Media Attachemtns and Action Buttons. -+ (UNMutableNotificationContent*)didReceiveNotificationExtensionRequest:(UNNotificationRequest*)request withMutableNotificationContent:(UNMutableNotificationContent*)replacementContent; -+ (UNMutableNotificationContent*)serviceExtensionTimeWillExpireRequest:(UNNotificationRequest*)request withMutableNotificationContent:(UNMutableNotificationContent*)replacementContent; - -// Email methods - -// 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; - - -// External user id -// Typedefs defining completion blocks for updating the external user id -typedef void (^OSUpdateExternalUserIdBlock)(NSDictionary* results); - -+ (void)setExternalUserId:(NSString * _Nonnull)externalId; -+ (void)setExternalUserId:(NSString * _Nonnull)externalId withCompletion:(OSUpdateExternalUserIdBlock _Nullable)completionBlock; -+ (void)removeExternalUserId; -+ (void)removeExternalUserId:(OSUpdateExternalUserIdBlock _Nullable)completionBlock; - -// In-App Messaging triggers -+ (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; - -// Outcome Events -+ (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; -@end - -#pragma clang diagnostic pop diff --git a/ios/platform/OneSignal.framework/Versions/A/OneSignal b/ios/platform/OneSignal.framework/Versions/A/OneSignal deleted file mode 100644 index cad9639..0000000 Binary files a/ios/platform/OneSignal.framework/Versions/A/OneSignal and /dev/null differ diff --git a/ios/platform/OneSignal.framework/Versions/A/Resources/Info.plist b/ios/platform/OneSignal.framework/Versions/A/Resources/Info.plist deleted file mode 100644 index 3f4182e..0000000 Binary files a/ios/platform/OneSignal.framework/Versions/A/Resources/Info.plist and /dev/null differ diff --git a/ios/platform/OneSignal.xcframework/Info.plist b/ios/platform/OneSignal.xcframework/Info.plist new file mode 100644 index 0000000..8e3cf61 --- /dev/null +++ b/ios/platform/OneSignal.xcframework/Info.plist @@ -0,0 +1,58 @@ + + + + + AvailableLibraries + + + LibraryIdentifier + ios-arm64_i386_x86_64-simulator + LibraryPath + OneSignal.framework + SupportedArchitectures + + arm64 + i386 + x86_64 + + SupportedPlatform + ios + SupportedPlatformVariant + simulator + + + LibraryIdentifier + ios-arm64_armv7_armv7s + LibraryPath + OneSignal.framework + SupportedArchitectures + + arm64 + armv7 + armv7s + + SupportedPlatform + ios + + + LibraryIdentifier + ios-arm64_x86_64-maccatalyst + LibraryPath + OneSignal.framework + SupportedArchitectures + + arm64 + x86_64 + + SupportedPlatform + ios + SupportedPlatformVariant + maccatalyst + + + CFBundlePackageType + XFWK + XCFrameworkFormatVersion + 1.0 + + diff --git a/ios/platform/OneSignal.xcframework/ios-arm64_armv7_armv7s/OneSignal.framework/Headers/OneSignal.h b/ios/platform/OneSignal.xcframework/ios-arm64_armv7_armv7s/OneSignal.framework/Headers/OneSignal.h new file mode 100755 index 0000000..a85aa7b --- /dev/null +++ b/ios/platform/OneSignal.xcframework/ios-arm64_armv7_armv7s/OneSignal.framework/Headers/OneSignal.h @@ -0,0 +1,463 @@ +/** + 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/platform/OneSignal.xcframework/ios-arm64_armv7_armv7s/OneSignal.framework/Info.plist b/ios/platform/OneSignal.xcframework/ios-arm64_armv7_armv7s/OneSignal.framework/Info.plist new file mode 100644 index 0000000..b461855 Binary files /dev/null and b/ios/platform/OneSignal.xcframework/ios-arm64_armv7_armv7s/OneSignal.framework/Info.plist differ diff --git a/ios/platform/OneSignal.framework/Versions/A/Modules/module.modulemap b/ios/platform/OneSignal.xcframework/ios-arm64_armv7_armv7s/OneSignal.framework/Modules/module.modulemap similarity index 100% rename from ios/platform/OneSignal.framework/Versions/A/Modules/module.modulemap rename to ios/platform/OneSignal.xcframework/ios-arm64_armv7_armv7s/OneSignal.framework/Modules/module.modulemap diff --git a/ios/platform/OneSignal.xcframework/ios-arm64_armv7_armv7s/OneSignal.framework/OneSignal b/ios/platform/OneSignal.xcframework/ios-arm64_armv7_armv7s/OneSignal.framework/OneSignal new file mode 100755 index 0000000..0238bd0 Binary files /dev/null and b/ios/platform/OneSignal.xcframework/ios-arm64_armv7_armv7s/OneSignal.framework/OneSignal differ diff --git a/ios/platform/OneSignal.xcframework/ios-arm64_i386_x86_64-simulator/OneSignal.framework/Headers/OneSignal.h b/ios/platform/OneSignal.xcframework/ios-arm64_i386_x86_64-simulator/OneSignal.framework/Headers/OneSignal.h new file mode 100755 index 0000000..a85aa7b --- /dev/null +++ b/ios/platform/OneSignal.xcframework/ios-arm64_i386_x86_64-simulator/OneSignal.framework/Headers/OneSignal.h @@ -0,0 +1,463 @@ +/** + 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/platform/OneSignal.xcframework/ios-arm64_i386_x86_64-simulator/OneSignal.framework/Info.plist b/ios/platform/OneSignal.xcframework/ios-arm64_i386_x86_64-simulator/OneSignal.framework/Info.plist new file mode 100644 index 0000000..51ce5f9 Binary files /dev/null and b/ios/platform/OneSignal.xcframework/ios-arm64_i386_x86_64-simulator/OneSignal.framework/Info.plist differ diff --git a/ios/platform/OneSignal.xcframework/ios-arm64_i386_x86_64-simulator/OneSignal.framework/Modules/module.modulemap b/ios/platform/OneSignal.xcframework/ios-arm64_i386_x86_64-simulator/OneSignal.framework/Modules/module.modulemap new file mode 100644 index 0000000..a3424cd --- /dev/null +++ b/ios/platform/OneSignal.xcframework/ios-arm64_i386_x86_64-simulator/OneSignal.framework/Modules/module.modulemap @@ -0,0 +1,6 @@ +framework module OneSignal { + umbrella header "OneSignal.h" + + export * + module * { export * } +} diff --git a/ios/platform/OneSignal.xcframework/ios-arm64_i386_x86_64-simulator/OneSignal.framework/OneSignal b/ios/platform/OneSignal.xcframework/ios-arm64_i386_x86_64-simulator/OneSignal.framework/OneSignal new file mode 100755 index 0000000..41747e7 Binary files /dev/null and b/ios/platform/OneSignal.xcframework/ios-arm64_i386_x86_64-simulator/OneSignal.framework/OneSignal differ diff --git a/ios/platform/OneSignal.xcframework/ios-arm64_i386_x86_64-simulator/OneSignal.framework/_CodeSignature/CodeResources b/ios/platform/OneSignal.xcframework/ios-arm64_i386_x86_64-simulator/OneSignal.framework/_CodeSignature/CodeResources new file mode 100644 index 0000000..e76f9a0 --- /dev/null +++ b/ios/platform/OneSignal.xcframework/ios-arm64_i386_x86_64-simulator/OneSignal.framework/_CodeSignature/CodeResources @@ -0,0 +1,132 @@ + + + + + files + + Headers/OneSignal.h + + gcVwtG6FQnnTbAP09KZgVsg7kOY= + + Info.plist + + eZuru6gqLyU/Bj07eMPA2sogrhE= + + Modules/module.modulemap + + fJj0ATF9ohjya70dUZjH6i9w44o= + + + files2 + + Headers/OneSignal.h + + hash + + gcVwtG6FQnnTbAP09KZgVsg7kOY= + + hash2 + + ud8ClrxlKPZ7wfDJMrDUOIVFvFnyvp3J5DIuQAXndDQ= + + + Modules/module.modulemap + + hash + + fJj0ATF9ohjya70dUZjH6i9w44o= + + hash2 + + Gn6ZaR3ERppbMM1cYIPVzhn7nRrRbOZoQYYdkOd4nJw= + + + + 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/platform/OneSignal.xcframework/ios-arm64_x86_64-maccatalyst/OneSignal.framework/Headers b/ios/platform/OneSignal.xcframework/ios-arm64_x86_64-maccatalyst/OneSignal.framework/Headers new file mode 120000 index 0000000..a177d2a --- /dev/null +++ b/ios/platform/OneSignal.xcframework/ios-arm64_x86_64-maccatalyst/OneSignal.framework/Headers @@ -0,0 +1 @@ +Versions/Current/Headers \ No newline at end of file diff --git a/ios/platform/OneSignal.xcframework/ios-arm64_x86_64-maccatalyst/OneSignal.framework/Modules b/ios/platform/OneSignal.xcframework/ios-arm64_x86_64-maccatalyst/OneSignal.framework/Modules new file mode 120000 index 0000000..5736f31 --- /dev/null +++ b/ios/platform/OneSignal.xcframework/ios-arm64_x86_64-maccatalyst/OneSignal.framework/Modules @@ -0,0 +1 @@ +Versions/Current/Modules \ No newline at end of file diff --git a/ios/platform/OneSignal.xcframework/ios-arm64_x86_64-maccatalyst/OneSignal.framework/OneSignal b/ios/platform/OneSignal.xcframework/ios-arm64_x86_64-maccatalyst/OneSignal.framework/OneSignal new file mode 120000 index 0000000..51c8d4e --- /dev/null +++ b/ios/platform/OneSignal.xcframework/ios-arm64_x86_64-maccatalyst/OneSignal.framework/OneSignal @@ -0,0 +1 @@ +Versions/Current/OneSignal \ No newline at end of file diff --git a/ios/platform/OneSignal.xcframework/ios-arm64_x86_64-maccatalyst/OneSignal.framework/Resources b/ios/platform/OneSignal.xcframework/ios-arm64_x86_64-maccatalyst/OneSignal.framework/Resources new file mode 120000 index 0000000..953ee36 --- /dev/null +++ b/ios/platform/OneSignal.xcframework/ios-arm64_x86_64-maccatalyst/OneSignal.framework/Resources @@ -0,0 +1 @@ +Versions/Current/Resources \ No newline at end of file diff --git a/ios/platform/OneSignal.xcframework/ios-arm64_x86_64-maccatalyst/OneSignal.framework/Versions/A/Headers/OneSignal.h b/ios/platform/OneSignal.xcframework/ios-arm64_x86_64-maccatalyst/OneSignal.framework/Versions/A/Headers/OneSignal.h new file mode 100755 index 0000000..a85aa7b --- /dev/null +++ b/ios/platform/OneSignal.xcframework/ios-arm64_x86_64-maccatalyst/OneSignal.framework/Versions/A/Headers/OneSignal.h @@ -0,0 +1,463 @@ +/** + 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/platform/OneSignal.xcframework/ios-arm64_x86_64-maccatalyst/OneSignal.framework/Versions/A/Modules/module.modulemap b/ios/platform/OneSignal.xcframework/ios-arm64_x86_64-maccatalyst/OneSignal.framework/Versions/A/Modules/module.modulemap new file mode 100644 index 0000000..a3424cd --- /dev/null +++ b/ios/platform/OneSignal.xcframework/ios-arm64_x86_64-maccatalyst/OneSignal.framework/Versions/A/Modules/module.modulemap @@ -0,0 +1,6 @@ +framework module OneSignal { + umbrella header "OneSignal.h" + + export * + module * { export * } +} diff --git a/ios/platform/OneSignal.xcframework/ios-arm64_x86_64-maccatalyst/OneSignal.framework/Versions/A/OneSignal b/ios/platform/OneSignal.xcframework/ios-arm64_x86_64-maccatalyst/OneSignal.framework/Versions/A/OneSignal new file mode 100755 index 0000000..28dd908 Binary files /dev/null and b/ios/platform/OneSignal.xcframework/ios-arm64_x86_64-maccatalyst/OneSignal.framework/Versions/A/OneSignal differ diff --git a/ios/platform/OneSignal.xcframework/ios-arm64_x86_64-maccatalyst/OneSignal.framework/Versions/A/Resources/Info.plist b/ios/platform/OneSignal.xcframework/ios-arm64_x86_64-maccatalyst/OneSignal.framework/Versions/A/Resources/Info.plist new file mode 100644 index 0000000..5e295c5 --- /dev/null +++ b/ios/platform/OneSignal.xcframework/ios-arm64_x86_64-maccatalyst/OneSignal.framework/Versions/A/Resources/Info.plist @@ -0,0 +1,50 @@ + + + + + BuildMachineOSBuild + 21G115 + CFBundleDevelopmentRegion + en + CFBundleExecutable + OneSignal + CFBundleIdentifier + com.onesignal.OneSignal-Dynamic + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + OneSignal + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0 + CFBundleSupportedPlatforms + + MacOSX + + CFBundleVersion + 1 + DTCompiler + com.apple.compilers.llvm.clang.1_0 + DTPlatformBuild + 13F100 + DTPlatformName + macosx + DTPlatformVersion + 12.3 + DTSDKBuild + 21E226 + DTSDKName + macosx12.3 + DTXcode + 1341 + DTXcodeBuild + 13F100 + LSMinimumSystemVersion + 10.15 + UIDeviceFamily + + 2 + + + diff --git a/ios/platform/OneSignal.framework/Versions/Current b/ios/platform/OneSignal.xcframework/ios-arm64_x86_64-maccatalyst/OneSignal.framework/Versions/Current similarity index 100% rename from ios/platform/OneSignal.framework/Versions/Current rename to ios/platform/OneSignal.xcframework/ios-arm64_x86_64-maccatalyst/OneSignal.framework/Versions/Current diff --git a/ios/platform/OneSignalCore.xcframework/Info.plist b/ios/platform/OneSignalCore.xcframework/Info.plist new file mode 100644 index 0000000..d01a8cc --- /dev/null +++ b/ios/platform/OneSignalCore.xcframework/Info.plist @@ -0,0 +1,58 @@ + + + + + AvailableLibraries + + + LibraryIdentifier + ios-arm64_x86_64-maccatalyst + LibraryPath + OneSignalCore.framework + SupportedArchitectures + + arm64 + x86_64 + + SupportedPlatform + ios + SupportedPlatformVariant + maccatalyst + + + LibraryIdentifier + ios-arm64_i386_x86_64-simulator + LibraryPath + OneSignalCore.framework + SupportedArchitectures + + arm64 + i386 + x86_64 + + SupportedPlatform + ios + SupportedPlatformVariant + simulator + + + LibraryIdentifier + ios-arm64_armv7_armv7s + LibraryPath + OneSignalCore.framework + SupportedArchitectures + + arm64 + armv7 + armv7s + + SupportedPlatform + ios + + + CFBundlePackageType + XFWK + XCFrameworkFormatVersion + 1.0 + + diff --git a/ios/platform/OneSignalCore.xcframework/ios-arm64_armv7_armv7s/OneSignalCore.framework/Headers/NSString+OneSignal.h b/ios/platform/OneSignalCore.xcframework/ios-arm64_armv7_armv7s/OneSignalCore.framework/Headers/NSString+OneSignal.h new file mode 100644 index 0000000..c9ee3aa --- /dev/null +++ b/ios/platform/OneSignalCore.xcframework/ios-arm64_armv7_armv7s/OneSignalCore.framework/Headers/NSString+OneSignal.h @@ -0,0 +1,44 @@ +/** + * 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 + +#ifndef NSString_OneSignal_h +#define NSString_OneSignal_h +@interface NSString (OneSignal) + +- (NSString *_Nonnull)one_getVersionForRange:(NSRange)range; +- (NSString *_Nonnull)one_substringAfter:(NSString *_Nonnull)needle; +- (NSString *_Nonnull)one_getSemanticVersion; +- (NSString *_Nullable)fileExtensionForMimeType; +- (NSString *_Nullable)supportedFileExtension; + +// returns a lower case hex representation of the data ++ (nullable NSString *)hexStringFromData:(nonnull NSData *)data; + +@end +#endif diff --git a/ios/platform/OneSignalCore.xcframework/ios-arm64_armv7_armv7s/OneSignalCore.framework/Headers/NSURL+OneSignal.h b/ios/platform/OneSignalCore.xcframework/ios-arm64_armv7_armv7s/OneSignalCore.framework/Headers/NSURL+OneSignal.h new file mode 100644 index 0000000..84b165a --- /dev/null +++ b/ios/platform/OneSignalCore.xcframework/ios-arm64_armv7_armv7s/OneSignalCore.framework/Headers/NSURL+OneSignal.h @@ -0,0 +1,36 @@ +/** + * 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 + +@interface NSURL (OneSignal) + +- (NSString *)valueFromQueryParameter:(NSString *)parameter; + +- (NSString *)supportedFileExtensionFromQueryItems; + +@end diff --git a/ios/platform/OneSignalCore.xcframework/ios-arm64_armv7_armv7s/OneSignalCore.framework/Headers/OSJSONHandling.h b/ios/platform/OneSignalCore.xcframework/ios-arm64_armv7_armv7s/OneSignalCore.framework/Headers/OSJSONHandling.h new file mode 100644 index 0000000..0a56503 --- /dev/null +++ b/ios/platform/OneSignalCore.xcframework/ios-arm64_armv7_armv7s/OneSignalCore.framework/Headers/OSJSONHandling.h @@ -0,0 +1,40 @@ +/** + * 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 "OSNotification.h" + +@protocol OSJSONDecodable ++ (instancetype _Nullable)instanceWithData:(NSData * _Nonnull)data; + ++ (instancetype _Nullable)instanceWithJson:(NSDictionary * _Nonnull)json; ++ (instancetype _Nullable)instancePreviewFromNotification:(OSNotification * _Nonnull)notification; +@end + +@protocol OSJSONEncodable +- (NSDictionary * _Nonnull)jsonRepresentation; +@end diff --git a/ios/platform/OneSignalCore.xcframework/ios-arm64_armv7_armv7s/OneSignalCore.framework/Headers/OSMacros.h b/ios/platform/OneSignalCore.xcframework/ios-arm64_armv7_armv7s/OneSignalCore.framework/Headers/OSMacros.h new file mode 100644 index 0000000..07d650a --- /dev/null +++ b/ios/platform/OneSignalCore.xcframework/ios-arm64_armv7_armv7s/OneSignalCore.framework/Headers/OSMacros.h @@ -0,0 +1,42 @@ +/** +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. +*/ + +#define mustOverride() @throw [NSException exceptionWithName:NSInvalidArgumentException reason:[NSString stringWithFormat:@"%s must be overridden in a subclass/category", __PRETTY_FUNCTION__] userInfo:nil] +#define methodNotImplemented() mustOverride() +// Defines let and var in Objective-c for shorter code +// __auto_type is compatible with Xcode 8+ +#if defined(__cplusplus) +#define let auto const +#else +#define let const __auto_type +#endif + +#if defined(__cplusplus) +#define var auto +#else +#define var __auto_type +#endif diff --git a/ios/platform/OneSignalCore.xcframework/ios-arm64_armv7_armv7s/OneSignalCore.framework/Headers/OSNotification+Internal.h b/ios/platform/OneSignalCore.xcframework/ios-arm64_armv7_armv7s/OneSignalCore.framework/Headers/OSNotification+Internal.h new file mode 100644 index 0000000..cdc43ea --- /dev/null +++ b/ios/platform/OneSignalCore.xcframework/ios-arm64_armv7_armv7s/OneSignalCore.framework/Headers/OSNotification+Internal.h @@ -0,0 +1,40 @@ +/** + * 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 "OSNotificationClasses.h" + +#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/platform/OneSignalCore.xcframework/ios-arm64_armv7_armv7s/OneSignalCore.framework/Headers/OSNotification.h b/ios/platform/OneSignalCore.xcframework/ios-arm64_armv7_armv7s/OneSignalCore.framework/Headers/OSNotification.h new file mode 100644 index 0000000..d92422a --- /dev/null +++ b/ios/platform/OneSignalCore.xcframework/ios-arm64_armv7_armv7s/OneSignalCore.framework/Headers/OSNotification.h @@ -0,0 +1,112 @@ +/** + * 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. + */ +/* OneSignal OSNotification */ +@interface OSNotification : NSObject + +/* Unique Message Identifier */ +@property(readonly, nullable)NSString* notificationId; + +/* Unique Template Identifier */ +@property(readonly, nullable)NSString* templateId; + +/* Name of Template */ +@property(readonly, nullable)NSString* templateName; + +/* True when the key content-available is set to 1 in the apns payload. + content-available is used to wake your app when the payload is received. + See Apple's documenation for more details. + https://developer.apple.com/documentation/uikit/uiapplicationdelegate/1623013-application +*/ +@property(readonly)BOOL contentAvailable; + +/* True when the key mutable-content is set to 1 in the apns payload. + mutable-content is used to wake your Notification Service Extension to modify a notification. + See Apple's documenation for more details. + https://developer.apple.com/documentation/usernotifications/unnotificationserviceextension + */ +@property(readonly, getter=hasMutableContent)BOOL mutableContent; + +/* + Notification category key previously registered to display with. + This overrides OneSignal's actionButtons. + See Apple's documenation for more details. + https://developer.apple.com/library/content/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/SupportingNotificationsinYourApp.html#//apple_ref/doc/uid/TP40008194-CH4-SW26 +*/ +@property(readonly, nullable)NSString* category; + +/* The badge assigned to the application icon */ +@property(readonly)NSInteger badge; +@property(readonly)NSInteger badgeIncrement; + +/* The sound parameter passed to the notification + By default set to UILocalNotificationDefaultSoundName */ +@property(readonly, nullable)NSString* sound; + +/* Main push content */ +@property(readonly, nullable)NSString* title; +@property(readonly, nullable)NSString* subtitle; +@property(readonly, nullable)NSString* body; + +/* Web address to launch within the app via a WKWebView */ +@property(readonly, nullable)NSString* launchURL; + +/* Additional key value properties set within the payload */ +@property(readonly, nullable)NSDictionary* additionalData; + +/* iOS 10+ : Attachments sent as part of the rich notification */ +@property(readonly, nullable)NSDictionary* attachments; + +/* Action buttons passed */ +@property(readonly, nullable)NSArray *actionButtons; + +/* Holds the original payload received + Keep the raw value for users that would like to root the push */ +@property(readonly, nonnull)NSDictionary *rawPayload; + +/* iOS 10+ : Groups notifications into threads */ +@property(readonly, nullable)NSString *threadId; + +/* iOS 15+ : Relevance Score for notification summary */ +@property(readonly, nullable)NSNumber *relevanceScore; + +/* iOS 15+ : Interruption Level */ +@property(readonly, nullable)NSString *interruptionLevel; + +@property(readonly, nullable)NSString *collapseId; + +/* Parses an APNS push payload into a OSNotification object. + Useful to call from your NotificationServiceExtension when the + didReceiveNotificationRequest:withContentHandler: method fires. */ ++ (instancetype _Nullable)parseWithApns:(nonnull NSDictionary*)message; + +/* Convert object into a custom Dictionary / JSON Object */ +- (NSDictionary* _Nonnull)jsonRepresentation; + +/* Convert object into an NSString that can be convertible into a custom Dictionary / JSON Object */ +- (NSString* _Nonnull)stringify; + +@end diff --git a/ios/platform/OneSignalCore.xcframework/ios-arm64_armv7_armv7s/OneSignalCore.framework/Headers/OSNotificationClasses.h b/ios/platform/OneSignalCore.xcframework/ios-arm64_armv7_armv7s/OneSignalCore.framework/Headers/OSNotificationClasses.h new file mode 100644 index 0000000..2d8fed2 --- /dev/null +++ b/ios/platform/OneSignalCore.xcframework/ios-arm64_armv7_armv7s/OneSignalCore.framework/Headers/OSNotificationClasses.h @@ -0,0 +1,60 @@ +/** + * 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 "OSNotification.h" + +// Pass in nil means a notification will not display +typedef void (^OSNotificationDisplayResponse)(OSNotification* _Nullable notification); + +/* The action type associated to an OSNotificationAction object */ +typedef NS_ENUM(NSUInteger, OSNotificationActionType) { + OSNotificationActionTypeOpened, + OSNotificationActionTypeActionTaken +}; + +@interface OSNotificationAction : NSObject + +/* The type of the notification action */ +@property(readonly)OSNotificationActionType type; + +/* The ID associated with the button tapped. NULL when the actionType is NotificationTapped */ +@property(readonly, nullable)NSString* actionId; + +@end + +@interface OSNotificationOpenedResult : NSObject + +@property(readonly, nonnull)OSNotification* notification; +@property(readonly, nonnull)OSNotificationAction *action; + +/* Convert object into an NSString that can be convertible into a custom Dictionary / JSON Object */ +- (NSString* _Nonnull)stringify; + +// Convert the class into a NSDictionary +- (NSDictionary *_Nonnull)jsonRepresentation; + +@end diff --git a/ios/platform/OneSignalCore.xcframework/ios-arm64_armv7_armv7s/OneSignalCore.framework/Headers/OSPrivacyConsentController.h b/ios/platform/OneSignalCore.xcframework/ios-arm64_armv7_armv7s/OneSignalCore.framework/Headers/OSPrivacyConsentController.h new file mode 100644 index 0000000..37c4f09 --- /dev/null +++ b/ios/platform/OneSignalCore.xcframework/ios-arm64_armv7_armv7s/OneSignalCore.framework/Headers/OSPrivacyConsentController.h @@ -0,0 +1,33 @@ +/** +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 OSPrivacyConsentController : NSObject ++ (BOOL)requiresUserPrivacyConsent; ++ (void)consentGranted:(BOOL)granted; ++ (BOOL)shouldLogMissingPrivacyConsentErrorWithMethodName:(NSString *)methodName; +@end diff --git a/ios/platform/OneSignalCore.xcframework/ios-arm64_armv7_armv7s/OneSignalCore.framework/Headers/OSRequests.h b/ios/platform/OneSignalCore.xcframework/ios-arm64_armv7_armv7s/OneSignalCore.framework/Headers/OSRequests.h new file mode 100644 index 0000000..43bf034 --- /dev/null +++ b/ios/platform/OneSignalCore.xcframework/ios-arm64_armv7_armv7s/OneSignalCore.framework/Headers/OSRequests.h @@ -0,0 +1,156 @@ +/** + * 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 "OneSignalRequest.h" + +#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 + +@interface OSRequestPostNotification : OneSignalRequest ++ (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 + appId:(NSString * _Nonnull)appId + activityId:(NSString * _Nonnull)activityId + token:(NSString * _Nonnull)token; +@end + +@interface OSRequestLiveActivityExit: OneSignalRequest ++ (instancetype _Nonnull)withUserId:(NSString * _Nonnull)userId + appId:(NSString * _Nonnull)appId + activityId:(NSString * _Nonnull)activityId; +@end +#endif /* Requests_h */ + diff --git a/ios/platform/OneSignalCore.xcframework/ios-arm64_armv7_armv7s/OneSignalCore.framework/Headers/OneSignalClient.h b/ios/platform/OneSignalCore.xcframework/ios-arm64_armv7_armv7s/OneSignalCore.framework/Headers/OneSignalClient.h new file mode 100644 index 0000000..432a9ab --- /dev/null +++ b/ios/platform/OneSignalCore.xcframework/ios-arm64_armv7_armv7s/OneSignalCore.framework/Headers/OneSignalClient.h @@ -0,0 +1,82 @@ +/** + * 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 "OneSignalRequest.h" + +#ifndef OneSignalClient_h +#define OneSignalClient_h + +typedef void (^OSDataRequestSuccessBlock)(NSData *data); + +typedef void (^OSMultipleCompletionBlock)(NSDictionary *responses); +typedef void (^OSMultipleFailureBlock)(NSDictionary *errors); +typedef void (^OSMultipleSuccessBlock)(NSDictionary *results); + +@interface OneSignalClient : NSObject ++ (OneSignalClient *)sharedClient; +- (void)executeRequest:(OneSignalRequest *)request onSuccess:(OSResultSuccessBlock)successBlock onFailure:(OSFailureBlock)failureBlock; +- (void)executeSynchronousRequest:(OneSignalRequest *)request onSuccess:(OSResultSuccessBlock)successBlock onFailure:(OSFailureBlock)failureBlock; + +// ie. for loading HTML or other non-JSON based requests +- (void)executeDataRequest:(OneSignalRequest *)request onSuccess:(OSDataRequestSuccessBlock)successBlock onFailure:(OSFailureBlock)failureBlock; + +// Executes multiple OneSignalRequest's simultaneously, needs a unique identifier for each request +- (void)executeSimultaneousRequests:(NSDictionary *)requests withSuccess:(OSMultipleSuccessBlock)successBlock onFailure:(OSMultipleFailureBlock)failureBlock; + +/* + TODO: We want to eventually migrate over to using this method for executing simultaneous requests: + This allows us to combine multiple async concurrent requests to return from a single callback with the proper formatted responses from each reuqest (successful or not, account for params returning from GETs). + A generalized format should be followed and we should make sure not to break form that as it could break peoples apps in the future if we add params and remove params from this callback. + Currently for the only implementation this is used for "setExternalUserId:withCOmpletion:" the format is as follows: + + NSDictionary response = @{ + (required) @"push" : { + @"success" : @(true) or @(false) + }, + + (optional) @"email" : { + @"success" : @(true) or @(false) + } + } + + + Building off of this format now will require: + + 1. Including other attributes and whether they are required or not + ex. @"push" is always going to be within the callback resposne (required), meanwhile, + @"email" will not always exist in the callback resposne (optoinal) + + 2. Can't remove params that are required as an app may be expecting them and removing/modifying a key could break there app with an SDK upgrade + + 3. Add more requirements... + + */ +- (void)executeSimultaneousRequests:(NSDictionary *)requests withCompletion:(OSMultipleCompletionBlock)completionBlock; +@end + +#endif diff --git a/ios/platform/OneSignalCore.xcframework/ios-arm64_armv7_armv7s/OneSignalCore.framework/Headers/OneSignalCommonDefines.h b/ios/platform/OneSignalCore.xcframework/ios-arm64_armv7_armv7s/OneSignalCore.framework/Headers/OneSignalCommonDefines.h new file mode 100644 index 0000000..41e8aad --- /dev/null +++ b/ios/platform/OneSignalCore.xcframework/ios-arm64_armv7_armv7s/OneSignalCore.framework/Headers/OneSignalCommonDefines.h @@ -0,0 +1,304 @@ +/** + * 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 OneSignalCommonDefines_h +#define OneSignalCommonDefines_h + +#import + +// Networking +#define OS_API_VERSION @"1" +#define OS_API_ACCEPT_HEADER @"application/vnd.onesignal.v" OS_API_VERSION @"+json" +#define OS_API_SERVER_URL @"https://api.onesignal.com/" +#define OS_IAM_WEBVIEW_BASE_URL @"https://onesignal.com/" + +// OneSignalUserDefault keys +// String values start with "OSUD_" to maintain a level of uniqueness from other libs and app code +// Key names should be identical to the string values to prevent confusion +// Add the suffix "_TO" or "_FROM" to any keys with "to" and "from" logic +// TODO: Refactored variable names, but not strings since UserDefaults might need a migration +// Comments next to the NSUserDefault keys are the planned string value and key names +// "?" in comment line ending comment means uncertainty in naming the string value of the associated key and keeping as is for now +// "*" in comment line ending comment means the string value has not been changed +// App + +#define ONESIGNAL_VERSION @"031203" + +#define OSUD_APP_ID @"GT_APP_ID" // * OSUD_APP_ID +#define OSUD_REGISTERED_WITH_APPLE @"GT_REGISTERED_WITH_APPLE" // * OSUD_REGISTERED_WITH_APPLE +#define OSUD_APP_PROVIDES_NOTIFICATION_SETTINGS @"OS_APP_PROVIDES_NOTIFICATION_SETTINGS" // * OSUD_APP_PROVIDES_NOTIFICATION_SETTINGS +#define OSUD_PROMPT_BEFORE_NOTIFICATION_LAUNCH_URL_OPENS @"PROMPT_BEFORE_OPENING_PUSH_URL" // * OSUD_PROMPT_BEFORE_NOTIFICATION_LAUNCH_URL_OPENS +#define OSUD_PERMISSION_ACCEPTED_TO @"OSUD_PERMISSION_ACCEPTED_TO" // OSUD_PERMISSION_ACCEPTED_TO +#define OSUD_PERMISSION_ACCEPTED_FROM @"ONESIGNAL_PERMISSION_ACCEPTED_LAST" // * OSUD_PERMISSION_ACCEPTED_FROM +#define OSUD_WAS_PROMPTED_FOR_NOTIFICATIONS_TO @"OSUD_WAS_PROMPTED_FOR_NOTIFICATIONS_TO" // OSUD_WAS_PROMPTED_FOR_NOTIFICATIONS_TO +#define OSUD_WAS_PROMPTED_FOR_NOTIFICATIONS_FROM @"OS_HAS_PROMPTED_FOR_NOTIFICATIONS_LAST" // * OSUD_WAS_PROMPTED_FOR_NOTIFICATIONS_FROM +#define OSUD_WAS_NOTIFICATION_PROMPT_ANSWERED_TO @"OS_NOTIFICATION_PROMPT_ANSWERED" // * OSUD_WAS_NOTIFICATION_PROMPT_ANSWERED_TO +#define OSUD_WAS_NOTIFICATION_PROMPT_ANSWERED_FROM @"OS_NOTIFICATION_PROMPT_ANSWERED_LAST" // * OSUD_WAS_NOTIFICATION_PROMPT_ANSWERED_FROM +#define OSUD_PROVISIONAL_PUSH_AUTHORIZATION_TO @"OSUD_PROVISIONAL_PUSH_AUTHORIZATION_TO" // OSUD_PROVISIONAL_PUSH_AUTHORIZATION_TO +#define OSUD_PROVISIONAL_PUSH_AUTHORIZATION_FROM @"ONESIGNAL_PROVISIONAL_AUTHORIZATION_LAST" // * OSUD_PROVISIONAL_PUSH_AUTHORIZATION_FROM +#define OSUD_USES_PROVISIONAL_PUSH_AUTHORIZATION @"ONESIGNAL_USES_PROVISIONAL_PUSH_AUTHORIZATION" // * OSUD_USES_PROVISIONAL_PUSH_AUTHORIZATION +#define OSUD_PERMISSION_EPHEMERAL_TO @"OSUD_PERMISSION_EPHEMERAL_TO" // * OSUD_PERMISSION_EPHEMERAL_TO +#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" +// 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" +#define OSUD_REQUIRES_USER_PRIVACY_CONSENT @"OSUD_REQUIRES_USER_PRIVACY_CONSENT" +// Remote Params - Receive Receipts +#define OSUD_RECEIVE_RECEIPTS_ENABLED @"OS_ENABLE_RECEIVE_RECEIPTS" // * OSUD_RECEIVE_RECEIPTS_ENABLED +// Outcomes +#define OSUD_OUTCOMES_V2 @"OSUD_OUTCOMES_V2" +#define OSUD_NOTIFICATION_LIMIT @"NOTIFICATION_LIMIT" // * OSUD_NOTIFICATION_LIMIT +#define OSUD_IAM_LIMIT @"OSUD_IAM_LIMIT" +#define OSUD_NOTIFICATION_ATTRIBUTION_WINDOW @"NOTIFICATION_ATTRIBUTION_WINDOW" // * OSUD_NOTIFICATION_ATTRIBUTION_WINDOW +#define OSUD_IAM_ATTRIBUTION_WINDOW @"OSUD_IAM_ATTRIBUTION_WINDOW" +#define OSUD_DIRECT_SESSION_ENABLED @"DIRECT_SESSION_ENABLED" // * OSUD_DIRECT_SESSION_ENABLED +#define OSUD_INDIRECT_SESSION_ENABLED @"INDIRECT_SESSION_ENABLED" // * OSUD_INDIRECT_SESSION_ENABLED +#define OSUD_UNATTRIBUTED_SESSION_ENABLED @"UNATTRIBUTED_SESSION_ENABLED" // * OSUD_UNATTRIBUTED_SESSION_ENABLED +#define OSUD_CACHED_NOTIFICATION_INFLUENCE @"CACHED_SESSION" // * OSUD_CACHED_NOTIFICATION_INFLUENCE +#define OSUD_CACHED_IAM_INFLUENCE @"OSUD_CACHED_IAM_INFLUENCE" +#define OSUD_CACHED_DIRECT_NOTIFICATION_ID @"CACHED_DIRECT_NOTIFICATION_ID" // * OSUD_CACHED_DIRECT_NOTIFICATION_ID +#define OSUD_CACHED_INDIRECT_NOTIFICATION_IDS @"CACHED_INDIRECT_NOTIFICATION_IDS" // * OSUD_CACHED_INDIRECT_NOTIFICATION_IDS +#define OSUD_CACHED_RECEIVED_NOTIFICATION_IDS @"CACHED_RECEIVED_NOTIFICATION_IDS" // * OSUD_CACHED_RECEIVED_NOTIFICATION_IDS +#define OSUD_CACHED_RECEIVED_IAM_IDS @"OSUD_CACHED_RECEIVED_IAM_IDS" +#define OSUD_CACHED_UNATTRIBUTED_UNIQUE_OUTCOME_EVENTS_SENT @"CACHED_UNATTRIBUTED_UNIQUE_OUTCOME_EVENTS_SENT" // * OSUD_CACHED_UNATTRIBUTED_UNIQUE_OUTCOME_EVENTS_SENT +#define OSUD_CACHED_ATTRIBUTED_UNIQUE_OUTCOME_EVENT_NOTIFICATION_IDS_SENT @"CACHED_ATTRIBUTED_UNIQUE_OUTCOME_EVENT_NOTIFICATION_IDS_SENT" // * OSUD_CACHED_ATTRIBUTED_UNIQUE_OUTCOME_EVENT_NOTIFICATION_IDS_SENT +// Migration +#define OSUD_CACHED_SDK_VERSION @"OSUD_CACHED_SDK_VERSION" +// Time Tracking +#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:", \ + @"application:handleActionWithIdentifier:forLocalNotification:completionHandler:", \ + @"application:handleActionWithIdentifier:forLocalNotification:withResponseInfo:completionHandler:" ] + +// To avoid undefined symbol compiler errors on older versions of Xcode, +// instead of using UNAuthorizationOptionProvisional directly, we will use +// it indirectly with these macros +#define PROVISIONAL_UNAUTHORIZATIONOPTION (UNAuthorizationOptions)(1 << 6) +#define PROVIDES_SETTINGS_UNAUTHORIZATIONOPTION (UNAuthorizationOptions)(1 << 5) + +// These options are defined in all versions of iOS that we support, so we +// can use them directly. +#define DEFAULT_UNAUTHORIZATIONOPTIONS (UNAuthorizationOptionSound + UNAuthorizationOptionBadge + UNAuthorizationOptionAlert) + +// iOS Parameter Names +#define IOS_FBA @"fba" +#define IOS_USES_PROVISIONAL_AUTHORIZATION @"uses_provisional_auth" +#define IOS_REQUIRES_EMAIL_AUTHENTICATION @"require_email_auth" +#define IOS_REQUIRES_SMS_AUTHENTICATION @"require_sms_auth" +#define IOS_REQUIRES_USER_ID_AUTHENTICATION @"require_user_id_auth" +#define IOS_RECEIVE_RECEIPTS_ENABLE @"receive_receipts_enable" +#define IOS_OUTCOMES_V2_SERVICE_ENABLE @"v2_enabled" +#define IOS_LOCATION_SHARED @"location_shared" +#define IOS_REQUIRES_USER_PRIVACY_CONSENT @"requires_user_privacy_consent" + +// SMS Parameter Names +#define SMS_NUMBER_KEY @"sms_number" +#define SMS_NUMBER_AUTH_HASH_KEY @"sms_auth_hash" + +// Info.plist key +#define FALLBACK_TO_SETTINGS_MESSAGE @"Onesignal_settings_fallback_message" +#define ONESIGNAL_SUPRESS_LAUNCH_URLS @"OneSignal_suppress_launch_urls" + +// GDPR Privacy Consent +#define GDPR_CONSENT_GRANTED @"GDPR_CONSENT_GRANTED" +#define ONESIGNAL_REQUIRE_PRIVACY_CONSENT @"OneSignal_require_privacy_consent" + +// Badge handling +#define ONESIGNAL_DISABLE_BADGE_CLEARING @"OneSignal_disable_badge_clearing" +#define ONESIGNAL_APP_GROUP_NAME_KEY @"OneSignal_app_groups_key" +#define ONESIGNAL_BADGE_KEY @"onesignalBadgeCount" + +// Firebase +#define ONESIGNAL_FB_ENABLE_FIREBASE @"OS_ENABLE_FIREBASE_ANALYTICS" +#define ONESIGNAL_FB_LAST_TIME_RECEIVED @"OS_LAST_RECIEVED_TIME" +#define ONESIGNAL_FB_LAST_GAF_CAMPAIGN_RECEIVED @"OS_LAST_RECIEVED_GAF_CAMPAIGN" +#define ONESIGNAL_FB_LAST_NOTIFICATION_ID_RECEIVED @"OS_LAST_RECIEVED_NOTIFICATION_ID" + +// APNS params +#define ONESIGNAL_IAM_PREVIEW @"os_in_app_message_preview_id" + +#define ONESIGNAL_SUPPORTED_ATTACHMENT_TYPES @[@"aiff", @"wav", @"mp3", @"mp4", @"jpg", @"jpeg", @"png", @"gif", @"mpeg", @"mpg", @"avi", @"m4a", @"m4v"] + +// OneSignal Influence Strings +#define OS_INFLUENCE_TYPE_STRINGS @[@"DIRECT", @"INDIRECT", @"UNATTRIBUTED", @"DISABLED"] +// Convert String to Influence enum and vice versa +#define OS_INFLUENCE_TYPE_TO_STRING(enum) [OS_INFLUENCE_TYPE_STRINGS objectAtIndex:enum] +#define OS_INFLUENCE_TYPE_FROM_STRING(string) [OS_INFLUENCE_TYPE_STRINGS indexOfObject:string] + +// OneSignal Influence Channel +#define OS_INFLUENCE_CHANNEL_STRING @[@"IN_APP_MESSAGE", @"NOTIFICATION"] +// Convert String to Influence Channel enum and vice versa +#define OS_INFLUENCE_CHANNEL_TO_STRING(enum) [OS_INFLUENCE_CHANNEL_STRING objectAtIndex:enum] +#define OS_INFLUENCE_CHANNEL_FROM_STRING(string) [OS_INFLUENCE_CHANNEL_STRING indexOfObject:string] + +// OneSignal Prompt Action Result +typedef enum {PERMISSION_GRANTED, PERMISSION_DENIED, LOCATION_PERMISSIONS_MISSING_INFO_PLIST, ERROR} PromptActionResult; + +// OneSignal App Entry Action Types +typedef enum {NOTIFICATION_CLICK, APP_OPEN, APP_CLOSE} AppEntryAction; + +// OneSignal Focus Event Types +typedef enum {BACKGROUND, END_SESSION} FocusEventType; + +// OneSignal Focus Types +typedef enum {ATTRIBUTED, NOT_ATTRIBUTED} FocusAttributionState; +#define focusAttributionStateString(enum) [@[@"ATTRIBUTED", @"NOT_ATTRIBUTED"] objectAtIndex:enum] + +// OneSignal constants +#define OS_PUSH @"push" +#define OS_EMAIL @"email" +#define OS_SMS @"sms" +#define OS_SUCCESS @"success" + +#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"] +#define httpMethodString(enum) [OS_API_CLIENT_STRINGS objectAtIndex:enum] + +// Notification types +#define NOTIFICATION_TYPE_NONE 0 +#define NOTIFICATION_TYPE_BADGE 1 +#define NOTIFICATION_TYPE_SOUND 2 +#define NOTIFICATION_TYPE_ALERT 4 +#define NOTIFICATION_TYPE_ALL 7 + +#define ERROR_PUSH_CAPABLILITY_DISABLED -13 +#define ERROR_PUSH_DELEGATE_NEVER_FIRED -14 +#define ERROR_PUSH_SIMULATOR_NOT_SUPPORTED -15 +#define ERROR_PUSH_UNKNOWN_APNS_ERROR -16 +#define ERROR_PUSH_OTHER_3000_ERROR_UNUSED_RESERVED -17 +#define ERROR_PUSH_NEVER_PROMPTED -18 +#define ERROR_PUSH_PROMPT_NEVER_ANSWERED -19 + +#define AUTH_STATUS_EPHEMERAL 4 //UNAuthorizationStatusEphemeral + +// 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" + +// Device types +#define DEVICE_TYPE_PUSH 0 +#define DEVICE_TYPE_EMAIL 11 +#define DEVICE_TYPE_SMS 14 + +#define MAX_NSE_LIFETIME_SECOUNDS 30 + +#ifndef OS_TEST + // OneSignal API Client Defines + #define REATTEMPT_DELAY 30.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 + + // the max number of UNNotificationCategory ID's the SDK will register + #define MAX_CATEGORIES_SIZE 128 + + // Defines how long the SDK will wait for a OSPredisplayNotification's complete method to execute + #define CUSTOM_DISPLAY_TYPE_TIMEOUT 25.0 + + // Defines the maximum delay time for confirmed deliveries + #define MAX_CONF_DELIVERY_DELAY 25.0 +#else + // Test defines for API Client + #define REATTEMPT_DELAY 0.004 + #define REQUEST_TIMEOUT_REQUEST 0.02 //for most HTTP requests + #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 + + // Unit testing value for how long the SDK will wait for a + // OSPredisplayNotification's complete method to execute + #define CUSTOM_DISPLAY_TYPE_TIMEOUT 0.05 + + // We don't want to delay confirmed deliveries in unit tests + #define MAX_CONF_DELIVERY_DELAY 0 + +#endif + +// A max timeout for a request, which might include multiple reattempts +#define MAX_TIMEOUT ((REQUEST_TIMEOUT_REQUEST * MAX_ATTEMPT_COUNT) + (REATTEMPT_DELAY * MAX_ATTEMPT_COUNT)) * NSEC_PER_SEC + +// To save battery, NSTimer is not exceedingly accurate so timestamp values may be a bit inaccurate +// To make up for this, we can check to make sure the values are close enough to account for +// variance and floating-point error. +#define OS_ROUGHLY_EQUAL(left, right) (fabs(left - right) < 0.03) + +#define MAX_NOTIFICATION_MEDIA_SIZE_BYTES 50000000 + +#endif /* OneSignalCommonDefines_h */ diff --git a/ios/platform/OneSignalCore.xcframework/ios-arm64_armv7_armv7s/OneSignalCore.framework/Headers/OneSignalCore.h b/ios/platform/OneSignalCore.xcframework/ios-arm64_armv7_armv7s/OneSignalCore.framework/Headers/OneSignalCore.h new file mode 100644 index 0000000..5d7cc7c --- /dev/null +++ b/ios/platform/OneSignalCore.xcframework/ios-arm64_armv7_armv7s/OneSignalCore.framework/Headers/OneSignalCore.h @@ -0,0 +1,50 @@ +/** + * 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. + */ + +#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 + diff --git a/ios/platform/OneSignalCore.xcframework/ios-arm64_armv7_armv7s/OneSignalCore.framework/Headers/OneSignalCoreHelper.h b/ios/platform/OneSignalCore.xcframework/ios-arm64_armv7_armv7s/OneSignalCore.framework/Headers/OneSignalCoreHelper.h new file mode 100644 index 0000000..2a95e9c --- /dev/null +++ b/ios/platform/OneSignalCore.xcframework/ios-arm64_armv7_armv7s/OneSignalCore.framework/Headers/OneSignalCoreHelper.h @@ -0,0 +1,40 @@ +/** + * 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 OneSignalCoreHelper : NSObject +#pragma clang diagnostic ignored "-Wstrict-prototypes" +#pragma clang diagnostic ignored "-Wnullability-completeness" + +// Threading ++ (void)runOnMainThread:(void(^)())block; ++ (void)dispatch_async_on_main_queue:(void(^)())block; ++ (void)performSelector:(SEL)aSelector onMainThreadOnObject:(id)targetObj withObject:(id)anArgument afterDelay:(NSTimeInterval)delay; + ++ (NSString*)hashUsingSha1:(NSString*)string; ++ (NSString*)hashUsingMD5:(NSString*)string; ++ (NSString*)trimURLSpacing:(NSString*)url; +@end diff --git a/ios/platform/OneSignalCore.xcframework/ios-arm64_armv7_armv7s/OneSignalCore.framework/Headers/OneSignalLog.h b/ios/platform/OneSignalCore.xcframework/ios-arm64_armv7_armv7s/OneSignalCore.framework/Headers/OneSignalLog.h new file mode 100644 index 0000000..63bf4e1 --- /dev/null +++ b/ios/platform/OneSignalCore.xcframework/ios-arm64_armv7_armv7s/OneSignalCore.framework/Headers/OneSignalLog.h @@ -0,0 +1,44 @@ +/** + * 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 + +@interface OneSignalLog : NSObject +#pragma mark Logging +typedef NS_ENUM(NSUInteger, ONE_S_LOG_LEVEL) { + ONE_S_LL_NONE, + ONE_S_LL_FATAL, + ONE_S_LL_ERROR, + ONE_S_LL_WARN, + ONE_S_LL_INFO, + ONE_S_LL_DEBUG, + ONE_S_LL_VERBOSE +}; + ++ (void)setLogLevel:(ONE_S_LOG_LEVEL)logLevel; ++ (void)onesignalLog:(ONE_S_LOG_LEVEL)logLevel message:(NSString* _Nonnull)message; + +@end diff --git a/ios/platform/OneSignalCore.xcframework/ios-arm64_armv7_armv7s/OneSignalCore.framework/Headers/OneSignalRequest.h b/ios/platform/OneSignalCore.xcframework/ios-arm64_armv7_armv7s/OneSignalCore.framework/Headers/OneSignalRequest.h new file mode 100644 index 0000000..4e1b1fa --- /dev/null +++ b/ios/platform/OneSignalCore.xcframework/ios-arm64_armv7_armv7s/OneSignalCore.framework/Headers/OneSignalRequest.h @@ -0,0 +1,55 @@ +/** + * 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. + */ +#pragma clang diagnostic ignored "-Wnullability-completeness" +#pragma clang diagnostic ignored "-Wnullability-completeness" + +#import +#import "OneSignalCommonDefines.h" + + +#ifndef OneSignalRequest_h +#define OneSignalRequest_h + +/*Block for generic results on success and errors on failure*/ +typedef void (^OSResultSuccessBlock)(NSDictionary* result); +typedef void (^OSFailureBlock)(NSError* error); + +@interface OneSignalRequest : NSObject + +@property (nonatomic) BOOL disableLocalCaching; +@property (nonatomic) HTTPMethod method; +@property (strong, nonatomic, nonnull) NSString *path; +@property (strong, nonatomic, nullable) NSDictionary *parameters; +@property (strong, nonatomic, nullable) NSDictionary *additionalHeaders; +@property (nonatomic) int reattemptCount; +@property (nonatomic) BOOL dataRequest; //false for JSON based requests +-(BOOL)missingAppId; //for requests that don't require an appId parameter, the subclass should override this method and return false +-(NSMutableURLRequest * _Nonnull )urlRequest; + +@end + +#endif diff --git a/ios/platform/OneSignalCore.xcframework/ios-arm64_armv7_armv7s/OneSignalCore.framework/Headers/OneSignalTrackFirebaseAnalytics.h b/ios/platform/OneSignalCore.xcframework/ios-arm64_armv7_armv7s/OneSignalCore.framework/Headers/OneSignalTrackFirebaseAnalytics.h new file mode 100644 index 0000000..7cc3559 --- /dev/null +++ b/ios/platform/OneSignalCore.xcframework/ios-arm64_armv7_armv7s/OneSignalCore.framework/Headers/OneSignalTrackFirebaseAnalytics.h @@ -0,0 +1,39 @@ +/** + * 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 "OSNotificationClasses.h" + +@interface OneSignalTrackFirebaseAnalytics : NSObject ++(BOOL)libraryExists; ++(void)init; ++(void)updateFromDownloadParams:(NSDictionary*)params; + ++(void)trackOpenEvent:(OSNotificationOpenedResult*)results; ++(void)trackReceivedEvent:(OSNotification*)notification; ++(void)trackInfluenceOpenEvent; +@end diff --git a/ios/platform/OneSignalCore.xcframework/ios-arm64_armv7_armv7s/OneSignalCore.framework/Headers/OneSignalUserDefaults.h b/ios/platform/OneSignalCore.xcframework/ios-arm64_armv7_armv7s/OneSignalCore.framework/Headers/OneSignalUserDefaults.h new file mode 100644 index 0000000..89a03fe --- /dev/null +++ b/ios/platform/OneSignalCore.xcframework/ios-arm64_armv7_armv7s/OneSignalCore.framework/Headers/OneSignalUserDefaults.h @@ -0,0 +1,75 @@ +/** + * 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 + +@interface OneSignalUserDefaults : NSObject + +@property (strong, nonatomic, nullable) NSUserDefaults *userDefaults; + ++ (OneSignalUserDefaults * _Nonnull)initStandard; ++ (OneSignalUserDefaults * _Nonnull)initShared; + ++ (NSString * _Nonnull)appGroupName; + +- (BOOL)keyExists:(NSString * _Nonnull)key; + +- (void)removeValueForKey:(NSString * _Nonnull)key; + +// NSUserDefaults for storing and getting booleans +- (BOOL)getSavedBoolForKey:(NSString * _Nonnull)key defaultValue:(BOOL)value; +- (void)saveBoolForKey:(NSString * _Nonnull)key withValue:(BOOL)value; + +// NSUserDefaults for storing and getting strings +- (NSString * _Nullable)getSavedStringForKey:(NSString * _Nonnull)key defaultValue:(NSString * _Nullable)value; +- (void)saveStringForKey:(NSString * _Nonnull)key withValue:(NSString * _Nullable)value; + +// NSUserDefaults for storing and getting integers +- (NSInteger)getSavedIntegerForKey:(NSString * _Nonnull)key defaultValue:(NSInteger)value; +- (void)saveIntegerForKey:(NSString * _Nonnull)key withValue:(NSInteger)value; + +// NSUserDefaults for storing and getting doubles +- (double)getSavedDoubleForKey:(NSString * _Nonnull)key defaultValue:(double)value; +- (void)saveDoubleForKey:(NSString * _Nonnull)key withValue:(double)value; + +// NSUserDefaults for storing and getting sets +- (NSSet * _Nullable)getSavedSetForKey:(NSString * _Nonnull)key defaultValue:(NSSet * _Nullable)value; +- (void)saveSetForKey:(NSString * _Nonnull)key withValue:(NSSet * _Nullable)value; + +// NSUserDefaults for storing and getting dictionaries +- (NSDictionary * _Nullable)getSavedDictionaryForKey:(NSString * _Nonnull)key defaultValue:(NSDictionary * _Nullable)value; +- (void)saveDictionaryForKey:(NSString * _Nonnull)key withValue:(NSDictionary * _Nullable)value; + +// NSUserDefaults for storing and getting objects +- (id _Nullable)getSavedObjectForKey:(NSString * _Nonnull)key defaultValue:(id _Nullable)value; +- (void)saveObjectForKey:(NSString * _Nonnull)key withValue:(id _Nullable)value; + +// NSUserDefaults for storing and getting saved codeable data (custom objects) +- (id _Nullable)getSavedCodeableDataForKey:(NSString * _Nonnull)key defaultValue:(id _Nullable)value; +- (void)saveCodeableDataForKey:(NSString * _Nonnull)key withValue:(id _Nullable)value; + +@end diff --git a/ios/platform/OneSignalCore.xcframework/ios-arm64_armv7_armv7s/OneSignalCore.framework/Info.plist b/ios/platform/OneSignalCore.xcframework/ios-arm64_armv7_armv7s/OneSignalCore.framework/Info.plist new file mode 100644 index 0000000..81e7857 Binary files /dev/null and b/ios/platform/OneSignalCore.xcframework/ios-arm64_armv7_armv7s/OneSignalCore.framework/Info.plist differ diff --git a/ios/platform/OneSignalCore.xcframework/ios-arm64_armv7_armv7s/OneSignalCore.framework/Modules/module.modulemap b/ios/platform/OneSignalCore.xcframework/ios-arm64_armv7_armv7s/OneSignalCore.framework/Modules/module.modulemap new file mode 100644 index 0000000..dc0cd60 --- /dev/null +++ b/ios/platform/OneSignalCore.xcframework/ios-arm64_armv7_armv7s/OneSignalCore.framework/Modules/module.modulemap @@ -0,0 +1,6 @@ +framework module OneSignalCore { + umbrella header "OneSignalCore.h" + + export * + module * { export * } +} diff --git a/ios/platform/OneSignalCore.xcframework/ios-arm64_armv7_armv7s/OneSignalCore.framework/OneSignalCore b/ios/platform/OneSignalCore.xcframework/ios-arm64_armv7_armv7s/OneSignalCore.framework/OneSignalCore new file mode 100755 index 0000000..187b437 Binary files /dev/null and b/ios/platform/OneSignalCore.xcframework/ios-arm64_armv7_armv7s/OneSignalCore.framework/OneSignalCore differ diff --git a/ios/platform/OneSignalCore.xcframework/ios-arm64_armv7_armv7s/OneSignalCore.framework/_CodeSignature/CodeResources b/ios/platform/OneSignalCore.xcframework/ios-arm64_armv7_armv7s/OneSignalCore.framework/_CodeSignature/CodeResources new file mode 100644 index 0000000..ef7f6cc --- /dev/null +++ b/ios/platform/OneSignalCore.xcframework/ios-arm64_armv7_armv7s/OneSignalCore.framework/_CodeSignature/CodeResources @@ -0,0 +1,372 @@ + + + + + files + + Headers/NSString+OneSignal.h + + /HTg8wbY+rfIy9/kCShHF2Oev6Y= + + Headers/NSURL+OneSignal.h + + RUcvMsE7Pj+BUpa1H4SgBH/O/EQ= + + Headers/OSJSONHandling.h + + 91d8OZhU9KOTu2qY+EdAF+M47+E= + + Headers/OSMacros.h + + 7HmaM9ljZnw77iovX0v/wnb3bX0= + + Headers/OSNotification+Internal.h + + hwttm7oX6fN2cgP1Z4laQAKP49Q= + + Headers/OSNotification.h + + O/8gkRAMw3nV6j7znZxoXDKCi3o= + + Headers/OSNotificationClasses.h + + iNvshoGLl4IEMy2K1Lq2stVxdB4= + + Headers/OSPrivacyConsentController.h + + //dQV0JwOyLrzhcfN4IkI2abbFM= + + Headers/OSRequests.h + + MqtDyOupA+cu7c+vEvwpMBVA1b4= + + Headers/OneSignalClient.h + + TAYBk2YV4sw9wzS85jL0QtcAen0= + + Headers/OneSignalCommonDefines.h + + qElbp/Mc2DA1Nu0dZrNlormMM24= + + Headers/OneSignalCore.h + + T109aNL3gpg8ZtBUTteB6+7IuQ8= + + Headers/OneSignalCoreHelper.h + + xQeNeuYQWybV7qex/9h0H2mvUqI= + + Headers/OneSignalLog.h + + oEEDkA6eBW5XOmDs86IVGRpm28k= + + Headers/OneSignalRequest.h + + /uBkuxddG/dPmbTbANavHELydCw= + + Headers/OneSignalTrackFirebaseAnalytics.h + + oUxC/1Bnj1fAEZ+hPm30tS5H+f0= + + Headers/OneSignalUserDefaults.h + + ZvwZZD2HkwwG1wOkh8jGhnl2lTY= + + Info.plist + + FX5vrG+A078WCMrmRkrznT+b+4s= + + Modules/module.modulemap + + UwBMj9m72xH28UG69kKWlAJjycc= + + + files2 + + Headers/NSString+OneSignal.h + + hash + + /HTg8wbY+rfIy9/kCShHF2Oev6Y= + + hash2 + + qBhBU+sclS17YY3HDiZmbgqnTFtSJWm7tX4ThKcr3cM= + + + Headers/NSURL+OneSignal.h + + hash + + RUcvMsE7Pj+BUpa1H4SgBH/O/EQ= + + hash2 + + DC9WcVr/94eTh7NHtwKhA8C2fPJVJfY0nn9A6fuHGhA= + + + Headers/OSJSONHandling.h + + hash + + 91d8OZhU9KOTu2qY+EdAF+M47+E= + + hash2 + + kwMvLl1JtYBgIUz5NHRrummY0mdnyAPM2lP6HtOGETw= + + + Headers/OSMacros.h + + hash + + 7HmaM9ljZnw77iovX0v/wnb3bX0= + + hash2 + + aKanW/TgpNzztpIpYJVbnxfUUFcNJAolzoX8n0+EwJc= + + + Headers/OSNotification+Internal.h + + hash + + hwttm7oX6fN2cgP1Z4laQAKP49Q= + + hash2 + + bz9UK/DGxP8LAEzMdBiUj0l9UsfhSo11AUAW6X1NfNQ= + + + Headers/OSNotification.h + + hash + + O/8gkRAMw3nV6j7znZxoXDKCi3o= + + hash2 + + JOArzkdx1cCGHN5R6ITF+D2e8x/s5HVzQNEl26Gxdfg= + + + Headers/OSNotificationClasses.h + + hash + + iNvshoGLl4IEMy2K1Lq2stVxdB4= + + hash2 + + TfTvbYwUILlXsIfPJ92tgrhSS23UTibhhKt6j4Q984U= + + + Headers/OSPrivacyConsentController.h + + hash + + //dQV0JwOyLrzhcfN4IkI2abbFM= + + hash2 + + Nl0w50EzXPgal1ghTEM3QIoYLzOYHH195NTzq3Zlvmo= + + + Headers/OSRequests.h + + hash + + MqtDyOupA+cu7c+vEvwpMBVA1b4= + + hash2 + + YdFlpQOMH+9m9N627gcvPVwShSPrBzKvDm3E3FCYHvk= + + + Headers/OneSignalClient.h + + hash + + TAYBk2YV4sw9wzS85jL0QtcAen0= + + hash2 + + cbF3Wa3Lqa0Wb2275ot3ploX1KXQ+znQBiBOu0TzV6M= + + + Headers/OneSignalCommonDefines.h + + hash + + qElbp/Mc2DA1Nu0dZrNlormMM24= + + hash2 + + cdunHi7N1J8gJfTDwI5B4v8EIL2G6WSPjJzrU9SxP6Y= + + + Headers/OneSignalCore.h + + hash + + T109aNL3gpg8ZtBUTteB6+7IuQ8= + + hash2 + + uLAWfHauq9MJASOHxa8O6emo1oXTfJcLShIdOAUxG88= + + + Headers/OneSignalCoreHelper.h + + hash + + xQeNeuYQWybV7qex/9h0H2mvUqI= + + hash2 + + vK6D0j+ZbW5ycXiO3jb9aLvluPdvyYGxCSFl1gkVp14= + + + Headers/OneSignalLog.h + + hash + + oEEDkA6eBW5XOmDs86IVGRpm28k= + + hash2 + + fXXHmsA5in9ZjZz8sHnl3WaN/xiOjw63toiJ0AzJTE4= + + + Headers/OneSignalRequest.h + + hash + + /uBkuxddG/dPmbTbANavHELydCw= + + hash2 + + 69iw4bnJGwQNk11KAchyrRMPCM6Rf4C9Wvn+HMnTCXc= + + + Headers/OneSignalTrackFirebaseAnalytics.h + + hash + + oUxC/1Bnj1fAEZ+hPm30tS5H+f0= + + hash2 + + VCgGIHlXYAQKerOcmqkIesJ+B+oWLXQya/3m1cYjnKc= + + + Headers/OneSignalUserDefaults.h + + hash + + ZvwZZD2HkwwG1wOkh8jGhnl2lTY= + + hash2 + + QIYtzchiCKQguyJOSY6PEhV0H98JRi2PdXSBmZxxLN4= + + + Modules/module.modulemap + + hash + + UwBMj9m72xH28UG69kKWlAJjycc= + + hash2 + + K44cM22FGB3rV1SaGqR0xQQBO01/YgeIVYiCCcvFnOU= + + + + 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/platform/OneSignalCore.xcframework/ios-arm64_i386_x86_64-simulator/OneSignalCore.framework/Headers/NSString+OneSignal.h b/ios/platform/OneSignalCore.xcframework/ios-arm64_i386_x86_64-simulator/OneSignalCore.framework/Headers/NSString+OneSignal.h new file mode 100644 index 0000000..c9ee3aa --- /dev/null +++ b/ios/platform/OneSignalCore.xcframework/ios-arm64_i386_x86_64-simulator/OneSignalCore.framework/Headers/NSString+OneSignal.h @@ -0,0 +1,44 @@ +/** + * 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 + +#ifndef NSString_OneSignal_h +#define NSString_OneSignal_h +@interface NSString (OneSignal) + +- (NSString *_Nonnull)one_getVersionForRange:(NSRange)range; +- (NSString *_Nonnull)one_substringAfter:(NSString *_Nonnull)needle; +- (NSString *_Nonnull)one_getSemanticVersion; +- (NSString *_Nullable)fileExtensionForMimeType; +- (NSString *_Nullable)supportedFileExtension; + +// returns a lower case hex representation of the data ++ (nullable NSString *)hexStringFromData:(nonnull NSData *)data; + +@end +#endif diff --git a/ios/platform/OneSignalCore.xcframework/ios-arm64_i386_x86_64-simulator/OneSignalCore.framework/Headers/NSURL+OneSignal.h b/ios/platform/OneSignalCore.xcframework/ios-arm64_i386_x86_64-simulator/OneSignalCore.framework/Headers/NSURL+OneSignal.h new file mode 100644 index 0000000..84b165a --- /dev/null +++ b/ios/platform/OneSignalCore.xcframework/ios-arm64_i386_x86_64-simulator/OneSignalCore.framework/Headers/NSURL+OneSignal.h @@ -0,0 +1,36 @@ +/** + * 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 + +@interface NSURL (OneSignal) + +- (NSString *)valueFromQueryParameter:(NSString *)parameter; + +- (NSString *)supportedFileExtensionFromQueryItems; + +@end diff --git a/ios/platform/OneSignalCore.xcframework/ios-arm64_i386_x86_64-simulator/OneSignalCore.framework/Headers/OSJSONHandling.h b/ios/platform/OneSignalCore.xcframework/ios-arm64_i386_x86_64-simulator/OneSignalCore.framework/Headers/OSJSONHandling.h new file mode 100644 index 0000000..0a56503 --- /dev/null +++ b/ios/platform/OneSignalCore.xcframework/ios-arm64_i386_x86_64-simulator/OneSignalCore.framework/Headers/OSJSONHandling.h @@ -0,0 +1,40 @@ +/** + * 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 "OSNotification.h" + +@protocol OSJSONDecodable ++ (instancetype _Nullable)instanceWithData:(NSData * _Nonnull)data; + ++ (instancetype _Nullable)instanceWithJson:(NSDictionary * _Nonnull)json; ++ (instancetype _Nullable)instancePreviewFromNotification:(OSNotification * _Nonnull)notification; +@end + +@protocol OSJSONEncodable +- (NSDictionary * _Nonnull)jsonRepresentation; +@end diff --git a/ios/platform/OneSignalCore.xcframework/ios-arm64_i386_x86_64-simulator/OneSignalCore.framework/Headers/OSMacros.h b/ios/platform/OneSignalCore.xcframework/ios-arm64_i386_x86_64-simulator/OneSignalCore.framework/Headers/OSMacros.h new file mode 100644 index 0000000..07d650a --- /dev/null +++ b/ios/platform/OneSignalCore.xcframework/ios-arm64_i386_x86_64-simulator/OneSignalCore.framework/Headers/OSMacros.h @@ -0,0 +1,42 @@ +/** +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. +*/ + +#define mustOverride() @throw [NSException exceptionWithName:NSInvalidArgumentException reason:[NSString stringWithFormat:@"%s must be overridden in a subclass/category", __PRETTY_FUNCTION__] userInfo:nil] +#define methodNotImplemented() mustOverride() +// Defines let and var in Objective-c for shorter code +// __auto_type is compatible with Xcode 8+ +#if defined(__cplusplus) +#define let auto const +#else +#define let const __auto_type +#endif + +#if defined(__cplusplus) +#define var auto +#else +#define var __auto_type +#endif diff --git a/ios/platform/OneSignalCore.xcframework/ios-arm64_i386_x86_64-simulator/OneSignalCore.framework/Headers/OSNotification+Internal.h b/ios/platform/OneSignalCore.xcframework/ios-arm64_i386_x86_64-simulator/OneSignalCore.framework/Headers/OSNotification+Internal.h new file mode 100644 index 0000000..cdc43ea --- /dev/null +++ b/ios/platform/OneSignalCore.xcframework/ios-arm64_i386_x86_64-simulator/OneSignalCore.framework/Headers/OSNotification+Internal.h @@ -0,0 +1,40 @@ +/** + * 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 "OSNotificationClasses.h" + +#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/platform/OneSignalCore.xcframework/ios-arm64_i386_x86_64-simulator/OneSignalCore.framework/Headers/OSNotification.h b/ios/platform/OneSignalCore.xcframework/ios-arm64_i386_x86_64-simulator/OneSignalCore.framework/Headers/OSNotification.h new file mode 100644 index 0000000..d92422a --- /dev/null +++ b/ios/platform/OneSignalCore.xcframework/ios-arm64_i386_x86_64-simulator/OneSignalCore.framework/Headers/OSNotification.h @@ -0,0 +1,112 @@ +/** + * 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. + */ +/* OneSignal OSNotification */ +@interface OSNotification : NSObject + +/* Unique Message Identifier */ +@property(readonly, nullable)NSString* notificationId; + +/* Unique Template Identifier */ +@property(readonly, nullable)NSString* templateId; + +/* Name of Template */ +@property(readonly, nullable)NSString* templateName; + +/* True when the key content-available is set to 1 in the apns payload. + content-available is used to wake your app when the payload is received. + See Apple's documenation for more details. + https://developer.apple.com/documentation/uikit/uiapplicationdelegate/1623013-application +*/ +@property(readonly)BOOL contentAvailable; + +/* True when the key mutable-content is set to 1 in the apns payload. + mutable-content is used to wake your Notification Service Extension to modify a notification. + See Apple's documenation for more details. + https://developer.apple.com/documentation/usernotifications/unnotificationserviceextension + */ +@property(readonly, getter=hasMutableContent)BOOL mutableContent; + +/* + Notification category key previously registered to display with. + This overrides OneSignal's actionButtons. + See Apple's documenation for more details. + https://developer.apple.com/library/content/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/SupportingNotificationsinYourApp.html#//apple_ref/doc/uid/TP40008194-CH4-SW26 +*/ +@property(readonly, nullable)NSString* category; + +/* The badge assigned to the application icon */ +@property(readonly)NSInteger badge; +@property(readonly)NSInteger badgeIncrement; + +/* The sound parameter passed to the notification + By default set to UILocalNotificationDefaultSoundName */ +@property(readonly, nullable)NSString* sound; + +/* Main push content */ +@property(readonly, nullable)NSString* title; +@property(readonly, nullable)NSString* subtitle; +@property(readonly, nullable)NSString* body; + +/* Web address to launch within the app via a WKWebView */ +@property(readonly, nullable)NSString* launchURL; + +/* Additional key value properties set within the payload */ +@property(readonly, nullable)NSDictionary* additionalData; + +/* iOS 10+ : Attachments sent as part of the rich notification */ +@property(readonly, nullable)NSDictionary* attachments; + +/* Action buttons passed */ +@property(readonly, nullable)NSArray *actionButtons; + +/* Holds the original payload received + Keep the raw value for users that would like to root the push */ +@property(readonly, nonnull)NSDictionary *rawPayload; + +/* iOS 10+ : Groups notifications into threads */ +@property(readonly, nullable)NSString *threadId; + +/* iOS 15+ : Relevance Score for notification summary */ +@property(readonly, nullable)NSNumber *relevanceScore; + +/* iOS 15+ : Interruption Level */ +@property(readonly, nullable)NSString *interruptionLevel; + +@property(readonly, nullable)NSString *collapseId; + +/* Parses an APNS push payload into a OSNotification object. + Useful to call from your NotificationServiceExtension when the + didReceiveNotificationRequest:withContentHandler: method fires. */ ++ (instancetype _Nullable)parseWithApns:(nonnull NSDictionary*)message; + +/* Convert object into a custom Dictionary / JSON Object */ +- (NSDictionary* _Nonnull)jsonRepresentation; + +/* Convert object into an NSString that can be convertible into a custom Dictionary / JSON Object */ +- (NSString* _Nonnull)stringify; + +@end diff --git a/ios/platform/OneSignalCore.xcframework/ios-arm64_i386_x86_64-simulator/OneSignalCore.framework/Headers/OSNotificationClasses.h b/ios/platform/OneSignalCore.xcframework/ios-arm64_i386_x86_64-simulator/OneSignalCore.framework/Headers/OSNotificationClasses.h new file mode 100644 index 0000000..2d8fed2 --- /dev/null +++ b/ios/platform/OneSignalCore.xcframework/ios-arm64_i386_x86_64-simulator/OneSignalCore.framework/Headers/OSNotificationClasses.h @@ -0,0 +1,60 @@ +/** + * 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 "OSNotification.h" + +// Pass in nil means a notification will not display +typedef void (^OSNotificationDisplayResponse)(OSNotification* _Nullable notification); + +/* The action type associated to an OSNotificationAction object */ +typedef NS_ENUM(NSUInteger, OSNotificationActionType) { + OSNotificationActionTypeOpened, + OSNotificationActionTypeActionTaken +}; + +@interface OSNotificationAction : NSObject + +/* The type of the notification action */ +@property(readonly)OSNotificationActionType type; + +/* The ID associated with the button tapped. NULL when the actionType is NotificationTapped */ +@property(readonly, nullable)NSString* actionId; + +@end + +@interface OSNotificationOpenedResult : NSObject + +@property(readonly, nonnull)OSNotification* notification; +@property(readonly, nonnull)OSNotificationAction *action; + +/* Convert object into an NSString that can be convertible into a custom Dictionary / JSON Object */ +- (NSString* _Nonnull)stringify; + +// Convert the class into a NSDictionary +- (NSDictionary *_Nonnull)jsonRepresentation; + +@end diff --git a/ios/platform/OneSignalCore.xcframework/ios-arm64_i386_x86_64-simulator/OneSignalCore.framework/Headers/OSPrivacyConsentController.h b/ios/platform/OneSignalCore.xcframework/ios-arm64_i386_x86_64-simulator/OneSignalCore.framework/Headers/OSPrivacyConsentController.h new file mode 100644 index 0000000..37c4f09 --- /dev/null +++ b/ios/platform/OneSignalCore.xcframework/ios-arm64_i386_x86_64-simulator/OneSignalCore.framework/Headers/OSPrivacyConsentController.h @@ -0,0 +1,33 @@ +/** +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 OSPrivacyConsentController : NSObject ++ (BOOL)requiresUserPrivacyConsent; ++ (void)consentGranted:(BOOL)granted; ++ (BOOL)shouldLogMissingPrivacyConsentErrorWithMethodName:(NSString *)methodName; +@end diff --git a/ios/platform/OneSignalCore.xcframework/ios-arm64_i386_x86_64-simulator/OneSignalCore.framework/Headers/OSRequests.h b/ios/platform/OneSignalCore.xcframework/ios-arm64_i386_x86_64-simulator/OneSignalCore.framework/Headers/OSRequests.h new file mode 100644 index 0000000..43bf034 --- /dev/null +++ b/ios/platform/OneSignalCore.xcframework/ios-arm64_i386_x86_64-simulator/OneSignalCore.framework/Headers/OSRequests.h @@ -0,0 +1,156 @@ +/** + * 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 "OneSignalRequest.h" + +#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 + +@interface OSRequestPostNotification : OneSignalRequest ++ (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 + appId:(NSString * _Nonnull)appId + activityId:(NSString * _Nonnull)activityId + token:(NSString * _Nonnull)token; +@end + +@interface OSRequestLiveActivityExit: OneSignalRequest ++ (instancetype _Nonnull)withUserId:(NSString * _Nonnull)userId + appId:(NSString * _Nonnull)appId + activityId:(NSString * _Nonnull)activityId; +@end +#endif /* Requests_h */ + diff --git a/ios/platform/OneSignalCore.xcframework/ios-arm64_i386_x86_64-simulator/OneSignalCore.framework/Headers/OneSignalClient.h b/ios/platform/OneSignalCore.xcframework/ios-arm64_i386_x86_64-simulator/OneSignalCore.framework/Headers/OneSignalClient.h new file mode 100644 index 0000000..432a9ab --- /dev/null +++ b/ios/platform/OneSignalCore.xcframework/ios-arm64_i386_x86_64-simulator/OneSignalCore.framework/Headers/OneSignalClient.h @@ -0,0 +1,82 @@ +/** + * 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 "OneSignalRequest.h" + +#ifndef OneSignalClient_h +#define OneSignalClient_h + +typedef void (^OSDataRequestSuccessBlock)(NSData *data); + +typedef void (^OSMultipleCompletionBlock)(NSDictionary *responses); +typedef void (^OSMultipleFailureBlock)(NSDictionary *errors); +typedef void (^OSMultipleSuccessBlock)(NSDictionary *results); + +@interface OneSignalClient : NSObject ++ (OneSignalClient *)sharedClient; +- (void)executeRequest:(OneSignalRequest *)request onSuccess:(OSResultSuccessBlock)successBlock onFailure:(OSFailureBlock)failureBlock; +- (void)executeSynchronousRequest:(OneSignalRequest *)request onSuccess:(OSResultSuccessBlock)successBlock onFailure:(OSFailureBlock)failureBlock; + +// ie. for loading HTML or other non-JSON based requests +- (void)executeDataRequest:(OneSignalRequest *)request onSuccess:(OSDataRequestSuccessBlock)successBlock onFailure:(OSFailureBlock)failureBlock; + +// Executes multiple OneSignalRequest's simultaneously, needs a unique identifier for each request +- (void)executeSimultaneousRequests:(NSDictionary *)requests withSuccess:(OSMultipleSuccessBlock)successBlock onFailure:(OSMultipleFailureBlock)failureBlock; + +/* + TODO: We want to eventually migrate over to using this method for executing simultaneous requests: + This allows us to combine multiple async concurrent requests to return from a single callback with the proper formatted responses from each reuqest (successful or not, account for params returning from GETs). + A generalized format should be followed and we should make sure not to break form that as it could break peoples apps in the future if we add params and remove params from this callback. + Currently for the only implementation this is used for "setExternalUserId:withCOmpletion:" the format is as follows: + + NSDictionary response = @{ + (required) @"push" : { + @"success" : @(true) or @(false) + }, + + (optional) @"email" : { + @"success" : @(true) or @(false) + } + } + + + Building off of this format now will require: + + 1. Including other attributes and whether they are required or not + ex. @"push" is always going to be within the callback resposne (required), meanwhile, + @"email" will not always exist in the callback resposne (optoinal) + + 2. Can't remove params that are required as an app may be expecting them and removing/modifying a key could break there app with an SDK upgrade + + 3. Add more requirements... + + */ +- (void)executeSimultaneousRequests:(NSDictionary *)requests withCompletion:(OSMultipleCompletionBlock)completionBlock; +@end + +#endif diff --git a/ios/platform/OneSignalCore.xcframework/ios-arm64_i386_x86_64-simulator/OneSignalCore.framework/Headers/OneSignalCommonDefines.h b/ios/platform/OneSignalCore.xcframework/ios-arm64_i386_x86_64-simulator/OneSignalCore.framework/Headers/OneSignalCommonDefines.h new file mode 100644 index 0000000..41e8aad --- /dev/null +++ b/ios/platform/OneSignalCore.xcframework/ios-arm64_i386_x86_64-simulator/OneSignalCore.framework/Headers/OneSignalCommonDefines.h @@ -0,0 +1,304 @@ +/** + * 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 OneSignalCommonDefines_h +#define OneSignalCommonDefines_h + +#import + +// Networking +#define OS_API_VERSION @"1" +#define OS_API_ACCEPT_HEADER @"application/vnd.onesignal.v" OS_API_VERSION @"+json" +#define OS_API_SERVER_URL @"https://api.onesignal.com/" +#define OS_IAM_WEBVIEW_BASE_URL @"https://onesignal.com/" + +// OneSignalUserDefault keys +// String values start with "OSUD_" to maintain a level of uniqueness from other libs and app code +// Key names should be identical to the string values to prevent confusion +// Add the suffix "_TO" or "_FROM" to any keys with "to" and "from" logic +// TODO: Refactored variable names, but not strings since UserDefaults might need a migration +// Comments next to the NSUserDefault keys are the planned string value and key names +// "?" in comment line ending comment means uncertainty in naming the string value of the associated key and keeping as is for now +// "*" in comment line ending comment means the string value has not been changed +// App + +#define ONESIGNAL_VERSION @"031203" + +#define OSUD_APP_ID @"GT_APP_ID" // * OSUD_APP_ID +#define OSUD_REGISTERED_WITH_APPLE @"GT_REGISTERED_WITH_APPLE" // * OSUD_REGISTERED_WITH_APPLE +#define OSUD_APP_PROVIDES_NOTIFICATION_SETTINGS @"OS_APP_PROVIDES_NOTIFICATION_SETTINGS" // * OSUD_APP_PROVIDES_NOTIFICATION_SETTINGS +#define OSUD_PROMPT_BEFORE_NOTIFICATION_LAUNCH_URL_OPENS @"PROMPT_BEFORE_OPENING_PUSH_URL" // * OSUD_PROMPT_BEFORE_NOTIFICATION_LAUNCH_URL_OPENS +#define OSUD_PERMISSION_ACCEPTED_TO @"OSUD_PERMISSION_ACCEPTED_TO" // OSUD_PERMISSION_ACCEPTED_TO +#define OSUD_PERMISSION_ACCEPTED_FROM @"ONESIGNAL_PERMISSION_ACCEPTED_LAST" // * OSUD_PERMISSION_ACCEPTED_FROM +#define OSUD_WAS_PROMPTED_FOR_NOTIFICATIONS_TO @"OSUD_WAS_PROMPTED_FOR_NOTIFICATIONS_TO" // OSUD_WAS_PROMPTED_FOR_NOTIFICATIONS_TO +#define OSUD_WAS_PROMPTED_FOR_NOTIFICATIONS_FROM @"OS_HAS_PROMPTED_FOR_NOTIFICATIONS_LAST" // * OSUD_WAS_PROMPTED_FOR_NOTIFICATIONS_FROM +#define OSUD_WAS_NOTIFICATION_PROMPT_ANSWERED_TO @"OS_NOTIFICATION_PROMPT_ANSWERED" // * OSUD_WAS_NOTIFICATION_PROMPT_ANSWERED_TO +#define OSUD_WAS_NOTIFICATION_PROMPT_ANSWERED_FROM @"OS_NOTIFICATION_PROMPT_ANSWERED_LAST" // * OSUD_WAS_NOTIFICATION_PROMPT_ANSWERED_FROM +#define OSUD_PROVISIONAL_PUSH_AUTHORIZATION_TO @"OSUD_PROVISIONAL_PUSH_AUTHORIZATION_TO" // OSUD_PROVISIONAL_PUSH_AUTHORIZATION_TO +#define OSUD_PROVISIONAL_PUSH_AUTHORIZATION_FROM @"ONESIGNAL_PROVISIONAL_AUTHORIZATION_LAST" // * OSUD_PROVISIONAL_PUSH_AUTHORIZATION_FROM +#define OSUD_USES_PROVISIONAL_PUSH_AUTHORIZATION @"ONESIGNAL_USES_PROVISIONAL_PUSH_AUTHORIZATION" // * OSUD_USES_PROVISIONAL_PUSH_AUTHORIZATION +#define OSUD_PERMISSION_EPHEMERAL_TO @"OSUD_PERMISSION_EPHEMERAL_TO" // * OSUD_PERMISSION_EPHEMERAL_TO +#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" +// 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" +#define OSUD_REQUIRES_USER_PRIVACY_CONSENT @"OSUD_REQUIRES_USER_PRIVACY_CONSENT" +// Remote Params - Receive Receipts +#define OSUD_RECEIVE_RECEIPTS_ENABLED @"OS_ENABLE_RECEIVE_RECEIPTS" // * OSUD_RECEIVE_RECEIPTS_ENABLED +// Outcomes +#define OSUD_OUTCOMES_V2 @"OSUD_OUTCOMES_V2" +#define OSUD_NOTIFICATION_LIMIT @"NOTIFICATION_LIMIT" // * OSUD_NOTIFICATION_LIMIT +#define OSUD_IAM_LIMIT @"OSUD_IAM_LIMIT" +#define OSUD_NOTIFICATION_ATTRIBUTION_WINDOW @"NOTIFICATION_ATTRIBUTION_WINDOW" // * OSUD_NOTIFICATION_ATTRIBUTION_WINDOW +#define OSUD_IAM_ATTRIBUTION_WINDOW @"OSUD_IAM_ATTRIBUTION_WINDOW" +#define OSUD_DIRECT_SESSION_ENABLED @"DIRECT_SESSION_ENABLED" // * OSUD_DIRECT_SESSION_ENABLED +#define OSUD_INDIRECT_SESSION_ENABLED @"INDIRECT_SESSION_ENABLED" // * OSUD_INDIRECT_SESSION_ENABLED +#define OSUD_UNATTRIBUTED_SESSION_ENABLED @"UNATTRIBUTED_SESSION_ENABLED" // * OSUD_UNATTRIBUTED_SESSION_ENABLED +#define OSUD_CACHED_NOTIFICATION_INFLUENCE @"CACHED_SESSION" // * OSUD_CACHED_NOTIFICATION_INFLUENCE +#define OSUD_CACHED_IAM_INFLUENCE @"OSUD_CACHED_IAM_INFLUENCE" +#define OSUD_CACHED_DIRECT_NOTIFICATION_ID @"CACHED_DIRECT_NOTIFICATION_ID" // * OSUD_CACHED_DIRECT_NOTIFICATION_ID +#define OSUD_CACHED_INDIRECT_NOTIFICATION_IDS @"CACHED_INDIRECT_NOTIFICATION_IDS" // * OSUD_CACHED_INDIRECT_NOTIFICATION_IDS +#define OSUD_CACHED_RECEIVED_NOTIFICATION_IDS @"CACHED_RECEIVED_NOTIFICATION_IDS" // * OSUD_CACHED_RECEIVED_NOTIFICATION_IDS +#define OSUD_CACHED_RECEIVED_IAM_IDS @"OSUD_CACHED_RECEIVED_IAM_IDS" +#define OSUD_CACHED_UNATTRIBUTED_UNIQUE_OUTCOME_EVENTS_SENT @"CACHED_UNATTRIBUTED_UNIQUE_OUTCOME_EVENTS_SENT" // * OSUD_CACHED_UNATTRIBUTED_UNIQUE_OUTCOME_EVENTS_SENT +#define OSUD_CACHED_ATTRIBUTED_UNIQUE_OUTCOME_EVENT_NOTIFICATION_IDS_SENT @"CACHED_ATTRIBUTED_UNIQUE_OUTCOME_EVENT_NOTIFICATION_IDS_SENT" // * OSUD_CACHED_ATTRIBUTED_UNIQUE_OUTCOME_EVENT_NOTIFICATION_IDS_SENT +// Migration +#define OSUD_CACHED_SDK_VERSION @"OSUD_CACHED_SDK_VERSION" +// Time Tracking +#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:", \ + @"application:handleActionWithIdentifier:forLocalNotification:completionHandler:", \ + @"application:handleActionWithIdentifier:forLocalNotification:withResponseInfo:completionHandler:" ] + +// To avoid undefined symbol compiler errors on older versions of Xcode, +// instead of using UNAuthorizationOptionProvisional directly, we will use +// it indirectly with these macros +#define PROVISIONAL_UNAUTHORIZATIONOPTION (UNAuthorizationOptions)(1 << 6) +#define PROVIDES_SETTINGS_UNAUTHORIZATIONOPTION (UNAuthorizationOptions)(1 << 5) + +// These options are defined in all versions of iOS that we support, so we +// can use them directly. +#define DEFAULT_UNAUTHORIZATIONOPTIONS (UNAuthorizationOptionSound + UNAuthorizationOptionBadge + UNAuthorizationOptionAlert) + +// iOS Parameter Names +#define IOS_FBA @"fba" +#define IOS_USES_PROVISIONAL_AUTHORIZATION @"uses_provisional_auth" +#define IOS_REQUIRES_EMAIL_AUTHENTICATION @"require_email_auth" +#define IOS_REQUIRES_SMS_AUTHENTICATION @"require_sms_auth" +#define IOS_REQUIRES_USER_ID_AUTHENTICATION @"require_user_id_auth" +#define IOS_RECEIVE_RECEIPTS_ENABLE @"receive_receipts_enable" +#define IOS_OUTCOMES_V2_SERVICE_ENABLE @"v2_enabled" +#define IOS_LOCATION_SHARED @"location_shared" +#define IOS_REQUIRES_USER_PRIVACY_CONSENT @"requires_user_privacy_consent" + +// SMS Parameter Names +#define SMS_NUMBER_KEY @"sms_number" +#define SMS_NUMBER_AUTH_HASH_KEY @"sms_auth_hash" + +// Info.plist key +#define FALLBACK_TO_SETTINGS_MESSAGE @"Onesignal_settings_fallback_message" +#define ONESIGNAL_SUPRESS_LAUNCH_URLS @"OneSignal_suppress_launch_urls" + +// GDPR Privacy Consent +#define GDPR_CONSENT_GRANTED @"GDPR_CONSENT_GRANTED" +#define ONESIGNAL_REQUIRE_PRIVACY_CONSENT @"OneSignal_require_privacy_consent" + +// Badge handling +#define ONESIGNAL_DISABLE_BADGE_CLEARING @"OneSignal_disable_badge_clearing" +#define ONESIGNAL_APP_GROUP_NAME_KEY @"OneSignal_app_groups_key" +#define ONESIGNAL_BADGE_KEY @"onesignalBadgeCount" + +// Firebase +#define ONESIGNAL_FB_ENABLE_FIREBASE @"OS_ENABLE_FIREBASE_ANALYTICS" +#define ONESIGNAL_FB_LAST_TIME_RECEIVED @"OS_LAST_RECIEVED_TIME" +#define ONESIGNAL_FB_LAST_GAF_CAMPAIGN_RECEIVED @"OS_LAST_RECIEVED_GAF_CAMPAIGN" +#define ONESIGNAL_FB_LAST_NOTIFICATION_ID_RECEIVED @"OS_LAST_RECIEVED_NOTIFICATION_ID" + +// APNS params +#define ONESIGNAL_IAM_PREVIEW @"os_in_app_message_preview_id" + +#define ONESIGNAL_SUPPORTED_ATTACHMENT_TYPES @[@"aiff", @"wav", @"mp3", @"mp4", @"jpg", @"jpeg", @"png", @"gif", @"mpeg", @"mpg", @"avi", @"m4a", @"m4v"] + +// OneSignal Influence Strings +#define OS_INFLUENCE_TYPE_STRINGS @[@"DIRECT", @"INDIRECT", @"UNATTRIBUTED", @"DISABLED"] +// Convert String to Influence enum and vice versa +#define OS_INFLUENCE_TYPE_TO_STRING(enum) [OS_INFLUENCE_TYPE_STRINGS objectAtIndex:enum] +#define OS_INFLUENCE_TYPE_FROM_STRING(string) [OS_INFLUENCE_TYPE_STRINGS indexOfObject:string] + +// OneSignal Influence Channel +#define OS_INFLUENCE_CHANNEL_STRING @[@"IN_APP_MESSAGE", @"NOTIFICATION"] +// Convert String to Influence Channel enum and vice versa +#define OS_INFLUENCE_CHANNEL_TO_STRING(enum) [OS_INFLUENCE_CHANNEL_STRING objectAtIndex:enum] +#define OS_INFLUENCE_CHANNEL_FROM_STRING(string) [OS_INFLUENCE_CHANNEL_STRING indexOfObject:string] + +// OneSignal Prompt Action Result +typedef enum {PERMISSION_GRANTED, PERMISSION_DENIED, LOCATION_PERMISSIONS_MISSING_INFO_PLIST, ERROR} PromptActionResult; + +// OneSignal App Entry Action Types +typedef enum {NOTIFICATION_CLICK, APP_OPEN, APP_CLOSE} AppEntryAction; + +// OneSignal Focus Event Types +typedef enum {BACKGROUND, END_SESSION} FocusEventType; + +// OneSignal Focus Types +typedef enum {ATTRIBUTED, NOT_ATTRIBUTED} FocusAttributionState; +#define focusAttributionStateString(enum) [@[@"ATTRIBUTED", @"NOT_ATTRIBUTED"] objectAtIndex:enum] + +// OneSignal constants +#define OS_PUSH @"push" +#define OS_EMAIL @"email" +#define OS_SMS @"sms" +#define OS_SUCCESS @"success" + +#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"] +#define httpMethodString(enum) [OS_API_CLIENT_STRINGS objectAtIndex:enum] + +// Notification types +#define NOTIFICATION_TYPE_NONE 0 +#define NOTIFICATION_TYPE_BADGE 1 +#define NOTIFICATION_TYPE_SOUND 2 +#define NOTIFICATION_TYPE_ALERT 4 +#define NOTIFICATION_TYPE_ALL 7 + +#define ERROR_PUSH_CAPABLILITY_DISABLED -13 +#define ERROR_PUSH_DELEGATE_NEVER_FIRED -14 +#define ERROR_PUSH_SIMULATOR_NOT_SUPPORTED -15 +#define ERROR_PUSH_UNKNOWN_APNS_ERROR -16 +#define ERROR_PUSH_OTHER_3000_ERROR_UNUSED_RESERVED -17 +#define ERROR_PUSH_NEVER_PROMPTED -18 +#define ERROR_PUSH_PROMPT_NEVER_ANSWERED -19 + +#define AUTH_STATUS_EPHEMERAL 4 //UNAuthorizationStatusEphemeral + +// 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" + +// Device types +#define DEVICE_TYPE_PUSH 0 +#define DEVICE_TYPE_EMAIL 11 +#define DEVICE_TYPE_SMS 14 + +#define MAX_NSE_LIFETIME_SECOUNDS 30 + +#ifndef OS_TEST + // OneSignal API Client Defines + #define REATTEMPT_DELAY 30.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 + + // the max number of UNNotificationCategory ID's the SDK will register + #define MAX_CATEGORIES_SIZE 128 + + // Defines how long the SDK will wait for a OSPredisplayNotification's complete method to execute + #define CUSTOM_DISPLAY_TYPE_TIMEOUT 25.0 + + // Defines the maximum delay time for confirmed deliveries + #define MAX_CONF_DELIVERY_DELAY 25.0 +#else + // Test defines for API Client + #define REATTEMPT_DELAY 0.004 + #define REQUEST_TIMEOUT_REQUEST 0.02 //for most HTTP requests + #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 + + // Unit testing value for how long the SDK will wait for a + // OSPredisplayNotification's complete method to execute + #define CUSTOM_DISPLAY_TYPE_TIMEOUT 0.05 + + // We don't want to delay confirmed deliveries in unit tests + #define MAX_CONF_DELIVERY_DELAY 0 + +#endif + +// A max timeout for a request, which might include multiple reattempts +#define MAX_TIMEOUT ((REQUEST_TIMEOUT_REQUEST * MAX_ATTEMPT_COUNT) + (REATTEMPT_DELAY * MAX_ATTEMPT_COUNT)) * NSEC_PER_SEC + +// To save battery, NSTimer is not exceedingly accurate so timestamp values may be a bit inaccurate +// To make up for this, we can check to make sure the values are close enough to account for +// variance and floating-point error. +#define OS_ROUGHLY_EQUAL(left, right) (fabs(left - right) < 0.03) + +#define MAX_NOTIFICATION_MEDIA_SIZE_BYTES 50000000 + +#endif /* OneSignalCommonDefines_h */ diff --git a/ios/platform/OneSignalCore.xcframework/ios-arm64_i386_x86_64-simulator/OneSignalCore.framework/Headers/OneSignalCore.h b/ios/platform/OneSignalCore.xcframework/ios-arm64_i386_x86_64-simulator/OneSignalCore.framework/Headers/OneSignalCore.h new file mode 100644 index 0000000..5d7cc7c --- /dev/null +++ b/ios/platform/OneSignalCore.xcframework/ios-arm64_i386_x86_64-simulator/OneSignalCore.framework/Headers/OneSignalCore.h @@ -0,0 +1,50 @@ +/** + * 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. + */ + +#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 + diff --git a/ios/platform/OneSignalCore.xcframework/ios-arm64_i386_x86_64-simulator/OneSignalCore.framework/Headers/OneSignalCoreHelper.h b/ios/platform/OneSignalCore.xcframework/ios-arm64_i386_x86_64-simulator/OneSignalCore.framework/Headers/OneSignalCoreHelper.h new file mode 100644 index 0000000..2a95e9c --- /dev/null +++ b/ios/platform/OneSignalCore.xcframework/ios-arm64_i386_x86_64-simulator/OneSignalCore.framework/Headers/OneSignalCoreHelper.h @@ -0,0 +1,40 @@ +/** + * 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 OneSignalCoreHelper : NSObject +#pragma clang diagnostic ignored "-Wstrict-prototypes" +#pragma clang diagnostic ignored "-Wnullability-completeness" + +// Threading ++ (void)runOnMainThread:(void(^)())block; ++ (void)dispatch_async_on_main_queue:(void(^)())block; ++ (void)performSelector:(SEL)aSelector onMainThreadOnObject:(id)targetObj withObject:(id)anArgument afterDelay:(NSTimeInterval)delay; + ++ (NSString*)hashUsingSha1:(NSString*)string; ++ (NSString*)hashUsingMD5:(NSString*)string; ++ (NSString*)trimURLSpacing:(NSString*)url; +@end diff --git a/ios/platform/OneSignalCore.xcframework/ios-arm64_i386_x86_64-simulator/OneSignalCore.framework/Headers/OneSignalLog.h b/ios/platform/OneSignalCore.xcframework/ios-arm64_i386_x86_64-simulator/OneSignalCore.framework/Headers/OneSignalLog.h new file mode 100644 index 0000000..63bf4e1 --- /dev/null +++ b/ios/platform/OneSignalCore.xcframework/ios-arm64_i386_x86_64-simulator/OneSignalCore.framework/Headers/OneSignalLog.h @@ -0,0 +1,44 @@ +/** + * 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 + +@interface OneSignalLog : NSObject +#pragma mark Logging +typedef NS_ENUM(NSUInteger, ONE_S_LOG_LEVEL) { + ONE_S_LL_NONE, + ONE_S_LL_FATAL, + ONE_S_LL_ERROR, + ONE_S_LL_WARN, + ONE_S_LL_INFO, + ONE_S_LL_DEBUG, + ONE_S_LL_VERBOSE +}; + ++ (void)setLogLevel:(ONE_S_LOG_LEVEL)logLevel; ++ (void)onesignalLog:(ONE_S_LOG_LEVEL)logLevel message:(NSString* _Nonnull)message; + +@end diff --git a/ios/platform/OneSignalCore.xcframework/ios-arm64_i386_x86_64-simulator/OneSignalCore.framework/Headers/OneSignalRequest.h b/ios/platform/OneSignalCore.xcframework/ios-arm64_i386_x86_64-simulator/OneSignalCore.framework/Headers/OneSignalRequest.h new file mode 100644 index 0000000..4e1b1fa --- /dev/null +++ b/ios/platform/OneSignalCore.xcframework/ios-arm64_i386_x86_64-simulator/OneSignalCore.framework/Headers/OneSignalRequest.h @@ -0,0 +1,55 @@ +/** + * 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. + */ +#pragma clang diagnostic ignored "-Wnullability-completeness" +#pragma clang diagnostic ignored "-Wnullability-completeness" + +#import +#import "OneSignalCommonDefines.h" + + +#ifndef OneSignalRequest_h +#define OneSignalRequest_h + +/*Block for generic results on success and errors on failure*/ +typedef void (^OSResultSuccessBlock)(NSDictionary* result); +typedef void (^OSFailureBlock)(NSError* error); + +@interface OneSignalRequest : NSObject + +@property (nonatomic) BOOL disableLocalCaching; +@property (nonatomic) HTTPMethod method; +@property (strong, nonatomic, nonnull) NSString *path; +@property (strong, nonatomic, nullable) NSDictionary *parameters; +@property (strong, nonatomic, nullable) NSDictionary *additionalHeaders; +@property (nonatomic) int reattemptCount; +@property (nonatomic) BOOL dataRequest; //false for JSON based requests +-(BOOL)missingAppId; //for requests that don't require an appId parameter, the subclass should override this method and return false +-(NSMutableURLRequest * _Nonnull )urlRequest; + +@end + +#endif diff --git a/ios/platform/OneSignalCore.xcframework/ios-arm64_i386_x86_64-simulator/OneSignalCore.framework/Headers/OneSignalTrackFirebaseAnalytics.h b/ios/platform/OneSignalCore.xcframework/ios-arm64_i386_x86_64-simulator/OneSignalCore.framework/Headers/OneSignalTrackFirebaseAnalytics.h new file mode 100644 index 0000000..7cc3559 --- /dev/null +++ b/ios/platform/OneSignalCore.xcframework/ios-arm64_i386_x86_64-simulator/OneSignalCore.framework/Headers/OneSignalTrackFirebaseAnalytics.h @@ -0,0 +1,39 @@ +/** + * 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 "OSNotificationClasses.h" + +@interface OneSignalTrackFirebaseAnalytics : NSObject ++(BOOL)libraryExists; ++(void)init; ++(void)updateFromDownloadParams:(NSDictionary*)params; + ++(void)trackOpenEvent:(OSNotificationOpenedResult*)results; ++(void)trackReceivedEvent:(OSNotification*)notification; ++(void)trackInfluenceOpenEvent; +@end diff --git a/ios/platform/OneSignalCore.xcframework/ios-arm64_i386_x86_64-simulator/OneSignalCore.framework/Headers/OneSignalUserDefaults.h b/ios/platform/OneSignalCore.xcframework/ios-arm64_i386_x86_64-simulator/OneSignalCore.framework/Headers/OneSignalUserDefaults.h new file mode 100644 index 0000000..89a03fe --- /dev/null +++ b/ios/platform/OneSignalCore.xcframework/ios-arm64_i386_x86_64-simulator/OneSignalCore.framework/Headers/OneSignalUserDefaults.h @@ -0,0 +1,75 @@ +/** + * 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 + +@interface OneSignalUserDefaults : NSObject + +@property (strong, nonatomic, nullable) NSUserDefaults *userDefaults; + ++ (OneSignalUserDefaults * _Nonnull)initStandard; ++ (OneSignalUserDefaults * _Nonnull)initShared; + ++ (NSString * _Nonnull)appGroupName; + +- (BOOL)keyExists:(NSString * _Nonnull)key; + +- (void)removeValueForKey:(NSString * _Nonnull)key; + +// NSUserDefaults for storing and getting booleans +- (BOOL)getSavedBoolForKey:(NSString * _Nonnull)key defaultValue:(BOOL)value; +- (void)saveBoolForKey:(NSString * _Nonnull)key withValue:(BOOL)value; + +// NSUserDefaults for storing and getting strings +- (NSString * _Nullable)getSavedStringForKey:(NSString * _Nonnull)key defaultValue:(NSString * _Nullable)value; +- (void)saveStringForKey:(NSString * _Nonnull)key withValue:(NSString * _Nullable)value; + +// NSUserDefaults for storing and getting integers +- (NSInteger)getSavedIntegerForKey:(NSString * _Nonnull)key defaultValue:(NSInteger)value; +- (void)saveIntegerForKey:(NSString * _Nonnull)key withValue:(NSInteger)value; + +// NSUserDefaults for storing and getting doubles +- (double)getSavedDoubleForKey:(NSString * _Nonnull)key defaultValue:(double)value; +- (void)saveDoubleForKey:(NSString * _Nonnull)key withValue:(double)value; + +// NSUserDefaults for storing and getting sets +- (NSSet * _Nullable)getSavedSetForKey:(NSString * _Nonnull)key defaultValue:(NSSet * _Nullable)value; +- (void)saveSetForKey:(NSString * _Nonnull)key withValue:(NSSet * _Nullable)value; + +// NSUserDefaults for storing and getting dictionaries +- (NSDictionary * _Nullable)getSavedDictionaryForKey:(NSString * _Nonnull)key defaultValue:(NSDictionary * _Nullable)value; +- (void)saveDictionaryForKey:(NSString * _Nonnull)key withValue:(NSDictionary * _Nullable)value; + +// NSUserDefaults for storing and getting objects +- (id _Nullable)getSavedObjectForKey:(NSString * _Nonnull)key defaultValue:(id _Nullable)value; +- (void)saveObjectForKey:(NSString * _Nonnull)key withValue:(id _Nullable)value; + +// NSUserDefaults for storing and getting saved codeable data (custom objects) +- (id _Nullable)getSavedCodeableDataForKey:(NSString * _Nonnull)key defaultValue:(id _Nullable)value; +- (void)saveCodeableDataForKey:(NSString * _Nonnull)key withValue:(id _Nullable)value; + +@end diff --git a/ios/platform/OneSignalCore.xcframework/ios-arm64_i386_x86_64-simulator/OneSignalCore.framework/Info.plist b/ios/platform/OneSignalCore.xcframework/ios-arm64_i386_x86_64-simulator/OneSignalCore.framework/Info.plist new file mode 100644 index 0000000..d6b0e53 Binary files /dev/null and b/ios/platform/OneSignalCore.xcframework/ios-arm64_i386_x86_64-simulator/OneSignalCore.framework/Info.plist differ diff --git a/ios/platform/OneSignalCore.xcframework/ios-arm64_i386_x86_64-simulator/OneSignalCore.framework/Modules/module.modulemap b/ios/platform/OneSignalCore.xcframework/ios-arm64_i386_x86_64-simulator/OneSignalCore.framework/Modules/module.modulemap new file mode 100644 index 0000000..dc0cd60 --- /dev/null +++ b/ios/platform/OneSignalCore.xcframework/ios-arm64_i386_x86_64-simulator/OneSignalCore.framework/Modules/module.modulemap @@ -0,0 +1,6 @@ +framework module OneSignalCore { + umbrella header "OneSignalCore.h" + + export * + module * { export * } +} diff --git a/ios/platform/OneSignalCore.xcframework/ios-arm64_i386_x86_64-simulator/OneSignalCore.framework/OneSignalCore b/ios/platform/OneSignalCore.xcframework/ios-arm64_i386_x86_64-simulator/OneSignalCore.framework/OneSignalCore new file mode 100755 index 0000000..b6f9edf Binary files /dev/null and b/ios/platform/OneSignalCore.xcframework/ios-arm64_i386_x86_64-simulator/OneSignalCore.framework/OneSignalCore differ diff --git a/ios/platform/OneSignalCore.xcframework/ios-arm64_i386_x86_64-simulator/OneSignalCore.framework/_CodeSignature/CodeResources b/ios/platform/OneSignalCore.xcframework/ios-arm64_i386_x86_64-simulator/OneSignalCore.framework/_CodeSignature/CodeResources new file mode 100644 index 0000000..b782d3a --- /dev/null +++ b/ios/platform/OneSignalCore.xcframework/ios-arm64_i386_x86_64-simulator/OneSignalCore.framework/_CodeSignature/CodeResources @@ -0,0 +1,372 @@ + + + + + files + + Headers/NSString+OneSignal.h + + /HTg8wbY+rfIy9/kCShHF2Oev6Y= + + Headers/NSURL+OneSignal.h + + RUcvMsE7Pj+BUpa1H4SgBH/O/EQ= + + Headers/OSJSONHandling.h + + 91d8OZhU9KOTu2qY+EdAF+M47+E= + + Headers/OSMacros.h + + 7HmaM9ljZnw77iovX0v/wnb3bX0= + + Headers/OSNotification+Internal.h + + hwttm7oX6fN2cgP1Z4laQAKP49Q= + + Headers/OSNotification.h + + O/8gkRAMw3nV6j7znZxoXDKCi3o= + + Headers/OSNotificationClasses.h + + iNvshoGLl4IEMy2K1Lq2stVxdB4= + + Headers/OSPrivacyConsentController.h + + //dQV0JwOyLrzhcfN4IkI2abbFM= + + Headers/OSRequests.h + + MqtDyOupA+cu7c+vEvwpMBVA1b4= + + Headers/OneSignalClient.h + + TAYBk2YV4sw9wzS85jL0QtcAen0= + + Headers/OneSignalCommonDefines.h + + qElbp/Mc2DA1Nu0dZrNlormMM24= + + Headers/OneSignalCore.h + + T109aNL3gpg8ZtBUTteB6+7IuQ8= + + Headers/OneSignalCoreHelper.h + + xQeNeuYQWybV7qex/9h0H2mvUqI= + + Headers/OneSignalLog.h + + oEEDkA6eBW5XOmDs86IVGRpm28k= + + Headers/OneSignalRequest.h + + /uBkuxddG/dPmbTbANavHELydCw= + + Headers/OneSignalTrackFirebaseAnalytics.h + + oUxC/1Bnj1fAEZ+hPm30tS5H+f0= + + Headers/OneSignalUserDefaults.h + + ZvwZZD2HkwwG1wOkh8jGhnl2lTY= + + Info.plist + + BN843dUegzo7RmIO7U53A1Ph2sI= + + Modules/module.modulemap + + UwBMj9m72xH28UG69kKWlAJjycc= + + + files2 + + Headers/NSString+OneSignal.h + + hash + + /HTg8wbY+rfIy9/kCShHF2Oev6Y= + + hash2 + + qBhBU+sclS17YY3HDiZmbgqnTFtSJWm7tX4ThKcr3cM= + + + Headers/NSURL+OneSignal.h + + hash + + RUcvMsE7Pj+BUpa1H4SgBH/O/EQ= + + hash2 + + DC9WcVr/94eTh7NHtwKhA8C2fPJVJfY0nn9A6fuHGhA= + + + Headers/OSJSONHandling.h + + hash + + 91d8OZhU9KOTu2qY+EdAF+M47+E= + + hash2 + + kwMvLl1JtYBgIUz5NHRrummY0mdnyAPM2lP6HtOGETw= + + + Headers/OSMacros.h + + hash + + 7HmaM9ljZnw77iovX0v/wnb3bX0= + + hash2 + + aKanW/TgpNzztpIpYJVbnxfUUFcNJAolzoX8n0+EwJc= + + + Headers/OSNotification+Internal.h + + hash + + hwttm7oX6fN2cgP1Z4laQAKP49Q= + + hash2 + + bz9UK/DGxP8LAEzMdBiUj0l9UsfhSo11AUAW6X1NfNQ= + + + Headers/OSNotification.h + + hash + + O/8gkRAMw3nV6j7znZxoXDKCi3o= + + hash2 + + JOArzkdx1cCGHN5R6ITF+D2e8x/s5HVzQNEl26Gxdfg= + + + Headers/OSNotificationClasses.h + + hash + + iNvshoGLl4IEMy2K1Lq2stVxdB4= + + hash2 + + TfTvbYwUILlXsIfPJ92tgrhSS23UTibhhKt6j4Q984U= + + + Headers/OSPrivacyConsentController.h + + hash + + //dQV0JwOyLrzhcfN4IkI2abbFM= + + hash2 + + Nl0w50EzXPgal1ghTEM3QIoYLzOYHH195NTzq3Zlvmo= + + + Headers/OSRequests.h + + hash + + MqtDyOupA+cu7c+vEvwpMBVA1b4= + + hash2 + + YdFlpQOMH+9m9N627gcvPVwShSPrBzKvDm3E3FCYHvk= + + + Headers/OneSignalClient.h + + hash + + TAYBk2YV4sw9wzS85jL0QtcAen0= + + hash2 + + cbF3Wa3Lqa0Wb2275ot3ploX1KXQ+znQBiBOu0TzV6M= + + + Headers/OneSignalCommonDefines.h + + hash + + qElbp/Mc2DA1Nu0dZrNlormMM24= + + hash2 + + cdunHi7N1J8gJfTDwI5B4v8EIL2G6WSPjJzrU9SxP6Y= + + + Headers/OneSignalCore.h + + hash + + T109aNL3gpg8ZtBUTteB6+7IuQ8= + + hash2 + + uLAWfHauq9MJASOHxa8O6emo1oXTfJcLShIdOAUxG88= + + + Headers/OneSignalCoreHelper.h + + hash + + xQeNeuYQWybV7qex/9h0H2mvUqI= + + hash2 + + vK6D0j+ZbW5ycXiO3jb9aLvluPdvyYGxCSFl1gkVp14= + + + Headers/OneSignalLog.h + + hash + + oEEDkA6eBW5XOmDs86IVGRpm28k= + + hash2 + + fXXHmsA5in9ZjZz8sHnl3WaN/xiOjw63toiJ0AzJTE4= + + + Headers/OneSignalRequest.h + + hash + + /uBkuxddG/dPmbTbANavHELydCw= + + hash2 + + 69iw4bnJGwQNk11KAchyrRMPCM6Rf4C9Wvn+HMnTCXc= + + + Headers/OneSignalTrackFirebaseAnalytics.h + + hash + + oUxC/1Bnj1fAEZ+hPm30tS5H+f0= + + hash2 + + VCgGIHlXYAQKerOcmqkIesJ+B+oWLXQya/3m1cYjnKc= + + + Headers/OneSignalUserDefaults.h + + hash + + ZvwZZD2HkwwG1wOkh8jGhnl2lTY= + + hash2 + + QIYtzchiCKQguyJOSY6PEhV0H98JRi2PdXSBmZxxLN4= + + + Modules/module.modulemap + + hash + + UwBMj9m72xH28UG69kKWlAJjycc= + + hash2 + + K44cM22FGB3rV1SaGqR0xQQBO01/YgeIVYiCCcvFnOU= + + + + 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/platform/OneSignalCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalCore.framework/Headers b/ios/platform/OneSignalCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalCore.framework/Headers new file mode 120000 index 0000000..a177d2a --- /dev/null +++ b/ios/platform/OneSignalCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalCore.framework/Headers @@ -0,0 +1 @@ +Versions/Current/Headers \ No newline at end of file diff --git a/ios/platform/OneSignalCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalCore.framework/Modules b/ios/platform/OneSignalCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalCore.framework/Modules new file mode 120000 index 0000000..5736f31 --- /dev/null +++ b/ios/platform/OneSignalCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalCore.framework/Modules @@ -0,0 +1 @@ +Versions/Current/Modules \ No newline at end of file diff --git a/ios/platform/OneSignalCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalCore.framework/OneSignalCore b/ios/platform/OneSignalCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalCore.framework/OneSignalCore new file mode 120000 index 0000000..60476e5 --- /dev/null +++ b/ios/platform/OneSignalCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalCore.framework/OneSignalCore @@ -0,0 +1 @@ +Versions/Current/OneSignalCore \ No newline at end of file diff --git a/ios/platform/OneSignalCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalCore.framework/Resources b/ios/platform/OneSignalCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalCore.framework/Resources new file mode 120000 index 0000000..953ee36 --- /dev/null +++ b/ios/platform/OneSignalCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalCore.framework/Resources @@ -0,0 +1 @@ +Versions/Current/Resources \ No newline at end of file diff --git a/ios/platform/OneSignalCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalCore.framework/Versions/A/Headers/NSString+OneSignal.h b/ios/platform/OneSignalCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalCore.framework/Versions/A/Headers/NSString+OneSignal.h new file mode 100644 index 0000000..c9ee3aa --- /dev/null +++ b/ios/platform/OneSignalCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalCore.framework/Versions/A/Headers/NSString+OneSignal.h @@ -0,0 +1,44 @@ +/** + * 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 + +#ifndef NSString_OneSignal_h +#define NSString_OneSignal_h +@interface NSString (OneSignal) + +- (NSString *_Nonnull)one_getVersionForRange:(NSRange)range; +- (NSString *_Nonnull)one_substringAfter:(NSString *_Nonnull)needle; +- (NSString *_Nonnull)one_getSemanticVersion; +- (NSString *_Nullable)fileExtensionForMimeType; +- (NSString *_Nullable)supportedFileExtension; + +// returns a lower case hex representation of the data ++ (nullable NSString *)hexStringFromData:(nonnull NSData *)data; + +@end +#endif diff --git a/ios/platform/OneSignalCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalCore.framework/Versions/A/Headers/NSURL+OneSignal.h b/ios/platform/OneSignalCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalCore.framework/Versions/A/Headers/NSURL+OneSignal.h new file mode 100644 index 0000000..84b165a --- /dev/null +++ b/ios/platform/OneSignalCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalCore.framework/Versions/A/Headers/NSURL+OneSignal.h @@ -0,0 +1,36 @@ +/** + * 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 + +@interface NSURL (OneSignal) + +- (NSString *)valueFromQueryParameter:(NSString *)parameter; + +- (NSString *)supportedFileExtensionFromQueryItems; + +@end diff --git a/ios/platform/OneSignalCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalCore.framework/Versions/A/Headers/OSJSONHandling.h b/ios/platform/OneSignalCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalCore.framework/Versions/A/Headers/OSJSONHandling.h new file mode 100644 index 0000000..0a56503 --- /dev/null +++ b/ios/platform/OneSignalCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalCore.framework/Versions/A/Headers/OSJSONHandling.h @@ -0,0 +1,40 @@ +/** + * 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 "OSNotification.h" + +@protocol OSJSONDecodable ++ (instancetype _Nullable)instanceWithData:(NSData * _Nonnull)data; + ++ (instancetype _Nullable)instanceWithJson:(NSDictionary * _Nonnull)json; ++ (instancetype _Nullable)instancePreviewFromNotification:(OSNotification * _Nonnull)notification; +@end + +@protocol OSJSONEncodable +- (NSDictionary * _Nonnull)jsonRepresentation; +@end diff --git a/ios/platform/OneSignalCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalCore.framework/Versions/A/Headers/OSMacros.h b/ios/platform/OneSignalCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalCore.framework/Versions/A/Headers/OSMacros.h new file mode 100644 index 0000000..07d650a --- /dev/null +++ b/ios/platform/OneSignalCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalCore.framework/Versions/A/Headers/OSMacros.h @@ -0,0 +1,42 @@ +/** +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. +*/ + +#define mustOverride() @throw [NSException exceptionWithName:NSInvalidArgumentException reason:[NSString stringWithFormat:@"%s must be overridden in a subclass/category", __PRETTY_FUNCTION__] userInfo:nil] +#define methodNotImplemented() mustOverride() +// Defines let and var in Objective-c for shorter code +// __auto_type is compatible with Xcode 8+ +#if defined(__cplusplus) +#define let auto const +#else +#define let const __auto_type +#endif + +#if defined(__cplusplus) +#define var auto +#else +#define var __auto_type +#endif diff --git a/ios/platform/OneSignalCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalCore.framework/Versions/A/Headers/OSNotification+Internal.h b/ios/platform/OneSignalCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalCore.framework/Versions/A/Headers/OSNotification+Internal.h new file mode 100644 index 0000000..cdc43ea --- /dev/null +++ b/ios/platform/OneSignalCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalCore.framework/Versions/A/Headers/OSNotification+Internal.h @@ -0,0 +1,40 @@ +/** + * 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 "OSNotificationClasses.h" + +#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/platform/OneSignalCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalCore.framework/Versions/A/Headers/OSNotification.h b/ios/platform/OneSignalCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalCore.framework/Versions/A/Headers/OSNotification.h new file mode 100644 index 0000000..d92422a --- /dev/null +++ b/ios/platform/OneSignalCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalCore.framework/Versions/A/Headers/OSNotification.h @@ -0,0 +1,112 @@ +/** + * 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. + */ +/* OneSignal OSNotification */ +@interface OSNotification : NSObject + +/* Unique Message Identifier */ +@property(readonly, nullable)NSString* notificationId; + +/* Unique Template Identifier */ +@property(readonly, nullable)NSString* templateId; + +/* Name of Template */ +@property(readonly, nullable)NSString* templateName; + +/* True when the key content-available is set to 1 in the apns payload. + content-available is used to wake your app when the payload is received. + See Apple's documenation for more details. + https://developer.apple.com/documentation/uikit/uiapplicationdelegate/1623013-application +*/ +@property(readonly)BOOL contentAvailable; + +/* True when the key mutable-content is set to 1 in the apns payload. + mutable-content is used to wake your Notification Service Extension to modify a notification. + See Apple's documenation for more details. + https://developer.apple.com/documentation/usernotifications/unnotificationserviceextension + */ +@property(readonly, getter=hasMutableContent)BOOL mutableContent; + +/* + Notification category key previously registered to display with. + This overrides OneSignal's actionButtons. + See Apple's documenation for more details. + https://developer.apple.com/library/content/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/SupportingNotificationsinYourApp.html#//apple_ref/doc/uid/TP40008194-CH4-SW26 +*/ +@property(readonly, nullable)NSString* category; + +/* The badge assigned to the application icon */ +@property(readonly)NSInteger badge; +@property(readonly)NSInteger badgeIncrement; + +/* The sound parameter passed to the notification + By default set to UILocalNotificationDefaultSoundName */ +@property(readonly, nullable)NSString* sound; + +/* Main push content */ +@property(readonly, nullable)NSString* title; +@property(readonly, nullable)NSString* subtitle; +@property(readonly, nullable)NSString* body; + +/* Web address to launch within the app via a WKWebView */ +@property(readonly, nullable)NSString* launchURL; + +/* Additional key value properties set within the payload */ +@property(readonly, nullable)NSDictionary* additionalData; + +/* iOS 10+ : Attachments sent as part of the rich notification */ +@property(readonly, nullable)NSDictionary* attachments; + +/* Action buttons passed */ +@property(readonly, nullable)NSArray *actionButtons; + +/* Holds the original payload received + Keep the raw value for users that would like to root the push */ +@property(readonly, nonnull)NSDictionary *rawPayload; + +/* iOS 10+ : Groups notifications into threads */ +@property(readonly, nullable)NSString *threadId; + +/* iOS 15+ : Relevance Score for notification summary */ +@property(readonly, nullable)NSNumber *relevanceScore; + +/* iOS 15+ : Interruption Level */ +@property(readonly, nullable)NSString *interruptionLevel; + +@property(readonly, nullable)NSString *collapseId; + +/* Parses an APNS push payload into a OSNotification object. + Useful to call from your NotificationServiceExtension when the + didReceiveNotificationRequest:withContentHandler: method fires. */ ++ (instancetype _Nullable)parseWithApns:(nonnull NSDictionary*)message; + +/* Convert object into a custom Dictionary / JSON Object */ +- (NSDictionary* _Nonnull)jsonRepresentation; + +/* Convert object into an NSString that can be convertible into a custom Dictionary / JSON Object */ +- (NSString* _Nonnull)stringify; + +@end diff --git a/ios/platform/OneSignalCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalCore.framework/Versions/A/Headers/OSNotificationClasses.h b/ios/platform/OneSignalCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalCore.framework/Versions/A/Headers/OSNotificationClasses.h new file mode 100644 index 0000000..2d8fed2 --- /dev/null +++ b/ios/platform/OneSignalCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalCore.framework/Versions/A/Headers/OSNotificationClasses.h @@ -0,0 +1,60 @@ +/** + * 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 "OSNotification.h" + +// Pass in nil means a notification will not display +typedef void (^OSNotificationDisplayResponse)(OSNotification* _Nullable notification); + +/* The action type associated to an OSNotificationAction object */ +typedef NS_ENUM(NSUInteger, OSNotificationActionType) { + OSNotificationActionTypeOpened, + OSNotificationActionTypeActionTaken +}; + +@interface OSNotificationAction : NSObject + +/* The type of the notification action */ +@property(readonly)OSNotificationActionType type; + +/* The ID associated with the button tapped. NULL when the actionType is NotificationTapped */ +@property(readonly, nullable)NSString* actionId; + +@end + +@interface OSNotificationOpenedResult : NSObject + +@property(readonly, nonnull)OSNotification* notification; +@property(readonly, nonnull)OSNotificationAction *action; + +/* Convert object into an NSString that can be convertible into a custom Dictionary / JSON Object */ +- (NSString* _Nonnull)stringify; + +// Convert the class into a NSDictionary +- (NSDictionary *_Nonnull)jsonRepresentation; + +@end diff --git a/ios/platform/OneSignalCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalCore.framework/Versions/A/Headers/OSPrivacyConsentController.h b/ios/platform/OneSignalCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalCore.framework/Versions/A/Headers/OSPrivacyConsentController.h new file mode 100644 index 0000000..37c4f09 --- /dev/null +++ b/ios/platform/OneSignalCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalCore.framework/Versions/A/Headers/OSPrivacyConsentController.h @@ -0,0 +1,33 @@ +/** +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 OSPrivacyConsentController : NSObject ++ (BOOL)requiresUserPrivacyConsent; ++ (void)consentGranted:(BOOL)granted; ++ (BOOL)shouldLogMissingPrivacyConsentErrorWithMethodName:(NSString *)methodName; +@end diff --git a/ios/platform/OneSignalCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalCore.framework/Versions/A/Headers/OSRequests.h b/ios/platform/OneSignalCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalCore.framework/Versions/A/Headers/OSRequests.h new file mode 100644 index 0000000..43bf034 --- /dev/null +++ b/ios/platform/OneSignalCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalCore.framework/Versions/A/Headers/OSRequests.h @@ -0,0 +1,156 @@ +/** + * 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 "OneSignalRequest.h" + +#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 + +@interface OSRequestPostNotification : OneSignalRequest ++ (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 + appId:(NSString * _Nonnull)appId + activityId:(NSString * _Nonnull)activityId + token:(NSString * _Nonnull)token; +@end + +@interface OSRequestLiveActivityExit: OneSignalRequest ++ (instancetype _Nonnull)withUserId:(NSString * _Nonnull)userId + appId:(NSString * _Nonnull)appId + activityId:(NSString * _Nonnull)activityId; +@end +#endif /* Requests_h */ + diff --git a/ios/platform/OneSignalCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalCore.framework/Versions/A/Headers/OneSignalClient.h b/ios/platform/OneSignalCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalCore.framework/Versions/A/Headers/OneSignalClient.h new file mode 100644 index 0000000..432a9ab --- /dev/null +++ b/ios/platform/OneSignalCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalCore.framework/Versions/A/Headers/OneSignalClient.h @@ -0,0 +1,82 @@ +/** + * 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 "OneSignalRequest.h" + +#ifndef OneSignalClient_h +#define OneSignalClient_h + +typedef void (^OSDataRequestSuccessBlock)(NSData *data); + +typedef void (^OSMultipleCompletionBlock)(NSDictionary *responses); +typedef void (^OSMultipleFailureBlock)(NSDictionary *errors); +typedef void (^OSMultipleSuccessBlock)(NSDictionary *results); + +@interface OneSignalClient : NSObject ++ (OneSignalClient *)sharedClient; +- (void)executeRequest:(OneSignalRequest *)request onSuccess:(OSResultSuccessBlock)successBlock onFailure:(OSFailureBlock)failureBlock; +- (void)executeSynchronousRequest:(OneSignalRequest *)request onSuccess:(OSResultSuccessBlock)successBlock onFailure:(OSFailureBlock)failureBlock; + +// ie. for loading HTML or other non-JSON based requests +- (void)executeDataRequest:(OneSignalRequest *)request onSuccess:(OSDataRequestSuccessBlock)successBlock onFailure:(OSFailureBlock)failureBlock; + +// Executes multiple OneSignalRequest's simultaneously, needs a unique identifier for each request +- (void)executeSimultaneousRequests:(NSDictionary *)requests withSuccess:(OSMultipleSuccessBlock)successBlock onFailure:(OSMultipleFailureBlock)failureBlock; + +/* + TODO: We want to eventually migrate over to using this method for executing simultaneous requests: + This allows us to combine multiple async concurrent requests to return from a single callback with the proper formatted responses from each reuqest (successful or not, account for params returning from GETs). + A generalized format should be followed and we should make sure not to break form that as it could break peoples apps in the future if we add params and remove params from this callback. + Currently for the only implementation this is used for "setExternalUserId:withCOmpletion:" the format is as follows: + + NSDictionary response = @{ + (required) @"push" : { + @"success" : @(true) or @(false) + }, + + (optional) @"email" : { + @"success" : @(true) or @(false) + } + } + + + Building off of this format now will require: + + 1. Including other attributes and whether they are required or not + ex. @"push" is always going to be within the callback resposne (required), meanwhile, + @"email" will not always exist in the callback resposne (optoinal) + + 2. Can't remove params that are required as an app may be expecting them and removing/modifying a key could break there app with an SDK upgrade + + 3. Add more requirements... + + */ +- (void)executeSimultaneousRequests:(NSDictionary *)requests withCompletion:(OSMultipleCompletionBlock)completionBlock; +@end + +#endif diff --git a/ios/platform/OneSignalCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalCore.framework/Versions/A/Headers/OneSignalCommonDefines.h b/ios/platform/OneSignalCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalCore.framework/Versions/A/Headers/OneSignalCommonDefines.h new file mode 100644 index 0000000..41e8aad --- /dev/null +++ b/ios/platform/OneSignalCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalCore.framework/Versions/A/Headers/OneSignalCommonDefines.h @@ -0,0 +1,304 @@ +/** + * 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 OneSignalCommonDefines_h +#define OneSignalCommonDefines_h + +#import + +// Networking +#define OS_API_VERSION @"1" +#define OS_API_ACCEPT_HEADER @"application/vnd.onesignal.v" OS_API_VERSION @"+json" +#define OS_API_SERVER_URL @"https://api.onesignal.com/" +#define OS_IAM_WEBVIEW_BASE_URL @"https://onesignal.com/" + +// OneSignalUserDefault keys +// String values start with "OSUD_" to maintain a level of uniqueness from other libs and app code +// Key names should be identical to the string values to prevent confusion +// Add the suffix "_TO" or "_FROM" to any keys with "to" and "from" logic +// TODO: Refactored variable names, but not strings since UserDefaults might need a migration +// Comments next to the NSUserDefault keys are the planned string value and key names +// "?" in comment line ending comment means uncertainty in naming the string value of the associated key and keeping as is for now +// "*" in comment line ending comment means the string value has not been changed +// App + +#define ONESIGNAL_VERSION @"031203" + +#define OSUD_APP_ID @"GT_APP_ID" // * OSUD_APP_ID +#define OSUD_REGISTERED_WITH_APPLE @"GT_REGISTERED_WITH_APPLE" // * OSUD_REGISTERED_WITH_APPLE +#define OSUD_APP_PROVIDES_NOTIFICATION_SETTINGS @"OS_APP_PROVIDES_NOTIFICATION_SETTINGS" // * OSUD_APP_PROVIDES_NOTIFICATION_SETTINGS +#define OSUD_PROMPT_BEFORE_NOTIFICATION_LAUNCH_URL_OPENS @"PROMPT_BEFORE_OPENING_PUSH_URL" // * OSUD_PROMPT_BEFORE_NOTIFICATION_LAUNCH_URL_OPENS +#define OSUD_PERMISSION_ACCEPTED_TO @"OSUD_PERMISSION_ACCEPTED_TO" // OSUD_PERMISSION_ACCEPTED_TO +#define OSUD_PERMISSION_ACCEPTED_FROM @"ONESIGNAL_PERMISSION_ACCEPTED_LAST" // * OSUD_PERMISSION_ACCEPTED_FROM +#define OSUD_WAS_PROMPTED_FOR_NOTIFICATIONS_TO @"OSUD_WAS_PROMPTED_FOR_NOTIFICATIONS_TO" // OSUD_WAS_PROMPTED_FOR_NOTIFICATIONS_TO +#define OSUD_WAS_PROMPTED_FOR_NOTIFICATIONS_FROM @"OS_HAS_PROMPTED_FOR_NOTIFICATIONS_LAST" // * OSUD_WAS_PROMPTED_FOR_NOTIFICATIONS_FROM +#define OSUD_WAS_NOTIFICATION_PROMPT_ANSWERED_TO @"OS_NOTIFICATION_PROMPT_ANSWERED" // * OSUD_WAS_NOTIFICATION_PROMPT_ANSWERED_TO +#define OSUD_WAS_NOTIFICATION_PROMPT_ANSWERED_FROM @"OS_NOTIFICATION_PROMPT_ANSWERED_LAST" // * OSUD_WAS_NOTIFICATION_PROMPT_ANSWERED_FROM +#define OSUD_PROVISIONAL_PUSH_AUTHORIZATION_TO @"OSUD_PROVISIONAL_PUSH_AUTHORIZATION_TO" // OSUD_PROVISIONAL_PUSH_AUTHORIZATION_TO +#define OSUD_PROVISIONAL_PUSH_AUTHORIZATION_FROM @"ONESIGNAL_PROVISIONAL_AUTHORIZATION_LAST" // * OSUD_PROVISIONAL_PUSH_AUTHORIZATION_FROM +#define OSUD_USES_PROVISIONAL_PUSH_AUTHORIZATION @"ONESIGNAL_USES_PROVISIONAL_PUSH_AUTHORIZATION" // * OSUD_USES_PROVISIONAL_PUSH_AUTHORIZATION +#define OSUD_PERMISSION_EPHEMERAL_TO @"OSUD_PERMISSION_EPHEMERAL_TO" // * OSUD_PERMISSION_EPHEMERAL_TO +#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" +// 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" +#define OSUD_REQUIRES_USER_PRIVACY_CONSENT @"OSUD_REQUIRES_USER_PRIVACY_CONSENT" +// Remote Params - Receive Receipts +#define OSUD_RECEIVE_RECEIPTS_ENABLED @"OS_ENABLE_RECEIVE_RECEIPTS" // * OSUD_RECEIVE_RECEIPTS_ENABLED +// Outcomes +#define OSUD_OUTCOMES_V2 @"OSUD_OUTCOMES_V2" +#define OSUD_NOTIFICATION_LIMIT @"NOTIFICATION_LIMIT" // * OSUD_NOTIFICATION_LIMIT +#define OSUD_IAM_LIMIT @"OSUD_IAM_LIMIT" +#define OSUD_NOTIFICATION_ATTRIBUTION_WINDOW @"NOTIFICATION_ATTRIBUTION_WINDOW" // * OSUD_NOTIFICATION_ATTRIBUTION_WINDOW +#define OSUD_IAM_ATTRIBUTION_WINDOW @"OSUD_IAM_ATTRIBUTION_WINDOW" +#define OSUD_DIRECT_SESSION_ENABLED @"DIRECT_SESSION_ENABLED" // * OSUD_DIRECT_SESSION_ENABLED +#define OSUD_INDIRECT_SESSION_ENABLED @"INDIRECT_SESSION_ENABLED" // * OSUD_INDIRECT_SESSION_ENABLED +#define OSUD_UNATTRIBUTED_SESSION_ENABLED @"UNATTRIBUTED_SESSION_ENABLED" // * OSUD_UNATTRIBUTED_SESSION_ENABLED +#define OSUD_CACHED_NOTIFICATION_INFLUENCE @"CACHED_SESSION" // * OSUD_CACHED_NOTIFICATION_INFLUENCE +#define OSUD_CACHED_IAM_INFLUENCE @"OSUD_CACHED_IAM_INFLUENCE" +#define OSUD_CACHED_DIRECT_NOTIFICATION_ID @"CACHED_DIRECT_NOTIFICATION_ID" // * OSUD_CACHED_DIRECT_NOTIFICATION_ID +#define OSUD_CACHED_INDIRECT_NOTIFICATION_IDS @"CACHED_INDIRECT_NOTIFICATION_IDS" // * OSUD_CACHED_INDIRECT_NOTIFICATION_IDS +#define OSUD_CACHED_RECEIVED_NOTIFICATION_IDS @"CACHED_RECEIVED_NOTIFICATION_IDS" // * OSUD_CACHED_RECEIVED_NOTIFICATION_IDS +#define OSUD_CACHED_RECEIVED_IAM_IDS @"OSUD_CACHED_RECEIVED_IAM_IDS" +#define OSUD_CACHED_UNATTRIBUTED_UNIQUE_OUTCOME_EVENTS_SENT @"CACHED_UNATTRIBUTED_UNIQUE_OUTCOME_EVENTS_SENT" // * OSUD_CACHED_UNATTRIBUTED_UNIQUE_OUTCOME_EVENTS_SENT +#define OSUD_CACHED_ATTRIBUTED_UNIQUE_OUTCOME_EVENT_NOTIFICATION_IDS_SENT @"CACHED_ATTRIBUTED_UNIQUE_OUTCOME_EVENT_NOTIFICATION_IDS_SENT" // * OSUD_CACHED_ATTRIBUTED_UNIQUE_OUTCOME_EVENT_NOTIFICATION_IDS_SENT +// Migration +#define OSUD_CACHED_SDK_VERSION @"OSUD_CACHED_SDK_VERSION" +// Time Tracking +#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:", \ + @"application:handleActionWithIdentifier:forLocalNotification:completionHandler:", \ + @"application:handleActionWithIdentifier:forLocalNotification:withResponseInfo:completionHandler:" ] + +// To avoid undefined symbol compiler errors on older versions of Xcode, +// instead of using UNAuthorizationOptionProvisional directly, we will use +// it indirectly with these macros +#define PROVISIONAL_UNAUTHORIZATIONOPTION (UNAuthorizationOptions)(1 << 6) +#define PROVIDES_SETTINGS_UNAUTHORIZATIONOPTION (UNAuthorizationOptions)(1 << 5) + +// These options are defined in all versions of iOS that we support, so we +// can use them directly. +#define DEFAULT_UNAUTHORIZATIONOPTIONS (UNAuthorizationOptionSound + UNAuthorizationOptionBadge + UNAuthorizationOptionAlert) + +// iOS Parameter Names +#define IOS_FBA @"fba" +#define IOS_USES_PROVISIONAL_AUTHORIZATION @"uses_provisional_auth" +#define IOS_REQUIRES_EMAIL_AUTHENTICATION @"require_email_auth" +#define IOS_REQUIRES_SMS_AUTHENTICATION @"require_sms_auth" +#define IOS_REQUIRES_USER_ID_AUTHENTICATION @"require_user_id_auth" +#define IOS_RECEIVE_RECEIPTS_ENABLE @"receive_receipts_enable" +#define IOS_OUTCOMES_V2_SERVICE_ENABLE @"v2_enabled" +#define IOS_LOCATION_SHARED @"location_shared" +#define IOS_REQUIRES_USER_PRIVACY_CONSENT @"requires_user_privacy_consent" + +// SMS Parameter Names +#define SMS_NUMBER_KEY @"sms_number" +#define SMS_NUMBER_AUTH_HASH_KEY @"sms_auth_hash" + +// Info.plist key +#define FALLBACK_TO_SETTINGS_MESSAGE @"Onesignal_settings_fallback_message" +#define ONESIGNAL_SUPRESS_LAUNCH_URLS @"OneSignal_suppress_launch_urls" + +// GDPR Privacy Consent +#define GDPR_CONSENT_GRANTED @"GDPR_CONSENT_GRANTED" +#define ONESIGNAL_REQUIRE_PRIVACY_CONSENT @"OneSignal_require_privacy_consent" + +// Badge handling +#define ONESIGNAL_DISABLE_BADGE_CLEARING @"OneSignal_disable_badge_clearing" +#define ONESIGNAL_APP_GROUP_NAME_KEY @"OneSignal_app_groups_key" +#define ONESIGNAL_BADGE_KEY @"onesignalBadgeCount" + +// Firebase +#define ONESIGNAL_FB_ENABLE_FIREBASE @"OS_ENABLE_FIREBASE_ANALYTICS" +#define ONESIGNAL_FB_LAST_TIME_RECEIVED @"OS_LAST_RECIEVED_TIME" +#define ONESIGNAL_FB_LAST_GAF_CAMPAIGN_RECEIVED @"OS_LAST_RECIEVED_GAF_CAMPAIGN" +#define ONESIGNAL_FB_LAST_NOTIFICATION_ID_RECEIVED @"OS_LAST_RECIEVED_NOTIFICATION_ID" + +// APNS params +#define ONESIGNAL_IAM_PREVIEW @"os_in_app_message_preview_id" + +#define ONESIGNAL_SUPPORTED_ATTACHMENT_TYPES @[@"aiff", @"wav", @"mp3", @"mp4", @"jpg", @"jpeg", @"png", @"gif", @"mpeg", @"mpg", @"avi", @"m4a", @"m4v"] + +// OneSignal Influence Strings +#define OS_INFLUENCE_TYPE_STRINGS @[@"DIRECT", @"INDIRECT", @"UNATTRIBUTED", @"DISABLED"] +// Convert String to Influence enum and vice versa +#define OS_INFLUENCE_TYPE_TO_STRING(enum) [OS_INFLUENCE_TYPE_STRINGS objectAtIndex:enum] +#define OS_INFLUENCE_TYPE_FROM_STRING(string) [OS_INFLUENCE_TYPE_STRINGS indexOfObject:string] + +// OneSignal Influence Channel +#define OS_INFLUENCE_CHANNEL_STRING @[@"IN_APP_MESSAGE", @"NOTIFICATION"] +// Convert String to Influence Channel enum and vice versa +#define OS_INFLUENCE_CHANNEL_TO_STRING(enum) [OS_INFLUENCE_CHANNEL_STRING objectAtIndex:enum] +#define OS_INFLUENCE_CHANNEL_FROM_STRING(string) [OS_INFLUENCE_CHANNEL_STRING indexOfObject:string] + +// OneSignal Prompt Action Result +typedef enum {PERMISSION_GRANTED, PERMISSION_DENIED, LOCATION_PERMISSIONS_MISSING_INFO_PLIST, ERROR} PromptActionResult; + +// OneSignal App Entry Action Types +typedef enum {NOTIFICATION_CLICK, APP_OPEN, APP_CLOSE} AppEntryAction; + +// OneSignal Focus Event Types +typedef enum {BACKGROUND, END_SESSION} FocusEventType; + +// OneSignal Focus Types +typedef enum {ATTRIBUTED, NOT_ATTRIBUTED} FocusAttributionState; +#define focusAttributionStateString(enum) [@[@"ATTRIBUTED", @"NOT_ATTRIBUTED"] objectAtIndex:enum] + +// OneSignal constants +#define OS_PUSH @"push" +#define OS_EMAIL @"email" +#define OS_SMS @"sms" +#define OS_SUCCESS @"success" + +#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"] +#define httpMethodString(enum) [OS_API_CLIENT_STRINGS objectAtIndex:enum] + +// Notification types +#define NOTIFICATION_TYPE_NONE 0 +#define NOTIFICATION_TYPE_BADGE 1 +#define NOTIFICATION_TYPE_SOUND 2 +#define NOTIFICATION_TYPE_ALERT 4 +#define NOTIFICATION_TYPE_ALL 7 + +#define ERROR_PUSH_CAPABLILITY_DISABLED -13 +#define ERROR_PUSH_DELEGATE_NEVER_FIRED -14 +#define ERROR_PUSH_SIMULATOR_NOT_SUPPORTED -15 +#define ERROR_PUSH_UNKNOWN_APNS_ERROR -16 +#define ERROR_PUSH_OTHER_3000_ERROR_UNUSED_RESERVED -17 +#define ERROR_PUSH_NEVER_PROMPTED -18 +#define ERROR_PUSH_PROMPT_NEVER_ANSWERED -19 + +#define AUTH_STATUS_EPHEMERAL 4 //UNAuthorizationStatusEphemeral + +// 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" + +// Device types +#define DEVICE_TYPE_PUSH 0 +#define DEVICE_TYPE_EMAIL 11 +#define DEVICE_TYPE_SMS 14 + +#define MAX_NSE_LIFETIME_SECOUNDS 30 + +#ifndef OS_TEST + // OneSignal API Client Defines + #define REATTEMPT_DELAY 30.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 + + // the max number of UNNotificationCategory ID's the SDK will register + #define MAX_CATEGORIES_SIZE 128 + + // Defines how long the SDK will wait for a OSPredisplayNotification's complete method to execute + #define CUSTOM_DISPLAY_TYPE_TIMEOUT 25.0 + + // Defines the maximum delay time for confirmed deliveries + #define MAX_CONF_DELIVERY_DELAY 25.0 +#else + // Test defines for API Client + #define REATTEMPT_DELAY 0.004 + #define REQUEST_TIMEOUT_REQUEST 0.02 //for most HTTP requests + #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 + + // Unit testing value for how long the SDK will wait for a + // OSPredisplayNotification's complete method to execute + #define CUSTOM_DISPLAY_TYPE_TIMEOUT 0.05 + + // We don't want to delay confirmed deliveries in unit tests + #define MAX_CONF_DELIVERY_DELAY 0 + +#endif + +// A max timeout for a request, which might include multiple reattempts +#define MAX_TIMEOUT ((REQUEST_TIMEOUT_REQUEST * MAX_ATTEMPT_COUNT) + (REATTEMPT_DELAY * MAX_ATTEMPT_COUNT)) * NSEC_PER_SEC + +// To save battery, NSTimer is not exceedingly accurate so timestamp values may be a bit inaccurate +// To make up for this, we can check to make sure the values are close enough to account for +// variance and floating-point error. +#define OS_ROUGHLY_EQUAL(left, right) (fabs(left - right) < 0.03) + +#define MAX_NOTIFICATION_MEDIA_SIZE_BYTES 50000000 + +#endif /* OneSignalCommonDefines_h */ diff --git a/ios/platform/OneSignalCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalCore.framework/Versions/A/Headers/OneSignalCore.h b/ios/platform/OneSignalCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalCore.framework/Versions/A/Headers/OneSignalCore.h new file mode 100644 index 0000000..5d7cc7c --- /dev/null +++ b/ios/platform/OneSignalCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalCore.framework/Versions/A/Headers/OneSignalCore.h @@ -0,0 +1,50 @@ +/** + * 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. + */ + +#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 + diff --git a/ios/platform/OneSignalCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalCore.framework/Versions/A/Headers/OneSignalCoreHelper.h b/ios/platform/OneSignalCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalCore.framework/Versions/A/Headers/OneSignalCoreHelper.h new file mode 100644 index 0000000..2a95e9c --- /dev/null +++ b/ios/platform/OneSignalCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalCore.framework/Versions/A/Headers/OneSignalCoreHelper.h @@ -0,0 +1,40 @@ +/** + * 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 OneSignalCoreHelper : NSObject +#pragma clang diagnostic ignored "-Wstrict-prototypes" +#pragma clang diagnostic ignored "-Wnullability-completeness" + +// Threading ++ (void)runOnMainThread:(void(^)())block; ++ (void)dispatch_async_on_main_queue:(void(^)())block; ++ (void)performSelector:(SEL)aSelector onMainThreadOnObject:(id)targetObj withObject:(id)anArgument afterDelay:(NSTimeInterval)delay; + ++ (NSString*)hashUsingSha1:(NSString*)string; ++ (NSString*)hashUsingMD5:(NSString*)string; ++ (NSString*)trimURLSpacing:(NSString*)url; +@end diff --git a/ios/platform/OneSignalCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalCore.framework/Versions/A/Headers/OneSignalLog.h b/ios/platform/OneSignalCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalCore.framework/Versions/A/Headers/OneSignalLog.h new file mode 100644 index 0000000..63bf4e1 --- /dev/null +++ b/ios/platform/OneSignalCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalCore.framework/Versions/A/Headers/OneSignalLog.h @@ -0,0 +1,44 @@ +/** + * 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 + +@interface OneSignalLog : NSObject +#pragma mark Logging +typedef NS_ENUM(NSUInteger, ONE_S_LOG_LEVEL) { + ONE_S_LL_NONE, + ONE_S_LL_FATAL, + ONE_S_LL_ERROR, + ONE_S_LL_WARN, + ONE_S_LL_INFO, + ONE_S_LL_DEBUG, + ONE_S_LL_VERBOSE +}; + ++ (void)setLogLevel:(ONE_S_LOG_LEVEL)logLevel; ++ (void)onesignalLog:(ONE_S_LOG_LEVEL)logLevel message:(NSString* _Nonnull)message; + +@end diff --git a/ios/platform/OneSignalCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalCore.framework/Versions/A/Headers/OneSignalRequest.h b/ios/platform/OneSignalCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalCore.framework/Versions/A/Headers/OneSignalRequest.h new file mode 100644 index 0000000..4e1b1fa --- /dev/null +++ b/ios/platform/OneSignalCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalCore.framework/Versions/A/Headers/OneSignalRequest.h @@ -0,0 +1,55 @@ +/** + * 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. + */ +#pragma clang diagnostic ignored "-Wnullability-completeness" +#pragma clang diagnostic ignored "-Wnullability-completeness" + +#import +#import "OneSignalCommonDefines.h" + + +#ifndef OneSignalRequest_h +#define OneSignalRequest_h + +/*Block for generic results on success and errors on failure*/ +typedef void (^OSResultSuccessBlock)(NSDictionary* result); +typedef void (^OSFailureBlock)(NSError* error); + +@interface OneSignalRequest : NSObject + +@property (nonatomic) BOOL disableLocalCaching; +@property (nonatomic) HTTPMethod method; +@property (strong, nonatomic, nonnull) NSString *path; +@property (strong, nonatomic, nullable) NSDictionary *parameters; +@property (strong, nonatomic, nullable) NSDictionary *additionalHeaders; +@property (nonatomic) int reattemptCount; +@property (nonatomic) BOOL dataRequest; //false for JSON based requests +-(BOOL)missingAppId; //for requests that don't require an appId parameter, the subclass should override this method and return false +-(NSMutableURLRequest * _Nonnull )urlRequest; + +@end + +#endif diff --git a/ios/platform/OneSignalCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalCore.framework/Versions/A/Headers/OneSignalTrackFirebaseAnalytics.h b/ios/platform/OneSignalCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalCore.framework/Versions/A/Headers/OneSignalTrackFirebaseAnalytics.h new file mode 100644 index 0000000..7cc3559 --- /dev/null +++ b/ios/platform/OneSignalCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalCore.framework/Versions/A/Headers/OneSignalTrackFirebaseAnalytics.h @@ -0,0 +1,39 @@ +/** + * 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 "OSNotificationClasses.h" + +@interface OneSignalTrackFirebaseAnalytics : NSObject ++(BOOL)libraryExists; ++(void)init; ++(void)updateFromDownloadParams:(NSDictionary*)params; + ++(void)trackOpenEvent:(OSNotificationOpenedResult*)results; ++(void)trackReceivedEvent:(OSNotification*)notification; ++(void)trackInfluenceOpenEvent; +@end diff --git a/ios/platform/OneSignalCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalCore.framework/Versions/A/Headers/OneSignalUserDefaults.h b/ios/platform/OneSignalCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalCore.framework/Versions/A/Headers/OneSignalUserDefaults.h new file mode 100644 index 0000000..89a03fe --- /dev/null +++ b/ios/platform/OneSignalCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalCore.framework/Versions/A/Headers/OneSignalUserDefaults.h @@ -0,0 +1,75 @@ +/** + * 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 + +@interface OneSignalUserDefaults : NSObject + +@property (strong, nonatomic, nullable) NSUserDefaults *userDefaults; + ++ (OneSignalUserDefaults * _Nonnull)initStandard; ++ (OneSignalUserDefaults * _Nonnull)initShared; + ++ (NSString * _Nonnull)appGroupName; + +- (BOOL)keyExists:(NSString * _Nonnull)key; + +- (void)removeValueForKey:(NSString * _Nonnull)key; + +// NSUserDefaults for storing and getting booleans +- (BOOL)getSavedBoolForKey:(NSString * _Nonnull)key defaultValue:(BOOL)value; +- (void)saveBoolForKey:(NSString * _Nonnull)key withValue:(BOOL)value; + +// NSUserDefaults for storing and getting strings +- (NSString * _Nullable)getSavedStringForKey:(NSString * _Nonnull)key defaultValue:(NSString * _Nullable)value; +- (void)saveStringForKey:(NSString * _Nonnull)key withValue:(NSString * _Nullable)value; + +// NSUserDefaults for storing and getting integers +- (NSInteger)getSavedIntegerForKey:(NSString * _Nonnull)key defaultValue:(NSInteger)value; +- (void)saveIntegerForKey:(NSString * _Nonnull)key withValue:(NSInteger)value; + +// NSUserDefaults for storing and getting doubles +- (double)getSavedDoubleForKey:(NSString * _Nonnull)key defaultValue:(double)value; +- (void)saveDoubleForKey:(NSString * _Nonnull)key withValue:(double)value; + +// NSUserDefaults for storing and getting sets +- (NSSet * _Nullable)getSavedSetForKey:(NSString * _Nonnull)key defaultValue:(NSSet * _Nullable)value; +- (void)saveSetForKey:(NSString * _Nonnull)key withValue:(NSSet * _Nullable)value; + +// NSUserDefaults for storing and getting dictionaries +- (NSDictionary * _Nullable)getSavedDictionaryForKey:(NSString * _Nonnull)key defaultValue:(NSDictionary * _Nullable)value; +- (void)saveDictionaryForKey:(NSString * _Nonnull)key withValue:(NSDictionary * _Nullable)value; + +// NSUserDefaults for storing and getting objects +- (id _Nullable)getSavedObjectForKey:(NSString * _Nonnull)key defaultValue:(id _Nullable)value; +- (void)saveObjectForKey:(NSString * _Nonnull)key withValue:(id _Nullable)value; + +// NSUserDefaults for storing and getting saved codeable data (custom objects) +- (id _Nullable)getSavedCodeableDataForKey:(NSString * _Nonnull)key defaultValue:(id _Nullable)value; +- (void)saveCodeableDataForKey:(NSString * _Nonnull)key withValue:(id _Nullable)value; + +@end diff --git a/ios/platform/OneSignalCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalCore.framework/Versions/A/Modules/module.modulemap b/ios/platform/OneSignalCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalCore.framework/Versions/A/Modules/module.modulemap new file mode 100644 index 0000000..dc0cd60 --- /dev/null +++ b/ios/platform/OneSignalCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalCore.framework/Versions/A/Modules/module.modulemap @@ -0,0 +1,6 @@ +framework module OneSignalCore { + umbrella header "OneSignalCore.h" + + export * + module * { export * } +} diff --git a/ios/platform/OneSignalCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalCore.framework/Versions/A/OneSignalCore b/ios/platform/OneSignalCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalCore.framework/Versions/A/OneSignalCore new file mode 100755 index 0000000..dbacf98 Binary files /dev/null and b/ios/platform/OneSignalCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalCore.framework/Versions/A/OneSignalCore differ diff --git a/ios/platform/OneSignalCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalCore.framework/Versions/A/Resources/Info.plist b/ios/platform/OneSignalCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalCore.framework/Versions/A/Resources/Info.plist new file mode 100644 index 0000000..3883310 --- /dev/null +++ b/ios/platform/OneSignalCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalCore.framework/Versions/A/Resources/Info.plist @@ -0,0 +1,50 @@ + + + + + BuildMachineOSBuild + 21G115 + CFBundleDevelopmentRegion + en + CFBundleExecutable + OneSignalCore + CFBundleIdentifier + com.onesignal.OneSignalCore + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + OneSignalCore + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0 + CFBundleSupportedPlatforms + + MacOSX + + CFBundleVersion + 1 + DTCompiler + com.apple.compilers.llvm.clang.1_0 + DTPlatformBuild + 13F100 + DTPlatformName + macosx + DTPlatformVersion + 12.3 + DTSDKBuild + 21E226 + DTSDKName + macosx12.3 + DTXcode + 1341 + DTXcodeBuild + 13F100 + LSMinimumSystemVersion + 10.15 + UIDeviceFamily + + 2 + + + diff --git a/ios/platform/OneSignalCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalCore.framework/Versions/A/_CodeSignature/CodeResources b/ios/platform/OneSignalCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalCore.framework/Versions/A/_CodeSignature/CodeResources new file mode 100644 index 0000000..4febf49 --- /dev/null +++ b/ios/platform/OneSignalCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalCore.framework/Versions/A/_CodeSignature/CodeResources @@ -0,0 +1,254 @@ + + + + + files + + Resources/Info.plist + + wGmu4bd6K/olz+9uB6WEEqIL0pQ= + + + files2 + + Headers/NSString+OneSignal.h + + hash2 + + qBhBU+sclS17YY3HDiZmbgqnTFtSJWm7tX4ThKcr3cM= + + + Headers/NSURL+OneSignal.h + + hash2 + + DC9WcVr/94eTh7NHtwKhA8C2fPJVJfY0nn9A6fuHGhA= + + + Headers/OSJSONHandling.h + + hash2 + + kwMvLl1JtYBgIUz5NHRrummY0mdnyAPM2lP6HtOGETw= + + + Headers/OSMacros.h + + hash2 + + aKanW/TgpNzztpIpYJVbnxfUUFcNJAolzoX8n0+EwJc= + + + Headers/OSNotification+Internal.h + + hash2 + + bz9UK/DGxP8LAEzMdBiUj0l9UsfhSo11AUAW6X1NfNQ= + + + Headers/OSNotification.h + + hash2 + + JOArzkdx1cCGHN5R6ITF+D2e8x/s5HVzQNEl26Gxdfg= + + + Headers/OSNotificationClasses.h + + hash2 + + TfTvbYwUILlXsIfPJ92tgrhSS23UTibhhKt6j4Q984U= + + + Headers/OSPrivacyConsentController.h + + hash2 + + Nl0w50EzXPgal1ghTEM3QIoYLzOYHH195NTzq3Zlvmo= + + + Headers/OSRequests.h + + hash2 + + YdFlpQOMH+9m9N627gcvPVwShSPrBzKvDm3E3FCYHvk= + + + Headers/OneSignalClient.h + + hash2 + + cbF3Wa3Lqa0Wb2275ot3ploX1KXQ+znQBiBOu0TzV6M= + + + Headers/OneSignalCommonDefines.h + + hash2 + + cdunHi7N1J8gJfTDwI5B4v8EIL2G6WSPjJzrU9SxP6Y= + + + Headers/OneSignalCore.h + + hash2 + + uLAWfHauq9MJASOHxa8O6emo1oXTfJcLShIdOAUxG88= + + + Headers/OneSignalCoreHelper.h + + hash2 + + vK6D0j+ZbW5ycXiO3jb9aLvluPdvyYGxCSFl1gkVp14= + + + Headers/OneSignalLog.h + + hash2 + + fXXHmsA5in9ZjZz8sHnl3WaN/xiOjw63toiJ0AzJTE4= + + + Headers/OneSignalRequest.h + + hash2 + + 69iw4bnJGwQNk11KAchyrRMPCM6Rf4C9Wvn+HMnTCXc= + + + Headers/OneSignalTrackFirebaseAnalytics.h + + hash2 + + VCgGIHlXYAQKerOcmqkIesJ+B+oWLXQya/3m1cYjnKc= + + + Headers/OneSignalUserDefaults.h + + hash2 + + QIYtzchiCKQguyJOSY6PEhV0H98JRi2PdXSBmZxxLN4= + + + Modules/module.modulemap + + hash2 + + K44cM22FGB3rV1SaGqR0xQQBO01/YgeIVYiCCcvFnOU= + + + Resources/Info.plist + + hash2 + + 3udMyvHp/sxaVK/QGHPUGGPAA+AT5c/4SWFXwLxpcNc= + + + + 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/platform/OneSignalCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalCore.framework/Versions/Current b/ios/platform/OneSignalCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalCore.framework/Versions/Current new file mode 120000 index 0000000..8c7e5a6 --- /dev/null +++ b/ios/platform/OneSignalCore.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalCore.framework/Versions/Current @@ -0,0 +1 @@ +A \ No newline at end of file diff --git a/ios/platform/OneSignalOutcomes.xcframework/Info.plist b/ios/platform/OneSignalOutcomes.xcframework/Info.plist new file mode 100644 index 0000000..a736624 --- /dev/null +++ b/ios/platform/OneSignalOutcomes.xcframework/Info.plist @@ -0,0 +1,58 @@ + + + + + AvailableLibraries + + + LibraryIdentifier + ios-arm64_x86_64-maccatalyst + LibraryPath + OneSignalOutcomes.framework + SupportedArchitectures + + arm64 + x86_64 + + SupportedPlatform + ios + SupportedPlatformVariant + maccatalyst + + + LibraryIdentifier + ios-arm64_armv7_armv7s + LibraryPath + OneSignalOutcomes.framework + SupportedArchitectures + + arm64 + armv7 + armv7s + + SupportedPlatform + ios + + + LibraryIdentifier + ios-arm64_i386_x86_64-simulator + LibraryPath + OneSignalOutcomes.framework + SupportedArchitectures + + arm64 + i386 + x86_64 + + SupportedPlatform + ios + SupportedPlatformVariant + simulator + + + CFBundlePackageType + XFWK + XCFrameworkFormatVersion + 1.0 + + diff --git a/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_armv7_armv7s/OneSignalOutcomes.framework/Headers/OSCachedUniqueOutcome.h b/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_armv7_armv7s/OneSignalOutcomes.framework/Headers/OSCachedUniqueOutcome.h new file mode 100644 index 0000000..4de21c2 --- /dev/null +++ b/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_armv7_armv7s/OneSignalOutcomes.framework/Headers/OSCachedUniqueOutcome.h @@ -0,0 +1,40 @@ +/** + 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 "OSInfluence.h" + +@interface OSCachedUniqueOutcome : NSObject + +@property (nonatomic, readonly) NSString *name; +@property (nonatomic, readonly) NSString *uniqueId; +@property (nonatomic, readonly) NSNumber *timestamp; // seconds +@property (nonatomic, readonly) OSInfluenceChannel channel; + +- (id)initWithParamsName:(NSString *)name uniqueId:(NSString *)uniqueId channel:(OSInfluenceChannel)channel; +- (id)initWithParamsName:(NSString *)name uniqueId:(NSString *)uniqueId timestamp:(NSNumber *)timestamp channel:(OSInfluenceChannel)channel; + +@end diff --git a/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_armv7_armv7s/OneSignalOutcomes.framework/Headers/OSChannelTracker.h b/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_armv7_armv7s/OneSignalOutcomes.framework/Headers/OSChannelTracker.h new file mode 100644 index 0000000..8d2a158 --- /dev/null +++ b/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_armv7_armv7s/OneSignalOutcomes.framework/Headers/OSChannelTracker.h @@ -0,0 +1,56 @@ +/** +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 "OSInfluenceDataRepository.h" +#import "OSInfluence.h" + +#ifndef OSChannelTracker_h +#define OSChannelTracker_h + +@interface OSChannelTracker : NSObject + +@property (nonatomic, readwrite) OSInfluenceType influenceType; +@property (strong, nonatomic, readwrite, nullable) NSString *directId; +@property (strong, nonatomic, readwrite, nullable) NSArray *indirectIds; +@property (strong, nonatomic, readonly, nonnull) OSInfluenceDataRepository *dataRepository; + +- (id _Nonnull)initWithRepository:(OSInfluenceDataRepository * _Nonnull)dataRepository; + +- (NSString * _Nonnull)idTag; + +- (void)initInfluencedTypeFromCache; +- (void)cacheState; +- (void)resetAndInitInfluence; + +- (NSArray * _Nonnull)lastReceivedIds; +- (void)saveLastId:(NSString *_Nullable)lastId; + +- (OSInfluence *_Nonnull)currentSessionInfluence; + +@end + +#endif /* OSChannelTracker_h */ diff --git a/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_armv7_armv7s/OneSignalOutcomes.framework/Headers/OSInAppMessageOutcome.h b/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_armv7_armv7s/OneSignalOutcomes.framework/Headers/OSInAppMessageOutcome.h new file mode 100644 index 0000000..94998b4 --- /dev/null +++ b/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_armv7_armv7s/OneSignalOutcomes.framework/Headers/OSInAppMessageOutcome.h @@ -0,0 +1,49 @@ +/** + * 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 OSInAppMessageOutcome_h +#define OSInAppMessageOutcome_h + +#import +#import + +@interface OSInAppMessageOutcome : NSObject + +@property (strong, nonatomic, nonnull) NSString *name; +@property (strong, nonatomic, nonnull) NSNumber *weight; +@property (nonatomic) BOOL unique; + +// Convert the class into a NSDictionary +- (NSDictionary *_Nonnull)jsonRepresentation; + +@end + +@interface OSInAppMessageOutcome () + +@end + +#endif /* OSInAppMessageOutcome_h */ diff --git a/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_armv7_armv7s/OneSignalOutcomes.framework/Headers/OSIndirectInfluence.h b/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_armv7_armv7s/OneSignalOutcomes.framework/Headers/OSIndirectInfluence.h new file mode 100644 index 0000000..840c75e --- /dev/null +++ b/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_armv7_armv7s/OneSignalOutcomes.framework/Headers/OSIndirectInfluence.h @@ -0,0 +1,38 @@ +/** + 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 + +@interface OSIndirectInfluence : NSObject + +@property (nonatomic, readonly) NSString *channelIdTag; +@property (nonatomic, readonly) NSString *influenceId; +@property (nonatomic, readonly) double timestamp; // seconds + +- (id)initWithParamsInfluenceId:(NSString *)influenceId forChannel:(NSString *)channelIdTag timestamp:(double)timestamp; + +@end diff --git a/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_armv7_armv7s/OneSignalOutcomes.framework/Headers/OSInfluence.h b/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_armv7_armv7s/OneSignalOutcomes.framework/Headers/OSInfluence.h new file mode 100644 index 0000000..cd1b4f2 --- /dev/null +++ b/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_armv7_armv7s/OneSignalOutcomes.framework/Headers/OSInfluence.h @@ -0,0 +1,68 @@ +/** +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 OSInfluence_h +#define OSInfluence_h + +/* OneSignal Influence Types */ +typedef NS_ENUM(NSUInteger, OSInfluenceType) { + DIRECT, + INDIRECT, + UNATTRIBUTED, + DISABLED +}; +/* OneSignal Influence Channels */ +typedef NS_ENUM(NSUInteger, OSInfluenceChannel) { + IN_APP_MESSAGE, + NOTIFICATION, +}; + +@interface OSInfluenceBuilder : NSObject + +@property (nonatomic) OSInfluenceChannel influenceChannel; +@property (nonatomic) OSInfluenceType influenceType; +@property (nonatomic, copy) NSArray * _Nullable ids; + +@end + +@interface OSInfluence : NSObject + +@property (nonatomic, readonly) OSInfluenceChannel influenceChannel; +@property (nonatomic, readonly) OSInfluenceType influenceType; +@property (nonatomic, readwrite) NSArray * _Nullable ids; + +- (id _Nonnull)initWithBuilder:(OSInfluenceBuilder * _Nonnull)builder; + +- (OSInfluence * _Nonnull)copy; +- (BOOL)isAttributedInfluence; +- (BOOL)isDirectInfluence; +- (BOOL)isIndirectInfluence; +- (BOOL)isUnattributedInfluence; + +@end + +#endif /* OSInfluence_h */ diff --git a/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_armv7_armv7s/OneSignalOutcomes.framework/Headers/OSInfluenceDataDefines.h b/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_armv7_armv7s/OneSignalOutcomes.framework/Headers/OSInfluenceDataDefines.h new file mode 100644 index 0000000..a97764f --- /dev/null +++ b/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_armv7_armv7s/OneSignalOutcomes.framework/Headers/OSInfluenceDataDefines.h @@ -0,0 +1,46 @@ +/** + 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. + */ + +#ifndef OSInfluenceDataDefines_h +#define OSInfluenceDataDefines_h + +// Influence param keys +static NSString* const OUTCOMES_PARAM = @"outcomes"; +static NSString* const DIRECT_PARAM = @"direct"; +static NSString* const INDIRECT_PARAM = @"indirect"; +static NSString* const UNATTRIBUTED_PARAM = @"unattributed"; +static NSString* const ENABLED_PARAM = @"enabled"; +static NSString* const NOTIFICATION_ATTRIBUTION_PARAM = @"notification_attribution"; +static NSString* const IAM_ATTRIBUTION_PARAM = @"in_app_message_attribution"; +static NSString* const MINUTES_SINCE_DISPLAYED_PARAM = @"minutes_since_displayed"; +static NSString* const LIMIT_PARAM = @"limit"; + +// Influence default param values +static int DEFAULT_INDIRECT_NOTIFICATION_LIMIT = 10; +static int DEFAULT_INDIRECT_ATTRIBUTION_WINDOW = 24 * 60; + +#endif /* OSInfluenceDataDefines_h */ diff --git a/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_armv7_armv7s/OneSignalOutcomes.framework/Headers/OSInfluenceDataRepository.h b/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_armv7_armv7s/OneSignalOutcomes.framework/Headers/OSInfluenceDataRepository.h new file mode 100644 index 0000000..906b595 --- /dev/null +++ b/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_armv7_armv7s/OneSignalOutcomes.framework/Headers/OSInfluenceDataRepository.h @@ -0,0 +1,64 @@ +/** +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 "OSInfluence.h" + +@interface OSInfluenceDataRepository : NSObject + ++ (OSInfluenceDataRepository * _Nonnull)sharedInfluenceDataRepository; + +- (void)cacheNotificationInfluenceType:(OSInfluenceType) influenceType; +- (OSInfluenceType)notificationCachedInfluenceType; + +- (void)cacheIAMInfluenceType:(OSInfluenceType) influenceType; +- (OSInfluenceType)iamCachedInfluenceType; + +- (void)cacheNotificationOpenId:(NSString * _Nullable)notificationId; +- (NSString * _Nullable)cachedNotificationOpenId; + +- (void)cacheIndirectNotifications:(NSArray * _Nullable)notifications; +- (NSArray * _Nullable)cachedIndirectNotifications; + +- (void)saveNotifications:(NSArray * _Nullable)notifications; +- (NSArray * _Nullable)lastNotificationsReceivedData; + +- (void)saveIAMs:(NSArray * _Nullable)iams; +- (NSArray * _Nullable)lastIAMsReceivedData; + +- (NSInteger)notificationLimit; +- (NSInteger)iamLimit; + +- (NSInteger)notificationIndirectAttributionWindow; +- (NSInteger)iamIndirectAttributionWindow; + +- (BOOL)isDirectInfluenceEnabled; +- (BOOL)isIndirectInfluenceEnabled; +- (BOOL)isUnattributedInfluenceEnabled; + +- (void)saveInfluenceParams:(NSDictionary * _Nonnull)params; + +@end diff --git a/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_armv7_armv7s/OneSignalOutcomes.framework/Headers/OSOutcomeEvent.h b/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_armv7_armv7s/OneSignalOutcomes.framework/Headers/OSOutcomeEvent.h new file mode 100644 index 0000000..fbf4def --- /dev/null +++ b/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_armv7_armv7s/OneSignalOutcomes.framework/Headers/OSOutcomeEvent.h @@ -0,0 +1,68 @@ +/** + 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 "OSOutcomeEventParams.h" +#import "OSInfluence.h" +#import + +@interface OSOutcomeEvent : NSObject + +// Session enum (DIRECT, INDIRECT, UNATTRIBUTED, or DISABLED) to determine code route and request params +@property (nonatomic) OSInfluenceType session; + +// Notification ids for the current session +@property (strong, nonatomic, nullable) NSArray *notificationIds; + +// Id or name of the event +@property (strong, nonatomic, nonnull) NSString *name; + +// Time of the event occurring +@property (strong, nonatomic, nonnull) NSNumber *timestamp; + +// A weight to attach to the outcome name +@property (strong, nonatomic, nonnull) NSDecimalNumber *weight; + +// Convert the object into a NSDictionary +- (NSDictionary * _Nonnull)jsonRepresentation; + +@end + +@interface OSOutcomeEvent () + +- (id _Nonnull)initWithSession:(OSInfluenceType)session + notificationIds:(NSArray * _Nullable)notificationIds + name:(NSString * _Nonnull)name + timestamp:(NSNumber * _Nonnull)timestamp + weight:(NSNumber * _Nonnull)value; + +- (id _Nonnull)initFromOutcomeEventParams:(OSOutcomeEventParams * _Nonnull)eventParams; + +@end + +/*Block for handling outcome event being sent successfully*/ +typedef void (^OSSendOutcomeSuccess)(OSOutcomeEvent* _Nullable outcome); diff --git a/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_armv7_armv7s/OneSignalOutcomes.framework/Headers/OSOutcomeEventParams.h b/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_armv7_armv7s/OneSignalOutcomes.framework/Headers/OSOutcomeEventParams.h new file mode 100644 index 0000000..03c98a7 --- /dev/null +++ b/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_armv7_armv7s/OneSignalOutcomes.framework/Headers/OSOutcomeEventParams.h @@ -0,0 +1,46 @@ +/** +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 "OSOutcomeSource.h" + +#ifndef OSOutcomeEventParams_h +#define OSOutcomeEventParams_h + +@interface OSOutcomeEventParams : NSObject + +@property (strong, nonatomic, readwrite) NSString *outcomeId; +@property (strong, nonatomic, readwrite) OSOutcomeSource *outcomeSource; +@property (strong, nonatomic, readwrite) NSNumber *weight; +@property (strong, nonatomic, readwrite) NSNumber *timestamp; + +- (id)initWithOutcomeId:(NSString *)outcomeId outcomeSource:(OSOutcomeSource *)outcomeSource weight:(NSNumber *)weight timestamp:(NSNumber *)timestamp; + +- (NSDictionary *)toDictionaryObject; + +@end + +#endif /* OSOutcomeEventParams_h */ diff --git a/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_armv7_armv7s/OneSignalOutcomes.framework/Headers/OSOutcomeEventsCache.h b/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_armv7_armv7s/OneSignalOutcomes.framework/Headers/OSOutcomeEventsCache.h new file mode 100644 index 0000000..1d8241f --- /dev/null +++ b/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_armv7_armv7s/OneSignalOutcomes.framework/Headers/OSOutcomeEventsCache.h @@ -0,0 +1,46 @@ +/** +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 OSOutcomeEventsCache_h +#define OSOutcomeEventsCache_h + +@interface OSOutcomeEventsCache : NSObject + ++ (OSOutcomeEventsCache * _Nonnull)sharedOutcomeEventsCache; + +- (BOOL)isOutcomesV2ServiceEnabled; +- (void)saveOutcomesV2ServiceEnabled:(BOOL)isEnabled; + +- (NSSet * _Nullable)getUnattributedUniqueOutcomeEventsSent; +- (void)saveUnattributedUniqueOutcomeEventsSent:(NSSet * _Nullable)unattributedUniqueOutcomeEventsSentSet; + +- (NSArray * _Nullable)getAttributedUniqueOutcomeEventSent; +- (void)saveAttributedUniqueOutcomeEventNotificationIds:(NSArray * _Nullable)attributedUniqueOutcomeEventNotificationIdsSent; + +@end + +#endif /* OSOutcomeEventsCache_h */ diff --git a/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_armv7_armv7s/OneSignalOutcomes.framework/Headers/OSOutcomeEventsFactory.h b/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_armv7_armv7s/OneSignalOutcomes.framework/Headers/OSOutcomeEventsFactory.h new file mode 100644 index 0000000..cfe93c3 --- /dev/null +++ b/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_armv7_armv7s/OneSignalOutcomes.framework/Headers/OSOutcomeEventsFactory.h @@ -0,0 +1,42 @@ +/** +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 "OSOutcomeEventsRepository.h" +#import "OSOutcomeEventsCache.h" + +#ifndef OSOutcomeEventsFactory_h +#define OSOutcomeEventsFactory_h + +@interface OSOutcomeEventsFactory : NSObject + +- (id _Nonnull)initWithCache:(OSOutcomeEventsCache * _Nonnull)cache; + +- (OSOutcomeEventsRepository * _Nonnull)repository; + +@end + +#endif /* OSOutcomeEventsFactory_h */ diff --git a/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_armv7_armv7s/OneSignalOutcomes.framework/Headers/OSOutcomeEventsRepository.h b/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_armv7_armv7s/OneSignalOutcomes.framework/Headers/OSOutcomeEventsRepository.h new file mode 100644 index 0000000..a109e56 --- /dev/null +++ b/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_armv7_armv7s/OneSignalOutcomes.framework/Headers/OSOutcomeEventsRepository.h @@ -0,0 +1,55 @@ +/** +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 "OSOutcomeEventParams.h" +#import "OSInfluence.h" +#import "OSOutcomeEventsCache.h" +#import + +#ifndef OSOutcomeEventsRepository_h +#define OSOutcomeEventsRepository_h + +@interface OSOutcomeEventsRepository : NSObject + +@property (strong, nonatomic, readonly, nonnull) OSOutcomeEventsCache *outcomeEventsCache; + +- (id _Nonnull)initWithCache:(OSOutcomeEventsCache * _Nonnull)outcomeEventsCache; +- (void)requestMeasureOutcomeEventWithAppId:(NSString * _Nonnull)appId + deviceType:(NSNumber * _Nonnull)deviceType + event:(OSOutcomeEventParams * _Nonnull)event + onSuccess:(OSResultSuccessBlock _Nonnull)successBlock + onFailure:(OSFailureBlock _Nonnull)failureBlock; + +- (NSSet * _Nullable)getUnattributedUniqueOutcomeEventsSent; +- (void)saveUnattributedUniqueOutcomeEventsSent:(NSSet * _Nullable)unattributedUniqueOutcomeEventsSentSet; + +- (NSArray * _Nonnull)getNotCachedUniqueInfluencesForOutcome:(NSString * _Nonnull)name influences:(NSArray * _Nonnull)influences; +- (void)saveUniqueOutcomeEventParams:(OSOutcomeEventParams * _Nonnull)eventParams; + +@end + +#endif /* OSOutcomeEventsRepository_h */ diff --git a/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_armv7_armv7s/OneSignalOutcomes.framework/Headers/OSOutcomeSource.h b/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_armv7_armv7s/OneSignalOutcomes.framework/Headers/OSOutcomeSource.h new file mode 100644 index 0000000..683c2a4 --- /dev/null +++ b/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_armv7_armv7s/OneSignalOutcomes.framework/Headers/OSOutcomeSource.h @@ -0,0 +1,44 @@ +/** +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 "OSOutcomeSourceBody.h" + +#ifndef OSOutcomeSource_h +#define OSOutcomeSource_h + +@interface OSOutcomeSource : NSObject + +@property (strong, nonatomic, readwrite) OSOutcomeSourceBody *directBody; +@property (strong, nonatomic, readwrite) OSOutcomeSourceBody *indirectBody; + +- (id)initWithDirectBody:(OSOutcomeSourceBody *)directBody indirectBody:(OSOutcomeSourceBody *)indirectBody; + +- (NSDictionary *)toDictionaryObject; + +@end + +#endif /* OSOutcomeSource_h */ diff --git a/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_armv7_armv7s/OneSignalOutcomes.framework/Headers/OSOutcomeSourceBody.h b/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_armv7_armv7s/OneSignalOutcomes.framework/Headers/OSOutcomeSourceBody.h new file mode 100644 index 0000000..8959d7c --- /dev/null +++ b/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_armv7_armv7s/OneSignalOutcomes.framework/Headers/OSOutcomeSourceBody.h @@ -0,0 +1,42 @@ +/** +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 OSOutcomeSourceBody_h +#define OSOutcomeSourceBody_h + +@interface OSOutcomeSourceBody : NSObject + +@property (strong, nonatomic, readwrite) NSArray *notificationIds; +@property (strong, nonatomic, readwrite) NSArray *inAppMessagesIds; + +- (id)initWithNotificationIds:(NSArray *)notificationIds inAppMessagesIds:(NSArray *)inAppMessagesIds; + +- (NSDictionary *)toDictionaryObject; + +@end + +#endif /* OSOutcomeSourceBody_h */ diff --git a/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_armv7_armv7s/OneSignalOutcomes.framework/Headers/OSSessionManager.h b/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_armv7_armv7s/OneSignalOutcomes.framework/Headers/OSSessionManager.h new file mode 100644 index 0000000..7e35c39 --- /dev/null +++ b/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_armv7_armv7s/OneSignalOutcomes.framework/Headers/OSSessionManager.h @@ -0,0 +1,58 @@ +/** + 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 "OSInfluence.h" +#import "OSTrackerFactory.h" + +@protocol SessionStatusDelegate + ++ (void)onSessionEnding:(NSArray * _Nonnull)lastInfluences; + +@end + +@interface OSSessionManager : NSObject + ++ (OSSessionManager * _Nonnull)sharedSessionManager; + ++ (void)resetSharedSessionManager; + +@property (nonatomic) id _Nullable delegate; + +- (instancetype _Nonnull)init:(Class _Nullable)delegate withTrackerFactory:(OSTrackerFactory *_Nonnull)trackerFactory; + +- (NSArray *_Nonnull)getInfluences; +- (NSArray *_Nonnull)getSessionInfluences; +- (void)initSessionFromCache; +- (void)restartSessionIfNeeded:(AppEntryAction)entryAction; +- (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; + +@end diff --git a/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_armv7_armv7s/OneSignalOutcomes.framework/Headers/OSTrackerFactory.h b/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_armv7_armv7s/OneSignalOutcomes.framework/Headers/OSTrackerFactory.h new file mode 100644 index 0000000..646123f --- /dev/null +++ b/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_armv7_armv7s/OneSignalOutcomes.framework/Headers/OSTrackerFactory.h @@ -0,0 +1,49 @@ +/** +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 "OSInfluenceDataRepository.h" +#import "OSInfluence.h" +#import "OSChannelTracker.h" +#import + + +@interface OSTrackerFactory : NSObject + ++ (OSTrackerFactory* _Nonnull)sharedTrackerFactory; + +- (id _Nonnull)initWithRepository:(OSInfluenceDataRepository * _Nonnull)dataRepository; +- (void)saveInfluenceParams:(NSDictionary * _Nonnull)params; +- (void)initFromCache; +- (NSArray * _Nonnull)influences; +- (NSArray * _Nonnull)sessionInfluences; +- (OSChannelTracker * _Nonnull)iamChannelTracker; +- (OSChannelTracker * _Nonnull)notificationChannelTracker; +- (OSChannelTracker * _Nullable)channelByEntryAction:(AppEntryAction)entryAction; +- (NSArray * _Nonnull)channels; +- (NSArray * _Nonnull)channelsToResetByEntryAction:(AppEntryAction)entryAction; + +@end diff --git a/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_armv7_armv7s/OneSignalOutcomes.framework/Headers/OneSignalOutcomeEventsController.h b/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_armv7_armv7s/OneSignalOutcomes.framework/Headers/OneSignalOutcomeEventsController.h new file mode 100644 index 0000000..f99c5ce --- /dev/null +++ b/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_armv7_armv7s/OneSignalOutcomes.framework/Headers/OneSignalOutcomeEventsController.h @@ -0,0 +1,61 @@ +/** + 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 "OSSessionManager.h" +#import "OSOutcomeEventsFactory.h" +#import "OSInAppMessageOutcome.h" +#import "OSOutcomeEvent.h" + +@interface OneSignalOutcomeEventsController : NSObject + +- (instancetype _Nonnull)initWithSessionManager:(OSSessionManager * _Nonnull)sessionManager + outcomeEventsFactory:(OSOutcomeEventsFactory *_Nonnull)outcomeEventsFactory; + +- (void)clearOutcomes; + +- (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 + 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; + +@end diff --git a/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_armv7_armv7s/OneSignalOutcomes.framework/Headers/OneSignalOutcomes.h b/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_armv7_armv7s/OneSignalOutcomes.framework/Headers/OneSignalOutcomes.h new file mode 100644 index 0000000..e673d43 --- /dev/null +++ b/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_armv7_armv7s/OneSignalOutcomes.framework/Headers/OneSignalOutcomes.h @@ -0,0 +1,47 @@ +/* + 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 "OSSessionManager.h" +#import "OSInfluence.h" +#import "OSIndirectInfluence.h" +#import "OSInAppMessageOutcome.h" +#import "OSOutcomeEvent.h" +#import "OSInfluenceDataDefines.h" +#import "OSOutcomeEventsCache.h" +#import "OSCachedUniqueOutcome.h" +#import "OneSignalOutcomeEventsController.h" +#import "OSInfluenceDataRepository.h" +#import "OSOutcomeEventsFactory.h" +#import "OSTrackerFactory.h" +#import "OSOutcomeEventsRepository.h" + +@interface OneSignalOutcomes : NSObject ++ (void)migrate; +@end + diff --git a/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_armv7_armv7s/OneSignalOutcomes.framework/Info.plist b/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_armv7_armv7s/OneSignalOutcomes.framework/Info.plist new file mode 100644 index 0000000..5857309 Binary files /dev/null and b/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_armv7_armv7s/OneSignalOutcomes.framework/Info.plist differ diff --git a/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_armv7_armv7s/OneSignalOutcomes.framework/Modules/module.modulemap b/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_armv7_armv7s/OneSignalOutcomes.framework/Modules/module.modulemap new file mode 100644 index 0000000..3ba965f --- /dev/null +++ b/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_armv7_armv7s/OneSignalOutcomes.framework/Modules/module.modulemap @@ -0,0 +1,6 @@ +framework module OneSignalOutcomes { + umbrella header "OneSignalOutcomes.h" + + export * + module * { export * } +} diff --git a/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_armv7_armv7s/OneSignalOutcomes.framework/OneSignalOutcomes b/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_armv7_armv7s/OneSignalOutcomes.framework/OneSignalOutcomes new file mode 100755 index 0000000..8ae12f3 Binary files /dev/null and b/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_armv7_armv7s/OneSignalOutcomes.framework/OneSignalOutcomes differ diff --git a/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_armv7_armv7s/OneSignalOutcomes.framework/_CodeSignature/CodeResources b/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_armv7_armv7s/OneSignalOutcomes.framework/_CodeSignature/CodeResources new file mode 100644 index 0000000..4412d0b --- /dev/null +++ b/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_armv7_armv7s/OneSignalOutcomes.framework/_CodeSignature/CodeResources @@ -0,0 +1,387 @@ + + + + + files + + Headers/OSCachedUniqueOutcome.h + + QQP7NOxbPFL98LkulmK/wbUMQvU= + + Headers/OSChannelTracker.h + + ArLQCzgIq/OhHDNMS3QUpcgiIqU= + + Headers/OSInAppMessageOutcome.h + + 3xT4e/4T3OhG7IenJ42EGs9MroU= + + Headers/OSIndirectInfluence.h + + hwbzVrvNLt3XPES9eE8prBs5T+0= + + Headers/OSInfluence.h + + JhZlas0LGEFoQfTqv25sUlZznns= + + Headers/OSInfluenceDataDefines.h + + GeTi9WmITIbwf/P/2HBBYvfi2xM= + + Headers/OSInfluenceDataRepository.h + + zEIQwZXZL2ANP3t0dT4rkZ8FCpA= + + Headers/OSOutcomeEvent.h + + PPHv3rveisEsvRH9qzs+jrf85lc= + + Headers/OSOutcomeEventParams.h + + lJiE/gYGGmN5fH+SaaqT5vfHPog= + + Headers/OSOutcomeEventsCache.h + + xJtU7JLpDgHjBUbaiE8SnnXGCiQ= + + Headers/OSOutcomeEventsFactory.h + + b6vJ4AsamqL5CARZVfsSVEQNG68= + + Headers/OSOutcomeEventsRepository.h + + o/1Eb25yqP71kTECIELL9hYSsm8= + + Headers/OSOutcomeSource.h + + xCZ3YOQZkpvFUCcVdbyctku3KLQ= + + Headers/OSOutcomeSourceBody.h + + Z+APpNEoh0EeAHT5zbazL/Ctm3c= + + Headers/OSSessionManager.h + + b2/LI60ct+svisyN/9N4P5hk3zc= + + Headers/OSTrackerFactory.h + + 4sUyvIDmirrXETvMsEpZ29aR1pI= + + Headers/OneSignalOutcomeEventsController.h + + sD4f/g7VkNo0X2aZKE5/DVsacj4= + + Headers/OneSignalOutcomes.h + + sW/MH6o2HgmQVEWrbtmDRuL4+dA= + + Info.plist + + xJ7nleT8k2+0bVwtJw3mKiW12Vg= + + Modules/module.modulemap + + W87fybpsrxqJLygJ5rCH+jsvEik= + + + files2 + + Headers/OSCachedUniqueOutcome.h + + hash + + QQP7NOxbPFL98LkulmK/wbUMQvU= + + hash2 + + totu1nQ6/x4iFLCj1sa0l/+/yxIYwiM3vG0tUTwmaqs= + + + Headers/OSChannelTracker.h + + hash + + ArLQCzgIq/OhHDNMS3QUpcgiIqU= + + hash2 + + y+P1oKzfvURE+SVKSVr4j6/jH8DgujNwXv1hKuO1EAE= + + + Headers/OSInAppMessageOutcome.h + + hash + + 3xT4e/4T3OhG7IenJ42EGs9MroU= + + hash2 + + 6kjvfIl+pf/78MxrtV/Sqy17OmVUmw8+rYEgjDHXNWE= + + + Headers/OSIndirectInfluence.h + + hash + + hwbzVrvNLt3XPES9eE8prBs5T+0= + + hash2 + + n3sfj9ffeEbvDhJzT28iKptXmEQRbSVWSvDeMisJmsc= + + + Headers/OSInfluence.h + + hash + + JhZlas0LGEFoQfTqv25sUlZznns= + + hash2 + + tjQiNzfx4rDkTwjfykGUHZYyZQOTnKPILoqHIDd/2ic= + + + Headers/OSInfluenceDataDefines.h + + hash + + GeTi9WmITIbwf/P/2HBBYvfi2xM= + + hash2 + + iQMoFhEUbxG3EpUfUTH/khO6IrPhWKvvXnku47XTZdc= + + + Headers/OSInfluenceDataRepository.h + + hash + + zEIQwZXZL2ANP3t0dT4rkZ8FCpA= + + hash2 + + knk1+sZ0qZOmSkq4A3Ej5R1dtUJ+36O8oS7eBPIwo/s= + + + Headers/OSOutcomeEvent.h + + hash + + PPHv3rveisEsvRH9qzs+jrf85lc= + + hash2 + + dEM+sqMVSwAGR7Se/gj9TDcGizX0trTRktNyjvxHp/M= + + + Headers/OSOutcomeEventParams.h + + hash + + lJiE/gYGGmN5fH+SaaqT5vfHPog= + + hash2 + + 1ba84vOacDL3dvfPb9QuuJrPbNIKMtO5uAFP8fQXVQg= + + + Headers/OSOutcomeEventsCache.h + + hash + + xJtU7JLpDgHjBUbaiE8SnnXGCiQ= + + hash2 + + N6az4wqlL4oB+ugOXVU1xgJMCuABHcDKVi5XAV6e/GU= + + + Headers/OSOutcomeEventsFactory.h + + hash + + b6vJ4AsamqL5CARZVfsSVEQNG68= + + hash2 + + B9zLkhrLlC2+UdJh/XfEHYstpiw8n4y2rH/kdw/ob5A= + + + Headers/OSOutcomeEventsRepository.h + + hash + + o/1Eb25yqP71kTECIELL9hYSsm8= + + hash2 + + REkrumsrQPze19CbYkIMpr/Xb0y8y6i4Ytyk9J30qMY= + + + Headers/OSOutcomeSource.h + + hash + + xCZ3YOQZkpvFUCcVdbyctku3KLQ= + + hash2 + + W8Ekd6VjML7ZnahaytXqSaHRU+B6kBF5OakKQOrQstQ= + + + Headers/OSOutcomeSourceBody.h + + hash + + Z+APpNEoh0EeAHT5zbazL/Ctm3c= + + hash2 + + X1aTd7m6pBhX97KiK9OYccGmdoBVHXFdtNIUegnZ+2s= + + + Headers/OSSessionManager.h + + hash + + b2/LI60ct+svisyN/9N4P5hk3zc= + + hash2 + + PqGFeWJieWBjFVlo9hW6K3zw3EROosJ9GekCpVrw87U= + + + Headers/OSTrackerFactory.h + + hash + + 4sUyvIDmirrXETvMsEpZ29aR1pI= + + hash2 + + e38XG+rnmKSpSyDmrN4/Mc4+zLBKKWQ6+gexB9VHFKg= + + + Headers/OneSignalOutcomeEventsController.h + + hash + + sD4f/g7VkNo0X2aZKE5/DVsacj4= + + hash2 + + 2LLCLqre2Yz61h0Ir/t5whNSGEa/8+9QKJx8WZ/15CQ= + + + Headers/OneSignalOutcomes.h + + hash + + sW/MH6o2HgmQVEWrbtmDRuL4+dA= + + hash2 + + GFLvc7yAjjvzpcTn4DOvrAd+0+BacOygATaFNR719s0= + + + Modules/module.modulemap + + hash + + W87fybpsrxqJLygJ5rCH+jsvEik= + + hash2 + + 71NgarV0pwtZTDET32aMQ3/vjxGUawYZx/s2o2jI064= + + + + 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/platform/OneSignalOutcomes.xcframework/ios-arm64_i386_x86_64-simulator/OneSignalOutcomes.framework/Headers/OSCachedUniqueOutcome.h b/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_i386_x86_64-simulator/OneSignalOutcomes.framework/Headers/OSCachedUniqueOutcome.h new file mode 100644 index 0000000..4de21c2 --- /dev/null +++ b/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_i386_x86_64-simulator/OneSignalOutcomes.framework/Headers/OSCachedUniqueOutcome.h @@ -0,0 +1,40 @@ +/** + 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 "OSInfluence.h" + +@interface OSCachedUniqueOutcome : NSObject + +@property (nonatomic, readonly) NSString *name; +@property (nonatomic, readonly) NSString *uniqueId; +@property (nonatomic, readonly) NSNumber *timestamp; // seconds +@property (nonatomic, readonly) OSInfluenceChannel channel; + +- (id)initWithParamsName:(NSString *)name uniqueId:(NSString *)uniqueId channel:(OSInfluenceChannel)channel; +- (id)initWithParamsName:(NSString *)name uniqueId:(NSString *)uniqueId timestamp:(NSNumber *)timestamp channel:(OSInfluenceChannel)channel; + +@end diff --git a/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_i386_x86_64-simulator/OneSignalOutcomes.framework/Headers/OSChannelTracker.h b/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_i386_x86_64-simulator/OneSignalOutcomes.framework/Headers/OSChannelTracker.h new file mode 100644 index 0000000..8d2a158 --- /dev/null +++ b/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_i386_x86_64-simulator/OneSignalOutcomes.framework/Headers/OSChannelTracker.h @@ -0,0 +1,56 @@ +/** +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 "OSInfluenceDataRepository.h" +#import "OSInfluence.h" + +#ifndef OSChannelTracker_h +#define OSChannelTracker_h + +@interface OSChannelTracker : NSObject + +@property (nonatomic, readwrite) OSInfluenceType influenceType; +@property (strong, nonatomic, readwrite, nullable) NSString *directId; +@property (strong, nonatomic, readwrite, nullable) NSArray *indirectIds; +@property (strong, nonatomic, readonly, nonnull) OSInfluenceDataRepository *dataRepository; + +- (id _Nonnull)initWithRepository:(OSInfluenceDataRepository * _Nonnull)dataRepository; + +- (NSString * _Nonnull)idTag; + +- (void)initInfluencedTypeFromCache; +- (void)cacheState; +- (void)resetAndInitInfluence; + +- (NSArray * _Nonnull)lastReceivedIds; +- (void)saveLastId:(NSString *_Nullable)lastId; + +- (OSInfluence *_Nonnull)currentSessionInfluence; + +@end + +#endif /* OSChannelTracker_h */ diff --git a/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_i386_x86_64-simulator/OneSignalOutcomes.framework/Headers/OSInAppMessageOutcome.h b/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_i386_x86_64-simulator/OneSignalOutcomes.framework/Headers/OSInAppMessageOutcome.h new file mode 100644 index 0000000..94998b4 --- /dev/null +++ b/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_i386_x86_64-simulator/OneSignalOutcomes.framework/Headers/OSInAppMessageOutcome.h @@ -0,0 +1,49 @@ +/** + * 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 OSInAppMessageOutcome_h +#define OSInAppMessageOutcome_h + +#import +#import + +@interface OSInAppMessageOutcome : NSObject + +@property (strong, nonatomic, nonnull) NSString *name; +@property (strong, nonatomic, nonnull) NSNumber *weight; +@property (nonatomic) BOOL unique; + +// Convert the class into a NSDictionary +- (NSDictionary *_Nonnull)jsonRepresentation; + +@end + +@interface OSInAppMessageOutcome () + +@end + +#endif /* OSInAppMessageOutcome_h */ diff --git a/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_i386_x86_64-simulator/OneSignalOutcomes.framework/Headers/OSIndirectInfluence.h b/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_i386_x86_64-simulator/OneSignalOutcomes.framework/Headers/OSIndirectInfluence.h new file mode 100644 index 0000000..840c75e --- /dev/null +++ b/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_i386_x86_64-simulator/OneSignalOutcomes.framework/Headers/OSIndirectInfluence.h @@ -0,0 +1,38 @@ +/** + 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 + +@interface OSIndirectInfluence : NSObject + +@property (nonatomic, readonly) NSString *channelIdTag; +@property (nonatomic, readonly) NSString *influenceId; +@property (nonatomic, readonly) double timestamp; // seconds + +- (id)initWithParamsInfluenceId:(NSString *)influenceId forChannel:(NSString *)channelIdTag timestamp:(double)timestamp; + +@end diff --git a/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_i386_x86_64-simulator/OneSignalOutcomes.framework/Headers/OSInfluence.h b/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_i386_x86_64-simulator/OneSignalOutcomes.framework/Headers/OSInfluence.h new file mode 100644 index 0000000..cd1b4f2 --- /dev/null +++ b/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_i386_x86_64-simulator/OneSignalOutcomes.framework/Headers/OSInfluence.h @@ -0,0 +1,68 @@ +/** +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 OSInfluence_h +#define OSInfluence_h + +/* OneSignal Influence Types */ +typedef NS_ENUM(NSUInteger, OSInfluenceType) { + DIRECT, + INDIRECT, + UNATTRIBUTED, + DISABLED +}; +/* OneSignal Influence Channels */ +typedef NS_ENUM(NSUInteger, OSInfluenceChannel) { + IN_APP_MESSAGE, + NOTIFICATION, +}; + +@interface OSInfluenceBuilder : NSObject + +@property (nonatomic) OSInfluenceChannel influenceChannel; +@property (nonatomic) OSInfluenceType influenceType; +@property (nonatomic, copy) NSArray * _Nullable ids; + +@end + +@interface OSInfluence : NSObject + +@property (nonatomic, readonly) OSInfluenceChannel influenceChannel; +@property (nonatomic, readonly) OSInfluenceType influenceType; +@property (nonatomic, readwrite) NSArray * _Nullable ids; + +- (id _Nonnull)initWithBuilder:(OSInfluenceBuilder * _Nonnull)builder; + +- (OSInfluence * _Nonnull)copy; +- (BOOL)isAttributedInfluence; +- (BOOL)isDirectInfluence; +- (BOOL)isIndirectInfluence; +- (BOOL)isUnattributedInfluence; + +@end + +#endif /* OSInfluence_h */ diff --git a/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_i386_x86_64-simulator/OneSignalOutcomes.framework/Headers/OSInfluenceDataDefines.h b/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_i386_x86_64-simulator/OneSignalOutcomes.framework/Headers/OSInfluenceDataDefines.h new file mode 100644 index 0000000..a97764f --- /dev/null +++ b/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_i386_x86_64-simulator/OneSignalOutcomes.framework/Headers/OSInfluenceDataDefines.h @@ -0,0 +1,46 @@ +/** + 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. + */ + +#ifndef OSInfluenceDataDefines_h +#define OSInfluenceDataDefines_h + +// Influence param keys +static NSString* const OUTCOMES_PARAM = @"outcomes"; +static NSString* const DIRECT_PARAM = @"direct"; +static NSString* const INDIRECT_PARAM = @"indirect"; +static NSString* const UNATTRIBUTED_PARAM = @"unattributed"; +static NSString* const ENABLED_PARAM = @"enabled"; +static NSString* const NOTIFICATION_ATTRIBUTION_PARAM = @"notification_attribution"; +static NSString* const IAM_ATTRIBUTION_PARAM = @"in_app_message_attribution"; +static NSString* const MINUTES_SINCE_DISPLAYED_PARAM = @"minutes_since_displayed"; +static NSString* const LIMIT_PARAM = @"limit"; + +// Influence default param values +static int DEFAULT_INDIRECT_NOTIFICATION_LIMIT = 10; +static int DEFAULT_INDIRECT_ATTRIBUTION_WINDOW = 24 * 60; + +#endif /* OSInfluenceDataDefines_h */ diff --git a/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_i386_x86_64-simulator/OneSignalOutcomes.framework/Headers/OSInfluenceDataRepository.h b/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_i386_x86_64-simulator/OneSignalOutcomes.framework/Headers/OSInfluenceDataRepository.h new file mode 100644 index 0000000..906b595 --- /dev/null +++ b/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_i386_x86_64-simulator/OneSignalOutcomes.framework/Headers/OSInfluenceDataRepository.h @@ -0,0 +1,64 @@ +/** +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 "OSInfluence.h" + +@interface OSInfluenceDataRepository : NSObject + ++ (OSInfluenceDataRepository * _Nonnull)sharedInfluenceDataRepository; + +- (void)cacheNotificationInfluenceType:(OSInfluenceType) influenceType; +- (OSInfluenceType)notificationCachedInfluenceType; + +- (void)cacheIAMInfluenceType:(OSInfluenceType) influenceType; +- (OSInfluenceType)iamCachedInfluenceType; + +- (void)cacheNotificationOpenId:(NSString * _Nullable)notificationId; +- (NSString * _Nullable)cachedNotificationOpenId; + +- (void)cacheIndirectNotifications:(NSArray * _Nullable)notifications; +- (NSArray * _Nullable)cachedIndirectNotifications; + +- (void)saveNotifications:(NSArray * _Nullable)notifications; +- (NSArray * _Nullable)lastNotificationsReceivedData; + +- (void)saveIAMs:(NSArray * _Nullable)iams; +- (NSArray * _Nullable)lastIAMsReceivedData; + +- (NSInteger)notificationLimit; +- (NSInteger)iamLimit; + +- (NSInteger)notificationIndirectAttributionWindow; +- (NSInteger)iamIndirectAttributionWindow; + +- (BOOL)isDirectInfluenceEnabled; +- (BOOL)isIndirectInfluenceEnabled; +- (BOOL)isUnattributedInfluenceEnabled; + +- (void)saveInfluenceParams:(NSDictionary * _Nonnull)params; + +@end diff --git a/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_i386_x86_64-simulator/OneSignalOutcomes.framework/Headers/OSOutcomeEvent.h b/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_i386_x86_64-simulator/OneSignalOutcomes.framework/Headers/OSOutcomeEvent.h new file mode 100644 index 0000000..fbf4def --- /dev/null +++ b/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_i386_x86_64-simulator/OneSignalOutcomes.framework/Headers/OSOutcomeEvent.h @@ -0,0 +1,68 @@ +/** + 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 "OSOutcomeEventParams.h" +#import "OSInfluence.h" +#import + +@interface OSOutcomeEvent : NSObject + +// Session enum (DIRECT, INDIRECT, UNATTRIBUTED, or DISABLED) to determine code route and request params +@property (nonatomic) OSInfluenceType session; + +// Notification ids for the current session +@property (strong, nonatomic, nullable) NSArray *notificationIds; + +// Id or name of the event +@property (strong, nonatomic, nonnull) NSString *name; + +// Time of the event occurring +@property (strong, nonatomic, nonnull) NSNumber *timestamp; + +// A weight to attach to the outcome name +@property (strong, nonatomic, nonnull) NSDecimalNumber *weight; + +// Convert the object into a NSDictionary +- (NSDictionary * _Nonnull)jsonRepresentation; + +@end + +@interface OSOutcomeEvent () + +- (id _Nonnull)initWithSession:(OSInfluenceType)session + notificationIds:(NSArray * _Nullable)notificationIds + name:(NSString * _Nonnull)name + timestamp:(NSNumber * _Nonnull)timestamp + weight:(NSNumber * _Nonnull)value; + +- (id _Nonnull)initFromOutcomeEventParams:(OSOutcomeEventParams * _Nonnull)eventParams; + +@end + +/*Block for handling outcome event being sent successfully*/ +typedef void (^OSSendOutcomeSuccess)(OSOutcomeEvent* _Nullable outcome); diff --git a/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_i386_x86_64-simulator/OneSignalOutcomes.framework/Headers/OSOutcomeEventParams.h b/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_i386_x86_64-simulator/OneSignalOutcomes.framework/Headers/OSOutcomeEventParams.h new file mode 100644 index 0000000..03c98a7 --- /dev/null +++ b/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_i386_x86_64-simulator/OneSignalOutcomes.framework/Headers/OSOutcomeEventParams.h @@ -0,0 +1,46 @@ +/** +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 "OSOutcomeSource.h" + +#ifndef OSOutcomeEventParams_h +#define OSOutcomeEventParams_h + +@interface OSOutcomeEventParams : NSObject + +@property (strong, nonatomic, readwrite) NSString *outcomeId; +@property (strong, nonatomic, readwrite) OSOutcomeSource *outcomeSource; +@property (strong, nonatomic, readwrite) NSNumber *weight; +@property (strong, nonatomic, readwrite) NSNumber *timestamp; + +- (id)initWithOutcomeId:(NSString *)outcomeId outcomeSource:(OSOutcomeSource *)outcomeSource weight:(NSNumber *)weight timestamp:(NSNumber *)timestamp; + +- (NSDictionary *)toDictionaryObject; + +@end + +#endif /* OSOutcomeEventParams_h */ diff --git a/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_i386_x86_64-simulator/OneSignalOutcomes.framework/Headers/OSOutcomeEventsCache.h b/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_i386_x86_64-simulator/OneSignalOutcomes.framework/Headers/OSOutcomeEventsCache.h new file mode 100644 index 0000000..1d8241f --- /dev/null +++ b/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_i386_x86_64-simulator/OneSignalOutcomes.framework/Headers/OSOutcomeEventsCache.h @@ -0,0 +1,46 @@ +/** +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 OSOutcomeEventsCache_h +#define OSOutcomeEventsCache_h + +@interface OSOutcomeEventsCache : NSObject + ++ (OSOutcomeEventsCache * _Nonnull)sharedOutcomeEventsCache; + +- (BOOL)isOutcomesV2ServiceEnabled; +- (void)saveOutcomesV2ServiceEnabled:(BOOL)isEnabled; + +- (NSSet * _Nullable)getUnattributedUniqueOutcomeEventsSent; +- (void)saveUnattributedUniqueOutcomeEventsSent:(NSSet * _Nullable)unattributedUniqueOutcomeEventsSentSet; + +- (NSArray * _Nullable)getAttributedUniqueOutcomeEventSent; +- (void)saveAttributedUniqueOutcomeEventNotificationIds:(NSArray * _Nullable)attributedUniqueOutcomeEventNotificationIdsSent; + +@end + +#endif /* OSOutcomeEventsCache_h */ diff --git a/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_i386_x86_64-simulator/OneSignalOutcomes.framework/Headers/OSOutcomeEventsFactory.h b/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_i386_x86_64-simulator/OneSignalOutcomes.framework/Headers/OSOutcomeEventsFactory.h new file mode 100644 index 0000000..cfe93c3 --- /dev/null +++ b/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_i386_x86_64-simulator/OneSignalOutcomes.framework/Headers/OSOutcomeEventsFactory.h @@ -0,0 +1,42 @@ +/** +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 "OSOutcomeEventsRepository.h" +#import "OSOutcomeEventsCache.h" + +#ifndef OSOutcomeEventsFactory_h +#define OSOutcomeEventsFactory_h + +@interface OSOutcomeEventsFactory : NSObject + +- (id _Nonnull)initWithCache:(OSOutcomeEventsCache * _Nonnull)cache; + +- (OSOutcomeEventsRepository * _Nonnull)repository; + +@end + +#endif /* OSOutcomeEventsFactory_h */ diff --git a/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_i386_x86_64-simulator/OneSignalOutcomes.framework/Headers/OSOutcomeEventsRepository.h b/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_i386_x86_64-simulator/OneSignalOutcomes.framework/Headers/OSOutcomeEventsRepository.h new file mode 100644 index 0000000..a109e56 --- /dev/null +++ b/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_i386_x86_64-simulator/OneSignalOutcomes.framework/Headers/OSOutcomeEventsRepository.h @@ -0,0 +1,55 @@ +/** +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 "OSOutcomeEventParams.h" +#import "OSInfluence.h" +#import "OSOutcomeEventsCache.h" +#import + +#ifndef OSOutcomeEventsRepository_h +#define OSOutcomeEventsRepository_h + +@interface OSOutcomeEventsRepository : NSObject + +@property (strong, nonatomic, readonly, nonnull) OSOutcomeEventsCache *outcomeEventsCache; + +- (id _Nonnull)initWithCache:(OSOutcomeEventsCache * _Nonnull)outcomeEventsCache; +- (void)requestMeasureOutcomeEventWithAppId:(NSString * _Nonnull)appId + deviceType:(NSNumber * _Nonnull)deviceType + event:(OSOutcomeEventParams * _Nonnull)event + onSuccess:(OSResultSuccessBlock _Nonnull)successBlock + onFailure:(OSFailureBlock _Nonnull)failureBlock; + +- (NSSet * _Nullable)getUnattributedUniqueOutcomeEventsSent; +- (void)saveUnattributedUniqueOutcomeEventsSent:(NSSet * _Nullable)unattributedUniqueOutcomeEventsSentSet; + +- (NSArray * _Nonnull)getNotCachedUniqueInfluencesForOutcome:(NSString * _Nonnull)name influences:(NSArray * _Nonnull)influences; +- (void)saveUniqueOutcomeEventParams:(OSOutcomeEventParams * _Nonnull)eventParams; + +@end + +#endif /* OSOutcomeEventsRepository_h */ diff --git a/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_i386_x86_64-simulator/OneSignalOutcomes.framework/Headers/OSOutcomeSource.h b/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_i386_x86_64-simulator/OneSignalOutcomes.framework/Headers/OSOutcomeSource.h new file mode 100644 index 0000000..683c2a4 --- /dev/null +++ b/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_i386_x86_64-simulator/OneSignalOutcomes.framework/Headers/OSOutcomeSource.h @@ -0,0 +1,44 @@ +/** +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 "OSOutcomeSourceBody.h" + +#ifndef OSOutcomeSource_h +#define OSOutcomeSource_h + +@interface OSOutcomeSource : NSObject + +@property (strong, nonatomic, readwrite) OSOutcomeSourceBody *directBody; +@property (strong, nonatomic, readwrite) OSOutcomeSourceBody *indirectBody; + +- (id)initWithDirectBody:(OSOutcomeSourceBody *)directBody indirectBody:(OSOutcomeSourceBody *)indirectBody; + +- (NSDictionary *)toDictionaryObject; + +@end + +#endif /* OSOutcomeSource_h */ diff --git a/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_i386_x86_64-simulator/OneSignalOutcomes.framework/Headers/OSOutcomeSourceBody.h b/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_i386_x86_64-simulator/OneSignalOutcomes.framework/Headers/OSOutcomeSourceBody.h new file mode 100644 index 0000000..8959d7c --- /dev/null +++ b/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_i386_x86_64-simulator/OneSignalOutcomes.framework/Headers/OSOutcomeSourceBody.h @@ -0,0 +1,42 @@ +/** +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 OSOutcomeSourceBody_h +#define OSOutcomeSourceBody_h + +@interface OSOutcomeSourceBody : NSObject + +@property (strong, nonatomic, readwrite) NSArray *notificationIds; +@property (strong, nonatomic, readwrite) NSArray *inAppMessagesIds; + +- (id)initWithNotificationIds:(NSArray *)notificationIds inAppMessagesIds:(NSArray *)inAppMessagesIds; + +- (NSDictionary *)toDictionaryObject; + +@end + +#endif /* OSOutcomeSourceBody_h */ diff --git a/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_i386_x86_64-simulator/OneSignalOutcomes.framework/Headers/OSSessionManager.h b/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_i386_x86_64-simulator/OneSignalOutcomes.framework/Headers/OSSessionManager.h new file mode 100644 index 0000000..7e35c39 --- /dev/null +++ b/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_i386_x86_64-simulator/OneSignalOutcomes.framework/Headers/OSSessionManager.h @@ -0,0 +1,58 @@ +/** + 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 "OSInfluence.h" +#import "OSTrackerFactory.h" + +@protocol SessionStatusDelegate + ++ (void)onSessionEnding:(NSArray * _Nonnull)lastInfluences; + +@end + +@interface OSSessionManager : NSObject + ++ (OSSessionManager * _Nonnull)sharedSessionManager; + ++ (void)resetSharedSessionManager; + +@property (nonatomic) id _Nullable delegate; + +- (instancetype _Nonnull)init:(Class _Nullable)delegate withTrackerFactory:(OSTrackerFactory *_Nonnull)trackerFactory; + +- (NSArray *_Nonnull)getInfluences; +- (NSArray *_Nonnull)getSessionInfluences; +- (void)initSessionFromCache; +- (void)restartSessionIfNeeded:(AppEntryAction)entryAction; +- (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; + +@end diff --git a/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_i386_x86_64-simulator/OneSignalOutcomes.framework/Headers/OSTrackerFactory.h b/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_i386_x86_64-simulator/OneSignalOutcomes.framework/Headers/OSTrackerFactory.h new file mode 100644 index 0000000..646123f --- /dev/null +++ b/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_i386_x86_64-simulator/OneSignalOutcomes.framework/Headers/OSTrackerFactory.h @@ -0,0 +1,49 @@ +/** +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 "OSInfluenceDataRepository.h" +#import "OSInfluence.h" +#import "OSChannelTracker.h" +#import + + +@interface OSTrackerFactory : NSObject + ++ (OSTrackerFactory* _Nonnull)sharedTrackerFactory; + +- (id _Nonnull)initWithRepository:(OSInfluenceDataRepository * _Nonnull)dataRepository; +- (void)saveInfluenceParams:(NSDictionary * _Nonnull)params; +- (void)initFromCache; +- (NSArray * _Nonnull)influences; +- (NSArray * _Nonnull)sessionInfluences; +- (OSChannelTracker * _Nonnull)iamChannelTracker; +- (OSChannelTracker * _Nonnull)notificationChannelTracker; +- (OSChannelTracker * _Nullable)channelByEntryAction:(AppEntryAction)entryAction; +- (NSArray * _Nonnull)channels; +- (NSArray * _Nonnull)channelsToResetByEntryAction:(AppEntryAction)entryAction; + +@end diff --git a/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_i386_x86_64-simulator/OneSignalOutcomes.framework/Headers/OneSignalOutcomeEventsController.h b/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_i386_x86_64-simulator/OneSignalOutcomes.framework/Headers/OneSignalOutcomeEventsController.h new file mode 100644 index 0000000..f99c5ce --- /dev/null +++ b/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_i386_x86_64-simulator/OneSignalOutcomes.framework/Headers/OneSignalOutcomeEventsController.h @@ -0,0 +1,61 @@ +/** + 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 "OSSessionManager.h" +#import "OSOutcomeEventsFactory.h" +#import "OSInAppMessageOutcome.h" +#import "OSOutcomeEvent.h" + +@interface OneSignalOutcomeEventsController : NSObject + +- (instancetype _Nonnull)initWithSessionManager:(OSSessionManager * _Nonnull)sessionManager + outcomeEventsFactory:(OSOutcomeEventsFactory *_Nonnull)outcomeEventsFactory; + +- (void)clearOutcomes; + +- (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 + 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; + +@end diff --git a/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_i386_x86_64-simulator/OneSignalOutcomes.framework/Headers/OneSignalOutcomes.h b/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_i386_x86_64-simulator/OneSignalOutcomes.framework/Headers/OneSignalOutcomes.h new file mode 100644 index 0000000..e673d43 --- /dev/null +++ b/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_i386_x86_64-simulator/OneSignalOutcomes.framework/Headers/OneSignalOutcomes.h @@ -0,0 +1,47 @@ +/* + 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 "OSSessionManager.h" +#import "OSInfluence.h" +#import "OSIndirectInfluence.h" +#import "OSInAppMessageOutcome.h" +#import "OSOutcomeEvent.h" +#import "OSInfluenceDataDefines.h" +#import "OSOutcomeEventsCache.h" +#import "OSCachedUniqueOutcome.h" +#import "OneSignalOutcomeEventsController.h" +#import "OSInfluenceDataRepository.h" +#import "OSOutcomeEventsFactory.h" +#import "OSTrackerFactory.h" +#import "OSOutcomeEventsRepository.h" + +@interface OneSignalOutcomes : NSObject ++ (void)migrate; +@end + diff --git a/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_i386_x86_64-simulator/OneSignalOutcomes.framework/Info.plist b/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_i386_x86_64-simulator/OneSignalOutcomes.framework/Info.plist new file mode 100644 index 0000000..baa8598 Binary files /dev/null and b/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_i386_x86_64-simulator/OneSignalOutcomes.framework/Info.plist differ diff --git a/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_i386_x86_64-simulator/OneSignalOutcomes.framework/Modules/module.modulemap b/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_i386_x86_64-simulator/OneSignalOutcomes.framework/Modules/module.modulemap new file mode 100644 index 0000000..3ba965f --- /dev/null +++ b/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_i386_x86_64-simulator/OneSignalOutcomes.framework/Modules/module.modulemap @@ -0,0 +1,6 @@ +framework module OneSignalOutcomes { + umbrella header "OneSignalOutcomes.h" + + export * + module * { export * } +} diff --git a/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_i386_x86_64-simulator/OneSignalOutcomes.framework/OneSignalOutcomes b/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_i386_x86_64-simulator/OneSignalOutcomes.framework/OneSignalOutcomes new file mode 100755 index 0000000..146ad26 Binary files /dev/null and b/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_i386_x86_64-simulator/OneSignalOutcomes.framework/OneSignalOutcomes differ diff --git a/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_i386_x86_64-simulator/OneSignalOutcomes.framework/_CodeSignature/CodeResources b/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_i386_x86_64-simulator/OneSignalOutcomes.framework/_CodeSignature/CodeResources new file mode 100644 index 0000000..5d6fa58 --- /dev/null +++ b/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_i386_x86_64-simulator/OneSignalOutcomes.framework/_CodeSignature/CodeResources @@ -0,0 +1,387 @@ + + + + + files + + Headers/OSCachedUniqueOutcome.h + + QQP7NOxbPFL98LkulmK/wbUMQvU= + + Headers/OSChannelTracker.h + + ArLQCzgIq/OhHDNMS3QUpcgiIqU= + + Headers/OSInAppMessageOutcome.h + + 3xT4e/4T3OhG7IenJ42EGs9MroU= + + Headers/OSIndirectInfluence.h + + hwbzVrvNLt3XPES9eE8prBs5T+0= + + Headers/OSInfluence.h + + JhZlas0LGEFoQfTqv25sUlZznns= + + Headers/OSInfluenceDataDefines.h + + GeTi9WmITIbwf/P/2HBBYvfi2xM= + + Headers/OSInfluenceDataRepository.h + + zEIQwZXZL2ANP3t0dT4rkZ8FCpA= + + Headers/OSOutcomeEvent.h + + PPHv3rveisEsvRH9qzs+jrf85lc= + + Headers/OSOutcomeEventParams.h + + lJiE/gYGGmN5fH+SaaqT5vfHPog= + + Headers/OSOutcomeEventsCache.h + + xJtU7JLpDgHjBUbaiE8SnnXGCiQ= + + Headers/OSOutcomeEventsFactory.h + + b6vJ4AsamqL5CARZVfsSVEQNG68= + + Headers/OSOutcomeEventsRepository.h + + o/1Eb25yqP71kTECIELL9hYSsm8= + + Headers/OSOutcomeSource.h + + xCZ3YOQZkpvFUCcVdbyctku3KLQ= + + Headers/OSOutcomeSourceBody.h + + Z+APpNEoh0EeAHT5zbazL/Ctm3c= + + Headers/OSSessionManager.h + + b2/LI60ct+svisyN/9N4P5hk3zc= + + Headers/OSTrackerFactory.h + + 4sUyvIDmirrXETvMsEpZ29aR1pI= + + Headers/OneSignalOutcomeEventsController.h + + sD4f/g7VkNo0X2aZKE5/DVsacj4= + + Headers/OneSignalOutcomes.h + + sW/MH6o2HgmQVEWrbtmDRuL4+dA= + + Info.plist + + QBPgx1PKcPtcdSAM7h5q3xuC0xI= + + Modules/module.modulemap + + W87fybpsrxqJLygJ5rCH+jsvEik= + + + files2 + + Headers/OSCachedUniqueOutcome.h + + hash + + QQP7NOxbPFL98LkulmK/wbUMQvU= + + hash2 + + totu1nQ6/x4iFLCj1sa0l/+/yxIYwiM3vG0tUTwmaqs= + + + Headers/OSChannelTracker.h + + hash + + ArLQCzgIq/OhHDNMS3QUpcgiIqU= + + hash2 + + y+P1oKzfvURE+SVKSVr4j6/jH8DgujNwXv1hKuO1EAE= + + + Headers/OSInAppMessageOutcome.h + + hash + + 3xT4e/4T3OhG7IenJ42EGs9MroU= + + hash2 + + 6kjvfIl+pf/78MxrtV/Sqy17OmVUmw8+rYEgjDHXNWE= + + + Headers/OSIndirectInfluence.h + + hash + + hwbzVrvNLt3XPES9eE8prBs5T+0= + + hash2 + + n3sfj9ffeEbvDhJzT28iKptXmEQRbSVWSvDeMisJmsc= + + + Headers/OSInfluence.h + + hash + + JhZlas0LGEFoQfTqv25sUlZznns= + + hash2 + + tjQiNzfx4rDkTwjfykGUHZYyZQOTnKPILoqHIDd/2ic= + + + Headers/OSInfluenceDataDefines.h + + hash + + GeTi9WmITIbwf/P/2HBBYvfi2xM= + + hash2 + + iQMoFhEUbxG3EpUfUTH/khO6IrPhWKvvXnku47XTZdc= + + + Headers/OSInfluenceDataRepository.h + + hash + + zEIQwZXZL2ANP3t0dT4rkZ8FCpA= + + hash2 + + knk1+sZ0qZOmSkq4A3Ej5R1dtUJ+36O8oS7eBPIwo/s= + + + Headers/OSOutcomeEvent.h + + hash + + PPHv3rveisEsvRH9qzs+jrf85lc= + + hash2 + + dEM+sqMVSwAGR7Se/gj9TDcGizX0trTRktNyjvxHp/M= + + + Headers/OSOutcomeEventParams.h + + hash + + lJiE/gYGGmN5fH+SaaqT5vfHPog= + + hash2 + + 1ba84vOacDL3dvfPb9QuuJrPbNIKMtO5uAFP8fQXVQg= + + + Headers/OSOutcomeEventsCache.h + + hash + + xJtU7JLpDgHjBUbaiE8SnnXGCiQ= + + hash2 + + N6az4wqlL4oB+ugOXVU1xgJMCuABHcDKVi5XAV6e/GU= + + + Headers/OSOutcomeEventsFactory.h + + hash + + b6vJ4AsamqL5CARZVfsSVEQNG68= + + hash2 + + B9zLkhrLlC2+UdJh/XfEHYstpiw8n4y2rH/kdw/ob5A= + + + Headers/OSOutcomeEventsRepository.h + + hash + + o/1Eb25yqP71kTECIELL9hYSsm8= + + hash2 + + REkrumsrQPze19CbYkIMpr/Xb0y8y6i4Ytyk9J30qMY= + + + Headers/OSOutcomeSource.h + + hash + + xCZ3YOQZkpvFUCcVdbyctku3KLQ= + + hash2 + + W8Ekd6VjML7ZnahaytXqSaHRU+B6kBF5OakKQOrQstQ= + + + Headers/OSOutcomeSourceBody.h + + hash + + Z+APpNEoh0EeAHT5zbazL/Ctm3c= + + hash2 + + X1aTd7m6pBhX97KiK9OYccGmdoBVHXFdtNIUegnZ+2s= + + + Headers/OSSessionManager.h + + hash + + b2/LI60ct+svisyN/9N4P5hk3zc= + + hash2 + + PqGFeWJieWBjFVlo9hW6K3zw3EROosJ9GekCpVrw87U= + + + Headers/OSTrackerFactory.h + + hash + + 4sUyvIDmirrXETvMsEpZ29aR1pI= + + hash2 + + e38XG+rnmKSpSyDmrN4/Mc4+zLBKKWQ6+gexB9VHFKg= + + + Headers/OneSignalOutcomeEventsController.h + + hash + + sD4f/g7VkNo0X2aZKE5/DVsacj4= + + hash2 + + 2LLCLqre2Yz61h0Ir/t5whNSGEa/8+9QKJx8WZ/15CQ= + + + Headers/OneSignalOutcomes.h + + hash + + sW/MH6o2HgmQVEWrbtmDRuL4+dA= + + hash2 + + GFLvc7yAjjvzpcTn4DOvrAd+0+BacOygATaFNR719s0= + + + Modules/module.modulemap + + hash + + W87fybpsrxqJLygJ5rCH+jsvEik= + + hash2 + + 71NgarV0pwtZTDET32aMQ3/vjxGUawYZx/s2o2jI064= + + + + 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/platform/OneSignalOutcomes.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalOutcomes.framework/Headers b/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalOutcomes.framework/Headers new file mode 120000 index 0000000..a177d2a --- /dev/null +++ b/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalOutcomes.framework/Headers @@ -0,0 +1 @@ +Versions/Current/Headers \ No newline at end of file diff --git a/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalOutcomes.framework/Modules b/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalOutcomes.framework/Modules new file mode 120000 index 0000000..5736f31 --- /dev/null +++ b/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalOutcomes.framework/Modules @@ -0,0 +1 @@ +Versions/Current/Modules \ No newline at end of file diff --git a/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalOutcomes.framework/OneSignalOutcomes b/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalOutcomes.framework/OneSignalOutcomes new file mode 120000 index 0000000..e973f0c --- /dev/null +++ b/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalOutcomes.framework/OneSignalOutcomes @@ -0,0 +1 @@ +Versions/Current/OneSignalOutcomes \ No newline at end of file diff --git a/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalOutcomes.framework/Resources b/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalOutcomes.framework/Resources new file mode 120000 index 0000000..953ee36 --- /dev/null +++ b/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalOutcomes.framework/Resources @@ -0,0 +1 @@ +Versions/Current/Resources \ No newline at end of file diff --git a/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalOutcomes.framework/Versions/A/Headers/OSCachedUniqueOutcome.h b/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalOutcomes.framework/Versions/A/Headers/OSCachedUniqueOutcome.h new file mode 100644 index 0000000..4de21c2 --- /dev/null +++ b/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalOutcomes.framework/Versions/A/Headers/OSCachedUniqueOutcome.h @@ -0,0 +1,40 @@ +/** + 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 "OSInfluence.h" + +@interface OSCachedUniqueOutcome : NSObject + +@property (nonatomic, readonly) NSString *name; +@property (nonatomic, readonly) NSString *uniqueId; +@property (nonatomic, readonly) NSNumber *timestamp; // seconds +@property (nonatomic, readonly) OSInfluenceChannel channel; + +- (id)initWithParamsName:(NSString *)name uniqueId:(NSString *)uniqueId channel:(OSInfluenceChannel)channel; +- (id)initWithParamsName:(NSString *)name uniqueId:(NSString *)uniqueId timestamp:(NSNumber *)timestamp channel:(OSInfluenceChannel)channel; + +@end diff --git a/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalOutcomes.framework/Versions/A/Headers/OSChannelTracker.h b/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalOutcomes.framework/Versions/A/Headers/OSChannelTracker.h new file mode 100644 index 0000000..8d2a158 --- /dev/null +++ b/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalOutcomes.framework/Versions/A/Headers/OSChannelTracker.h @@ -0,0 +1,56 @@ +/** +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 "OSInfluenceDataRepository.h" +#import "OSInfluence.h" + +#ifndef OSChannelTracker_h +#define OSChannelTracker_h + +@interface OSChannelTracker : NSObject + +@property (nonatomic, readwrite) OSInfluenceType influenceType; +@property (strong, nonatomic, readwrite, nullable) NSString *directId; +@property (strong, nonatomic, readwrite, nullable) NSArray *indirectIds; +@property (strong, nonatomic, readonly, nonnull) OSInfluenceDataRepository *dataRepository; + +- (id _Nonnull)initWithRepository:(OSInfluenceDataRepository * _Nonnull)dataRepository; + +- (NSString * _Nonnull)idTag; + +- (void)initInfluencedTypeFromCache; +- (void)cacheState; +- (void)resetAndInitInfluence; + +- (NSArray * _Nonnull)lastReceivedIds; +- (void)saveLastId:(NSString *_Nullable)lastId; + +- (OSInfluence *_Nonnull)currentSessionInfluence; + +@end + +#endif /* OSChannelTracker_h */ diff --git a/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalOutcomes.framework/Versions/A/Headers/OSInAppMessageOutcome.h b/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalOutcomes.framework/Versions/A/Headers/OSInAppMessageOutcome.h new file mode 100644 index 0000000..94998b4 --- /dev/null +++ b/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalOutcomes.framework/Versions/A/Headers/OSInAppMessageOutcome.h @@ -0,0 +1,49 @@ +/** + * 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 OSInAppMessageOutcome_h +#define OSInAppMessageOutcome_h + +#import +#import + +@interface OSInAppMessageOutcome : NSObject + +@property (strong, nonatomic, nonnull) NSString *name; +@property (strong, nonatomic, nonnull) NSNumber *weight; +@property (nonatomic) BOOL unique; + +// Convert the class into a NSDictionary +- (NSDictionary *_Nonnull)jsonRepresentation; + +@end + +@interface OSInAppMessageOutcome () + +@end + +#endif /* OSInAppMessageOutcome_h */ diff --git a/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalOutcomes.framework/Versions/A/Headers/OSIndirectInfluence.h b/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalOutcomes.framework/Versions/A/Headers/OSIndirectInfluence.h new file mode 100644 index 0000000..840c75e --- /dev/null +++ b/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalOutcomes.framework/Versions/A/Headers/OSIndirectInfluence.h @@ -0,0 +1,38 @@ +/** + 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 + +@interface OSIndirectInfluence : NSObject + +@property (nonatomic, readonly) NSString *channelIdTag; +@property (nonatomic, readonly) NSString *influenceId; +@property (nonatomic, readonly) double timestamp; // seconds + +- (id)initWithParamsInfluenceId:(NSString *)influenceId forChannel:(NSString *)channelIdTag timestamp:(double)timestamp; + +@end diff --git a/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalOutcomes.framework/Versions/A/Headers/OSInfluence.h b/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalOutcomes.framework/Versions/A/Headers/OSInfluence.h new file mode 100644 index 0000000..cd1b4f2 --- /dev/null +++ b/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalOutcomes.framework/Versions/A/Headers/OSInfluence.h @@ -0,0 +1,68 @@ +/** +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 OSInfluence_h +#define OSInfluence_h + +/* OneSignal Influence Types */ +typedef NS_ENUM(NSUInteger, OSInfluenceType) { + DIRECT, + INDIRECT, + UNATTRIBUTED, + DISABLED +}; +/* OneSignal Influence Channels */ +typedef NS_ENUM(NSUInteger, OSInfluenceChannel) { + IN_APP_MESSAGE, + NOTIFICATION, +}; + +@interface OSInfluenceBuilder : NSObject + +@property (nonatomic) OSInfluenceChannel influenceChannel; +@property (nonatomic) OSInfluenceType influenceType; +@property (nonatomic, copy) NSArray * _Nullable ids; + +@end + +@interface OSInfluence : NSObject + +@property (nonatomic, readonly) OSInfluenceChannel influenceChannel; +@property (nonatomic, readonly) OSInfluenceType influenceType; +@property (nonatomic, readwrite) NSArray * _Nullable ids; + +- (id _Nonnull)initWithBuilder:(OSInfluenceBuilder * _Nonnull)builder; + +- (OSInfluence * _Nonnull)copy; +- (BOOL)isAttributedInfluence; +- (BOOL)isDirectInfluence; +- (BOOL)isIndirectInfluence; +- (BOOL)isUnattributedInfluence; + +@end + +#endif /* OSInfluence_h */ diff --git a/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalOutcomes.framework/Versions/A/Headers/OSInfluenceDataDefines.h b/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalOutcomes.framework/Versions/A/Headers/OSInfluenceDataDefines.h new file mode 100644 index 0000000..a97764f --- /dev/null +++ b/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalOutcomes.framework/Versions/A/Headers/OSInfluenceDataDefines.h @@ -0,0 +1,46 @@ +/** + 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. + */ + +#ifndef OSInfluenceDataDefines_h +#define OSInfluenceDataDefines_h + +// Influence param keys +static NSString* const OUTCOMES_PARAM = @"outcomes"; +static NSString* const DIRECT_PARAM = @"direct"; +static NSString* const INDIRECT_PARAM = @"indirect"; +static NSString* const UNATTRIBUTED_PARAM = @"unattributed"; +static NSString* const ENABLED_PARAM = @"enabled"; +static NSString* const NOTIFICATION_ATTRIBUTION_PARAM = @"notification_attribution"; +static NSString* const IAM_ATTRIBUTION_PARAM = @"in_app_message_attribution"; +static NSString* const MINUTES_SINCE_DISPLAYED_PARAM = @"minutes_since_displayed"; +static NSString* const LIMIT_PARAM = @"limit"; + +// Influence default param values +static int DEFAULT_INDIRECT_NOTIFICATION_LIMIT = 10; +static int DEFAULT_INDIRECT_ATTRIBUTION_WINDOW = 24 * 60; + +#endif /* OSInfluenceDataDefines_h */ diff --git a/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalOutcomes.framework/Versions/A/Headers/OSInfluenceDataRepository.h b/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalOutcomes.framework/Versions/A/Headers/OSInfluenceDataRepository.h new file mode 100644 index 0000000..906b595 --- /dev/null +++ b/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalOutcomes.framework/Versions/A/Headers/OSInfluenceDataRepository.h @@ -0,0 +1,64 @@ +/** +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 "OSInfluence.h" + +@interface OSInfluenceDataRepository : NSObject + ++ (OSInfluenceDataRepository * _Nonnull)sharedInfluenceDataRepository; + +- (void)cacheNotificationInfluenceType:(OSInfluenceType) influenceType; +- (OSInfluenceType)notificationCachedInfluenceType; + +- (void)cacheIAMInfluenceType:(OSInfluenceType) influenceType; +- (OSInfluenceType)iamCachedInfluenceType; + +- (void)cacheNotificationOpenId:(NSString * _Nullable)notificationId; +- (NSString * _Nullable)cachedNotificationOpenId; + +- (void)cacheIndirectNotifications:(NSArray * _Nullable)notifications; +- (NSArray * _Nullable)cachedIndirectNotifications; + +- (void)saveNotifications:(NSArray * _Nullable)notifications; +- (NSArray * _Nullable)lastNotificationsReceivedData; + +- (void)saveIAMs:(NSArray * _Nullable)iams; +- (NSArray * _Nullable)lastIAMsReceivedData; + +- (NSInteger)notificationLimit; +- (NSInteger)iamLimit; + +- (NSInteger)notificationIndirectAttributionWindow; +- (NSInteger)iamIndirectAttributionWindow; + +- (BOOL)isDirectInfluenceEnabled; +- (BOOL)isIndirectInfluenceEnabled; +- (BOOL)isUnattributedInfluenceEnabled; + +- (void)saveInfluenceParams:(NSDictionary * _Nonnull)params; + +@end diff --git a/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalOutcomes.framework/Versions/A/Headers/OSOutcomeEvent.h b/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalOutcomes.framework/Versions/A/Headers/OSOutcomeEvent.h new file mode 100644 index 0000000..fbf4def --- /dev/null +++ b/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalOutcomes.framework/Versions/A/Headers/OSOutcomeEvent.h @@ -0,0 +1,68 @@ +/** + 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 "OSOutcomeEventParams.h" +#import "OSInfluence.h" +#import + +@interface OSOutcomeEvent : NSObject + +// Session enum (DIRECT, INDIRECT, UNATTRIBUTED, or DISABLED) to determine code route and request params +@property (nonatomic) OSInfluenceType session; + +// Notification ids for the current session +@property (strong, nonatomic, nullable) NSArray *notificationIds; + +// Id or name of the event +@property (strong, nonatomic, nonnull) NSString *name; + +// Time of the event occurring +@property (strong, nonatomic, nonnull) NSNumber *timestamp; + +// A weight to attach to the outcome name +@property (strong, nonatomic, nonnull) NSDecimalNumber *weight; + +// Convert the object into a NSDictionary +- (NSDictionary * _Nonnull)jsonRepresentation; + +@end + +@interface OSOutcomeEvent () + +- (id _Nonnull)initWithSession:(OSInfluenceType)session + notificationIds:(NSArray * _Nullable)notificationIds + name:(NSString * _Nonnull)name + timestamp:(NSNumber * _Nonnull)timestamp + weight:(NSNumber * _Nonnull)value; + +- (id _Nonnull)initFromOutcomeEventParams:(OSOutcomeEventParams * _Nonnull)eventParams; + +@end + +/*Block for handling outcome event being sent successfully*/ +typedef void (^OSSendOutcomeSuccess)(OSOutcomeEvent* _Nullable outcome); diff --git a/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalOutcomes.framework/Versions/A/Headers/OSOutcomeEventParams.h b/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalOutcomes.framework/Versions/A/Headers/OSOutcomeEventParams.h new file mode 100644 index 0000000..03c98a7 --- /dev/null +++ b/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalOutcomes.framework/Versions/A/Headers/OSOutcomeEventParams.h @@ -0,0 +1,46 @@ +/** +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 "OSOutcomeSource.h" + +#ifndef OSOutcomeEventParams_h +#define OSOutcomeEventParams_h + +@interface OSOutcomeEventParams : NSObject + +@property (strong, nonatomic, readwrite) NSString *outcomeId; +@property (strong, nonatomic, readwrite) OSOutcomeSource *outcomeSource; +@property (strong, nonatomic, readwrite) NSNumber *weight; +@property (strong, nonatomic, readwrite) NSNumber *timestamp; + +- (id)initWithOutcomeId:(NSString *)outcomeId outcomeSource:(OSOutcomeSource *)outcomeSource weight:(NSNumber *)weight timestamp:(NSNumber *)timestamp; + +- (NSDictionary *)toDictionaryObject; + +@end + +#endif /* OSOutcomeEventParams_h */ diff --git a/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalOutcomes.framework/Versions/A/Headers/OSOutcomeEventsCache.h b/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalOutcomes.framework/Versions/A/Headers/OSOutcomeEventsCache.h new file mode 100644 index 0000000..1d8241f --- /dev/null +++ b/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalOutcomes.framework/Versions/A/Headers/OSOutcomeEventsCache.h @@ -0,0 +1,46 @@ +/** +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 OSOutcomeEventsCache_h +#define OSOutcomeEventsCache_h + +@interface OSOutcomeEventsCache : NSObject + ++ (OSOutcomeEventsCache * _Nonnull)sharedOutcomeEventsCache; + +- (BOOL)isOutcomesV2ServiceEnabled; +- (void)saveOutcomesV2ServiceEnabled:(BOOL)isEnabled; + +- (NSSet * _Nullable)getUnattributedUniqueOutcomeEventsSent; +- (void)saveUnattributedUniqueOutcomeEventsSent:(NSSet * _Nullable)unattributedUniqueOutcomeEventsSentSet; + +- (NSArray * _Nullable)getAttributedUniqueOutcomeEventSent; +- (void)saveAttributedUniqueOutcomeEventNotificationIds:(NSArray * _Nullable)attributedUniqueOutcomeEventNotificationIdsSent; + +@end + +#endif /* OSOutcomeEventsCache_h */ diff --git a/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalOutcomes.framework/Versions/A/Headers/OSOutcomeEventsFactory.h b/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalOutcomes.framework/Versions/A/Headers/OSOutcomeEventsFactory.h new file mode 100644 index 0000000..cfe93c3 --- /dev/null +++ b/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalOutcomes.framework/Versions/A/Headers/OSOutcomeEventsFactory.h @@ -0,0 +1,42 @@ +/** +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 "OSOutcomeEventsRepository.h" +#import "OSOutcomeEventsCache.h" + +#ifndef OSOutcomeEventsFactory_h +#define OSOutcomeEventsFactory_h + +@interface OSOutcomeEventsFactory : NSObject + +- (id _Nonnull)initWithCache:(OSOutcomeEventsCache * _Nonnull)cache; + +- (OSOutcomeEventsRepository * _Nonnull)repository; + +@end + +#endif /* OSOutcomeEventsFactory_h */ diff --git a/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalOutcomes.framework/Versions/A/Headers/OSOutcomeEventsRepository.h b/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalOutcomes.framework/Versions/A/Headers/OSOutcomeEventsRepository.h new file mode 100644 index 0000000..a109e56 --- /dev/null +++ b/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalOutcomes.framework/Versions/A/Headers/OSOutcomeEventsRepository.h @@ -0,0 +1,55 @@ +/** +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 "OSOutcomeEventParams.h" +#import "OSInfluence.h" +#import "OSOutcomeEventsCache.h" +#import + +#ifndef OSOutcomeEventsRepository_h +#define OSOutcomeEventsRepository_h + +@interface OSOutcomeEventsRepository : NSObject + +@property (strong, nonatomic, readonly, nonnull) OSOutcomeEventsCache *outcomeEventsCache; + +- (id _Nonnull)initWithCache:(OSOutcomeEventsCache * _Nonnull)outcomeEventsCache; +- (void)requestMeasureOutcomeEventWithAppId:(NSString * _Nonnull)appId + deviceType:(NSNumber * _Nonnull)deviceType + event:(OSOutcomeEventParams * _Nonnull)event + onSuccess:(OSResultSuccessBlock _Nonnull)successBlock + onFailure:(OSFailureBlock _Nonnull)failureBlock; + +- (NSSet * _Nullable)getUnattributedUniqueOutcomeEventsSent; +- (void)saveUnattributedUniqueOutcomeEventsSent:(NSSet * _Nullable)unattributedUniqueOutcomeEventsSentSet; + +- (NSArray * _Nonnull)getNotCachedUniqueInfluencesForOutcome:(NSString * _Nonnull)name influences:(NSArray * _Nonnull)influences; +- (void)saveUniqueOutcomeEventParams:(OSOutcomeEventParams * _Nonnull)eventParams; + +@end + +#endif /* OSOutcomeEventsRepository_h */ diff --git a/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalOutcomes.framework/Versions/A/Headers/OSOutcomeSource.h b/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalOutcomes.framework/Versions/A/Headers/OSOutcomeSource.h new file mode 100644 index 0000000..683c2a4 --- /dev/null +++ b/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalOutcomes.framework/Versions/A/Headers/OSOutcomeSource.h @@ -0,0 +1,44 @@ +/** +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 "OSOutcomeSourceBody.h" + +#ifndef OSOutcomeSource_h +#define OSOutcomeSource_h + +@interface OSOutcomeSource : NSObject + +@property (strong, nonatomic, readwrite) OSOutcomeSourceBody *directBody; +@property (strong, nonatomic, readwrite) OSOutcomeSourceBody *indirectBody; + +- (id)initWithDirectBody:(OSOutcomeSourceBody *)directBody indirectBody:(OSOutcomeSourceBody *)indirectBody; + +- (NSDictionary *)toDictionaryObject; + +@end + +#endif /* OSOutcomeSource_h */ diff --git a/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalOutcomes.framework/Versions/A/Headers/OSOutcomeSourceBody.h b/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalOutcomes.framework/Versions/A/Headers/OSOutcomeSourceBody.h new file mode 100644 index 0000000..8959d7c --- /dev/null +++ b/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalOutcomes.framework/Versions/A/Headers/OSOutcomeSourceBody.h @@ -0,0 +1,42 @@ +/** +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 OSOutcomeSourceBody_h +#define OSOutcomeSourceBody_h + +@interface OSOutcomeSourceBody : NSObject + +@property (strong, nonatomic, readwrite) NSArray *notificationIds; +@property (strong, nonatomic, readwrite) NSArray *inAppMessagesIds; + +- (id)initWithNotificationIds:(NSArray *)notificationIds inAppMessagesIds:(NSArray *)inAppMessagesIds; + +- (NSDictionary *)toDictionaryObject; + +@end + +#endif /* OSOutcomeSourceBody_h */ diff --git a/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalOutcomes.framework/Versions/A/Headers/OSSessionManager.h b/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalOutcomes.framework/Versions/A/Headers/OSSessionManager.h new file mode 100644 index 0000000..7e35c39 --- /dev/null +++ b/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalOutcomes.framework/Versions/A/Headers/OSSessionManager.h @@ -0,0 +1,58 @@ +/** + 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 "OSInfluence.h" +#import "OSTrackerFactory.h" + +@protocol SessionStatusDelegate + ++ (void)onSessionEnding:(NSArray * _Nonnull)lastInfluences; + +@end + +@interface OSSessionManager : NSObject + ++ (OSSessionManager * _Nonnull)sharedSessionManager; + ++ (void)resetSharedSessionManager; + +@property (nonatomic) id _Nullable delegate; + +- (instancetype _Nonnull)init:(Class _Nullable)delegate withTrackerFactory:(OSTrackerFactory *_Nonnull)trackerFactory; + +- (NSArray *_Nonnull)getInfluences; +- (NSArray *_Nonnull)getSessionInfluences; +- (void)initSessionFromCache; +- (void)restartSessionIfNeeded:(AppEntryAction)entryAction; +- (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; + +@end diff --git a/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalOutcomes.framework/Versions/A/Headers/OSTrackerFactory.h b/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalOutcomes.framework/Versions/A/Headers/OSTrackerFactory.h new file mode 100644 index 0000000..646123f --- /dev/null +++ b/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalOutcomes.framework/Versions/A/Headers/OSTrackerFactory.h @@ -0,0 +1,49 @@ +/** +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 "OSInfluenceDataRepository.h" +#import "OSInfluence.h" +#import "OSChannelTracker.h" +#import + + +@interface OSTrackerFactory : NSObject + ++ (OSTrackerFactory* _Nonnull)sharedTrackerFactory; + +- (id _Nonnull)initWithRepository:(OSInfluenceDataRepository * _Nonnull)dataRepository; +- (void)saveInfluenceParams:(NSDictionary * _Nonnull)params; +- (void)initFromCache; +- (NSArray * _Nonnull)influences; +- (NSArray * _Nonnull)sessionInfluences; +- (OSChannelTracker * _Nonnull)iamChannelTracker; +- (OSChannelTracker * _Nonnull)notificationChannelTracker; +- (OSChannelTracker * _Nullable)channelByEntryAction:(AppEntryAction)entryAction; +- (NSArray * _Nonnull)channels; +- (NSArray * _Nonnull)channelsToResetByEntryAction:(AppEntryAction)entryAction; + +@end diff --git a/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalOutcomes.framework/Versions/A/Headers/OneSignalOutcomeEventsController.h b/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalOutcomes.framework/Versions/A/Headers/OneSignalOutcomeEventsController.h new file mode 100644 index 0000000..f99c5ce --- /dev/null +++ b/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalOutcomes.framework/Versions/A/Headers/OneSignalOutcomeEventsController.h @@ -0,0 +1,61 @@ +/** + 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 "OSSessionManager.h" +#import "OSOutcomeEventsFactory.h" +#import "OSInAppMessageOutcome.h" +#import "OSOutcomeEvent.h" + +@interface OneSignalOutcomeEventsController : NSObject + +- (instancetype _Nonnull)initWithSessionManager:(OSSessionManager * _Nonnull)sessionManager + outcomeEventsFactory:(OSOutcomeEventsFactory *_Nonnull)outcomeEventsFactory; + +- (void)clearOutcomes; + +- (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 + 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; + +@end diff --git a/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalOutcomes.framework/Versions/A/Headers/OneSignalOutcomes.h b/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalOutcomes.framework/Versions/A/Headers/OneSignalOutcomes.h new file mode 100644 index 0000000..e673d43 --- /dev/null +++ b/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalOutcomes.framework/Versions/A/Headers/OneSignalOutcomes.h @@ -0,0 +1,47 @@ +/* + 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 "OSSessionManager.h" +#import "OSInfluence.h" +#import "OSIndirectInfluence.h" +#import "OSInAppMessageOutcome.h" +#import "OSOutcomeEvent.h" +#import "OSInfluenceDataDefines.h" +#import "OSOutcomeEventsCache.h" +#import "OSCachedUniqueOutcome.h" +#import "OneSignalOutcomeEventsController.h" +#import "OSInfluenceDataRepository.h" +#import "OSOutcomeEventsFactory.h" +#import "OSTrackerFactory.h" +#import "OSOutcomeEventsRepository.h" + +@interface OneSignalOutcomes : NSObject ++ (void)migrate; +@end + diff --git a/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalOutcomes.framework/Versions/A/Modules/module.modulemap b/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalOutcomes.framework/Versions/A/Modules/module.modulemap new file mode 100644 index 0000000..3ba965f --- /dev/null +++ b/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalOutcomes.framework/Versions/A/Modules/module.modulemap @@ -0,0 +1,6 @@ +framework module OneSignalOutcomes { + umbrella header "OneSignalOutcomes.h" + + export * + module * { export * } +} diff --git a/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalOutcomes.framework/Versions/A/OneSignalOutcomes b/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalOutcomes.framework/Versions/A/OneSignalOutcomes new file mode 100755 index 0000000..b4fc119 Binary files /dev/null and b/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalOutcomes.framework/Versions/A/OneSignalOutcomes differ diff --git a/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalOutcomes.framework/Versions/A/Resources/Info.plist b/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalOutcomes.framework/Versions/A/Resources/Info.plist new file mode 100644 index 0000000..e82caa9 --- /dev/null +++ b/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalOutcomes.framework/Versions/A/Resources/Info.plist @@ -0,0 +1,50 @@ + + + + + BuildMachineOSBuild + 21G115 + CFBundleDevelopmentRegion + en + CFBundleExecutable + OneSignalOutcomes + CFBundleIdentifier + com.onesignal.OneSignalOutcomes + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + OneSignalOutcomes + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0 + CFBundleSupportedPlatforms + + MacOSX + + CFBundleVersion + 1 + DTCompiler + com.apple.compilers.llvm.clang.1_0 + DTPlatformBuild + 13F100 + DTPlatformName + macosx + DTPlatformVersion + 12.3 + DTSDKBuild + 21E226 + DTSDKName + macosx12.3 + DTXcode + 1341 + DTXcodeBuild + 13F100 + LSMinimumSystemVersion + 10.15 + UIDeviceFamily + + 2 + + + diff --git a/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalOutcomes.framework/Versions/A/_CodeSignature/CodeResources b/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalOutcomes.framework/Versions/A/_CodeSignature/CodeResources new file mode 100644 index 0000000..87d796a --- /dev/null +++ b/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalOutcomes.framework/Versions/A/_CodeSignature/CodeResources @@ -0,0 +1,261 @@ + + + + + files + + Resources/Info.plist + + N6O65CroHCIvuZnvaprYK21f5VM= + + + files2 + + Headers/OSCachedUniqueOutcome.h + + hash2 + + totu1nQ6/x4iFLCj1sa0l/+/yxIYwiM3vG0tUTwmaqs= + + + Headers/OSChannelTracker.h + + hash2 + + y+P1oKzfvURE+SVKSVr4j6/jH8DgujNwXv1hKuO1EAE= + + + Headers/OSInAppMessageOutcome.h + + hash2 + + 6kjvfIl+pf/78MxrtV/Sqy17OmVUmw8+rYEgjDHXNWE= + + + Headers/OSIndirectInfluence.h + + hash2 + + n3sfj9ffeEbvDhJzT28iKptXmEQRbSVWSvDeMisJmsc= + + + Headers/OSInfluence.h + + hash2 + + tjQiNzfx4rDkTwjfykGUHZYyZQOTnKPILoqHIDd/2ic= + + + Headers/OSInfluenceDataDefines.h + + hash2 + + iQMoFhEUbxG3EpUfUTH/khO6IrPhWKvvXnku47XTZdc= + + + Headers/OSInfluenceDataRepository.h + + hash2 + + knk1+sZ0qZOmSkq4A3Ej5R1dtUJ+36O8oS7eBPIwo/s= + + + Headers/OSOutcomeEvent.h + + hash2 + + dEM+sqMVSwAGR7Se/gj9TDcGizX0trTRktNyjvxHp/M= + + + Headers/OSOutcomeEventParams.h + + hash2 + + 1ba84vOacDL3dvfPb9QuuJrPbNIKMtO5uAFP8fQXVQg= + + + Headers/OSOutcomeEventsCache.h + + hash2 + + N6az4wqlL4oB+ugOXVU1xgJMCuABHcDKVi5XAV6e/GU= + + + Headers/OSOutcomeEventsFactory.h + + hash2 + + B9zLkhrLlC2+UdJh/XfEHYstpiw8n4y2rH/kdw/ob5A= + + + Headers/OSOutcomeEventsRepository.h + + hash2 + + REkrumsrQPze19CbYkIMpr/Xb0y8y6i4Ytyk9J30qMY= + + + Headers/OSOutcomeSource.h + + hash2 + + W8Ekd6VjML7ZnahaytXqSaHRU+B6kBF5OakKQOrQstQ= + + + Headers/OSOutcomeSourceBody.h + + hash2 + + X1aTd7m6pBhX97KiK9OYccGmdoBVHXFdtNIUegnZ+2s= + + + Headers/OSSessionManager.h + + hash2 + + PqGFeWJieWBjFVlo9hW6K3zw3EROosJ9GekCpVrw87U= + + + Headers/OSTrackerFactory.h + + hash2 + + e38XG+rnmKSpSyDmrN4/Mc4+zLBKKWQ6+gexB9VHFKg= + + + Headers/OneSignalOutcomeEventsController.h + + hash2 + + 2LLCLqre2Yz61h0Ir/t5whNSGEa/8+9QKJx8WZ/15CQ= + + + Headers/OneSignalOutcomes.h + + hash2 + + GFLvc7yAjjvzpcTn4DOvrAd+0+BacOygATaFNR719s0= + + + Modules/module.modulemap + + hash2 + + 71NgarV0pwtZTDET32aMQ3/vjxGUawYZx/s2o2jI064= + + + Resources/Info.plist + + hash2 + + b2WZtRnu3TwMA5E/felWhZoDG0brRXrtmRyEPb6CrQU= + + + + 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/platform/OneSignalOutcomes.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalOutcomes.framework/Versions/Current b/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalOutcomes.framework/Versions/Current new file mode 120000 index 0000000..8c7e5a6 --- /dev/null +++ b/ios/platform/OneSignalOutcomes.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalOutcomes.framework/Versions/Current @@ -0,0 +1 @@ +A \ No newline at end of file diff --git a/ios/titanium.xcconfig b/ios/titanium.xcconfig index 01d7250..9098174 100644 --- a/ios/titanium.xcconfig +++ b/ios/titanium.xcconfig @@ -4,12 +4,13 @@ // OF YOUR TITANIUM SDK YOU'RE BUILDING FOR // // -TITANIUM_SDK_VERSION = 8.3.1.GA + +TITANIUM_SDK_VERSION = 11.1.0.GA // // THESE SHOULD BE OK GENERALLY AS-IS // -TITANIUM_SDK = ~/Library/Application Support/Titanium/mobilesdk/osx/$(TITANIUM_SDK_VERSION) -TITANIUM_BASE_SDK = "$(TITANIUM_SDK)/iphone/include" -FRAMEWORK_SEARCH_PATHS = $(inherited) "$(TITANIUM_SDK)/iphone/Frameworks" -HEADER_SEARCH_PATHS= $(TITANIUM_BASE_SDK) + +TITANIUM_SDK = /Users/$(USER)/Library/Application Support/Titanium/mobilesdk/osx/$(TITANIUM_SDK_VERSION) +HEADER_SEARCH_PATHS = $(inherited) "$(TITANIUM_SDK)/iphone/include" +FRAMEWORK_SEARCH_PATHS = $(inherited) "$(TITANIUM_SDK)/iphone/Frameworks/**"