Skip to content

Commit

Permalink
Updates OneSignal.framework for using latest one (from Yesterday! 25/…
Browse files Browse the repository at this point in the history
  • Loading branch information
Carlos Henrique Zinato committed Jan 26, 2017
1 parent ca1e4d9 commit 4d1b45e
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 21 deletions.
8 changes: 4 additions & 4 deletions ios/com.williamrijksen.onesignal.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
24DD6CFA1134B3F500162E58 /* ComWilliamrijksenOnesignalModule.m in Sources */ = {isa = PBXBuildFile; fileRef = 24DD6CF81134B3F500162E58 /* ComWilliamrijksenOnesignalModule.m */; };
AA747D9F0F9514B9006C5449 /* ComWilliamrijksenOnesignal_Prefix.pch in Headers */ = {isa = PBXBuildFile; fileRef = AA747D9E0F9514B9006C5449 /* ComWilliamrijksenOnesignal_Prefix.pch */; };
AACBBE4A0F95108600F1A2B1 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AACBBE490F95108600F1A2B1 /* Foundation.framework */; };
E7E33C0C1D9D823200810B7E /* OneSignal.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E7E33C0B1D9D823200810B7E /* OneSignal.framework */; };
E88E4F351E3A2A6C00936A74 /* OneSignal.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E88E4F341E3A2A6C00936A74 /* OneSignal.framework */; };
/* End PBXBuildFile section */

/* Begin PBXContainerItemProxy section */
Expand All @@ -46,16 +46,16 @@
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; };
D2AAC07E0554694100DB518D /* libComWilliamrijksenOnesignal.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libComWilliamrijksenOnesignal.a; sourceTree = BUILT_PRODUCTS_DIR; };
E7E33C0B1D9D823200810B7E /* OneSignal.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OneSignal.framework; path = platform/OneSignal.framework; sourceTree = "<group>"; };
E88E4F341E3A2A6C00936A74 /* OneSignal.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OneSignal.framework; path = "../../../../../../Downloads/OneSignal-iOS-SDK-master/iOS_SDK/Framework/OneSignal.framework"; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
D2AAC07C0554694100DB518D /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
E88E4F351E3A2A6C00936A74 /* OneSignal.framework in Frameworks */,
AACBBE4A0F95108600F1A2B1 /* Foundation.framework in Frameworks */,
E7E33C0C1D9D823200810B7E /* OneSignal.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -84,7 +84,7 @@
0867D69AFE84028FC02AAC07 /* Frameworks */ = {
isa = PBXGroup;
children = (
E7E33C0B1D9D823200810B7E /* OneSignal.framework */,
E88E4F341E3A2A6C00936A74 /* OneSignal.framework */,
AACBBE490F95108600F1A2B1 /* Foundation.framework */,
);
name = Frameworks;
Expand Down
27 changes: 10 additions & 17 deletions ios/platform/OneSignal.framework/Versions/A/Headers/OneSignal.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,6 @@
#define XC8_AVAILABLE 1
#import <UserNotifications/UserNotifications.h>

@protocol OSUserNotificationCenterDelegate <NSObject>
@optional
- (void)userNotificationCenter:(id)center willPresentNotification:(id)notification withCompletionHandler:(void (^)(NSUInteger options))completionHandler;
- (void)userNotificationCenter:(id)center didReceiveNotificationResponse:(id)response withCompletionHandler:(void (^)())completionHandler;
@end

#endif

/* The action type associated to an OSNotificationAction object */
Expand All @@ -80,9 +74,9 @@ typedef NS_ENUM(NSUInteger, OSNotificationDisplayType) {



/* iOS 10+
/*
Used as value type for `kOSSettingsKeyInFocusDisplayOption`
for setting the display option of a notification received while the app was in focus
for setting the display option of a notification received while the app was in focus.
*/
typedef OSNotificationDisplayType OSInFocusDisplayOption;

Expand Down Expand Up @@ -128,7 +122,7 @@ typedef OSNotificationDisplayType OSInFocusDisplayOption;
@property(readonly)NSDictionary* attachments;

/* Action buttons passed */
@property(readonly)NSDictionary *actionButtons;
@property(readonly)NSArray *actionButtons;

/* Holds the original payload received
Keep the raw value for users that would like to root the push */
Expand All @@ -148,6 +142,9 @@ typedef OSNotificationDisplayType OSInFocusDisplayOption;
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 */
Expand Down Expand Up @@ -233,10 +230,10 @@ typedef NS_ENUM(NSUInteger, ONE_S_LOG_LEVEL) {
+ (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)erceivedCallback handleNotificationAction:(OSHandleNotificationActionBlock)actionCallback settings:(NSDictionary*)settings;
+ (id)initWithLaunchOptions:(NSDictionary*)launchOptions appId:(NSString*)appId handleNotificationReceived:(OSHandleNotificationReceivedBlock)receivedCallback handleNotificationAction:(OSHandleNotificationActionBlock)actionCallback settings:(NSDictionary*)settings;

+ (NSString*)app_id;

// Only use if you passed FALSE to autoRegister
+ (void)registerForPushNotifications;

Expand Down Expand Up @@ -268,18 +265,14 @@ typedef NS_ENUM(NSUInteger, ONE_S_LOG_LEVEL) {
+ (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;

// - Sends the MD5 and SHA1 of the provided email
// 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.
+ (void)syncHashedEmail:(NSString*)email;

// - iOS 10 BETA features currently only available on XCode 8 & iOS 10.0+
#if XC8_AVAILABLE
+ (void)setNotificationCenterDelegate:(id<OSUserNotificationCenterDelegate>)delegate;
+ (id<OSUserNotificationCenterDelegate>)notificationCenterDelegate;
#endif

@end
Binary file modified ios/platform/OneSignal.framework/Versions/A/OneSignal
Binary file not shown.

2 comments on commit 4d1b45e

@aurusapps
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good hopefully this will resolve IOS 10 rich notifications as well williamrijksen#13

@chmiiller
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ops...sorry guys, but it isn't working with this new framework.
When I send a notification and app is opened, or attempt to open the app from notification it crashes with the message:

-[TiApp application:didReceiveRemoteNotification:]: unrecognized selector sent to instance 0x1701f0900
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[TiApp application:didReceiveRemoteNotification:]: unrecognized selector sent to instance 0x1701f0900'

Not sure what they've changed about it =/
So I don't think it is a good idea to merge this framework update for now, unless you have a solution for this

Please sign in to comment.