Apache Cordova in Visual Studio is not able to connect with Mac (remote build server) - macos

I'm working with Visual Studio 2015 on a Windows computer and I want to simulate my app on a MacBook via remotebuild. But the VS Remote Agent Client is not able to connect:
If I try to establish a connection with security PIN, it says:
"An error occurred trying to acquire certificate from https// ..."
If I try to establish a connection without security PIN, it says:
"Unable to connect to remote iOS build server. Underlying exception: The remote server returned an error: (403) Forbidden."
If I run Apache Cordova on the Mac, there aren't any problems. And also my Xamarin App works on the remote iOS simulator. So why is it not possible to run my Apache Cordova App there, too?
Maybe it is relevant to mention, that I do not have an Apple Developer Program Account.

Make sure, you MacBook and VS workstation both are in same network. Also verify using command prompt that MacBook's IP add
Replace host name using IP address MacBook and try again.
If this does not work then following are steps to reset remotebuild:
first stop server using following command:
cntrl + c
Execute following command to reset remotebuild certificates:
remotebuild certificates reset
Run following to command to regenerate remotebuild server:
remotebuild certificates generate
here, new secure pin number will be generated.
Following command to start remotebuild:
remotebuild
now try again, make sure 'Enable remote iOS processing' is true and 'Secure mode' is true and valid secure number is added.

I will simulate my app using the Apache Ripple simulator for iOS and Android, although "Ripple doesn’t provide a complete simulation of Cordova APIs or native device capabilities (plugins). It also doesn’t simulate specific browser versions for a particular platform." (https://taco.visualstudio.com/en-us/docs/run-app-ripple-simulator/)
But it's better than nothing...

Related

Cannot run Xamarin.iOS apps on macbook from Windows Parallels (cannot install Broker)

I am trying to build a Xamarin iOS app and debug it in my mac simulator from Windows. I haven't been able to get this working all day and it is pretty time sensitive at this point.
I have updated and ensured both VS mac and windows are on the same update channels, have the same versions of Xamarin installed, cleared the cache on both mac and windows, made sure I can SSH into my machine, I can actually run the mac agent on a remote machine over VPN, but the connection is EXTREMELY slow and it is causing all sorts of different issues so debugging with it isn't an option.
The only thing I've noticed is that everyone else who seems to have this issue and shares info from their Xamarin diagnostic output shows that they're installing from Broker 4.6.* while mine seems to be trying to install Broker 1.1.6.*. This seems pretty odd, but I don't really know anything about this as I have nearly zero background in Xamarin and have just picked up this project as my company's Xamarin dev left last summer and I am developing a NativeScript app for us... someone thought they were kind of similar I guess?
Anyway, here is my output from when I attempt to connect... lastly, I used my mac's IP because the windows parallels install couldn't resolve the machine name and pointing localhost or 127.0.0.1 doesn't seem to work either although I'm not entirely sure why.
Checking host configuration for connecting to '192.168.86.29'...
Checking SSH configuration...
Checking available disk space...
Checking Mono installation...
The required Mono version to install on the Mac couldn't be determined, so the Mono validation will not continue.
Checking Xamarin iOS installation...
The required Xamarin.iOS version to install on the Mac couldn't be determined, so the Xamarin.iOS validation will not continue.
Checking host configuration for connecting to '192.168.86.29'...
Host '192.168.86.29' is configured correctly
Starting connection to '192.168.86.29'...
Installing Broker 1.1.6.181...
Unable to install the Broker
Starting connection to '192.168.86.29'...
Starting disconnection from 192.168.86.29...
Starting disconnection from 192.168.86.29...
The connection to '192.168.86.29' has been finished
An error occurred while trying to start the Broker...

IPA file unable to run on colleague's phone or untethered from workstation using Meteorjs+ReactJS+Mongodb

I am new to IOS development and have come across an issue and need some help.
I am trying to create an iOS application to target to work on iPhones. I am using MeteorJS, ReactJS with MongoDB for a database.
When I run the ‘meteor run ios’ command I am able to get the Xcode project.
I am also able to load the Xcode project within Xcode and generate the IPA file to demo on my iPhone using ITunes from my MacBook Pro.
When I try to run the application from my iPhone everything works - meaning I was able to connect to the local database (localhost:3001 mongodb). Also, the tests on the application only work when my phone is connected to the Mac.
Now, when I try to export the application and want a colleague to test the iPA file does not work. The IPA file gets installed on the colleague’s phone, however application does not work.
I think I’ve followed the process as required for Adhoc Provisioning profiles however I am not sure whether Im doing this right - because possibly the database is not being packaged with the IPA file?
Could someone please help / Guide?
When running a build produced by meteor run ios, the application on the phone tries to connect to a server running locally on your machine over the networked formed on the physical Lightning cable connection.
While you can configure the iOS client to connect to your machine over your local network, this solution introduces other problems you won't expect. Deploy your application to Galaxy, configure your iOS settings to use the URL on Galaxy, and make a production deployment of your iOS application. Then the iOS application will try to connect to an accessible public Internet URL (your Galaxy deployment), rather than your inaccessible local machine.
See the documentation for details.
meteor run ios-device --mobile-server=http://ip:port
worked for me

How to use Xamarin's IOS Remoting Simulator

Apparently the new Xamarin iOS remoting simulator for Windows is available in the Xamarin Alpha channel for Visual Studio on Windows.
However, there seems to be no mechanism by which it will appear. There seems to be no buttons or options to show this new iOS simulator in Windows.
There is zero documentation online, or videos or forum answers relating to this
If anyone from Xamarin is following this tag, can you please elaborate.
Thanks
iOS Simulator (for Windows)
Preview Installer:
Download the preview installer and install on your Windows computer.
http://download.xamarin.com/xamarin-simulator/Xamarin.Simulator.Installer.0.9.0.25.msi
To enable the remoted iOS Simulator:
Make sure Visual Studio has connected to your Mac at least once before starting the remoted iOS Simulator.
Go to Tools > Options > Xamarin > iOS Settings and tick the box for Remote Simulator to Windows:
https://developer.xamarin.com/guides/cross-platform/windows/ios-simulator/
Update - Troubleshooting:
Update Xamarin on both your Windows and Mac machines to the latest alpha version.
** Your Xamarin plugin for VisualStudio version should now be 4.2.021+
(Verified via Tools \ iOS \ Mac Agent Console)
gv Broker42021
Requesting version of client Broker42021...
Waiting for response...
Current version of client Broker42021: 4.2.0.21
Install the Xamarin Simulator on Windows (via the download link above)
Note: This will be installed to C:\Program Files (x86)\Xamarin\Simulator
On the Mac, Kill all the Xamarin agents running on your Mac:
ps ax |grep Mono.framework
Note: When everything is running fine, you will have five (5) Mono processes running, one of which is the Xamarin.Simulator.Server.exe process:
/Library/Frameworks/Mono.framework/Versions/Current/bin/mono /Users/sushi/Library/Caches/Xamarin/XMA/Broker/4.2.0.21/Broker.exe
/Library/Frameworks/Mono.framework/Versions/Current/bin/mono /Users/sushi/Library/Caches/Xamarin/XMA/Agents/IDB/4.2.0.21/IDB.exe
/Library/Frameworks/Mono.framework/Versions/Current/bin/mono /Users/sushi/Library/Caches/Xamarin/XMA/Agents/Build/4.2.0.21/Build.exe
/Library/Frameworks/Mono.framework/Versions/Current/bin/mono /Users/sushi/Library/Caches/Xamarin/XMA/Agents/Designer/4.2.0.21/Designer.exe
/Library/Frameworks/Mono.framework/Versions/Current/bin/mono /Users/sushi/Library/Caches/Xamarin/Simulator/Server/Xamarin.Simulator.Server.exe
Buyer beware:
ps -ax |grep Mono.framework | cut -c 1-5 | xargs kill
On the Mac, kill all current sshd processes:
Note: This is assuming you are not doing this via an ssh connection ;-)
Buyer beware:
ps -ax |grep sshd | cut -c 1-5 | xargs kill
Note: You need to be root to do that, sudo su first
Over on Windows, kill ALL the Xamarin.Simulator running tasks
Note: We had a few Windows PC that had hundreds(!) of these running (?!!) (we just rebooted that machine), but found most of the ones failing to run/view the Simulator on Windows had 3-5 of these tasks running.
Since you killed all the agents on the Mac machine, Visual Studio/Xamarin will no longer be connected to the Mac, so re-connect.
Note: Make sure that you have Remote Simulator to Windows option already checked before reconnecting to the Mac build host.
F5 / Debug - Start Debugging your iOS project
Flip over to task manager and you should see one Xamarin.Simulator process running now:
After a second or two and some CPU usage spikes on that process and it should appear:
Tested on:
Parallels Desktop 11 / Business Edition (11.1.2+)
** Mac host / Windows Guest
Physical Windows and Mac machines
My Parallels setup that I use on all deployed Macs:
In the Parallels VM (Windows) configuration, add a second network adapter to the Windows guest that is assigned as a Host-Only and use that IP address as the Mac host for Xamarin connections, NOT the public, shared or bridged IP addresses.
Within Windows, disable the Firewall on this host-only adapter.
Do not use the bonjour/Window sharing Mac host name (XXXX.local), use the private IP address that is assigned to the host-only interface/network adapter. Add another Mac connection and enter the IP address, not the host name, and do not use one that Xamarin auto-adds to the list that includes the XXXX.local host name...
In the Mac, if using Little Snitch make sure that you have a rule that allows inbound connections from that Windows host-only IP address range to the launchd process (/sbin/launchd is the process that spawns the sshd processes)
Still not launching the Simulator?
Check your Mac Console:
If you see items like:
4/30/16 11:18:00.993 AM sshd[59748]: error: connect_to 127.0.0.1 port 52421: failed.
I would assume Little Snitch (or other Mac-based firewall) is blocking the reverse secure tunnel that Xamarin is creating. I do not know why this does not cause all the other Xamarin agents (build, designer, etc..) to also fail. Disable Little Snitch to confirm (kill all Xamarin agents and sshd processes and start over). If the remote Simulator works, review your Little Snitch/firewall rules, something is amiss.
Remote simulating requires enterprise
https://developer.xamarin.com/guides/cross-platform/windows/ios-simulator/
Remoted iOS Simulator requires a Visual Studio Enterprise license
Be aware that this is the first release and it is very much still a preview. If you have issues please do reach out via our forums [0], or whatever suits you best.
If you have the just-released alpha versions of everything and it doesn't work, we will need a copy of the log files (on both visual studio and the mac) to diagnose the root of the issue. Either the forums or bugzilla would be best for that.
[0] https://forums.xamarin.com/categories/visual-studio
[1] https://bugzilla.xamarin.com/enter_bug.cgi?product=Windows%20iOS%20Simulator
Open simulator log to see what is the root cause.
%LOCALAPPDATA%\Xamarin\Logs
My log show this error
System.Security.Cryptography.CryptographicException: Key not valid
for use in specified state.
To fix the problem, I delete everything in
%localappdata%\Xamarin\MonoTouch
Disconnect the mac, forget it as well
Re-connect Mac
Itshould work now

The app didnt start in required time WIndows-10

I am trying to port my Windows Phone 8 app to Windows 10. I am able to build my app. When I try to deploy my app in Release x86 on a Mobile emulator I hit this error: Symbols for "ntdll.dll" could not be downloaded from Microsoft Symbol Servers
Hence I am trying to run without Debugging. In VS-2015 Debug->Start Without Debugging (in Release mode for x86), I get this error when I use Mobile Emulator:
Unable to activate Windows Store App 'XXXX'. The activation request failed with error "The app didn't start in the required time".
I created a Blank Universal Windows project. I am not sure, why VS is considering this as a Windows Store App.
I followed these steps: File->New->Project->Templates->Visual C#->Windows->Universal->Blank App(Universal Windows)
It looks like you have the Microsoft symbol server set, so the debugger is trying to download the .pdb's for all the publically available .dll's in your app to step through them. Try disabling the symbol server and some other options to get past this:
It's timing out trying to download the symbols and that's causing the debugger to time out. Also, try enabling Just My Code and see if that lets the debugger skip these binaries that you probably don't want to step through:

Can't connect to Xamarin.iOS running on Mac from Windows machine

The diagnostic view fails in the third-to-last step (out of 11):
Establishing a stateful connection to Mac build host via HTTP. => failed
The Details section shows:
Connection could not be established. Unable to get InfoRecord. Unable to get SDK status.
I have double checked all recommendations in the "Actions" section: latest version of Xamarin.iOS installed, no other instance of Visual Studio connected, firewall disabled, Xamarin.iOS activated.
Both machines have Xamarin Studio 4.0.
Here are the last few entries from ~/Library/logs/Xamarin/MonoTouchVS/mtbserver.log:
[01-Mar-2013 17:52:24] Server IP Address : 10.1.0.199
[01-Mar-2013 17:54:44] mtbserver: No KEEPALIVE command, exiting...
[01-Mar-2013 17:54:48] Apple SDK developer root: /Applications/Xcode.app/Contents/Developer
[01-Mar-2013 17:54:48] Server IP Address : 10.1.0.199
EDIT
As mentioned by Veux below, using a proxy on Windows can cause this issue. Curiously, Fiddler2 can still work as a reverse proxy for the device (iPhone or the simulator) if "Capture Traffic" is disabled.
I had the some problem, all was configured well but got the same error.
The solution for me, was to disable the proxy! on the windows machine
Hope that will help you
Check if you have Xcode installed on /Applications/Xcode.app
Check if the Documentation of Xcode is installed.(http://screencast.com/t/f3Kku2iggDeY)
Check if this path exist on your Mac.
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Documentation/
If is empty, create a symbolic link from DocSets (http://screencast.com/t/dmN00AYw9k)
~/Library/Developer/Shared/Documentation/
to
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Documentation/DocSets

Resources