1
0
mirror of https://github.com/bitwarden/mobile synced 2026-01-05 10:03:26 +00:00

adjusted build configs for ios. safer parsing od push notifications

This commit is contained in:
Kyle Spearrin
2016-07-23 15:04:05 -04:00
parent c0214e3707
commit 0a2bc7f053
3 changed files with 321 additions and 6138 deletions

View File

@@ -35,10 +35,21 @@ namespace Bit.App.Services
public void OnMessage(JObject values, DeviceType deviceType)
{
if(values == null)
{
return;
}
_showNotification = false;
Debug.WriteLine("Message Arrived: {0}", JsonConvert.SerializeObject(values));
var type = (Enums.PushType)values.GetValue("type", StringComparison.OrdinalIgnoreCase).ToObject<short>();
JToken token;
if(!values.TryGetValue("type", StringComparison.OrdinalIgnoreCase, out token) || token == null)
{
return;
}
var type = (Enums.PushType)token.ToObject<short>();
switch(type)
{
case Enums.PushType.SyncCipherUpdate: