{"id":19320292,"url":"https://github.com/jlyonsmith/testviroar","last_synced_at":"2025-10-06T22:50:12.223Z","repository":{"id":143313404,"uuid":"127354136","full_name":"jlyonsmith/TestViroAR","owner":"jlyonsmith","description":"A React Native project to the test the Viro React/Viro AR products","archived":false,"fork":false,"pushed_at":"2018-04-14T11:32:47.000Z","size":238,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-09-08T22:17:18.926Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jlyonsmith.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-03-29T22:32:11.000Z","updated_at":"2018-04-14T11:32:49.000Z","dependencies_parsed_at":"2023-05-13T03:00:23.216Z","dependency_job_id":null,"html_url":"https://github.com/jlyonsmith/TestViroAR","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jlyonsmith/TestViroAR","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jlyonsmith%2FTestViroAR","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jlyonsmith%2FTestViroAR/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jlyonsmith%2FTestViroAR/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jlyonsmith%2FTestViroAR/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jlyonsmith","download_url":"https://codeload.github.com/jlyonsmith/TestViroAR/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jlyonsmith%2FTestViroAR/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278692914,"owners_count":26029405,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-06T02:00:05.630Z","response_time":65,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-10T01:28:09.127Z","updated_at":"2025-10-06T22:50:12.207Z","avatar_url":"https://github.com/jlyonsmith.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Test TestViroAR\n\nA sample app to test the ViroAR component.\n\nTo create this project I performed the following steps...\n\n## Create App, Eject and Test on Devices\n\n```\nnpx create-react-native-app TestViroAR\nyarn run eject\n```\n\nI called the app `TestViroAR`.  At this point I do an `rm -rf node_modules \u0026\u0026 npm install --no-bin-links \u0026\u0026 rm yarn.lock` and switch to using `npm` over `yarn`.\n\n### Android\n\nAssuming Android Studio command line tools install, `studio ./android/app/`.  Don't upgrade the project when asked to convert.\n\nEdit `./android/app/build.gradle`:\n\n```\nandroid {\n...\n    defaultConfig {\n...\n        minSdkVersion 23\n        targetSdkVersion 25\n```\n\nPer [ViroAR: Integrating to Existing Projects](https://docs.viromedia.com/docs/integrating-existing-projects-android) (see below).\n\nRun `adb reverse tcp:8081 tcp:8081 \u0026\u0026 yarn start` in terminal.  Run the project in **Android Studio** on a real Android device and check all is well.  _Sometimes takes a couple of tries!_\n\n### iOS\n\nNOTE: React Native is in _constant_ flux at the moment and the stability of specific builds is horrible.  In particular the use of CocoaPods is not specifically support and the `use_frameworks!` is constantly broken, requiring numerous patches to fix. These instructions are specifically for `react-native@0.51.1`.\n\nPatch the `packages.json` file with:\n\n```\n{\n  \"scripts\": {\n...\n    \"postinstall\": \"sed -i '' 's/#import \u003cRCTAnimation\\\\/RCTValueAnimatedNode.h\u003e/#import \\\"RCTValueAnimatedNode.h\\\"/' ./node_modules/react-native/Libraries/NativeAnimation/RCTNativeAnimatedNodesManager.h; sed -i '' 's/#import \u003cfishhook\\\\/fishhook.h\u003e/#import \\\"fishhook.h\\\"/' ./node_modules/react-native/Libraries/WebSocket/RCTReconnectingWebSocket.m\"\n...\n```\n\nThen `cd ./ios \u0026\u0026 npm install react-native@0.51.1`.\n\nOpen the file `./ios/TestViroAR.xcodeproj` in Xcode.  Under *Project Targets TestViroAR* select a *Signing Team*.  Delete the `Tests` and `tvOS` targets. Build and run the project on an actual device.\n\nTo convert the project to **CocoPods**, do the following.\n\nDelete the `TestViroARTests` folder \u0026 move to trash.  Delete the `Libraries` and `Frameworks` folders and select _Remove Reference_.\n\nCopy in this `Podfile`:\n\n```\nplatform :ios, '9.3'\n\ntarget 'TestViroAR' do\n  use_frameworks!\n\n  # Your 'node_modules' directory is probably in the root of your project,\n  # but if not, adjust the `:path` accordingly\n  pod 'React', :path =\u003e '../node_modules/react-native', :subspecs =\u003e [\n    'Core',\n    'CxxBridge', # Include this for RN \u003e= 0.47\n    'DevSupport', # Include this to enable In-App Devmenu if RN \u003e= 0.43\n    'RCTText',\n    'RCTNetwork',\n    'RCTWebSocket', # needed for debugging\n    'RCTAnimation',\n    'RCTGeolocation',\n    'RCTImage',\n  ]\n  # Explicitly include Yoga if you are using RN \u003e= 0.42.0\n  pod 'yoga', :path =\u003e '../node_modules/react-native/ReactCommon/yoga'\n\n  # Third party deps podspec link\n  pod 'DoubleConversion', :podspec =\u003e '../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec'\n  pod 'GLog', :podspec =\u003e '../node_modules/react-native/third-party-podspecs/GLog.podspec'\n  pod 'Folly', :podspec =\u003e '../node_modules/react-native/third-party-podspecs/Folly.podspec'\nend\n\npre_install do |installer|\n\t# workaround for https://github.com/CocoaPods/CocoaPods/issues/3289\n  Pod::Installer::Xcode::TargetValidator.send(:define_method, :verify_no_static_framework_transitive_dependencies) {}\nend\n\npost_install do |installer|\n  installer.pods_project.targets.each do |target|\n    if target.name == 'yoga'\n      target.build_configurations.each do |config|\n          config.build_settings['GCC_TREAT_WARNINGS_AS_ERRORS'] = 'NO'\n          config.build_settings['GCC_WARN_64_TO_32_BIT_CONVERSION'] = 'NO'\n      end\n    end\n  end\nend\n```\n\nRun `pod install`.  Open the `.xcworkspace` file in Xcode.\n\nSay a prayer. Build. Run on a device to test; the first run can take a bit longer.\n\n## Adding ViroAR\n\nUpdated the `App.js` file per the `master` branch.  Add the file `keys.js` containing an `export const viroAPIKey=\"...\"`.\n\n### iOS\n\nAdd to `Podfile`:\n\n```\ntarget 'TestViroAR' do\n  ...\n  pod 'ViroReact', :path =\u003e '../node_modules/react-viro/ios/'\n  pod 'ViroKit', :path =\u003e '../node_modules/react-viro/ios/dist/ViroRenderer/'\n```\n\nRun `cd ./ios \u0026\u0026 pod install`.\n\nOpen the project in Xcode:\n\n- Change the *iOS Deployment Target* to `9.3`.\n- Turn off bitcode\n- Add _Privacy - Camera Usage Description_ to the `info.plist`\n\nRun and you should get a camera view with a floating box.\n\n### Android\n\nAdd to `app/build.gradle`:\n\n```\nandroid {\n    ...\n    defaultConfig {\n...\n        multiDexEnabled true\n    }\n...\n    buildTypes {\n        productFlavors {\n            gvr {\n                resValue 'string', 'app_name', 'TestViroAR'\n                buildConfigField 'String', 'VR_PLATFORM', '\\\"GVR\\\"'\n            }\n            ovr {\n                resValue 'string', 'app_name', 'TestViroAR-OVR'\n                applicationIdSuffix '.ovr'\n                buildConfigField 'String', 'VR_PLATFORM', '\\\"OVR_MOBILE\\\"'\n            }\n        ...\n        }\n        ...\n    }\n    ...\n}\n...\ndependencies {\n    ...\n    compile \"com.android.support:appcompat-v7:25.0.0\"\n    ...\n    compile project(':gvr_common')\n    compile project(':arcore_client')\n    compile project(path: ':react_viro')\n    compile project(path: ':viro_renderer')\n    compile 'com.google.android.exoplayer:exoplayer:r2.2.0'\n    compile 'com.google.protobuf.nano:protobuf-javanano:3.0.0-alpha-7'\n    compile 'com.amazonaws:aws-android-sdk-core:2.2.+'\n    compile 'com.amazonaws:aws-android-sdk-ddb:2.2.+'\n    compile 'com.amazonaws:aws-android-sdk-ddb-mapper:2.2.+'\n    compile 'com.amazonaws:aws-android-sdk-cognito:2.2.+'\n    compile 'com.amazonaws:aws-android-sdk-cognitoidentityprovider:2.2.+'\n}\n```\n\nAdd to `./android/app/src/main/java/com/testviroar/MainApplication.java`:\n\n```\nimport com.viromedia.bridge.ReactViroPackage;\n...\npublic class MainApplication extends Application implements ReactApplication {\n    ...\n    @Override\n    protected List\u003cReactPackage\u003e getPackages() {\n      return Arrays.\u003cReactPackage\u003easList(\n          new ReactViroPackage(ReactViroPackage.ViroPlatform.valueOf(BuildConfig.VR_PLATFORM)),\n          new MainReactPackage()\n      );\n    }\n    ...\n```\n\nIn the file `android/app/src/main/res/strings.xml`, e.g.:\n\n```xml\n\u003cresources\u003e\n    \u003cstring name=\"app_name\"\u003eTestViroAR\u003c/string\u003e\n\u003c/resources\u003e\n```\n\nRemove the line starting `\u003cstring name=\"app_name\"...`.\n\nRun the project on a device and you should get a camera view with floating box as with iOS.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjlyonsmith%2Ftestviroar","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjlyonsmith%2Ftestviroar","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjlyonsmith%2Ftestviroar/lists"}