No iphone devices in Visual Studio - ios

I have started a Xamarin.Forms projects for all three platforms (iOS, Android and UWP).
I have connected to my mac and the icon is green. I made sure that both, Mac and VS have the same versions of Xamarin.
VS for Mac versions:
VS for Windows versions:
My Xcode version is 9.3
But I don't have the iPhones list to debug.
PS. When I press "Show iOS Simulator" button, it starts simulator on my Mac.
My question is: What am I missing in my configuration?

Xamarin doesn't currently work with xcode 9.3.
I had this issue yesterday. You need to remove 9.3 and install 9.2 from the apple developer website.
un-install xcode 9.3 on mac
install xcode 9.2 on mac
restart mac
in visual studio - forget mac connection, re-connect when mac back up.

Related

How to connect the iphone from visual studio for mac 2022?

I installed Visual Studio for mac and created a demo app for ios. After that, I change the target ios version to ios 15. Now I can connect to the simulator with ios 16 but not to the iPhone which runs on ios 15. VS for mac said "os version lower than deployment version".
ps. This iPhone runs ok with Xcode 14 after I downgrade the target version to ios 15 in Xcode.
I downgrade all target/platform version settings which I can find in vs for mac and Xcode. Did I miss something else?

iOS simulators are not available in visual studio after updating xcode to version 14

Everything was working fine till updating Xcode to version 14. But after updating Xcode to latest version 14, simulators are not available in visual studio.
Also, app is not getting installed on physical devices. Just getting a success message as normally but the app is not on the device.
I have downgraded the Xcode and now i am able to see all the simulators and deploy the Xamarin forms App on device and simulators.
Steps to Downgrade XCode:
Go to Apple developer site and login with your credentials .
Once you logged in into site, scroll down where you can see XCode 13.4.1 see the below screenshot
XCode on Apple store
Click on download. Once it is downloaded kindly uninstall your previous XCode which on your mac and then install XCode 13.4.1.
Give the exact XCode path in Visual studio. Below is the screenshot for reference ---SDKManager
Xamarin Forms App specific settings
Now you can build the app and deploy your app in the simulators or mobiles.
I got a new update today for Visual Studio for iOS16 and after updating VS all simulators are available now.
Install Visual Studio 2022 for Mac. It works with Xcode 14 & iOS 16.

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.

How to change iOS simulator on Visual Studio for Mac

How can I change default iOS simulator on Visual Studio for Mac?
When I pair my MacBook with PC, I have a list of iOS simulators available in Visual Studio 2019 ( on Windows). But when I work directly on MacBook, and run Visual Studio for Mac, there's only one (grayed) simulator available and I have no idea how to change it. Checked Solution options, Project settings. But there's no option to change it.
It looks like that now:
How can I fix this issue?
UPDATE #1
Probably this information could help. Some time ago my XCode and Visual Studio were automatically updated to 12.3 and I start getting errors related to missing developer profile. I uninstalled XCode 12.3 and Visual Studio and installed previous versions. Now XCode version is 12.2 and the error message related to the developer profile is gone. Maybe it somehow connected to the issue I have.
Current XCode version: 12.2 (12B45b)
Visual Studio for Mac version:
8.8.4 (build 30)
Operating system: macOS Catalina 10.15.7
UPDATE #2
I've updated MacOS to version Big Sur
Also I have uninstalled XCode and installed again version 12.3
And I've uninstalled Visual Studio for Mac and installed it again.
The problem still persists.
UPDATE #3
Below, there is information about versions:
Operating system: MacOS Big Sur, version 11.1
XCode version: 12.3 (12c33)
Visual Studio For Mac, version 8.8.6 (Build 15)
Xamarin.iOS: 6.18.0.23 (d16-6/088c73638). Package Version: 612000113
Minimum system version (in Info.plist): 11.0
I reproduce this issue on my mac. You could follow the stpes below.
Open the XCode. Click Window tab to open the Device and Simulators.
Click Simulators on left side. Then Click + at the bottom left to create a new eimulator.
After that close and restart the VS.
And now, you could use the ios simulators.

Visual Studio 2017 (Xamarin) not showing list of iPhone Simulators

I've got everything seemingly working properly with the connection between my VS 2017 and the Mac. All looks good as far as the connection, the build works fine with no errors but I can't actually debug/run it because it doesn't allow me to choose a simulator.
On the toolbar, I have selected: Debug | iPhoneSimulator | Simulator
iPhoneSimulator is the ACTIVE platform.
On the Start > button when I drop down the menu options, it gives me:
Start
Device
Unsupported Devices >
Change Deployment Target
iPhone 5s iOS 10.2
iPhone 6 Plus 10.2
iPhone 6s Plus iOS 10.2
iPhone 6 iOS 10.2
See the screenshot of my menu options
and about 10 or so more but they are all in the "unsupported" category so whenever I try to click on one, nothing happens, and when I try to run my project, I get "Please select a valid device before running the application."
The PC is running Windows 10 x64 with Visual Studio 2017 Community Edition.
The MAC is running El Capitan 10.11.6. (Can't update to Sierra (10.12+) because Apple doesn't support it on this MAC)
Xcode running is 8.2 (have also tried 8.2.1) and can't update to 8.3+ because 8.3 and up requires Sierra (o/s 10.12+)
The latest versions of Xamarin are installed on both the PC and the MAC with all corresponding updates.
I've had to change the build option "Link Behavior" in VS to "Link Framework SDK Only" as the instructions state because of the fact that I can't install Xcode 8.3 on the MAC.
Any suggestions as to why everything would seem to work EXCEPT for VS 2017 no obtaining a list of simulators from the MAC? The MAC sees the simulators. Even running the command "xcrun instruments -s devices" on the MAC returns all of the simulators. I can make a sample program in Xcode, choose a simulator and run it. It just won't pass that information to my VS 2017 so that I can launch it from there. It will even let me launch the iOS simulator from VS 2017 without error.
I've tried uninstalling and re-installing Xamarin on both the PC and MAC and creating a new iOS project. Everything builds fine. Everything else works, just not the debugging/running and the reason it won't work is because I can't choose an actual emulator.
You will need to make sure your target version is lower than your Simulator version.
Open Info.plist and select a version lower or equal to 10.2.
I ran into something similar while running VS2017 on Mac OS X. I was using multiple build configurations, and I had multiple Info.plist files. One of them (not even the one that should have been used for that build config) had two entries for CFBundleShortVersionString due to a bad git merge. I wouldn't have discovered that if I wasn't opening each of them to change the Deployment Target mentioned in #lowleetak's answer. After correcting that, I was able to debug to the simulator again.
So for other who run into this - check your Info.plist files.

Resources