├── .gitignore ├── .npmignore ├── .ruby-version ├── .swift-version ├── BasicExample ├── .eslintrc.js ├── .gitignore ├── .prettierrc.js ├── .watchmanconfig ├── App.tsx ├── Gemfile ├── Gemfile.lock ├── android │ ├── app │ │ ├── build.gradle │ │ ├── debug.keystore │ │ ├── proguard-rules.pro │ │ └── src │ │ │ ├── debug │ │ │ ├── AndroidManifest.xml │ │ │ └── java │ │ │ │ └── com │ │ │ │ └── basicexample │ │ │ │ └── ReactNativeFlipper.java │ │ │ ├── main │ │ │ ├── AndroidManifest.xml │ │ │ ├── java │ │ │ │ └── com │ │ │ │ │ └── basicexample │ │ │ │ │ ├── MainActivity.java │ │ │ │ │ └── MainApplication.java │ │ │ └── res │ │ │ │ ├── drawable │ │ │ │ └── rn_edit_text_material.xml │ │ │ │ ├── mipmap-hdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ │ ├── mipmap-mdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ │ ├── mipmap-xhdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ │ ├── mipmap-xxhdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ │ ├── mipmap-xxxhdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ │ └── values │ │ │ │ ├── strings.xml │ │ │ │ └── styles.xml │ │ │ └── release │ │ │ └── java │ │ │ └── com │ │ │ └── basicexample │ │ │ └── ReactNativeFlipper.java │ ├── build.gradle │ ├── gradle.properties │ ├── gradle │ │ └── wrapper │ │ │ ├── gradle-wrapper.jar │ │ │ └── gradle-wrapper.properties │ ├── gradlew │ ├── gradlew.bat │ └── settings.gradle ├── app.json ├── babel.config.js ├── index.js ├── ios │ ├── .xcode.env │ ├── BasicExample.xcodeproj │ │ ├── project.pbxproj │ │ └── xcshareddata │ │ │ └── xcschemes │ │ │ └── BasicExample.xcscheme │ ├── BasicExample.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ └── IDEWorkspaceChecks.plist │ ├── BasicExample │ │ ├── AppDelegate.h │ │ ├── AppDelegate.mm │ │ ├── BasicExample.entitlements │ │ ├── Images.xcassets │ │ │ ├── AppIcon.appiconset │ │ │ │ └── Contents.json │ │ │ └── Contents.json │ │ ├── Info.plist │ │ ├── LaunchScreen.storyboard │ │ └── main.m │ ├── BasicExampleTests │ │ ├── BasicExampleTests.m │ │ └── Info.plist │ ├── MobileMessagingNotificationExtension.entitlements │ ├── NotificationExtension │ │ ├── MobileMessagingNotificationServiceExtension.plist │ │ └── NotificationService.swift │ └── Podfile ├── jest.config.js ├── metro.config.js ├── package.json ├── tsconfig.json └── yarn.lock ├── Example ├── .bundle │ └── config ├── .eslintrc.js ├── .gitignore ├── .prettierrc.js ├── .watchmanconfig ├── App.tsx ├── Gemfile ├── README.md ├── __tests__ │ └── App.test.tsx ├── android │ ├── app │ │ ├── build.gradle │ │ ├── debug.keystore │ │ ├── proguard-rules.pro │ │ └── src │ │ │ ├── debug │ │ │ └── AndroidManifest.xml │ │ │ └── main │ │ │ ├── AndroidManifest.xml │ │ │ ├── java │ │ │ └── com │ │ │ │ └── example │ │ │ │ ├── MainActivity.kt │ │ │ │ └── MainApplication.kt │ │ │ └── res │ │ │ ├── drawable │ │ │ └── rn_edit_text_material.xml │ │ │ ├── mipmap-hdpi │ │ │ ├── ic_launcher.png │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-mdpi │ │ │ ├── ic_launcher.png │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-xhdpi │ │ │ ├── ic_launcher.png │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-xxhdpi │ │ │ ├── ic_launcher.png │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-xxxhdpi │ │ │ ├── ic_launcher.png │ │ │ └── ic_launcher_round.png │ │ │ └── values │ │ │ ├── strings.xml │ │ │ └── styles.xml │ ├── build.gradle │ ├── gradle.properties │ ├── gradle │ │ └── wrapper │ │ │ ├── gradle-wrapper.jar │ │ │ └── gradle-wrapper.properties │ ├── gradlew │ ├── gradlew.bat │ └── settings.gradle ├── app.json ├── assets │ ├── fonts │ │ └── Apple Chancery.ttf │ ├── ic_add_circle.png │ ├── ic_back.png │ ├── ic_download.png │ ├── ic_send.png │ └── paperplane.fill.png ├── babel.config.js ├── components │ └── PrimaryButton.tsx ├── constants │ ├── Colors.ts │ └── MyMessageStorage.ts ├── index.js ├── ios │ ├── .ruby-version │ ├── .xcode.env │ ├── Example.entitlements │ ├── Example.xcodeproj │ │ ├── project.pbxproj │ │ └── xcshareddata │ │ │ └── xcschemes │ │ │ └── Example.xcscheme │ ├── Example.xcworkspace │ │ └── contents.xcworkspacedata │ ├── Example │ │ ├── AppDelegate.h │ │ ├── AppDelegate.mm │ │ ├── Images.xcassets │ │ │ ├── AppIcon.appiconset │ │ │ │ └── Contents.json │ │ │ └── Contents.json │ │ ├── Info.plist │ │ ├── LaunchScreen.storyboard │ │ ├── PrivacyInfo.xcprivacy │ │ └── main.m │ ├── ExampleTests │ │ ├── ExampleTests.m │ │ └── Info.plist │ ├── MobileMessagingNotificationExtension.entitlements │ ├── NotificationExtension │ │ ├── MobileMessagingNotificationServiceExtension.plist │ │ └── NotificationService.swift │ └── Podfile ├── jest.config.js ├── metro.config.js ├── package.json ├── screens │ ├── ChatScreen.tsx │ ├── HomeScreen.tsx │ ├── MultiThreadChatScreen.tsx │ ├── PersonalizeScreen.tsx │ ├── SubviewChatScreen.tsx │ ├── TestDeeplinkingScreen.tsx │ └── TestDeeplinkingScreen2.tsx └── tsconfig.json ├── Gemfile ├── Gemfile.lock ├── LICENSE ├── README.md ├── android ├── README.md ├── build.gradle ├── gradle.properties ├── gradle │ └── wrapper │ │ ├── gradle-wrapper.jar │ │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── infobip-mm-proguard-rules.pro └── src │ └── main │ ├── AndroidManifest.xml │ └── java │ └── org │ └── infobip │ └── reactlibrary │ └── mobilemessaging │ ├── CacheManager.java │ ├── ChatCustomization.java │ ├── ConfigCache.java │ ├── Configuration.java │ ├── PermissionsRequestManager.java │ ├── RNMMChatModule.java │ ├── RNMMChatViewManager.java │ ├── RNMMWebRTCUI.java │ ├── ReactChatView.java │ ├── ReactNativeEvent.java │ ├── ReactNativeMobileMessagingModule.java │ ├── ReactNativeMobileMessagingPackage.java │ ├── Utils.java │ └── datamappers │ └── ReactNativeJson.java ├── babel.config.js ├── infobip-mobile-messaging-react-native-plugin.podspec ├── ios ├── MobileMessagingPlugin │ ├── RNMMChat.swift │ ├── RNMMChatBridge.m │ ├── RNMMChatCustomization.swift │ ├── RNMMChatViewManager.swift │ ├── RNMMChatViewManagerBridge.m │ ├── RNMMWebRTCUI.swift │ ├── RNMMWebRTCUIBridge.m │ ├── RNMobileMessaging.swift │ ├── RNMobileMessagingBridge.m │ ├── RNMobileMessagingConfiguration.swift │ ├── RNMobileMessagingErrorExtension.swift │ ├── RNMobileMessagingEventsManager.swift │ ├── RNMobileMessagingStorageAdapter.swift │ └── RNMobileMessagingUtils.swift ├── ReactNativeMobileMessaging-Bridging-Header.h └── ReactNativeMobileMessaging.xcodeproj │ └── project.pbxproj ├── newversion ├── package.json ├── release.sh └── src ├── components └── RNMMChatViewNativeComponent.js ├── index.d.ts └── index.js /.gitignore: -------------------------------------------------------------------------------- 1 | # OSX 2 | # 3 | .DS_Store 4 | 5 | # node.js 6 | # 7 | node_modules/ 8 | npm-debug.log 9 | yarn-error.log 10 | 11 | # Xcode 12 | # 13 | build/ 14 | *.pbxuser 15 | !default.pbxuser 16 | *.mode1v3 17 | !default.mode1v3 18 | *.mode2v3 19 | !default.mode2v3 20 | *.perspectivev3 21 | !default.perspectivev3 22 | xcuserdata 23 | *.xccheckout 24 | *.moved-aside 25 | DerivedData 26 | *.hmap 27 | *.ipa 28 | *.xcuserstate 29 | project.xcworkspace 30 | 31 | # Android/IntelliJ 32 | # 33 | build/ 34 | .idea 35 | .gradle 36 | local.properties 37 | *.iml 38 | 39 | # BUCK 40 | buck-out/ 41 | \.buckd/ 42 | *.keystore 43 | ios/Pods 44 | Podfile.lock 45 | *.tgz 46 | package-lock.json 47 | -------------------------------------------------------------------------------- /.npmignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | *.log 3 | npm-debug.log 4 | 5 | # Dependency directory 6 | node_modules 7 | 8 | # Runtime data 9 | tmp 10 | 11 | # Examples (If applicable to your project) 12 | Example 13 | BasicExample 14 | -------------------------------------------------------------------------------- /.ruby-version: -------------------------------------------------------------------------------- 1 | 2.7.8 2 | -------------------------------------------------------------------------------- /.swift-version: -------------------------------------------------------------------------------- 1 | 5 -------------------------------------------------------------------------------- /BasicExample/.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | root: true, 3 | extends: '@react-native', 4 | }; 5 | -------------------------------------------------------------------------------- /BasicExample/.gitignore: -------------------------------------------------------------------------------- 1 | # OSX 2 | # 3 | .DS_Store 4 | 5 | # Xcode 6 | # 7 | build/ 8 | *.pbxuser 9 | !default.pbxuser 10 | *.mode1v3 11 | !default.mode1v3 12 | *.mode2v3 13 | !default.mode2v3 14 | *.perspectivev3 15 | !default.perspectivev3 16 | xcuserdata 17 | *.xccheckout 18 | *.moved-aside 19 | DerivedData 20 | *.hmap 21 | *.ipa 22 | *.xcuserstate 23 | ios/.xcode.env.local 24 | 25 | # Android/IntelliJ 26 | # 27 | build/ 28 | .idea 29 | .gradle 30 | local.properties 31 | *.iml 32 | *.hprof 33 | .cxx/ 34 | *.keystore 35 | !debug.keystore 36 | 37 | # node.js 38 | # 39 | node_modules/ 40 | npm-debug.log 41 | yarn-error.log 42 | 43 | # fastlane 44 | # 45 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the 46 | # screenshots whenever they are needed. 47 | # For more information about the recommended setup visit: 48 | # https://docs.fastlane.tools/best-practices/source-control/ 49 | 50 | **/fastlane/report.xml 51 | **/fastlane/Preview.html 52 | **/fastlane/screenshots 53 | **/fastlane/test_output 54 | 55 | # Bundle artifact 56 | *.jsbundle 57 | 58 | # Ruby / CocoaPods 59 | /ios/Pods/ 60 | /vendor/bundle/ 61 | 62 | # Temporary files created by Metro to check the health of the file watcher 63 | .metro-health-check* 64 | 65 | # testing 66 | /coverage 67 | -------------------------------------------------------------------------------- /BasicExample/.prettierrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | arrowParens: 'avoid', 3 | bracketSameLine: true, 4 | bracketSpacing: false, 5 | singleQuote: true, 6 | trailingComma: 'all', 7 | }; 8 | -------------------------------------------------------------------------------- /BasicExample/.watchmanconfig: -------------------------------------------------------------------------------- 1 | {} 2 | -------------------------------------------------------------------------------- /BasicExample/App.tsx: -------------------------------------------------------------------------------- 1 | import React, {useEffect} from 'react'; 2 | import { 3 | Button, 4 | EmitterSubscription, 5 | ScrollView, 6 | StyleSheet, 7 | View, 8 | } from 'react-native'; 9 | import { 10 | mobileMessaging, 11 | MobileMessagingReactNative, 12 | } from 'infobip-mobile-messaging-react-native-plugin'; 13 | 14 | function App(): React.JSX.Element { 15 | let subscriptions: EmitterSubscription[]; 16 | subscriptions = []; 17 | 18 | useEffect(() => { 19 | mobileMessaging.supportedEvents.forEach(event => { 20 | let subscription = mobileMessaging.subscribe(event, eventData => 21 | handleMobileMessagingEvent(eventData), 22 | ); 23 | subscriptions.push(subscription); 24 | }); 25 | }, [subscriptions]); 26 | 27 | useEffect(() => { 28 | return () => { 29 | subscriptions.forEach(subscription => { 30 | mobileMessaging.unsubscribe(subscription); 31 | }); 32 | }; 33 | }, [subscriptions]); 34 | 35 | let handleMobileMessagingEvent = (value: any) => { 36 | console.log('Event: ' + JSON.stringify(value)); 37 | }; 38 | 39 | mobileMessaging.init( 40 | { 41 | inAppChatEnabled: false, 42 | defaultMessageStorage: false, 43 | applicationCode: 'Your application code', 44 | ios: { 45 | notificationTypes: ['alert', 'badge', 'sound'], 46 | logging: true, 47 | }, 48 | android: { 49 | // For manual integration 50 | // firebaseOptions: { 51 | // apiKey: 'apiKey', 52 | // applicationId: 'applicationId', 53 | // projectId: 'projectId', 54 | // }, 55 | }, 56 | }, 57 | () => { 58 | console.log('MobileMessaging started'); 59 | }, 60 | (error: MobileMessagingReactNative.MobileMessagingError) => { 61 | console.log('MobileMessaging error: ', error); 62 | }, 63 | ); 64 | 65 | return ( 66 | 69 | 75 | 76 |