Xamarin library integration
1. Change target framework of your Android project to Android 8.0 or higher.
2. Add the Pushwoosh nuget package to both Android and iOS projects.
3. Make the following changes in the AppDelegate.cs of your iOS project:
3.1. In the beginning of the FinishedLaunching
method, put the following line:
3.2. Add these methods to the AppDelegate:
4. In the Info.plist, change the Pushwoosh_APPID value to your Pushwoosh Application Code. You can find it in your Control Panel.
5. Configure your project in Firebase Console.
6.1. Add google-services.json
file to your Android project.
6.2. In Visual Studio, right-click the google-services.json
and choose GoogleServicesJson option from the Build Action menu.
7. In the MainActivity.cs of your Android project, before defining the namespace, add these lines:
Also, in the beginning of onCreate
method of the MainActivity class, initialize the PushManager with Pushwoosh.Droid.PushManager.Init();
line.
8. In your Android project, find the Resources/values/strings.xml file or create it. Add your Sender ID string there:
9. In the cross-platform part of App.xaml.cs, add the registration to onStart
method:
Message Inbox
1. Install the Pushwoosh.Inbox nuget package into your projects.
2.1. For iOS, add the following line to your AppDelegate.cs (after Pushwoosh.iOS.PushManager.Init();
):
2.2. For Android, add the following line to your MainActivity.cs (after Pushwoosh.Droid.PushManager.Init();
):
3. To show the Inbox UI in your app:
3.1. Create the PushwooshInboxStyle instance:
3.2. Then call:
Share your feedback with us
Your feedback helps us create a better experience, so we would love to hear from you if you have any issues during the SDK integration process. If you face any difficulties, please do not hesitate to share your thoughts with us via this form.