-
Notifications
You must be signed in to change notification settings - Fork 7
Migration guides
- Migration from
6.1.0
to6.2.0
, in case you are getting rid ofuse_frameworks!
in thePodfile
- Migration from
5.x
to6.x
- Migration from
4.x
to5.x
- Migration from
3.x
to4.x
Starting from the 6.2.0 plugin version it's not mandatory to have use_frameworks!
in the Podfile
. If you want to get rid of use_frameworks!
you need to :
- Remove
use_frameworks!
from thePodfile
, then from theios
folder callpod deintegrate & pod update
. - Perform
mmine integrate
command from the guide about Notification Extension Integration - Make cleanup from the xCode
Product->Clean Build Folder
and remove Derived Datarm -rf ~/Library/Developer/Xcode/DerivedData/*
Manual plugin integration for iOS is deprecated, because plugin can be integrated without
use_frameworks!
. If you have used Manual integration before, you need to follow the recommendations of how to return back to automatic integration and then Setup xcode project for Notification Extension.
Starting from 6.0.0 version we updated react-native to 0.68.0. However New react-native architecture features aren't supported yet, so for Android platform in newArchEnabled=false
should be set into gradle.properties
, and the flag RCT_NEW_ARCH_ENABLED
shouldn't be set for iOS platform.
To migrate application you can use react-native upgrade helper or just re-create application from scratch using particular react-native version (react-native init newproject --version 0.68.0
).
We've migrated Android MobileMessaging SDK used within the plugin to AndroidX, changed com.google.firebase:firebase-messaging
to 22.0.0
version which has some breaking changes, changed com.google.android.gms:play-services-location
version to 18.0.0
.
- compileSdkVersion was changed from 29 to 31
- targetSdkVersion was changed from 29 to 31
Please check Registration for push notifications in Firebase documentation
Starting from 6.0.0 version we removed deprecated ECB cryptor from our Android MobileMessaging SDK, so if you have installations of the application with MobileMessaging plugin version < 3.0.0 (it actually means that data encrypted with old algorithm needs to be migrated), add withCryptorMigration = true
into android/build.gradle
extra properties:
buildscript {
ext {
...
withCryptorMigration = true
}
Additionally you can check how it's set in Example app.
Additionally following permissions will be added automatically to the AndroidManifest.xml
:
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_BACKGROUND_LOCATION" />
In case you aren't using geo, you can add it to the /android/app/src/main/AndroidManifest.xml
so permissions won't be requested:
<manifest ... xmlns:tools="http://schemas.android.com/tools">
...
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" tools:node="remove" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" tools:node="remove" />
<uses-permission android:name="android.permission.ACCESS_BACKGROUND_LOCATION" tools:node="remove" />
...
</manifest>
Procedure of requesting permissions changed, please check Geofencing guide for Android.
Starting from 5.0.0 version we updated react-native to 0.66.3. To migrate application you can use react-native upgrade helper or just re-create application from scratch using particular react-native version (react-native init newproject --version 0.66.3
).
-
register(eventName, handler)
is deprecated, for react-native version >= 0.65subscribe(eventName, handler) : EmitterSubscription
should be used. -
unregister(eventName, handler)
is deprecated, for react-native version >= 0.65unsubscribe(subscription)
should be used.
componentDidMount() {
- mobileMessaging.register(event, this.handleMobileMessagingEvent);
+ this.subscription = mobileMessaging.subscribe("notificationTapped", this.handleMobileMessagingEvent);
}
componentWillUnmount() {
- mobileMessaging.unregister(event, this.handleMobileMessagingEvent);
+ mobileMessaging.unsubscribe(this.subscription);
}
Starting from 4.0.0 version we updated react-native to 0.64.2. To migrate application you can use react-native upgrade helper or just re-create application from scratch using particular react-native version (react-native init newproject --version 0.64.2
).
You may face cycle in dependencies between targets '<Your main target>' and 'FBReactNativeSpec'
error while building project for iOS, it's known react-native issue, we solved it for our Example project by adding following to Podfile:
target 'Example' do
...
post_install do |installer|
react_native_post_install(installer)
#fix for issue https://github.com/facebook/react-native/issues/31034
installer.pods_project.targets.each do |target|
if (target.name&.eql?('FBReactNativeSpec'))
target.build_phases.each do |build_phase|
if (build_phase.respond_to?(:name) && build_phase.name.eql?('[CP-User] Generate Specs'))
target.build_phases.move(build_phase, 0)
end
end
end
end
#end of fix
end
end
If you have any questions or suggestions, feel free to send an email to [email protected] or create an issue.
- Library events
- Server errors
- Users and installations
- Messages and notifications management
- Inbox
- Privacy settings
- In‐app chat
- WebRTC Calls and UI
- Migration guides