diff --git a/OneSignal.podspec b/OneSignal.podspec index 4ba42ae66..6e591229e 100755 --- a/OneSignal.podspec +++ b/OneSignal.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "OneSignal" - s.version = "2.14.3" + s.version = "2.15.0" s.summary = "OneSignal push notification library for mobile apps." s.homepage = "https://onesignal.com" s.license = { :type => 'MIT', :file => 'LICENSE' } diff --git a/OneSignalDynamic.podspec b/OneSignalDynamic.podspec index 351f3f7c1..45569c09e 100644 --- a/OneSignalDynamic.podspec +++ b/OneSignalDynamic.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "OneSignalDynamic" - s.version = "2.14.3" + s.version = "2.15.0" s.summary = "OneSignal push notification library for mobile apps." s.homepage = "https://onesignal.com" s.license = { :type => 'MIT', :file => 'LICENSE' } diff --git a/OneSignalXCFramework.podspec b/OneSignalXCFramework.podspec index 13cbde23c..6b585faf4 100644 --- a/OneSignalXCFramework.podspec +++ b/OneSignalXCFramework.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "OneSignalXCFramework" - s.version = "2.14.3" + s.version = "2.15.0" s.summary = "OneSignal push notification library for mobile apps." s.homepage = "https://onesignal.com" s.license = { :type => 'MIT', :file => 'LICENSE' } diff --git a/iOS_SDK/OneSignalSDK/Framework/OneSignal.framework/Versions/A/OneSignal b/iOS_SDK/OneSignalSDK/Framework/OneSignal.framework/Versions/A/OneSignal index 2cc1dbf59..5d4e69a67 100644 Binary files a/iOS_SDK/OneSignalSDK/Framework/OneSignal.framework/Versions/A/OneSignal and b/iOS_SDK/OneSignalSDK/Framework/OneSignal.framework/Versions/A/OneSignal differ diff --git a/iOS_SDK/OneSignalSDK/Framework/OneSignal.framework/Versions/A/Resources/Info.plist b/iOS_SDK/OneSignalSDK/Framework/OneSignal.framework/Versions/A/Resources/Info.plist index 3f4182eeb..58488570a 100644 Binary files a/iOS_SDK/OneSignalSDK/Framework/OneSignal.framework/Versions/A/Resources/Info.plist and b/iOS_SDK/OneSignalSDK/Framework/OneSignal.framework/Versions/A/Resources/Info.plist differ diff --git a/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignal.xcframework/Info.plist b/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignal.xcframework/Info.plist index 56dea711d..e825dbdf2 100644 --- a/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignal.xcframework/Info.plist +++ b/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignal.xcframework/Info.plist @@ -6,46 +6,46 @@ LibraryIdentifier - ios-x86_64-maccatalyst + ios-armv7_armv7s_arm64 LibraryPath OneSignal.framework SupportedArchitectures - x86_64 + armv7 + armv7s + arm64 SupportedPlatform ios - SupportedPlatformVariant - maccatalyst LibraryIdentifier - ios-arm64_armv7_armv7s + ios-x86_64_i386-simulator LibraryPath OneSignal.framework SupportedArchitectures - arm64 - armv7 - armv7s + x86_64 + i386 SupportedPlatform ios + SupportedPlatformVariant + simulator LibraryIdentifier - ios-i386_x86_64-simulator + ios-x86_64-maccatalyst LibraryPath OneSignal.framework SupportedArchitectures - i386 x86_64 SupportedPlatform ios SupportedPlatformVariant - simulator + maccatalyst CFBundlePackageType diff --git a/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignal.xcframework/ios-arm64_armv7_armv7s/OneSignal.framework/Headers/OneSignal.h b/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignal.xcframework/ios-armv7_armv7s_arm64/OneSignal.framework/Headers/OneSignal.h similarity index 100% rename from iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignal.xcframework/ios-arm64_armv7_armv7s/OneSignal.framework/Headers/OneSignal.h rename to iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignal.xcframework/ios-armv7_armv7s_arm64/OneSignal.framework/Headers/OneSignal.h diff --git a/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignal.xcframework/ios-arm64_armv7_armv7s/OneSignal.framework/Info.plist b/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignal.xcframework/ios-armv7_armv7s_arm64/OneSignal.framework/Info.plist similarity index 74% rename from iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignal.xcframework/ios-arm64_armv7_armv7s/OneSignal.framework/Info.plist rename to iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignal.xcframework/ios-armv7_armv7s_arm64/OneSignal.framework/Info.plist index 1faaf8393..57d66976b 100644 Binary files a/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignal.xcframework/ios-arm64_armv7_armv7s/OneSignal.framework/Info.plist and b/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignal.xcframework/ios-armv7_armv7s_arm64/OneSignal.framework/Info.plist differ diff --git a/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignal.xcframework/ios-arm64_armv7_armv7s/OneSignal.framework/Modules/module.modulemap b/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignal.xcframework/ios-armv7_armv7s_arm64/OneSignal.framework/Modules/module.modulemap similarity index 100% rename from iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignal.xcframework/ios-arm64_armv7_armv7s/OneSignal.framework/Modules/module.modulemap rename to iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignal.xcframework/ios-armv7_armv7s_arm64/OneSignal.framework/Modules/module.modulemap diff --git a/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignal.xcframework/ios-arm64_armv7_armv7s/OneSignal.framework/OneSignal b/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignal.xcframework/ios-armv7_armv7s_arm64/OneSignal.framework/OneSignal similarity index 56% rename from iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignal.xcframework/ios-arm64_armv7_armv7s/OneSignal.framework/OneSignal rename to iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignal.xcframework/ios-armv7_armv7s_arm64/OneSignal.framework/OneSignal index f060f0d85..ee50b0757 100755 Binary files a/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignal.xcframework/ios-arm64_armv7_armv7s/OneSignal.framework/OneSignal and b/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignal.xcframework/ios-armv7_armv7s_arm64/OneSignal.framework/OneSignal differ diff --git a/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignal.xcframework/ios-i386_x86_64-simulator/OneSignal.framework/OneSignal b/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignal.xcframework/ios-i386_x86_64-simulator/OneSignal.framework/OneSignal deleted file mode 100755 index e4dae9247..000000000 Binary files a/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignal.xcframework/ios-i386_x86_64-simulator/OneSignal.framework/OneSignal and /dev/null differ diff --git a/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignal.xcframework/ios-x86_64-maccatalyst/OneSignal.framework/Versions/A/OneSignal b/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignal.xcframework/ios-x86_64-maccatalyst/OneSignal.framework/Versions/A/OneSignal index 6a03541d2..4f31fe21d 100755 Binary files a/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignal.xcframework/ios-x86_64-maccatalyst/OneSignal.framework/Versions/A/OneSignal and b/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignal.xcframework/ios-x86_64-maccatalyst/OneSignal.framework/Versions/A/OneSignal differ diff --git a/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignal.xcframework/ios-x86_64-maccatalyst/OneSignal.framework/Versions/A/Resources/Info.plist b/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignal.xcframework/ios-x86_64-maccatalyst/OneSignal.framework/Versions/A/Resources/Info.plist index dcb7150dd..711483324 100644 --- a/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignal.xcframework/ios-x86_64-maccatalyst/OneSignal.framework/Versions/A/Resources/Info.plist +++ b/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignal.xcframework/ios-x86_64-maccatalyst/OneSignal.framework/Versions/A/Resources/Info.plist @@ -27,19 +27,17 @@ DTCompiler com.apple.compilers.llvm.clang.1_0 DTPlatformBuild - 12A6159 - DTPlatformName - macosx + 11E708 DTPlatformVersion - 10.16 + GM DTSDKBuild - 20A4299v + 19G68 DTSDKName - macosx10.16 + macosx10.15 DTXcode - 1200 + 1160 DTXcodeBuild - 12A6159 + 11E708 LSMinimumSystemVersion 10.15 UIDeviceFamily diff --git a/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignal.xcframework/ios-i386_x86_64-simulator/OneSignal.framework/Headers/OneSignal.h b/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignal.xcframework/ios-x86_64_i386-simulator/OneSignal.framework/Headers/OneSignal.h similarity index 100% rename from iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignal.xcframework/ios-i386_x86_64-simulator/OneSignal.framework/Headers/OneSignal.h rename to iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignal.xcframework/ios-x86_64_i386-simulator/OneSignal.framework/Headers/OneSignal.h diff --git a/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignal.xcframework/ios-i386_x86_64-simulator/OneSignal.framework/Info.plist b/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignal.xcframework/ios-x86_64_i386-simulator/OneSignal.framework/Info.plist similarity index 71% rename from iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignal.xcframework/ios-i386_x86_64-simulator/OneSignal.framework/Info.plist rename to iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignal.xcframework/ios-x86_64_i386-simulator/OneSignal.framework/Info.plist index a4df24d35..377d880bc 100644 Binary files a/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignal.xcframework/ios-i386_x86_64-simulator/OneSignal.framework/Info.plist and b/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignal.xcframework/ios-x86_64_i386-simulator/OneSignal.framework/Info.plist differ diff --git a/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignal.xcframework/ios-i386_x86_64-simulator/OneSignal.framework/Modules/module.modulemap b/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignal.xcframework/ios-x86_64_i386-simulator/OneSignal.framework/Modules/module.modulemap similarity index 100% rename from iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignal.xcframework/ios-i386_x86_64-simulator/OneSignal.framework/Modules/module.modulemap rename to iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignal.xcframework/ios-x86_64_i386-simulator/OneSignal.framework/Modules/module.modulemap diff --git a/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignal.xcframework/ios-x86_64_i386-simulator/OneSignal.framework/OneSignal b/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignal.xcframework/ios-x86_64_i386-simulator/OneSignal.framework/OneSignal new file mode 100755 index 000000000..60198c328 Binary files /dev/null and b/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignal.xcframework/ios-x86_64_i386-simulator/OneSignal.framework/OneSignal differ diff --git a/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignal.xcframework/ios-i386_x86_64-simulator/OneSignal.framework/_CodeSignature/CodeResources b/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignal.xcframework/ios-x86_64_i386-simulator/OneSignal.framework/_CodeSignature/CodeResources similarity index 98% rename from iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignal.xcframework/ios-i386_x86_64-simulator/OneSignal.framework/_CodeSignature/CodeResources rename to iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignal.xcframework/ios-x86_64_i386-simulator/OneSignal.framework/_CodeSignature/CodeResources index 51d0888ae..f6080c6d9 100644 --- a/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignal.xcframework/ios-i386_x86_64-simulator/OneSignal.framework/_CodeSignature/CodeResources +++ b/iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignal.xcframework/ios-x86_64_i386-simulator/OneSignal.framework/_CodeSignature/CodeResources @@ -10,7 +10,7 @@ Info.plist - c8uyJ7DJ58U+X2XkaRa0mK0dBJU= + sk2yyjDQKvDKYEX3DKSgqm8I9gM= Modules/module.modulemap diff --git a/iOS_SDK/OneSignalSDK/Source/OneSignal.m b/iOS_SDK/OneSignalSDK/Source/OneSignal.m index 214b9a8df..268ea334a 100755 --- a/iOS_SDK/OneSignalSDK/Source/OneSignal.m +++ b/iOS_SDK/OneSignalSDK/Source/OneSignal.m @@ -136,7 +136,7 @@ @interface OneSignal (SessionStatusDelegate) @implementation OneSignal -NSString* const ONESIGNAL_VERSION = @"021402"; +NSString* const ONESIGNAL_VERSION = @"021500"; static NSString* mSDKType = @"native"; static BOOL coldStartFromTapOnNotification = NO; diff --git a/iOS_SDK/OneSignalSDK/SwiftPM/Public/Headers/OneSignal/OneSignal.h b/iOS_SDK/OneSignalSDK/SwiftPM/Public/Headers/OneSignal/OneSignal.h index 10c1ee70a..8bed5da8a 100755 --- a/iOS_SDK/OneSignalSDK/SwiftPM/Public/Headers/OneSignal/OneSignal.h +++ b/iOS_SDK/OneSignalSDK/SwiftPM/Public/Headers/OneSignal/OneSignal.h @@ -59,7 +59,7 @@ typedef NS_ENUM(NSUInteger, OSNotificationDisplayType) { /*Notification is silent, or app is in focus but InAppAlertNotifications are disabled*/ OSNotificationDisplayTypeNone, - /*Default UIAlertView display*/ + /*Default UIAlertController display*/ OSNotificationDisplayTypeInAppAlert, /*iOS native notification display*/ @@ -189,20 +189,50 @@ typedef NS_ENUM(NSUInteger, OSNotificationDisplayType) { @end; +@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 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 */ +// 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 */ +// 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 */ +// 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 */ +// 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 @@ -210,13 +240,18 @@ typedef NS_ENUM(NSUInteger, OSNotificationDisplayType) { - (void)handleMessageAction:(OSInAppMessageAction * _Nonnull)action NS_SWIFT_NAME(handleMessageAction(action:)); @end -/* OneSignal Session Types */ +/* 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 @@ -330,6 +365,48 @@ typedef NS_ENUM(NSInteger, OSNotificationPermission) { @end +@interface OSDevice : NSObject +/** + * Get the app's notification permission + * @return false if the user disabled notifications for the app, otherwise true + */ +- (BOOL)isNotificationEnabled; +/** + * Get whether the user is subscribed to OneSignal notifications or not + * @return false if the user is not subscribed to OneSignal notifications, otherwise true + */ +- (BOOL)isUserSubscribed; +/** + * Get whether the user is subscribed + * @return true if isNotificationEnabled, isUserSubscribed, getUserId and getPushToken are true, otherwise false + */ +- (BOOL)isSubscribed; +/** + * Get the user notification permision status + * @return OSNotificationPermission +*/ +- (OSNotificationPermission)getNotificationPermissionStatus; +/** + * Get user id from registration (player id) + * @return user id if user is registered, otherwise false + */ +- (NSString*)getUserId; +/** + * Get apple deice push token + * @return push token if available, otherwise null + */ +- (NSString*)getPushToken; +/** + * Get the user email id + * @return email id if user address was registered, otherwise null + */ +- (NSString*)getEmailUserId; +/** + * Get the user email + * @return email address if set, otherwise null + */ +- (NSString*)getEmailAddress; +@end typedef void (^OSWebOpenURLResultBlock)(BOOL shouldOpen); @@ -352,7 +429,6 @@ typedef void (^OSHandleInAppMessageActionClickBlock)(OSInAppMessageAction* actio /*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*/ @@ -447,6 +523,7 @@ typedef NS_ENUM(NSUInteger, ONE_S_LOG_LEVEL) { + (void)IdsAvailable:(OSIdsAvailableBlock)idsAvailableBlock __deprecated_msg("Please use getPermissionSubscriptionState or addSubscriptionObserver and addPermissionObserver instead."); + (OSPermissionSubscriptionState*)getPermissionSubscriptionState; ++ (OSDevice*)getUserDevice; + (void)addPermissionObserver:(NSObject*)observer; + (void)removePermissionObserver:(NSObject*)observer; diff --git a/iOS_SDK/OneSignalSDK/build_fat_framework.sh b/iOS_SDK/OneSignalSDK/build_fat_framework.sh index 2d48b1efb..10fdc3c7a 100755 --- a/iOS_SDK/OneSignalSDK/build_fat_framework.sh +++ b/iOS_SDK/OneSignalSDK/build_fat_framework.sh @@ -82,6 +82,7 @@ cp -a "${FINAL_FRAMEWORK}" "${WORKING_DIR}/Framework/OneSignal.framework" echo "Copying public header for SwiftPM" #Copy the public header to the SwiftPM public headers directory rm -rf "${WORKING_DIR}/SwiftPM" +mkdir -p "${WORKING_DIR}/SwiftPM/Public/Headers/OneSignal" cp -a "${WORKING_DIR}/Source/OneSignal.h" "${WORKING_DIR}/SwiftPM/Public/Headers/OneSignal/OneSignal.h" echo "Listing frameworks of final framework"