Skip to content

Commit

Permalink
Fixed missing IdsAvailable parameter
Browse files Browse the repository at this point in the history
* Added IdsAvailable to the example project.
* Updated example to include iOS simulator workaround.
* Removed unneeded SmartLink flag from iOS binding project.
  • Loading branch information
jkasten2 committed Feb 22, 2017
1 parent 1471c6f commit f086032
Show file tree
Hide file tree
Showing 11 changed files with 52 additions and 11 deletions.
4 changes: 2 additions & 2 deletions Com.OneSignal.Abstractions/IOneSignal.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ public interface IOneSignal
void RegisterForPushNotifications();
void SendTag(string tagName, string tagValue);
void SendTags(IDictionary<string, string> tags);
void GetTags(TagsReceived inTagsReceivedDelegate);
void GetTags(TagsReceived tagsReceivedDelegate);
void DeleteTag(string key);
void DeleteTags(IList<string> keys);
void IdsAvailable();
void IdsAvailable(IdsAvailableCallback idsAvailableCallback);
void SetSubscription(bool enable);
void PostNotification(Dictionary<string, object> data);
void SyncHashedEmail(string email);
Expand Down
2 changes: 1 addition & 1 deletion Com.OneSignal.Abstractions/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
// The form "{Major}.{Minor}.*" will automatically update the build and revision,
// and "{Major}.{Minor}.{Build}.*" will update just the revision.

[assembly: AssemblyVersion("3.0.0")]
[assembly: AssemblyVersion("3.0.1")]

// The following attributes are used to specify the signing key for the assembly,
// if desired. See the Mono documentation for more information about signing.
Expand Down
2 changes: 1 addition & 1 deletion Com.OneSignal.Android/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
// The form "{Major}.{Minor}.*" will automatically update the build and revision,
// and "{Major}.{Minor}.{Build}.*" will update just the revision.

[assembly: AssemblyVersion("3.0.0")]
[assembly: AssemblyVersion("3.0.1")]

// The following attributes are used to specify the signing key for the assembly,
// if desired. See the Mono documentation for more information about signing.
Expand Down
2 changes: 1 addition & 1 deletion Com.OneSignal.iOS/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
// The form "{Major}.{Minor}.*" will automatically update the build and revision,
// and "{Major}.{Minor}.{Build}.*" will update just the revision.

[assembly: AssemblyVersion("3.0.0")]
[assembly: AssemblyVersion("3.0.1")]

// The following attributes are used to specify the signing key for the assembly,
// if desired. See the Mono documentation for more information about signing.
Expand Down
2 changes: 1 addition & 1 deletion Com.OneSignal.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2012/06/nuspec.xsd">
<metadata>
<id>Com.OneSignal</id>
<version>3.0.0</version>
<version>3.0.1</version>
<title>OneSignal SDK for Xamarin</title>
<authors>OneSignal, Martijn van Dijk</authors>
<owners>OneSignal</owners>
Expand Down
2 changes: 1 addition & 1 deletion Com.OneSignal/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
// The form "{Major}.{Minor}.*" will automatically update the build and revision,
// and "{Major}.{Minor}.{Build}.*" will update just the revision.

[assembly: AssemblyVersion("3.0.0")]
[assembly: AssemblyVersion("3.0.1")]

// The following attributes are used to specify the signing key for the assembly,
// if desired. See the Mono documentation for more information about signing.
Expand Down
2 changes: 1 addition & 1 deletion OneSignal.Android.Binding/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
// The form "{Major}.{Minor}.*" will automatically update the build and revision,
// and "{Major}.{Minor}.{Build}.*" will update just the revision.

[assembly: AssemblyVersion ("3.0.0")]
[assembly: AssemblyVersion ("3.0.1")]

// The following attributes are used to specify the signing key for the assembly,
// if desired. See the Mono documentation for more information about signing.
Expand Down
2 changes: 1 addition & 1 deletion OneSignal.iOS.Binding/OneSignal.linkwith.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
using ObjCRuntime;

[assembly: LinkWith ("OneSignal.a", SmartLink = true, ForceLoad = true, Frameworks="SystemConfiguration")]
[assembly: LinkWith ("OneSignal.a", ForceLoad = true, Frameworks="SystemConfiguration")]
2 changes: 1 addition & 1 deletion OneSignal.iOS.Binding/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
// The form "{Major}.{Minor}.*" will automatically update the build and revision,
// and "{Major}.{Minor}.{Build}.*" will update just the revision.

[assembly: AssemblyVersion ("3.0.0")]
[assembly: AssemblyVersion ("3.0.1")]

// The following attributes are used to specify the signing key for the assembly,
// if desired. See the Mono documentation for more information about signing.
Expand Down
5 changes: 5 additions & 0 deletions Samples/Com.OneSignal.Sample.Shared/SharedPush.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@ public static void Initialize()
Debug.WriteLine("HandleNotificationReceived: {0}", notification.payload.body);
})
.EndInit();

OneSignal.Current.IdsAvailable((playerID, pushToken) =>
{
Debug.WriteLine("OneSignal.Current.IdsAvailable:D playerID: {0}, pushToken: {1}", playerID, pushToken);
});
}

// Just for iOS.
Expand Down
38 changes: 37 additions & 1 deletion Samples/Com.OneSignal.Sample.iOS/AppDelegate.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
using Foundation;
using UIKit;
using Com.OneSignal.Sample.Shared;
using Com.OneSignal.Abstractions;
using System;

namespace Com.OneSignal.Sample.iOS
Expand Down Expand Up @@ -59,5 +58,42 @@ public override void WillTerminate(UIApplication application)
{
// Called when the application is about to terminate. Save data, if needed. See also DidEnterBackground.
}




// The following Exports are needed to run OneSignal in the iOS Simulator.
// The simulator doesn't support push however this prevents a crash due to a Xamarin bug
// https://bugzilla.xamarin.com/show_bug.cgi?id=52660
[Export("oneSignalApplicationDidBecomeActive:")]
public void OneSignalApplicationDidBecomeActive(UIApplication application)
{
// Remove line if you don't have a OnActivated method.
OnActivated(application);
}

[Export("oneSignalApplicationWillResignActive:")]
public void OneSignalApplicationWillResignActive(UIApplication application)
{
// Remove line if you don't have a OnResignActivation method.
OnResignActivation(application);
}

[Export("oneSignalApplicationDidEnterBackground:")]
public void OneSignalApplicationDidEnterBackground(UIApplication application)
{
// Remove line if you don't have a DidEnterBackground method.
DidEnterBackground(application);
}

[Export("oneSignalApplicationWillTerminate:")]
public void OneSignalApplicationWillTerminate(UIApplication application)
{
// Remove line if you don't have a WillTerminate method.
WillTerminate(application);
}

// Note: Similar exports are needed if you add other AppDelegate overrides.

}
}

0 comments on commit f086032

Please sign in to comment.