Note
The following integration instructions are relevant for SDK 3.0 or higher.
Follow our migration instructions to upgrade from SDK 2.x to 3.0 or refer to our 2.x integration instruction.
Important
Requirements:
- .NET 7 or .NET 8
- In Visual Studio Solution Explorer, right-click on your shared project, then select "Add" - > "Add NuGet Packages…".
- Search for: PendoMAUIPlugin with latest version.
- Press Add Package.
Note
The API Key
can be found in your Pendo Subscription Settings in App Details.
-
Open the shared project App.xaml.cs:
Add the following under 'using':
using PendoMAUIPlugin;
In the protected override void OnStart() method, add the following code:
protected override void OnStart() { IPendoService pendo = PendoServiceFactory.CreatePendoService(); /** if your app supports additional Platforms other than iOS and Android verify the Pendo instance is not null */ if (pendo != null) { string apiKey = "YOUR_API_KEY_HERE"; pendo.Setup(apiKey); } ... }
-
Start the visitor's Session in the page where your visitor is being identified (e.g. login, register, etc.).
using PendoMAUIPlugin; namespace ExampleApp { class ExampleLoginClass { public void MethodExample() { IPendoService pendo = PendoServiceFactory.CreatePendoService(); ... /** if your app supports additional Platforms other than iOS and Android verify the Pendo instance is not null */ if (pendo != null) { var visitorId = "VISITOR-UNIQUE-ID"; var accountId = "ACCOUNT-UNIQUE-ID"; var visitorData = new Dictionary<string, object> { { "age", 27 }, { "country", "USA" } }; var accountData = new Dictionary<string, object> { { "Tier", 1 }, { "Size", "Enterprise" } }; pendo.StartSession(visitorId, accountId, visitorData, accountData); } ... } }
visitorId: a user identifier (e.g. John Smith)
visitorData: the user metadata (e.g. email, phone, country, etc.)
accountId: an affiliation of the user to a specific company or group (e.g. Acme inc.)
accountData : the account metadata (e.g. tier, level, ARR, etc.)This code ends the previous mobile session (if applicable), starts a new mobile session and retrieves all guides based on the provided information.
Tip
To begin a session for an anonymous visitor, pass null
or an empty string ''
as the visitor id. You can call the startSession
API more than once and transition from an anonymous session to an identified session (or even switch between multiple identified sessions).
-
If your app is using Gestures, you must upgrade to SDK version 3.1 or above and then register Pendo Effects (PendoRoutingEffect, PendoPlatformEffect) in your MauiProgram.cs file as shown in the code below.
... using PendoMAUIPlugin; ... public static class MauiProgram { public static MauiApp CreateMauiApp() { var builder = MauiApp.CreateBuilder(); builder.UseMauiApp<App>(); builder.ConfigureEffects(effects => { effects.Add<PendoRoutingEffect, PendoPlatformEffect>(); }); return builder.Build(); } }
Note
The Scheme ID
can be found in your Pendo Subscription Settings in App Details.
These steps enable page tagging and guide testing capabilities.
-
Add a Pendo URL scheme to the info.plist file:
Under the iOS App Target > open info.plist > if
URL Types
doesn't exist, click on 'Add new entry' of typeArray
and name itURL types
. Create a newDictionary
inside theArray
with two entries:URL identifier
of typeString
with a value that begins withpendo
(ex.pendo-scheme-d
).URL Schemes
of typeArray
. Add aString
item withYOUR_SCHEME_ID
as the value.
-
Add or modify the function OpenURL:
Open AppDelegate.cs file and add using PendoMaui; add the following code under OpenUrl method:
using PendoMaui; ... public override bool OpenUrl(UIApplication app, NSUrl url, NSDictionary options) { if (url.Scheme.Contains("pendo")) { PendoManager.InitWithUrl(url.AbsoluteString); return true; } return base.OpenUrl(app, url, options); }
- Test using Visual Studio:
Run the app.
Review the Xcode console and look for the following message:
Pendo SDK was successfully integrated and connected to the server.
- In the Pendo UI, go to Settings>Subscription Settings.
- Select the Applications tab and then your application.
- Select the Install Settings tab and follow the instructions under Verify Your Installation to ensure you have successfully integrated the Pendo SDK.
- Confirm that you can see your app as Integrated under subscription settings.
- API documentation available here.
- For technical issues, please review open issues or submit a new issue.
- Release notes can be found here.
- For additional documentation, visit our Help Center Mobile Section.