Skip to content

Commit

Permalink
1.5.4 release
Browse files Browse the repository at this point in the history
  • Loading branch information
edatkinvey committed Sep 3, 2015
1 parent c22c8b6 commit d0e0477
Show file tree
Hide file tree
Showing 14 changed files with 41 additions and 15 deletions.
Binary file removed Kinvey-Android.1.5.2.nupkg
Binary file not shown.
Binary file removed Kinvey-Android.1.5.3.nupkg
Binary file not shown.
Binary file added Kinvey-Android.1.5.4.nupkg
Binary file not shown.
6 changes: 3 additions & 3 deletions Kinvey-Xamarin-Android.nuspec
Expand Up @@ -2,8 +2,8 @@
<package >
<metadata>
<id>Kinvey-Android</id>
<version>1.5.3</version>
<releaseNotes> * Improved error messaging when there is no logged in user * Added GPS as a nuget dependency </releaseNotes>
<version>1.5.4</version>
<releaseNotes> * Fixed an issue with AppData delete's URL generation </releaseNotes>
<title>Kinvey-Xamarin-Android</title>
<authors>Kinvey</authors>
<owners>Kinvey</owners>
Expand All @@ -22,7 +22,7 @@
<dependency id="SQLite.Net.Async-PCL" version="3.0.5" />
<dependency id="SQLite.Net-PCL" version="3.0.5" />
<dependency id="Xamarin.GooglePlayServices" version="25.0.0.0"/>
<dependency id="Kinvey" version="1.5.3" />
<dependency id="Kinvey" version="1.5.4" />
</dependencies>
</metadata>
<files>
Expand Down
6 changes: 3 additions & 3 deletions Kinvey-Xamarin-iOS.nuspec
Expand Up @@ -2,8 +2,8 @@
<package >
<metadata>
<id>Kinvey-ios</id>
<version>1.5.3</version>
<releaseNotes> * Improved error messaging when there is no logged in user </releaseNotes>
<version>1.5.4</version>
<releaseNotes> * Fixed an issue with AppData delete's URL generation </releaseNotes>
<title>Kinvey-Xamarin-iOS</title>
<authors>Kinvey</authors>
<owners>Kinvey</owners>
Expand All @@ -21,7 +21,7 @@
<dependency id="Newtonsoft.Json" version="7.0.1" />
<dependency id="SQLite.Net.Async-PCL" version="3.0.5" />
<dependency id="SQLite.Net-PCL" version="3.0.5" />
<dependency id="Kinvey" version="1.5.3" />
<dependency id="Kinvey" version="1.5.4" />
</dependencies>
</metadata>
<files>
Expand Down
29 changes: 23 additions & 6 deletions Kinvey-Xamarin-iOS/Push/Push.cs
Expand Up @@ -30,7 +30,7 @@ public class Push : AbstractPush

}

public void Initialize(string deviceToken){
public async void Initialize(string deviceToken){
if (deviceToken == null) {
Logger.Log ("Cannot Initialize for push, device Token cannot be null!");
return;
Expand All @@ -49,11 +49,22 @@ public class Push : AbstractPush

NSUserDefaults.StandardUserDefaults.SetString(deviceToken, APN_Token);
NSUserDefaults.StandardUserDefaults.Synchronize ();
try{
await EnablePushAsync("ios", deviceToken);
}catch(Exception e){
// Console.WriteLine ("wtf");
//throw e;
}

ThreadPool.QueueUserWorkItem (o => {
EnablePushViaRest ("ios", deviceToken).Execute();
});
// ThreadPool.QueueUserWorkItem (o => {
// try{
// EnablePushViaRest ("ios", deviceToken).Execute();
// } catch (Exception e){
// delegates.onError(e);
// throw e;
// }
//
// });
}

public void DisablePush(){
Expand All @@ -64,8 +75,14 @@ public class Push : AbstractPush
return;
}



ThreadPool.QueueUserWorkItem (o => {
DisablePushViaRest("ios", value).Execute();
// try{
DisablePushViaRest("ios", value).Execute();
// } catch (Exception e){
// throw e;
// }
});
}

Expand Down
4 changes: 2 additions & 2 deletions Kinvey-Xamarin.nuspec
Expand Up @@ -2,8 +2,8 @@
<package >
<metadata>
<id>Kinvey</id>
<version>1.5.3</version>
<releaseNotes> * Improved error messaging when there is no logged in user</releaseNotes>
<version>1.5.4</version>
<releaseNotes> * Fixed an issue with AppData delete's URL generation </releaseNotes>
<title>Kinvey-Xamarin</title>
<authors>Kinvey</authors>
<owners>Kinvey</owners>
Expand Down
9 changes: 9 additions & 0 deletions Kinvey-Xamarin/AbstractPush.cs
Expand Up @@ -2,6 +2,7 @@
using System.Collections.Generic;
using Newtonsoft.Json.Linq;
using Newtonsoft.Json;
using System.Threading.Tasks;

namespace KinveyXamarin
{
Expand All @@ -16,6 +17,14 @@ public AbstractPush (Client client)
this.client = client;
}

public async Task<PushPayload> EnablePushAsync(string platform, string entityId){
return await EnablePushViaRest (platform, entityId).ExecuteAsync ();
}

public async Task<PushPayload> DisablePushAsync(string platform, string entityId){
return await DisablePushViaRest (platform, entityId).ExecuteAsync ();
}

public EnablePush EnablePushViaRest(string platform, string deviceId){
var urlParameters = new Dictionary<string, string>();
urlParameters.Add("appKey", ((KinveyClientRequestInitializer)client.RequestInitializer).AppKey);
Expand Down
2 changes: 1 addition & 1 deletion Kinvey-Xamarin/Core/KinveyHeaders.cs
Expand Up @@ -28,7 +28,7 @@ public class KinveyHeaders : List<HttpHeader>
/// <summary>
/// The version of the library.
/// </summary>
public static string VERSION = "1.5.3";
public static string VERSION = "1.5.4";

/// <summary>
/// The kinvey API version key.
Expand Down
Binary file removed Kinvey-ios.1.5.2.nupkg
Binary file not shown.
Binary file removed Kinvey-ios.1.5.3.nupkg
Binary file not shown.
Binary file added Kinvey-ios.1.5.4.nupkg
Binary file not shown.
Binary file removed Kinvey.1.5.2.nupkg
Binary file not shown.
Binary file renamed Kinvey.1.5.3.nupkg → Kinvey.1.5.4.nupkg
Binary file not shown.

0 comments on commit d0e0477

Please sign in to comment.