Closed luispedrofonseca closed 9 years ago
I'm having an issue trying to use the SimpleNotificationSystem where the RegionEndPoint is null.
public override void RegisteredForRemoteNotifications(UIApplication application, NSData deviceToken) { var oldDeviceToken = NSUserDefaults.StandardUserDefaults.StringForKey("PushDeviceToken"); var newDeviceToken = deviceToken.ToString().Replace("<", "").Replace(">", "").Replace(" ", ""); if (string.IsNullOrEmpty(oldDeviceToken) || !oldDeviceToken.Equals(newDeviceToken)) { var platformEndPointRequest = new CreatePlatformEndpointRequest(); platformEndPointRequest.Token = newDeviceToken; platformEndPointRequest.PlatformApplicationArn = "*"; var cred = new BasicAWSCredentials(AppSettings.AMAZON_SNS_ACCESS_KEY, AppSettings.AMAZON_SNS_SECRET_KEY); var snsClient = new AmazonSimpleNotificationServiceClient(cred, Amazon.RegionEndpoint.USWest2); snsClient.CreatePlatformEndpointAsync(platformEndPointRequest); } NSUserDefaults.StandardUserDefaults.SetString(newDeviceToken, "PushDeviceToken"); }
This is the code I'm using on my AppDelegate and here's the stack trace:
Any idea of what I might be doing wrong or is this a problem with the SDK?
See this issue which is closed but not yet solved...there is a missing file in the iOS DLL
https://github.com/awslabs/aws-sdk-xamarin/issues/20
I'm having an issue trying to use the SimpleNotificationSystem where the RegionEndPoint is null.
This is the code I'm using on my AppDelegate and here's the stack trace:
Any idea of what I might be doing wrong or is this a problem with the SDK?