Skip to content

Commit

Permalink
updating binaries for major release beta cut 5
Browse files Browse the repository at this point in the history
  • Loading branch information
emawby committed Dec 5, 2020
1 parent f347def commit f8ade39
Show file tree
Hide file tree
Showing 15 changed files with 569 additions and 825 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,9 @@ typedef NS_ENUM(NSUInteger, OSNotificationActionType) {
didReceiveNotificationRequest:withContentHandler: method fires. */
+ (instancetype)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;

Expand Down Expand Up @@ -207,7 +210,7 @@ typedef NS_ENUM(NSUInteger, OSNotificationActionType) {
// Pass in nil means a notification will not display
typedef void (^OSNotificationDisplayResponse)(OSNotification* _Nullable notification);
/* OneSignal Influence Types */
typedef NS_ENUM(NSUInteger, Session) {
typedef NS_ENUM(NSUInteger, OSInfluenceType) {
DIRECT,
INDIRECT,
UNATTRIBUTED,
Expand All @@ -222,7 +225,7 @@ typedef NS_ENUM(NSUInteger, OSInfluenceChannel) {
@interface OSOutcomeEvent : NSObject

// Session enum (DIRECT, INDIRECT, UNATTRIBUTED, or DISABLED) to determine code route and request params
@property (nonatomic) Session session;
@property (nonatomic) OSInfluenceType session;

// Notification ids for the current session
@property (strong, nonatomic, nullable) NSArray *notificationIds;
Expand Down Expand Up @@ -252,7 +255,10 @@ typedef NS_ENUM(NSInteger, OSNotificationPermission) {
OSNotificationPermissionAuthorized,

// the application is only authorized to post Provisional notifications (direct to history)
OSNotificationPermissionProvisional
OSNotificationPermissionProvisional,

// the application is authorized to send notifications for 8 hours. Only used by App Clips.
OSNotificationPermissionEphemeral
};

// Permission Classes
Expand All @@ -274,15 +280,11 @@ typedef NS_ENUM(NSInteger, OSNotificationPermission) {

@end

@protocol OSPermissionObserver <NSObject>
- (void)onOSPermissionChanged:(OSPermissionStateChanges* _Nonnull)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) 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;
Expand All @@ -292,7 +294,7 @@ typedef NS_ENUM(NSInteger, OSNotificationPermission) {
@interface OSEmailSubscriptionState : NSObject
@property (readonly, nonatomic, nullable) NSString* emailUserId; // The new Email user ID
@property (readonly, nonatomic, nullable) NSString *emailAddress;
@property (readonly, nonatomic) BOOL subscribed;
@property (readonly, nonatomic) BOOL isSubscribed;
- (NSDictionary* _Nonnull)toDictionary;
@end

Expand All @@ -316,14 +318,8 @@ typedef NS_ENUM(NSInteger, OSNotificationPermission) {
- (void)onOSEmailSubscriptionChanged:(OSEmailSubscriptionStateChanges* _Nonnull)stateChanges;
@end

// Permission+Subscription Classes
@interface OSPermissionSubscriptionState : NSObject

@property (readonly, nonnull) OSPermissionState* permissionStatus;
@property (readonly, nonnull) OSSubscriptionState* subscriptionStatus;
@property (readonly, nonnull) OSEmailSubscriptionState *emailSubscriptionStatus;
- (NSDictionary* _Nonnull)toDictionary;

@protocol OSPermissionObserver <NSObject>
- (void)onOSPermissionChanged:(OSPermissionStateChanges* _Nonnull)stateChanges;
@end

@interface OSDeviceState : NSObject
Expand Down Expand Up @@ -368,7 +364,7 @@ typedef NS_ENUM(NSInteger, OSNotificationPermission) {
*/
@property (readonly, nullable) NSString* emailAddress;

- (instancetype)initWithSubscriptionState:(OSPermissionSubscriptionState *)state;
@property (readonly) BOOL isEmailSubscribed;

// Convert the class into a NSDictionary
- (NSDictionary *_Nonnull)jsonRepresentation;
Expand All @@ -384,19 +380,6 @@ typedef void (^OSFailureBlock)(NSError* error);
/*Block for handling outcome event being sent successfully*/
typedef void (^OSSendOutcomeSuccess)(OSOutcomeEvent* outcome);

/*Dictionary of keys to pass alongside the init settings*/

/*Enable In-App display of Launch URLs*/
extern NSString * const kOSSettingsKeyInAppLaunchURL;

/* 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

Expand All @@ -408,16 +391,14 @@ extern NSString* const ONESIGNAL_VERSION;

+ (void)disablePush:(BOOL)disable;

+ (NSString* _Nonnull)parseNSErrorAsJsonString:(NSError* _Nonnull)error;

// 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;
// TODO: Remove before releasing major release 3.0.0
+ (void)setAppSettings:(NSDictionary* _Nonnull)settings;
+ (void)setLaunchURLsInApp:(BOOL)launchInApp;
+ (void)setProvidesNotificationSettingsView:(BOOL)providesView;

#pragma mark Logging
typedef NS_ENUM(NSUInteger, ONE_S_LOG_LEVEL) {
Expand All @@ -431,7 +412,7 @@ typedef NS_ENUM(NSUInteger, ONE_S_LOG_LEVEL) {
};

+ (void)setLogLevel:(ONE_S_LOG_LEVEL)logLevel visualLevel:(ONE_S_LOG_LEVEL)visualLogLevel;
+ (void)onesignal_Log:(ONE_S_LOG_LEVEL)logLevel message:(NSString* _Nonnull)message;
+ (void)onesignalLog:(ONE_S_LOG_LEVEL)logLevel message:(NSString* _Nonnull)message;

#pragma mark Prompt For Push
typedef void(^OSUserResponseBlock)(BOOL accepted);
Expand Down Expand Up @@ -492,7 +473,6 @@ typedef void (^OSInAppMessageClickBlock)(OSInAppMessageAction * _Nonnull action)

#pragma mark Permission, Subscription, and Email Observers
NS_ASSUME_NONNULL_BEGIN
+ (OSPermissionSubscriptionState*)getPermissionSubscriptionState;

+ (void)addPermissionObserver:(NSObject<OSPermissionObserver>*)observer;
+ (void)removePermissionObserver:(NSObject<OSPermissionObserver>*)observer;
Expand Down Expand Up @@ -527,11 +507,14 @@ typedef void (^OSEmailSuccessBlock)();

#pragma mark External User Id
// Typedefs defining completion blocks for updating the external user id
typedef void (^OSUpdateExternalUserIdBlock)(NSDictionary* results);
typedef void (^OSUpdateExternalUserIdFailureBlock)(NSError *error);
typedef void (^OSUpdateExternalUserIdSuccessBlock)(NSDictionary *results);

+ (void)setExternalUserId:(NSString * _Nonnull)externalId;
+ (void)setExternalUserId:(NSString * _Nonnull)externalId withCompletion:(OSUpdateExternalUserIdBlock _Nullable)completionBlock;
+ (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:(OSUpdateExternalUserIdBlock _Nullable)completionBlock;
+ (void)removeExternalUserId:(OSUpdateExternalUserIdSuccessBlock _Nullable)successBlock withFailure:(OSUpdateExternalUserIdFailureBlock _Nullable)failureBlock;

#pragma mark In-App Messaging
+ (BOOL)isInAppMessagingPaused;
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-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>
<dict>
<key>LibraryIdentifier</key>
<string>ios-armv7_armv7s_arm64</string>
<string>ios-i386_x86_64-simulator</string>
<key>LibraryPath</key>
<string>OneSignal.framework</string>
<key>SupportedArchitectures</key>
<array>
<string>armv7</string>
<string>armv7s</string>
<string>arm64</string>
<string>i386</string>
<string>x86_64</string>
</array>
<key>SupportedPlatform</key>
<string>ios</string>
<key>SupportedPlatformVariant</key>
<string>simulator</string>
</dict>
<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>
</array>
<key>CFBundlePackageType</key>
Expand Down
Loading

0 comments on commit f8ade39

Please sign in to comment.