Xamarin iOS SDK

**Download Module **Download Sample

To integrate Pushwoosh with your Xamarin iOS application you need to do these simple steps:

1) Add the Pushwoosh project to your solution;

Screen Shot 2014-10-06 at 20.58.39

2) Open the References tree of your project, and choose Edit References…;

Screen Shot 2014-10-06 at 20.58.51

Screen Shot 2014-10-06 at 20.59.18

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:

**2)** Then, insert the following line (if it is not there already):