Visual Studio Cordova iOS build server setup - ios

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".

Related

visual studio 2022 installs monoframework 6.12.0.174 on mac, then iOS Simulator fails

I use Visual Studio 2022 on Windows for Xamarin development for Android & iOS. I use a Mac Mini with M1 for the iOS builds. All has been working fine for over a month. A few days ago I allowed the MAC to perform an update. Today when I tried to build for iOS, the Pair To Mac dialog said there was a monoframework mismatch and offered to install monoframework 6.12.0.174 on the MAC. Initially I chose Cancel,and then rebooted both machines. The same error occurred when I tried again. This time I allowed the install. After the install completed, every time I try to use the iOS Simulator it hangs as soon as it appears. I would appreciate some direction. I do not know how to fix it and I do not know how to back-out the mono install on the MAC. Please help.
Solution: I updated Visual Studio & Visual Studio for Mac to the current versions. Then found in the following in the Visual Studio ReleaseNotes:
Known Issues
Deploying an iOS app with Visual Studio 2022 and Apple Xcode 13.3 results in a Remote iOS simulator window with a blank/black screen. Workaround: Disable the “Remote Simulator to Windows” check box in the iOS Settings under the Tools - Options menu. The iOS app should deploy correctly on the macOS host.
Following those instructions I disabled the “Remote Simulator to Windows” check box in the iOS Settings under the Tools - Options menu. The iOS app then deployed correctly, but on the macOS host, no longer can it deploy on the Windows machine from the Mac build host as in prior versions.

Xamarin App running in Ios simulator using visual studio

I am facing the issue to run the xamarin app in IOS simulator. Whenever i am trying to run this app it was asking me to add or pair the Mac. Since I dont own the Mac I tried to install Xamarin.Ios in windows. In this process i need to install the XCode in my windows 10 Os. First of all i am unable to download the Xcode tool from Apple portal with valid credentials. I followed the below 2 links but no luck to download and install the Xcode. Could you guys please help me the easiest solution to download install the Xcode to do the next level of run the App in windows.
https://learn.microsoft.com/en-us/xamarin/ios/get-started/installation/windows/?pivots=windows
https://apps.apple.com/us/app/xcode/id497799835?mt=12
Bottom line is that iOS apps must be build using a licensed Mac OS, period. Visual Studio for Windows does not actually build the iOS app, what it does do is connect to a Mac (which must have XCode installed) and facilitate a remote iOS build via XCode. However, if you have a Mac, you can build both iOS and Android code directly on your Mac using Visual Studio for Mac. Yes, it is frustrating that you must have access to a Mac OS to build iOS apps, but this is a requirement and there is no way around it.

Build, deploy and run a Flutter app for iOS from Android Studio on a Linux computer using a remote Mac with an Xcode server or an SSH server?

I use a Debian Linux computer as my main development computer for Flutter apps for Android with Android Studio.
When I want to test an app on iOS, I need to pull the Flutter app source code from my source control system (GitLab) on my Apple macOS computer, build, deploy and run from there using Android Studio.
What I would like to do, is avoid the source control pull step in the process and initiate the iOS build, deploy and run on the Apple computer from the Android Studio on the Linux computer.
I consider the build, deploy and execute steps in Android studio as commands. I believe that those commands can be configured maybe through Gradle configuration files. If so, it should be possible to configure Android Studio and Gradle so that my Android Studio on Linux makes use of a remote Apple computer for the build, deploy and run either through an Xcode server or through an SSH server installed on the Mac.
At the moment, when I try a flutter build ios on my Linux machine, I get this expected error message:
Building for iOS is only supported on the Mac.
Does anyone have a solution to make this remote?
I know that Appollo does this for building apps. It's a python CLI tool that lets you connect to remote Macs. The CLI tool is open source so maybe you can find how they connect to the MacOS machines in their source code : https://github.com/Appollo-CLI/Appollo

Visual Studio 2015 hangs on deploying cordova application

I'm trying to build a blank cordova application into my iPad Air 2 with Visual Studio 2015 Enterprise edition as i've already done it with success with the release candidate version.
I've got node.js v 4.2.2 on both machines since version 5.2.0 was hanging the build indefinitely, i've also got latest version of iTunes (12.3.1) as well as iOS 9.2 on the mobile device.
I've got the remote MAC set up and everything works fine for the building part, infact i've checked and the .ipa file is there at the end of the build into the folder ...\Documents\Visual Studio 2015\Projects\BlankCordovaApp1\BlankCordovaApp1\bin\iOS\Debug and if i launch that it will correctly install into iTunes and the iPad itself.
The problem is that the build action with Configuration "iOS" and "Local Device" with the iPad connected to the windows 7 PC will hang indefinitely after copying back said .ipa file after writing this line into the Build Output:
2>------ Deploy started: Project: BlankCordovaApp1, Configuration: Debug iOS ------
No matter how much time i wait it wont start the debug session even if i authorized the pc onto the iPad and have my web Inspector turned on onto the safari options. At this point i have to interrupt the build to be able to work again.
What really gets me is that if i connect the iPad to the MAC machine and build with "Remote Device" option the build works fine and i can debug remotely from my windows pc, unfortunately working like that isn't an option since the Apple machine isn't in the same room of my developing machine.
Any insight about this issue would be really appreciate, thanks in advance.
You are using a recent version of node and thus will also need to use a recent version of Cordova.
Specifically, you need to use Cordova 5.3.3 to be able to use Node.js 4.x.x+. The hang you are experiencing is exactly why. It's an incompatibility with a down stream node module and Node 4.x.x. You can downgrade to Node 0.12.x or upgrade your Cordova project to 5.3.3.
http://cordova.apache.org/news/2015/09/22/tools-release.html
Note that Node 5.x.x is only supported in Cordova 5.4.1.
This should be addressed in the latest VS Tools for Cordova Update 6. Deploying to local device is now available.
Take a look at http://microsoft.github.io/vstacoblog/2016/02/04/announcing-update-6.html.

Visual Studio Debugger failing to connect to remote Apache Cordova app in iOS simulator

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.

Resources