-
-
Notifications
You must be signed in to change notification settings - Fork 180
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(tvOS:AppHarness) Initial commit to fix the install #1643
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code looks good. Tested with a device, after last commit (deviceManager refactor) it seem that device is not getting detected and therefore app does not get installed
When installing to device, process is stuck at this step
|
iOS device installing, seems like it is looking for what is in ~/.rnv/renative.json despite having put -d flag
|
`xcrun devicectl device install app -d ${udid} ${path.join( | ||
appPath, | ||
`build/RNVApp/Build/Products/${runScheme}-appletvos/RNVApp-tvOS.app` | ||
)}` |
Check warning
Code scanning / CodeQL
Unsafe shell command constructed from library input Medium
library input
shell command
); | ||
|
||
return executeAsync( | ||
`xcrun devicectl device process launch --device ${udid} --activate ${getAppId()?.toLowerCase()}` |
Check warning
Code scanning / CodeQL
Unsafe shell command constructed from library input Medium
library input
shell command
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
app is installed but not launched on device (connected via USB)
➜ template-starter git:(fix/tvos-install-on-device) npx rnv run -p tvos -d
┌─────────────────────────────────────────────────────────────────┐
│ ██████╗ ███████╗███╗ ██╗ █████╗ ████████╗██╗██╗ ██╗███████╗ │
│ ██╔══██╗██╔════╝████╗ ██║██╔══██╗╚══██╔══╝██║██║ ██║██╔════╝ │
│ ██████╔╝█████╗ ██╔██╗ ██║███████║ ██║ ██║██║ ██║█████╗ │
│ ██╔══██╗██╔══╝ ██║╚██╗██║██╔══██║ ██║ ██║╚██╗ ██╔╝██╔══╝ │
│ ██║ ██║███████╗██║ ╚████║██║ ██║ ██║ ██║ ╚████╔╝ ███████╗ │
│ ╚═╝ ╚═╝╚══════╝╚═╝ ╚═══╝╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚═══╝ ╚══════╝ │
│ 🚀 v:1.0.0 | renative.org | 9/5/2024, 4:09:10 PM │
│ $ rnv run -p tvos -d │
└─────────────────────────────────────────────────────────────────┘
info: Current engine: @rnv/engine-rn-tvos (../engine-rn-tvos)
task: ○ run ↺1
task: ○ configure ↺1
task: ○ platform configure ↺1
task: ○ project configure ↺1
task: ○ workspace configure ↺1
task: ✔ workspace configure
task: ○ app configure ↺1
info: Current app config: template
task: ✔ app configure
info: ../../node_modules/react-native-tvos/Libraries/Components/ScrollView/ScrollViewNativeComponent.js overriden by: /@rnv/config-templates/pluginTemplates/react-native-tvos/overrides.json
info: ../../node_modules/react-native-tvos/Libraries/Components/ScrollView/ScrollViewNativeComponent.js overriden by: /@rnv/config-templates/pluginTemplates/react-native-tvos/overrides.json
info: ../../node_modules/react-native-tvos/Libraries/Components/ScrollView/ScrollViewNativeComponent.js overriden by: /@rnv/config-templates/pluginTemplates/react-native-tvos/overrides.json
info: ../../node_modules/@react-native-community/cli-platform-ios/build/tools/listIOSDevices.js overriden by: /@rnv/config-templates/pluginTemplates/@react-native-community/cli-platform-ios/[email protected]
info: ../../node_modules/@react-native-community/cli-platform-ios/build/tools/listIOSDevices.js overriden by: /@rnv/config-templates/pluginTemplates/@react-native-community/cli-platform-ios/[email protected]
info: ../../node_modules/@react-native-community/cli-platform-ios/build/commands/runIOS/index.js overriden by: /@rnv/config-templates/pluginTemplates/@react-native-community/cli-platform-ios/[email protected]
info: ../../node_modules/@react-native-community/cli/build/bin.js overriden by: /@rnv/config-templates/pluginTemplates/@react-native-community/cli/overrides.json
info: ../../node_modules/react-native/node_modules/@react-native-community/cli/build/bin.js overriden by: /@rnv/config-templates/pluginTemplates/@react-native-community/cli/overrides.json
info: ../../node_modules/react-native-tvos/node_modules/@react-native-community/cli/build/bin.js overriden by: /@rnv/config-templates/pluginTemplates/@react-native-community/cli/overrides.json
task: ✔ project configure
info: Current Build Scheme: debug
task: ✔ platform configure
info: Found custom assetSources at ../../node_modules/@flexn/assets-renative-outline/assets/tvos. Will be used to generate assets.
info: Skipping pod action. Reason: Podfile.checksum matches current value
✔ Executing: which node
task: ✔ configure
########### filteredTargets [
{
udid: '00006020-001851120CC0C01E',
name: 'My Mac',
icon: 'Apple Device',
version: '13.6.4 (22G513)',
modelName: 'MacBook Pro',
isDevice: true
},
{
udid: 'addfcc35fc6fd800c67ce1ff49e48a85c206a474',
name: 'Apple_TV',
icon: 'TV 📺',
version: '17.6.1 (21M80)',
modelName: 'Apple TV (4th generation)',
isDevice: true
}
]
info: ✔ Found one device connected! Device name: Apple_TV udid: addfcc35fc6fd800c67ce1ff49e48a85c206a474
task: ○ start ↺1
task: ○ configureSoft ↺1
task: ○ app configure ↺2
task: ✔ app configure
info: Current Build Scheme: debug
task: ✔ configureSoft
Dev server running at: http://0.0.0.0:8085/index.bundle?platform=ios
task: ✔ start
⠇ Waiting for bundler to finish...warn =================================================================================================
warn From React Native 0.73, your project's Metro config should extend '@react-native/metro-config'
warn or it will fail to build. Please copy the template at:
warn https://github.com/facebook/react-native/blob/main/packages/react-native/template/metro.config.js
warn This warning will be removed in future (https://github.com/facebook/metro/issues/1018).
warn =================================================================================================
info Welcome to React Native v0.73
info Starting dev server on port 8085...
▒▒▓▓▓▓▒▒
▒▓▓▓▒▒░░▒▒▓▓▓▒
▒▓▓▓▓░░░▒▒▒▒░░░▓▓▓▓▒
▓▓▒▒▒▓▓▓▓▓▓▓▓▓▓▓▓▒▒▒▓▓
▓▓░░░░░▒▓▓▓▓▓▓▒░░░░░▓▓
▓▓░░▓▓▒░░░▒▒░░░▒▓▒░░▓▓
▓▓░░▓▓▓▓▓▒▒▒▒▓▓▓▓▒░░▓▓
▓▓░░▓▓▓▓▓▓▓▓▓▓▓▓▓▒░░▓▓
▓▓▒░░▒▒▓▓▓▓▓▓▓▓▒░░░▒▓▓
▒▓▓▓▒░░░▒▓▓▒░░░▒▓▓▓▒
▒▓▓▓▒░░░░▒▓▓▓▒
▒▒▓▓▓▓▒▒
Welcome to Metro v0.80.9
Fast - Scalable - Integrated
✔ Waiting for bundler to finish...
⠋ Executing: ios-deploy -cinfo React Native v0.75.2 is now available (your project is running on v0.73.4).
info Changelog: https://github.com/facebook/react-native/releases/tag/v0.75.2
info Diff: https://react-native-community.github.io/upgrade-helper/?from=0.75.2
info For more info, check out "https://reactnative.dev/docs/upgrading?os=macos".
✔ Executing: ios-deploy -c
✔ Executing: npx react-native run-ios --scheme=RNVApp-tvOS --mode=Debug --no-packager --udid addfcc35fc6fd800c67ce1ff49e48a85c206a474
┌─────────────────────────────────────────────────────────────────┐
│ ✔ BUNDLER STARTED | 9/5/2024, 4:10:44 PM | [email protected] │
│ $ rnv run -p tvos -d │
├─────────────────────────────────────────────────────────────────┤
│ Project: @rnv/[email protected] │
│ Workspace: rnv │
│ Platform (-p): tvos │
│ Engine: @rnv/engine-rn-tvos │
│ App Config (-c): template │
│ Build Scheme (-s): debug │
│ Target (-t): Apple TV │
│ Supported Platforms: ios, android, androidtv, firetv, androidwear, web, tizen, tvos, webos, macos, tizenwatch, kaios, chromecast, linux, windows
│ Env Info: darwin | arm64 | node v18.19.0 │
│ Executed Time: 0h:1m:34s:174ms │
│ info: ✔ Found one device connected! Device name: Apple_TV udid: addfcc35fc6fd800c67ce1ff49e48a85c206a474
│ Project location: ./platformBuilds/template_tvos/RNVApp.xcworkspace
└─────────────────────────────────────────────────────────────────┘
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
doesn't work on ios/tvos simulator first time after bootstraping ->
steps to repro:
yarn bootstrap-clean
- go to
template-starter
orapp-harness
packages - do
npx rnv run -p ios
ornpx rnv run -p tvos
-> observe
➜ template-starter git:(fix/tvos-install-on-device) npx rnv run -p ios
┌─────────────────────────────────────────────────────────────────┐
│ ██████╗ ███████╗███╗ ██╗ █████╗ ████████╗██╗██╗ ██╗███████╗ │
│ ██╔══██╗██╔════╝████╗ ██║██╔══██╗╚══██╔══╝██║██║ ██║██╔════╝ │
│ ██████╔╝█████╗ ██╔██╗ ██║███████║ ██║ ██║██║ ██║█████╗ │
│ ██╔══██╗██╔══╝ ██║╚██╗██║██╔══██║ ██║ ██║╚██╗ ██╔╝██╔══╝ │
│ ██║ ██║███████╗██║ ╚████║██║ ██║ ██║ ██║ ╚████╔╝ ███████╗ │
│ ╚═╝ ╚═╝╚══════╝╚═╝ ╚═══╝╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚═══╝ ╚══════╝ │
│ 🚀 v:1.1.0-rc.1 | renative.org | 9/10/2024, 1:07:27 PM │
│ $ rnv run -p ios │
└─────────────────────────────────────────────────────────────────┘
info: Current engine: @rnv/engine-rn (../engine-rn)
task: ○ run ↺1
info: Build hooks not complied. BUILDING...
task: ○ configure ↺1
task: ○ platform configure ↺1
task: ○ project configure ↺1
info: Creating folder ./platformBuilds ...DONE
task: ○ workspace configure ↺1
task: ✔ workspace configure
info: ✔ ../../node_modules/@react-native-community/cli-platform-ios/build/tools/listIOSDevices.js requires override by: /@rnv/config-templates/pluginTemplates/@react-native-community/cli-platform-ios/[email protected]. FIXING...DONE
info: ✔ ../../node_modules/@react-native-community/cli-platform-ios/build/tools/listIOSDevices.js requires override by: /@rnv/config-templates/pluginTemplates/@react-native-community/cli-platform-ios/[email protected]. FIXING...DONE
info: ✔ ../../node_modules/@react-native-community/cli-platform-ios/build/commands/runIOS/index.js requires override by: /@rnv/config-templates/pluginTemplates/@react-native-community/cli-platform-ios/[email protected]. FIXING...DONE
info: ✔ ../../node_modules/@react-native-community/cli/build/bin.js requires override by: /@rnv/config-templates/pluginTemplates/@react-native-community/cli/overrides.json. FIXING...DONE
info: ✔ ../../node_modules/react-native-tvos/Libraries/Components/ScrollView/ScrollViewNativeComponent.js requires override by: /@rnv/config-templates/pluginTemplates/react-native-tvos/overrides.json. FIXING...DONE
info: ✔ ../../node_modules/react-native-tvos/Libraries/Components/ScrollView/ScrollViewNativeComponent.js requires override by: /@rnv/config-templates/pluginTemplates/react-native-tvos/overrides.json. FIXING...DONE
info: ✔ ../../node_modules/react-native-tvos/Libraries/Components/ScrollView/ScrollViewNativeComponent.js requires override by: /@rnv/config-templates/pluginTemplates/react-native-tvos/overrides.json. FIXING...DONE
task: ○ app configure ↺1
? Which one would you like to pick? template
info: Current app config: template
warn: ○ project configure: Updates to package.json are required: (only info. skipping due to template mode)
- dotenv (N/A) => (16.4.5) Missing dependency for platform ios | engine.npm (@rnv/engine-rn)
- dotenv (N/A) => (16.4.5) Missing dependency for platform tvos | engine.npm (@rnv/engine-rn-tvos)
- raf (N/A) => (3.4.1) Missing dependency for platform tizen | engine.npm (@rnv/engine-rn-web)
task: ✔ app configure
info: ../../node_modules/@react-native-community/cli-platform-ios/build/tools/listIOSDevices.js overriden by: /@rnv/config-templates/pluginTemplates/@react-native-community/cli-platform-ios/[email protected]
info: ../../node_modules/@react-native-community/cli-platform-ios/build/tools/listIOSDevices.js overriden by: /@rnv/config-templates/pluginTemplates/@react-native-community/cli-platform-ios/[email protected]
info: ../../node_modules/@react-native-community/cli-platform-ios/build/commands/runIOS/index.js overriden by: /@rnv/config-templates/pluginTemplates/@react-native-community/cli-platform-ios/[email protected]
info: ../../node_modules/@react-native-community/cli/build/bin.js overriden by: /@rnv/config-templates/pluginTemplates/@react-native-community/cli/overrides.json
info: ✔ ../../node_modules/react-native/node_modules/@react-native-community/cli/build/bin.js requires override by: /@rnv/config-templates/pluginTemplates/@react-native-community/cli/overrides.json. FIXING...DONE
info: ✔ ../../node_modules/react-native-tvos/node_modules/@react-native-community/cli/build/bin.js requires override by: /@rnv/config-templates/pluginTemplates/@react-native-community/cli/overrides.json. FIXING...DONE
info: ../../node_modules/react-native-tvos/Libraries/Components/ScrollView/ScrollViewNativeComponent.js overriden by: /@rnv/config-templates/pluginTemplates/react-native-tvos/overrides.json
info: ../../node_modules/react-native-tvos/Libraries/Components/ScrollView/ScrollViewNativeComponent.js overriden by: /@rnv/config-templates/pluginTemplates/react-native-tvos/overrides.json
info: ../../node_modules/react-native-tvos/Libraries/Components/ScrollView/ScrollViewNativeComponent.js overriden by: /@rnv/config-templates/pluginTemplates/react-native-tvos/overrides.json
task: ✔ project configure
info: Current Build Scheme: debug
task: ✔ platform configure
info: Found custom assetSources at ../../node_modules/@flexn/assets-renative-outline/assets/ios. Will be used to generate assets.
info: Podfile.lock does not exist. Will execute pod actions...
✔ Executing: bundle install
✔ Executing: bundle exec pod install
✔ Executing: which node
task: ✔ configure
? We couldn't find iPhone 15 as a simulator supported by the current version of your Xcode. Please select another sim (Use arrow keys)
second time it works regardless of the selected platform (ios/tvos)
Description
The problem right now is that the overrides are applied on the package's node_modules, which is definitely suboptimal...
Another problem is that after installation the app does not get launched as it should, you need to press on it manually with a remote, but it does now install and connect to the metro bundler started by renative
Related issues
Npm releases
n/a