├── .babelrc ├── .buckconfig ├── .flowconfig ├── .gitattributes ├── .gitignore ├── .watchmanconfig ├── README.md ├── __tests__ ├── channels.js ├── index.js └── messages.js ├── android ├── app │ ├── BUCK │ ├── build.gradle │ ├── build_defs.bzl │ ├── google-services.example.json │ ├── proguard-rules.pro │ └── src │ │ ├── debug │ │ ├── AndroidManifest.xml │ │ └── res │ │ │ └── xml │ │ │ └── react_native_config.xml │ │ └── main │ │ ├── AndroidManifest.xml │ │ ├── java │ │ └── com │ │ │ └── twiliochatjsreactnative │ │ │ ├── FCMParsePushService.java │ │ │ ├── FirebaseSupportModule.java │ │ │ ├── MainActivity.java │ │ │ ├── MainApplication.java │ │ │ ├── NativeModulesReactPackage.java │ │ │ ├── ReactNativeFirebaseMsgService.java │ │ │ └── TwilioFCMNotificationPayload.java │ │ └── res │ │ ├── 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 ├── keystores │ ├── BUCK │ └── debug.keystore.properties └── settings.gradle ├── app.js ├── app.json ├── babel.config.js ├── configuration.example.json ├── index.js ├── ios ├── TwilioChatJsReactNative-tvOS │ └── Info.plist ├── TwilioChatJsReactNative-tvOSTests │ └── Info.plist ├── TwilioChatJsReactNative.xcodeproj │ ├── project.pbxproj │ └── xcshareddata │ │ └── xcschemes │ │ ├── TwilioChatJsReactNative-tvOS.xcscheme │ │ └── TwilioChatJsReactNative.xcscheme ├── TwilioChatJsReactNative │ ├── AppDelegate.h │ ├── AppDelegate.m │ ├── Base.lproj │ │ └── LaunchScreen.xib │ ├── Images.xcassets │ │ ├── AppIcon.appiconset │ │ │ └── Contents.json │ │ └── Contents.json │ ├── Info.plist │ ├── TwilioChatJsReactNative.entitlements │ └── main.m └── TwilioChatJsReactNativeTests │ ├── Info.plist │ └── TwilioChatJsReactNativeTests.m ├── js ├── ApnsSupportModule.js ├── FCMParsePush.js ├── FirebaseSupportModule.js ├── chat-client-helper.js ├── components │ ├── Button.js │ ├── Container.js │ ├── EventsLog.js │ ├── Label.js │ └── Login.js ├── logging.js └── token-provider.js ├── metro.config.js ├── package-lock.json └── package.json /.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": ["module:metro-react-native-babel-preset"] 3 | } 4 | -------------------------------------------------------------------------------- /.buckconfig: -------------------------------------------------------------------------------- 1 | 2 | [android] 3 | target = Google Inc.:Google APIs:23 4 | 5 | [maven_repositories] 6 | central = https://repo1.maven.org/maven2 7 | -------------------------------------------------------------------------------- /.flowconfig: -------------------------------------------------------------------------------- 1 | [ignore] 2 | ; We fork some components by platform 3 | .*/*[.]android.js 4 | 5 | ; Ignore "BUCK" generated dirs 6 | /\.buckd/ 7 | 8 | ; Ignore unexpected extra "@providesModule" 9 | .*/node_modules/.*/node_modules/fbjs/.* 10 | 11 | ; Ignore duplicate module providers 12 | ; For RN Apps installed via npm, "Libraries" folder is inside 13 | ; "node_modules/react-native" but in the source repo it is in the root 14 | .*/Libraries/react-native/React.js 15 | 16 | ; Ignore polyfills 17 | .*/Libraries/polyfills/.* 18 | 19 | ; Ignore metro 20 | .*/node_modules/metro/.* 21 | 22 | [include] 23 | 24 | [libs] 25 | node_modules/react-native/Libraries/react-native/react-native-interface.js 26 | node_modules/react-native/flow/ 27 | 28 | [options] 29 | emoji=true 30 | 31 | esproposal.optional_chaining=enable 32 | esproposal.nullish_coalescing=enable 33 | 34 | module.system=haste 35 | module.system.haste.use_name_reducers=true 36 | # get basename 37 | module.system.haste.name_reducers='^.*/\([a-zA-Z0-9$_.-]+\.js\(\.flow\)?\)$' -> '\1' 38 | # strip .js or .js.flow suffix 39 | module.system.haste.name_reducers='^\(.*\)\.js\(\.flow\)?$' -> '\1' 40 | # strip .ios suffix 41 | module.system.haste.name_reducers='^\(.*\)\.ios$' -> '\1' 42 | module.system.haste.name_reducers='^\(.*\)\.android$' -> '\1' 43 | module.system.haste.name_reducers='^\(.*\)\.native$' -> '\1' 44 | module.system.haste.paths.blacklist=.*/__tests__/.* 45 | module.system.haste.paths.blacklist=.*/__mocks__/.* 46 | module.system.haste.paths.blacklist=/node_modules/react-native/Libraries/Animated/src/polyfills/.* 47 | module.system.haste.paths.whitelist=/node_modules/react-native/Libraries/.* 48 | 49 | munge_underscores=true 50 | 51 | module.name_mapper='^[./a-zA-Z0-9$_-]+\.\(bmp\|gif\|jpg\|jpeg\|png\|psd\|svg\|webp\|m4v\|mov\|mp4\|mpeg\|mpg\|webm\|aac\|aiff\|caf\|m4a\|mp3\|wav\|html\|pdf\)$' -> 'RelativeImageStub' 52 | 53 | module.file_ext=.js 54 | module.file_ext=.jsx 55 | module.file_ext=.json 56 | module.file_ext=.native.js 57 | 58 | suppress_type=$FlowIssue 59 | suppress_type=$FlowFixMe 60 | suppress_type=$FlowFixMeProps 61 | suppress_type=$FlowFixMeState 62 | 63 | suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\) 64 | suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)?:? #[0-9]+ 65 | suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy 66 | suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError 67 | 68 | [version] 69 | ^0.92.0 70 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | *.pbxproj -text 2 | -------------------------------------------------------------------------------- /.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 | project.xcworkspace 24 | 25 | # Android/IntelliJ 26 | # 27 | build/ 28 | .idea 29 | .gradle 30 | local.properties 31 | *.iml 32 | 33 | # node.js 34 | # 35 | node_modules/ 36 | npm-debug.log 37 | yarn-error.log 38 | 39 | # BUCK 40 | buck-out/ 41 | \.buckd/ 42 | *.keystore 43 | 44 | # fastlane 45 | # 46 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the 47 | # screenshots whenever they are needed. 48 | # For more information about the recommended setup visit: 49 | # https://docs.fastlane.tools/best-practices/source-control/ 50 | 51 | */fastlane/report.xml 52 | */fastlane/Preview.html 53 | */fastlane/screenshots 54 | 55 | # Bundle artifact 56 | *.jsbundle 57 | configuration.json 58 | google-services.json 59 | certificates 60 | gradle.release.properties 61 | -------------------------------------------------------------------------------- /.watchmanconfig: -------------------------------------------------------------------------------- 1 | {} -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Twilio Chat support has ended 2 | 3 | Please migrate to Twilio Conversations, a drop-in replacement for Chat, see the [Conversations React Demo App](https://github.com/twilio/twilio-conversations-demo-react). 4 | -------------------------------------------------------------------------------- /__tests__/channels.js: -------------------------------------------------------------------------------- 1 | import 'react-native'; 2 | import React from 'react'; 3 | import { Client as TwilioChatClient } from "twilio-chat"; 4 | 5 | const TokenProvider = require('../js/token-provider'); 6 | 7 | const clientOptions = { logLevel: 'silent' }; 8 | 9 | describe('Channels', function() { 10 | let clientAlice : TwilioChatClient = null; 11 | let clientBob : TwilioChatClient = null; 12 | 13 | beforeAll(async () => { 14 | let aliceToken = TokenProvider.getToken('alicetestuser', null); 15 | clientAlice = await TwilioChatClient.create(aliceToken, clientOptions); 16 | 17 | let bobToken = TokenProvider.getToken('bobtestuser', null); 18 | clientBob = await TwilioChatClient.create(bobToken, clientOptions); 19 | }); 20 | 21 | afterAll(async () => { 22 | await clientAlice.shutdown(); 23 | await clientBob.shutdown(); 24 | }); 25 | 26 | describe('Creating, joining channel and then leaving', function() { 27 | let channelUniqueNames = []; 28 | 29 | afterAll(async () => { 30 | for (let channelUniqueName of channelUniqueNames) { 31 | await clientAlice.getChannelByUniqueName(channelUniqueName) 32 | .then(channel => channel.delete()) 33 | .catch(() => { 34 | }); 35 | } 36 | }); 37 | describe('Public channel', function() { 38 | it('Using getByUniqueName in between', async () => { 39 | let channelUniqueName = Math.random().toString(36).replace(/[^a-z]+/g, '').substr(0, 5); 40 | channelUniqueNames.push(channelUniqueName); 41 | 42 | let channel = await clientAlice.createChannel({ 43 | isPrivate: false, 44 | uniqueName: channelUniqueName 45 | }); 46 | await Promise.all([ 47 | new Promise(resolve => { 48 | clientBob.on('channelJoined', joinedChannel => { 49 | if (joinedChannel.sid === channel.sid) { 50 | resolve(); 51 | } 52 | }) 53 | }), 54 | clientBob.getChannelByUniqueName(channelUniqueName).then(channel => channel.join()) 55 | ]); 56 | 57 | await clientBob.getChannelByUniqueName(channelUniqueName).then(channel => channel.leave); 58 | }); 59 | 60 | it('Promise chaining', async () => { 61 | let channelUniqueName = Math.random().toString(36).replace(/[^a-z]+/g, '').substr(0, 5); 62 | channelUniqueNames.push(channelUniqueName); 63 | 64 | await clientAlice.createChannel({ 65 | isPrivate: false, 66 | uniqueName: channelUniqueName 67 | }) 68 | .then(channel => channel.join() 69 | .then(channel => channel.leave())); 70 | }); 71 | }); 72 | 73 | describe('Private channel', function() { 74 | it('Using getByUniqueName in between', async () => { 75 | let channelUniqueName = Math.random().toString(36).replace(/[^a-z]+/g, '').substr(0, 5); 76 | channelUniqueNames.push(channelUniqueName); 77 | 78 | let channel = await clientAlice.createChannel({ 79 | isPrivate: true, 80 | uniqueName: channelUniqueName 81 | }) 82 | .then(channel => channel.join()); 83 | await Promise.all([ 84 | new Promise(resolve => { 85 | clientBob.on('channelJoined', joinedChannel => { 86 | if (joinedChannel.sid === channel.sid) { 87 | resolve(); 88 | } 89 | }) 90 | }), 91 | channel.add(clientBob.user.identity) 92 | ]); 93 | 94 | await clientBob.getChannelByUniqueName(channelUniqueName).then(channel => channel.leave); 95 | }); 96 | 97 | it('Promise chaining', async () => { 98 | let channelUniqueName = Math.random().toString(36).replace(/[^a-z]+/g, '').substr(0, 5); 99 | channelUniqueNames.push(channelUniqueName); 100 | 101 | await clientAlice.createChannel({ 102 | isPrivate: true, 103 | uniqueName: channelUniqueName 104 | }) 105 | .then(channel => channel.join() 106 | .then(channel => channel.leave())); 107 | }); 108 | }); 109 | }); 110 | }); 111 | 112 | -------------------------------------------------------------------------------- /__tests__/index.js: -------------------------------------------------------------------------------- 1 | import 'react-native'; 2 | import React from 'react'; 3 | import Index from '../index.js'; 4 | 5 | // Note: test renderer must be required after react-native. 6 | import renderer from 'react-test-renderer'; 7 | 8 | it('renders correctly', () => { 9 | const tree = renderer.create( 10 | 11 | ); 12 | }); 13 | -------------------------------------------------------------------------------- /__tests__/messages.js: -------------------------------------------------------------------------------- 1 | import 'react-native'; 2 | import React from 'react'; 3 | import { Client as TwilioChatClient } from "twilio-chat"; 4 | 5 | const TokenProvider = require('../js/token-provider'); 6 | 7 | const clientOptions = { logLevel: 'silent' }; 8 | 9 | describe('Messages', function() { 10 | let clientAlice : TwilioChatClient = null; 11 | let clientBob : TwilioChatClient = null; 12 | 13 | beforeAll(async () => { 14 | let aliceToken = TokenProvider.getToken('alicetestuser', null); 15 | clientAlice = await TwilioChatClient.create(aliceToken, clientOptions); 16 | 17 | let bobToken = TokenProvider.getToken('bobtestuser', null); 18 | clientBob = await TwilioChatClient.create(bobToken, clientOptions); 19 | }); 20 | 21 | afterAll(async () => { 22 | await clientAlice.shutdown(); 23 | await clientBob.shutdown(); 24 | }); 25 | 26 | describe('Rapid message send', function() { 27 | 28 | describe('Same client', function() { 29 | 30 | const messagesToSend = 5; 31 | 32 | let channel = null; 33 | 34 | beforeAll(async () => { 35 | channel = await clientAlice.createChannel().then(channel => channel.join()); 36 | }); 37 | 38 | afterAll(async () => { 39 | await channel.delete(); 40 | }); 41 | 42 | let receivedMessageIndexes = Array.from(Array(messagesToSend).keys()); 43 | let sentMessageIndexes = Array.from(Array(messagesToSend).keys()); 44 | 45 | it('Send and receive ' + messagesToSend + ' messages', async () => { 46 | jest.setTimeout(10000); 47 | 48 | let promises : Promise[] = [ 49 | new Promise(resolve => { 50 | let messageCount = 0; 51 | channel.on('messageAdded', message => { 52 | let index = receivedMessageIndexes.indexOf(message.index); 53 | if (index !== -1) { 54 | receivedMessageIndexes.splice(index, 1); 55 | } else { 56 | throw new Error('Got duplicate messageAdded with index ' + message.index); 57 | } 58 | messageCount++; 59 | 60 | if (messageCount === messagesToSend) { 61 | resolve(); 62 | } 63 | }); 64 | }) 65 | ]; 66 | 67 | for (let i = 0; i < messagesToSend; i++) { 68 | promises.push(channel.sendMessage('message' + i).then(messageIndex => { 69 | let index = sentMessageIndexes.indexOf(messageIndex); 70 | if (index !== -1) { 71 | sentMessageIndexes.splice(index, 1); 72 | } else { 73 | throw new Error( 74 | 'Got unexpected message index ' + messageIndex + ' when sending message (duplicate or out of range)'); 75 | } 76 | })); 77 | } 78 | 79 | await Promise.all(promises); 80 | }); 81 | 82 | it('Verify message indexes left to receive', async () => { 83 | if (receivedMessageIndexes.length > 0) { 84 | throw new Error( 85 | 'Expected received messages indexes array to be empty. Indexes left: ' + receivedMessageIndexes.join(' ')); 86 | } 87 | }); 88 | 89 | it('Verify message indexes left to send', async () => { 90 | if (sentMessageIndexes.length > 0) { 91 | throw new Error( 92 | 'Expected sent messages indexes array to be empty. Indexes left: ' + sentMessageIndexes.join(' ')); 93 | } 94 | }); 95 | }); 96 | 97 | describe('Different clients', function() { 98 | 99 | const messagesToSend = 5; 100 | 101 | let aliceChannel = null; 102 | let bobChannel = null; 103 | 104 | beforeAll(async () => { 105 | aliceChannel = await clientAlice.createChannel().then(channel => channel.join()); 106 | bobChannel = await clientBob.getChannelBySid(aliceChannel.sid).then(channel => channel.join()); 107 | }); 108 | 109 | afterAll(async () => { 110 | await aliceChannel.delete(); 111 | }); 112 | 113 | let receivedMessageIndexes = Array.from(Array(messagesToSend).keys()); 114 | let sentMessageIndexes = Array.from(Array(messagesToSend).keys()); 115 | 116 | it('Send and receive ' + messagesToSend + ' messages', async () => { 117 | jest.setTimeout(10000); 118 | 119 | let promises : Promise[] = [ 120 | new Promise(resolve => { 121 | let messageCount = 0; 122 | bobChannel.on('messageAdded', message => { 123 | let index = receivedMessageIndexes.indexOf(message.index); 124 | if (index !== -1) { 125 | receivedMessageIndexes.splice(index, 1); 126 | } else { 127 | throw new Error('Got duplicate messageAdded with index ' + message.index); 128 | } 129 | messageCount++; 130 | 131 | if (messageCount === messagesToSend) { 132 | resolve(); 133 | } 134 | }); 135 | }) 136 | ]; 137 | 138 | for (let i = 0; i < messagesToSend; i++) { 139 | promises.push(aliceChannel.sendMessage('message' + i).then(messageIndex => { 140 | let index = sentMessageIndexes.indexOf(messageIndex); 141 | if (index !== -1) { 142 | sentMessageIndexes.splice(index, 1); 143 | } else { 144 | throw new Error( 145 | 'Got unexpected message index ' + messageIndex + ' when sending message (duplicate or out of range)'); 146 | } 147 | })); 148 | } 149 | 150 | await Promise.all(promises); 151 | }); 152 | 153 | it('Verify message indexes left to receive', async () => { 154 | if (receivedMessageIndexes.length > 0) { 155 | throw new Error( 156 | 'Expected received messages indexes array to be empty. Indexes left: ' + receivedMessageIndexes.join(' ')); 157 | } 158 | }); 159 | 160 | it('Verify message indexes left to send', async () => { 161 | if (sentMessageIndexes.length > 0) { 162 | throw new Error( 163 | 'Expected sent messages indexes array to be empty. Indexes left: ' + sentMessageIndexes.join(' ')); 164 | } 165 | }); 166 | }); 167 | }); 168 | }); 169 | 170 | 171 | -------------------------------------------------------------------------------- /android/app/BUCK: -------------------------------------------------------------------------------- 1 | # To learn about Buck see [Docs](https://buckbuild.com/). 2 | # To run your application with Buck: 3 | # - install Buck 4 | # - `npm start` - to start the packager 5 | # - `cd android` 6 | # - `keytool -genkey -v -keystore keystores/debug.keystore -storepass android -alias androiddebugkey -keypass android -dname "CN=Android Debug,O=Android,C=US"` 7 | # - `./gradlew :app:copyDownloadableDepsToLibs` - make all Gradle compile dependencies available to Buck 8 | # - `buck install -r android/app` - compile, install and run application 9 | # 10 | 11 | load(":build_defs.bzl", "create_aar_targets", "create_jar_targets") 12 | 13 | lib_deps = [] 14 | 15 | create_aar_targets(glob(["libs/*.aar"])) 16 | 17 | create_jar_targets(glob(["libs/*.jar"])) 18 | 19 | android_library( 20 | name = "all-libs", 21 | exported_deps = lib_deps, 22 | ) 23 | 24 | android_library( 25 | name = "app-code", 26 | srcs = glob([ 27 | "src/main/java/**/*.java", 28 | ]), 29 | deps = [ 30 | ":all-libs", 31 | ":build_config", 32 | ":res", 33 | ], 34 | ) 35 | 36 | android_build_config( 37 | name = "build_config", 38 | package = "com.twiliochatjsreactnative", 39 | ) 40 | 41 | android_resource( 42 | name = "res", 43 | package = "com.twiliochatjsreactnative", 44 | res = "src/main/res", 45 | ) 46 | 47 | android_binary( 48 | name = "app", 49 | keystore = "//android/keystores:debug", 50 | manifest = "src/main/AndroidManifest.xml", 51 | package_type = "debug", 52 | deps = [ 53 | ":app-code", 54 | ], 55 | ) 56 | -------------------------------------------------------------------------------- /android/app/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: "com.android.application" 2 | 3 | import com.android.build.OutputFile 4 | 5 | /** 6 | * The react.gradle file registers a task for each build variant (e.g. bundleDebugJsAndAssets 7 | * and bundleReleaseJsAndAssets). 8 | * These basically call `react-native bundle` with the correct arguments during the Android build 9 | * cycle. By default, bundleDebugJsAndAssets is skipped, as in debug/dev mode we prefer to load the 10 | * bundle directly from the development server. Below you can see all the possible configurations 11 | * and their defaults. If you decide to add a configuration block, make sure to add it before the 12 | * `apply from: "../../node_modules/react-native/react.gradle"` line. 13 | * 14 | * project.ext.react = [ 15 | * // the name of the generated asset file containing your JS bundle 16 | * bundleAssetName: "index.android.bundle", 17 | * 18 | * // the entry file for bundle generation 19 | * entryFile: "index.android.js", 20 | * 21 | * // whether to bundle JS and assets in debug mode 22 | * bundleInDebug: false, 23 | * 24 | * // whether to bundle JS and assets in release mode 25 | * bundleInRelease: true, 26 | * 27 | * // whether to bundle JS and assets in another build variant (if configured). 28 | * // See http://tools.android.com/tech-docs/new-build-system/user-guide#TOC-Build-Variants 29 | * // The configuration property can be in the following formats 30 | * // 'bundleIn${productFlavor}${buildType}' 31 | * // 'bundleIn${buildType}' 32 | * // bundleInFreeDebug: true, 33 | * // bundleInPaidRelease: true, 34 | * // bundleInBeta: true, 35 | * 36 | * // whether to disable dev mode in custom build variants (by default only disabled in release) 37 | * // for example: to disable dev mode in the staging build type (if configured) 38 | * devDisabledInStaging: true, 39 | * // The configuration property can be in the following formats 40 | * // 'devDisabledIn${productFlavor}${buildType}' 41 | * // 'devDisabledIn${buildType}' 42 | * 43 | * // the root of your project, i.e. where "package.json" lives 44 | * root: "../../", 45 | * 46 | * // where to put the JS bundle asset in debug mode 47 | * jsBundleDirDebug: "$buildDir/intermediates/assets/debug", 48 | * 49 | * // where to put the JS bundle asset in release mode 50 | * jsBundleDirRelease: "$buildDir/intermediates/assets/release", 51 | * 52 | * // where to put drawable resources / React Native assets, e.g. the ones you use via 53 | * // require('./image.png')), in debug mode 54 | * resourcesDirDebug: "$buildDir/intermediates/res/merged/debug", 55 | * 56 | * // where to put drawable resources / React Native assets, e.g. the ones you use via 57 | * // require('./image.png')), in release mode 58 | * resourcesDirRelease: "$buildDir/intermediates/res/merged/release", 59 | * 60 | * // by default the gradle tasks are skipped if none of the JS files or assets change; this means 61 | * // that we don't look at files in android/ or ios/ to determine whether the tasks are up to 62 | * // date; if you have any other folders that you want to ignore for performance reasons (gradle 63 | * // indexes the entire tree), add them here. Alternatively, if you have JS files in android/ 64 | * // for example, you might want to remove it from here. 65 | * inputExcludes: ["android/**", "ios/**"], 66 | * 67 | * // override which node gets called and with what additional arguments 68 | * nodeExecutableAndArgs: ["node"], 69 | * 70 | * // supply additional arguments to the packager 71 | * extraPackagerArgs: [] 72 | * ] 73 | */ 74 | 75 | project.ext.react = [ 76 | entryFile: "index.js" 77 | ] 78 | 79 | apply from: "../../node_modules/react-native/react.gradle" 80 | 81 | /** 82 | * Set this to true to create two separate APKs instead of one: 83 | * - An APK that only works on ARM devices 84 | * - An APK that only works on x86 devices 85 | * The advantage is the size of the APK is reduced by about 4MB. 86 | * Upload all the APKs to the Play Store and people will download 87 | * the correct one based on the CPU architecture of their device. 88 | */ 89 | def enableSeparateBuildPerCPUArchitecture = false 90 | 91 | /** 92 | * Run Proguard to shrink the Java bytecode in release builds. 93 | */ 94 | def enableProguardInReleaseBuilds = false 95 | 96 | android { 97 | compileSdkVersion rootProject.ext.compileSdkVersion 98 | 99 | compileOptions { 100 | sourceCompatibility JavaVersion.VERSION_1_8 101 | targetCompatibility JavaVersion.VERSION_1_8 102 | } 103 | 104 | defaultConfig { 105 | applicationId "com.twiliochatjsreactnative" 106 | minSdkVersion rootProject.ext.minSdkVersion 107 | targetSdkVersion rootProject.ext.targetSdkVersion 108 | versionCode 1 109 | versionName "1.0" 110 | } 111 | signingConfigs { 112 | release { 113 | if (project.hasProperty('TWILIOCHATJSREACTNATIVE_RELEASE_STORE_FILE')) { 114 | storeFile file(TWILIOCHATJSREACTNATIVE_RELEASE_STORE_FILE) 115 | storePassword TWILIOCHATJSREACTNATIVE_RELEASE_STORE_PASSWORD 116 | keyAlias TWILIOCHATJSREACTNATIVE_RELEASE_KEY_ALIAS 117 | keyPassword TWILIOCHATJSREACTNATIVE_RELEASE_KEY_PASSWORD 118 | } 119 | } 120 | } 121 | splits { 122 | abi { 123 | reset() 124 | enable enableSeparateBuildPerCPUArchitecture 125 | universalApk false // If true, also generate a universal APK 126 | include "armeabi-v7a", "x86", "arm64-v8a", "x86_64" 127 | } 128 | } 129 | buildTypes { 130 | release { 131 | minifyEnabled enableProguardInReleaseBuilds 132 | proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro" 133 | signingConfig signingConfigs.release 134 | } 135 | } 136 | // applicationVariants are e.g. debug, release 137 | applicationVariants.all { variant -> 138 | variant.outputs.each { output -> 139 | // For each separate APK per architecture, set a unique version code as described here: 140 | // http://tools.android.com/tech-docs/new-build-system/user-guide/apk-splits 141 | def versionCodes = ["armeabi-v7a":1, "x86":2, "arm64-v8a": 3, "x86_64": 4] 142 | def abi = output.getFilter(OutputFile.ABI) 143 | if (abi != null) { // null for the universal-debug, universal-release variants 144 | output.versionCodeOverride = 145 | versionCodes.get(abi) * 1048576 + defaultConfig.versionCode 146 | } 147 | } 148 | } 149 | } 150 | 151 | dependencies { 152 | implementation fileTree(dir: "libs", include: ["*.jar"]) 153 | implementation "com.android.support:appcompat-v7:${rootProject.ext.supportLibVersion}" 154 | implementation "com.facebook.react:react-native:+" // From node_modules 155 | implementation "com.google.android.gms:play-services-base:16.0.1" 156 | implementation "com.google.firebase:firebase-core:16.0.7" 157 | implementation "com.google.firebase:firebase-messaging:17.4.0" 158 | } 159 | 160 | // Run this once to be able to run the application with BUCK 161 | // puts all compile dependencies into folder libs for BUCK to use 162 | task copyDownloadableDepsToLibs(type: Copy) { 163 | from configurations.compile 164 | into 'libs' 165 | } 166 | 167 | apply plugin: 'com.google.gms.google-services' 168 | -------------------------------------------------------------------------------- /android/app/build_defs.bzl: -------------------------------------------------------------------------------- 1 | """Helper definitions to glob .aar and .jar targets""" 2 | 3 | def create_aar_targets(aarfiles): 4 | for aarfile in aarfiles: 5 | name = "aars__" + aarfile[aarfile.rindex("/") + 1:aarfile.rindex(".aar")] 6 | lib_deps.append(":" + name) 7 | android_prebuilt_aar( 8 | name = name, 9 | aar = aarfile, 10 | ) 11 | 12 | def create_jar_targets(jarfiles): 13 | for jarfile in jarfiles: 14 | name = "jars__" + jarfile[jarfile.rindex("/") + 1:jarfile.rindex(".jar")] 15 | lib_deps.append(":" + name) 16 | prebuilt_jar( 17 | name = name, 18 | binary_jar = jarfile, 19 | ) 20 | -------------------------------------------------------------------------------- /android/app/google-services.example.json: -------------------------------------------------------------------------------- 1 | { 2 | 3 | } -------------------------------------------------------------------------------- /android/app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in /usr/local/Cellar/android-sdk/24.3.3/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | 12 | # If your project uses WebView with JS, uncomment the following 13 | # and specify the fully qualified class name to the JavaScript interface 14 | # class: 15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 16 | # public *; 17 | #} 18 | -------------------------------------------------------------------------------- /android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /android/app/src/debug/res/xml/react_native_config.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | localhost 5 | 10.0.2.2 6 | 10.0.3.2 7 | 8 | 9 | -------------------------------------------------------------------------------- /android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 18 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /android/app/src/main/java/com/twiliochatjsreactnative/FCMParsePushService.java: -------------------------------------------------------------------------------- 1 | package com.twiliochatjsreactnative; 2 | 3 | import android.content.Intent; 4 | import android.os.Bundle; 5 | import com.facebook.react.HeadlessJsTaskService; 6 | import com.facebook.react.bridge.Arguments; 7 | import com.facebook.react.jstasks.HeadlessJsTaskConfig; 8 | 9 | public class FCMParsePushService extends HeadlessJsTaskService { 10 | 11 | @Override 12 | protected HeadlessJsTaskConfig getTaskConfig(Intent intent) { 13 | Bundle extras = intent.getExtras(); 14 | if (extras != null) { 15 | return new HeadlessJsTaskConfig( 16 | "FCMParsePush", 17 | Arguments.fromBundle(extras), 18 | 5000, 19 | true); 20 | } 21 | return null; 22 | } 23 | } -------------------------------------------------------------------------------- /android/app/src/main/java/com/twiliochatjsreactnative/FirebaseSupportModule.java: -------------------------------------------------------------------------------- 1 | package com.twiliochatjsreactnative; 2 | 3 | import android.content.BroadcastReceiver; 4 | import android.content.Context; 5 | import android.content.Intent; 6 | import android.content.IntentFilter; 7 | import android.os.Bundle; 8 | import com.facebook.react.bridge.*; 9 | import com.facebook.react.modules.core.DeviceEventManagerModule; 10 | import com.google.firebase.iid.FirebaseInstanceId; 11 | 12 | public class FirebaseSupportModule extends ReactContextBaseJavaModule { 13 | 14 | 15 | public FirebaseSupportModule(ReactApplicationContext reactContext) { 16 | super(reactContext); 17 | registerOnFcmMessageReceiver(); 18 | } 19 | 20 | public void registerOnFcmMessageReceiver() { 21 | final FirebaseSupportModule firebaseSupportModule = this; 22 | IntentFilter intentFilter = new IntentFilter("com.twiliochatjsreactnative.onFcmMessage"); 23 | getReactApplicationContext().registerReceiver(new BroadcastReceiver() { 24 | @Override 25 | public void onReceive(Context context, Intent intent) { 26 | Bundle extras = intent.getExtras(); 27 | getReactApplicationContext() 28 | .getJSModule(DeviceEventManagerModule.RCTDeviceEventEmitter.class) 29 | .emit("fcmNotificationToJs", Arguments.fromBundle(intent.getExtras())); 30 | } 31 | }, intentFilter); 32 | } 33 | 34 | @Override 35 | public String getName() { 36 | return "FirebaseSupportModule"; 37 | } 38 | 39 | @ReactMethod 40 | public void getFcmToken(Promise promise) { 41 | if (FirebaseInstanceId.getInstance().getToken() != null) { 42 | promise.resolve(FirebaseInstanceId.getInstance().getToken()); 43 | } else { 44 | promise.reject("No token available"); 45 | } 46 | } 47 | } -------------------------------------------------------------------------------- /android/app/src/main/java/com/twiliochatjsreactnative/MainActivity.java: -------------------------------------------------------------------------------- 1 | package com.twiliochatjsreactnative; 2 | 3 | import com.facebook.react.ReactActivity; 4 | 5 | public class MainActivity extends ReactActivity { 6 | 7 | /** 8 | * Returns the name of the main component registered from JavaScript. 9 | * This is used to schedule rendering of the component. 10 | */ 11 | @Override 12 | protected String getMainComponentName() { 13 | return "TwilioChatJsReactNative"; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /android/app/src/main/java/com/twiliochatjsreactnative/MainApplication.java: -------------------------------------------------------------------------------- 1 | package com.twiliochatjsreactnative; 2 | 3 | import android.app.Application; 4 | 5 | import com.facebook.react.ReactApplication; 6 | import com.facebook.react.ReactNativeHost; 7 | import com.facebook.react.ReactPackage; 8 | import com.facebook.react.shell.MainReactPackage; 9 | import com.facebook.soloader.SoLoader; 10 | 11 | import java.util.Arrays; 12 | import java.util.List; 13 | 14 | public class MainApplication extends Application implements ReactApplication { 15 | 16 | private final ReactNativeHost mReactNativeHost = new ReactNativeHost(this) { 17 | @Override 18 | public boolean getUseDeveloperSupport() { 19 | return BuildConfig.DEBUG; 20 | } 21 | 22 | @Override 23 | protected List getPackages() { 24 | return Arrays.asList( 25 | new MainReactPackage(), 26 | new NativeModulesReactPackage() 27 | ); 28 | } 29 | 30 | @Override 31 | protected String getJSMainModuleName() { 32 | return "index"; 33 | } 34 | }; 35 | 36 | @Override 37 | public ReactNativeHost getReactNativeHost() { 38 | return mReactNativeHost; 39 | } 40 | 41 | @Override 42 | public void onCreate() { 43 | super.onCreate(); 44 | SoLoader.init(this, /* native exopackage */ false); 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /android/app/src/main/java/com/twiliochatjsreactnative/NativeModulesReactPackage.java: -------------------------------------------------------------------------------- 1 | package com.twiliochatjsreactnative; 2 | 3 | import com.facebook.react.ReactPackage; 4 | import com.facebook.react.bridge.JavaScriptModule; 5 | import com.facebook.react.bridge.NativeModule; 6 | import com.facebook.react.bridge.ReactApplicationContext; 7 | import com.facebook.react.uimanager.ViewManager; 8 | 9 | import java.util.ArrayList; 10 | import java.util.Collections; 11 | import java.util.List; 12 | 13 | public class NativeModulesReactPackage implements ReactPackage { 14 | 15 | // @Override 16 | // public List> createJSModules() { 17 | // return Collections.emptyList(); 18 | // } 19 | 20 | @Override 21 | public List createViewManagers(ReactApplicationContext reactContext) { 22 | return Collections.emptyList(); 23 | } 24 | 25 | @Override 26 | public List createNativeModules( 27 | ReactApplicationContext reactContext) { 28 | List modules = new ArrayList<>(); 29 | 30 | modules.add(new FirebaseSupportModule(reactContext)); 31 | 32 | return modules; 33 | } 34 | 35 | } -------------------------------------------------------------------------------- /android/app/src/main/java/com/twiliochatjsreactnative/ReactNativeFirebaseMsgService.java: -------------------------------------------------------------------------------- 1 | package com.twiliochatjsreactnative; 2 | 3 | import android.app.Notification; 4 | import android.app.NotificationManager; 5 | import android.app.NotificationChannel; 6 | import android.content.Context; 7 | import android.content.Intent; 8 | import android.os.Bundle; 9 | import android.support.v4.app.NotificationCompat; 10 | import android.util.Log; 11 | import com.facebook.react.bridge.*; 12 | import com.google.firebase.messaging.FirebaseMessagingService; 13 | import com.google.firebase.messaging.RemoteMessage; 14 | import com.twiliochatjsreactnative.TwilioFCMNotificationPayload; 15 | 16 | public class ReactNativeFirebaseMsgService extends FirebaseMessagingService { 17 | 18 | @Override 19 | public void onMessageReceived(RemoteMessage remoteMessage) { 20 | Log.i("ReactNativeFirebaseMsgService", "got new remote message"); 21 | Bundle bundle = remoteMessageToBundle(remoteMessage); 22 | Intent i = new Intent("com.twiliochatjsreactnative.onFcmMessage"); 23 | i.putExtras(bundle); 24 | sendBroadcast(i, null); 25 | 26 | // TwilioFCMNotificationPayload is a helper class to parser Twilio Notify's FCM notification 27 | // more info see here: https://www.twilio.com/ 28 | displayPushInNotififcationArea(new TwilioFCMNotificationPayload(bundle)); 29 | 30 | // if you want to send the raw push to the JS library to reparse 31 | // (while app is not running), you can use this react native pattern to call static JS method 32 | // 33 | // Intent service = new Intent(getApplicationContext(), FCMParsePushService.class); 34 | // service.putExtras(bundle); 35 | // getApplicationContext().startService(service); 36 | } 37 | 38 | private void displayPushInNotififcationArea(TwilioFCMNotificationPayload notificationPayload) { 39 | Log.i("ReactNativeFirebaseMsgService", "Got notification to display: " + notificationPayload.toString()); 40 | 41 | NotificationManager notificationManager = 42 | (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE); 43 | 44 | String channelId = "TwilioChatJsReactNative_default_channel_id"; 45 | String channelDescription = "TwilioChatJsReactNative Default Channel"; 46 | if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.O) { 47 | NotificationChannel notificationChannel = notificationManager.getNotificationChannel(channelId); 48 | if (notificationChannel == null) { 49 | int importance = NotificationManager.IMPORTANCE_HIGH; //Set the importance level 50 | notificationChannel = new NotificationChannel(channelId, channelDescription, importance); 51 | notificationChannel.enableVibration(true); //Set if it is necesssary 52 | notificationManager.createNotificationChannel(notificationChannel); 53 | } 54 | } 55 | 56 | notificationManager.notify(0, new NotificationCompat.Builder(this) 57 | .setSmallIcon(R.mipmap.ic_launcher) 58 | .setContentTitle("TwilioChatJSReactNative") 59 | .setContentText(notificationPayload.getBody()) 60 | .setChannelId(channelId) 61 | .build()); 62 | } 63 | 64 | private Bundle remoteMessageToBundle(RemoteMessage remoteMessage) { 65 | Bundle bundle = new Bundle(); 66 | bundle.putString("collapse_key", remoteMessage.getCollapseKey()); 67 | bundle.putString("from", remoteMessage.getFrom()); 68 | bundle.putString("google.message_id", remoteMessage.getMessageId()); 69 | bundle.putDouble("google.sent_time", remoteMessage.getSentTime()); 70 | if (remoteMessage.getData() != null) { 71 | Bundle data = new Bundle(); 72 | for (String key : remoteMessage.getData().keySet()) { 73 | data.putString(key, remoteMessage.getData().get(key)); 74 | } 75 | bundle.putBundle("data", data); 76 | } 77 | return bundle; 78 | } 79 | } 80 | -------------------------------------------------------------------------------- /android/app/src/main/java/com/twiliochatjsreactnative/TwilioFCMNotificationPayload.java: -------------------------------------------------------------------------------- 1 | package com.twiliochatjsreactnative; 2 | 3 | import android.os.Bundle; 4 | 5 | /** 6 | * Helper accessor for notification data payload bundle as received from Twilio Notifications. 7 | * Use to retrieve Twilio-generated payload fields safely. 8 | */ 9 | public class TwilioFCMNotificationPayload { 10 | /** 11 | * Represents payload type. 12 | * Payload types are defined by Twilio Chat. When you receive a new push notification 13 | * you could check if it is coming from Twilio Chat. 14 | */ 15 | public enum Type { 16 | /** 17 | * Not a Twilio payload. 18 | */ 19 | UNKNOWN(0), 20 | /** 21 | * New message notification. 22 | */ 23 | NEW_MESSAGE(1), 24 | /** 25 | * Channel invite notification. 26 | */ 27 | INVITED_TO_CHANNEL(2), 28 | /** 29 | * Channel add notification. 30 | */ 31 | ADDED_TO_CHANNEL(3), 32 | /** 33 | * Channel remove notification. 34 | */ 35 | REMOVED_FROM_CHANNEL(4); 36 | 37 | private final int value; 38 | 39 | private Type(int value) { 40 | this.value = value; 41 | } 42 | 43 | public static Type fromString(String in) { 44 | if (in.contentEquals("twilio.channel.new_message")) 45 | return NEW_MESSAGE; 46 | if (in.contentEquals("twilio.channel.added_to_channel")) 47 | return ADDED_TO_CHANNEL; 48 | if (in.contentEquals("twilio.channel.invited_to_channel")) 49 | return INVITED_TO_CHANNEL; 50 | if (in.contentEquals("twilio.channel.removed_from_channel")) 51 | return REMOVED_FROM_CHANNEL; 52 | return UNKNOWN; 53 | } 54 | } 55 | 56 | /** 57 | * Create notification payload from the received map. 58 | * 59 | * @param remoteMessage Android FCM RemoteMessage with push notification data as received 60 | * from the system. 61 | */ 62 | public TwilioFCMNotificationPayload(Bundle data) { 63 | if (data.getBundle("data") != null) { 64 | payload = data.getBundle("data"); 65 | } else { 66 | payload = new Bundle(); 67 | } 68 | } 69 | 70 | /** 71 | * Get notification type. 72 | * 73 | * @return received notification type as a {@link Type} enum. 74 | */ 75 | public Type getType() { 76 | if (payload.containsKey("twi_message_type")) { 77 | return Type.fromString(payload.getString("twi_message_type")); 78 | } 79 | return Type.UNKNOWN; 80 | } 81 | 82 | /** 83 | * Get notification author. 84 | * 85 | * @return Message author for NEW_MESSAGE notification type, null otherwise. 86 | */ 87 | public String getAuthor() { 88 | if (payload.containsKey("author")) { 89 | return payload.getString("author"); 90 | } 91 | return null; 92 | } 93 | 94 | /** 95 | * Get notification body. 96 | * 97 | * @return Message body as configured by the push notification configuration in service. 98 | */ 99 | public String getBody() { 100 | if (payload.containsKey("twi_body")) { 101 | return payload.getString("twi_body"); 102 | } 103 | return null; 104 | } 105 | 106 | /** 107 | * Get notification channel title. 108 | * 109 | * @return Channel title for NEW_MESSAGE notification type, null otherwise. 110 | */ 111 | public String getChannelTitle() { 112 | if (payload.containsKey("channel_title")) { 113 | return payload.getString("channel_title"); 114 | } 115 | return null; 116 | } 117 | 118 | /** 119 | * Get notification channel SID. 120 | * 121 | * @return Channel SID for NEW_MESSAGE notification type, null otherwise. 122 | */ 123 | public String getChannelSid() { 124 | if (payload.containsKey("channel_sid")) { 125 | return payload.getString("channel_sid"); 126 | } 127 | return null; 128 | } 129 | 130 | /** 131 | * Get notification message SID. 132 | * 133 | * @return Message SID for NEW_MESSAGE notification type, null otherwise. 134 | */ 135 | public String getMessageSid() { 136 | if (payload.containsKey("message_sid")) { 137 | return payload.getString("message_sid"); 138 | } 139 | return null; 140 | } 141 | 142 | /** 143 | * Get notification message index. 144 | * 145 | * @return Message Index for NEW_MESSAGE notification type, null otherwise. 146 | */ 147 | public String getMessageIndex() { 148 | if (payload.containsKey("message_index")) { 149 | return payload.getString("message_index"); 150 | } 151 | return null; 152 | } 153 | 154 | /** 155 | * Get notification sound. 156 | * 157 | * @return Sound name as configured by the push notification configuration in service, 158 | * null if not configured. 159 | */ 160 | public String getSound() { 161 | if (payload.containsKey("twi_sound")) { 162 | return payload.getString("twi_sound"); 163 | } 164 | return null; 165 | } 166 | 167 | Bundle payload; 168 | 169 | @Override 170 | public String toString() { 171 | return "[TwilioFCMNotificationPayload] [Type: " + this.getType() + "] [Author: " + this.getAuthor() + "] " + 172 | "[Body: " + this.getBody() + "] [Channel SID: " + this.getChannelSid() + "] " + 173 | "[Channel title: " + this.getChannelTitle() + "] [Message SID: " + this.getMessageSid() + "] " + 174 | "[Message index: " + this.getMessageIndex() + "] [Sound: " + this.getSound() + "]"; 175 | } 176 | } -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twilio/TwilioChatJsReactNative/78d61d29488ec3ba4e5dff315f4140f71d527030/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twilio/TwilioChatJsReactNative/78d61d29488ec3ba4e5dff315f4140f71d527030/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twilio/TwilioChatJsReactNative/78d61d29488ec3ba4e5dff315f4140f71d527030/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twilio/TwilioChatJsReactNative/78d61d29488ec3ba4e5dff315f4140f71d527030/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twilio/TwilioChatJsReactNative/78d61d29488ec3ba4e5dff315f4140f71d527030/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twilio/TwilioChatJsReactNative/78d61d29488ec3ba4e5dff315f4140f71d527030/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twilio/TwilioChatJsReactNative/78d61d29488ec3ba4e5dff315f4140f71d527030/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twilio/TwilioChatJsReactNative/78d61d29488ec3ba4e5dff315f4140f71d527030/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twilio/TwilioChatJsReactNative/78d61d29488ec3ba4e5dff315f4140f71d527030/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twilio/TwilioChatJsReactNative/78d61d29488ec3ba4e5dff315f4140f71d527030/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /android/app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | TwilioChatJsReactNative 3 | 4 | -------------------------------------------------------------------------------- /android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /android/build.gradle: -------------------------------------------------------------------------------- 1 | // Top-level build file where you can add configuration options common to all sub-projects/modules. 2 | 3 | buildscript { 4 | ext { 5 | buildToolsVersion = "28.0.3" 6 | minSdkVersion = 16 7 | compileSdkVersion = 28 8 | targetSdkVersion = 28 9 | supportLibVersion = "28.0.0" 10 | } 11 | repositories { 12 | google() 13 | jcenter() 14 | } 15 | dependencies { 16 | classpath 'com.android.tools.build:gradle:3.3.1' 17 | classpath 'com.google.gms:google-services:3.2.1' 18 | // NOTE: Do not place your application dependencies here; they belong 19 | // in the individual module build.gradle files 20 | } 21 | } 22 | 23 | allprojects { 24 | repositories { 25 | mavenLocal() 26 | google() 27 | jcenter() 28 | maven { 29 | // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm 30 | url "$rootDir/../node_modules/react-native/android" 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /android/gradle.properties: -------------------------------------------------------------------------------- 1 | # Project-wide Gradle settings. 2 | 3 | # IDE (e.g. Android Studio) users: 4 | # Gradle settings configured through the IDE *will override* 5 | # any settings specified in this file. 6 | 7 | # For more details on how to configure your build environment visit 8 | # http://www.gradle.org/docs/current/userguide/build_environment.html 9 | 10 | # Specifies the JVM arguments used for the daemon process. 11 | # The setting is particularly useful for tweaking memory settings. 12 | # Default value: -Xmx10248m -XX:MaxPermSize=256m 13 | # org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 14 | 15 | # When configured, Gradle will run in incubating parallel mode. 16 | # This option should only be used with decoupled projects. More details, visit 17 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 18 | # org.gradle.parallel=true 19 | 20 | -------------------------------------------------------------------------------- /android/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twilio/TwilioChatJsReactNative/78d61d29488ec3ba4e5dff315f4140f71d527030/android/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | zipStoreBase=GRADLE_USER_HOME 4 | zipStorePath=wrapper/dists 5 | distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.2-all.zip 6 | -------------------------------------------------------------------------------- /android/gradlew: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | 3 | ############################################################################## 4 | ## 5 | ## Gradle start up script for UN*X 6 | ## 7 | ############################################################################## 8 | 9 | # Attempt to set APP_HOME 10 | # Resolve links: $0 may be a link 11 | PRG="$0" 12 | # Need this for relative symlinks. 13 | while [ -h "$PRG" ] ; do 14 | ls=`ls -ld "$PRG"` 15 | link=`expr "$ls" : '.*-> \(.*\)$'` 16 | if expr "$link" : '/.*' > /dev/null; then 17 | PRG="$link" 18 | else 19 | PRG=`dirname "$PRG"`"/$link" 20 | fi 21 | done 22 | SAVED="`pwd`" 23 | cd "`dirname \"$PRG\"`/" >/dev/null 24 | APP_HOME="`pwd -P`" 25 | cd "$SAVED" >/dev/null 26 | 27 | APP_NAME="Gradle" 28 | APP_BASE_NAME=`basename "$0"` 29 | 30 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 31 | DEFAULT_JVM_OPTS="" 32 | 33 | # Use the maximum available, or set MAX_FD != -1 to use that value. 34 | MAX_FD="maximum" 35 | 36 | warn () { 37 | echo "$*" 38 | } 39 | 40 | die () { 41 | echo 42 | echo "$*" 43 | echo 44 | exit 1 45 | } 46 | 47 | # OS specific support (must be 'true' or 'false'). 48 | cygwin=false 49 | msys=false 50 | darwin=false 51 | nonstop=false 52 | case "`uname`" in 53 | CYGWIN* ) 54 | cygwin=true 55 | ;; 56 | Darwin* ) 57 | darwin=true 58 | ;; 59 | MINGW* ) 60 | msys=true 61 | ;; 62 | NONSTOP* ) 63 | nonstop=true 64 | ;; 65 | esac 66 | 67 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar 68 | 69 | # Determine the Java command to use to start the JVM. 70 | if [ -n "$JAVA_HOME" ] ; then 71 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then 72 | # IBM's JDK on AIX uses strange locations for the executables 73 | JAVACMD="$JAVA_HOME/jre/sh/java" 74 | else 75 | JAVACMD="$JAVA_HOME/bin/java" 76 | fi 77 | if [ ! -x "$JAVACMD" ] ; then 78 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME 79 | 80 | Please set the JAVA_HOME variable in your environment to match the 81 | location of your Java installation." 82 | fi 83 | else 84 | JAVACMD="java" 85 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 86 | 87 | Please set the JAVA_HOME variable in your environment to match the 88 | location of your Java installation." 89 | fi 90 | 91 | # Increase the maximum file descriptors if we can. 92 | if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then 93 | MAX_FD_LIMIT=`ulimit -H -n` 94 | if [ $? -eq 0 ] ; then 95 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then 96 | MAX_FD="$MAX_FD_LIMIT" 97 | fi 98 | ulimit -n $MAX_FD 99 | if [ $? -ne 0 ] ; then 100 | warn "Could not set maximum file descriptor limit: $MAX_FD" 101 | fi 102 | else 103 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" 104 | fi 105 | fi 106 | 107 | # For Darwin, add options to specify how the application appears in the dock 108 | if $darwin; then 109 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" 110 | fi 111 | 112 | # For Cygwin, switch paths to Windows format before running java 113 | if $cygwin ; then 114 | APP_HOME=`cygpath --path --mixed "$APP_HOME"` 115 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` 116 | JAVACMD=`cygpath --unix "$JAVACMD"` 117 | 118 | # We build the pattern for arguments to be converted via cygpath 119 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` 120 | SEP="" 121 | for dir in $ROOTDIRSRAW ; do 122 | ROOTDIRS="$ROOTDIRS$SEP$dir" 123 | SEP="|" 124 | done 125 | OURCYGPATTERN="(^($ROOTDIRS))" 126 | # Add a user-defined pattern to the cygpath arguments 127 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then 128 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" 129 | fi 130 | # Now convert the arguments - kludge to limit ourselves to /bin/sh 131 | i=0 132 | for arg in "$@" ; do 133 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` 134 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option 135 | 136 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition 137 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` 138 | else 139 | eval `echo args$i`="\"$arg\"" 140 | fi 141 | i=$((i+1)) 142 | done 143 | case $i in 144 | (0) set -- ;; 145 | (1) set -- "$args0" ;; 146 | (2) set -- "$args0" "$args1" ;; 147 | (3) set -- "$args0" "$args1" "$args2" ;; 148 | (4) set -- "$args0" "$args1" "$args2" "$args3" ;; 149 | (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; 150 | (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; 151 | (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; 152 | (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; 153 | (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; 154 | esac 155 | fi 156 | 157 | # Escape application args 158 | save () { 159 | for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done 160 | echo " " 161 | } 162 | APP_ARGS=$(save "$@") 163 | 164 | # Collect all arguments for the java command, following the shell quoting and substitution rules 165 | eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" 166 | 167 | # by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong 168 | if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then 169 | cd "$(dirname "$0")" 170 | fi 171 | 172 | exec "$JAVACMD" "$@" 173 | -------------------------------------------------------------------------------- /android/gradlew.bat: -------------------------------------------------------------------------------- 1 | @if "%DEBUG%" == "" @echo off 2 | @rem ########################################################################## 3 | @rem 4 | @rem Gradle startup script for Windows 5 | @rem 6 | @rem ########################################################################## 7 | 8 | @rem Set local scope for the variables with windows NT shell 9 | if "%OS%"=="Windows_NT" setlocal 10 | 11 | set DIRNAME=%~dp0 12 | if "%DIRNAME%" == "" set DIRNAME=. 13 | set APP_BASE_NAME=%~n0 14 | set APP_HOME=%DIRNAME% 15 | 16 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 17 | set DEFAULT_JVM_OPTS= 18 | 19 | @rem Find java.exe 20 | if defined JAVA_HOME goto findJavaFromJavaHome 21 | 22 | set JAVA_EXE=java.exe 23 | %JAVA_EXE% -version >NUL 2>&1 24 | if "%ERRORLEVEL%" == "0" goto init 25 | 26 | echo. 27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 28 | echo. 29 | echo Please set the JAVA_HOME variable in your environment to match the 30 | echo location of your Java installation. 31 | 32 | goto fail 33 | 34 | :findJavaFromJavaHome 35 | set JAVA_HOME=%JAVA_HOME:"=% 36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe 37 | 38 | if exist "%JAVA_EXE%" goto init 39 | 40 | echo. 41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 42 | echo. 43 | echo Please set the JAVA_HOME variable in your environment to match the 44 | echo location of your Java installation. 45 | 46 | goto fail 47 | 48 | :init 49 | @rem Get command-line arguments, handling Windows variants 50 | 51 | if not "%OS%" == "Windows_NT" goto win9xME_args 52 | 53 | :win9xME_args 54 | @rem Slurp the command line arguments. 55 | set CMD_LINE_ARGS= 56 | set _SKIP=2 57 | 58 | :win9xME_args_slurp 59 | if "x%~1" == "x" goto execute 60 | 61 | set CMD_LINE_ARGS=%* 62 | 63 | :execute 64 | @rem Setup the command line 65 | 66 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar 67 | 68 | @rem Execute Gradle 69 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% 70 | 71 | :end 72 | @rem End local scope for the variables with windows NT shell 73 | if "%ERRORLEVEL%"=="0" goto mainEnd 74 | 75 | :fail 76 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of 77 | rem the _cmd.exe /c_ return code! 78 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 79 | exit /b 1 80 | 81 | :mainEnd 82 | if "%OS%"=="Windows_NT" endlocal 83 | 84 | :omega 85 | -------------------------------------------------------------------------------- /android/keystores/BUCK: -------------------------------------------------------------------------------- 1 | keystore( 2 | name = "debug", 3 | properties = "debug.keystore.properties", 4 | store = "debug.keystore", 5 | visibility = [ 6 | "PUBLIC", 7 | ], 8 | ) 9 | -------------------------------------------------------------------------------- /android/keystores/debug.keystore.properties: -------------------------------------------------------------------------------- 1 | key.store=debug.keystore 2 | key.alias=androiddebugkey 3 | key.store.password=android 4 | key.alias.password=android 5 | -------------------------------------------------------------------------------- /android/settings.gradle: -------------------------------------------------------------------------------- 1 | rootProject.name = 'TwilioChatJsReactNative' 2 | 3 | include ':app' 4 | -------------------------------------------------------------------------------- /app.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const express = require('express'); 4 | const config = require('./configuration.json'); 5 | const TokenProvider = require('./js/token-provider'); 6 | const bodyParser = require('body-parser'); 7 | const ngrok = require('ngrok'); 8 | const basicAuth = require('basic-auth-connect'); 9 | 10 | 11 | const app = express(); 12 | 13 | app.set('json spaces', 2); 14 | app.use(bodyParser.json()); // for parsing application/json 15 | app.use(bodyParser.urlencoded({ extended: true })); // for parsing application/x-www-form-urlencoded 16 | if (config.ngrok.basicAuth && config.ngrok.basicAuth.username && config.ngrok.basicAuth.password) { 17 | app.use(basicAuth(config.ngrok.basicAuth.username, config.ngrok.basicAuth.password)); 18 | } 19 | 20 | app.get('/chat-client-configuration.json', function(req, res) { 21 | if (config.chatClient) { 22 | res.json(config.chatClient); 23 | } else { 24 | res.json({}); 25 | } 26 | }); 27 | 28 | app.get('/token', function(req, res) { 29 | if (req.query.identity) { 30 | res.send(TokenProvider.getToken(req.query.identity, req.query.pushChannel)); 31 | } else { 32 | throw new Error('no `identity` query parameter is provided'); 33 | } 34 | }); 35 | 36 | app.listen(3002, function() { 37 | console.log('Token provider listening on port 3002!'); 38 | 39 | let ngrokOptions = { 40 | proto: 'http', 41 | addr: 3002 42 | }; 43 | if (config.ngrok.subdomain) { 44 | ngrokOptions.subdomain = config.ngrok.subdomain 45 | } 46 | 47 | ngrok.connect(ngrokOptions).then(url=> { 48 | console.log('ngrok url is ' + url); 49 | }).catch((e) => { 50 | console.error(e); 51 | }); 52 | }); 53 | 54 | 55 | 56 | -------------------------------------------------------------------------------- /app.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "TwilioChatJsReactNative", 3 | "displayName": "TwilioChatJsReactNative" 4 | } -------------------------------------------------------------------------------- /babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: ['module:metro-react-native-babel-preset'], 3 | }; 4 | -------------------------------------------------------------------------------- /configuration.example.json: -------------------------------------------------------------------------------- 1 | { 2 | "chatClient": { 3 | "options": { 4 | "logLevel": "info" 5 | } 6 | }, 7 | "tokenGenerator": { 8 | "accountSid": "ACxxx", 9 | "signingKeySid": "SKxxx", 10 | "signingKeySecret": "xxx", 11 | "serviceSid": "ISxxx", 12 | "fcm": "CRxxx", 13 | "apns": "CRxxx" 14 | }, 15 | "ngrok": { 16 | "subdomain": "somengroksubdomain", 17 | "basicAuth": { 18 | "username": "someusername", 19 | "password": "somepassword" 20 | } 21 | } 22 | } 23 | 24 | -------------------------------------------------------------------------------- /index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Sample React Native App 3 | * https://github.com/facebook/react-native 4 | * @flow 5 | */ 6 | 7 | import React, { Component } from "react"; 8 | import { AppRegistry, Platform } from "react-native"; 9 | import Login from "./js/components/Login"; 10 | import EventsLog from "./js/components/EventsLog"; 11 | import ChatClientHelper from "./js/chat-client-helper"; 12 | import Log from "./js/logging"; 13 | import FirebaseSupport from "./js/FirebaseSupportModule"; 14 | import ApnSupport from "./js/ApnsSupportModule"; 15 | 16 | const ngrokConfiguration = require('./configuration.json').ngrok; 17 | const tokenHost = 'https://' + ngrokConfiguration.subdomain + '.ngrok.io'; 18 | const tokenBasicAuth = ngrokConfiguration.basicAuth; 19 | 20 | export default class TwilioChatJsReactNative extends Component { 21 | 22 | state = { 23 | chatClientHelper: null, 24 | log: [] 25 | }; 26 | 27 | login(username, host) { 28 | let log = new Log(this.addNewLog.bind(this)); 29 | let chatClientHelper = new ChatClientHelper(host, tokenBasicAuth, log); 30 | 31 | if (Platform.OS === 'ios') { 32 | chatClientHelper.login( 33 | username, 'apns', ApnSupport.registerForPushCallback, ApnSupport.showPushCallback); 34 | } else if (Platform.OS === 'android') { 35 | chatClientHelper.login( 36 | username, 'fcm', FirebaseSupport.registerForPushCallback, FirebaseSupport.showPushCallback); 37 | } 38 | this.setState({ chatClientHelper }); 39 | } 40 | 41 | addNewLog(string) { 42 | let log = this.state.log; 43 | log.push(string + "\n"); 44 | this.setState({ log }); 45 | } 46 | 47 | render() { 48 | if (this.state.chatClientHelper === null) { 49 | return ( 50 | 51 | ); 52 | } else { 53 | return ( 54 | 55 | ); 56 | } 57 | } 58 | } 59 | 60 | AppRegistry.registerComponent('TwilioChatJsReactNative', () => TwilioChatJsReactNative); 61 | 62 | // if you want to send the raw push to the JS library to reparse 63 | // (while app is not running), you can use this react native pattern to call static JS method 64 | // AppRegistry.registerHeadlessTask('FCMParsePush', () => require('./js/FCMParsePush')); 65 | -------------------------------------------------------------------------------- /ios/TwilioChatJsReactNative-tvOS/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | UIInterfaceOrientationLandscapeLeft 35 | UIInterfaceOrientationLandscapeRight 36 | 37 | UIViewControllerBasedStatusBarAppearance 38 | 39 | NSLocationWhenInUseUsageDescription 40 | 41 | NSAppTransportSecurity 42 | 43 | 44 | NSExceptionDomains 45 | 46 | localhost 47 | 48 | NSExceptionAllowsInsecureHTTPLoads 49 | 50 | 51 | 52 | 53 | 54 | 55 | -------------------------------------------------------------------------------- /ios/TwilioChatJsReactNative-tvOSTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /ios/TwilioChatJsReactNative.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 00C302E51ABCBA2D00DB3ED1 /* libRCTActionSheet.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302AC1ABCB8CE00DB3ED1 /* libRCTActionSheet.a */; }; 11 | 00C302E71ABCBA2D00DB3ED1 /* libRCTGeolocation.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302BA1ABCB90400DB3ED1 /* libRCTGeolocation.a */; }; 12 | 00C302E81ABCBA2D00DB3ED1 /* libRCTImage.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302C01ABCB91800DB3ED1 /* libRCTImage.a */; }; 13 | 00C302E91ABCBA2D00DB3ED1 /* libRCTNetwork.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302DC1ABCB9D200DB3ED1 /* libRCTNetwork.a */; }; 14 | 00C302EA1ABCBA2D00DB3ED1 /* libRCTVibration.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302E41ABCB9EE00DB3ED1 /* libRCTVibration.a */; }; 15 | 11D1A2F320CAFA9E000508D9 /* libRCTAnimation.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5E9157331DD0AC6500FF2AA8 /* libRCTAnimation.a */; }; 16 | 133E29F31AD74F7200F7D852 /* libRCTLinking.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 78C398B91ACF4ADC00677621 /* libRCTLinking.a */; }; 17 | 139105C61AF99C1200B5F7CC /* libRCTSettings.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 139105C11AF99BAD00B5F7CC /* libRCTSettings.a */; }; 18 | 139FDEF61B0652A700C62182 /* libRCTWebSocket.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 139FDEF41B06529B00C62182 /* libRCTWebSocket.a */; }; 19 | 13B07FBC1A68108700A75B9A /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB01A68108700A75B9A /* AppDelegate.m */; }; 20 | 13B07FBD1A68108700A75B9A /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB11A68108700A75B9A /* LaunchScreen.xib */; }; 21 | 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; }; 22 | 13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; }; 23 | 146834051AC3E58100842450 /* libReact.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 146834041AC3E56700842450 /* libReact.a */; }; 24 | 4C09B66D2292EFA1005F4714 /* libRCTPushNotification.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 4C09B6492292EF6F005F4714 /* libRCTPushNotification.a */; }; 25 | 832341BD1AAA6AB300B99B32 /* libRCTText.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 832341B51AAA6A8300B99B32 /* libRCTText.a */; }; 26 | ADBDB9381DFEBF1600ED6528 /* libRCTBlob.a in Frameworks */ = {isa = PBXBuildFile; fileRef = ADBDB9271DFEBF0700ED6528 /* libRCTBlob.a */; }; 27 | ED297163215061F000B7C4FE /* JavaScriptCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = ED297162215061F000B7C4FE /* JavaScriptCore.framework */; }; 28 | /* End PBXBuildFile section */ 29 | 30 | /* Begin PBXContainerItemProxy section */ 31 | 00C302AB1ABCB8CE00DB3ED1 /* PBXContainerItemProxy */ = { 32 | isa = PBXContainerItemProxy; 33 | containerPortal = 00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */; 34 | proxyType = 2; 35 | remoteGlobalIDString = 134814201AA4EA6300B7C361; 36 | remoteInfo = RCTActionSheet; 37 | }; 38 | 00C302B91ABCB90400DB3ED1 /* PBXContainerItemProxy */ = { 39 | isa = PBXContainerItemProxy; 40 | containerPortal = 00C302B51ABCB90400DB3ED1 /* RCTGeolocation.xcodeproj */; 41 | proxyType = 2; 42 | remoteGlobalIDString = 134814201AA4EA6300B7C361; 43 | remoteInfo = RCTGeolocation; 44 | }; 45 | 00C302BF1ABCB91800DB3ED1 /* PBXContainerItemProxy */ = { 46 | isa = PBXContainerItemProxy; 47 | containerPortal = 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */; 48 | proxyType = 2; 49 | remoteGlobalIDString = 58B5115D1A9E6B3D00147676; 50 | remoteInfo = RCTImage; 51 | }; 52 | 00C302DB1ABCB9D200DB3ED1 /* PBXContainerItemProxy */ = { 53 | isa = PBXContainerItemProxy; 54 | containerPortal = 00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */; 55 | proxyType = 2; 56 | remoteGlobalIDString = 58B511DB1A9E6C8500147676; 57 | remoteInfo = RCTNetwork; 58 | }; 59 | 00C302E31ABCB9EE00DB3ED1 /* PBXContainerItemProxy */ = { 60 | isa = PBXContainerItemProxy; 61 | containerPortal = 00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */; 62 | proxyType = 2; 63 | remoteGlobalIDString = 832C81801AAF6DEF007FA2F7; 64 | remoteInfo = RCTVibration; 65 | }; 66 | 139105C01AF99BAD00B5F7CC /* PBXContainerItemProxy */ = { 67 | isa = PBXContainerItemProxy; 68 | containerPortal = 139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */; 69 | proxyType = 2; 70 | remoteGlobalIDString = 134814201AA4EA6300B7C361; 71 | remoteInfo = RCTSettings; 72 | }; 73 | 139FDEF31B06529B00C62182 /* PBXContainerItemProxy */ = { 74 | isa = PBXContainerItemProxy; 75 | containerPortal = 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */; 76 | proxyType = 2; 77 | remoteGlobalIDString = 3C86DF461ADF2C930047B81A; 78 | remoteInfo = RCTWebSocket; 79 | }; 80 | 146834031AC3E56700842450 /* PBXContainerItemProxy */ = { 81 | isa = PBXContainerItemProxy; 82 | containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; 83 | proxyType = 2; 84 | remoteGlobalIDString = 83CBBA2E1A601D0E00E9B192; 85 | remoteInfo = React; 86 | }; 87 | 2D16E6711FA4F8DC00B85C8A /* PBXContainerItemProxy */ = { 88 | isa = PBXContainerItemProxy; 89 | containerPortal = ADBDB91F1DFEBF0600ED6528 /* RCTBlob.xcodeproj */; 90 | proxyType = 2; 91 | remoteGlobalIDString = ADD01A681E09402E00F6D226; 92 | remoteInfo = "RCTBlob-tvOS"; 93 | }; 94 | 2D16E6831FA4F8DC00B85C8A /* PBXContainerItemProxy */ = { 95 | isa = PBXContainerItemProxy; 96 | containerPortal = 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */; 97 | proxyType = 2; 98 | remoteGlobalIDString = 3DBE0D001F3B181A0099AA32; 99 | remoteInfo = fishhook; 100 | }; 101 | 2D16E6851FA4F8DC00B85C8A /* PBXContainerItemProxy */ = { 102 | isa = PBXContainerItemProxy; 103 | containerPortal = 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */; 104 | proxyType = 2; 105 | remoteGlobalIDString = 3DBE0D0D1F3B181C0099AA32; 106 | remoteInfo = "fishhook-tvOS"; 107 | }; 108 | 2DF0FFDE2056DD460020B375 /* PBXContainerItemProxy */ = { 109 | isa = PBXContainerItemProxy; 110 | containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; 111 | proxyType = 2; 112 | remoteGlobalIDString = EBF21BDC1FC498900052F4D5; 113 | remoteInfo = jsinspector; 114 | }; 115 | 2DF0FFE02056DD460020B375 /* PBXContainerItemProxy */ = { 116 | isa = PBXContainerItemProxy; 117 | containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; 118 | proxyType = 2; 119 | remoteGlobalIDString = EBF21BFA1FC4989A0052F4D5; 120 | remoteInfo = "jsinspector-tvOS"; 121 | }; 122 | 2DF0FFE22056DD460020B375 /* PBXContainerItemProxy */ = { 123 | isa = PBXContainerItemProxy; 124 | containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; 125 | proxyType = 2; 126 | remoteGlobalIDString = 139D7ECE1E25DB7D00323FB7; 127 | remoteInfo = "third-party"; 128 | }; 129 | 2DF0FFE42056DD460020B375 /* PBXContainerItemProxy */ = { 130 | isa = PBXContainerItemProxy; 131 | containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; 132 | proxyType = 2; 133 | remoteGlobalIDString = 3D383D3C1EBD27B6005632C8; 134 | remoteInfo = "third-party-tvOS"; 135 | }; 136 | 2DF0FFE62056DD460020B375 /* PBXContainerItemProxy */ = { 137 | isa = PBXContainerItemProxy; 138 | containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; 139 | proxyType = 2; 140 | remoteGlobalIDString = 139D7E881E25C6D100323FB7; 141 | remoteInfo = "double-conversion"; 142 | }; 143 | 2DF0FFE82056DD460020B375 /* PBXContainerItemProxy */ = { 144 | isa = PBXContainerItemProxy; 145 | containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; 146 | proxyType = 2; 147 | remoteGlobalIDString = 3D383D621EBD27B9005632C8; 148 | remoteInfo = "double-conversion-tvOS"; 149 | }; 150 | 3DAD3E831DF850E9000B6D8A /* PBXContainerItemProxy */ = { 151 | isa = PBXContainerItemProxy; 152 | containerPortal = 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */; 153 | proxyType = 2; 154 | remoteGlobalIDString = 2D2A283A1D9B042B00D4039D; 155 | remoteInfo = "RCTImage-tvOS"; 156 | }; 157 | 3DAD3E871DF850E9000B6D8A /* PBXContainerItemProxy */ = { 158 | isa = PBXContainerItemProxy; 159 | containerPortal = 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */; 160 | proxyType = 2; 161 | remoteGlobalIDString = 2D2A28471D9B043800D4039D; 162 | remoteInfo = "RCTLinking-tvOS"; 163 | }; 164 | 3DAD3E8B1DF850E9000B6D8A /* PBXContainerItemProxy */ = { 165 | isa = PBXContainerItemProxy; 166 | containerPortal = 00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */; 167 | proxyType = 2; 168 | remoteGlobalIDString = 2D2A28541D9B044C00D4039D; 169 | remoteInfo = "RCTNetwork-tvOS"; 170 | }; 171 | 3DAD3E8F1DF850E9000B6D8A /* PBXContainerItemProxy */ = { 172 | isa = PBXContainerItemProxy; 173 | containerPortal = 139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */; 174 | proxyType = 2; 175 | remoteGlobalIDString = 2D2A28611D9B046600D4039D; 176 | remoteInfo = "RCTSettings-tvOS"; 177 | }; 178 | 3DAD3E931DF850E9000B6D8A /* PBXContainerItemProxy */ = { 179 | isa = PBXContainerItemProxy; 180 | containerPortal = 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */; 181 | proxyType = 2; 182 | remoteGlobalIDString = 2D2A287B1D9B048500D4039D; 183 | remoteInfo = "RCTText-tvOS"; 184 | }; 185 | 3DAD3E981DF850E9000B6D8A /* PBXContainerItemProxy */ = { 186 | isa = PBXContainerItemProxy; 187 | containerPortal = 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */; 188 | proxyType = 2; 189 | remoteGlobalIDString = 2D2A28881D9B049200D4039D; 190 | remoteInfo = "RCTWebSocket-tvOS"; 191 | }; 192 | 3DAD3EA21DF850E9000B6D8A /* PBXContainerItemProxy */ = { 193 | isa = PBXContainerItemProxy; 194 | containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; 195 | proxyType = 2; 196 | remoteGlobalIDString = 2D2A28131D9B038B00D4039D; 197 | remoteInfo = "React-tvOS"; 198 | }; 199 | 3DAD3EA41DF850E9000B6D8A /* PBXContainerItemProxy */ = { 200 | isa = PBXContainerItemProxy; 201 | containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; 202 | proxyType = 2; 203 | remoteGlobalIDString = 3D3C059A1DE3340900C268FA; 204 | remoteInfo = yoga; 205 | }; 206 | 3DAD3EA61DF850E9000B6D8A /* PBXContainerItemProxy */ = { 207 | isa = PBXContainerItemProxy; 208 | containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; 209 | proxyType = 2; 210 | remoteGlobalIDString = 3D3C06751DE3340C00C268FA; 211 | remoteInfo = "yoga-tvOS"; 212 | }; 213 | 3DAD3EA81DF850E9000B6D8A /* PBXContainerItemProxy */ = { 214 | isa = PBXContainerItemProxy; 215 | containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; 216 | proxyType = 2; 217 | remoteGlobalIDString = 3D3CD9251DE5FBEC00167DC4; 218 | remoteInfo = cxxreact; 219 | }; 220 | 3DAD3EAA1DF850E9000B6D8A /* PBXContainerItemProxy */ = { 221 | isa = PBXContainerItemProxy; 222 | containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; 223 | proxyType = 2; 224 | remoteGlobalIDString = 3D3CD9321DE5FBEE00167DC4; 225 | remoteInfo = "cxxreact-tvOS"; 226 | }; 227 | 4C09B6482292EF6F005F4714 /* PBXContainerItemProxy */ = { 228 | isa = PBXContainerItemProxy; 229 | containerPortal = 4C09B6372292EF6F005F4714 /* RCTPushNotification.xcodeproj */; 230 | proxyType = 2; 231 | remoteGlobalIDString = 134814201AA4EA6300B7C361; 232 | remoteInfo = RCTPushNotification; 233 | }; 234 | 4C09B64A2292EF6F005F4714 /* PBXContainerItemProxy */ = { 235 | isa = PBXContainerItemProxy; 236 | containerPortal = 4C09B6372292EF6F005F4714 /* RCTPushNotification.xcodeproj */; 237 | proxyType = 2; 238 | remoteGlobalIDString = 3D05745F1DE6004600184BB4; 239 | remoteInfo = "RCTPushNotification-tvOS"; 240 | }; 241 | 4C09B6652292EF6F005F4714 /* PBXContainerItemProxy */ = { 242 | isa = PBXContainerItemProxy; 243 | containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; 244 | proxyType = 2; 245 | remoteGlobalIDString = EDEBC6D6214B3E7000DD5AC8; 246 | remoteInfo = jsi; 247 | }; 248 | 4C09B6672292EF6F005F4714 /* PBXContainerItemProxy */ = { 249 | isa = PBXContainerItemProxy; 250 | containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; 251 | proxyType = 2; 252 | remoteGlobalIDString = EDEBC73B214B45A300DD5AC8; 253 | remoteInfo = jsiexecutor; 254 | }; 255 | 4C09B6692292EF6F005F4714 /* PBXContainerItemProxy */ = { 256 | isa = PBXContainerItemProxy; 257 | containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; 258 | proxyType = 2; 259 | remoteGlobalIDString = ED296FB6214C9A0900B7C4FE; 260 | remoteInfo = "jsi-tvOS"; 261 | }; 262 | 4C09B66B2292EF6F005F4714 /* PBXContainerItemProxy */ = { 263 | isa = PBXContainerItemProxy; 264 | containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; 265 | proxyType = 2; 266 | remoteGlobalIDString = ED296FEE214C9CF800B7C4FE; 267 | remoteInfo = "jsiexecutor-tvOS"; 268 | }; 269 | 5E9157321DD0AC6500FF2AA8 /* PBXContainerItemProxy */ = { 270 | isa = PBXContainerItemProxy; 271 | containerPortal = 5E91572D1DD0AC6500FF2AA8 /* RCTAnimation.xcodeproj */; 272 | proxyType = 2; 273 | remoteGlobalIDString = 134814201AA4EA6300B7C361; 274 | remoteInfo = RCTAnimation; 275 | }; 276 | 5E9157341DD0AC6500FF2AA8 /* PBXContainerItemProxy */ = { 277 | isa = PBXContainerItemProxy; 278 | containerPortal = 5E91572D1DD0AC6500FF2AA8 /* RCTAnimation.xcodeproj */; 279 | proxyType = 2; 280 | remoteGlobalIDString = 2D2A28201D9B03D100D4039D; 281 | remoteInfo = "RCTAnimation-tvOS"; 282 | }; 283 | 78C398B81ACF4ADC00677621 /* PBXContainerItemProxy */ = { 284 | isa = PBXContainerItemProxy; 285 | containerPortal = 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */; 286 | proxyType = 2; 287 | remoteGlobalIDString = 134814201AA4EA6300B7C361; 288 | remoteInfo = RCTLinking; 289 | }; 290 | 832341B41AAA6A8300B99B32 /* PBXContainerItemProxy */ = { 291 | isa = PBXContainerItemProxy; 292 | containerPortal = 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */; 293 | proxyType = 2; 294 | remoteGlobalIDString = 58B5119B1A9E6C1200147676; 295 | remoteInfo = RCTText; 296 | }; 297 | ADBDB9261DFEBF0700ED6528 /* PBXContainerItemProxy */ = { 298 | isa = PBXContainerItemProxy; 299 | containerPortal = ADBDB91F1DFEBF0600ED6528 /* RCTBlob.xcodeproj */; 300 | proxyType = 2; 301 | remoteGlobalIDString = 358F4ED71D1E81A9004DF814; 302 | remoteInfo = RCTBlob; 303 | }; 304 | /* End PBXContainerItemProxy section */ 305 | 306 | /* Begin PBXFileReference section */ 307 | 008F07F21AC5B25A0029DE68 /* main.jsbundle */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = main.jsbundle; sourceTree = ""; }; 308 | 00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTActionSheet.xcodeproj; path = "../node_modules/react-native/Libraries/ActionSheetIOS/RCTActionSheet.xcodeproj"; sourceTree = ""; }; 309 | 00C302B51ABCB90400DB3ED1 /* RCTGeolocation.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTGeolocation.xcodeproj; path = "../node_modules/react-native/Libraries/Geolocation/RCTGeolocation.xcodeproj"; sourceTree = ""; }; 310 | 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTImage.xcodeproj; path = "../node_modules/react-native/Libraries/Image/RCTImage.xcodeproj"; sourceTree = ""; }; 311 | 00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTNetwork.xcodeproj; path = "../node_modules/react-native/Libraries/Network/RCTNetwork.xcodeproj"; sourceTree = ""; }; 312 | 00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTVibration.xcodeproj; path = "../node_modules/react-native/Libraries/Vibration/RCTVibration.xcodeproj"; sourceTree = ""; }; 313 | 00E356F11AD99517003FC87E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 314 | 00E356F21AD99517003FC87E /* TwilioChatJsReactNativeTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = TwilioChatJsReactNativeTests.m; sourceTree = ""; }; 315 | 139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTSettings.xcodeproj; path = "../node_modules/react-native/Libraries/Settings/RCTSettings.xcodeproj"; sourceTree = ""; }; 316 | 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTWebSocket.xcodeproj; path = "../node_modules/react-native/Libraries/WebSocket/RCTWebSocket.xcodeproj"; sourceTree = ""; }; 317 | 13B07F961A680F5B00A75B9A /* TwilioChatJsReactNative.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = TwilioChatJsReactNative.app; sourceTree = BUILT_PRODUCTS_DIR; }; 318 | 13B07FAF1A68108700A75B9A /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = TwilioChatJsReactNative/AppDelegate.h; sourceTree = ""; }; 319 | 13B07FB01A68108700A75B9A /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AppDelegate.m; path = TwilioChatJsReactNative/AppDelegate.m; sourceTree = ""; }; 320 | 13B07FB21A68108700A75B9A /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = ""; }; 321 | 13B07FB51A68108700A75B9A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = TwilioChatJsReactNative/Images.xcassets; sourceTree = ""; }; 322 | 13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = TwilioChatJsReactNative/Info.plist; sourceTree = ""; }; 323 | 13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = TwilioChatJsReactNative/main.m; sourceTree = ""; }; 324 | 146833FF1AC3E56700842450 /* React.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = React.xcodeproj; path = "../node_modules/react-native/React/React.xcodeproj"; sourceTree = ""; }; 325 | 2D16E6891FA4F8E400B85C8A /* libReact.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; path = libReact.a; sourceTree = BUILT_PRODUCTS_DIR; }; 326 | 4C09B6372292EF6F005F4714 /* RCTPushNotification.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTPushNotification.xcodeproj; path = "../node_modules/react-native/Libraries/PushNotificationIOS/RCTPushNotification.xcodeproj"; sourceTree = ""; }; 327 | 4C09B66E2292F5A6005F4714 /* TwilioChatJsReactNative.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; name = TwilioChatJsReactNative.entitlements; path = TwilioChatJsReactNative/TwilioChatJsReactNative.entitlements; sourceTree = ""; }; 328 | 5E91572D1DD0AC6500FF2AA8 /* RCTAnimation.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTAnimation.xcodeproj; path = "../node_modules/react-native/Libraries/NativeAnimation/RCTAnimation.xcodeproj"; sourceTree = ""; }; 329 | 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTLinking.xcodeproj; path = "../node_modules/react-native/Libraries/LinkingIOS/RCTLinking.xcodeproj"; sourceTree = ""; }; 330 | 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTText.xcodeproj; path = "../node_modules/react-native/Libraries/Text/RCTText.xcodeproj"; sourceTree = ""; }; 331 | ADBDB91F1DFEBF0600ED6528 /* RCTBlob.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTBlob.xcodeproj; path = "../node_modules/react-native/Libraries/Blob/RCTBlob.xcodeproj"; sourceTree = ""; }; 332 | ED297162215061F000B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; }; 333 | ED2971642150620600B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS12.0.sdk/System/Library/Frameworks/JavaScriptCore.framework; sourceTree = DEVELOPER_DIR; }; 334 | /* End PBXFileReference section */ 335 | 336 | /* Begin PBXFrameworksBuildPhase section */ 337 | 13B07F8C1A680F5B00A75B9A /* Frameworks */ = { 338 | isa = PBXFrameworksBuildPhase; 339 | buildActionMask = 2147483647; 340 | files = ( 341 | ED297163215061F000B7C4FE /* JavaScriptCore.framework in Frameworks */, 342 | ADBDB9381DFEBF1600ED6528 /* libRCTBlob.a in Frameworks */, 343 | 11D1A2F320CAFA9E000508D9 /* libRCTAnimation.a in Frameworks */, 344 | 146834051AC3E58100842450 /* libReact.a in Frameworks */, 345 | 00C302E51ABCBA2D00DB3ED1 /* libRCTActionSheet.a in Frameworks */, 346 | 00C302E71ABCBA2D00DB3ED1 /* libRCTGeolocation.a in Frameworks */, 347 | 00C302E81ABCBA2D00DB3ED1 /* libRCTImage.a in Frameworks */, 348 | 133E29F31AD74F7200F7D852 /* libRCTLinking.a in Frameworks */, 349 | 00C302E91ABCBA2D00DB3ED1 /* libRCTNetwork.a in Frameworks */, 350 | 139105C61AF99C1200B5F7CC /* libRCTSettings.a in Frameworks */, 351 | 832341BD1AAA6AB300B99B32 /* libRCTText.a in Frameworks */, 352 | 00C302EA1ABCBA2D00DB3ED1 /* libRCTVibration.a in Frameworks */, 353 | 139FDEF61B0652A700C62182 /* libRCTWebSocket.a in Frameworks */, 354 | 4C09B66D2292EFA1005F4714 /* libRCTPushNotification.a in Frameworks */, 355 | ); 356 | runOnlyForDeploymentPostprocessing = 0; 357 | }; 358 | /* End PBXFrameworksBuildPhase section */ 359 | 360 | /* Begin PBXGroup section */ 361 | 00C302A81ABCB8CE00DB3ED1 /* Products */ = { 362 | isa = PBXGroup; 363 | children = ( 364 | 00C302AC1ABCB8CE00DB3ED1 /* libRCTActionSheet.a */, 365 | ); 366 | name = Products; 367 | sourceTree = ""; 368 | }; 369 | 00C302B61ABCB90400DB3ED1 /* Products */ = { 370 | isa = PBXGroup; 371 | children = ( 372 | 00C302BA1ABCB90400DB3ED1 /* libRCTGeolocation.a */, 373 | ); 374 | name = Products; 375 | sourceTree = ""; 376 | }; 377 | 00C302BC1ABCB91800DB3ED1 /* Products */ = { 378 | isa = PBXGroup; 379 | children = ( 380 | 00C302C01ABCB91800DB3ED1 /* libRCTImage.a */, 381 | 3DAD3E841DF850E9000B6D8A /* libRCTImage-tvOS.a */, 382 | ); 383 | name = Products; 384 | sourceTree = ""; 385 | }; 386 | 00C302D41ABCB9D200DB3ED1 /* Products */ = { 387 | isa = PBXGroup; 388 | children = ( 389 | 00C302DC1ABCB9D200DB3ED1 /* libRCTNetwork.a */, 390 | 3DAD3E8C1DF850E9000B6D8A /* libRCTNetwork-tvOS.a */, 391 | ); 392 | name = Products; 393 | sourceTree = ""; 394 | }; 395 | 00C302E01ABCB9EE00DB3ED1 /* Products */ = { 396 | isa = PBXGroup; 397 | children = ( 398 | 00C302E41ABCB9EE00DB3ED1 /* libRCTVibration.a */, 399 | ); 400 | name = Products; 401 | sourceTree = ""; 402 | }; 403 | 00E356EF1AD99517003FC87E /* TwilioChatJsReactNativeTests */ = { 404 | isa = PBXGroup; 405 | children = ( 406 | 00E356F21AD99517003FC87E /* TwilioChatJsReactNativeTests.m */, 407 | 00E356F01AD99517003FC87E /* Supporting Files */, 408 | ); 409 | path = TwilioChatJsReactNativeTests; 410 | sourceTree = ""; 411 | }; 412 | 00E356F01AD99517003FC87E /* Supporting Files */ = { 413 | isa = PBXGroup; 414 | children = ( 415 | 00E356F11AD99517003FC87E /* Info.plist */, 416 | ); 417 | name = "Supporting Files"; 418 | sourceTree = ""; 419 | }; 420 | 139105B71AF99BAD00B5F7CC /* Products */ = { 421 | isa = PBXGroup; 422 | children = ( 423 | 139105C11AF99BAD00B5F7CC /* libRCTSettings.a */, 424 | 3DAD3E901DF850E9000B6D8A /* libRCTSettings-tvOS.a */, 425 | ); 426 | name = Products; 427 | sourceTree = ""; 428 | }; 429 | 139FDEE71B06529A00C62182 /* Products */ = { 430 | isa = PBXGroup; 431 | children = ( 432 | 139FDEF41B06529B00C62182 /* libRCTWebSocket.a */, 433 | 3DAD3E991DF850E9000B6D8A /* libRCTWebSocket-tvOS.a */, 434 | 2D16E6841FA4F8DC00B85C8A /* libfishhook.a */, 435 | 2D16E6861FA4F8DC00B85C8A /* libfishhook-tvOS.a */, 436 | ); 437 | name = Products; 438 | sourceTree = ""; 439 | }; 440 | 13B07FAE1A68108700A75B9A /* TwilioChatJsReactNative */ = { 441 | isa = PBXGroup; 442 | children = ( 443 | 4C09B66E2292F5A6005F4714 /* TwilioChatJsReactNative.entitlements */, 444 | 008F07F21AC5B25A0029DE68 /* main.jsbundle */, 445 | 13B07FAF1A68108700A75B9A /* AppDelegate.h */, 446 | 13B07FB01A68108700A75B9A /* AppDelegate.m */, 447 | 13B07FB51A68108700A75B9A /* Images.xcassets */, 448 | 13B07FB61A68108700A75B9A /* Info.plist */, 449 | 13B07FB11A68108700A75B9A /* LaunchScreen.xib */, 450 | 13B07FB71A68108700A75B9A /* main.m */, 451 | ); 452 | name = TwilioChatJsReactNative; 453 | sourceTree = ""; 454 | }; 455 | 146834001AC3E56700842450 /* Products */ = { 456 | isa = PBXGroup; 457 | children = ( 458 | 146834041AC3E56700842450 /* libReact.a */, 459 | 3DAD3EA31DF850E9000B6D8A /* libReact.a */, 460 | 3DAD3EA51DF850E9000B6D8A /* libyoga.a */, 461 | 3DAD3EA71DF850E9000B6D8A /* libyoga.a */, 462 | 3DAD3EA91DF850E9000B6D8A /* libcxxreact.a */, 463 | 3DAD3EAB1DF850E9000B6D8A /* libcxxreact.a */, 464 | 2DF0FFDF2056DD460020B375 /* libjsinspector.a */, 465 | 2DF0FFE12056DD460020B375 /* libjsinspector-tvOS.a */, 466 | 2DF0FFE32056DD460020B375 /* libthird-party.a */, 467 | 2DF0FFE52056DD460020B375 /* libthird-party.a */, 468 | 2DF0FFE72056DD460020B375 /* libdouble-conversion.a */, 469 | 2DF0FFE92056DD460020B375 /* libdouble-conversion.a */, 470 | 4C09B6662292EF6F005F4714 /* libjsi.a */, 471 | 4C09B6682292EF6F005F4714 /* libjsiexecutor.a */, 472 | 4C09B66A2292EF6F005F4714 /* libjsi-tvOS.a */, 473 | 4C09B66C2292EF6F005F4714 /* libjsiexecutor-tvOS.a */, 474 | ); 475 | name = Products; 476 | sourceTree = ""; 477 | }; 478 | 2D16E6871FA4F8E400B85C8A /* Frameworks */ = { 479 | isa = PBXGroup; 480 | children = ( 481 | ED297162215061F000B7C4FE /* JavaScriptCore.framework */, 482 | ED2971642150620600B7C4FE /* JavaScriptCore.framework */, 483 | 2D16E6891FA4F8E400B85C8A /* libReact.a */, 484 | ); 485 | name = Frameworks; 486 | sourceTree = ""; 487 | }; 488 | 4C09B6382292EF6F005F4714 /* Products */ = { 489 | isa = PBXGroup; 490 | children = ( 491 | 4C09B6492292EF6F005F4714 /* libRCTPushNotification.a */, 492 | 4C09B64B2292EF6F005F4714 /* libRCTPushNotification-tvOS.a */, 493 | ); 494 | name = Products; 495 | sourceTree = ""; 496 | }; 497 | 5E91572E1DD0AC6500FF2AA8 /* Products */ = { 498 | isa = PBXGroup; 499 | children = ( 500 | 5E9157331DD0AC6500FF2AA8 /* libRCTAnimation.a */, 501 | 5E9157351DD0AC6500FF2AA8 /* libRCTAnimation.a */, 502 | ); 503 | name = Products; 504 | sourceTree = ""; 505 | }; 506 | 78C398B11ACF4ADC00677621 /* Products */ = { 507 | isa = PBXGroup; 508 | children = ( 509 | 78C398B91ACF4ADC00677621 /* libRCTLinking.a */, 510 | 3DAD3E881DF850E9000B6D8A /* libRCTLinking-tvOS.a */, 511 | ); 512 | name = Products; 513 | sourceTree = ""; 514 | }; 515 | 832341AE1AAA6A7D00B99B32 /* Libraries */ = { 516 | isa = PBXGroup; 517 | children = ( 518 | 4C09B6372292EF6F005F4714 /* RCTPushNotification.xcodeproj */, 519 | 5E91572D1DD0AC6500FF2AA8 /* RCTAnimation.xcodeproj */, 520 | 146833FF1AC3E56700842450 /* React.xcodeproj */, 521 | 00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */, 522 | ADBDB91F1DFEBF0600ED6528 /* RCTBlob.xcodeproj */, 523 | 00C302B51ABCB90400DB3ED1 /* RCTGeolocation.xcodeproj */, 524 | 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */, 525 | 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */, 526 | 00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */, 527 | 139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */, 528 | 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */, 529 | 00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */, 530 | 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */, 531 | ); 532 | name = Libraries; 533 | sourceTree = ""; 534 | }; 535 | 832341B11AAA6A8300B99B32 /* Products */ = { 536 | isa = PBXGroup; 537 | children = ( 538 | 832341B51AAA6A8300B99B32 /* libRCTText.a */, 539 | 3DAD3E941DF850E9000B6D8A /* libRCTText-tvOS.a */, 540 | ); 541 | name = Products; 542 | sourceTree = ""; 543 | }; 544 | 83CBB9F61A601CBA00E9B192 = { 545 | isa = PBXGroup; 546 | children = ( 547 | 13B07FAE1A68108700A75B9A /* TwilioChatJsReactNative */, 548 | 832341AE1AAA6A7D00B99B32 /* Libraries */, 549 | 00E356EF1AD99517003FC87E /* TwilioChatJsReactNativeTests */, 550 | 83CBBA001A601CBA00E9B192 /* Products */, 551 | 2D16E6871FA4F8E400B85C8A /* Frameworks */, 552 | ); 553 | indentWidth = 2; 554 | sourceTree = ""; 555 | tabWidth = 2; 556 | usesTabs = 0; 557 | }; 558 | 83CBBA001A601CBA00E9B192 /* Products */ = { 559 | isa = PBXGroup; 560 | children = ( 561 | 13B07F961A680F5B00A75B9A /* TwilioChatJsReactNative.app */, 562 | ); 563 | name = Products; 564 | sourceTree = ""; 565 | }; 566 | ADBDB9201DFEBF0600ED6528 /* Products */ = { 567 | isa = PBXGroup; 568 | children = ( 569 | ADBDB9271DFEBF0700ED6528 /* libRCTBlob.a */, 570 | 2D16E6721FA4F8DC00B85C8A /* libRCTBlob-tvOS.a */, 571 | ); 572 | name = Products; 573 | sourceTree = ""; 574 | }; 575 | /* End PBXGroup section */ 576 | 577 | /* Begin PBXNativeTarget section */ 578 | 13B07F861A680F5B00A75B9A /* TwilioChatJsReactNative */ = { 579 | isa = PBXNativeTarget; 580 | buildConfigurationList = 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "TwilioChatJsReactNative" */; 581 | buildPhases = ( 582 | 13B07F871A680F5B00A75B9A /* Sources */, 583 | 13B07F8C1A680F5B00A75B9A /* Frameworks */, 584 | 13B07F8E1A680F5B00A75B9A /* Resources */, 585 | 00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */, 586 | ); 587 | buildRules = ( 588 | ); 589 | dependencies = ( 590 | ); 591 | name = TwilioChatJsReactNative; 592 | productName = "Hello World"; 593 | productReference = 13B07F961A680F5B00A75B9A /* TwilioChatJsReactNative.app */; 594 | productType = "com.apple.product-type.application"; 595 | }; 596 | /* End PBXNativeTarget section */ 597 | 598 | /* Begin PBXProject section */ 599 | 83CBB9F71A601CBA00E9B192 /* Project object */ = { 600 | isa = PBXProject; 601 | attributes = { 602 | LastUpgradeCheck = 0940; 603 | ORGANIZATIONNAME = Facebook; 604 | TargetAttributes = { 605 | 13B07F861A680F5B00A75B9A = { 606 | DevelopmentTeam = 7HS255F6G5; 607 | SystemCapabilities = { 608 | com.apple.BackgroundModes = { 609 | enabled = 1; 610 | }; 611 | com.apple.Push = { 612 | enabled = 1; 613 | }; 614 | }; 615 | }; 616 | }; 617 | }; 618 | buildConfigurationList = 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "TwilioChatJsReactNative" */; 619 | compatibilityVersion = "Xcode 3.2"; 620 | developmentRegion = English; 621 | hasScannedForEncodings = 0; 622 | knownRegions = ( 623 | English, 624 | en, 625 | Base, 626 | ); 627 | mainGroup = 83CBB9F61A601CBA00E9B192; 628 | productRefGroup = 83CBBA001A601CBA00E9B192 /* Products */; 629 | projectDirPath = ""; 630 | projectReferences = ( 631 | { 632 | ProductGroup = 00C302A81ABCB8CE00DB3ED1 /* Products */; 633 | ProjectRef = 00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */; 634 | }, 635 | { 636 | ProductGroup = 5E91572E1DD0AC6500FF2AA8 /* Products */; 637 | ProjectRef = 5E91572D1DD0AC6500FF2AA8 /* RCTAnimation.xcodeproj */; 638 | }, 639 | { 640 | ProductGroup = ADBDB9201DFEBF0600ED6528 /* Products */; 641 | ProjectRef = ADBDB91F1DFEBF0600ED6528 /* RCTBlob.xcodeproj */; 642 | }, 643 | { 644 | ProductGroup = 00C302B61ABCB90400DB3ED1 /* Products */; 645 | ProjectRef = 00C302B51ABCB90400DB3ED1 /* RCTGeolocation.xcodeproj */; 646 | }, 647 | { 648 | ProductGroup = 00C302BC1ABCB91800DB3ED1 /* Products */; 649 | ProjectRef = 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */; 650 | }, 651 | { 652 | ProductGroup = 78C398B11ACF4ADC00677621 /* Products */; 653 | ProjectRef = 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */; 654 | }, 655 | { 656 | ProductGroup = 00C302D41ABCB9D200DB3ED1 /* Products */; 657 | ProjectRef = 00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */; 658 | }, 659 | { 660 | ProductGroup = 4C09B6382292EF6F005F4714 /* Products */; 661 | ProjectRef = 4C09B6372292EF6F005F4714 /* RCTPushNotification.xcodeproj */; 662 | }, 663 | { 664 | ProductGroup = 139105B71AF99BAD00B5F7CC /* Products */; 665 | ProjectRef = 139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */; 666 | }, 667 | { 668 | ProductGroup = 832341B11AAA6A8300B99B32 /* Products */; 669 | ProjectRef = 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */; 670 | }, 671 | { 672 | ProductGroup = 00C302E01ABCB9EE00DB3ED1 /* Products */; 673 | ProjectRef = 00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */; 674 | }, 675 | { 676 | ProductGroup = 139FDEE71B06529A00C62182 /* Products */; 677 | ProjectRef = 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */; 678 | }, 679 | { 680 | ProductGroup = 146834001AC3E56700842450 /* Products */; 681 | ProjectRef = 146833FF1AC3E56700842450 /* React.xcodeproj */; 682 | }, 683 | ); 684 | projectRoot = ""; 685 | targets = ( 686 | 13B07F861A680F5B00A75B9A /* TwilioChatJsReactNative */, 687 | ); 688 | }; 689 | /* End PBXProject section */ 690 | 691 | /* Begin PBXReferenceProxy section */ 692 | 00C302AC1ABCB8CE00DB3ED1 /* libRCTActionSheet.a */ = { 693 | isa = PBXReferenceProxy; 694 | fileType = archive.ar; 695 | path = libRCTActionSheet.a; 696 | remoteRef = 00C302AB1ABCB8CE00DB3ED1 /* PBXContainerItemProxy */; 697 | sourceTree = BUILT_PRODUCTS_DIR; 698 | }; 699 | 00C302BA1ABCB90400DB3ED1 /* libRCTGeolocation.a */ = { 700 | isa = PBXReferenceProxy; 701 | fileType = archive.ar; 702 | path = libRCTGeolocation.a; 703 | remoteRef = 00C302B91ABCB90400DB3ED1 /* PBXContainerItemProxy */; 704 | sourceTree = BUILT_PRODUCTS_DIR; 705 | }; 706 | 00C302C01ABCB91800DB3ED1 /* libRCTImage.a */ = { 707 | isa = PBXReferenceProxy; 708 | fileType = archive.ar; 709 | path = libRCTImage.a; 710 | remoteRef = 00C302BF1ABCB91800DB3ED1 /* PBXContainerItemProxy */; 711 | sourceTree = BUILT_PRODUCTS_DIR; 712 | }; 713 | 00C302DC1ABCB9D200DB3ED1 /* libRCTNetwork.a */ = { 714 | isa = PBXReferenceProxy; 715 | fileType = archive.ar; 716 | path = libRCTNetwork.a; 717 | remoteRef = 00C302DB1ABCB9D200DB3ED1 /* PBXContainerItemProxy */; 718 | sourceTree = BUILT_PRODUCTS_DIR; 719 | }; 720 | 00C302E41ABCB9EE00DB3ED1 /* libRCTVibration.a */ = { 721 | isa = PBXReferenceProxy; 722 | fileType = archive.ar; 723 | path = libRCTVibration.a; 724 | remoteRef = 00C302E31ABCB9EE00DB3ED1 /* PBXContainerItemProxy */; 725 | sourceTree = BUILT_PRODUCTS_DIR; 726 | }; 727 | 139105C11AF99BAD00B5F7CC /* libRCTSettings.a */ = { 728 | isa = PBXReferenceProxy; 729 | fileType = archive.ar; 730 | path = libRCTSettings.a; 731 | remoteRef = 139105C01AF99BAD00B5F7CC /* PBXContainerItemProxy */; 732 | sourceTree = BUILT_PRODUCTS_DIR; 733 | }; 734 | 139FDEF41B06529B00C62182 /* libRCTWebSocket.a */ = { 735 | isa = PBXReferenceProxy; 736 | fileType = archive.ar; 737 | path = libRCTWebSocket.a; 738 | remoteRef = 139FDEF31B06529B00C62182 /* PBXContainerItemProxy */; 739 | sourceTree = BUILT_PRODUCTS_DIR; 740 | }; 741 | 146834041AC3E56700842450 /* libReact.a */ = { 742 | isa = PBXReferenceProxy; 743 | fileType = archive.ar; 744 | path = libReact.a; 745 | remoteRef = 146834031AC3E56700842450 /* PBXContainerItemProxy */; 746 | sourceTree = BUILT_PRODUCTS_DIR; 747 | }; 748 | 2D16E6721FA4F8DC00B85C8A /* libRCTBlob-tvOS.a */ = { 749 | isa = PBXReferenceProxy; 750 | fileType = archive.ar; 751 | path = "libRCTBlob-tvOS.a"; 752 | remoteRef = 2D16E6711FA4F8DC00B85C8A /* PBXContainerItemProxy */; 753 | sourceTree = BUILT_PRODUCTS_DIR; 754 | }; 755 | 2D16E6841FA4F8DC00B85C8A /* libfishhook.a */ = { 756 | isa = PBXReferenceProxy; 757 | fileType = archive.ar; 758 | path = libfishhook.a; 759 | remoteRef = 2D16E6831FA4F8DC00B85C8A /* PBXContainerItemProxy */; 760 | sourceTree = BUILT_PRODUCTS_DIR; 761 | }; 762 | 2D16E6861FA4F8DC00B85C8A /* libfishhook-tvOS.a */ = { 763 | isa = PBXReferenceProxy; 764 | fileType = archive.ar; 765 | path = "libfishhook-tvOS.a"; 766 | remoteRef = 2D16E6851FA4F8DC00B85C8A /* PBXContainerItemProxy */; 767 | sourceTree = BUILT_PRODUCTS_DIR; 768 | }; 769 | 2DF0FFDF2056DD460020B375 /* libjsinspector.a */ = { 770 | isa = PBXReferenceProxy; 771 | fileType = archive.ar; 772 | path = libjsinspector.a; 773 | remoteRef = 2DF0FFDE2056DD460020B375 /* PBXContainerItemProxy */; 774 | sourceTree = BUILT_PRODUCTS_DIR; 775 | }; 776 | 2DF0FFE12056DD460020B375 /* libjsinspector-tvOS.a */ = { 777 | isa = PBXReferenceProxy; 778 | fileType = archive.ar; 779 | path = "libjsinspector-tvOS.a"; 780 | remoteRef = 2DF0FFE02056DD460020B375 /* PBXContainerItemProxy */; 781 | sourceTree = BUILT_PRODUCTS_DIR; 782 | }; 783 | 2DF0FFE32056DD460020B375 /* libthird-party.a */ = { 784 | isa = PBXReferenceProxy; 785 | fileType = archive.ar; 786 | path = "libthird-party.a"; 787 | remoteRef = 2DF0FFE22056DD460020B375 /* PBXContainerItemProxy */; 788 | sourceTree = BUILT_PRODUCTS_DIR; 789 | }; 790 | 2DF0FFE52056DD460020B375 /* libthird-party.a */ = { 791 | isa = PBXReferenceProxy; 792 | fileType = archive.ar; 793 | path = "libthird-party.a"; 794 | remoteRef = 2DF0FFE42056DD460020B375 /* PBXContainerItemProxy */; 795 | sourceTree = BUILT_PRODUCTS_DIR; 796 | }; 797 | 2DF0FFE72056DD460020B375 /* libdouble-conversion.a */ = { 798 | isa = PBXReferenceProxy; 799 | fileType = archive.ar; 800 | path = "libdouble-conversion.a"; 801 | remoteRef = 2DF0FFE62056DD460020B375 /* PBXContainerItemProxy */; 802 | sourceTree = BUILT_PRODUCTS_DIR; 803 | }; 804 | 2DF0FFE92056DD460020B375 /* libdouble-conversion.a */ = { 805 | isa = PBXReferenceProxy; 806 | fileType = archive.ar; 807 | path = "libdouble-conversion.a"; 808 | remoteRef = 2DF0FFE82056DD460020B375 /* PBXContainerItemProxy */; 809 | sourceTree = BUILT_PRODUCTS_DIR; 810 | }; 811 | 3DAD3E841DF850E9000B6D8A /* libRCTImage-tvOS.a */ = { 812 | isa = PBXReferenceProxy; 813 | fileType = archive.ar; 814 | path = "libRCTImage-tvOS.a"; 815 | remoteRef = 3DAD3E831DF850E9000B6D8A /* PBXContainerItemProxy */; 816 | sourceTree = BUILT_PRODUCTS_DIR; 817 | }; 818 | 3DAD3E881DF850E9000B6D8A /* libRCTLinking-tvOS.a */ = { 819 | isa = PBXReferenceProxy; 820 | fileType = archive.ar; 821 | path = "libRCTLinking-tvOS.a"; 822 | remoteRef = 3DAD3E871DF850E9000B6D8A /* PBXContainerItemProxy */; 823 | sourceTree = BUILT_PRODUCTS_DIR; 824 | }; 825 | 3DAD3E8C1DF850E9000B6D8A /* libRCTNetwork-tvOS.a */ = { 826 | isa = PBXReferenceProxy; 827 | fileType = archive.ar; 828 | path = "libRCTNetwork-tvOS.a"; 829 | remoteRef = 3DAD3E8B1DF850E9000B6D8A /* PBXContainerItemProxy */; 830 | sourceTree = BUILT_PRODUCTS_DIR; 831 | }; 832 | 3DAD3E901DF850E9000B6D8A /* libRCTSettings-tvOS.a */ = { 833 | isa = PBXReferenceProxy; 834 | fileType = archive.ar; 835 | path = "libRCTSettings-tvOS.a"; 836 | remoteRef = 3DAD3E8F1DF850E9000B6D8A /* PBXContainerItemProxy */; 837 | sourceTree = BUILT_PRODUCTS_DIR; 838 | }; 839 | 3DAD3E941DF850E9000B6D8A /* libRCTText-tvOS.a */ = { 840 | isa = PBXReferenceProxy; 841 | fileType = archive.ar; 842 | path = "libRCTText-tvOS.a"; 843 | remoteRef = 3DAD3E931DF850E9000B6D8A /* PBXContainerItemProxy */; 844 | sourceTree = BUILT_PRODUCTS_DIR; 845 | }; 846 | 3DAD3E991DF850E9000B6D8A /* libRCTWebSocket-tvOS.a */ = { 847 | isa = PBXReferenceProxy; 848 | fileType = archive.ar; 849 | path = "libRCTWebSocket-tvOS.a"; 850 | remoteRef = 3DAD3E981DF850E9000B6D8A /* PBXContainerItemProxy */; 851 | sourceTree = BUILT_PRODUCTS_DIR; 852 | }; 853 | 3DAD3EA31DF850E9000B6D8A /* libReact.a */ = { 854 | isa = PBXReferenceProxy; 855 | fileType = archive.ar; 856 | path = libReact.a; 857 | remoteRef = 3DAD3EA21DF850E9000B6D8A /* PBXContainerItemProxy */; 858 | sourceTree = BUILT_PRODUCTS_DIR; 859 | }; 860 | 3DAD3EA51DF850E9000B6D8A /* libyoga.a */ = { 861 | isa = PBXReferenceProxy; 862 | fileType = archive.ar; 863 | path = libyoga.a; 864 | remoteRef = 3DAD3EA41DF850E9000B6D8A /* PBXContainerItemProxy */; 865 | sourceTree = BUILT_PRODUCTS_DIR; 866 | }; 867 | 3DAD3EA71DF850E9000B6D8A /* libyoga.a */ = { 868 | isa = PBXReferenceProxy; 869 | fileType = archive.ar; 870 | path = libyoga.a; 871 | remoteRef = 3DAD3EA61DF850E9000B6D8A /* PBXContainerItemProxy */; 872 | sourceTree = BUILT_PRODUCTS_DIR; 873 | }; 874 | 3DAD3EA91DF850E9000B6D8A /* libcxxreact.a */ = { 875 | isa = PBXReferenceProxy; 876 | fileType = archive.ar; 877 | path = libcxxreact.a; 878 | remoteRef = 3DAD3EA81DF850E9000B6D8A /* PBXContainerItemProxy */; 879 | sourceTree = BUILT_PRODUCTS_DIR; 880 | }; 881 | 3DAD3EAB1DF850E9000B6D8A /* libcxxreact.a */ = { 882 | isa = PBXReferenceProxy; 883 | fileType = archive.ar; 884 | path = libcxxreact.a; 885 | remoteRef = 3DAD3EAA1DF850E9000B6D8A /* PBXContainerItemProxy */; 886 | sourceTree = BUILT_PRODUCTS_DIR; 887 | }; 888 | 4C09B6492292EF6F005F4714 /* libRCTPushNotification.a */ = { 889 | isa = PBXReferenceProxy; 890 | fileType = archive.ar; 891 | path = libRCTPushNotification.a; 892 | remoteRef = 4C09B6482292EF6F005F4714 /* PBXContainerItemProxy */; 893 | sourceTree = BUILT_PRODUCTS_DIR; 894 | }; 895 | 4C09B64B2292EF6F005F4714 /* libRCTPushNotification-tvOS.a */ = { 896 | isa = PBXReferenceProxy; 897 | fileType = archive.ar; 898 | path = "libRCTPushNotification-tvOS.a"; 899 | remoteRef = 4C09B64A2292EF6F005F4714 /* PBXContainerItemProxy */; 900 | sourceTree = BUILT_PRODUCTS_DIR; 901 | }; 902 | 4C09B6662292EF6F005F4714 /* libjsi.a */ = { 903 | isa = PBXReferenceProxy; 904 | fileType = archive.ar; 905 | path = libjsi.a; 906 | remoteRef = 4C09B6652292EF6F005F4714 /* PBXContainerItemProxy */; 907 | sourceTree = BUILT_PRODUCTS_DIR; 908 | }; 909 | 4C09B6682292EF6F005F4714 /* libjsiexecutor.a */ = { 910 | isa = PBXReferenceProxy; 911 | fileType = archive.ar; 912 | path = libjsiexecutor.a; 913 | remoteRef = 4C09B6672292EF6F005F4714 /* PBXContainerItemProxy */; 914 | sourceTree = BUILT_PRODUCTS_DIR; 915 | }; 916 | 4C09B66A2292EF6F005F4714 /* libjsi-tvOS.a */ = { 917 | isa = PBXReferenceProxy; 918 | fileType = archive.ar; 919 | path = "libjsi-tvOS.a"; 920 | remoteRef = 4C09B6692292EF6F005F4714 /* PBXContainerItemProxy */; 921 | sourceTree = BUILT_PRODUCTS_DIR; 922 | }; 923 | 4C09B66C2292EF6F005F4714 /* libjsiexecutor-tvOS.a */ = { 924 | isa = PBXReferenceProxy; 925 | fileType = archive.ar; 926 | path = "libjsiexecutor-tvOS.a"; 927 | remoteRef = 4C09B66B2292EF6F005F4714 /* PBXContainerItemProxy */; 928 | sourceTree = BUILT_PRODUCTS_DIR; 929 | }; 930 | 5E9157331DD0AC6500FF2AA8 /* libRCTAnimation.a */ = { 931 | isa = PBXReferenceProxy; 932 | fileType = archive.ar; 933 | path = libRCTAnimation.a; 934 | remoteRef = 5E9157321DD0AC6500FF2AA8 /* PBXContainerItemProxy */; 935 | sourceTree = BUILT_PRODUCTS_DIR; 936 | }; 937 | 5E9157351DD0AC6500FF2AA8 /* libRCTAnimation.a */ = { 938 | isa = PBXReferenceProxy; 939 | fileType = archive.ar; 940 | path = libRCTAnimation.a; 941 | remoteRef = 5E9157341DD0AC6500FF2AA8 /* PBXContainerItemProxy */; 942 | sourceTree = BUILT_PRODUCTS_DIR; 943 | }; 944 | 78C398B91ACF4ADC00677621 /* libRCTLinking.a */ = { 945 | isa = PBXReferenceProxy; 946 | fileType = archive.ar; 947 | path = libRCTLinking.a; 948 | remoteRef = 78C398B81ACF4ADC00677621 /* PBXContainerItemProxy */; 949 | sourceTree = BUILT_PRODUCTS_DIR; 950 | }; 951 | 832341B51AAA6A8300B99B32 /* libRCTText.a */ = { 952 | isa = PBXReferenceProxy; 953 | fileType = archive.ar; 954 | path = libRCTText.a; 955 | remoteRef = 832341B41AAA6A8300B99B32 /* PBXContainerItemProxy */; 956 | sourceTree = BUILT_PRODUCTS_DIR; 957 | }; 958 | ADBDB9271DFEBF0700ED6528 /* libRCTBlob.a */ = { 959 | isa = PBXReferenceProxy; 960 | fileType = archive.ar; 961 | path = libRCTBlob.a; 962 | remoteRef = ADBDB9261DFEBF0700ED6528 /* PBXContainerItemProxy */; 963 | sourceTree = BUILT_PRODUCTS_DIR; 964 | }; 965 | /* End PBXReferenceProxy section */ 966 | 967 | /* Begin PBXResourcesBuildPhase section */ 968 | 13B07F8E1A680F5B00A75B9A /* Resources */ = { 969 | isa = PBXResourcesBuildPhase; 970 | buildActionMask = 2147483647; 971 | files = ( 972 | 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */, 973 | 13B07FBD1A68108700A75B9A /* LaunchScreen.xib in Resources */, 974 | ); 975 | runOnlyForDeploymentPostprocessing = 0; 976 | }; 977 | /* End PBXResourcesBuildPhase section */ 978 | 979 | /* Begin PBXShellScriptBuildPhase section */ 980 | 00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */ = { 981 | isa = PBXShellScriptBuildPhase; 982 | buildActionMask = 2147483647; 983 | files = ( 984 | ); 985 | inputPaths = ( 986 | ); 987 | name = "Bundle React Native code and images"; 988 | outputPaths = ( 989 | ); 990 | runOnlyForDeploymentPostprocessing = 0; 991 | shellPath = /bin/sh; 992 | shellScript = "export NODE_BINARY=node\n../node_modules/react-native/scripts/react-native-xcode.sh"; 993 | }; 994 | /* End PBXShellScriptBuildPhase section */ 995 | 996 | /* Begin PBXSourcesBuildPhase section */ 997 | 13B07F871A680F5B00A75B9A /* Sources */ = { 998 | isa = PBXSourcesBuildPhase; 999 | buildActionMask = 2147483647; 1000 | files = ( 1001 | 13B07FBC1A68108700A75B9A /* AppDelegate.m in Sources */, 1002 | 13B07FC11A68108700A75B9A /* main.m in Sources */, 1003 | ); 1004 | runOnlyForDeploymentPostprocessing = 0; 1005 | }; 1006 | /* End PBXSourcesBuildPhase section */ 1007 | 1008 | /* Begin PBXVariantGroup section */ 1009 | 13B07FB11A68108700A75B9A /* LaunchScreen.xib */ = { 1010 | isa = PBXVariantGroup; 1011 | children = ( 1012 | 13B07FB21A68108700A75B9A /* Base */, 1013 | ); 1014 | name = LaunchScreen.xib; 1015 | path = TwilioChatJsReactNative; 1016 | sourceTree = ""; 1017 | }; 1018 | /* End PBXVariantGroup section */ 1019 | 1020 | /* Begin XCBuildConfiguration section */ 1021 | 13B07F941A680F5B00A75B9A /* Debug */ = { 1022 | isa = XCBuildConfiguration; 1023 | buildSettings = { 1024 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 1025 | CODE_SIGN_ENTITLEMENTS = TwilioChatJsReactNative/TwilioChatJsReactNative.entitlements; 1026 | CURRENT_PROJECT_VERSION = 1; 1027 | DEAD_CODE_STRIPPING = NO; 1028 | DEVELOPMENT_TEAM = 7HS255F6G5; 1029 | INFOPLIST_FILE = TwilioChatJsReactNative/Info.plist; 1030 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 1031 | OTHER_LDFLAGS = ( 1032 | "$(inherited)", 1033 | "-ObjC", 1034 | "-lc++", 1035 | ); 1036 | PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)"; 1037 | PRODUCT_NAME = TwilioChatJsReactNative; 1038 | TARGETED_DEVICE_FAMILY = "1,2"; 1039 | VERSIONING_SYSTEM = "apple-generic"; 1040 | }; 1041 | name = Debug; 1042 | }; 1043 | 13B07F951A680F5B00A75B9A /* Release */ = { 1044 | isa = XCBuildConfiguration; 1045 | buildSettings = { 1046 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 1047 | CODE_SIGN_ENTITLEMENTS = TwilioChatJsReactNative/TwilioChatJsReactNative.entitlements; 1048 | CURRENT_PROJECT_VERSION = 1; 1049 | DEVELOPMENT_TEAM = 7HS255F6G5; 1050 | INFOPLIST_FILE = TwilioChatJsReactNative/Info.plist; 1051 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 1052 | OTHER_LDFLAGS = ( 1053 | "$(inherited)", 1054 | "-ObjC", 1055 | "-lc++", 1056 | ); 1057 | PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)"; 1058 | PRODUCT_NAME = TwilioChatJsReactNative; 1059 | TARGETED_DEVICE_FAMILY = "1,2"; 1060 | VERSIONING_SYSTEM = "apple-generic"; 1061 | }; 1062 | name = Release; 1063 | }; 1064 | 83CBBA201A601CBA00E9B192 /* Debug */ = { 1065 | isa = XCBuildConfiguration; 1066 | buildSettings = { 1067 | ALWAYS_SEARCH_USER_PATHS = NO; 1068 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 1069 | CLANG_CXX_LIBRARY = "libc++"; 1070 | CLANG_ENABLE_MODULES = YES; 1071 | CLANG_ENABLE_OBJC_ARC = YES; 1072 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 1073 | CLANG_WARN_BOOL_CONVERSION = YES; 1074 | CLANG_WARN_COMMA = YES; 1075 | CLANG_WARN_CONSTANT_CONVERSION = YES; 1076 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 1077 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 1078 | CLANG_WARN_EMPTY_BODY = YES; 1079 | CLANG_WARN_ENUM_CONVERSION = YES; 1080 | CLANG_WARN_INFINITE_RECURSION = YES; 1081 | CLANG_WARN_INT_CONVERSION = YES; 1082 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 1083 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 1084 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 1085 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 1086 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 1087 | CLANG_WARN_STRICT_PROTOTYPES = YES; 1088 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 1089 | CLANG_WARN_UNREACHABLE_CODE = YES; 1090 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 1091 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 1092 | COPY_PHASE_STRIP = NO; 1093 | ENABLE_STRICT_OBJC_MSGSEND = YES; 1094 | ENABLE_TESTABILITY = YES; 1095 | GCC_C_LANGUAGE_STANDARD = gnu99; 1096 | GCC_DYNAMIC_NO_PIC = NO; 1097 | GCC_NO_COMMON_BLOCKS = YES; 1098 | GCC_OPTIMIZATION_LEVEL = 0; 1099 | GCC_PREPROCESSOR_DEFINITIONS = ( 1100 | "DEBUG=1", 1101 | "$(inherited)", 1102 | ); 1103 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 1104 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 1105 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 1106 | GCC_WARN_UNDECLARED_SELECTOR = YES; 1107 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 1108 | GCC_WARN_UNUSED_FUNCTION = YES; 1109 | GCC_WARN_UNUSED_VARIABLE = YES; 1110 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 1111 | MTL_ENABLE_DEBUG_INFO = YES; 1112 | ONLY_ACTIVE_ARCH = YES; 1113 | SDKROOT = iphoneos; 1114 | }; 1115 | name = Debug; 1116 | }; 1117 | 83CBBA211A601CBA00E9B192 /* Release */ = { 1118 | isa = XCBuildConfiguration; 1119 | buildSettings = { 1120 | ALWAYS_SEARCH_USER_PATHS = NO; 1121 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 1122 | CLANG_CXX_LIBRARY = "libc++"; 1123 | CLANG_ENABLE_MODULES = YES; 1124 | CLANG_ENABLE_OBJC_ARC = YES; 1125 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 1126 | CLANG_WARN_BOOL_CONVERSION = YES; 1127 | CLANG_WARN_COMMA = YES; 1128 | CLANG_WARN_CONSTANT_CONVERSION = YES; 1129 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 1130 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 1131 | CLANG_WARN_EMPTY_BODY = YES; 1132 | CLANG_WARN_ENUM_CONVERSION = YES; 1133 | CLANG_WARN_INFINITE_RECURSION = YES; 1134 | CLANG_WARN_INT_CONVERSION = YES; 1135 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 1136 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 1137 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 1138 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 1139 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 1140 | CLANG_WARN_STRICT_PROTOTYPES = YES; 1141 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 1142 | CLANG_WARN_UNREACHABLE_CODE = YES; 1143 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 1144 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 1145 | COPY_PHASE_STRIP = YES; 1146 | ENABLE_NS_ASSERTIONS = NO; 1147 | ENABLE_STRICT_OBJC_MSGSEND = YES; 1148 | GCC_C_LANGUAGE_STANDARD = gnu99; 1149 | GCC_NO_COMMON_BLOCKS = YES; 1150 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 1151 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 1152 | GCC_WARN_UNDECLARED_SELECTOR = YES; 1153 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 1154 | GCC_WARN_UNUSED_FUNCTION = YES; 1155 | GCC_WARN_UNUSED_VARIABLE = YES; 1156 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 1157 | MTL_ENABLE_DEBUG_INFO = NO; 1158 | SDKROOT = iphoneos; 1159 | VALIDATE_PRODUCT = YES; 1160 | }; 1161 | name = Release; 1162 | }; 1163 | /* End XCBuildConfiguration section */ 1164 | 1165 | /* Begin XCConfigurationList section */ 1166 | 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "TwilioChatJsReactNative" */ = { 1167 | isa = XCConfigurationList; 1168 | buildConfigurations = ( 1169 | 13B07F941A680F5B00A75B9A /* Debug */, 1170 | 13B07F951A680F5B00A75B9A /* Release */, 1171 | ); 1172 | defaultConfigurationIsVisible = 0; 1173 | defaultConfigurationName = Release; 1174 | }; 1175 | 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "TwilioChatJsReactNative" */ = { 1176 | isa = XCConfigurationList; 1177 | buildConfigurations = ( 1178 | 83CBBA201A601CBA00E9B192 /* Debug */, 1179 | 83CBBA211A601CBA00E9B192 /* Release */, 1180 | ); 1181 | defaultConfigurationIsVisible = 0; 1182 | defaultConfigurationName = Release; 1183 | }; 1184 | /* End XCConfigurationList section */ 1185 | }; 1186 | rootObject = 83CBB9F71A601CBA00E9B192 /* Project object */; 1187 | } 1188 | -------------------------------------------------------------------------------- /ios/TwilioChatJsReactNative.xcodeproj/xcshareddata/xcschemes/TwilioChatJsReactNative-tvOS.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 29 | 35 | 36 | 37 | 43 | 49 | 50 | 51 | 52 | 53 | 58 | 59 | 61 | 67 | 68 | 69 | 70 | 71 | 77 | 78 | 79 | 80 | 81 | 82 | 92 | 94 | 100 | 101 | 102 | 103 | 104 | 105 | 111 | 113 | 119 | 120 | 121 | 122 | 124 | 125 | 128 | 129 | 130 | -------------------------------------------------------------------------------- /ios/TwilioChatJsReactNative.xcodeproj/xcshareddata/xcschemes/TwilioChatJsReactNative.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 29 | 35 | 36 | 37 | 43 | 49 | 50 | 51 | 52 | 53 | 58 | 59 | 60 | 61 | 67 | 68 | 69 | 70 | 71 | 72 | 82 | 84 | 90 | 91 | 92 | 93 | 94 | 95 | 101 | 103 | 109 | 110 | 111 | 112 | 114 | 115 | 118 | 119 | 120 | -------------------------------------------------------------------------------- /ios/TwilioChatJsReactNative/AppDelegate.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Facebook, Inc. and its affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | */ 7 | 8 | #import 9 | #import 10 | 11 | @interface AppDelegate : UIResponder 12 | 13 | @property (nonatomic, strong) UIWindow *window; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /ios/TwilioChatJsReactNative/AppDelegate.m: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Facebook, Inc. and its affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | */ 7 | 8 | #import "AppDelegate.h" 9 | 10 | #import 11 | #import 12 | #import 13 | #import 14 | 15 | @implementation AppDelegate 16 | 17 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 18 | { 19 | RCTBridge *bridge = [[RCTBridge alloc] initWithDelegate:self launchOptions:launchOptions]; 20 | RCTRootView *rootView = [[RCTRootView alloc] initWithBridge:bridge 21 | moduleName:@"TwilioChatJsReactNative" 22 | initialProperties:nil]; 23 | 24 | rootView.backgroundColor = [[UIColor alloc] initWithRed:1.0f green:1.0f blue:1.0f alpha:1]; 25 | 26 | self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds]; 27 | UIViewController *rootViewController = [UIViewController new]; 28 | rootViewController.view = rootView; 29 | self.window.rootViewController = rootViewController; 30 | [self.window makeKeyAndVisible]; 31 | return YES; 32 | } 33 | 34 | // Required to register for notifications 35 | - (void)application:(UIApplication *)application didRegisterUserNotificationSettings:(UIUserNotificationSettings *)notificationSettings 36 | { 37 | [RCTPushNotificationManager didRegisterUserNotificationSettings:notificationSettings]; 38 | } 39 | // Required for the register event. 40 | - (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken 41 | { 42 | [RCTPushNotificationManager didRegisterForRemoteNotificationsWithDeviceToken:deviceToken]; 43 | } 44 | // Required for the notification event. You must call the completion handler after handling the remote notification. 45 | - (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo 46 | fetchCompletionHandler:(void (^)(UIBackgroundFetchResult))completionHandler 47 | { 48 | [RCTPushNotificationManager didReceiveRemoteNotification:userInfo fetchCompletionHandler:completionHandler]; 49 | } 50 | // Required for the registrationError event. 51 | - (void)application:(UIApplication *)application didFailToRegisterForRemoteNotificationsWithError:(NSError *)error 52 | { 53 | [RCTPushNotificationManager didFailToRegisterForRemoteNotificationsWithError:error]; 54 | } 55 | // Required for the localNotification event. 56 | - (void)application:(UIApplication *)application didReceiveLocalNotification:(UILocalNotification *)notification 57 | { 58 | [RCTPushNotificationManager didReceiveLocalNotification:notification]; 59 | } 60 | 61 | - (NSURL *)sourceURLForBridge:(RCTBridge *)bridge 62 | { 63 | #if DEBUG 64 | return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil]; 65 | #else 66 | return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"]; 67 | #endif 68 | } 69 | 70 | @end 71 | -------------------------------------------------------------------------------- /ios/TwilioChatJsReactNative/Base.lproj/LaunchScreen.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 21 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /ios/TwilioChatJsReactNative/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "29x29", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "40x40", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "40x40", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "60x60", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "60x60", 31 | "scale" : "3x" 32 | } 33 | ], 34 | "info" : { 35 | "version" : 1, 36 | "author" : "xcode" 37 | } 38 | } -------------------------------------------------------------------------------- /ios/TwilioChatJsReactNative/Images.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /ios/TwilioChatJsReactNative/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | TwilioChatJsReactNative 9 | CFBundleExecutable 10 | $(EXECUTABLE_NAME) 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | $(PRODUCT_NAME) 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1 25 | LSRequiresIPhoneOS 26 | 27 | NSAppTransportSecurity 28 | 29 | NSAllowsArbitraryLoads 30 | 31 | NSExceptionDomains 32 | 33 | localhost 34 | 35 | NSExceptionAllowsInsecureHTTPLoads 36 | 37 | 38 | 39 | 40 | NSLocationWhenInUseUsageDescription 41 | 42 | UIBackgroundModes 43 | 44 | fetch 45 | remote-notification 46 | voip 47 | 48 | UILaunchStoryboardName 49 | LaunchScreen 50 | UIRequiredDeviceCapabilities 51 | 52 | armv7 53 | 54 | UISupportedInterfaceOrientations 55 | 56 | UIInterfaceOrientationPortrait 57 | UIInterfaceOrientationLandscapeLeft 58 | UIInterfaceOrientationLandscapeRight 59 | 60 | UIViewControllerBasedStatusBarAppearance 61 | 62 | 63 | 64 | -------------------------------------------------------------------------------- /ios/TwilioChatJsReactNative/TwilioChatJsReactNative.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | aps-environment 6 | development 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/TwilioChatJsReactNative/main.m: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Facebook, Inc. and its affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | */ 7 | 8 | #import 9 | 10 | #import "AppDelegate.h" 11 | 12 | int main(int argc, char * argv[]) { 13 | @autoreleasepool { 14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /ios/TwilioChatJsReactNativeTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /ios/TwilioChatJsReactNativeTests/TwilioChatJsReactNativeTests.m: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Facebook, Inc. and its affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | */ 7 | 8 | #import 9 | #import 10 | 11 | #import 12 | #import 13 | 14 | #define TIMEOUT_SECONDS 600 15 | #define TEXT_TO_LOOK_FOR @"Welcome to React Native!" 16 | 17 | @interface TwilioChatJsReactNativeTests : XCTestCase 18 | 19 | @end 20 | 21 | @implementation TwilioChatJsReactNativeTests 22 | 23 | - (BOOL)findSubviewInView:(UIView *)view matching:(BOOL(^)(UIView *view))test 24 | { 25 | if (test(view)) { 26 | return YES; 27 | } 28 | for (UIView *subview in [view subviews]) { 29 | if ([self findSubviewInView:subview matching:test]) { 30 | return YES; 31 | } 32 | } 33 | return NO; 34 | } 35 | 36 | - (void)testRendersWelcomeScreen 37 | { 38 | UIViewController *vc = [[[RCTSharedApplication() delegate] window] rootViewController]; 39 | NSDate *date = [NSDate dateWithTimeIntervalSinceNow:TIMEOUT_SECONDS]; 40 | BOOL foundElement = NO; 41 | 42 | __block NSString *redboxError = nil; 43 | RCTSetLogFunction(^(RCTLogLevel level, RCTLogSource source, NSString *fileName, NSNumber *lineNumber, NSString *message) { 44 | if (level >= RCTLogLevelError) { 45 | redboxError = message; 46 | } 47 | }); 48 | 49 | while ([date timeIntervalSinceNow] > 0 && !foundElement && !redboxError) { 50 | [[NSRunLoop mainRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]]; 51 | [[NSRunLoop mainRunLoop] runMode:NSRunLoopCommonModes beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]]; 52 | 53 | foundElement = [self findSubviewInView:vc.view matching:^BOOL(UIView *view) { 54 | if ([view.accessibilityLabel isEqualToString:TEXT_TO_LOOK_FOR]) { 55 | return YES; 56 | } 57 | return NO; 58 | }]; 59 | } 60 | 61 | RCTSetLogFunction(RCTDefaultLogFunction); 62 | 63 | XCTAssertNil(redboxError, @"RedBox error: %@", redboxError); 64 | XCTAssertTrue(foundElement, @"Couldn't find element with text '%@' in %d seconds", TEXT_TO_LOOK_FOR, TIMEOUT_SECONDS); 65 | } 66 | 67 | 68 | @end 69 | -------------------------------------------------------------------------------- /js/ApnsSupportModule.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | import { AlertIOS, PushNotificationIOS } from "react-native"; 3 | 4 | export default class ApnsSupport { 5 | 6 | static registerForPushCallback(log, client) { 7 | log.info('ApnsSupportModule.JS.registerForPushCallback', 'requesting APN token'); 8 | 9 | PushNotificationIOS.addEventListener(`register`, function(token) { 10 | log.info('ApnsSupportModule.JS.registerForPushCallback', 'got new APN token', token); 11 | client.setPushRegistrationId('apn', token); 12 | }); 13 | 14 | PushNotificationIOS.addEventListener(`registrationError`, function(err) { 15 | log.error('ApnsSupportModule.JS.registerForPushCallback', 'error registering for notifications', err); 16 | }); 17 | 18 | PushNotificationIOS.addEventListener('notification', function(notification) { 19 | // TODO: here we need to pass the full `raw` notification to the Chat 20 | // library. however, I couldn't find the way to get the raw json from APN 21 | // notification in react native, so, I had to construct the payload again. 22 | // Send in PRs if you know the right way :) 23 | log.info('ApnsSupportModule.JS.registerForPushCallback', 'got new APN push event', notification); 24 | let rawNotification : Object = Object.assign(notification._data); 25 | if (!rawNotification.aps) { 26 | rawNotification.aps = {}; 27 | } 28 | 29 | rawNotification.aps.alert = notification._alert; 30 | if (typeof notification._badgeCount !== 'undefined') { 31 | PushNotificationIOS.setApplicationIconBadgeNumber(notification._badgeCount); 32 | rawNotification.aps.badge = notification._badgeCount; 33 | } 34 | if (typeof notification._sound !== 'undefined') { 35 | rawNotification.aps.sound = notification._sound; 36 | 37 | } 38 | log.info('ApnsSupportModule.JS.registerForPushCallback', 'formed RAW notification', rawNotification); 39 | client.handlePushNotification(rawNotification); 40 | } 41 | ); 42 | 43 | PushNotificationIOS.requestPermissions() 44 | .then((permissions) => { 45 | log.info('ApnsSupportModule.JS.registerForPushCallback', 'successfully requested permissions', permissions); 46 | }).catch(err => { 47 | log.error('ApnsSupportModule.JS.registerForPushCallback', 'error while requesting permissions', err); 48 | }); 49 | } 50 | 51 | static showPushCallback(log, push) { 52 | log.info('ApnsSupportModule.JS.showPushCallback', 'show notification', push); 53 | AlertIOS.alert( 54 | push.messageType, 55 | push.body 56 | ); 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /js/FCMParsePush.js: -------------------------------------------------------------------------------- 1 | import { Client as TwilioChatClient } from "twilio-chat"; 2 | 3 | // if you want to send the raw push to the JS library to reparse 4 | // (while app is not running), you can use this react native pattern to call static JS method 5 | module.exports = async (taskData) => { 6 | let push = TwilioChatClient.parsePushNotification(taskData); 7 | // do anything with parsed push from JS code 8 | }; -------------------------------------------------------------------------------- /js/FirebaseSupportModule.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | /** 3 | * This exposes the native FirebaseSupportModule as a JS module. This has a 4 | * function 'showNotification' which takes the following parameters: 5 | * 6 | * 1. String message: A string with the text to toast 7 | */ 8 | import { DeviceEventEmitter, NativeModules, ToastAndroid } from "react-native"; 9 | 10 | export default class FirebaseSupport { 11 | static registerForPushCallback(log, client) { 12 | log.info('FirebaseSupportModule.JS.registerForPushCallback', 'requesting FCM token'); 13 | NativeModules.FirebaseSupportModule.getFcmToken() 14 | .then((fcmToken) => { 15 | log.info('FirebaseSupportModule.JS.registerForPushCallback', 'got new FCM token', fcmToken); 16 | client.setPushRegistrationId('fcm', fcmToken); 17 | 18 | }).catch((err) => { 19 | log.error('FirebaseSupportModule.JS.registerForPushCallback', 'error while requesting FCM token', err); 20 | }); 21 | 22 | DeviceEventEmitter.addListener('fcmNotificationToJs', function(e : Event) { 23 | log.info('FirebaseSupportModule.JS.registerForPushCallback', 'got new FCM push event', e); 24 | client.handlePushNotification(e); 25 | }); 26 | } 27 | 28 | static showPushCallback(log, push) { 29 | log.info('FirebaseSupportModule.JS.showPushCallback', 'show notification', push); 30 | ToastAndroid.showWithGravity(push.body, ToastAndroid.LONG, ToastAndroid.TOP); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /js/chat-client-helper.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | import { Client as TwilioChatClient } from "twilio-chat"; 4 | import { Buffer } from "buffer"; 5 | import "react-native"; 6 | 7 | export default class ChatClientHelper { 8 | host; 9 | basicAuthHeaders; 10 | log; 11 | client; 12 | 13 | constructor(tokenAndConfigurationProviderHost, basicAuth, log) { 14 | this.host = tokenAndConfigurationProviderHost; 15 | if (basicAuth) { 16 | this.basicAuthHeaders = 17 | new Headers({ 18 | "Authorization": 19 | `Basic ${ Buffer.from(`${ basicAuth.username }:${ basicAuth.password }`).toString("base64") }` 20 | }) 21 | } 22 | this.basicAuth = basicAuth; 23 | this.log = log; 24 | this.client = null; 25 | } 26 | 27 | login(identity, pushChannel, registerForPushCallback, showPushCallback) { 28 | let that = this; 29 | return fetch(`${ this.host }/chat-client-configuration.json`, { headers: this.basicAuthHeaders }) 30 | .then((response) => { 31 | let chatClientConfig = response.json(); 32 | that.log.info('login', 'Got Chat client configuration', chatClientConfig); 33 | return this.getToken(identity, pushChannel) 34 | .then(function(token) { 35 | that.log.info('ChatClientHelper', 'got chat token', token); 36 | return TwilioChatClient.create(token, chatClientConfig.options || {}).then((chatClient) => { 37 | that.client = chatClient; 38 | that.client.on('tokenAboutToExpire', () => { 39 | that.getToken(identity, pushChannel) 40 | .then(newData => that.client.updateToken(newData)) 41 | .catch((err) => { 42 | that.log.error('login', 'can\'t get token', err); 43 | }) 44 | }); 45 | that.client.on('pushNotification', obj => { 46 | if (obj && showPushCallback) { 47 | showPushCallback(that.log, obj); 48 | } 49 | }); 50 | that.subscribeToAllChatClientEvents(); 51 | if (registerForPushCallback) { 52 | registerForPushCallback(that.log, that.client); 53 | } 54 | }); 55 | }) 56 | .catch((err) => { 57 | that.log.error('login', 'can\'t get token', err); 58 | }); 59 | }) 60 | .catch((err) => { 61 | that.log.error('login', 'can\'t fetch Chat Client configuration', err); 62 | }); 63 | } 64 | 65 | getToken(identity, pushChannel) { 66 | if (!pushChannel) { 67 | pushChannel = 'none'; 68 | } 69 | return fetch(`${ this.host }/token?identity=${ identity }&pushChannel=${ pushChannel }`, 70 | { headers: this.basicAuthHeaders }) 71 | .then(response => { 72 | return response.text(); 73 | }); 74 | } 75 | 76 | subscribeToAllChatClientEvents() { 77 | this.client.on('tokenAboutToExpire', 78 | obj => this.log.event('ChatClientHelper.client', 'tokenAboutToExpire', obj)); 79 | this.client.on('tokenExpired', obj => this.log.event('ChatClientHelper.client', 'tokenExpired', obj)); 80 | 81 | this.client.on('userSubscribed', obj => this.log.event('ChatClientHelper.client', 'userSubscribed', obj)); 82 | this.client.on('userUpdated', obj => this.log.event('ChatClientHelper.client', 'userUpdated', obj)); 83 | this.client.on('userUnsubscribed', obj => this.log.event('ChatClientHelper.client', 'userUnsubscribed', obj)); 84 | 85 | this.client.on('channelAdded', obj => this.log.event('ChatClientHelper.client', 'channelAdded', obj)); 86 | this.client.on('channelRemoved', obj => this.log.event('ChatClientHelper.client', 'channelRemoved', obj)); 87 | this.client.on('channelInvited', obj => this.log.event('ChatClientHelper.client', 'channelInvited', obj)); 88 | this.client.on('channelJoined', obj => { 89 | this.log.event('ChatClientHelper.client', 'channelJoined', obj); 90 | obj.getMessages(1).then(messagesPaginator => { 91 | messagesPaginator.items.forEach(message => { 92 | this.log.info('ChatClientHelper.client', obj.sid + ' last message sid ' + message.sid) 93 | }) 94 | }) 95 | }); 96 | this.client.on('channelLeft', obj => this.log.event('ChatClientHelper.client', 'channelLeft', obj)); 97 | this.client.on('channelUpdated', obj => this.log.event('ChatClientHelper.client', 'channelUpdated', obj)); 98 | 99 | this.client.on('memberJoined', obj => this.log.event('ChatClientHelper.client', 'memberJoined', obj)); 100 | this.client.on('memberLeft', obj => this.log.event('ChatClientHelper.client', 'memberLeft', obj)); 101 | this.client.on('memberUpdated', obj => this.log.event('ChatClientHelper.client', 'memberUpdated', obj)); 102 | 103 | this.client.on('messageAdded', obj => this.log.event('ChatClientHelper.client', 'messageAdded', obj)); 104 | this.client.on('messageUpdated', obj => this.log.event('ChatClientHelper.client', 'messageUpdated', obj)); 105 | this.client.on('messageRemoved', obj => this.log.event('ChatClientHelper.client', 'messageRemoved', obj)); 106 | 107 | this.client.on('typingStarted', obj => this.log.event('ChatClientHelper.client', 'typingStarted', obj)); 108 | this.client.on('typingEnded', obj => this.log.event('ChatClientHelper.client', 'typingEnded', obj)); 109 | 110 | this.client.on('connectionStateChanged', 111 | obj => this.log.event('ChatClientHelper.client', 'connectionStateChanged', obj)); 112 | 113 | this.client.on('pushNotification', obj => this.log.event('ChatClientHelper.client', 'onPushNotification', obj)); 114 | } 115 | }; 116 | -------------------------------------------------------------------------------- /js/components/Button.js: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react'; 2 | 3 | import { 4 | StyleSheet, 5 | Text, 6 | TouchableHighlight, 7 | } from 'react-native'; 8 | 9 | const Button = (props) => { 10 | 11 | function getContent() { 12 | if (props.children) { 13 | return props.children; 14 | } 15 | return { props.label } 16 | } 17 | 18 | return ( 19 | 26 | { getContent() } 27 | 28 | ); 29 | }; 30 | 31 | const styles = StyleSheet.create({ 32 | button: { 33 | alignItems: 'center', 34 | justifyContent: 'center', 35 | padding: 20 36 | }, 37 | }); 38 | 39 | export default Button; -------------------------------------------------------------------------------- /js/components/Container.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | 3 | import { 4 | StyleSheet, 5 | View 6 | } from 'react-native'; 7 | 8 | const Container = (props) => { 9 | return ( 10 | 11 | { props.children } 12 | 13 | ); 14 | }; 15 | 16 | const styles = StyleSheet.create({ 17 | labelContainer: { 18 | marginBottom: 20 19 | } 20 | }); 21 | 22 | export default Container; -------------------------------------------------------------------------------- /js/components/EventsLog.js: -------------------------------------------------------------------------------- 1 | import React, { Component } from "react"; 2 | 3 | import { ScrollView, StyleSheet, Text } from "react-native"; 4 | 5 | import Container from "./Container"; 6 | 7 | export default class EventsLog extends Component { 8 | 9 | render() { 10 | return ( 11 | { 15 | this.refs._scrollView.scrollToEnd({ animated: true }); 16 | } }> 17 | 18 | 19 | { this.props.eventslog } 20 | 21 | 22 |   23 | 24 | 25 | 26 | ); 27 | } 28 | } 29 | 30 | const styles = StyleSheet.create({ 31 | scroll: { 32 | backgroundColor: '#FFFFFF', 33 | padding: 30, 34 | flexDirection: 'column' 35 | } 36 | }); -------------------------------------------------------------------------------- /js/components/Label.js: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | 3 | import { StyleSheet, Text } from "react-native"; 4 | 5 | const Label = (props) => { 6 | return ( 7 | 10 | { props.text } 11 | 12 | ); 13 | } 14 | 15 | const styles = StyleSheet.create({ 16 | textLabel: { 17 | fontSize: 20, 18 | fontWeight: 'bold', 19 | fontFamily: 'Verdana', 20 | marginBottom: 10, 21 | color: '#0D122B' 22 | } 23 | }); 24 | 25 | export default Label; -------------------------------------------------------------------------------- /js/components/Login.js: -------------------------------------------------------------------------------- 1 | import React, { Component } from "react"; 2 | 3 | import { ScrollView, StyleSheet, TextInput } from "react-native"; 4 | 5 | import Container from "./Container"; 6 | import Button from "./Button"; 7 | import Label from "./Label"; 8 | 9 | export default class Login extends Component { 10 | 11 | state = { 12 | host: this.props.host, 13 | username: '' 14 | }; 15 | 16 | render() { 17 | return ( 18 | 19 | 20 | 31 | 32 | 33 | 44 | 45 | 46 |