├── .all-contributorsrc ├── .eslintignore ├── .eslintrc.js ├── .gitignore ├── .prettierrc.js ├── LICENSE ├── README.md ├── babel.config.js ├── babel.js ├── example ├── .buckconfig ├── .eslintignore ├── .eslintrc.js ├── .gitattributes ├── .gitignore ├── .prettierrc.js ├── .watchmanconfig ├── README.md ├── android │ ├── app │ │ ├── _BUCK │ │ ├── build.gradle │ │ ├── build_defs.bzl │ │ ├── debug.keystore │ │ ├── proguard-rules.pro │ │ └── src │ │ │ ├── debug │ │ │ ├── AndroidManifest.xml │ │ │ └── java │ │ │ │ └── com │ │ │ │ └── example │ │ │ │ └── ReactNativeFlipper.kt │ │ │ └── main │ │ │ ├── AndroidManifest.xml │ │ │ ├── java │ │ │ └── com │ │ │ │ └── example │ │ │ │ ├── MainActivity.kt │ │ │ │ └── MainApplication.kt │ │ │ └── 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 │ └── settings.gradle ├── app.json ├── babel.config.js ├── index.js ├── ios │ ├── Podfile │ ├── Podfile.lock │ ├── example.xcodeproj │ │ ├── project.pbxproj │ │ └── xcshareddata │ │ │ └── xcschemes │ │ │ └── example.xcscheme │ ├── example.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ └── IDEWorkspaceChecks.plist │ └── example │ │ ├── AppDelegate.swift │ │ ├── Images.xcassets │ │ ├── AppIcon.appiconset │ │ │ └── Contents.json │ │ └── Contents.json │ │ ├── Info.plist │ │ ├── LaunchScreen.storyboard │ │ └── example-Bridging-Header.h ├── metro.config.js ├── package.json ├── src │ ├── App.tsx │ └── styles.ts ├── tsconfig.json └── yarn.lock ├── package.json ├── scripts └── generate-mappings.js ├── src ├── index.tsx ├── template │ └── index.ts └── types.ts ├── tsconfig.build.json ├── tsconfig.json └── yarn.lock /.all-contributorsrc: -------------------------------------------------------------------------------- 1 | { 2 | "files": [ 3 | "README.md" 4 | ], 5 | "imageSize": 100, 6 | "commit": false, 7 | "contributors": [ 8 | { 9 | "login": "Marcoo09", 10 | "name": "Marco Fiorito", 11 | "avatar_url": "https://avatars.githubusercontent.com/Marcoo09", 12 | "profile": "https://github.com/Marcoo09", 13 | "contributions": [ 14 | "code" 15 | ] 16 | } 17 | ], 18 | "contributorsPerLine": 7, 19 | "projectName": "react-native-vimeo-iframe", 20 | "projectOwner": "Marcoo09", 21 | "repoType": "github", 22 | "repoHost": "https://github.com", 23 | "skipCi": true 24 | } 25 | -------------------------------------------------------------------------------- /.eslintignore: -------------------------------------------------------------------------------- 1 | **/node_modules 2 | example/ 3 | lib/ 4 | -------------------------------------------------------------------------------- /.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | extends: ['@react-native-community', 'plugin:prettier/recommended'], 3 | plugins: ['simple-import-sort'], 4 | root: true, 5 | rules: { 6 | 'import/order': 'off', 7 | 'simple-import-sort/exports': 'error', 8 | 'simple-import-sort/imports': 'error', 9 | 'sort-imports': 'off', 10 | }, 11 | settings: { 12 | 'import/extensions': ['.js', '.ts', '.tsx'], 13 | 'import/parsers': { 14 | '@typescript-eslint/parser': ['.ts', '.tsx'], 15 | }, 16 | 'import/resolver': { 17 | node: { 18 | extensions: ['.js', '.ts', '.tsx'], 19 | }, 20 | }, 21 | }, 22 | } 23 | -------------------------------------------------------------------------------- /.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 | /android/gradlew 33 | /android/gradlew.bat 34 | /android/gradle/ 35 | 36 | # Visual Studio Code 37 | # 38 | .vscode/ 39 | 40 | # node.js 41 | # 42 | node_modules/ 43 | npm-debug.log 44 | yarn-error.log 45 | 46 | # BUCK 47 | buck-out/ 48 | \.buckd/ 49 | *.keystore 50 | !debug.keystore 51 | 52 | # fastlane 53 | # 54 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the 55 | # screenshots whenever they are needed. 56 | # For more information about the recommended setup visit: 57 | # https://docs.fastlane.tools/best-practices/source-control/ 58 | 59 | */fastlane/report.xml 60 | */fastlane/Preview.html 61 | */fastlane/screenshots 62 | 63 | # Bundle artifact 64 | *.jsbundle 65 | 66 | # CocoaPods 67 | /ios/Pods/ 68 | 69 | # Library 70 | lib/ 71 | -------------------------------------------------------------------------------- /.prettierrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | jsxSingleQuote: true, 3 | semi: false, 4 | singleQuote: true, 5 | } 6 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2021 Marco Fiorito 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # React Native Vimeo Iframe 2 | 3 | React Native Vimeo Iframe is a library to render Vimeo videos in a React Native app. 4 | This component allows you to embed a Vimeo video in your app and have full access to 5 | the Vimeo player JS API (more information https://developer.vimeo.com/player/js-api). 6 | 7 | ## Installation 8 | 9 | 1. Go through the instructions for installing the 10 | `React Native Webview` library: https://github.com/react-native-webview/react-native-webview. 11 | 2. Run `npm install react-native-vimeo-iframe` or `yarn add react-native-vimeo-iframe` within your project. 12 | 3. Compile and build to make sure everything is set up properly. 13 | 14 | ## Usage 15 | 16 | ``` 17 | const videoCallbacks = { 18 | timeupdate: (data: any) => console.log('timeupdate: ', data), 19 | play: (data: any) => console.log('play: ', data), 20 | pause: (data: any) => console.log('pause: ', data), 21 | fullscreenchange: (data: any) => console.log('fullscreenchange: ', data), 22 | ended: (data: any) => console.log('ended: ', data), 23 | controlschange: (data: any) => console.log('controlschange: ', data), 24 | }; 25 | 26 | return ( 27 | 32 | ) 33 | ``` 34 | 35 | ## Supported listeners 36 | 37 | ``` 38 | 'controlschange', // The visibility of the controls changed. 39 | 'fullscreenchange', // The orientation was changed. 40 | 'audioprocess', // A entrada do buffer de ScriptProcessorNode está pronta para ser processada 41 | 'canplay', // The browser can play the file, but estimates that there will not be enough data to play the file without interruption to reload the buffer. 42 | 'canplaythrough', // The browser estimates that it will be able to play the file without interruption until the end. 43 | 'complete', // OfflineAudioContext rendering is finished. 44 | 'durationchange', // The duration attribute has been updated. 45 | 'emptied', // Absence of content. For example, this event is sent if the media has been loaded (or partially) and the load() method has been called to reload the content. 46 | 'ended', // Playback ended due to end of content 47 | 'loadeddata', // The first frame of media has been loaded. 48 | 'loadedmetadata', // The metadata has been loaded. 49 | 'pause', // Playback has been paused. 50 | 'play', // Playback has started. 51 | 'playing', // Playback is ready to start after being paused, or delayed due to lack of data. 52 | 'ratechange', // Playback rate has changed. 53 | 'seeked', // Search operation completed. 54 | 'seeking', // Search operation started. 55 | 'stalled', // The user agent is trying to fetch media data, but data is unexpectedly not forthcoming. 56 | 'suspend', // Media data loading has been suspended. 57 | 'timeupdate', // The time indicated by the currentTime attribute has been updated. 58 | 'volumechange', // The volume has changed. 59 | 'waiting' 60 | ``` 61 | 62 | ## Available Props 63 | 64 | | Name | Type | Default | Description | 65 | | ------------ | ------------------------ | --------- | -------------------------------------------------------------------------------- | 66 | | `handlers` | `{ [key: string]: any }` | {} | Listeners to be attached in the Vimeo Player | 67 | | `videoId` | `string` | undefined | The video id which will be rendered | 68 | | `params` | `string` | undefined | Extra params to be attached on the vimeo player url | 69 | | `reference` | `string` | undefined | In order to support private videos you can specify the reference prop | 70 | | `otherProps` | `WebViewProps` | {} | To customize the webview that wraps the player, you can specify additional props | 71 | 72 | ## Example 73 | 74 | If you want to see `MetaLabs-inc/react-native-vimeo-iframe` in action, just move into the [example](/example) folder and run `yarn && cd ios && pod install && cd .. && yarn ios` or `yarn && yarn android`. By seeing its source code, you will have a better understanding of the library usage. 75 | 76 | ## Contributors 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 |

Marco Fiorito

Douglas Rosa

Felipe Najson

JB Paul

Salman Khan
90 | 91 | ## Acknowledgements 92 | 93 | - [@Myagi](https://github.com/Myagi) for `react-native-vimeo`, I based on that library to make that library with the latest versions of react-native. 94 | -------------------------------------------------------------------------------- /babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: ['module:metro-react-native-babel-preset'], 3 | } 4 | -------------------------------------------------------------------------------- /babel.js: -------------------------------------------------------------------------------- 1 | module.exports = require('./lib/module/babel/index.js') 2 | -------------------------------------------------------------------------------- /example/.buckconfig: -------------------------------------------------------------------------------- 1 | 2 | [android] 3 | target = Google Inc.:Google APIs:23 4 | 5 | [maven_repositories] 6 | central = https://repo1.maven.org/maven2 7 | -------------------------------------------------------------------------------- /example/.eslintignore: -------------------------------------------------------------------------------- 1 | **/node_modules 2 | -------------------------------------------------------------------------------- /example/.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | extends: ['@react-native-community', 'plugin:prettier/recommended'], 3 | plugins: ['simple-import-sort'], 4 | root: true, 5 | rules: { 6 | 'import/order': 'off', 7 | 'simple-import-sort/exports': 'error', 8 | 'simple-import-sort/imports': 'error', 9 | 'sort-imports': 'off', 10 | }, 11 | } 12 | -------------------------------------------------------------------------------- /example/.gitattributes: -------------------------------------------------------------------------------- 1 | # specific for windows script files 2 | *.bat text eol=crlf 3 | 4 | *.pbxproj -text 5 | -------------------------------------------------------------------------------- /example/.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 | # Visual Studio Code 34 | # 35 | .vscode/ 36 | 37 | # node.js 38 | # 39 | node_modules/ 40 | npm-debug.log 41 | yarn-error.log 42 | 43 | # BUCK 44 | buck-out/ 45 | \.buckd/ 46 | *.keystore 47 | !debug.keystore 48 | 49 | # fastlane 50 | # 51 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the 52 | # screenshots whenever they are needed. 53 | # For more information about the recommended setup visit: 54 | # https://docs.fastlane.tools/best-practices/source-control/ 55 | 56 | */fastlane/report.xml 57 | */fastlane/Preview.html 58 | */fastlane/screenshots 59 | 60 | # Bundle artifact 61 | *.jsbundle 62 | 63 | # CocoaPods 64 | /ios/Pods/ 65 | -------------------------------------------------------------------------------- /example/.prettierrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | jsxSingleQuote: true, 3 | semi: false, 4 | singleQuote: true, 5 | } 6 | -------------------------------------------------------------------------------- /example/.watchmanconfig: -------------------------------------------------------------------------------- 1 | {} 2 | -------------------------------------------------------------------------------- /example/README.md: -------------------------------------------------------------------------------- 1 | # Example 2 | 3 | ## Getting Started 4 | 5 | ```bash 6 | yarn 7 | ``` 8 | 9 | for iOS: 10 | 11 | ```bash 12 | npx pod-install 13 | ``` 14 | 15 | To run the app use: 16 | 17 | ```bash 18 | yarn ios 19 | ``` 20 | 21 | or 22 | 23 | ```bash 24 | yarn android 25 | ``` 26 | -------------------------------------------------------------------------------- /example/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.example", 39 | ) 40 | 41 | android_resource( 42 | name = "res", 43 | package = "com.example", 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 | -------------------------------------------------------------------------------- /example/android/app/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.application' 2 | apply plugin: 'kotlin-android' 3 | 4 | import com.android.build.OutputFile 5 | 6 | /** 7 | * The react.gradle file registers a task for each build variant (e.g. bundleDebugJsAndAssets 8 | * and bundleReleaseJsAndAssets). 9 | * These basically call `react-native bundle` with the correct arguments during the Android build 10 | * cycle. By default, bundleDebugJsAndAssets is skipped, as in debug/dev mode we prefer to load the 11 | * bundle directly from the development server. Below you can see all the possible configurations 12 | * and their defaults. If you decide to add a configuration block, make sure to add it before the 13 | * `apply from: "../../node_modules/react-native/react.gradle"` line. 14 | * 15 | * project.ext.react = [ 16 | * // the name of the generated asset file containing your JS bundle 17 | * bundleAssetName: "index.android.bundle", 18 | * 19 | * // the entry file for bundle generation. If none specified and 20 | * // "index.android.js" exists, it will be used. Otherwise "index.js" is 21 | * // default. Can be overridden with ENTRY_FILE environment variable. 22 | * entryFile: "index.android.js", 23 | * 24 | * // https://reactnative.dev/docs/performance#enable-the-ram-format 25 | * bundleCommand: "ram-bundle", 26 | * 27 | * // whether to bundle JS and assets in debug mode 28 | * bundleInDebug: false, 29 | * 30 | * // whether to bundle JS and assets in release mode 31 | * bundleInRelease: true, 32 | * 33 | * // whether to bundle JS and assets in another build variant (if configured). 34 | * // See http://tools.android.com/tech-docs/new-build-system/user-guide#TOC-Build-Variants 35 | * // The configuration property can be in the following formats 36 | * // 'bundleIn${productFlavor}${buildType}' 37 | * // 'bundleIn${buildType}' 38 | * // bundleInFreeDebug: true, 39 | * // bundleInPaidRelease: true, 40 | * // bundleInBeta: true, 41 | * 42 | * // whether to disable dev mode in custom build variants (by default only disabled in release) 43 | * // for example: to disable dev mode in the staging build type (if configured) 44 | * devDisabledInStaging: true, 45 | * // The configuration property can be in the following formats 46 | * // 'devDisabledIn${productFlavor}${buildType}' 47 | * // 'devDisabledIn${buildType}' 48 | * 49 | * // the root of your project, i.e. where "package.json" lives 50 | * root: "../../", 51 | * 52 | * // where to put the JS bundle asset in debug mode 53 | * jsBundleDirDebug: "$buildDir/intermediates/assets/debug", 54 | * 55 | * // where to put the JS bundle asset in release mode 56 | * jsBundleDirRelease: "$buildDir/intermediates/assets/release", 57 | * 58 | * // where to put drawable resources / React Native assets, e.g. the ones you use via 59 | * // require('./image.png')), in debug mode 60 | * resourcesDirDebug: "$buildDir/intermediates/res/merged/debug", 61 | * 62 | * // where to put drawable resources / React Native assets, e.g. the ones you use via 63 | * // require('./image.png')), in release mode 64 | * resourcesDirRelease: "$buildDir/intermediates/res/merged/release", 65 | * 66 | * // by default the gradle tasks are skipped if none of the JS files or assets change; this means 67 | * // that we don't look at files in android/ or ios/ to determine whether the tasks are up to 68 | * // date; if you have any other folders that you want to ignore for performance reasons (gradle 69 | * // indexes the entire tree), add them here. Alternatively, if you have JS files in android/ 70 | * // for example, you might want to remove it from here. 71 | * inputExcludes: ["android/**", "ios/**"], 72 | * 73 | * // override which node gets called and with what additional arguments 74 | * nodeExecutableAndArgs: ["node"], 75 | * 76 | * // supply additional arguments to the packager 77 | * extraPackagerArgs: [] 78 | * ] 79 | */ 80 | 81 | project.ext.react = [ 82 | enableHermes: false, // clean and rebuild if changing 83 | ] 84 | 85 | apply from: '../../node_modules/react-native/react.gradle' 86 | 87 | /** 88 | * Set this to true to create two separate APKs instead of one: 89 | * - An APK that only works on ARM devices 90 | * - An APK that only works on x86 devices 91 | * The advantage is the size of the APK is reduced by about 4MB. 92 | * Upload all the APKs to the Play Store and people will download 93 | * the correct one based on the CPU architecture of their device. 94 | */ 95 | def enableSeparateBuildPerCPUArchitecture = false 96 | 97 | /** 98 | * Run Proguard to shrink the Java bytecode in release builds. 99 | */ 100 | def enableProguardInReleaseBuilds = false 101 | 102 | /** 103 | * The preferred build flavor of JavaScriptCore. 104 | * 105 | * For example, to use the international variant, you can use: 106 | * `def jscFlavor = 'org.webkit:android-jsc-intl:+'` 107 | * 108 | * The international variant includes ICU i18n library and necessary data 109 | * allowing to use e.g. `Date.toLocaleString` and `String.localeCompare` that 110 | * give correct results when using with locales other than en-US. Note that 111 | * this variant is about 6MiB larger per architecture than default. 112 | */ 113 | def jscFlavor = 'org.webkit:android-jsc:+' 114 | 115 | /** 116 | * Whether to enable the Hermes VM. 117 | * 118 | * This should be set on project.ext.react and mirrored here. If it is not set 119 | * on project.ext.react, JavaScript will not be compiled to Hermes Bytecode 120 | * and the benefits of using Hermes will therefore be sharply reduced. 121 | */ 122 | def enableHermes = project.ext.react.get('enableHermes', false); 123 | 124 | android { 125 | compileSdkVersion rootProject.ext.compileSdkVersion 126 | 127 | compileOptions { 128 | sourceCompatibility JavaVersion.VERSION_1_8 129 | targetCompatibility JavaVersion.VERSION_1_8 130 | } 131 | 132 | defaultConfig { 133 | applicationId 'com.example' 134 | minSdkVersion rootProject.ext.minSdkVersion 135 | targetSdkVersion rootProject.ext.targetSdkVersion 136 | versionCode 1 137 | versionName '1.0' 138 | } 139 | splits { 140 | abi { 141 | reset() 142 | enable enableSeparateBuildPerCPUArchitecture 143 | universalApk false // If true, also generate a universal APK 144 | include 'armeabi-v7a', 'x86', 'arm64-v8a', 'x86_64' 145 | } 146 | } 147 | signingConfigs { 148 | debug { 149 | storeFile file('debug.keystore') 150 | storePassword 'android' 151 | keyAlias 'androiddebugkey' 152 | keyPassword 'android' 153 | } 154 | } 155 | buildTypes { 156 | debug { 157 | signingConfig signingConfigs.debug 158 | } 159 | release { 160 | // Caution! In production, you need to generate your own keystore file. 161 | // see https://reactnative.dev/docs/signed-apk-android. 162 | signingConfig signingConfigs.debug 163 | minifyEnabled enableProguardInReleaseBuilds 164 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 165 | } 166 | } 167 | 168 | // applicationVariants are e.g. debug, release 169 | applicationVariants.all { variant -> 170 | variant.outputs.each { output -> 171 | // For each separate APK per architecture, set a unique version code as described here: 172 | // https://developer.android.com/studio/build/configure-apk-splits.html 173 | def versionCodes = ['armeabi-v7a': 1, 'x86': 2, 'arm64-v8a': 3, 'x86_64': 4] 174 | def abi = output.getFilter(OutputFile.ABI) 175 | if (abi != null) { // null for the universal-debug, universal-release variants 176 | output.versionCodeOverride = 177 | versionCodes.get(abi) * 1048576 + defaultConfig.versionCode 178 | } 179 | 180 | } 181 | } 182 | } 183 | 184 | dependencies { 185 | implementation fileTree(dir: 'libs', include: ['*.jar']) 186 | //noinspection GradleDynamicVersion 187 | implementation 'com.facebook.react:react-native:+' // From node_modules 188 | 189 | implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0' 190 | 191 | debugImplementation("com.facebook.flipper:flipper:${FLIPPER_VERSION}") { 192 | exclude group: 'com.facebook.fbjni' 193 | } 194 | 195 | debugImplementation("com.facebook.flipper:flipper-network-plugin:${FLIPPER_VERSION}") { 196 | exclude group: 'com.facebook.flipper' 197 | exclude group: 'com.squareup.okhttp3', module: 'okhttp' 198 | } 199 | 200 | debugImplementation("com.facebook.flipper:flipper-fresco-plugin:${FLIPPER_VERSION}") { 201 | exclude group: 'com.facebook.flipper' 202 | } 203 | 204 | if (enableHermes) { 205 | def hermesPath = '../../node_modules/hermes-engine/android/'; 206 | debugImplementation files(hermesPath + 'hermes-debug.aar') 207 | releaseImplementation files(hermesPath + 'hermes-release.aar') 208 | } else { 209 | implementation jscFlavor 210 | } 211 | } 212 | 213 | // Run this once to be able to run the application with BUCK 214 | // puts all compile dependencies into folder libs for BUCK to use 215 | task copyDownloadableDepsToLibs(type: Copy) { 216 | from configurations.compile 217 | into 'libs' 218 | } 219 | 220 | apply from: file('../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle'); applyNativeModulesAppBuildGradle(project) 221 | -------------------------------------------------------------------------------- /example/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 | -------------------------------------------------------------------------------- /example/android/app/debug.keystore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MetaLabs-inc/react-native-vimeo-iframe/9db6365b4d129b02faac234c028356c20c2472e2/example/android/app/debug.keystore -------------------------------------------------------------------------------- /example/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 | -------------------------------------------------------------------------------- /example/android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /example/android/app/src/debug/java/com/example/ReactNativeFlipper.kt: -------------------------------------------------------------------------------- 1 | package com.example 2 | 3 | import android.content.Context 4 | import com.facebook.flipper.android.AndroidFlipperClient 5 | import com.facebook.flipper.android.utils.FlipperUtils 6 | import com.facebook.flipper.plugins.crashreporter.CrashReporterPlugin 7 | import com.facebook.flipper.plugins.databases.DatabasesFlipperPlugin 8 | import com.facebook.flipper.plugins.fresco.FrescoFlipperPlugin 9 | import com.facebook.flipper.plugins.inspector.DescriptorMapping 10 | import com.facebook.flipper.plugins.inspector.InspectorFlipperPlugin 11 | import com.facebook.flipper.plugins.network.FlipperOkhttpInterceptor 12 | import com.facebook.flipper.plugins.network.NetworkFlipperPlugin 13 | import com.facebook.flipper.plugins.sharedpreferences.SharedPreferencesFlipperPlugin 14 | import com.facebook.react.ReactInstanceManager 15 | import com.facebook.react.ReactInstanceManager.ReactInstanceEventListener 16 | import com.facebook.react.bridge.ReactContext 17 | import com.facebook.react.modules.network.NetworkingModule 18 | 19 | object ReactNativeFlipper { 20 | @JvmStatic 21 | fun initializeFlipper(context: Context?, reactInstanceManager: ReactInstanceManager) { 22 | if (FlipperUtils.shouldEnableFlipper(context)) { 23 | val client = AndroidFlipperClient.getInstance(context) 24 | client.addPlugin(InspectorFlipperPlugin(context, DescriptorMapping.withDefaults())) 25 | client.addPlugin(DatabasesFlipperPlugin(context)) 26 | client.addPlugin(SharedPreferencesFlipperPlugin(context)) 27 | client.addPlugin(CrashReporterPlugin.getInstance()) 28 | val networkFlipperPlugin = NetworkFlipperPlugin() 29 | NetworkingModule.setCustomClientBuilder { builder -> builder.addNetworkInterceptor(FlipperOkhttpInterceptor(networkFlipperPlugin)) } 30 | client.addPlugin(networkFlipperPlugin) 31 | client.start() 32 | 33 | // Fresco Plugin needs to ensure that ImagePipelineFactory is initialized 34 | // Hence we run if after all native modules have been initialized 35 | val reactContext = reactInstanceManager.currentReactContext 36 | if (reactContext == null) { 37 | reactInstanceManager.addReactInstanceEventListener( 38 | object : ReactInstanceEventListener { 39 | override fun onReactContextInitialized(reactContext: ReactContext) { 40 | reactInstanceManager.removeReactInstanceEventListener(this) 41 | reactContext.runOnNativeModulesQueueThread { client.addPlugin(FrescoFlipperPlugin()) } 42 | } 43 | }) 44 | } else { 45 | client.addPlugin(FrescoFlipperPlugin()) 46 | } 47 | } 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /example/android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 13 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /example/android/app/src/main/java/com/example/MainActivity.kt: -------------------------------------------------------------------------------- 1 | package com.example 2 | 3 | import com.facebook.react.ReactActivity 4 | 5 | class MainActivity : ReactActivity() { 6 | 7 | override fun getMainComponentName(): String? { 8 | return "example" 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /example/android/app/src/main/java/com/example/MainApplication.kt: -------------------------------------------------------------------------------- 1 | package com.example 2 | 3 | import android.app.Application 4 | import android.content.Context 5 | import com.facebook.react.* 6 | import com.facebook.soloader.SoLoader 7 | import java.lang.reflect.InvocationTargetException 8 | 9 | class MainApplication : Application(), ReactApplication { 10 | 11 | private val mReactNativeHost = object : ReactNativeHost(this) { 12 | override fun getUseDeveloperSupport(): Boolean { 13 | return BuildConfig.DEBUG 14 | } 15 | 16 | override fun getPackages(): List { 17 | val packages = PackageList(this).packages 18 | return packages 19 | } 20 | 21 | override fun getJSMainModuleName(): String { 22 | return "index" 23 | } 24 | } 25 | 26 | override fun getReactNativeHost(): ReactNativeHost { 27 | return mReactNativeHost 28 | } 29 | 30 | override fun onCreate() { 31 | super.onCreate() 32 | SoLoader.init(this, false) 33 | initializeFlipper(this, reactNativeHost.reactInstanceManager) 34 | } 35 | 36 | companion object { 37 | 38 | private fun initializeFlipper(context: Context, reactInstanceManager: ReactInstanceManager) { 39 | if (BuildConfig.DEBUG) { 40 | try { 41 | val aClass = Class.forName("com.example.ReactNativeFlipper") 42 | aClass 43 | .getMethod("initializeFlipper", Context::class.java, ReactInstanceManager::class.java) 44 | .invoke(null, context, reactInstanceManager) 45 | } catch (e: ClassNotFoundException) { 46 | e.printStackTrace() 47 | } catch (e: NoSuchMethodException) { 48 | e.printStackTrace() 49 | } catch (e: IllegalAccessException) { 50 | e.printStackTrace() 51 | } catch (e: InvocationTargetException) { 52 | e.printStackTrace() 53 | } 54 | } 55 | } 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MetaLabs-inc/react-native-vimeo-iframe/9db6365b4d129b02faac234c028356c20c2472e2/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MetaLabs-inc/react-native-vimeo-iframe/9db6365b4d129b02faac234c028356c20c2472e2/example/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MetaLabs-inc/react-native-vimeo-iframe/9db6365b4d129b02faac234c028356c20c2472e2/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MetaLabs-inc/react-native-vimeo-iframe/9db6365b4d129b02faac234c028356c20c2472e2/example/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MetaLabs-inc/react-native-vimeo-iframe/9db6365b4d129b02faac234c028356c20c2472e2/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MetaLabs-inc/react-native-vimeo-iframe/9db6365b4d129b02faac234c028356c20c2472e2/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MetaLabs-inc/react-native-vimeo-iframe/9db6365b4d129b02faac234c028356c20c2472e2/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MetaLabs-inc/react-native-vimeo-iframe/9db6365b4d129b02faac234c028356c20c2472e2/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MetaLabs-inc/react-native-vimeo-iframe/9db6365b4d129b02faac234c028356c20c2472e2/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MetaLabs-inc/react-native-vimeo-iframe/9db6365b4d129b02faac234c028356c20c2472e2/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | example 3 | 4 | -------------------------------------------------------------------------------- /example/android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /example/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 = '29.0.3' 6 | minSdkVersion = 16 7 | compileSdkVersion = 29 8 | targetSdkVersion = 29 9 | kotlinVersion = '1.4.21' 10 | } 11 | repositories { 12 | google() 13 | jcenter() 14 | } 15 | dependencies { 16 | classpath 'com.android.tools.build:gradle:4.1.2' 17 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion" 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 | maven { 27 | // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm 28 | url "$rootDir/../node_modules/react-native/android" 29 | } 30 | maven { 31 | // Android JSC is installed from npm 32 | url "$rootDir/../node_modules/jsc-android/dist" 33 | } 34 | 35 | google() 36 | jcenter() 37 | maven { url 'https://jitpack.io' } 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /example/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 | # AndroidX package structure to make it clearer which packages are bundled with the 21 | # Android operating system, and which are packaged with your app's APK 22 | # https://developer.android.com/topic/libraries/support-library/androidx-rn 23 | android.useAndroidX=true 24 | # Automatically convert third-party libraries to use AndroidX 25 | android.enableJetifier=true 26 | 27 | # Version of flipper SDK to use with React Native 28 | FLIPPER_VERSION=0.73.0 29 | -------------------------------------------------------------------------------- /example/android/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MetaLabs-inc/react-native-vimeo-iframe/9db6365b4d129b02faac234c028356c20c2472e2/example/android/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /example/android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.1-all.zip 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | -------------------------------------------------------------------------------- /example/android/gradlew: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | 3 | # 4 | # Copyright 2015 the original author or authors. 5 | # 6 | # Licensed under the Apache License, Version 2.0 (the "License"); 7 | # you may not use this file except in compliance with the License. 8 | # You may obtain a copy of the License at 9 | # 10 | # https://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, software 13 | # distributed under the License is distributed on an "AS IS" BASIS, 14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | # See the License for the specific language governing permissions and 16 | # limitations under the License. 17 | # 18 | 19 | ############################################################################## 20 | ## 21 | ## Gradle start up script for UN*X 22 | ## 23 | ############################################################################## 24 | 25 | # Attempt to set APP_HOME 26 | # Resolve links: $0 may be a link 27 | PRG="$0" 28 | # Need this for relative symlinks. 29 | while [ -h "$PRG" ] ; do 30 | ls=`ls -ld "$PRG"` 31 | link=`expr "$ls" : '.*-> \(.*\)$'` 32 | if expr "$link" : '/.*' > /dev/null; then 33 | PRG="$link" 34 | else 35 | PRG=`dirname "$PRG"`"/$link" 36 | fi 37 | done 38 | SAVED="`pwd`" 39 | cd "`dirname \"$PRG\"`/" >/dev/null 40 | APP_HOME="`pwd -P`" 41 | cd "$SAVED" >/dev/null 42 | 43 | APP_NAME="Gradle" 44 | APP_BASE_NAME=`basename "$0"` 45 | 46 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 47 | DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' 48 | 49 | # Use the maximum available, or set MAX_FD != -1 to use that value. 50 | MAX_FD="maximum" 51 | 52 | warn () { 53 | echo "$*" 54 | } 55 | 56 | die () { 57 | echo 58 | echo "$*" 59 | echo 60 | exit 1 61 | } 62 | 63 | # OS specific support (must be 'true' or 'false'). 64 | cygwin=false 65 | msys=false 66 | darwin=false 67 | nonstop=false 68 | case "`uname`" in 69 | CYGWIN* ) 70 | cygwin=true 71 | ;; 72 | Darwin* ) 73 | darwin=true 74 | ;; 75 | MINGW* ) 76 | msys=true 77 | ;; 78 | NONSTOP* ) 79 | nonstop=true 80 | ;; 81 | esac 82 | 83 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar 84 | 85 | # Determine the Java command to use to start the JVM. 86 | if [ -n "$JAVA_HOME" ] ; then 87 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then 88 | # IBM's JDK on AIX uses strange locations for the executables 89 | JAVACMD="$JAVA_HOME/jre/sh/java" 90 | else 91 | JAVACMD="$JAVA_HOME/bin/java" 92 | fi 93 | if [ ! -x "$JAVACMD" ] ; then 94 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME 95 | 96 | Please set the JAVA_HOME variable in your environment to match the 97 | location of your Java installation." 98 | fi 99 | else 100 | JAVACMD="java" 101 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 102 | 103 | Please set the JAVA_HOME variable in your environment to match the 104 | location of your Java installation." 105 | fi 106 | 107 | # Increase the maximum file descriptors if we can. 108 | if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then 109 | MAX_FD_LIMIT=`ulimit -H -n` 110 | if [ $? -eq 0 ] ; then 111 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then 112 | MAX_FD="$MAX_FD_LIMIT" 113 | fi 114 | ulimit -n $MAX_FD 115 | if [ $? -ne 0 ] ; then 116 | warn "Could not set maximum file descriptor limit: $MAX_FD" 117 | fi 118 | else 119 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" 120 | fi 121 | fi 122 | 123 | # For Darwin, add options to specify how the application appears in the dock 124 | if $darwin; then 125 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" 126 | fi 127 | 128 | # For Cygwin or MSYS, switch paths to Windows format before running java 129 | if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then 130 | APP_HOME=`cygpath --path --mixed "$APP_HOME"` 131 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` 132 | JAVACMD=`cygpath --unix "$JAVACMD"` 133 | 134 | # We build the pattern for arguments to be converted via cygpath 135 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` 136 | SEP="" 137 | for dir in $ROOTDIRSRAW ; do 138 | ROOTDIRS="$ROOTDIRS$SEP$dir" 139 | SEP="|" 140 | done 141 | OURCYGPATTERN="(^($ROOTDIRS))" 142 | # Add a user-defined pattern to the cygpath arguments 143 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then 144 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" 145 | fi 146 | # Now convert the arguments - kludge to limit ourselves to /bin/sh 147 | i=0 148 | for arg in "$@" ; do 149 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` 150 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option 151 | 152 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition 153 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` 154 | else 155 | eval `echo args$i`="\"$arg\"" 156 | fi 157 | i=`expr $i + 1` 158 | done 159 | case $i in 160 | 0) set -- ;; 161 | 1) set -- "$args0" ;; 162 | 2) set -- "$args0" "$args1" ;; 163 | 3) set -- "$args0" "$args1" "$args2" ;; 164 | 4) set -- "$args0" "$args1" "$args2" "$args3" ;; 165 | 5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; 166 | 6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; 167 | 7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; 168 | 8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; 169 | 9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; 170 | esac 171 | fi 172 | 173 | # Escape application args 174 | save () { 175 | for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done 176 | echo " " 177 | } 178 | APP_ARGS=`save "$@"` 179 | 180 | # Collect all arguments for the java command, following the shell quoting and substitution rules 181 | eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" 182 | 183 | exec "$JAVACMD" "$@" 184 | -------------------------------------------------------------------------------- /example/android/gradlew.bat: -------------------------------------------------------------------------------- 1 | @rem 2 | @rem Copyright 2015 the original author or authors. 3 | @rem 4 | @rem Licensed under the Apache License, Version 2.0 (the "License"); 5 | @rem you may not use this file except in compliance with the License. 6 | @rem You may obtain a copy of the License at 7 | @rem 8 | @rem http://www.apache.org/licenses/LICENSE-2.0 9 | @rem 10 | @rem Unless required by applicable law or agreed to in writing, software 11 | @rem distributed under the License is distributed on an "AS IS" BASIS, 12 | @rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | @rem See the License for the specific language governing permissions and 14 | @rem limitations under the License. 15 | @rem 16 | 17 | @if "%DEBUG%" == "" @echo off 18 | @rem ########################################################################## 19 | @rem 20 | @rem Gradle startup script for Windows 21 | @rem 22 | @rem ########################################################################## 23 | 24 | @rem Set local scope for the variables with windows NT shell 25 | if "%OS%"=="Windows_NT" setlocal 26 | 27 | set DIRNAME=%~dp0 28 | if "%DIRNAME%" == "" set DIRNAME=. 29 | set APP_BASE_NAME=%~n0 30 | set APP_HOME=%DIRNAME% 31 | 32 | @rem Resolve any "." and ".." in APP_HOME to make it shorter. 33 | for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi 34 | 35 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 36 | set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" 37 | 38 | @rem Find java.exe 39 | if defined JAVA_HOME goto findJavaFromJavaHome 40 | 41 | set JAVA_EXE=java.exe 42 | %JAVA_EXE% -version >NUL 2>&1 43 | if "%ERRORLEVEL%" == "0" goto init 44 | 45 | echo. 46 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 47 | echo. 48 | echo Please set the JAVA_HOME variable in your environment to match the 49 | echo location of your Java installation. 50 | 51 | goto fail 52 | 53 | :findJavaFromJavaHome 54 | set JAVA_HOME=%JAVA_HOME:"=% 55 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe 56 | 57 | if exist "%JAVA_EXE%" goto init 58 | 59 | echo. 60 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 61 | echo. 62 | echo Please set the JAVA_HOME variable in your environment to match the 63 | echo location of your Java installation. 64 | 65 | goto fail 66 | 67 | :init 68 | @rem Get command-line arguments, handling Windows variants 69 | 70 | if not "%OS%" == "Windows_NT" goto win9xME_args 71 | 72 | :win9xME_args 73 | @rem Slurp the command line arguments. 74 | set CMD_LINE_ARGS= 75 | set _SKIP=2 76 | 77 | :win9xME_args_slurp 78 | if "x%~1" == "x" goto execute 79 | 80 | set CMD_LINE_ARGS=%* 81 | 82 | :execute 83 | @rem Setup the command line 84 | 85 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar 86 | 87 | @rem Execute Gradle 88 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% 89 | 90 | :end 91 | @rem End local scope for the variables with windows NT shell 92 | if "%ERRORLEVEL%"=="0" goto mainEnd 93 | 94 | :fail 95 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of 96 | rem the _cmd.exe /c_ return code! 97 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 98 | exit /b 1 99 | 100 | :mainEnd 101 | if "%OS%"=="Windows_NT" endlocal 102 | 103 | :omega 104 | -------------------------------------------------------------------------------- /example/android/settings.gradle: -------------------------------------------------------------------------------- 1 | include ':react-native-module-template' 2 | include ':react-native-webview' 3 | 4 | project(':react-native-webview').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-webview/android') 5 | project(':react-native-module-template').projectDir = new File(rootProject.projectDir, '../../android') 6 | 7 | include ':app' 8 | -------------------------------------------------------------------------------- /example/app.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "example", 3 | "displayName": "example" 4 | } 5 | -------------------------------------------------------------------------------- /example/babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: ['module:metro-react-native-babel-preset'], 3 | } 4 | -------------------------------------------------------------------------------- /example/index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @format 3 | */ 4 | 5 | import { AppRegistry } from 'react-native' 6 | 7 | import { name as appName } from './app.json' 8 | import App from './src/App' 9 | 10 | AppRegistry.registerComponent(appName, () => App) 11 | -------------------------------------------------------------------------------- /example/ios/Podfile: -------------------------------------------------------------------------------- 1 | require_relative '../node_modules/react-native/scripts/react_native_pods' 2 | require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules' 3 | 4 | platform :ios, '10.0' 5 | 6 | target 'example' do 7 | config = use_native_modules! 8 | 9 | use_react_native!(:path => config["reactNativePath"]) 10 | 11 | # Enables Flipper. 12 | # 13 | # Note that if you have use_frameworks! enabled, Flipper will not work and 14 | # you should disable these next few lines. 15 | use_flipper!({ 'Flipper-Folly' => '2.6.7', 'Flipper-RSocket' => '1.4.3' , 'Flipper' => '0.88.0' }) 16 | post_install do |installer| 17 | flipper_post_install(installer) 18 | end 19 | end 20 | -------------------------------------------------------------------------------- /example/ios/Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - boost-for-react-native (1.63.0) 3 | - CocoaAsyncSocket (7.6.5) 4 | - DoubleConversion (1.1.6) 5 | - FBLazyVector (0.63.4) 6 | - FBReactNativeSpec (0.63.4): 7 | - Folly (= 2020.01.13.00) 8 | - RCTRequired (= 0.63.4) 9 | - RCTTypeSafety (= 0.63.4) 10 | - React-Core (= 0.63.4) 11 | - React-jsi (= 0.63.4) 12 | - ReactCommon/turbomodule/core (= 0.63.4) 13 | - Flipper (0.88.0): 14 | - Flipper-Folly (~> 2.6) 15 | - Flipper-RSocket (~> 1.4) 16 | - Flipper-Boost-iOSX (1.76.0.1.11) 17 | - Flipper-DoubleConversion (1.1.7) 18 | - Flipper-Fmt (7.1.7) 19 | - Flipper-Folly (2.6.7): 20 | - Flipper-Boost-iOSX 21 | - Flipper-DoubleConversion 22 | - Flipper-Fmt (= 7.1.7) 23 | - Flipper-Glog 24 | - libevent (~> 2.1.12) 25 | - OpenSSL-Universal (= 1.1.180) 26 | - Flipper-Glog (0.3.6) 27 | - Flipper-PeerTalk (0.0.4) 28 | - Flipper-RSocket (1.4.3): 29 | - Flipper-Folly (~> 2.6) 30 | - FlipperKit (0.88.0): 31 | - FlipperKit/Core (= 0.88.0) 32 | - FlipperKit/Core (0.88.0): 33 | - Flipper (~> 0.88.0) 34 | - FlipperKit/CppBridge 35 | - FlipperKit/FBCxxFollyDynamicConvert 36 | - FlipperKit/FBDefines 37 | - FlipperKit/FKPortForwarding 38 | - FlipperKit/CppBridge (0.88.0): 39 | - Flipper (~> 0.88.0) 40 | - FlipperKit/FBCxxFollyDynamicConvert (0.88.0): 41 | - Flipper-Folly (~> 2.6) 42 | - FlipperKit/FBDefines (0.88.0) 43 | - FlipperKit/FKPortForwarding (0.88.0): 44 | - CocoaAsyncSocket (~> 7.6) 45 | - Flipper-PeerTalk (~> 0.0.4) 46 | - FlipperKit/FlipperKitHighlightOverlay (0.88.0) 47 | - FlipperKit/FlipperKitLayoutHelpers (0.88.0): 48 | - FlipperKit/Core 49 | - FlipperKit/FlipperKitHighlightOverlay 50 | - FlipperKit/FlipperKitLayoutTextSearchable 51 | - FlipperKit/FlipperKitLayoutIOSDescriptors (0.88.0): 52 | - FlipperKit/Core 53 | - FlipperKit/FlipperKitHighlightOverlay 54 | - FlipperKit/FlipperKitLayoutHelpers 55 | - YogaKit (~> 1.18) 56 | - FlipperKit/FlipperKitLayoutPlugin (0.88.0): 57 | - FlipperKit/Core 58 | - FlipperKit/FlipperKitHighlightOverlay 59 | - FlipperKit/FlipperKitLayoutHelpers 60 | - FlipperKit/FlipperKitLayoutIOSDescriptors 61 | - FlipperKit/FlipperKitLayoutTextSearchable 62 | - YogaKit (~> 1.18) 63 | - FlipperKit/FlipperKitLayoutTextSearchable (0.88.0) 64 | - FlipperKit/FlipperKitNetworkPlugin (0.88.0): 65 | - FlipperKit/Core 66 | - FlipperKit/FlipperKitReactPlugin (0.88.0): 67 | - FlipperKit/Core 68 | - FlipperKit/FlipperKitUserDefaultsPlugin (0.88.0): 69 | - FlipperKit/Core 70 | - FlipperKit/SKIOSNetworkPlugin (0.88.0): 71 | - FlipperKit/Core 72 | - FlipperKit/FlipperKitNetworkPlugin 73 | - Folly (2020.01.13.00): 74 | - boost-for-react-native 75 | - DoubleConversion 76 | - Folly/Default (= 2020.01.13.00) 77 | - glog 78 | - Folly/Default (2020.01.13.00): 79 | - boost-for-react-native 80 | - DoubleConversion 81 | - glog 82 | - glog (0.3.5) 83 | - libevent (2.1.12) 84 | - OpenSSL-Universal (1.1.180) 85 | - RCTRequired (0.63.4) 86 | - RCTTypeSafety (0.63.4): 87 | - FBLazyVector (= 0.63.4) 88 | - Folly (= 2020.01.13.00) 89 | - RCTRequired (= 0.63.4) 90 | - React-Core (= 0.63.4) 91 | - React (0.63.4): 92 | - React-Core (= 0.63.4) 93 | - React-Core/DevSupport (= 0.63.4) 94 | - React-Core/RCTWebSocket (= 0.63.4) 95 | - React-RCTActionSheet (= 0.63.4) 96 | - React-RCTAnimation (= 0.63.4) 97 | - React-RCTBlob (= 0.63.4) 98 | - React-RCTImage (= 0.63.4) 99 | - React-RCTLinking (= 0.63.4) 100 | - React-RCTNetwork (= 0.63.4) 101 | - React-RCTSettings (= 0.63.4) 102 | - React-RCTText (= 0.63.4) 103 | - React-RCTVibration (= 0.63.4) 104 | - React-callinvoker (0.63.4) 105 | - React-Core (0.63.4): 106 | - Folly (= 2020.01.13.00) 107 | - glog 108 | - React-Core/Default (= 0.63.4) 109 | - React-cxxreact (= 0.63.4) 110 | - React-jsi (= 0.63.4) 111 | - React-jsiexecutor (= 0.63.4) 112 | - Yoga 113 | - React-Core/CoreModulesHeaders (0.63.4): 114 | - Folly (= 2020.01.13.00) 115 | - glog 116 | - React-Core/Default 117 | - React-cxxreact (= 0.63.4) 118 | - React-jsi (= 0.63.4) 119 | - React-jsiexecutor (= 0.63.4) 120 | - Yoga 121 | - React-Core/Default (0.63.4): 122 | - Folly (= 2020.01.13.00) 123 | - glog 124 | - React-cxxreact (= 0.63.4) 125 | - React-jsi (= 0.63.4) 126 | - React-jsiexecutor (= 0.63.4) 127 | - Yoga 128 | - React-Core/DevSupport (0.63.4): 129 | - Folly (= 2020.01.13.00) 130 | - glog 131 | - React-Core/Default (= 0.63.4) 132 | - React-Core/RCTWebSocket (= 0.63.4) 133 | - React-cxxreact (= 0.63.4) 134 | - React-jsi (= 0.63.4) 135 | - React-jsiexecutor (= 0.63.4) 136 | - React-jsinspector (= 0.63.4) 137 | - Yoga 138 | - React-Core/RCTActionSheetHeaders (0.63.4): 139 | - Folly (= 2020.01.13.00) 140 | - glog 141 | - React-Core/Default 142 | - React-cxxreact (= 0.63.4) 143 | - React-jsi (= 0.63.4) 144 | - React-jsiexecutor (= 0.63.4) 145 | - Yoga 146 | - React-Core/RCTAnimationHeaders (0.63.4): 147 | - Folly (= 2020.01.13.00) 148 | - glog 149 | - React-Core/Default 150 | - React-cxxreact (= 0.63.4) 151 | - React-jsi (= 0.63.4) 152 | - React-jsiexecutor (= 0.63.4) 153 | - Yoga 154 | - React-Core/RCTBlobHeaders (0.63.4): 155 | - Folly (= 2020.01.13.00) 156 | - glog 157 | - React-Core/Default 158 | - React-cxxreact (= 0.63.4) 159 | - React-jsi (= 0.63.4) 160 | - React-jsiexecutor (= 0.63.4) 161 | - Yoga 162 | - React-Core/RCTImageHeaders (0.63.4): 163 | - Folly (= 2020.01.13.00) 164 | - glog 165 | - React-Core/Default 166 | - React-cxxreact (= 0.63.4) 167 | - React-jsi (= 0.63.4) 168 | - React-jsiexecutor (= 0.63.4) 169 | - Yoga 170 | - React-Core/RCTLinkingHeaders (0.63.4): 171 | - Folly (= 2020.01.13.00) 172 | - glog 173 | - React-Core/Default 174 | - React-cxxreact (= 0.63.4) 175 | - React-jsi (= 0.63.4) 176 | - React-jsiexecutor (= 0.63.4) 177 | - Yoga 178 | - React-Core/RCTNetworkHeaders (0.63.4): 179 | - Folly (= 2020.01.13.00) 180 | - glog 181 | - React-Core/Default 182 | - React-cxxreact (= 0.63.4) 183 | - React-jsi (= 0.63.4) 184 | - React-jsiexecutor (= 0.63.4) 185 | - Yoga 186 | - React-Core/RCTSettingsHeaders (0.63.4): 187 | - Folly (= 2020.01.13.00) 188 | - glog 189 | - React-Core/Default 190 | - React-cxxreact (= 0.63.4) 191 | - React-jsi (= 0.63.4) 192 | - React-jsiexecutor (= 0.63.4) 193 | - Yoga 194 | - React-Core/RCTTextHeaders (0.63.4): 195 | - Folly (= 2020.01.13.00) 196 | - glog 197 | - React-Core/Default 198 | - React-cxxreact (= 0.63.4) 199 | - React-jsi (= 0.63.4) 200 | - React-jsiexecutor (= 0.63.4) 201 | - Yoga 202 | - React-Core/RCTVibrationHeaders (0.63.4): 203 | - Folly (= 2020.01.13.00) 204 | - glog 205 | - React-Core/Default 206 | - React-cxxreact (= 0.63.4) 207 | - React-jsi (= 0.63.4) 208 | - React-jsiexecutor (= 0.63.4) 209 | - Yoga 210 | - React-Core/RCTWebSocket (0.63.4): 211 | - Folly (= 2020.01.13.00) 212 | - glog 213 | - React-Core/Default (= 0.63.4) 214 | - React-cxxreact (= 0.63.4) 215 | - React-jsi (= 0.63.4) 216 | - React-jsiexecutor (= 0.63.4) 217 | - Yoga 218 | - React-CoreModules (0.63.4): 219 | - FBReactNativeSpec (= 0.63.4) 220 | - Folly (= 2020.01.13.00) 221 | - RCTTypeSafety (= 0.63.4) 222 | - React-Core/CoreModulesHeaders (= 0.63.4) 223 | - React-jsi (= 0.63.4) 224 | - React-RCTImage (= 0.63.4) 225 | - ReactCommon/turbomodule/core (= 0.63.4) 226 | - React-cxxreact (0.63.4): 227 | - boost-for-react-native (= 1.63.0) 228 | - DoubleConversion 229 | - Folly (= 2020.01.13.00) 230 | - glog 231 | - React-callinvoker (= 0.63.4) 232 | - React-jsinspector (= 0.63.4) 233 | - React-jsi (0.63.4): 234 | - boost-for-react-native (= 1.63.0) 235 | - DoubleConversion 236 | - Folly (= 2020.01.13.00) 237 | - glog 238 | - React-jsi/Default (= 0.63.4) 239 | - React-jsi/Default (0.63.4): 240 | - boost-for-react-native (= 1.63.0) 241 | - DoubleConversion 242 | - Folly (= 2020.01.13.00) 243 | - glog 244 | - React-jsiexecutor (0.63.4): 245 | - DoubleConversion 246 | - Folly (= 2020.01.13.00) 247 | - glog 248 | - React-cxxreact (= 0.63.4) 249 | - React-jsi (= 0.63.4) 250 | - React-jsinspector (0.63.4) 251 | - react-native-webview (11.2.3): 252 | - React-Core 253 | - React-RCTActionSheet (0.63.4): 254 | - React-Core/RCTActionSheetHeaders (= 0.63.4) 255 | - React-RCTAnimation (0.63.4): 256 | - FBReactNativeSpec (= 0.63.4) 257 | - Folly (= 2020.01.13.00) 258 | - RCTTypeSafety (= 0.63.4) 259 | - React-Core/RCTAnimationHeaders (= 0.63.4) 260 | - React-jsi (= 0.63.4) 261 | - ReactCommon/turbomodule/core (= 0.63.4) 262 | - React-RCTBlob (0.63.4): 263 | - FBReactNativeSpec (= 0.63.4) 264 | - Folly (= 2020.01.13.00) 265 | - React-Core/RCTBlobHeaders (= 0.63.4) 266 | - React-Core/RCTWebSocket (= 0.63.4) 267 | - React-jsi (= 0.63.4) 268 | - React-RCTNetwork (= 0.63.4) 269 | - ReactCommon/turbomodule/core (= 0.63.4) 270 | - React-RCTImage (0.63.4): 271 | - FBReactNativeSpec (= 0.63.4) 272 | - Folly (= 2020.01.13.00) 273 | - RCTTypeSafety (= 0.63.4) 274 | - React-Core/RCTImageHeaders (= 0.63.4) 275 | - React-jsi (= 0.63.4) 276 | - React-RCTNetwork (= 0.63.4) 277 | - ReactCommon/turbomodule/core (= 0.63.4) 278 | - React-RCTLinking (0.63.4): 279 | - FBReactNativeSpec (= 0.63.4) 280 | - React-Core/RCTLinkingHeaders (= 0.63.4) 281 | - React-jsi (= 0.63.4) 282 | - ReactCommon/turbomodule/core (= 0.63.4) 283 | - React-RCTNetwork (0.63.4): 284 | - FBReactNativeSpec (= 0.63.4) 285 | - Folly (= 2020.01.13.00) 286 | - RCTTypeSafety (= 0.63.4) 287 | - React-Core/RCTNetworkHeaders (= 0.63.4) 288 | - React-jsi (= 0.63.4) 289 | - ReactCommon/turbomodule/core (= 0.63.4) 290 | - React-RCTSettings (0.63.4): 291 | - FBReactNativeSpec (= 0.63.4) 292 | - Folly (= 2020.01.13.00) 293 | - RCTTypeSafety (= 0.63.4) 294 | - React-Core/RCTSettingsHeaders (= 0.63.4) 295 | - React-jsi (= 0.63.4) 296 | - ReactCommon/turbomodule/core (= 0.63.4) 297 | - React-RCTText (0.63.4): 298 | - React-Core/RCTTextHeaders (= 0.63.4) 299 | - React-RCTVibration (0.63.4): 300 | - FBReactNativeSpec (= 0.63.4) 301 | - Folly (= 2020.01.13.00) 302 | - React-Core/RCTVibrationHeaders (= 0.63.4) 303 | - React-jsi (= 0.63.4) 304 | - ReactCommon/turbomodule/core (= 0.63.4) 305 | - ReactCommon/turbomodule/core (0.63.4): 306 | - DoubleConversion 307 | - Folly (= 2020.01.13.00) 308 | - glog 309 | - React-callinvoker (= 0.63.4) 310 | - React-Core (= 0.63.4) 311 | - React-cxxreact (= 0.63.4) 312 | - React-jsi (= 0.63.4) 313 | - Yoga (1.14.0) 314 | - YogaKit (1.18.1): 315 | - Yoga (~> 1.14) 316 | 317 | DEPENDENCIES: 318 | - DoubleConversion (from `../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`) 319 | - FBLazyVector (from `../node_modules/react-native/Libraries/FBLazyVector`) 320 | - FBReactNativeSpec (from `../node_modules/react-native/Libraries/FBReactNativeSpec`) 321 | - Flipper (= 0.88.0) 322 | - Flipper-DoubleConversion (= 1.1.7) 323 | - Flipper-Folly (= 2.6.7) 324 | - Flipper-Glog (= 0.3.6) 325 | - Flipper-PeerTalk (~> 0.0.4) 326 | - Flipper-RSocket (= 1.4.3) 327 | - FlipperKit (= 0.88.0) 328 | - FlipperKit/Core (= 0.88.0) 329 | - FlipperKit/CppBridge (= 0.88.0) 330 | - FlipperKit/FBCxxFollyDynamicConvert (= 0.88.0) 331 | - FlipperKit/FBDefines (= 0.88.0) 332 | - FlipperKit/FKPortForwarding (= 0.88.0) 333 | - FlipperKit/FlipperKitHighlightOverlay (= 0.88.0) 334 | - FlipperKit/FlipperKitLayoutPlugin (= 0.88.0) 335 | - FlipperKit/FlipperKitLayoutTextSearchable (= 0.88.0) 336 | - FlipperKit/FlipperKitNetworkPlugin (= 0.88.0) 337 | - FlipperKit/FlipperKitReactPlugin (= 0.88.0) 338 | - FlipperKit/FlipperKitUserDefaultsPlugin (= 0.88.0) 339 | - FlipperKit/SKIOSNetworkPlugin (= 0.88.0) 340 | - Folly (from `../node_modules/react-native/third-party-podspecs/Folly.podspec`) 341 | - glog (from `../node_modules/react-native/third-party-podspecs/glog.podspec`) 342 | - RCTRequired (from `../node_modules/react-native/Libraries/RCTRequired`) 343 | - RCTTypeSafety (from `../node_modules/react-native/Libraries/TypeSafety`) 344 | - React (from `../node_modules/react-native/`) 345 | - React-callinvoker (from `../node_modules/react-native/ReactCommon/callinvoker`) 346 | - React-Core (from `../node_modules/react-native/`) 347 | - React-Core/DevSupport (from `../node_modules/react-native/`) 348 | - React-Core/RCTWebSocket (from `../node_modules/react-native/`) 349 | - React-CoreModules (from `../node_modules/react-native/React/CoreModules`) 350 | - React-cxxreact (from `../node_modules/react-native/ReactCommon/cxxreact`) 351 | - React-jsi (from `../node_modules/react-native/ReactCommon/jsi`) 352 | - React-jsiexecutor (from `../node_modules/react-native/ReactCommon/jsiexecutor`) 353 | - React-jsinspector (from `../node_modules/react-native/ReactCommon/jsinspector`) 354 | - react-native-webview (from `../node_modules/react-native-webview`) 355 | - React-RCTActionSheet (from `../node_modules/react-native/Libraries/ActionSheetIOS`) 356 | - React-RCTAnimation (from `../node_modules/react-native/Libraries/NativeAnimation`) 357 | - React-RCTBlob (from `../node_modules/react-native/Libraries/Blob`) 358 | - React-RCTImage (from `../node_modules/react-native/Libraries/Image`) 359 | - React-RCTLinking (from `../node_modules/react-native/Libraries/LinkingIOS`) 360 | - React-RCTNetwork (from `../node_modules/react-native/Libraries/Network`) 361 | - React-RCTSettings (from `../node_modules/react-native/Libraries/Settings`) 362 | - React-RCTText (from `../node_modules/react-native/Libraries/Text`) 363 | - React-RCTVibration (from `../node_modules/react-native/Libraries/Vibration`) 364 | - ReactCommon/turbomodule/core (from `../node_modules/react-native/ReactCommon`) 365 | - Yoga (from `../node_modules/react-native/ReactCommon/yoga`) 366 | 367 | SPEC REPOS: 368 | trunk: 369 | - boost-for-react-native 370 | - CocoaAsyncSocket 371 | - Flipper 372 | - Flipper-Boost-iOSX 373 | - Flipper-DoubleConversion 374 | - Flipper-Fmt 375 | - Flipper-Folly 376 | - Flipper-Glog 377 | - Flipper-PeerTalk 378 | - Flipper-RSocket 379 | - FlipperKit 380 | - libevent 381 | - OpenSSL-Universal 382 | - YogaKit 383 | 384 | EXTERNAL SOURCES: 385 | DoubleConversion: 386 | :podspec: "../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec" 387 | FBLazyVector: 388 | :path: "../node_modules/react-native/Libraries/FBLazyVector" 389 | FBReactNativeSpec: 390 | :path: "../node_modules/react-native/Libraries/FBReactNativeSpec" 391 | Folly: 392 | :podspec: "../node_modules/react-native/third-party-podspecs/Folly.podspec" 393 | glog: 394 | :podspec: "../node_modules/react-native/third-party-podspecs/glog.podspec" 395 | RCTRequired: 396 | :path: "../node_modules/react-native/Libraries/RCTRequired" 397 | RCTTypeSafety: 398 | :path: "../node_modules/react-native/Libraries/TypeSafety" 399 | React: 400 | :path: "../node_modules/react-native/" 401 | React-callinvoker: 402 | :path: "../node_modules/react-native/ReactCommon/callinvoker" 403 | React-Core: 404 | :path: "../node_modules/react-native/" 405 | React-CoreModules: 406 | :path: "../node_modules/react-native/React/CoreModules" 407 | React-cxxreact: 408 | :path: "../node_modules/react-native/ReactCommon/cxxreact" 409 | React-jsi: 410 | :path: "../node_modules/react-native/ReactCommon/jsi" 411 | React-jsiexecutor: 412 | :path: "../node_modules/react-native/ReactCommon/jsiexecutor" 413 | React-jsinspector: 414 | :path: "../node_modules/react-native/ReactCommon/jsinspector" 415 | react-native-webview: 416 | :path: "../node_modules/react-native-webview" 417 | React-RCTActionSheet: 418 | :path: "../node_modules/react-native/Libraries/ActionSheetIOS" 419 | React-RCTAnimation: 420 | :path: "../node_modules/react-native/Libraries/NativeAnimation" 421 | React-RCTBlob: 422 | :path: "../node_modules/react-native/Libraries/Blob" 423 | React-RCTImage: 424 | :path: "../node_modules/react-native/Libraries/Image" 425 | React-RCTLinking: 426 | :path: "../node_modules/react-native/Libraries/LinkingIOS" 427 | React-RCTNetwork: 428 | :path: "../node_modules/react-native/Libraries/Network" 429 | React-RCTSettings: 430 | :path: "../node_modules/react-native/Libraries/Settings" 431 | React-RCTText: 432 | :path: "../node_modules/react-native/Libraries/Text" 433 | React-RCTVibration: 434 | :path: "../node_modules/react-native/Libraries/Vibration" 435 | ReactCommon: 436 | :path: "../node_modules/react-native/ReactCommon" 437 | Yoga: 438 | :path: "../node_modules/react-native/ReactCommon/yoga" 439 | 440 | SPEC CHECKSUMS: 441 | boost-for-react-native: 39c7adb57c4e60d6c5479dd8623128eb5b3f0f2c 442 | CocoaAsyncSocket: 065fd1e645c7abab64f7a6a2007a48038fdc6a99 443 | DoubleConversion: cde416483dac037923206447da6e1454df403714 444 | FBLazyVector: 3bb422f41b18121b71783a905c10e58606f7dc3e 445 | FBReactNativeSpec: f2c97f2529dd79c083355182cc158c9f98f4bd6e 446 | Flipper: bbba2bf26e3377be472c5afd4113a4c77c4af07a 447 | Flipper-Boost-iOSX: fd1e2b8cbef7e662a122412d7ac5f5bea715403c 448 | Flipper-DoubleConversion: 38631e41ef4f9b12861c67d17cb5518d06badc41 449 | Flipper-Fmt: 60cbdd92fc254826e61d669a5d87ef7015396a9b 450 | Flipper-Folly: 83af37379faa69497529e414bd43fbfc7cae259a 451 | Flipper-Glog: 1dfd6abf1e922806c52ceb8701a3599a79a200a6 452 | Flipper-PeerTalk: 116d8f857dc6ef55c7a5a75ea3ceaafe878aadc9 453 | Flipper-RSocket: d9d9ade67cbecf6ac10730304bf5607266dd2541 454 | FlipperKit: 44a312ebace6e44d98d078e044178bedd42ea0c8 455 | Folly: b73c3869541e86821df3c387eb0af5f65addfab4 456 | glog: 40a13f7840415b9a77023fbcae0f1e6f43192af3 457 | libevent: 4049cae6c81cdb3654a443be001fb9bdceff7913 458 | OpenSSL-Universal: 1aa4f6a6ee7256b83db99ec1ccdaa80d10f9af9b 459 | RCTRequired: 082f10cd3f905d6c124597fd1c14f6f2655ff65e 460 | RCTTypeSafety: 8c9c544ecbf20337d069e4ae7fd9a377aadf504b 461 | React: b0a957a2c44da4113b0c4c9853d8387f8e64e615 462 | React-callinvoker: c3f44dd3cb195b6aa46621fff95ded79d59043fe 463 | React-Core: d3b2a1ac9a2c13c3bcde712d9281fc1c8a5b315b 464 | React-CoreModules: 0581ff36cb797da0943d424f69e7098e43e9be60 465 | React-cxxreact: c1480d4fda5720086c90df537ee7d285d4c57ac3 466 | React-jsi: a0418934cf48f25b485631deb27c64dc40fb4c31 467 | React-jsiexecutor: 93bd528844ad21dc07aab1c67cb10abae6df6949 468 | React-jsinspector: 58aef7155bc9a9683f5b60b35eccea8722a4f53a 469 | react-native-webview: 6520e3e7b4933de76b95ef542c8d7115cf45b68e 470 | React-RCTActionSheet: 89a0ca9f4a06c1f93c26067af074ccdce0f40336 471 | React-RCTAnimation: 1bde3ecc0c104c55df246eda516e0deb03c4e49b 472 | React-RCTBlob: a97d378b527740cc667e03ebfa183a75231ab0f0 473 | React-RCTImage: c1b1f2d3f43a4a528c8946d6092384b5c880d2f0 474 | React-RCTLinking: 35ae4ab9dc0410d1fcbdce4d7623194a27214fb2 475 | React-RCTNetwork: 29ec2696f8d8cfff7331fac83d3e893c95ef43ae 476 | React-RCTSettings: 60f0691bba2074ef394f95d4c2265ec284e0a46a 477 | React-RCTText: 5c51df3f08cb9dedc6e790161195d12bac06101c 478 | React-RCTVibration: ae4f914cfe8de7d4de95ae1ea6cc8f6315d73d9d 479 | ReactCommon: 73d79c7039f473b76db6ff7c6b159c478acbbb3b 480 | Yoga: 4bd86afe9883422a7c4028c00e34790f560923d6 481 | YogaKit: f782866e155069a2cca2517aafea43200b01fd5a 482 | 483 | PODFILE CHECKSUM: d16f833076e5488f4e11af1120436fa867f55278 484 | 485 | COCOAPODS: 1.11.2 486 | -------------------------------------------------------------------------------- /example/ios/example.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; }; 11 | AA676069B5F8004476202764 /* libPods-example.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 28ACAA37BEC7CCC8DE2CDBFF /* libPods-example.a */; }; 12 | FA4A9D282369C1DB0065E0DD /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = FA4A9D272369C1DB0065E0DD /* AppDelegate.swift */; }; 13 | FA4A9D2B2369C4B80065E0DD /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = FA4A9D2A2369C4B80065E0DD /* LaunchScreen.storyboard */; }; 14 | /* End PBXBuildFile section */ 15 | 16 | /* Begin PBXFileReference section */ 17 | 008F07F21AC5B25A0029DE68 /* main.jsbundle */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = main.jsbundle; sourceTree = ""; }; 18 | 13B07F961A680F5B00A75B9A /* example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = example.app; sourceTree = BUILT_PRODUCTS_DIR; }; 19 | 13B07FB51A68108700A75B9A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = example/Images.xcassets; sourceTree = ""; }; 20 | 13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = example/Info.plist; sourceTree = ""; }; 21 | 28ACAA37BEC7CCC8DE2CDBFF /* libPods-example.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-example.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 22 | E5EB9AA066C7F8307CBEB5C9 /* Pods-example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-example.release.xcconfig"; path = "Target Support Files/Pods-example/Pods-example.release.xcconfig"; sourceTree = ""; }; 23 | ED297162215061F000B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; }; 24 | F9C88A685C06F492A97D4ABD /* Pods-example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-example.debug.xcconfig"; path = "Target Support Files/Pods-example/Pods-example.debug.xcconfig"; sourceTree = ""; }; 25 | FA4A9D272369C1DB0065E0DD /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = AppDelegate.swift; path = example/AppDelegate.swift; sourceTree = ""; }; 26 | FA4A9D292369C20E0065E0DD /* example-Bridging-Header.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "example-Bridging-Header.h"; path = "example/example-Bridging-Header.h"; sourceTree = ""; }; 27 | FA4A9D2A2369C4B80065E0DD /* LaunchScreen.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = LaunchScreen.storyboard; path = example/LaunchScreen.storyboard; sourceTree = ""; }; 28 | /* End PBXFileReference section */ 29 | 30 | /* Begin PBXFrameworksBuildPhase section */ 31 | 13B07F8C1A680F5B00A75B9A /* Frameworks */ = { 32 | isa = PBXFrameworksBuildPhase; 33 | buildActionMask = 2147483647; 34 | files = ( 35 | AA676069B5F8004476202764 /* libPods-example.a in Frameworks */, 36 | ); 37 | runOnlyForDeploymentPostprocessing = 0; 38 | }; 39 | /* End PBXFrameworksBuildPhase section */ 40 | 41 | /* Begin PBXGroup section */ 42 | 13B07FAE1A68108700A75B9A /* example */ = { 43 | isa = PBXGroup; 44 | children = ( 45 | 008F07F21AC5B25A0029DE68 /* main.jsbundle */, 46 | 13B07FB51A68108700A75B9A /* Images.xcassets */, 47 | FA4A9D272369C1DB0065E0DD /* AppDelegate.swift */, 48 | FA4A9D292369C20E0065E0DD /* example-Bridging-Header.h */, 49 | 13B07FB61A68108700A75B9A /* Info.plist */, 50 | FA4A9D2A2369C4B80065E0DD /* LaunchScreen.storyboard */, 51 | ); 52 | name = example; 53 | sourceTree = ""; 54 | }; 55 | 2D16E6871FA4F8E400B85C8A /* Frameworks */ = { 56 | isa = PBXGroup; 57 | children = ( 58 | ED297162215061F000B7C4FE /* JavaScriptCore.framework */, 59 | 28ACAA37BEC7CCC8DE2CDBFF /* libPods-example.a */, 60 | ); 61 | name = Frameworks; 62 | sourceTree = ""; 63 | }; 64 | 832341AE1AAA6A7D00B99B32 /* Libraries */ = { 65 | isa = PBXGroup; 66 | children = ( 67 | ); 68 | name = Libraries; 69 | sourceTree = ""; 70 | }; 71 | 83CBB9F61A601CBA00E9B192 = { 72 | isa = PBXGroup; 73 | children = ( 74 | 13B07FAE1A68108700A75B9A /* example */, 75 | 832341AE1AAA6A7D00B99B32 /* Libraries */, 76 | 83CBBA001A601CBA00E9B192 /* Products */, 77 | 2D16E6871FA4F8E400B85C8A /* Frameworks */, 78 | B59C1D8000B0E86FD8C212D7 /* Pods */, 79 | ); 80 | indentWidth = 2; 81 | sourceTree = ""; 82 | tabWidth = 2; 83 | usesTabs = 0; 84 | }; 85 | 83CBBA001A601CBA00E9B192 /* Products */ = { 86 | isa = PBXGroup; 87 | children = ( 88 | 13B07F961A680F5B00A75B9A /* example.app */, 89 | ); 90 | name = Products; 91 | sourceTree = ""; 92 | }; 93 | B59C1D8000B0E86FD8C212D7 /* Pods */ = { 94 | isa = PBXGroup; 95 | children = ( 96 | F9C88A685C06F492A97D4ABD /* Pods-example.debug.xcconfig */, 97 | E5EB9AA066C7F8307CBEB5C9 /* Pods-example.release.xcconfig */, 98 | ); 99 | path = Pods; 100 | sourceTree = ""; 101 | }; 102 | /* End PBXGroup section */ 103 | 104 | /* Begin PBXNativeTarget section */ 105 | 13B07F861A680F5B00A75B9A /* example */ = { 106 | isa = PBXNativeTarget; 107 | buildConfigurationList = 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "example" */; 108 | buildPhases = ( 109 | E822CBEB56C1368EC814AA26 /* [CP] Check Pods Manifest.lock */, 110 | FD10A7F022414F080027D42C /* Start Packager */, 111 | 13B07F871A680F5B00A75B9A /* Sources */, 112 | 13B07F8C1A680F5B00A75B9A /* Frameworks */, 113 | 13B07F8E1A680F5B00A75B9A /* Resources */, 114 | 00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */, 115 | 080A96EB1DA6E197A9892AF3 /* [CP] Embed Pods Frameworks */, 116 | 64F03EAC4C40775C4DEAA100 /* [CP] Copy Pods Resources */, 117 | ); 118 | buildRules = ( 119 | ); 120 | dependencies = ( 121 | ); 122 | name = example; 123 | productName = example; 124 | productReference = 13B07F961A680F5B00A75B9A /* example.app */; 125 | productType = "com.apple.product-type.application"; 126 | }; 127 | /* End PBXNativeTarget section */ 128 | 129 | /* Begin PBXProject section */ 130 | 83CBB9F71A601CBA00E9B192 /* Project object */ = { 131 | isa = PBXProject; 132 | attributes = { 133 | LastUpgradeCheck = 1230; 134 | ORGANIZATIONNAME = Facebook; 135 | TargetAttributes = { 136 | 13B07F861A680F5B00A75B9A = { 137 | LastSwiftMigration = 1110; 138 | }; 139 | }; 140 | }; 141 | buildConfigurationList = 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "example" */; 142 | compatibilityVersion = "Xcode 3.2"; 143 | developmentRegion = en; 144 | hasScannedForEncodings = 0; 145 | knownRegions = ( 146 | en, 147 | Base, 148 | ); 149 | mainGroup = 83CBB9F61A601CBA00E9B192; 150 | productRefGroup = 83CBBA001A601CBA00E9B192 /* Products */; 151 | projectDirPath = ""; 152 | projectRoot = ""; 153 | targets = ( 154 | 13B07F861A680F5B00A75B9A /* example */, 155 | ); 156 | }; 157 | /* End PBXProject section */ 158 | 159 | /* Begin PBXResourcesBuildPhase section */ 160 | 13B07F8E1A680F5B00A75B9A /* Resources */ = { 161 | isa = PBXResourcesBuildPhase; 162 | buildActionMask = 2147483647; 163 | files = ( 164 | 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */, 165 | FA4A9D2B2369C4B80065E0DD /* LaunchScreen.storyboard in Resources */, 166 | ); 167 | runOnlyForDeploymentPostprocessing = 0; 168 | }; 169 | /* End PBXResourcesBuildPhase section */ 170 | 171 | /* Begin PBXShellScriptBuildPhase section */ 172 | 00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */ = { 173 | isa = PBXShellScriptBuildPhase; 174 | buildActionMask = 2147483647; 175 | files = ( 176 | ); 177 | inputPaths = ( 178 | ); 179 | name = "Bundle React Native code and images"; 180 | outputPaths = ( 181 | ); 182 | runOnlyForDeploymentPostprocessing = 0; 183 | shellPath = /bin/sh; 184 | shellScript = "export NODE_BINARY=node\n../node_modules/react-native/scripts/react-native-xcode.sh"; 185 | }; 186 | 080A96EB1DA6E197A9892AF3 /* [CP] Embed Pods Frameworks */ = { 187 | isa = PBXShellScriptBuildPhase; 188 | buildActionMask = 2147483647; 189 | files = ( 190 | ); 191 | inputPaths = ( 192 | "${PODS_ROOT}/Target Support Files/Pods-example/Pods-example-frameworks.sh", 193 | "${PODS_XCFRAMEWORKS_BUILD_DIR}/OpenSSL-Universal/OpenSSL.framework/OpenSSL", 194 | ); 195 | name = "[CP] Embed Pods Frameworks"; 196 | outputPaths = ( 197 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/OpenSSL.framework", 198 | ); 199 | runOnlyForDeploymentPostprocessing = 0; 200 | shellPath = /bin/sh; 201 | shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-example/Pods-example-frameworks.sh\"\n"; 202 | showEnvVarsInLog = 0; 203 | }; 204 | 64F03EAC4C40775C4DEAA100 /* [CP] Copy Pods Resources */ = { 205 | isa = PBXShellScriptBuildPhase; 206 | buildActionMask = 2147483647; 207 | files = ( 208 | ); 209 | inputPaths = ( 210 | "${PODS_ROOT}/Target Support Files/Pods-example/Pods-example-resources.sh", 211 | "${PODS_CONFIGURATION_BUILD_DIR}/React-Core/AccessibilityResources.bundle", 212 | ); 213 | name = "[CP] Copy Pods Resources"; 214 | outputPaths = ( 215 | "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/AccessibilityResources.bundle", 216 | ); 217 | runOnlyForDeploymentPostprocessing = 0; 218 | shellPath = /bin/sh; 219 | shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-example/Pods-example-resources.sh\"\n"; 220 | showEnvVarsInLog = 0; 221 | }; 222 | E822CBEB56C1368EC814AA26 /* [CP] Check Pods Manifest.lock */ = { 223 | isa = PBXShellScriptBuildPhase; 224 | buildActionMask = 2147483647; 225 | files = ( 226 | ); 227 | inputFileListPaths = ( 228 | ); 229 | inputPaths = ( 230 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock", 231 | "${PODS_ROOT}/Manifest.lock", 232 | ); 233 | name = "[CP] Check Pods Manifest.lock"; 234 | outputFileListPaths = ( 235 | ); 236 | outputPaths = ( 237 | "$(DERIVED_FILE_DIR)/Pods-example-checkManifestLockResult.txt", 238 | ); 239 | runOnlyForDeploymentPostprocessing = 0; 240 | shellPath = /bin/sh; 241 | shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; 242 | showEnvVarsInLog = 0; 243 | }; 244 | FD10A7F022414F080027D42C /* Start Packager */ = { 245 | isa = PBXShellScriptBuildPhase; 246 | buildActionMask = 2147483647; 247 | files = ( 248 | ); 249 | inputFileListPaths = ( 250 | ); 251 | inputPaths = ( 252 | ); 253 | name = "Start Packager"; 254 | outputFileListPaths = ( 255 | ); 256 | outputPaths = ( 257 | ); 258 | runOnlyForDeploymentPostprocessing = 0; 259 | shellPath = /bin/sh; 260 | shellScript = "export RCT_METRO_PORT=\"${RCT_METRO_PORT:=8081}\"\necho \"export RCT_METRO_PORT=${RCT_METRO_PORT}\" > \"${SRCROOT}/../node_modules/react-native/scripts/.packager.env\"\nif [ -z \"${RCT_NO_LAUNCH_PACKAGER+xxx}\" ] ; then\n if nc -w 5 -z localhost ${RCT_METRO_PORT} ; then\n if ! curl -s \"http://localhost:${RCT_METRO_PORT}/status\" | grep -q \"packager-status:running\" ; then\n echo \"Port ${RCT_METRO_PORT} already in use, packager is either not running or not running correctly\"\n exit 2\n fi\n else\n open \"$SRCROOT/../node_modules/react-native/scripts/launchPackager.command\" || echo \"Can't start packager automatically\"\n fi\nfi\n"; 261 | showEnvVarsInLog = 0; 262 | }; 263 | /* End PBXShellScriptBuildPhase section */ 264 | 265 | /* Begin PBXSourcesBuildPhase section */ 266 | 13B07F871A680F5B00A75B9A /* Sources */ = { 267 | isa = PBXSourcesBuildPhase; 268 | buildActionMask = 2147483647; 269 | files = ( 270 | FA4A9D282369C1DB0065E0DD /* AppDelegate.swift in Sources */, 271 | ); 272 | runOnlyForDeploymentPostprocessing = 0; 273 | }; 274 | /* End PBXSourcesBuildPhase section */ 275 | 276 | /* Begin XCBuildConfiguration section */ 277 | 13B07F941A680F5B00A75B9A /* Debug */ = { 278 | isa = XCBuildConfiguration; 279 | baseConfigurationReference = F9C88A685C06F492A97D4ABD /* Pods-example.debug.xcconfig */; 280 | buildSettings = { 281 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 282 | CLANG_ENABLE_MODULES = YES; 283 | CURRENT_PROJECT_VERSION = 1; 284 | DEAD_CODE_STRIPPING = NO; 285 | ENABLE_BITCODE = NO; 286 | HEADER_SEARCH_PATHS = ( 287 | "$(inherited)", 288 | "\"${PODS_ROOT}/Headers/Public\"", 289 | "\"${PODS_ROOT}/Headers/Public/DoubleConversion\"", 290 | "\"${PODS_ROOT}/Headers/Public/FBLazyVector\"", 291 | "\"${PODS_ROOT}/Headers/Public/FBReactNativeSpec\"", 292 | "\"${PODS_ROOT}/Headers/Public/RCTRequired\"", 293 | "\"${PODS_ROOT}/Headers/Public/RCTTypeSafety\"", 294 | "\"${PODS_ROOT}/Headers/Public/React-Core\"", 295 | "\"${PODS_ROOT}/Headers/Public/React-RCTBlob\"", 296 | "\"${PODS_ROOT}/Headers/Public/React-RCTText\"", 297 | "\"${PODS_ROOT}/Headers/Public/React-cxxreact\"", 298 | "\"${PODS_ROOT}/Headers/Public/React-jsi\"", 299 | "\"${PODS_ROOT}/Headers/Public/React-jsiexecutor\"", 300 | "\"${PODS_ROOT}/Headers/Public/React-jsinspector\"", 301 | "\"${PODS_ROOT}/Headers/Public/ReactCommon\"", 302 | "\"${PODS_ROOT}/Headers/Public/Yoga\"", 303 | "\"${PODS_ROOT}/Headers/Public/glog\"", 304 | "\"$(PODS_ROOT)/Headers/Private/React-Core\"", 305 | "$(SRCROOT)/../../ios", 306 | ); 307 | INFOPLIST_FILE = example/Info.plist; 308 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 309 | OTHER_LDFLAGS = ( 310 | "$(inherited)", 311 | "-ObjC", 312 | "-lc++", 313 | ); 314 | PRODUCT_BUNDLE_IDENTIFIER = com.example; 315 | PRODUCT_NAME = example; 316 | SWIFT_OBJC_BRIDGING_HEADER = "example/example-Bridging-Header.h"; 317 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 318 | SWIFT_VERSION = 5.0; 319 | VERSIONING_SYSTEM = "apple-generic"; 320 | }; 321 | name = Debug; 322 | }; 323 | 13B07F951A680F5B00A75B9A /* Release */ = { 324 | isa = XCBuildConfiguration; 325 | baseConfigurationReference = E5EB9AA066C7F8307CBEB5C9 /* Pods-example.release.xcconfig */; 326 | buildSettings = { 327 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 328 | CLANG_ENABLE_MODULES = YES; 329 | CURRENT_PROJECT_VERSION = 1; 330 | ENABLE_BITCODE = NO; 331 | HEADER_SEARCH_PATHS = ( 332 | "$(inherited)", 333 | "\"${PODS_ROOT}/Headers/Public\"", 334 | "\"${PODS_ROOT}/Headers/Public/DoubleConversion\"", 335 | "\"${PODS_ROOT}/Headers/Public/FBLazyVector\"", 336 | "\"${PODS_ROOT}/Headers/Public/FBReactNativeSpec\"", 337 | "\"${PODS_ROOT}/Headers/Public/RCTRequired\"", 338 | "\"${PODS_ROOT}/Headers/Public/RCTTypeSafety\"", 339 | "\"${PODS_ROOT}/Headers/Public/React-Core\"", 340 | "\"${PODS_ROOT}/Headers/Public/React-RCTBlob\"", 341 | "\"${PODS_ROOT}/Headers/Public/React-RCTText\"", 342 | "\"${PODS_ROOT}/Headers/Public/React-cxxreact\"", 343 | "\"${PODS_ROOT}/Headers/Public/React-jsi\"", 344 | "\"${PODS_ROOT}/Headers/Public/React-jsiexecutor\"", 345 | "\"${PODS_ROOT}/Headers/Public/React-jsinspector\"", 346 | "\"${PODS_ROOT}/Headers/Public/ReactCommon\"", 347 | "\"${PODS_ROOT}/Headers/Public/Yoga\"", 348 | "\"${PODS_ROOT}/Headers/Public/glog\"", 349 | "\"$(PODS_ROOT)/Headers/Private/React-Core\"", 350 | "$(SRCROOT)/../../ios", 351 | ); 352 | INFOPLIST_FILE = example/Info.plist; 353 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 354 | OTHER_LDFLAGS = ( 355 | "$(inherited)", 356 | "-ObjC", 357 | "-lc++", 358 | ); 359 | PRODUCT_BUNDLE_IDENTIFIER = com.example; 360 | PRODUCT_NAME = example; 361 | SWIFT_OBJC_BRIDGING_HEADER = "example/example-Bridging-Header.h"; 362 | SWIFT_VERSION = 5.0; 363 | VERSIONING_SYSTEM = "apple-generic"; 364 | }; 365 | name = Release; 366 | }; 367 | 83CBBA201A601CBA00E9B192 /* Debug */ = { 368 | isa = XCBuildConfiguration; 369 | buildSettings = { 370 | ALWAYS_SEARCH_USER_PATHS = NO; 371 | CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; 372 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 373 | CLANG_CXX_LIBRARY = "libc++"; 374 | CLANG_ENABLE_MODULES = YES; 375 | CLANG_ENABLE_OBJC_ARC = YES; 376 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 377 | CLANG_WARN_BOOL_CONVERSION = YES; 378 | CLANG_WARN_COMMA = YES; 379 | CLANG_WARN_CONSTANT_CONVERSION = YES; 380 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 381 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 382 | CLANG_WARN_EMPTY_BODY = YES; 383 | CLANG_WARN_ENUM_CONVERSION = YES; 384 | CLANG_WARN_INFINITE_RECURSION = YES; 385 | CLANG_WARN_INT_CONVERSION = YES; 386 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 387 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 388 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 389 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 390 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; 391 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 392 | CLANG_WARN_STRICT_PROTOTYPES = YES; 393 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 394 | CLANG_WARN_UNREACHABLE_CODE = YES; 395 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 396 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 397 | COPY_PHASE_STRIP = NO; 398 | ENABLE_STRICT_OBJC_MSGSEND = YES; 399 | ENABLE_TESTABILITY = YES; 400 | GCC_C_LANGUAGE_STANDARD = gnu99; 401 | GCC_DYNAMIC_NO_PIC = NO; 402 | GCC_NO_COMMON_BLOCKS = YES; 403 | GCC_OPTIMIZATION_LEVEL = 0; 404 | GCC_PREPROCESSOR_DEFINITIONS = ( 405 | "DEBUG=1", 406 | "$(inherited)", 407 | ); 408 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 409 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 410 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 411 | GCC_WARN_UNDECLARED_SELECTOR = YES; 412 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 413 | GCC_WARN_UNUSED_FUNCTION = YES; 414 | GCC_WARN_UNUSED_VARIABLE = YES; 415 | IPHONEOS_DEPLOYMENT_TARGET = 10.0; 416 | MTL_ENABLE_DEBUG_INFO = YES; 417 | ONLY_ACTIVE_ARCH = YES; 418 | OTHER_SWIFT_FLAGS = "-D DEBUG"; 419 | SDKROOT = iphoneos; 420 | }; 421 | name = Debug; 422 | }; 423 | 83CBBA211A601CBA00E9B192 /* Release */ = { 424 | isa = XCBuildConfiguration; 425 | buildSettings = { 426 | ALWAYS_SEARCH_USER_PATHS = NO; 427 | CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; 428 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 429 | CLANG_CXX_LIBRARY = "libc++"; 430 | CLANG_ENABLE_MODULES = YES; 431 | CLANG_ENABLE_OBJC_ARC = YES; 432 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 433 | CLANG_WARN_BOOL_CONVERSION = YES; 434 | CLANG_WARN_COMMA = YES; 435 | CLANG_WARN_CONSTANT_CONVERSION = YES; 436 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 437 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 438 | CLANG_WARN_EMPTY_BODY = YES; 439 | CLANG_WARN_ENUM_CONVERSION = YES; 440 | CLANG_WARN_INFINITE_RECURSION = YES; 441 | CLANG_WARN_INT_CONVERSION = YES; 442 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 443 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 444 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 445 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 446 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; 447 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 448 | CLANG_WARN_STRICT_PROTOTYPES = YES; 449 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 450 | CLANG_WARN_UNREACHABLE_CODE = YES; 451 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 452 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 453 | COPY_PHASE_STRIP = YES; 454 | ENABLE_NS_ASSERTIONS = NO; 455 | ENABLE_STRICT_OBJC_MSGSEND = YES; 456 | GCC_C_LANGUAGE_STANDARD = gnu99; 457 | GCC_NO_COMMON_BLOCKS = YES; 458 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 459 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 460 | GCC_WARN_UNDECLARED_SELECTOR = YES; 461 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 462 | GCC_WARN_UNUSED_FUNCTION = YES; 463 | GCC_WARN_UNUSED_VARIABLE = YES; 464 | IPHONEOS_DEPLOYMENT_TARGET = 10.0; 465 | MTL_ENABLE_DEBUG_INFO = NO; 466 | SDKROOT = iphoneos; 467 | SWIFT_COMPILATION_MODE = wholemodule; 468 | VALIDATE_PRODUCT = YES; 469 | }; 470 | name = Release; 471 | }; 472 | /* End XCBuildConfiguration section */ 473 | 474 | /* Begin XCConfigurationList section */ 475 | 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "example" */ = { 476 | isa = XCConfigurationList; 477 | buildConfigurations = ( 478 | 13B07F941A680F5B00A75B9A /* Debug */, 479 | 13B07F951A680F5B00A75B9A /* Release */, 480 | ); 481 | defaultConfigurationIsVisible = 0; 482 | defaultConfigurationName = Release; 483 | }; 484 | 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "example" */ = { 485 | isa = XCConfigurationList; 486 | buildConfigurations = ( 487 | 83CBBA201A601CBA00E9B192 /* Debug */, 488 | 83CBBA211A601CBA00E9B192 /* Release */, 489 | ); 490 | defaultConfigurationIsVisible = 0; 491 | defaultConfigurationName = Release; 492 | }; 493 | /* End XCConfigurationList section */ 494 | }; 495 | rootObject = 83CBB9F71A601CBA00E9B192 /* Project object */; 496 | } 497 | -------------------------------------------------------------------------------- /example/ios/example.xcodeproj/xcshareddata/xcschemes/example.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 43 | 45 | 51 | 52 | 53 | 54 | 60 | 62 | 68 | 69 | 70 | 71 | 73 | 74 | 77 | 78 | 79 | -------------------------------------------------------------------------------- /example/ios/example.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /example/ios/example.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /example/ios/example/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // example 4 | // 5 | // Copyright © 2021 Facebook. All rights reserved. 6 | // 7 | 8 | import UIKit 9 | #if DEBUG 10 | import FlipperKit 11 | #endif 12 | 13 | @UIApplicationMain 14 | class AppDelegate: UIResponder, UIApplicationDelegate, RCTBridgeDelegate { 15 | 16 | var window: UIWindow? 17 | 18 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { 19 | initializeFlipper(with: application) 20 | 21 | let bridge = RCTBridge(delegate: self, launchOptions: launchOptions) 22 | let rootView = RCTRootView(bridge: bridge!, moduleName: "example", initialProperties: nil) 23 | 24 | rootView.backgroundColor = UIColor(red: 1, green: 1, blue: 1, alpha: 1) 25 | 26 | window = UIWindow(frame: UIScreen.main.bounds) 27 | let rootViewController = UIViewController() 28 | rootViewController.view = rootView 29 | window?.rootViewController = rootViewController 30 | window?.makeKeyAndVisible() 31 | 32 | return true 33 | } 34 | 35 | func sourceURL(for bridge: RCTBridge!) -> URL! { 36 | #if DEBUG 37 | return RCTBundleURLProvider.sharedSettings()?.jsBundleURL(forBundleRoot: "index", fallbackResource: nil) 38 | #else 39 | return Bundle.main.url(forResource: "main", withExtension: "jsbundle") 40 | #endif 41 | } 42 | 43 | private func initializeFlipper(with application: UIApplication) { 44 | #if DEBUG 45 | let client = FlipperClient.shared() 46 | let layoutDescriptionMapper = SKDescriptorMapper(defaults: ()) 47 | client?.add(FlipperKitLayoutPlugin(rootNode: application, with: layoutDescriptionMapper)) 48 | client?.add(FKUserDefaultsPlugin(suiteName: nil)) 49 | client?.add(FlipperKitReactPlugin()) 50 | client?.add(FlipperKitNetworkPlugin(networkAdapter: SKIOSNetworkAdapter())) 51 | client?.start() 52 | #endif 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /example/ios/example/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "20x20", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "20x20", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "29x29", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "29x29", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "40x40", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "40x40", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "iphone", 35 | "size" : "60x60", 36 | "scale" : "2x" 37 | }, 38 | { 39 | "idiom" : "iphone", 40 | "size" : "60x60", 41 | "scale" : "3x" 42 | }, 43 | { 44 | "idiom" : "ios-marketing", 45 | "size" : "1024x1024", 46 | "scale" : "1x" 47 | } 48 | ], 49 | "info" : { 50 | "version" : 1, 51 | "author" : "xcode" 52 | } 53 | } -------------------------------------------------------------------------------- /example/ios/example/Images.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /example/ios/example/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | example 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 | $(CURRENT_PROJECT_VERSION) 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 | UILaunchStoryboardName 43 | LaunchScreen 44 | UIRequiredDeviceCapabilities 45 | 46 | armv7 47 | 48 | UISupportedInterfaceOrientations 49 | 50 | UIInterfaceOrientationPortrait 51 | UIInterfaceOrientationLandscapeLeft 52 | UIInterfaceOrientationLandscapeRight 53 | 54 | UIViewControllerBasedStatusBarAppearance 55 | 56 | 57 | 58 | -------------------------------------------------------------------------------- /example/ios/example/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 25 | 31 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | -------------------------------------------------------------------------------- /example/ios/example/example-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | // 2 | // Use this file to import your target's public headers that you would like to expose to Swift. 3 | // 4 | 5 | #import 6 | #import 7 | #import 8 | -------------------------------------------------------------------------------- /example/metro.config.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Metro configuration for React Native 3 | * https://github.com/facebook/react-native 4 | * 5 | * @format 6 | */ 7 | 8 | const path = require('path') 9 | const blacklist = require('metro-config/src/defaults/blacklist') 10 | 11 | const moduleRoot = path.resolve(__dirname, '..') 12 | 13 | module.exports = { 14 | watchFolders: [moduleRoot], 15 | resolver: { 16 | extraNodeModules: { 17 | react: path.resolve(__dirname, 'node_modules/react'), 18 | 'react-native': path.resolve(__dirname, 'node_modules/react-native'), 19 | }, 20 | blacklistRE: blacklist([ 21 | new RegExp(`${moduleRoot}/node_modules/react/.*`), 22 | new RegExp(`${moduleRoot}/node_modules/react-native/.*`), 23 | ]), 24 | }, 25 | transformer: { 26 | getTransformOptions: async () => ({ 27 | transform: { 28 | experimentalImportSupport: false, 29 | inlineRequires: false, 30 | }, 31 | }), 32 | }, 33 | } 34 | -------------------------------------------------------------------------------- /example/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "example", 3 | "version": "0.0.1", 4 | "private": true, 5 | "scripts": { 6 | "android": "react-native run-android", 7 | "compile": "tsc -p .", 8 | "ios": "react-native run-ios", 9 | "lint": "eslint . --ext .js,.jsx,.ts,.tsx", 10 | "start": "react-native start", 11 | "test": "jest" 12 | }, 13 | "dependencies": { 14 | "react": "17.0.1", 15 | "react-native": "0.63.4", 16 | "react-native-webview": "11.2.3" 17 | }, 18 | "devDependencies": { 19 | "@babel/core": "7.12.10", 20 | "@babel/runtime": "7.18.3", 21 | "@react-native-community/eslint-config": "2.0.0", 22 | "@types/jest": "26.0.20", 23 | "@types/react-native": "0.63.46", 24 | "@types/react-test-renderer": "17.0.0", 25 | "babel-jest": "26.6.3", 26 | "eslint": "7.19.0", 27 | "eslint-plugin-simple-import-sort": "7.0.0", 28 | "jest": "26.6.3", 29 | "metro-react-native-babel-preset": "0.65.0", 30 | "react-native-vimeo-iframe": "file:../lib", 31 | "react-test-renderer": "17.0.1", 32 | "typescript": "4.1.3" 33 | }, 34 | "jest": { 35 | "preset": "react-native", 36 | "moduleFileExtensions": [ 37 | "ts", 38 | "tsx", 39 | "js", 40 | "jsx", 41 | "json", 42 | "node" 43 | ] 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /example/src/App.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import { SafeAreaView, Text, View } from 'react-native' 3 | import { Vimeo } from 'react-native-vimeo-iframe' 4 | import { styles } from './styles' 5 | 6 | const App = () => { 7 | const videoCallbacks = { 8 | play: (data: any) => console.warn('play: ', data), 9 | pause: (data: any) => console.warn('pause: ', data), 10 | fullscreenchange: (data: any) => console.warn('fullscreenchange: ', data), 11 | ended: (data: any) => console.warn('ended: ', data), 12 | controlschange: (data: any) => console.warn('controlschange: ', data), 13 | } 14 | 15 | return ( 16 | 17 | 18 | React Native Vimeo Iframe 19 | 20 | 21 | 26 | 31 | 32 | 33 | 34 | ) 35 | } 36 | 37 | export default App 38 | -------------------------------------------------------------------------------- /example/src/styles.ts: -------------------------------------------------------------------------------- 1 | import { StyleSheet } from 'react-native' 2 | 3 | export const styles = StyleSheet.create({ 4 | container: { 5 | flex: 1, 6 | }, 7 | videosContainer: { 8 | flex: 1, 9 | }, 10 | title: { 11 | fontSize: 20, 12 | textAlign: 'center', 13 | }, 14 | }) 15 | -------------------------------------------------------------------------------- /example/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "baseUrl": ".", 4 | "esModuleInterop": true, 5 | "isolatedModules": true, 6 | "jsx": "react-native", 7 | "lib": ["ESNext"], 8 | "module": "CommonJS", 9 | "noEmit": true, 10 | "paths": { 11 | "react-native-vimeo-iframe": ["../src"] 12 | }, 13 | "skipLibCheck": true, 14 | "strict": true, 15 | "target": "ESNext" 16 | }, 17 | "include": ["src", "../src"] 18 | } 19 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "react-native-vimeo-iframe", 3 | "version": "1.2.1", 4 | "description": "React Native Vimeo Iframe is a library to render Vimeo videos in a React Native app. This component allows you to embed a Vimeo video in your app and have full access to the Vimeo player JS API (more information https://developer.vimeo.com/player/js-api).", 5 | "homepage": "https://github.com/MetaLabs-inc/react-native-vimeo-iframe#readme", 6 | "main": "lib/commonjs/index.js", 7 | "types": "lib/typescript/index.d.ts", 8 | "module": "lib/module/index.js", 9 | "react-native": "src/index.tsx", 10 | "source": "src/index.tsx", 11 | "author": "Marco Fiorito , Douglas Rosa , Felipe Najson ", 12 | "license": "MIT", 13 | "files": [ 14 | "src", 15 | "lib", 16 | "babel.js" 17 | ], 18 | "repository": { 19 | "type": "git", 20 | "url": "https://github.com/MetaLabs-inc/react-native-vimeo-iframe" 21 | }, 22 | "keywords": [ 23 | "android", 24 | "ios", 25 | "react native", 26 | "component library", 27 | "vimeo", 28 | "videos" 29 | ], 30 | "scripts": { 31 | "typescript": "tsc --noEmit", 32 | "prepare": "bob build && node ./scripts/generate-mappings.js", 33 | "compile": "rm -rf lib && tsc -p .", 34 | "lint": "eslint . --ext .js,.jsx,.ts,.tsx", 35 | "test": "jest" 36 | }, 37 | "devDependencies": { 38 | "@babel/core": "7.12.10", 39 | "@babel/runtime": "7.18.3", 40 | "@react-native-community/eslint-config": "2.0.0", 41 | "@types/jest": "26.0.20", 42 | "@types/react-native": "0.63.46", 43 | "@types/react-test-renderer": "17.0.0", 44 | "babel-jest": "26.6.3", 45 | "eslint": "7.19.0", 46 | "eslint-plugin-simple-import-sort": "7.0.0", 47 | "jest": "26.6.3", 48 | "metro-react-native-babel-preset": "0.65.0", 49 | "babel-cli": "6.26.0", 50 | "react": "17.0.1", 51 | "react-native": "0.63.4", 52 | "react-test-renderer": "17.0.1", 53 | "react-native-webview": "11.2.3", 54 | "typescript": "4.1.3", 55 | "react-native-builder-bob": "0.17.1" 56 | }, 57 | "peerDependencies": { 58 | "react": "*", 59 | "react-native": "*", 60 | "react-native-webview": "*" 61 | }, 62 | "jest": { 63 | "preset": "react-native", 64 | "moduleFileExtensions": [ 65 | "ts", 66 | "tsx", 67 | "js", 68 | "jsx", 69 | "json", 70 | "node" 71 | ] 72 | }, 73 | "react-native-builder-bob": { 74 | "source": "src", 75 | "output": "lib", 76 | "targets": [ 77 | "commonjs", 78 | "module", 79 | [ 80 | "typescript", 81 | { 82 | "project": "tsconfig.build.json" 83 | } 84 | ] 85 | ], 86 | "files": [ 87 | "src/" 88 | ] 89 | } 90 | } 91 | -------------------------------------------------------------------------------- /scripts/generate-mappings.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | const path = require('path') 4 | const fs = require('fs') 5 | const types = require('babel-types') 6 | const parser = require('@babel/parser') 7 | 8 | const packageJson = require('../package.json') 9 | const root = path.resolve(__dirname, '..') 10 | const output = path.join(root, 'lib/mappings.json') 11 | const source = fs.readFileSync(path.resolve(root, 'src', 'index.tsx'), 'utf8') 12 | const ast = parser.parse(source, { 13 | sourceType: 'module', 14 | plugins: [ 15 | 'jsx', 16 | 'typescript', 17 | 'objectRestSpread', 18 | 'classProperties', 19 | 'asyncGenerators', 20 | ], 21 | }) 22 | 23 | const index = packageJson.module 24 | const relative = (value /* : string */) => 25 | path.relative(root, path.resolve(path.dirname(index), value)) 26 | 27 | const mappings = ast.program.body.reduce((acc, declaration, index, self) => { 28 | if (types.isExportNamedDeclaration(declaration)) { 29 | if (declaration.source) { 30 | declaration.specifiers.forEach((specifier) => { 31 | acc[specifier.exported.name] = { 32 | path: relative(declaration.source.value), 33 | name: specifier.local.name, 34 | } 35 | }) 36 | } else { 37 | declaration.specifiers.forEach((specifier) => { 38 | const name = specifier.exported.name 39 | 40 | self.forEach((it) => { 41 | if ( 42 | types.isImportDeclaration(it) && 43 | it.specifiers.some( 44 | (s) => 45 | types.isImportNamespaceSpecifier(s) && 46 | s.local.name === specifier.local.name 47 | ) 48 | ) { 49 | acc[name] = { 50 | path: relative(it.source.value), 51 | name: '*', 52 | } 53 | } 54 | }) 55 | }) 56 | } 57 | } 58 | 59 | return acc 60 | }, {}) 61 | 62 | fs.existsSync(path.dirname(output)) || fs.mkdirSync(path.dirname(output)) 63 | fs.writeFileSync( 64 | output, 65 | JSON.stringify({ name: packageJson.name, index, mappings }, null, 2) 66 | ) 67 | -------------------------------------------------------------------------------- /src/index.tsx: -------------------------------------------------------------------------------- 1 | import React, { useCallback, useRef } from 'react' 2 | import { WebView } from 'react-native-webview' 3 | 4 | import template from './template' 5 | import { LayoutProps, PlayerEvents } from './types' 6 | 7 | export const Vimeo: React.FC = ({ 8 | handlers: handlersArr, 9 | videoId, 10 | params, 11 | reference, 12 | language, 13 | ...otherProps 14 | }) => { 15 | const webRef = useRef() 16 | const url: string = params 17 | ? `https://player.vimeo.com/video/${videoId}?${params}` 18 | : `https://player.vimeo.com/video/${videoId}` 19 | 20 | const autoPlay = params?.includes('autoplay=1') 21 | 22 | const handlers: any = {} 23 | 24 | const registerHandlers = useCallback(() => { 25 | PlayerEvents.forEach((name) => { 26 | if (handlersArr) handlers[name] = handlersArr[name] 27 | }) 28 | }, [handlers, handlersArr]) 29 | 30 | registerHandlers() 31 | 32 | const onBridgeMessage = useCallback( 33 | (event: any) => { 34 | const payload: { name: string; data: any } = JSON.parse( 35 | event.nativeEvent.data 36 | ) 37 | 38 | let bridgeMessageHandler = handlers[payload?.name] 39 | if (bridgeMessageHandler) bridgeMessageHandler(payload?.data) 40 | }, 41 | [handlers] 42 | ) 43 | 44 | return ( 45 | 59 | ) 60 | } 61 | -------------------------------------------------------------------------------- /src/template/index.ts: -------------------------------------------------------------------------------- 1 | export default (url: string) => ` 2 | const getOrientation = () => { 3 | const orientation = document.fullscreenElement ? 'landscape' : 'portrait'; 4 | return orientation; 5 | }; 6 | 7 | const sendEvent = (name, data) => { 8 | window.ReactNativeWebView.postMessage(JSON.stringify({ name, data })); 9 | }; 10 | 11 | const addListeners = () => { 12 | const video = document.querySelector('video'); 13 | const controls = document.querySelector('.vp-controls'); 14 | let isVisibleControls = ${!url.includes('controls=0')}; 15 | window.addEventListener("fullscreenchange", (e) => { 16 | const orientation = getOrientation(); 17 | sendEvent('fullscreenchange', { e, orientation }); 18 | }, false); 19 | 20 | if(video) { 21 | video.addEventListener("timeupdate", (e) => { 22 | const percent = Math.round((e.target.currentTime / e.target.duration)*100).toFixed(); 23 | sendEvent('timeupdate', { currentTime: e.target.currentTime, duration: e.target.duration, percent }); 24 | }); 25 | video.addEventListener('audioprocess', (e) => sendEvent('audioprocess', e)); 26 | video.addEventListener('canplay', (e) => sendEvent('canplay', e)); 27 | video.addEventListener('canplaythrough', (e) => sendEvent('canplaythrough', e)); 28 | video.addEventListener('complete', (e) => sendEvent('complete', e)); 29 | video.addEventListener('durationchange', (e) => sendEvent('durationchange', e)); 30 | video.addEventListener('emptied', (e) => sendEvent('emptied', e)); 31 | video.addEventListener('ended', (e) => sendEvent('ended', e)); 32 | video.addEventListener('loadeddata', (e) => sendEvent('loadeddata', e)); 33 | video.addEventListener('loadedmetadata', (e) => sendEvent('loadedmetadata', e)); 34 | video.addEventListener('pause', (e) => sendEvent('pause', e)); 35 | video.addEventListener('play', (e) => sendEvent('play', e)); 36 | video.addEventListener('playing', (e) => sendEvent('playing', e)); 37 | video.addEventListener('ratechange', (e) => sendEvent('ratechange', e)); 38 | video.addEventListener('seeked', (e) => sendEvent('seeked', e)); 39 | video.addEventListener('seeking', (e) => sendEvent('seeking', e)); 40 | video.addEventListener('stalled', (e) => sendEvent('stalled', e)); 41 | video.addEventListener('suspend', (e) => sendEvent('suspend', e)); 42 | // video.addEventListener('timeupdate', (e) => sendEvent('timeupdate', e)); 43 | video.addEventListener('volumechange', (e) => sendEvent('volumechange', e)); 44 | video.addEventListener('waiting', (e) => sendEvent('waiting', e)); 45 | } 46 | 47 | setInterval(()=>{ 48 | if(controls) { 49 | const visible = !controls.classList.contains("invisible"); 50 | if(visible !== isVisibleControls){ 51 | isVisibleControls = visible; 52 | sendEvent('controlschange', { visible }); 53 | } 54 | } 55 | },300); 56 | }; 57 | 58 | setTimeout(function(){addListeners()}, 1000); 59 | ` 60 | -------------------------------------------------------------------------------- /src/types.ts: -------------------------------------------------------------------------------- 1 | import { WebViewProps } from 'react-native-webview' 2 | 3 | export type CallbackType = (data?: any) => void 4 | export interface LayoutProps extends WebViewProps { 5 | handlers?: { [key: string]: any } 6 | videoId: string 7 | params?: string 8 | reference?: string 9 | language?: string 10 | } 11 | 12 | export const PlayerEvents = [ 13 | 'controlschange', 14 | 'fullscreenchange', 15 | 'audioprocess', 16 | 'canplay', 17 | 'canplaythrough', 18 | 'complete', 19 | 'durationchange', 20 | 'emptied', 21 | 'ended', 22 | 'loadeddata', 23 | 'loadedmetadata', 24 | 'pause', 25 | 'play', 26 | 'playing', 27 | 'ratechange', 28 | 'seeked', 29 | 'seeking', 30 | 'stalled', 31 | 'suspend', 32 | 'timeupdate', 33 | 'volumechange', 34 | ] as const 35 | 36 | export type PlayerEvent = (typeof PlayerEvents)[number] 37 | -------------------------------------------------------------------------------- /tsconfig.build.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig", 3 | "exclude": ["example"] 4 | } 5 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "baseUrl": ".", 4 | "paths": { 5 | "react-native-paper": ["./src/index"] 6 | }, 7 | "declaration": true, 8 | "esModuleInterop": true, 9 | "isolatedModules": true, 10 | "jsx": "react-native", 11 | "lib": ["ESNext"], 12 | "module": "ESNext", 13 | "moduleResolution": "node", 14 | "noEmitOnError": true, 15 | "outDir": "./lib", 16 | "sourceMap": true, 17 | "strict": true, 18 | "target": "ESNext" 19 | }, 20 | "exclude": ["lib/**/*"], 21 | "include": ["src/index.tsx", "src/template", "src/types.ts"] 22 | } 23 | --------------------------------------------------------------------------------