MAUI Dotnet
Integrate Pushwoosh SDK for .NET 7.0 in your MAUI project
Last updated
Integrate Pushwoosh SDK for .NET 7.0 in your MAUI project
Last updated
1. Add Pushwoosh.DotNet Nuget package to both Android and iOS projects:
2. Accept licenses for transitive Android dependencies if required:
3. Configure your project in Firebase Console.
4. Add google-services.json to the root of your Android platform directory. Set GoogleServicesJson build action for this file:
5. Add the following lines before declaring namespace in your MainActivity.cs (XXXXX-XXXXX here is your Pushwoosh Application ID):
6. In your MainActivity.cs override OnCreate()
method and call PushManager.Init();
after base.OnCreate(savedInstanceState);
7. In your Android project, find the Resources/values/strings.xml file or create it. Add your Sender ID string there:
8. Make the following changes in the AppDelegate.cs of your iOS project:
8.1. In the beginning of the FinishedLaunching
method, put the following line:
PushManager.Init();
8.2. Add these methods to the AppDelegate (MauiUIApplicationDelegate
class does not export these methods by default, so you have to do it manually):
9. In the Info.plist, change the Pushwoosh_APPID value to your Pushwoosh Application Code. You can find it in your Control Panel:
10. In the cross-platform part of App.xaml.cs, add the registration to onStart
method:
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.