**Download Module **Download Sample
NOTE: Simulator is not able neither to subscribe nor receive push notifications. Push Notifications SDK supports iOS 4.0 and higher.
To integrate Pushwoosh with your Xamarin iOS application you need to do these simple steps:
1) Add the Pushwoosh project to your solution;
2) Open the References tree of your project, and choose Edit References…;
3) Locate the Pushwoosh project in the list, and check its checkbox;
4) Open the AppDelegate.cs file of your project, and connect Pushwoosh by adding the using Pushwoosh
line to it;
5) Add the methods below to the AppDelegate class:
public override void RegisteredForRemoteNotifications (UIApplication application, NSData deviceToken) { PushNotificationManager.PushManager.HandlePushRegistration (deviceToken); } public override void FailedToRegisterForRemoteNotifications (UIApplication application , NSError error) { PushNotificationManager.PushManager.HandlePushRegistrationFailure (error); } public override void ReceivedRemoteNotification (UIApplication application, NSDictionary userInfo) { PushNotificationManager.PushManager.HandlePushReceived (userInfo); }
**6)** Add the code below to the `public override bool FinishedLaunching (UIApplication app, NSDictionary options)` method:
PushNotificationManager pushmanager = PushNotificationManager.PushManager; pushmanager.Delegate = this; if (options != null) { if (options.ContainsKey (UIApplication.LaunchOptionsRemoteNotificationKey)) { pushmanager.HandlePushReceived (options); } } pushmanager.RegisterForPushNotifications ();
**7)** In order to use Geozones, add the line below to the same method:
pushmanager.StartLocationTracking ();
- - - - - -
If you receive the “Error executing task CreateEmbeddedResources: Task does not have property “BundleResources” defined” error while building your app, do the following:
1) Open your Pushwoosh.csproj (binding project) in any text editor and remove the following line: