Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- NSString* template = [NSString stringWithFormat:@"{\"aps\":{\"alert\":\"$(News_%@)\"},\"inAppMessage\":\"$(News_%@)\"}", localeString, localeString];
- public override void RegisteredForRemoteNotifications(UIApplication application, NSData deviceToken)
- {
- Hub = new SBNotificationHub(TnOConstants.AzureListenConnectionString, TnOConstants.AzureNotificationHubName);
- Hub.UnregisterAllAsync (deviceToken, (error) => {
- if (error != null)
- {
- Console.WriteLine("Error calling Unregister: {0}", error.ToString());
- return;
- }
- string[] tag = new string[]{"tnoios", "ios-"+ appVersion.ToString()};
- NSSet tags = new NSSet(tag);
- Hub.RegisterNativeAsync(deviceToken, tags, (errorCallback) => {
- if (errorCallback != null)
- Console.WriteLine("RegisterNativeAsync error: " + errorCallback.ToString());
- });
- String template = String.Format("@\"{\\\"aps\\\":{\\\"alert\\\":\\\"$(News_%@)\\\"},\\\"inAppMessage\\\":\\\"$(News_%@)\\\"}\"");
- string name="";
- string jsontemplate="";
- string expirytemplate="";
- // Hub.RegisterTemplateAsync(deviceToken, name,jsontemplate,expirytemplate, tags, (errorCallback) => {
- // if (errorCallback != null)
- // Console.WriteLine("RegisterNativeAsync error: " + errorCallback.ToString());
- // });
- });
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement