-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New ARTPush/getDevicePushDetails method for simplifying push state access #1186
Changes from all commits
d1f1c49
37486f1
e378eb7
2758a9b
454a72c
8d659f8
a7a1e16
b6f1eaf
3de9965
bc168d6
54a6fac
32d1bb5
b03a251
d447d2c
d15531a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#import <Ably/ARTDevicePushDetails.h> | ||
|
||
NS_ASSUME_NONNULL_BEGIN | ||
|
||
@interface ARTDevicePushDetails () | ||
|
||
- (NSString *)stateString; | ||
|
||
+ (ARTPushState)stateFromJsonString:(NSString *)string; | ||
|
||
@end | ||
|
||
NS_ASSUME_NONNULL_END |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
#import <Foundation/Foundation.h> | ||
#import <Ably/ARTTypes.h> | ||
#import <Ably/ARTPushDeviceRegistrations.h> | ||
#import <Ably/ARTPushChannelSubscriptions.h> | ||
|
||
@class ARTRest; | ||
@class ARTRealtime; | ||
|
@@ -75,13 +77,17 @@ NS_ASSUME_NONNULL_BEGIN | |
*/ | ||
- (void)deactivate; | ||
|
||
- (void)getDevicePushDetails:(ARTPushStateCallback)callback; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think this needs to be agreed cross-platform (i.e. via the features spec) before we add it here. I think https://github.com/ably/docs/issues/1288 would be the best place to come to a consensus on this. |
||
|
||
#endif | ||
|
||
@end | ||
|
||
@interface ARTPush : NSObject <ARTPushProtocol> | ||
|
||
@property (readonly) ARTPushAdmin *admin; | ||
@property (readonly) ARTPushDeviceRegistrations *deviceRegistrations; | ||
@property (readonly) ARTPushChannelSubscriptions *channelSubscriptions; | ||
|
||
@end | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,4 @@ | ||
#import <Ably/ARTPushAdmin.h> | ||
#import <Ably/ARTPushDeviceRegistrations+Private.h> | ||
#import <Ably/ARTPushChannelSubscriptions+Private.h> | ||
#import "ARTQueuedDealloc.h" | ||
|
||
@class ARTRestInternal; | ||
|
@@ -9,9 +7,6 @@ NS_ASSUME_NONNULL_BEGIN | |
|
||
@interface ARTPushAdminInternal : NSObject <ARTPushAdminProtocol> | ||
|
||
@property (nonatomic, readonly) ARTPushDeviceRegistrationsInternal *deviceRegistrations; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Moving these properties is a change to the public API, and also these properties are described in the features spec; we’d need to update the features spec before making this change and need to make sure we do a new major release of the library afterwards. |
||
@property (nonatomic, readonly) ARTPushChannelSubscriptionsInternal *channelSubscriptions; | ||
|
||
- (instancetype)initWithRest:(ARTRestInternal *)rest; | ||
|
||
@end | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this change (string to enum) can be a separate thing, which we should do regardless of how we solve the
LocalDevice
issue. I've created an issue for it: #1264.