You can trigger this method to change the partner name during the current session before the next initialization. This method allows you to change the partner name within the current session instantly.
You may want to change the partner name for various reasons, such as a user's location or language change on the app. For example, let's say you have an app that operates in multiple countries and one Insider panel for each country you operate in. When a user changes their country on the app, you should trigger this method to log the respective data for the user for each country and to send the messages based on the user's selected country from the correct panel accordingly.
The following table displays the data type for the parameters of the method.
| Parameter | Data Type |
|---|---|
| newPartnerName | String |
Method Signatures
The following code snippets show how to use this method in Objective-C and Swift.
[Insider reinitWithPartnerName:@"newPartnerName"];Insider.reinit(withPartnerName: "newPartnerName")Once you change the partner name:
- The events for a user are logged separately for each panel.
- User's attributes such as opt-in information, device token, UDID (unique device ID), and device attributes are also shared with the user profile on the other panel.
- If a user receives a push notification from panel A and doesn't click it, but clicks the push notification after switching to panel B, this push notification cannot be tracked.
- It is recommended to not trigger any events in 1 second upon reiniting the SDK as the reinit operation needs to be processed first. This duration might differ depending on the user's network.
- If the user's GDPR opt-in is false, this method cannot be executed for the respective user.