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

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?

Related

.Net MAUI iOS only supports later version (iOS 16)

I am running Visual Studio for Mac Preview v17.4 with MAUI workload, but when I try to run the hello world app on my iOS 15 device I get an error to downgrade to a lower version but I can't do so in the project build settings because the only available version is 16.
Any ideas how to add iOS 15 build targets to VS for Mac MAUI?
There's a bug right now where the simulator dropdown is reading from the Info.plist file. Add an entry into your Info.plist file for the following property https://developer.apple.com/documentation/bundleresources/information_property_list/minimumosversion that matches the Minimum OS Version you've selected for your iOS target. You might have to restart vsmac or unload/reload your project. After doing this your lower version simulators should show up.
I beleive you have Xcode 14 . So download Xcode 13.4.1 version and select this Xcode in the path to see the simulators coming back. For now .netmaui is not completely supporting xcode 14. They are working to target Xcode 14. For now jus downgrade Xcode version below 14.

No iphone devices in Visual Studio

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.

What versions of iOS are supported by Xamarin.iOS 10.14 / .NET Standard 2.0?

What is the oldest version of iOS that I can write code for using .NET Standard 2.0 which, according to the documentation needs Xamarin.iOS 10.14 which, according to its documentation needs macOS High Sierra to code. But I can't find which version of iOS can we develop for, there.
EDIT
I'm not asking if I can code for iOS 11 with it. I'm asking about iOS 7, 6, 5, ...
From Xamarin.iOS 10.14 release notes:
Requirements
The latest features and API requires Xcode 8.3 and the bundled iOS, tvOS and watchOS SDKs;
Apple Xcode 8.3 requires a Mac running OSX 10.12 (Sierra) or newer;
To check what iOS simulator version can be downloaded in Xcode open Xcode > Preferences > Components
With Xcode Version 8.3 the oldest iOS simulator listed is iOS 8.1 Simulator:
Lowest deployment target in Xcode 8.3 is 8.0:
The deployment target specifies the lowest operating system version that your app can run on.
See also Xamarin System Requirements, Xamarin.iOS Installation and Xcode Release Notes.
Lowest deployment target in Visual Studio 2017 15.6.0 is 6.0:
The default installed version of Xamarin.iOS in Visual Studio 2017 version 15.6
is Xamarin.iOS 11.8.

Visual Studio for Windows not recognizing iOS devices

I'm using Visual Studio 2017 version 15.6.5. On my Mac I have XCode 9.3 and Visual Studio for Mac 7.4.2.
Since today, VS for Windows doesn't recognize any iOS Devices any more. The dropdown menu where I normally can select the device only shows "Device". The deployment target of the iOS-Solutions is lower than the iOS version of the devices.
It doesn't matter which device I plugin on the Mac, all are not recognized.
Check Deplyment Target in info.plist
It should be low than SDK(simulator system version) installed in your mac.

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