Whenever I am trying to inspect my android application by using appium inspector app it stucks here. Out of 10 I am able to connect twice.
Have anyone faced the same issue? My desired capabilities are:
{
"deviceName": "xxxxxxx",
"platformName": "Android",
"platformVersion": "11",
"appPackage": "package name",
"appWaitActivity": "",
"app": "xyz.apk",
"adbExecTimeout": 50000,
"simpleIsVisibleCheck": 'true',
"useJSONSource": 'true'
}
Output: https://i.stack.imgur.com/oLo39.png
Related
What am I doing?
I have a native iOS app with an integrated Flutter add-to-app module. In order to debug the dart code, I launched the native app in an iOS Simulator, then I ran flutter attach to attach the Flutter debugger to the native app.
Below is my launch.json file.
"version": "0.2.0",
"configurations": [
{
"name": "chope_app_flutter",
"request": "launch",
"type": "dart"
},
{
"name": "chope_app_flutter (iOS attach)",
"request": "attach",
"type": "dart"
},
],
}
What is the problem?
Sometimes, when I start debugging flutter attach, some errors occur.
There are multiple observatory ports available.
Rerun this command with one of the following passed in as the appId:
flutter attach --app-id com.example.id
flutter attach --app-id com.example.id (2)
I know it's ok to run this in the terminal, but I want to debug flutter code in VSCode.
Can someone help to resolve this issue?
Thanks!
I want to run a React Native app on an iPhone, not on the simulator, using VSCode.
I came across this past question but cannot get various things here, including the accepted answer to work.
React Native in VS Code: add configuration for iOS Device to launch.json
The original launch.json which launches/runs the simulator is:
{
"name": "Debug iOS",
"cwd": "${workspaceFolder}",
"type": "reactnative",
"request": "launch",
"platform": "ios"
}
If I try augmenting that to be this:
{
"name": "Debug iOS",
"cwd": "${workspaceFolder}",
"type": "reactnative",
"request": "launch",
"target": "device",
"runArguments": ["--device", "iPhone"],
"platform": "ios"
}
(iPhone is the name of my connected device as showing in Xcode)
Or use the accepted answer verbatim:
{
"name": "My iPad",
"program": "${workspaceRoot}/.vscode/launchReactNative.js",
"type": "reactnative",
"request": "launch",
"platform": "ios",
"target": "device",
"sourceMaps": true,
"outDir": "${workspaceRoot}/.vscode/.react"
}
Then neither work, in both cases there is the same error:
An error occurred while launching the application. Error while
executing command
'/Users/me/Desktop/Checkouts/ReactNative/AwesomeProject/node_modules/.bin/react-native
run-ios --device iPhone --no-packager --verbose': Error while
executing command
'/Users/me/Desktop/Checkouts/ReactNative/AwesomeProject/node_modules/.bin/react-native
run-ios --device iPhone --no-packager --verbose' (error code 101)
(error code 303)
Anybody got this working and knows what the error/problem/fix is?
I've followed many tutorials but I can't seem to make Vscode launch my React Native app on my device. I can run fine on simulator, but when I use the following configuration:
{
"name": "Can's iPhone",
"program": "${workspaceRoot}/.vscode/launchReactNative.js",
"type": "reactnative",
"request": "launch",
"platform": "ios",
"target": "device",
"sourceMaps": true,
"outDir": "${workspaceRoot}/.vscode/.react",
},
It just launches the app in last used simulator, instead of device. I've also tried:
{
"name": "Can's iPhone",
"program": "${workspaceRoot}/.vscode/launchReactNative.js",
"type": "reactnative",
"request": "launch",
"platform": "ios",
"target": "device",
"sourceMaps": true,
"outDir": "${workspaceRoot}/.vscode/.react",
"runArguments": [
"--device",
"EXACT_NAME_OF_MY_DEVICE"
],
},
Where EXACT_NAME_OF_MY_DEVICE is exact name of my device, but no avail; it still runs in simulator. When I select my device in Xcode and run, it runs fine though (but I want to use Vscode to debug TS) What am I doing wrong?
I have a React Native project open in Visual Studio code, and Im trying to run the project on a physical connected iOS device. I successfully ran the app on the device directly from Xcode, but from Visual Studio Code I'm having issues. I believe I need to add a configuration for the device into launch.json. I have tried different entries in there but non seem to work. What is the proper way to add a configuration for a connected iOS device?
If you need to target a specific device, this is how it´s done:
{
"name": "iOS Device",
"program": "${workspaceRoot}/.vscode/launchReactNative.js",
"type": "reactnative",
"request": "launch",
"platform": "ios",
"sourceMaps": true,
"target": "device",
"outDir": "${workspaceRoot}/.vscode/.react",
"runArguments": [
"--device",
"DEVICE NAME"
],
}
So you need to set "target": "device" to tell the debugger to run on a device, and then you set the device name through "runArguments".
Try with react-native run-ios --device "your device name"
Device name you can find in xcode
You can add this in package.json also
{
start:ios: "node node_modules/react-native/local-cli/cli.js run-ios --device \"your device name\""
}
You may need to install ios-deploy
npm install -g ios-deploy
For vscode launch.json you can add these configuration node node_modules/react-native/local-cli/cli.js run-ios --device \"your device name\" in launch.json too
launch.json
{
"type": "node",
"request": "launch",
"name": "Run app",
"program": "${workspaceRoot}/node_modules/react-native/local-cli/cli.js",
"cwd": "${workspaceRoot}",
"runtimeArgs": [
"run-ios",
"--device",
"\"your device name\""
],
}
This is what I eventually had and managed to get it to install and launch on the connected device. The value for key name does not seem to uniquely identify a connected device. Its just the name that shows in Device Debug drop down.
{
"name": "My iPad",
"program": "${workspaceRoot}/.vscode/launchReactNative.js",
"type": "reactnative",
"request": "launch",
"platform": "ios",
"target": "device",
"sourceMaps": true,
"outDir": "${workspaceRoot}/.vscode/.react"
},
how do you get provisioningProfile value for your build.json file?
I already enrolled the Apple developer program, get all things set (app id, provision etc) but I confused about the value for provisioningProfile.
I need to build the XCODE project using cordova. Here is my build.json file looks like:
{
"ios": {
"debug": {
"codeSignIdentity": "iOS Development",
"provisioningProfile": "<WHAT TO INSERT HERE>",
"developmentTeam": "MY COMPANY",
"packageType": "development"
},
"release": {
"codeSignIdentity": "iOS Distribution",
"provisioningProfile": "<WHAT TO INSERT HERE>",
"developmentTeam": "MY COMPANY",
"packageType": "app-store"
}
}
}
I already download the provisioning profile files for both debug and release version. The name of both files looks like this:
Debug: MYPROJECT_Development.mobileprovision
Release: XC_iOS_MyProject.mobileprovision
Where is the value to put as the provisioningProfile?
Thanks in advance