Skip to content

Commit

Permalink
Merge pull request #715 from OneSignal/native_ios_release_2.15.0
Browse files Browse the repository at this point in the history
Release commit for 2.15.0
  • Loading branch information
emawby authored Aug 4, 2020
2 parents f7c0708 + fc17a18 commit fcd9622
Show file tree
Hide file tree
Showing 21 changed files with 107 additions and 31 deletions.
2 changes: 1 addition & 1 deletion OneSignal.podspec
Original file line number Diff line number Diff line change
@@ -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' }
Expand Down
2 changes: 1 addition & 1 deletion OneSignalDynamic.podspec
Original file line number Diff line number Diff line change
@@ -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' }
Expand Down
2 changes: 1 addition & 1 deletion OneSignalXCFramework.podspec
Original file line number Diff line number Diff line change
@@ -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' }
Expand Down
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -6,46 +6,46 @@
<array>
<dict>
<key>LibraryIdentifier</key>
<string>ios-x86_64-maccatalyst</string>
<string>ios-armv7_armv7s_arm64</string>
<key>LibraryPath</key>
<string>OneSignal.framework</string>
<key>SupportedArchitectures</key>
<array>
<string>x86_64</string>
<string>armv7</string>
<string>armv7s</string>
<string>arm64</string>
</array>
<key>SupportedPlatform</key>
<string>ios</string>
<key>SupportedPlatformVariant</key>
<string>maccatalyst</string>
</dict>
<dict>
<key>LibraryIdentifier</key>
<string>ios-arm64_armv7_armv7s</string>
<string>ios-x86_64_i386-simulator</string>
<key>LibraryPath</key>
<string>OneSignal.framework</string>
<key>SupportedArchitectures</key>
<array>
<string>arm64</string>
<string>armv7</string>
<string>armv7s</string>
<string>x86_64</string>
<string>i386</string>
</array>
<key>SupportedPlatform</key>
<string>ios</string>
<key>SupportedPlatformVariant</key>
<string>simulator</string>
</dict>
<dict>
<key>LibraryIdentifier</key>
<string>ios-i386_x86_64-simulator</string>
<string>ios-x86_64-maccatalyst</string>
<key>LibraryPath</key>
<string>OneSignal.framework</string>
<key>SupportedArchitectures</key>
<array>
<string>i386</string>
<string>x86_64</string>
</array>
<key>SupportedPlatform</key>
<string>ios</string>
<key>SupportedPlatformVariant</key>
<string>simulator</string>
<string>maccatalyst</string>
</dict>
</array>
<key>CFBundlePackageType</key>
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -27,19 +27,17 @@
<key>DTCompiler</key>
<string>com.apple.compilers.llvm.clang.1_0</string>
<key>DTPlatformBuild</key>
<string>12A6159</string>
<key>DTPlatformName</key>
<string>macosx</string>
<string>11E708</string>
<key>DTPlatformVersion</key>
<string>10.16</string>
<string>GM</string>
<key>DTSDKBuild</key>
<string>20A4299v</string>
<string>19G68</string>
<key>DTSDKName</key>
<string>macosx10.16</string>
<string>macosx10.15</string>
<key>DTXcode</key>
<string>1200</string>
<string>1160</string>
<key>DTXcodeBuild</key>
<string>12A6159</string>
<string>11E708</string>
<key>LSMinimumSystemVersion</key>
<string>10.15</string>
<key>UIDeviceFamily</key>
Expand Down
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
</data>
<key>Info.plist</key>
<data>
c8uyJ7DJ58U+X2XkaRa0mK0dBJU=
sk2yyjDQKvDKYEX3DKSgqm8I9gM=
</data>
<key>Modules/module.modulemap</key>
<data>
Expand Down
2 changes: 1 addition & 1 deletion iOS_SDK/OneSignalSDK/Source/OneSignal.m
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
91 changes: 84 additions & 7 deletions iOS_SDK/OneSignalSDK/SwiftPM/Public/Headers/OneSignal/OneSignal.h
Original file line number Diff line number Diff line change
Expand Up @@ -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*/
Expand Down Expand Up @@ -189,34 +189,69 @@ 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<OSInAppMessageOutcome *> *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 <NSObject>
@optional
- (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

Expand Down Expand Up @@ -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);

Expand All @@ -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*/
Expand Down Expand Up @@ -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<OSPermissionObserver>*)observer;
+ (void)removePermissionObserver:(NSObject<OSPermissionObserver>*)observer;
Expand Down
1 change: 1 addition & 0 deletions iOS_SDK/OneSignalSDK/build_fat_framework.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit fcd9622

Please sign in to comment.