I'm tryin' to debug my app on iOS simulator in my Mac.
I've followed all the instructions installing on my Mac:
sudo npm install -g vs-mda-remote
sudo npm install -g ios-sim
When I prompted
vs-mda-remote --buildDir Projects
(Projects is the folder where debug files will be droped), I see results in my PC by
http://<MAc_IP>:3000
With the following text
Remote build Express server open for business on port 3000
Ok, now I prompted
vs-mda-remote test
And I see an error with the following message
Failed to build app: CordovaError: Platform ios already added
I don't know what happen.
Ok, I found the problem. Maybe, I'm too eagier.
Instead of using one session in terminal app on mac, I used too many, so, when I prompted too many timesvs-mda-remote, obviously ios was already installed.
So, opening terminal at first time, and prompting
vs-mda-remote --buildDir Projects --allowsEmulate=true
Now, I can debug on iOS simulator from my PC to Mac.
While running the build agent, the correct command is:
vs-mda-remote --buildDir <server-build-directory> --allowsEmulate=true
Note the last "--allowsEmulate=true" part of the command.
*Taken from "Setting up the Remote Agent to Support Starting the iOS Simulator" section in the documentation.
Platform ios already installed
Received this error for running in device too, while running multiple instance in mac.
Quit Terminal and run single instance for vs-mda-remote to resolve this problem if you receive this error for running in Device.
Related
I am trying to set up a react-native development environment. I would like to set up an iOS emulator (preferably an iPhone 10) to run my app on. I am using a Macbook Pro 2016 running on MacOS 10.14.3. I have installed my react-native app through the command create-react-native-app (running version 2.0.2). I also have installed XCode running version 10.2(10E125). When I scan the QR code that Expo generates and run it on my iPad or my Android device it works just fine, but when I try to load the iOS emulator by pressing i after expo start it returns the error
Trying to open the project in iOS simulator...
Simulator is installed but is identified as 'com.apple.CoreSimulator.SimulatorTrampoline'; don't know what that is.
Simulator not installed. Please visit https://developer.apple.com/xcode/download/ to download Xcode and the iOS simulator. If you already have the latest version of Xcode installed, you may have to run the command `sudo xcode-select -s /Applications/Xcode.app`
I have already tried running the command sudo xcode-select -s /Applications/Xcode.app
I have also tried running the command xcode-select -r
I have also confirmed that in my XCode->Preferences->Locations Command Line Tools is selected as "Xcode 10.2(10E125)"
None of these have worked.
I am expecting that after pressing i after expo start an iOS emulator loads up. Thank you.
-----EDIT-------
After some more research, I found out that running open -a Simulator and then running expo start loads the app on an emulator and works for my purposes. But still if I just run expo start without running open -a Simulator it still gives the same error. I want to ask if this is the best I am going to get?
You might be running an outdated version of Expo. I had this problem when I was download someone's old repo using Expo 27 when Expo 36 came out. After updating to the latest version, it works.
To update packages in your project, npm-check-updates comes in handy.
npm i -g npm-check-updates # installs ncu globally
ncu -u # updates all dependency versions in your local package.json
npm install # updates the packages in node_modules to match
Note: This will update all your dependencies to the latest version. If you don't want to do this, you can find the latest version of expo and change the version in package.json manually.
I ran into the exact same problem all of a sudden. Clicking "Run on iOS Simulator" within the Expo Developer Browser worked 2 days ago but did not work today. Your clue of using open -a Simulator helped me though. I went into Xcode and clicked the Xcode menu > Open Developer Tool > Simulator. This started the Simulator and then I was able to click "Run on iOS Simulator" within the Expo Developer Browser and it worked as expected. If you haven't had the fortune of "Run on iOS Simulator" working, I'm guessing you could just start a simulator, download Expo from the App Store and just use it from there. None of this answers the question as to why the error happens but at least gives a few workarounds for anyone else that might need. All that matters is you get the app running on the Simulator in the end!
I'm new to Appium and currently being stuck with this issue for a week, hope I can get help here.
The issue is I cannot install my test application on my real iPhone device. It always return the same error.
Encountered internal error running command: Error: Could not install app: 'Command 'ios-deploy --id 20846aec46cd64589f6a2b356ef2390b2bc6bc6c --bundle /var/folders/6p/0y20zycd7qz4q14n42zhq29c0000gn/T/2018616-7145-1norgqb.y7mt/Payload/MyAPP.ipa' exited with code 253'
When I try to run only the ios-deploy command, the error return is:
ios-deploy[10050:85931] [ !! ] Error 0xe8008015: A valid provisioning profile for this executable was not found. AMDeviceSecureInstallApplication(0, device, url, options, install_callback, 0)
As my understanding, the iPhone need to be installed the WebDriverAgent before installed the testing application, however, I don't see anything related to install WebDriverAgent on the progress, it just go straight to install the testing application.
Below is my device info:
Appium server: 1.8.1
Device: iPhone 5s (also try with iphone 6) iOS 11
My using Desired capabilities:
{
"platformName": "iOS",
"platformVersion": "11.0.1",
"deviceName": "iPhone 5s",
"automationName": "appium",
"udid": "20846aec46cd64589f6a2b356ef2390b323c6bc6c",
"bundleID": "io.apptest.s",
"app": "/path/to/my/MyAPP.ipa"
}
Yes this is actually really tricky, follow these steps, and You might be able to install Your app.
STEP 1. download driver appium-xcuitest-driver
STEP 2. setup You environment:
After the successful installation now apply these steps carefully. After installation, open terminal and run following commands:
brew install libimobiledevice –HEAD
brew install ideviceinstaller
brew install carthage
npm install -g ios-deploy
gem install xcpretty
After successful installation, the terminal will print BUILT SUCCEEDED on the console so moving on step 03 for web driver protocol configuration
STEP 3.
Now open Xcode and open the XCUITest project that you will get from the following folder in your mac
/Users/someName/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent
Once, WebDriver.xcodeproj is opened so make sure that WebDriverAgentLib, WebDriverAgentRunner, and IntegrationApp is showing on the file as below screenshot.
Now select IntegrationApp and simulator as iPhone X and run the application. As the application is deployed successfully and launches o the simulator successfully so now you are good to go with Appium.
Step 4.
Click on Appium application from Launchpad and click on “Start the server v1.7.2″ as the server is started, Click on the “Start Inspector session” to set the required capabilities.
This is bellow for java code, but first try it out with Appium server gui:
DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.setCapability(“deviceName”, “iPhone 7”);
capabilities.setCapability(“platformName”, “IOS”);
capabilities.setCapability(“platformVersion”, “9.3”);
capabilities.setCapability(“browserName”, “safari”);
capabilities.setCapability(“automationName”, “XCUITEST”);
If now is all good to go, write code.
NOTE: Once all is installed and setup, remember to set **automationName as "XCUITest".**
Check sign by
codesign -v --verbose /var/folders/6p/0y20zycd7qz4q14n42zhq29c0000gn/T/2018616-7145-1norgqb.y7mt/Payload/MyAPP.ipa
maybe you can find the answer.
I have been trying to debug an Apache Cordova app with Visual Studio 2015 RC in a Windows 8.1 Virtual Machine. The app is running in an iOS simulator in a MAC OS host using vs-mda-remote (I've tried with different iPhone versions), but the debug always times out. There doesn't seem to be a proper error, only the following:
Starting launch process C:\Program Files (x86)\nodejs\node.exe "C:\Users\User\AppData\Roaming\npm\node_modules\vs-tac\emulator.js" --platform ios --action launch --path
"C:\XXXXX\bld\ios\Debug\buildInfo.json" --serverUrl iMac-User.local:3000 --language pt-PT --cliVersion 5.1.1 --deployTarget "iPhone 5"
Timed out connecting debugger to remote Apache Cordova app. See Output window for JavaScript console output.
------ Cordova Tools 5.1.1 already installed.
emulated - Successfully sent to ios Simulator
Emulating app at /Users/user/remote-builds/builds/5689/cordovaApp for target iPhone 5
Asking to debug in remote iOS device for buildNumber 5689 in server iMac-User.local:3000...
Fail to debug remote iOS in order to compile C:\XXXXX\bld\ios\Debug\buildInfo.json to http://iMac-User.local:3000 :
iPhone 5
I have already tried to clean cordova's cache, using vs-mda-remote --secure false and some other suggestions I found online. However, nothing seems to work. It's not the project itself, as a friend of mine is able to debug it. The configuration from his computer seem to be the same as mine.
Any ideas on what might be the problem?
Thanks.
I have found the problem, there must have been something wrong with the installation of Homebrew. So I reinstalled it, and forced install ios-webkit-debug-proxy. This solved my problem and I am now able to debug the app.
I have a problem with finding stuff about how to compile cordova apps from visual studio (desktop) on my macbook without parallels and similar things. I googled that stuff, but I found nothing relevant, or with parallels/vmware stuff.
I added some insight what I want to do in my comments, yet pasted it here:
nope, I mean, I have two devices: the desktop, where I have Windows 8.1 and a macbook pro mid 2012. And I want to (start a) build the cordova app from my desktop, but run it on my macbook (via iOS simulator). I don't want no dual booting, no virtualisation, just start the build from visual studio and finish the build on osx
Here are the steps:
Prerequisites
Mac OS X Mavericks
Xcode 5.1 and Xcode command line tools
An active iOS Developer Program account with Apple, with iOS provisioning profile and signing identity configured in Xcode
Node.js installed on the Mac
Installation
Run the following command from the Terminal app on your Mac:
sudo npm install -g vs-mda-remote
sudo npm install -g ios-sim
Setting Up the Remote Agent for Building
To start up the agent, run the following command:
vs-mda-remote --buildDir <server-build-directory>
This will start the agent in build server mode. An additional command line parameter is required to start up the agent for personal use with the iOS Simulator that will be covered later.
Setting up the Remote Agent to Support Starting the iOS Simulator
If you are using the remote agent on a personal Mac (vs a shared Mac build server), you can configure the agent to support launching the iOS Simulator on your Mac from Visual Studio.
As mentioned previously, the ios-sim node module is required globally to enable starting up the iOS Simulator from Visual Studio.
The build server should then be started with the command line option --allowsEmulate=true:
vs-mda-remote --buildDir <server-build-directory> --allowsEmulate=true
When these requirements are met, the app can be deployed from Visual Studio to the simulator on the Mac running the agent.
For more details, the documentation contains a section called "Remote Build & Simulation Agent for iOS".
My iOS emulator is no longer opening when I run "phonegap run ios" in the terminal on Mac OS X. I receive no error messages and:
[phonegap] Platform "ios" deployed to emulator.
[phonegap] successfully installed onto emulator
While this is currently a known bug, you can run the emulate command more directly (note you need to build separately):
phonegap local build ios
/platforms/ios/cordova/emulate
You can also run the application using the same technique:
phonegap local build ios
/platforms/ios/cordova/run
NOTE: When using this method to run the app on your phone, the task might get stuck on the splash screen. To fix this, launch the Activity Monitor on your Mac and quit any processes with the name "ios-deploy". From there you can launch the application on your phone by clicking the application icon.
Or, you can even look inside the generated /platforms/ios folder and launch XCode project directly to test in an emulator or on your device. Open project and click the RUN button.
IMPORTANT: with all of the above methods, you MUST run the build command before running:
phonegap local build ios
Not really an answer, but I can say this is a known bug. Here is the bug so you can track it:
https://issues.apache.org/jira/browse/CB-5103
I only had this problem after upgrading to 3.1. I downgraded to 3.0 and it works more reliably:
npm uninstall -g phonegap
npm install -g phonegap#3.0
Also had to delete the platform/ios dir and plugins/ios.json and then run 'phonegap build ios' and 'phonegap run ios'