Cordova IOS Plugin installation - ios

I am pretty new to Cordova and iOS (and MAC). I have everything set up and using Visual studio + Networked Mac. Everything is working, I can build and deploy to Simulator and device.
But when I tried to install a plugin "statusbar", I am getting this build error
"Remote build error from the build server Build failed with error 404 Not
Found: cordova-plugin-statusbar: {1}"
I have installed it in the config.xml, but for some reason when building it is not finding the plugin. Do I need to install it on the mac too or should it be deployed with the rest?
Tried installing the plugin from the Mac terminal into the VS project folder on windows, but same error.
What am I missing?

Related

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

"cordova run ios " in Windows not works

I install "ionic cordova run ios" on my PC (Windows 10) but I got an error message
"[ERROR] An error occurred while running subprocess cordova."
Does anyone know how to fix this?
To build an app for iOS you need to have the xcode command line tools installed. Cordova looks for these tools before building. If you don't have that, you can't build your app for iOS.
If you want to build your app for iOS you'll need a Mac with xcode and Cordova installed. Or you could use a virtual machine to do it. For more information on the virtual machine option have look here

Cordova build iOS App' : "Could not find module 'npm-registry-client' (Node JS)

I try to build my Cordova App' on Iphone without success. Everything is ok with Android and Windows Phone. I always have the same error when I try to build it on Iphone or iOS simulator : "Could Not find module 'npm-registry-client'".
Here's some screens:
PC:
Mac (Remote Build):
I use Visual studio 2015 on Windows PC,Angular JS framework, Npm 2.11.3 and NodeJS 0.12.7 . I've already build a blank Iphone app' with Xcode 7 on my mac. I've tried to remove the node_modules folder and reinstall Npm but it's not working...
Any suggestions?
Thanks for reading
EDIT : SOLUTION
I found the solution. 'npm-registry-client' was installed on my Windows PC but not on my Mac. In terminal,just write "npm install npm-registry-client" and everything works great!! (Emulator and device)
That error is most likely a bad install of Cordova on your Mac. Clearing out the installed Cordova version(s) from ~/.taco_home/node_modules will let the next build reinstall Cordova and should clear up the problem.
It's also possible but less likely that a Cordova install issue happened on your Windows machine instead. Reading the Output panel in VS will tell you if the error happened in the remote build log section or not. If it didn't come from the remote build, then clearing your Cordova cache and your npm cache would be the needed fix.
Hope that helps.

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 Cordova iOS build server setup

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

Resources