Last active
April 28, 2023 13:27
-
-
Save weswit-team/8db05c2ecf30af3398a9e381c763db3c to your computer and use it in GitHub Desktop.
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
- (void) connectAndRegister:(LSMPNDevice *)device { | |
// Create the LSLightstreamerClient and start connection | |
_client= [[LSLightstreamerClient alloc] initWithServerAddress:PUSH_SERVER_URL adapterSet:ADAPTER_SET]; | |
[_client connect]; | |
[_client addDelegate:self]; | |
// Add device listener and start registration | |
[device addDelegate:self]; | |
[_client registerForMPN:device]; | |
} | |
#pragma mark - LSMPNDeviceDelegate | |
- (void) mpnDeviceDidRegister:(nonnull LSMPNDevice *)device { | |
// Registration succeeded | |
} | |
- (void) mpnDevice:(nonnull LSMPNDevice *)device didFailRegistrationWithErrorCode:(NSInteger)code message:(nullable NSString *)message { | |
// Registration failed | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment