-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Push ActivationStateMachine tests (#662)
* Initial Push types * Update project * ARTPushNotifications interface * Realtime: integrate Push type * Rest: integrate Push type * Push.activate * fixup! Push.activate * Push.publish - add PushRecipient protocol * fixup! Push.publish * PushChannel subscribe and unsubscribe * Fix registerCallback * Remove warnings - unused methods * Fix FormFactor * Fix: use device token as Hex string * Fix: should respect the default encoder - useBinaryProtocol * Remove ARTPushRecipient protocol and types * Add ULID pod * Use ULID as DeviceId * Push.deactivate * Load local device * Push: update device * PushChannel.subscriptions * Update ULID pod * PushAdmin * Update ULID pod * Remove warnings * JSON encoder: normalize deviceToken hex string * Fix: Push.publish request body * Update device forms * Activation State Machine: init * Activation State Machine: registration * Removed ablyPushAuthKey, ablyPushAuthToken and ablyPushClientId from push delegate * Add Rest argument on Push delegate * tmp * Fix things for push, and adapt to latest API. * Initial State Machine tests * ARTLocalDeviceStorage * Fix: ARTPushActivationState * Storage should synchronize UserDefaults * Storage Keys accessible on tests * State Machine tests * ActivationStateMachine: custom delegate and other fixes * PushActivationStateMachine * Implement Device storage * Fix headers * Fix tests
- Loading branch information
1 parent
7f2216e
commit 2237a79
Showing
33 changed files
with
988 additions
and
125 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
// | ||
// ARTLocalDeviceStorage.h | ||
// Ably | ||
// | ||
// Created by Ricardo Pereira on 18/04/2017. | ||
// Copyright © 2017 Ably. All rights reserved. | ||
// | ||
|
||
#import <Foundation/Foundation.h> | ||
|
||
NS_ASSUME_NONNULL_BEGIN | ||
|
||
@protocol ARTDeviceStorage <NSObject> | ||
- (nullable id)objectForKey:(NSString *)key; | ||
- (void)setObject:(nullable id)value forKey:(NSString *)key; | ||
@end | ||
|
||
@interface ARTLocalDeviceStorage : NSObject<ARTDeviceStorage> | ||
|
||
@end | ||
|
||
NS_ASSUME_NONNULL_END |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
// | ||
// ARTLocalDeviceStorage.m | ||
// Ably | ||
// | ||
// Created by Ricardo Pereira on 18/04/2017. | ||
// Copyright © 2017 Ably. All rights reserved. | ||
// | ||
|
||
#import "ARTLocalDeviceStorage.h" | ||
|
||
@implementation ARTLocalDeviceStorage | ||
|
||
- (nullable id)objectForKey:(NSString *)key { | ||
return [[NSUserDefaults standardUserDefaults] objectForKey:key]; | ||
} | ||
|
||
- (void)setObject:(nullable id)value forKey:(NSString *)key { | ||
[[NSUserDefaults standardUserDefaults] setObject:value forKey:key]; | ||
[[NSUserDefaults standardUserDefaults] synchronize]; | ||
} | ||
|
||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.