I apologize in advance for this long question, but I spent 3 days on an unsuccessful attempt to configure the Xamarin.iOS development environment, which allows me to debug a physical device (and not an iPhone simulator), and I am in loss for what to try next.
I believe that my setup is a pretty standard Xamarin configuration:
- Windows 10 PC with Visual Studio 2015 and Xamarin v4.2.0.703
- HTC USB phone connected to Android PC for debugging (works great)
- MacBook with OS X 10.11 with Xamarin Studio v6.1.1 and Xcode v8.0
- iPhone or iPad with Mac USB for iOS debugging
I started by creating a Xamarin solution in Visual Studio, which I originally developed and debugged on Android.
To get started on debugging iOS, I configured Mac with Xcode and Xamarin Studio, enabled it for remote login, and created a dummy Xcode project with the same package ID as my Xamarin.iOS application. I also tried to create a rather complicated process of creating a signature identifier and provisioning profile for the application and downloading / installing on Mac. This process is so unintuitive (and the visual feedback in Xcode is so poor) that I'm not sure I did it right. However, I can run the dummy Xcode project on the iPhone, so I assume it should be okay?
On a Windows PC, the Xamarin > iOS Options panel in the Visual Studio settings confirms that Visual Studio is connected to the Mac, and the attached iPhone is also listed as the target candidate device, so everything seems to be configured for debugging on the device.
If I try to debug an iPhone simulator application from Visual Studio, it works correctly. However, debugging on the physical iPhone fails with the following useless message:
Xamarin.Messaging.Exceptions.MonotouchException: error MT1006: Could not install the application '/Users/Tim/Library/Caches/Xamarin/mtbs/builds/Test.iOS/c4f40041b6c58fc579a727bccfc18614/bin/iPhoneSimulator/Debug/TestiOS.app' on the device 'Tim's iPhone': AMDeviceSecureInstallApplicationBundle returned: 0xe8008001.
As a comparison, I also tried debugging directly on Mac using Xamarin Studio. Again, the iPhone simulator is working fine, but itβs not even possible to start a debugging session using a physical device, because the connected iPhone is not listed as the target destination device for Debug | iPhone
If I open the project settings and move on to the iOS Debug view, I see that the platform associated with the Debug configuration is iPhoneSimulator . Changing it to the iPhone and saving the configuration, it appears, but the changes are not actually saved. I think this is the reason why my test device is not listed, but I do not quite understand what I need to do for Xamarin Studio to accept my changes.
So, after all this experiment, I am completely lost. It would be helpful to have a complete, reliable AZ tutorial for this installation process, but otherwise, any suggestions I should try would be greatly appreciated.
UPDATE: if I use the configuration of the Ad-Hoc project (in Visual Studio or Xamarin Studio), it correctly deploys and runs the application on the device, but does not attach the debugger. If I explicitly enable debugging in the Ad-Hoc configuration, Xamarin Studio ignores it, but Visual Studio then attaches the debugger, but does not hit any breakpoints. Does all this sound right? Does it offer any hints that I need to change to work with a real Debug configuration?