Migrate Xamarin SDK from 3.3.2.5 to 3.8.0
Replace SDK in shared project
- Right-click on the Shared Project's References item and select Add Reference....
- Select the .Net Assembley tab.
- Uncheck IBMMobilePush.Forms.dll.
- Click the Browse button and locate the AcousticMobilePush.Forms.dll downloaded from the 3.8.0 package.
- Select OK.
- Replace all references to IBMMobilePush with AcousticMobilePush.
- Change all references to
mailingIdto use typedouble?instead ofstring.
Replace SDK in android project
- Right-click on the Android Project's References item and select Add Reference....
- Select the .Net Assembly tab.
- Uncheck IBMMobilePush.Droid.dll and IBMMobilePush.Forms.dll.
- Click the Browse button and locate AcousticMobilePush.Droid.dll and AcousticMobilePush.Forms.dll downloaded from the 3.8.0 package.
- Select OK.
- Right-click IBMMobilePush.Forms.Droid.cs in the Android project and click Remove.
- Right-click the project, click Add and then Existing Files....
- Locate AcousticMobilePush.Froms.Droid.cs downloaded from the 3.8.0 package.
- Select OK.
- Replace all references to IBMMobilePush with AcousticMobilePush.
- Edit AndroidManifest.xml
- Set
android:nameattribute toco.acoustic.mobile.push.sdk.api.MceApplication - Set
android:nameattribute toco.acoustic.mobile.push.sdk.db.Provider - Set the with
android:nameattributecom.ibm.mce.sdk.notification.NotifActionReceivertoco.acoustic.mobile.push.sdk.notification.NotifActionReceiverinstead - Set the with
android:nameattributecom.ibm.mce.sdk.wi.AlarmReceivertoco.acoustic.mobile.push.sdk.wi.AlarmReceiverinstead - Set the with
android:nameattributecom.ibm.mce.sdk.session.SessionTrackingIntentServicetoco.acoustic.mobile.push.sdk.session.SessionTrackingIntentService - Remove the node with
android:nameattributecom.ibm.mce.sdk.fcm.FcmMessagingService - Set the with
android:nameattributecom.ibm.mce.sdk.fcm.FcmInstanceIdServicetoco.acoustic.mobile.push.sdk.messaging.fcm.FcmMessagingService - Set the with the
android:namecom.ibm.mce.sdk.events.EventsAlarmListenertoco.acoustic.mobile.push.sdk.events.EventsAlarmListener - Set the with the
android:namecom.ibm.mce.sdk.registration.PhoneHomeIntentServicetoco.acoustic.mobile.push.sdk.registration.PhoneHomeIntentService - Set the with the
android:namecom.ibm.mce.sdk.registration.RegistrationIntentServicetoco.acoustic.mobile.push.sdk.registration.RegistrationIntentService - Set the with the
android:namecom.ibm.mce.sdk.attributes.AttributesQueueConsumertoco.acoustic.mobile.push.sdk.attributes.AttributesQueueConsumer - Set the with the
android:namecom.ibm.mce.sdk.job.MceJobServicetoco.acoustic.mobile.push.sdk.job.MceJobService
- If you're using the Location Features Edit AndroidManifest.xml
- Set the
<receiver>withandroid:nameattributecom.ibm.mce.sdk.location.LocationUpdateCallertoco.acoustic.mobile.push.sdk.location.LocationUpdateCaller - Set the
<service>with theandroid:namecom.ibm.mce.sdk.location.LocationRetrieveServicetoco.acoustic.mobile.push.sdk.location.LocationRetrieveService - Remove the
<service>with theandroid:namecom.ibm.mce.sdk.location.GeofenceIntentService - Add a node to the
<application>node:<receiver android:name="co.acoustic.mobile.push.sdk.location.GeofenceBroadcastReceiver" android:enabled="true" android:exported="true" /> - Add a node to the
<application>node:<receiver android:name="co.acoustic.mobile.push.sdk.location.LocationBroadcastReceiver" android:enabled="true" android:exported="true" /> - Set the
<service>with theandroid:namecom.ibm.mce.sdk.location.LocationEventsIntentServicetoco.acoustic.mobile.push.sdk.location.LocationBroadcastReceiver - Set the
<service>with theandroid:namecom.ibm.mce.sdk.location.LocationSyncAlarmListenertoco.acoustic.mobile.push.sdk.location.LocationSyncAlarmListener - Set the
<service>with theandroid:namecom.ibm.mce.sdk.beacons.MceBluetoothScannertoco.acoustic.mobile.push.sdk.beacons.MceBluetoothScanner - Set the
<service>with theandroid:namecom.ibm.mce.sdk.beacons.BeaconsVerifiertoco.acoustic.mobile.push.sdk.beacons.BeaconsVerifier
- If you're using the Snooze Plugin Edit AndroidManifest.xml.
- Set the with the
android:namecom.ibm.mce.sdk.plugin.snooze.SnoozeIntentServicetoco.acoustic.mobile.push.sdk.plugin.snooze.SnoozeIntentService
- If you're using the Inbox Plugin Edit AndroidManifest.xml.
- Set the with the
android:namecom.ibm.mce.sdk.plugin.inbox.InboxUpdateServicetoco.acoustic.mobile.push.sdk.plugin.inbox.InboxUpdateService
- Double click on the Android Project.
- Select the General tab, make sure the target framework is
Android 9.0 Pie. - Select the Android Application tab, make sure the
Target Android versionisAndroid 9.0 (API level 28).
-
Right-click on the Packages of the Android Project, tap Update.
-
Right-click on the Packages of the Android Project, tap Manage NuGet Packages.
-
Right-click CustomMapRenderer.cs and click Remove.
-
Right-click Android project and click Add then Existing Files... select samples/Sample/Droid/Custom Controls/CustomMapRenderer.cs from 3.8.0 Package.
-
Change all references to
mailingIdto use typedouble?instead ofstring.
Replace SDK in iOS project
- Right-click on the iOS Project's References item and select Add Reference....
- Select the .Net Assembly tab.
- Uncheck IBMMobilePush.iOS.dll and IBMMobilePush.Forms.dll.
- Click the Browse button and locate AcousticMobilePush.iOS.dll and AcousticMobilePush.Forms.dll downloaded from the 3.8.0 package.
- Press OK.
- Right-click IBMMobilePush.Forms.iOS.cs in the iOS project, click Remove.
- Right-click the project, click Add and then Existing Files....
- Locate AcousticMobilePush.Froms.iOS.cs downloaded from the 3.8.0 package.
- Press OK.
- Replace all references to IBMMobilePush with AcousticMobilePush.
- Change all references to
mailingIdto use typedouble?instead ofstring.
Dark mode support
In order to support Dark Mode on iOS 13+ and Android 10+, it is recommended that you use a DynamicResource with two custom themes. This requires two XAML files, one for each theme as well as an <color> node for each globally defined color. Each XAML element is then modified to refer to the globally defined colors for their interface elements' foreground and background colors as needed.
See the sample app for examples of how this works in practice.
Android support
In addition, in Android, you'll need a custom page renderer that selects the correct theme for the current situation. See the Sample app for examples of how this works in practice.
iOS support
iOS will also need a custom page renderer that selects the correct theme for the current situation. See the Sample app for examples of how this works in practice.
Updated over 1 year ago
