diff --git a/iOS_SDK/OneSignalDevApp/OneSignalDevApp/AppDelegate.m b/iOS_SDK/OneSignalDevApp/OneSignalDevApp/AppDelegate.m
index 44c516b10..8cd7c88ab 100644
--- a/iOS_SDK/OneSignalDevApp/OneSignalDevApp/AppDelegate.m
+++ b/iOS_SDK/OneSignalDevApp/OneSignalDevApp/AppDelegate.m
@@ -76,7 +76,7 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(
return YES;
}
-#define ONESIGNAL_APP_ID_DEFAULT @"YOUR_APP_ID_HERE"
+#define ONESIGNAL_APP_ID_DEFAULT @"77e32082-ea27-42e3-a898-c72e141824ef"
#define ONESIGNAL_APP_ID_KEY_FOR_TESTING @"YOUR_APP_ID_HERE"
+ (NSString*)getOneSignalAppId {
diff --git a/iOS_SDK/OneSignalDevApp/OneSignalDevApp/Base.lproj/Main.storyboard b/iOS_SDK/OneSignalDevApp/OneSignalDevApp/Base.lproj/Main.storyboard
index c5f287a5e..721f61058 100644
--- a/iOS_SDK/OneSignalDevApp/OneSignalDevApp/Base.lproj/Main.storyboard
+++ b/iOS_SDK/OneSignalDevApp/OneSignalDevApp/Base.lproj/Main.storyboard
@@ -689,21 +689,12 @@
-
-
-
-
@@ -761,7 +752,7 @@
-
+
diff --git a/iOS_SDK/OneSignalDevApp/OneSignalExample.xcodeproj/project.pbxproj b/iOS_SDK/OneSignalDevApp/OneSignalExample.xcodeproj/project.pbxproj
index 57976f440..ca7c65682 100644
--- a/iOS_SDK/OneSignalDevApp/OneSignalExample.xcodeproj/project.pbxproj
+++ b/iOS_SDK/OneSignalDevApp/OneSignalExample.xcodeproj/project.pbxproj
@@ -660,7 +660,6 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
- 94735148291C4702000D91D3 /* LiveActivityController.swift in Sources */,
9112E88D1E724C320022A1CB /* ViewController.m in Sources */,
9112E88A1E724C320022A1CB /* AppDelegate.m in Sources */,
945C59F6296CF30B0097041D /* LiveActivityController.swift in Sources */,
@@ -1145,298 +1144,6 @@
};
name = Release;
};
- DEDFF33B2901E4BD00D4E275 /* Release 64 bit */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- ALWAYS_SEARCH_USER_PATHS = NO;
- CLANG_ANALYZER_NONNULL = YES;
- CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
- CLANG_CXX_LIBRARY = "libc++";
- CLANG_ENABLE_MODULES = YES;
- CLANG_ENABLE_OBJC_ARC = YES;
- CLANG_WARN_BOOL_CONVERSION = YES;
- CLANG_WARN_CONSTANT_CONVERSION = YES;
- CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
- CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
- CLANG_WARN_EMPTY_BODY = YES;
- CLANG_WARN_ENUM_CONVERSION = YES;
- CLANG_WARN_INFINITE_RECURSION = YES;
- CLANG_WARN_INT_CONVERSION = YES;
- CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
- CLANG_WARN_SUSPICIOUS_MOVE = YES;
- CLANG_WARN_UNREACHABLE_CODE = YES;
- CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
- "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
- COPY_PHASE_STRIP = NO;
- DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
- ENABLE_NS_ASSERTIONS = NO;
- ENABLE_STRICT_OBJC_MSGSEND = YES;
- GCC_C_LANGUAGE_STANDARD = gnu99;
- GCC_NO_COMMON_BLOCKS = YES;
- GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
- GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
- GCC_WARN_UNDECLARED_SELECTOR = YES;
- GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
- GCC_WARN_UNUSED_FUNCTION = YES;
- GCC_WARN_UNUSED_VARIABLE = YES;
- IPHONEOS_DEPLOYMENT_TARGET = 10.2;
- MTL_ENABLE_DEBUG_INFO = NO;
- PRODUCT_NAME = OneSignalExample;
- SDKROOT = iphoneos;
- TARGETED_DEVICE_FAMILY = "1,2";
- VALIDATE_PRODUCT = YES;
- };
- name = "Release 64 bit";
- };
- DEDFF33C2901E4BD00D4E275 /* Release 64 bit */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
- ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
- CLANG_ENABLE_MODULES = YES;
- CODE_SIGN_ENTITLEMENTS = OneSignalDevApp/OneSignalDevApp.entitlements;
- CURRENT_PROJECT_VERSION = 1.4.4;
- DERIVE_MACCATALYST_PRODUCT_BUNDLE_IDENTIFIER = YES;
- DEVELOPMENT_TEAM = 99SW8E36CT;
- "DYLIB_INSTALL_NAME_BASE[arch=*]" = "@rpath";
- FRAMEWORK_SEARCH_PATHS = (
- "$(inherited)",
- "$(PROJECT_DIR)",
- );
- INFOPLIST_FILE = OneSignalDevApp/Info.plist;
- IPHONEOS_DEPLOYMENT_TARGET = 9.0;
- LD_RUNPATH_SEARCH_PATHS = (
- "$(inherited)",
- "@executable_path/Frameworks",
- );
- MARKETING_VERSION = 1.4.4;
- OTHER_LDFLAGS = "-ObjC";
- PRODUCT_BUNDLE_IDENTIFIER = com.onesignal.example;
- PRODUCT_NAME = OneSignalExample;
- SUPPORTS_MACCATALYST = YES;
- SWIFT_OBJC_BRIDGING_HEADER = "OneSignalDevApp/OneSignalExample-Bridging-Header.h";
- SWIFT_VERSION = 5.0;
- };
- name = "Release 64 bit";
- };
- DEDFF33D2901E4BD00D4E275 /* Release 64 bit */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_WARN_STRICT_PROTOTYPES = NO;
- CODE_SIGN_ENTITLEMENTS = OneSignalNotificationServiceExtension/OneSignalNotificationServiceExtension.entitlements;
- CURRENT_PROJECT_VERSION = 1.4.4;
- DERIVE_MACCATALYST_PRODUCT_BUNDLE_IDENTIFIER = YES;
- DEVELOPMENT_TEAM = 99SW8E36CT;
- FRAMEWORK_SEARCH_PATHS = (
- "$(inherited)",
- "$(PROJECT_DIR)",
- );
- GCC_OPTIMIZATION_LEVEL = 0;
- INFOPLIST_FILE = OneSignalNotificationServiceExtension/Info.plist;
- LD_RUNPATH_SEARCH_PATHS = (
- "$(inherited)",
- "@executable_path/Frameworks",
- "@executable_path/../../Frameworks",
- );
- MARKETING_VERSION = 1.4.4;
- OTHER_LDFLAGS = "-ObjC";
- PRODUCT_BUNDLE_IDENTIFIER = com.onesignal.example.OneSignalNotificationServiceExtensionA;
- PRODUCT_NAME = "$(TARGET_NAME)";
- SKIP_INSTALL = YES;
- SUPPORTS_MACCATALYST = YES;
- };
- name = "Release 64 bit";
- };
- DEDFF33E2901E4BD00D4E275 /* Release 64 bit */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
- ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
- CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
- CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
- CLANG_ENABLE_OBJC_WEAK = YES;
- CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
- CLANG_WARN_COMMA = YES;
- CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
- CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
- CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
- CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
- CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO;
- CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
- CLANG_WARN_STRICT_PROTOTYPES = YES;
- CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
- CODE_SIGN_ENTITLEMENTS = OneSignalDevAppClip/OneSignalDevAppClip.entitlements;
- CODE_SIGN_STYLE = Automatic;
- CURRENT_PROJECT_VERSION = 1.4.4;
- DEVELOPMENT_TEAM = 99SW8E36CT;
- GCC_C_LANGUAGE_STANDARD = gnu11;
- GCC_PREPROCESSOR_DEFINITIONS = OS_APP_CLIP;
- INFOPLIST_FILE = OneSignalDevAppClip/Info.plist;
- IPHONEOS_DEPLOYMENT_TARGET = 14.0;
- LD_RUNPATH_SEARCH_PATHS = (
- "$(inherited)",
- "@executable_path/Frameworks",
- );
- MARKETING_VERSION = 1.4.4;
- MTL_FAST_MATH = YES;
- PRODUCT_BUNDLE_IDENTIFIER = com.onesignal.example.Clip;
- PRODUCT_NAME = OneSignalExampleClip;
- TARGETED_DEVICE_FAMILY = "1,2";
- };
- name = "Release 64 bit";
- };
- DEFF653E2901DDF900EF7E06 /* Debug 64 bit */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- ALWAYS_SEARCH_USER_PATHS = NO;
- CLANG_ANALYZER_NONNULL = YES;
- CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
- CLANG_CXX_LIBRARY = "libc++";
- CLANG_ENABLE_MODULES = YES;
- CLANG_ENABLE_OBJC_ARC = YES;
- CLANG_WARN_BOOL_CONVERSION = YES;
- CLANG_WARN_CONSTANT_CONVERSION = YES;
- CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
- CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
- CLANG_WARN_EMPTY_BODY = YES;
- CLANG_WARN_ENUM_CONVERSION = YES;
- CLANG_WARN_INFINITE_RECURSION = YES;
- CLANG_WARN_INT_CONVERSION = YES;
- CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
- CLANG_WARN_SUSPICIOUS_MOVE = YES;
- CLANG_WARN_UNREACHABLE_CODE = YES;
- CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
- "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
- COPY_PHASE_STRIP = NO;
- DEBUG_INFORMATION_FORMAT = dwarf;
- ENABLE_STRICT_OBJC_MSGSEND = YES;
- ENABLE_TESTABILITY = YES;
- GCC_C_LANGUAGE_STANDARD = gnu99;
- GCC_DYNAMIC_NO_PIC = NO;
- GCC_NO_COMMON_BLOCKS = YES;
- GCC_OPTIMIZATION_LEVEL = 0;
- GCC_PREPROCESSOR_DEFINITIONS = (
- "DEBUG=1",
- "$(inherited)",
- );
- GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
- GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
- GCC_WARN_UNDECLARED_SELECTOR = YES;
- GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
- GCC_WARN_UNUSED_FUNCTION = YES;
- GCC_WARN_UNUSED_VARIABLE = YES;
- IPHONEOS_DEPLOYMENT_TARGET = 10.2;
- MTL_ENABLE_DEBUG_INFO = YES;
- ONLY_ACTIVE_ARCH = YES;
- PRODUCT_NAME = OneSignalExample;
- SDKROOT = iphoneos;
- TARGETED_DEVICE_FAMILY = "1,2";
- };
- name = "Debug 64 bit";
- };
- DEFF653F2901DDF900EF7E06 /* Debug 64 bit */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
- ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
- CLANG_ENABLE_MODULES = YES;
- CODE_SIGN_ENTITLEMENTS = OneSignalDevApp/OneSignalDevApp.entitlements;
- CURRENT_PROJECT_VERSION = 1.4.4;
- DERIVE_MACCATALYST_PRODUCT_BUNDLE_IDENTIFIER = YES;
- DEVELOPMENT_TEAM = 99SW8E36CT;
- "DYLIB_INSTALL_NAME_BASE[arch=*]" = "@rpath";
- FRAMEWORK_SEARCH_PATHS = (
- "$(inherited)",
- "$(PROJECT_DIR)",
- );
- INFOPLIST_FILE = OneSignalDevApp/Info.plist;
- IPHONEOS_DEPLOYMENT_TARGET = 9.0;
- LD_RUNPATH_SEARCH_PATHS = (
- "$(inherited)",
- "@executable_path/Frameworks",
- );
- MARKETING_VERSION = 1.4.4;
- OTHER_LDFLAGS = "-ObjC";
- PRODUCT_BUNDLE_IDENTIFIER = com.onesignal.example;
- PRODUCT_NAME = OneSignalExample;
- SUPPORTS_MACCATALYST = YES;
- SWIFT_OBJC_BRIDGING_HEADER = "OneSignalDevApp/OneSignalExample-Bridging-Header.h";
- SWIFT_OPTIMIZATION_LEVEL = "-Onone";
- SWIFT_VERSION = 5.0;
- };
- name = "Debug 64 bit";
- };
- DEFF65402901DDF900EF7E06 /* Debug 64 bit */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_WARN_STRICT_PROTOTYPES = NO;
- CODE_SIGN_ENTITLEMENTS = OneSignalNotificationServiceExtension/OneSignalNotificationServiceExtension.entitlements;
- CURRENT_PROJECT_VERSION = 1.4.4;
- DERIVE_MACCATALYST_PRODUCT_BUNDLE_IDENTIFIER = YES;
- DEVELOPMENT_TEAM = 99SW8E36CT;
- FRAMEWORK_SEARCH_PATHS = (
- "$(inherited)",
- "$(PROJECT_DIR)",
- );
- INFOPLIST_FILE = OneSignalNotificationServiceExtension/Info.plist;
- LD_RUNPATH_SEARCH_PATHS = (
- "$(inherited)",
- "@executable_path/Frameworks",
- "@executable_path/../../Frameworks",
- );
- MARKETING_VERSION = 1.4.4;
- OTHER_LDFLAGS = "-ObjC";
- PRODUCT_BUNDLE_IDENTIFIER = com.onesignal.example.OneSignalNotificationServiceExtensionA;
- PRODUCT_NAME = "$(TARGET_NAME)";
- SKIP_INSTALL = YES;
- SUPPORTS_MACCATALYST = YES;
- };
- name = "Debug 64 bit";
- };
- DEFF65412901DDF900EF7E06 /* Debug 64 bit */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
- ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
- CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
- CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
- CLANG_ENABLE_OBJC_WEAK = YES;
- CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
- CLANG_WARN_COMMA = YES;
- CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
- CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
- CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
- CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
- CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO;
- CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
- CLANG_WARN_STRICT_PROTOTYPES = YES;
- CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
- CODE_SIGN_ENTITLEMENTS = OneSignalDevAppClip/OneSignalDevAppClip.entitlements;
- CODE_SIGN_STYLE = Automatic;
- CURRENT_PROJECT_VERSION = 1.4.4;
- DEVELOPMENT_TEAM = 99SW8E36CT;
- "DYLIB_INSTALL_NAME_BASE[arch=*]" = "@rpath";
- GCC_C_LANGUAGE_STANDARD = gnu11;
- GCC_PREPROCESSOR_DEFINITIONS = (
- "DEBUG=1",
- "$(inherited)",
- OS_APP_CLIP,
- );
- INFOPLIST_FILE = OneSignalDevAppClip/Info.plist;
- IPHONEOS_DEPLOYMENT_TARGET = 14.0;
- LD_RUNPATH_SEARCH_PATHS = (
- "$(inherited)",
- "@executable_path/Frameworks",
- );
- MARKETING_VERSION = 1.4.4;
- MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
- MTL_FAST_MATH = YES;
- PRODUCT_BUNDLE_IDENTIFIER = com.onesignal.example.Clip;
- PRODUCT_NAME = OneSignalExampleClip;
- TARGETED_DEVICE_FAMILY = "1,2";
- };
- name = "Debug 64 bit";
- };
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
@@ -1444,9 +1151,7 @@
isa = XCConfigurationList;
buildConfigurations = (
9112E8971E724C320022A1CB /* Debug */,
- DEFF653E2901DDF900EF7E06 /* Debug 64 bit */,
9112E8981E724C320022A1CB /* Release */,
- DEDFF33B2901E4BD00D4E275 /* Release 64 bit */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
@@ -1455,9 +1160,7 @@
isa = XCConfigurationList;
buildConfigurations = (
9112E89A1E724C320022A1CB /* Debug */,
- DEFF653F2901DDF900EF7E06 /* Debug 64 bit */,
9112E89B1E724C320022A1CB /* Release */,
- DEDFF33C2901E4BD00D4E275 /* Release 64 bit */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
@@ -1466,20 +1169,7 @@
isa = XCConfigurationList;
buildConfigurations = (
9150E77B1E73BEDD00C5D46A /* Debug */,
- DEFF65402901DDF900EF7E06 /* Debug 64 bit */,
9150E77C1E73BEDD00C5D46A /* Release */,
- DEDFF33D2901E4BD00D4E275 /* Release 64 bit */,
- );
- defaultConfigurationIsVisible = 0;
- defaultConfigurationName = Release;
- };
- 94735163291C4EED000D91D3 /* Build configuration list for PBXNativeTarget "OneSignalWidgetExtensionExtension" */ = {
- isa = XCConfigurationList;
- buildConfigurations = (
- 94735164291C4EED000D91D3 /* Debug */,
- 94735165291C4EED000D91D3 /* Debug 64 bit */,
- 94735166291C4EED000D91D3 /* Release */,
- 94735167291C4EED000D91D3 /* Release 64 bit */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
@@ -1497,9 +1187,7 @@
isa = XCConfigurationList;
buildConfigurations = (
DE68DA7224C7695A00FC95A8 /* Debug */,
- DEFF65412901DDF900EF7E06 /* Debug 64 bit */,
DE68DA7324C7695A00FC95A8 /* Release */,
- DEDFF33E2901E4BD00D4E275 /* Release 64 bit */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
diff --git a/iOS_SDK/OneSignalDevApp/OneSignalWidgetExtension/Assets.xcassets/AppIcon.appiconset/Contents.json b/iOS_SDK/OneSignalDevApp/OneSignalWidgetExtension/Assets.xcassets/AppIcon.appiconset/Contents.json
new file mode 100644
index 000000000..13613e3ee
--- /dev/null
+++ b/iOS_SDK/OneSignalDevApp/OneSignalWidgetExtension/Assets.xcassets/AppIcon.appiconset/Contents.json
@@ -0,0 +1,13 @@
+{
+ "images" : [
+ {
+ "idiom" : "universal",
+ "platform" : "ios",
+ "size" : "1024x1024"
+ }
+ ],
+ "info" : {
+ "author" : "xcode",
+ "version" : 1
+ }
+}
diff --git a/iOS_SDK/OneSignalDevApp/OneSignalWidgetExtension/Info.plist b/iOS_SDK/OneSignalDevApp/OneSignalWidgetExtension/Info.plist
index 04f07b5f9..0f118fb75 100644
--- a/iOS_SDK/OneSignalDevApp/OneSignalWidgetExtension/Info.plist
+++ b/iOS_SDK/OneSignalDevApp/OneSignalWidgetExtension/Info.plist
@@ -2,8 +2,6 @@
- NSSupportsLiveActivities
-
NSExtension
NSExtensionPointIdentifier
diff --git a/iOS_SDK/OneSignalSDK/OneSignal.xcodeproj/project.pbxproj b/iOS_SDK/OneSignalSDK/OneSignal.xcodeproj/project.pbxproj
index 47af74af6..bdaa71f4a 100644
--- a/iOS_SDK/OneSignalSDK/OneSignal.xcodeproj/project.pbxproj
+++ b/iOS_SDK/OneSignalSDK/OneSignal.xcodeproj/project.pbxproj
@@ -1372,8 +1372,6 @@
4529DECD1FA81DE000CEAB1D /* Shadows */ = {
isa = PBXGroup;
children = (
- DE75B3DF28BD432800162A95 /* OneSignalUNUserNotificationCenterOverrider.h */,
- DE75B3DE28BD432700162A95 /* OneSignalUNUserNotificationCenterOverrider.m */,
7A65D628246627AD007FF196 /* OSInAppMessageViewOverrider.h */,
7A65D629246627AD007FF196 /* OSInAppMessageViewOverrider.m */,
5B58E4F3237CE7B3009401E0 /* UIDeviceOverrider.h */,
@@ -5304,7 +5302,6 @@
isa = XCConfigurationList;
buildConfigurations = (
CA2951B62167F4120064227A /* Release */,
- DEDFF3302901E47400D4E275 /* Release 64 bit */,
CA2951C22167FB950064227A /* Debug */,
DE3D8F3828C15839008C2BBF /* Test */,
);
@@ -5315,7 +5312,6 @@
isa = XCConfigurationList;
buildConfigurations = (
CA2951B72167F4120064227A /* Release */,
- DEDFF3312901E47400D4E275 /* Release 64 bit */,
CA2951C32167FB950064227A /* Debug */,
DE3D8F3928C15839008C2BBF /* Test */,
);
@@ -5336,7 +5332,6 @@
isa = XCConfigurationList;
buildConfigurations = (
CA2951B82167F4120064227A /* Release */,
- DEDFF3322901E47400D4E275 /* Release 64 bit */,
CA2951C42167FB950064227A /* Debug */,
DE3D8F3A28C15839008C2BBF /* Test */,
);
@@ -5347,7 +5342,6 @@
isa = XCConfigurationList;
buildConfigurations = (
CA2951B92167F4120064227A /* Release */,
- DEDFF3332901E47400D4E275 /* Release 64 bit */,
CA2951C52167FB950064227A /* Debug */,
DE3D8F3B28C15839008C2BBF /* Test */,
);
@@ -5358,7 +5352,6 @@
isa = XCConfigurationList;
buildConfigurations = (
CA2951C12167F9860064227A /* Release */,
- DEDFF3352901E47400D4E275 /* Release 64 bit */,
CA2951C72167FB950064227A /* Debug */,
DE3D8F3D28C15839008C2BBF /* Test */,
);
@@ -5369,7 +5362,6 @@
isa = XCConfigurationList;
buildConfigurations = (
CA2951BA2167F4120064227A /* Release */,
- DEDFF3342901E47400D4E275 /* Release 64 bit */,
CA2951C62167FB950064227A /* Debug */,
DE3D8F3C28C15839008C2BBF /* Test */,
);
@@ -5390,7 +5382,6 @@
isa = XCConfigurationList;
buildConfigurations = (
DE7D17F127026B95002D3A5D /* Release */,
- DEDFF3382901E47400D4E275 /* Release 64 bit */,
DE7D17F227026B95002D3A5D /* Debug */,
DE3D8F4028C15839008C2BBF /* Test */,
);
@@ -5401,7 +5392,6 @@
isa = XCConfigurationList;
buildConfigurations = (
DE7D180427026BA3002D3A5D /* Release */,
- DEDFF3392901E47400D4E275 /* Release 64 bit */,
DE7D180527026BA3002D3A5D /* Debug */,
DE3D8F4128C15839008C2BBF /* Test */,
);
@@ -5412,7 +5402,6 @@
isa = XCConfigurationList;
buildConfigurations = (
DE7D188B27037F43002D3A5D /* Release */,
- DEDFF33A2901E47400D4E275 /* Release 64 bit */,
DE7D188C27037F43002D3A5D /* Debug */,
DE3D8F4228C15839008C2BBF /* Test */,
);
@@ -5443,7 +5432,6 @@
isa = XCConfigurationList;
buildConfigurations = (
DEC2EA9124B7B63800C1FD34 /* Release */,
- DEDFF3362901E47400D4E275 /* Release 64 bit */,
DEC2EA9224B7B63800C1FD34 /* Debug */,
DE3D8F3E28C15839008C2BBF /* Test */,
);
@@ -5454,7 +5442,6 @@
isa = XCConfigurationList;
buildConfigurations = (
DEF5CD082539321D0003E9CC /* Release */,
- DEDFF3372901E47400D4E275 /* Release 64 bit */,
DEF5CD092539321D0003E9CC /* Debug */,
DE3D8F3F28C15839008C2BBF /* Test */,
);
diff --git a/iOS_SDK/OneSignalSDK/OneSignal.xcodeproj/xcshareddata/xcschemes/UnitTestApp.xcscheme b/iOS_SDK/OneSignalSDK/OneSignal.xcodeproj/xcshareddata/xcschemes/UnitTestApp.xcscheme
index 91305c2d0..d56906b8f 100644
--- a/iOS_SDK/OneSignalSDK/OneSignal.xcodeproj/xcshareddata/xcschemes/UnitTestApp.xcscheme
+++ b/iOS_SDK/OneSignalSDK/OneSignal.xcodeproj/xcshareddata/xcschemes/UnitTestApp.xcscheme
@@ -94,7 +94,7 @@
+ buildConfiguration = "Debug">
-#import
-#import
-#import
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wstrict-prototypes"
-#pragma clang diagnostic ignored "-Wnullability-completeness"
-
-@interface OSInAppMessage : NSObject
-
-@property (strong, nonatomic, nonnull) NSString *messageId;
-
-// Convert the object into a NSDictionary
-- (NSDictionary *_Nonnull)jsonRepresentation;
-
-@end
-
-
-@interface OSInAppMessageTag : NSObject
-
-@property (strong, nonatomic, nullable) NSDictionary *tagsToAdd;
-@property (strong, nonatomic, nullable) NSArray *tagsToRemove;
-
-// Convert the class into a NSDictionary
-- (NSDictionary *_Nonnull)jsonRepresentation;
-
-@end
-
-@interface OSInAppMessageAction : NSObject
-
-// The action name attached to the IAM action
-@property (strong, nonatomic, nullable) NSString *clickName;
-
-// The URL (if any) that should be opened when the action occurs
-@property (strong, nonatomic, nullable) NSURL *clickUrl;
-
-//UUID for the page in an IAM Carousel
-@property (strong, nonatomic, nullable) NSString *pageId;
-
-// Whether or not the click action is first click on the IAM
-@property (nonatomic) BOOL firstClick;
-
-// Whether or not the click action dismisses the message
-@property (nonatomic) BOOL closesMessage;
-
-// The outcome to send for this action
-@property (strong, nonatomic, nullable) NSArray *outcomes;
-
-// The tags to send for this action
-@property (strong, nonatomic, nullable) OSInAppMessageTag *tags;
-
-// Convert the class into a NSDictionary
-- (NSDictionary *_Nonnull)jsonRepresentation;
-
-@end
-
-@protocol OSInAppMessageDelegate
-@optional
-- (void)handleMessageAction:(OSInAppMessageAction * _Nonnull)action NS_SWIFT_NAME(handleMessageAction(action:));
-@end
-
-@protocol OSInAppMessageLifecycleHandler
-@optional
-- (void)onWillDisplayInAppMessage:(OSInAppMessage *)message;
-- (void)onDidDisplayInAppMessage:(OSInAppMessage *)message;
-- (void)onWillDismissInAppMessage:(OSInAppMessage *)message;
-- (void)onDidDismissInAppMessage:(OSInAppMessage *)message;
-@end
-
-typedef NS_ENUM(NSInteger, OSNotificationPermission) {
- // The user has not yet made a choice regarding whether your app can show notifications.
- OSNotificationPermissionNotDetermined = 0,
-
- // The application is not authorized to post user notifications.
- OSNotificationPermissionDenied,
-
- // The application is authorized to post user notifications.
- OSNotificationPermissionAuthorized,
-
- // the application is only authorized to post Provisional notifications (direct to history)
- OSNotificationPermissionProvisional,
-
- // the application is authorized to send notifications for 8 hours. Only used by App Clips.
- OSNotificationPermissionEphemeral
-};
-
-// Permission Classes
-@interface OSPermissionState : NSObject
-
-@property (readonly, nonatomic) BOOL reachable;
-@property (readonly, nonatomic) BOOL hasPrompted;
-@property (readonly, nonatomic) BOOL providesAppNotificationSettings;
-@property (readonly, nonatomic) OSNotificationPermission status;
-- (NSDictionary* _Nonnull)toDictionary;
-
-@end
-
-@interface OSPermissionStateChanges : NSObject
-
-@property (readonly, nonnull) OSPermissionState* to;
-@property (readonly, nonnull) OSPermissionState* from;
-- (NSDictionary* _Nonnull)toDictionary;
-
-@end
-
-// Subscription Classes
-@interface OSSubscriptionState : NSObject
-
-@property (readonly, nonatomic) BOOL isSubscribed; // (yes only if userId, pushToken, and setSubscription exists / are true)
-@property (readonly, nonatomic) BOOL isPushDisabled; // returns value of disablePush.
-@property (readonly, nonatomic, nullable) NSString* userId; // AKA OneSignal PlayerId
-@property (readonly, nonatomic, nullable) NSString* pushToken; // AKA Apple Device Token
-- (NSDictionary* _Nonnull)toDictionary;
-
-@end
-
-@interface OSSubscriptionStateChanges : NSObject
-@property (readonly, nonnull) OSSubscriptionState* to;
-@property (readonly, nonnull) OSSubscriptionState* from;
-- (NSDictionary* _Nonnull)toDictionary;
-@end
-
-@interface OSEmailSubscriptionState : NSObject
-@property (readonly, nonatomic, nullable) NSString *emailUserId; // The new Email user ID
-@property (readonly, nonatomic, nullable) NSString *emailAddress;
-@property (readonly, nonatomic) BOOL isSubscribed;
-- (NSDictionary* _Nonnull)toDictionary;
-@end
-
-@interface OSEmailSubscriptionStateChanges : NSObject
-@property (readonly, nonnull) OSEmailSubscriptionState* to;
-@property (readonly, nonnull) OSEmailSubscriptionState* from;
-- (NSDictionary* _Nonnull)toDictionary;
-@end
-
-@interface OSSMSSubscriptionState : NSObject
-@property (readonly, nonatomic, nullable) NSString* smsUserId;
-@property (readonly, nonatomic, nullable) NSString *smsNumber;
-@property (readonly, nonatomic) BOOL isSubscribed;
-- (NSDictionary* _Nonnull)toDictionary;
-@end
-
-@interface OSSMSSubscriptionStateChanges : NSObject
-@property (readonly, nonnull) OSSMSSubscriptionState* to;
-@property (readonly, nonnull) OSSMSSubscriptionState* from;
-- (NSDictionary* _Nonnull)toDictionary;
-@end
-
-@protocol OSPermissionObserver
-- (void)onOSPermissionChanged:(OSPermissionStateChanges* _Nonnull)stateChanges;
-@end
-
-@protocol OSSubscriptionObserver
-- (void)onOSSubscriptionChanged:(OSSubscriptionStateChanges* _Nonnull)stateChanges;
-@end
-
-@protocol OSEmailSubscriptionObserver
-- (void)onOSEmailSubscriptionChanged:(OSEmailSubscriptionStateChanges* _Nonnull)stateChanges;
-@end
-
-@protocol OSSMSSubscriptionObserver
-- (void)onOSSMSSubscriptionChanged:(OSSMSSubscriptionStateChanges* _Nonnull)stateChanges;
-@end
-
-@interface OSDeviceState : NSObject
-/**
- * Get the app's notification permission
- * @return false if the user disabled notifications for the app, otherwise true
- */
-@property (readonly) BOOL hasNotificationPermission;
-/**
- * Get whether the user is subscribed to OneSignal notifications or not
- * @return false if the user is not subscribed to OneSignal notifications, otherwise true
- */
-@property (readonly) BOOL isPushDisabled;
-/**
- * Get whether the user is subscribed
- * @return true if isNotificationEnabled, isUserSubscribed, getUserId and getPushToken are true, otherwise false
- */
-@property (readonly) BOOL isSubscribed;
-/**
- * Get the user notification permision status
- * @return OSNotificationPermission
-*/
-@property (readonly) OSNotificationPermission notificationPermissionStatus;
-/**
- * Get user id from registration (player id)
- * @return user id if user is registered, otherwise null
- */
-@property (readonly, nullable) NSString* userId;
-/**
- * Get apple deice push token
- * @return push token if available, otherwise null
- */
-@property (readonly, nullable) NSString* pushToken;
-/**
- * Get the user email id
- * @return email id if user address was registered, otherwise null
- */
-@property (readonly, nullable) NSString* emailUserId;
-/**
- * Get the user email
- * @return email address if set, otherwise null
- */
-@property (readonly, nullable) NSString* emailAddress;
-
-@property (readonly) BOOL isEmailSubscribed;
-
-/**
- * Get the user sms id
- * @return sms id if user sms number was registered, otherwise null
- */
-@property (readonly, nullable) NSString* smsUserId;
-/**
- * Get the user sms number, number may start with + and continue with numbers or contain only numbers
- * e.g: +11231231231 or 11231231231
- * @return sms number if set, otherwise null
- */
-@property (readonly, nullable) NSString* smsNumber;
-
-@property (readonly) BOOL isSMSSubscribed;
-
-// Convert the class into a NSDictionary
-- (NSDictionary *_Nonnull)jsonRepresentation;
-
-@end
-
-typedef void (^OSWebOpenURLResultBlock)(BOOL shouldOpen);
-
-/*Block for generic results on success and errors on failure*/
-typedef void (^OSResultSuccessBlock)(NSDictionary* result);
-typedef void (^OSFailureBlock)(NSError* error);
-
-
-// ======= OneSignal Class Interface =========
-@interface OneSignal : NSObject
-
-+ (NSString*)appId;
-+ (NSString* _Nonnull)sdkVersionRaw;
-+ (NSString* _Nonnull)sdkSemanticVersion;
-
-+ (void)disablePush:(BOOL)disable;
-
-// Only used for wrapping SDKs, such as Unity, Cordova, Xamarin, etc.
-+ (void)setMSDKType:(NSString* _Nonnull)type;
-
-#pragma mark Initialization
-+ (void)setAppId:(NSString* _Nonnull)newAppId;
-+ (void)initWithLaunchOptions:(NSDictionary* _Nullable)launchOptions;
-+ (void)setLaunchURLsInApp:(BOOL)launchInApp;
-+ (void)setProvidesNotificationSettingsView:(BOOL)providesView;
-
-
-#pragma mark Live Activity
-+ (void)enterLiveActivity:(NSString * _Nonnull)activityId withToken:(NSString * _Nonnull)token;
-+ (void)enterLiveActivity:(NSString * _Nonnull)activityId withToken:(NSString * _Nonnull)token withSuccess:(OSResultSuccessBlock _Nullable)successBlock withFailure:(OSFailureBlock _Nullable)failureBlock;
-
-+ (void)exitLiveActivity:(NSString * _Nonnull)activityId;
-+ (void)exitLiveActivity:(NSString * _Nonnull)activityId withSuccess:(OSResultSuccessBlock _Nullable)successBlock withFailure:(OSFailureBlock _Nullable)failureBlock;
-
-#pragma mark Logging
-+ (void)setLogLevel:(ONE_S_LOG_LEVEL)logLevel visualLevel:(ONE_S_LOG_LEVEL)visualLogLevel;
-+ (void)onesignalLog:(ONE_S_LOG_LEVEL)logLevel message:(NSString* _Nonnull)message;
-
-#pragma mark Prompt For Push
-typedef void(^OSUserResponseBlock)(BOOL accepted);
-
-+ (void)promptForPushNotificationsWithUserResponse:(OSUserResponseBlock)block;
-+ (void)promptForPushNotificationsWithUserResponse:(OSUserResponseBlock)block fallbackToSettings:(BOOL)fallback;
-+ (void)registerForProvisionalAuthorization:(OSUserResponseBlock)block;
-+ (OSDeviceState*)getDeviceState;
-
-#pragma mark Privacy Consent
-+ (void)consentGranted:(BOOL)granted;
-// Tells your application if privacy consent is still needed from the current user
-+ (BOOL)requiresUserPrivacyConsent;
-+ (void)setRequiresUserPrivacyConsent:(BOOL)required;
-
-#pragma mark Public Handlers
-
-// If the completion block is not called within 25 seconds of this block being called in notificationWillShowInForegroundHandler then the completion will be automatically fired.
-typedef void (^OSNotificationWillShowInForegroundBlock)(OSNotification * _Nonnull notification, OSNotificationDisplayResponse _Nonnull completion);
-typedef void (^OSNotificationOpenedBlock)(OSNotificationOpenedResult * _Nonnull result);
-typedef void (^OSInAppMessageClickBlock)(OSInAppMessageAction * _Nonnull action);
-
-+ (void)setNotificationWillShowInForegroundHandler:(OSNotificationWillShowInForegroundBlock _Nullable)block;
-+ (void)setNotificationOpenedHandler:(OSNotificationOpenedBlock _Nullable)block;
-+ (void)setInAppMessageClickHandler:(OSInAppMessageClickBlock _Nullable)block;
-+ (void)setInAppMessageLifecycleHandler:(NSObject *_Nullable)delegate;
-
-#pragma mark Post Notification
-+ (void)postNotification:(NSDictionary* _Nonnull)jsonData;
-+ (void)postNotification:(NSDictionary* _Nonnull)jsonData onSuccess:(OSResultSuccessBlock _Nullable)successBlock onFailure:(OSFailureBlock _Nullable)failureBlock;
-+ (void)postNotificationWithJsonString:(NSString* _Nonnull)jsonData onSuccess:(OSResultSuccessBlock _Nullable)successBlock onFailure:(OSFailureBlock _Nullable)failureBlock;
-
-#pragma mark Location
-// - Request and track user's location
-+ (void)promptLocation;
-+ (void)setLocationShared:(BOOL)enable;
-+ (BOOL)isLocationShared;
-
-#pragma mark Tags
-+ (void)sendTag:(NSString* _Nonnull)key value:(NSString* _Nonnull)value onSuccess:(OSResultSuccessBlock _Nullable)successBlock onFailure:(OSFailureBlock _Nullable)failureBlock;
-+ (void)sendTag:(NSString* _Nonnull)key value:(NSString* _Nonnull)value;
-+ (void)sendTags:(NSDictionary* _Nonnull)keyValuePair onSuccess:(OSResultSuccessBlock _Nullable)successBlock onFailure:(OSFailureBlock _Nullable)failureBlock;
-+ (void)sendTags:(NSDictionary* _Nonnull)keyValuePair;
-+ (void)sendTagsWithJsonString:(NSString* _Nonnull)jsonString;
-+ (void)getTags:(OSResultSuccessBlock _Nullable)successBlock onFailure:(OSFailureBlock _Nullable)failureBlock;
-+ (void)getTags:(OSResultSuccessBlock _Nullable)successBlock;
-+ (void)deleteTag:(NSString* _Nonnull)key onSuccess:(OSResultSuccessBlock _Nullable)successBlock onFailure:(OSFailureBlock _Nullable)failureBlock;
-+ (void)deleteTag:(NSString* _Nonnull)key;
-+ (void)deleteTags:(NSArray* _Nonnull)keys onSuccess:(OSResultSuccessBlock _Nullable)successBlock onFailure:(OSFailureBlock _Nullable)failureBlock;
-+ (void)deleteTags:(NSArray *_Nonnull)keys;
-+ (void)deleteTagsWithJsonString:(NSString* _Nonnull)jsonString;
-
-#pragma mark Permission, Subscription, and Email Observers
-NS_ASSUME_NONNULL_BEGIN
-
-+ (void)addPermissionObserver:(NSObject*)observer;
-+ (void)removePermissionObserver:(NSObject*)observer;
-
-+ (void)addSubscriptionObserver:(NSObject*)observer;
-+ (void)removeSubscriptionObserver:(NSObject*)observer;
-
-+ (void)addEmailSubscriptionObserver:(NSObject*)observer;
-+ (void)removeEmailSubscriptionObserver:(NSObject*)observer;
-
-+ (void)addSMSSubscriptionObserver:(NSObject*)observer;
-+ (void)removeSMSSubscriptionObserver:(NSObject*)observer;
-NS_ASSUME_NONNULL_END
-
-#pragma mark Email
-// Typedefs defining completion blocks for email & simultaneous HTTP requests
-typedef void (^OSEmailFailureBlock)(NSError *error);
-typedef void (^OSEmailSuccessBlock)();
-
-// Allows you to set the email for this user.
-// Email Auth Token is a (recommended) optional parameter that should *NOT* be generated on the client.
-// For security purposes, the emailAuthToken should be generated by your backend server.
-// If you do not have a backend server for your application, use the version of thge setEmail: method without an emailAuthToken parameter.
-+ (void)setEmail:(NSString * _Nonnull)email withEmailAuthHashToken:(NSString * _Nullable)hashToken;
-+ (void)setEmail:(NSString * _Nonnull)email withEmailAuthHashToken:(NSString * _Nullable)hashToken withSuccess:(OSEmailSuccessBlock _Nullable)successBlock withFailure:(OSEmailFailureBlock _Nullable)failureBlock;
-
-// Sets email without an authentication token
-+ (void)setEmail:(NSString * _Nonnull)email;
-+ (void)setEmail:(NSString * _Nonnull)email withSuccess:(OSEmailSuccessBlock _Nullable)successBlock withFailure:(OSEmailFailureBlock _Nullable)failureBlock;
-
-// Logs the device out of the current email.
-+ (void)logoutEmail;
-+ (void)logoutEmailWithSuccess:(OSEmailSuccessBlock _Nullable)successBlock withFailure:(OSEmailFailureBlock _Nullable)failureBlock;
-
-#pragma mark SMS
-// Typedefs defining completion blocks for SMS & simultaneous HTTP requests
-typedef void (^OSSMSFailureBlock)(NSError *error);
-typedef void (^OSSMSSuccessBlock)(NSDictionary *results);
-
-// Allows you to set the SMS for this user. SMS number may start with + and continue with numbers or contain only numbers
-// e.g: +11231231231 or 11231231231
-// SMS Auth Token is a (recommended) optional parameter that should *NOT* be generated on the client.
-// For security purposes, the smsAuthToken should be generated by your backend server.
-// If you do not have a backend server for your application, use the version of thge setSMSNumber: method without an smsAuthToken parameter.
-+ (void)setSMSNumber:(NSString * _Nonnull)smsNumber withSMSAuthHashToken:(NSString * _Nullable)hashToken;
-+ (void)setSMSNumber:(NSString * _Nonnull)smsNumber withSMSAuthHashToken:(NSString * _Nullable)hashToken withSuccess:(OSSMSSuccessBlock _Nullable)successBlock withFailure:(OSSMSFailureBlock _Nullable)failureBlock;
-
-// Sets SMS without an authentication token
-+ (void)setSMSNumber:(NSString * _Nonnull)smsNumber;
-+ (void)setSMSNumber:(NSString * _Nonnull)smsNumber withSuccess:(OSSMSSuccessBlock _Nullable)successBlock withFailure:(OSSMSFailureBlock _Nullable)failureBlock;
-
-// Logs the device out of the current sms number.
-+ (void)logoutSMSNumber;
-+ (void)logoutSMSNumberWithSuccess:(OSSMSSuccessBlock _Nullable)successBlock withFailure:(OSSMSFailureBlock _Nullable)failureBlock;
-
-#pragma mark Language
-// Typedefs defining completion blocks for updating language
-typedef void (^OSUpdateLanguageFailureBlock)(NSError *error);
-typedef void (^OSUpdateLanguageSuccessBlock)();
-
-// Language input ISO 639-1 code representation for user input language
-+ (void)setLanguage:(NSString * _Nonnull)language;
-+ (void)setLanguage:(NSString * _Nonnull)language withSuccess:(OSUpdateLanguageSuccessBlock _Nullable)successBlock withFailure:(OSUpdateLanguageFailureBlock)failureBlock;
-
-#pragma mark External User Id
-// Typedefs defining completion blocks for updating the external user id
-typedef void (^OSUpdateExternalUserIdFailureBlock)(NSError *error);
-typedef void (^OSUpdateExternalUserIdSuccessBlock)(NSDictionary *results);
-
-+ (void)setExternalUserId:(NSString * _Nonnull)externalId;
-+ (void)setExternalUserId:(NSString * _Nonnull)externalId withSuccess:(OSUpdateExternalUserIdSuccessBlock _Nullable)successBlock withFailure:(OSUpdateExternalUserIdFailureBlock _Nullable)failureBlock;
-+ (void)setExternalUserId:(NSString *)externalId withExternalIdAuthHashToken:(NSString *)hashToken withSuccess:(OSUpdateExternalUserIdSuccessBlock _Nullable)successBlock withFailure:(OSUpdateExternalUserIdFailureBlock _Nullable)failureBlock;
-+ (void)removeExternalUserId;
-+ (void)removeExternalUserId:(OSUpdateExternalUserIdSuccessBlock _Nullable)successBlock withFailure:(OSUpdateExternalUserIdFailureBlock _Nullable)failureBlock;
-
-#pragma mark In-App Messaging
-+ (BOOL)isInAppMessagingPaused;
-+ (void)pauseInAppMessages:(BOOL)pause;
-+ (void)addTrigger:(NSString * _Nonnull)key withValue:(id _Nonnull)value;
-+ (void)addTriggers:(NSDictionary * _Nonnull)triggers;
-+ (void)removeTriggerForKey:(NSString * _Nonnull)key;
-+ (void)removeTriggersForKeys:(NSArray * _Nonnull)keys;
-+ (NSDictionary * _Nonnull)getTriggers;
-+ (id _Nullable)getTriggerValueForKey:(NSString * _Nonnull)key;
-
-#pragma mark Outcomes
-+ (void)sendOutcome:(NSString * _Nonnull)name;
-+ (void)sendOutcome:(NSString * _Nonnull)name onSuccess:(OSSendOutcomeSuccess _Nullable)success;
-+ (void)sendUniqueOutcome:(NSString * _Nonnull)name;
-+ (void)sendUniqueOutcome:(NSString * _Nonnull)name onSuccess:(OSSendOutcomeSuccess _Nullable)success;
-+ (void)sendOutcomeWithValue:(NSString * _Nonnull)name value:(NSNumber * _Nonnull)value;
-+ (void)sendOutcomeWithValue:(NSString * _Nonnull)name value:(NSNumber * _Nonnull)value onSuccess:(OSSendOutcomeSuccess _Nullable)success;
-
-#pragma mark Extension
-// iOS 10 only
-// Process from Notification Service Extension.
-// Used for iOS Media Attachemtns and Action Buttons.
-+ (UNMutableNotificationContent*)didReceiveNotificationExtensionRequest:(UNNotificationRequest* _Nonnull)request withMutableNotificationContent:(UNMutableNotificationContent* _Nullable)replacementContent __deprecated_msg("Please use didReceiveNotificationExtensionRequest:withMutableNotificationContent:withContentHandler: instead.");
-+ (UNMutableNotificationContent*)didReceiveNotificationExtensionRequest:(UNNotificationRequest* _Nonnull)request withMutableNotificationContent:(UNMutableNotificationContent* _Nullable)replacementContent withContentHandler:(void (^)(UNNotificationContent *_Nonnull))contentHandler;
-+ (UNMutableNotificationContent*)serviceExtensionTimeWillExpireRequest:(UNNotificationRequest* _Nonnull)request withMutableNotificationContent:(UNMutableNotificationContent* _Nullable)replacementContent;
-@end
-
-#pragma clang diagnostic pop
diff --git a/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignal.xcframework/ios-arm64_x86_64-simulator/OneSignal.framework/Info.plist b/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignal.xcframework/ios-arm64_x86_64-simulator/OneSignal.framework/Info.plist
deleted file mode 100644
index 58f8a26c1..000000000
Binary files a/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignal.xcframework/ios-arm64_x86_64-simulator/OneSignal.framework/Info.plist and /dev/null differ
diff --git a/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignal.xcframework/ios-arm64_x86_64-simulator/OneSignal.framework/Modules/module.modulemap b/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignal.xcframework/ios-arm64_x86_64-simulator/OneSignal.framework/Modules/module.modulemap
deleted file mode 100644
index a3424cd21..000000000
--- a/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignal.xcframework/ios-arm64_x86_64-simulator/OneSignal.framework/Modules/module.modulemap
+++ /dev/null
@@ -1,6 +0,0 @@
-framework module OneSignal {
- umbrella header "OneSignal.h"
-
- export *
- module * { export * }
-}
diff --git a/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignal.xcframework/ios-arm64_x86_64-simulator/OneSignal.framework/OneSignal b/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignal.xcframework/ios-arm64_x86_64-simulator/OneSignal.framework/OneSignal
deleted file mode 100755
index 0ed076a4c..000000000
Binary files a/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignal.xcframework/ios-arm64_x86_64-simulator/OneSignal.framework/OneSignal and /dev/null differ
diff --git a/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignal.xcframework/ios-arm64_x86_64-simulator/OneSignal.framework/_CodeSignature/CodeResources b/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignal.xcframework/ios-arm64_x86_64-simulator/OneSignal.framework/_CodeSignature/CodeResources
deleted file mode 100644
index 43dfaed0f..000000000
--- a/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignal.xcframework/ios-arm64_x86_64-simulator/OneSignal.framework/_CodeSignature/CodeResources
+++ /dev/null
@@ -1,179 +0,0 @@
-
-
-
-
- files
-
- Headers/OSNotificationsManager.h
-
- mPg7BChiJjEj9WhHw8tcjqS8HcM=
-
- Headers/OSPermission.h
-
- UPxX3JPsjJLeeQ3zJ2ts8mrz2bo=
-
- Headers/OneSignalNotificationSettings.h
-
- O0VW5U5ovJN56cmcc4RLErRjhCw=
-
- Headers/OneSignalNotifications.h
-
- 3tgLo9RWNkQ6hW5wgJwVt+ruCug=
-
- Headers/OneSignalWebView.h
-
- JALJsv6oFrdNQR3GjCNLG/8CHM4=
-
- Headers/OneSignalWebViewManager.h
-
- tFG7qHre3ZQ6fYfRELA+WbfHwHU=
-
- Info.plist
-
- r/AevLyBgm/QaVxxZh2vPCburgY=
-
- Modules/module.modulemap
-
- Nb2bgnv0pUFVZ6tSM+07dhyQT/I=
-
-
- files2
-
- Headers/OSNotificationsManager.h
-
- hash2
-
- aSz/6j5CYixhm/o6BHPoZ0t+otEX6uSeDUNzVVk/TZE=
-
-
- Headers/OSPermission.h
-
- hash2
-
- sU6EzGlbg2EwV5oZVxaK+pX+Rq77ExinJllW2Um37fs=
-
-
- Headers/OneSignalNotificationSettings.h
-
- hash2
-
- rJtIGSr7QHhlu2N4Spuo1ZjGKzAgOQAf+MN+wMIMCmc=
-
-
- Headers/OneSignalNotifications.h
-
- hash2
-
- i5bdYE2EfQMqDvjFUyJn6nn0Q4hxTCxA67oiaIghyk8=
-
-
- Headers/OneSignalWebView.h
-
- hash2
-
- pYKG6fEvBCr4CxwtkOao+SM6ZtwfD2bqfH8rWxbQrl8=
-
-
- Headers/OneSignalWebViewManager.h
-
- hash2
-
- zokKYOmqkwjw0LGBpNfHiM3wjvhaHyq7Pjz8jAo1vkw=
-
-
- Modules/module.modulemap
-
- hash2
-
- /PUDV/RfFn4t5ClXw6FR9EVxf2LUlWBf6oRKtqsv75w=
-
-
-
- rules
-
- ^.*
-
- ^.*\.lproj/
-
- optional
-
- weight
- 1000
-
- ^.*\.lproj/locversion.plist$
-
- omit
-
- weight
- 1100
-
- ^Base\.lproj/
-
- weight
- 1010
-
- ^version.plist$
-
-
- rules2
-
- .*\.dSYM($|/)
-
- weight
- 11
-
- ^(.*/)?\.DS_Store$
-
- omit
-
- weight
- 2000
-
- ^.*
-
- ^.*\.lproj/
-
- optional
-
- weight
- 1000
-
- ^.*\.lproj/locversion.plist$
-
- omit
-
- weight
- 1100
-
- ^Base\.lproj/
-
- weight
- 1010
-
- ^Info\.plist$
-
- omit
-
- weight
- 20
-
- ^PkgInfo$
-
- omit
-
- weight
- 20
-
- ^embedded\.provisionprofile$
-
- weight
- 20
-
- ^version\.plist$
-
- weight
- 20
-
-
-
-
diff --git a/iOS_SDK/OneSignalSDK/Source/OneSignalTracker.h b/iOS_SDK/OneSignalSDK/Source/OneSignalTracker.h
index ad4888a06..2c7520658 100644
--- a/iOS_SDK/OneSignalSDK/Source/OneSignalTracker.h
+++ b/iOS_SDK/OneSignalSDK/Source/OneSignalTracker.h
@@ -31,7 +31,5 @@
+ (void)onFocus:(BOOL)toBackground;
+ (void)onSessionEnded:(NSArray *) lastInfluences;
-+ (void)willResignActiveTriggered;
-+ (void)didEnterBackgroundTriggered;
@end
diff --git a/iOS_SDK/OneSignalSDK/Source/OneSignalTracker.m b/iOS_SDK/OneSignalSDK/Source/OneSignalTracker.m
index 5b35520b2..323f79f29 100644
--- a/iOS_SDK/OneSignalSDK/Source/OneSignalTracker.m
+++ b/iOS_SDK/OneSignalSDK/Source/OneSignalTracker.m
@@ -53,29 +53,18 @@ @implementation OneSignalTracker
static UIBackgroundTaskIdentifier focusBackgroundTask;
static NSTimeInterval lastOpenedTime;
static BOOL lastOnFocusWasToBackground = YES;
-static BOOL willResignActiveTriggered = NO;
-static BOOL didEnterBackgroundTriggered = NO;
+ (void)resetLocals {
[OSFocusTimeProcessorFactory resetUnsentActiveTime];
focusBackgroundTask = 0;
lastOpenedTime = 0;
lastOnFocusWasToBackground = YES;
- [self resetBackgroundDetection];
}
+ (void)setLastOpenedTime:(NSTimeInterval)lastOpened {
lastOpenedTime = lastOpened;
}
-+ (void)willResignActiveTriggered {
- willResignActiveTriggered = YES;
-}
-
-+ (void)didEnterBackgroundTriggered {
- didEnterBackgroundTriggered = YES;
-}
-
+ (void)beginBackgroundFocusTask {
focusBackgroundTask = [[UIApplication sharedApplication] beginBackgroundTaskWithExpirationHandler:^{
[OneSignalTracker endBackgroundFocusTask];
@@ -87,25 +76,10 @@ + (void)endBackgroundFocusTask {
focusBackgroundTask = UIBackgroundTaskInvalid;
}
-/**
- Returns true if application truly did come from a backgrounded state.
- Returns false if the application bypassed `didEnterBackground` after entering `willResignActive`.
- This can happen if the app resumes after a native dialog displays over the app or after the app is in a suspended state and not backgrounded.
-**/
-+ (BOOL)applicationForegroundedFromBackgroundedState {
- return !(willResignActiveTriggered && !didEnterBackgroundTriggered);
-}
-
-+ (void)resetBackgroundDetection {
- willResignActiveTriggered = NO;
- didEnterBackgroundTriggered = NO;
-}
-
+ (void)onFocus:(BOOL)toBackground {
// return if the user has not granted privacy permissions
if ([OSPrivacyConsentController requiresUserPrivacyConsent])
return;
- }
// Prevent the onFocus to be called twice when app being terminated
// - Both WillResignActive and willTerminate
diff --git a/iOS_SDK/OneSignalSDK/UnitTests/UnitTests.m b/iOS_SDK/OneSignalSDK/UnitTests/UnitTests.m
index 2c49fe687..3b36b1df6 100644
--- a/iOS_SDK/OneSignalSDK/UnitTests/UnitTests.m
+++ b/iOS_SDK/OneSignalSDK/UnitTests/UnitTests.m
@@ -256,7 +256,6 @@ - (void)testInitOnSimulator {
XCTAssertEqualObjects(OneSignalClientOverrider.lastHTTPRequest[@"notification_types"], @-15);
XCTAssertEqualObjects(OneSignalClientOverrider.lastHTTPRequest[@"device_model"], deviceModel);
XCTAssertEqualObjects(OneSignalClientOverrider.lastHTTPRequest[@"device_type"], @0);
- XCTAssertEqual(OneSignalClientOverrider.lastHTTPRequest[@"test_type"], @1);
XCTAssertEqualObjects(OneSignalClientOverrider.lastHTTPRequest[@"language"], @"en-US");
// 2nd init call should not fire another on_session call.
@@ -914,53 +913,22 @@ - (void)testFirebaseAnalyticsInfluenceNotificationOpen {
// The Notification Service Extension runs where the notification received id tracked.
// Note: This is normally a separate process but can't emulate that here.
let response = [self createNotificationResponseForAnalyticsTests];
- #pragma clang diagnostic push
- #pragma clang diagnostic ignored "-Wdeprecated-declarations"
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
[OneSignalExtension didReceiveNotificationExtensionRequest:response.notification.request
- withMutableNotificationContent:nil];
- #pragma clang diagnostic pop
-
- // Note: we are no longer logging the notification received event to Firebase for iOS.
-
- // Trigger a new app session
- [UnitTestCommonMethods backgroundApp];
- [UnitTestCommonMethods runBackgroundThreads];
- [NSDateOverrider advanceSystemTimeBy:41];
- [UnitTestCommonMethods foregroundApp];
- [UnitTestCommonMethods runBackgroundThreads];
+ withMutableNotificationContent:nil];
+#pragma clang diagnostic pop
- // TODO: Test carry over causes this influence_open not to fire
- // Since we opened the app under 2 mintues after receiving a notification
- // an influence_open should be sent to firebase.
+ // Make sure we are tracking the notification received event to firebase.
XCTAssertEqual(OneSignalTrackFirebaseAnalyticsOverrider.loggedEvents.count, 1);
- id influence_open_event = @{
- @"os_notification_influence_open": @{
- @"campaign": @"Template Name - 1117f966-d8cc-11e4-bed1-df8f05be55bb",
- @"medium": @"notification",
- @"notification_id": @"b2f7f966-d8cc-11e4-bed1-df8f05be55ba",
- @"source": @"OneSignal"}
+ id received_event = @{
+ @"os_notification_received": @{
+ @"campaign": @"Template Name - 1117f966-d8cc-11e4-bed1-df8f05be55bb",
+ @"medium": @"notification",
+ @"notification_id": @"b2f7f966-d8cc-11e4-bed1-df8f05be55ba",
+ @"source": @"OneSignal"}
};
- XCTAssertEqualObjects(OneSignalTrackFirebaseAnalyticsOverrider.loggedEvents[0], influence_open_event);
-}
-
-- (void)testFirebaseAnalyticsInfluenceNotificationOpenWitNilProperties {
- // Start App once to download params
- OneSignalTrackFirebaseAnalyticsOverrider.hasFIRAnalytics = true;
- [UnitTestCommonMethods initOneSignal];
- [UnitTestCommonMethods foregroundApp];
- [UnitTestCommonMethods runBackgroundThreads];
-
- // Notification is received.
- // The Notification Service Extension runs where the notification received id tracked.
- // Note: This is normally a separate process but can't emulate that here.
- let response = [UnitTestCommonMethods createBasiciOSNotificationResponseWithPayload:@{}];
- #pragma clang diagnostic push
- #pragma clang diagnostic ignored "-Wdeprecated-declarations"
- [OneSignalExtension didReceiveNotificationExtensionRequest:response.notification.request
- withMutableNotificationContent:nil];
- #pragma clang diagnostic pop
-
- // Note: we are no longer logging the notification received event to Firebase for iOS.
+ XCTAssertEqualObjects(OneSignalTrackFirebaseAnalyticsOverrider.loggedEvents[0], received_event);
// Trigger a new app session
[UnitTestCommonMethods backgroundApp];
@@ -972,14 +940,15 @@ - (void)testFirebaseAnalyticsInfluenceNotificationOpenWitNilProperties {
// TODO: Test carry over causes this influence_open not to fire
// Since we opened the app under 2 mintues after receiving a notification
// an influence_open should be sent to firebase.
- XCTAssertEqual(OneSignalTrackFirebaseAnalyticsOverrider.loggedEvents.count, 1);
+ XCTAssertEqual(OneSignalTrackFirebaseAnalyticsOverrider.loggedEvents.count, 2);
id influence_open_event = @{
@"os_notification_influence_open": @{
- @"campaign": @"",
- @"medium": @"notification",
- @"source": @"OneSignal"}
+ @"campaign": @"Template Name - 1117f966-d8cc-11e4-bed1-df8f05be55bb",
+ @"medium": @"notification",
+ @"notification_id": @"b2f7f966-d8cc-11e4-bed1-df8f05be55ba",
+ @"source": @"OneSignal"}
};
- XCTAssertEqualObjects(OneSignalTrackFirebaseAnalyticsOverrider.loggedEvents[0], influence_open_event);
+ XCTAssertEqualObjects(OneSignalTrackFirebaseAnalyticsOverrider.loggedEvents[1], influence_open_event);
}
- (void)testOSNotificationPayloadParsesTemplateFields {