Visual Studio Preview 2022 will not let my change deployment target - macos

I just installed Visual Studio Preview for the MacOS yesterday. The simulators work fine, but I can't run on any devices I have (both IOS and Android). It keeps saying that the OS version is lower than the deployment target.
Image of the problem
It doesn't make sense; one of the devices I tried was a Galaxy A11 I just got, software version 10. The IOS device has software version 15.4.1. I can't even find what the current deployment target even is. I've checked the info.plist and AndroidManifest files with no success. Yeah I can use the simulators to work on the app but sooner or later I will need to test on a physical device. Can someone point me in the right direction?
If it helps I'm currently running macOS Monterey version 12.3.1.
EDIT: Forgot to mention that I've tried to add the Minimum System Version to the info.plist, but that didn't seem to change anything either.

I was able to determine that the device destinations in the drop-down shown in the question are driven off of whatever XCode command line tools you have set for use before starting VS for Mac.
Presumably if you check your physical device's OS version against the SDK version shown when you type this at the command line will show that the physical device's OS version is lower than the appropriate SDK version shown.
xcodebuild -showsdks

Related

Xamarin - Cannot use iOS Emulators?

Visual Studio 2019
I recently upgraded Xamarin.Forms to version v4.5.0.530. This required me to upgrade xCode on the Mac to 11.4. This required me to upgrade the Mac OS to Catalina. OK I did all of that. Since then though:
If I run the project on the iPhone connected to the Mac it still WORKS fine (as before).
However, if I try and use one of the emulators on the PC (ipad etc) it FAILS to deploy with the following message:
Selected device is not a physical device. Please select a valid device before deploying the application.
Well obviously it is not a physical device!?!
Of course I am doing everything the same way I did it before the upgrade, choosing Debug, iPhoneSimulator, my iOS project, iPad Pro (9.7... etc)
So, it works on the physical iphone but not on any of the apple emulators (android phone/emulators work fine).
Has anyone any ideas why this might be?
It was a setting at Solution level. For some reason with 'iPhoneSimulator' selected at the top, against the iOS project 'iphone' was selected. Changed it to 'iPhoneSimulator' and all is good in the world again.

Mac Visual Studio 8.2.6.26 update not showing any iOS simulators, only Generic Simulator

Yesterday I updated my Visual Studio and Xcode. Immediately afterward I lost any listing of available iOS simulators for my Xamarin project in Visual Studio. I can plug my iPhone in however and deploy my project onto it just fine, but I'm used to working with Preview in VS and also running a simulator for quicker response.
I'm currently running the following versions:
• Updated to Xcode 11 (11A420a)
• Visual Studio Mac 8.2.6.26
• Mac OS 10.14.6
• iOS 13.0 on iPhone 7+
Now Visual Studio shows the only available simulator as being the Generic Simulator with a hammer, which doesn't launch anything that I can tell. When I look at the list to choose a simulator I see the message line: "Lower the 'Deployment Target' to see older simulators or check your Apple SDK path"
When I launch a test project directly from within Xcode, it offers iPhone 8, 8+, 11, 11 Pro and others as available simulators and those indeed work. In Visual Studio I have changed each Deployment Target from 6.0 to 12.2 and not one of those makes available any simulators.
I'm not sure what the Apple SDK path is about, how to check it and where it needs to be pointing.
Does anyone have any thoughts about what adjustments need to be made to regain my iOS simulators in Visual Studio Mac again after these updates?
Thanks so much :)
After trying a bunch of suggestions, this simple fix worked for me. First I changed my deployment target in the info.plist from 9.3 to 11. After checking that my Apple SDK path in VS was pointing at Xcode11 and the iOS SDK version on my Mac was 13.0, I simply force quit Visual Studio and Restarted my computer. Then I began to see iPhone8 & iPhone11 simulators. Goodluck.
Updating both XCode and Visual Studio for Mac worked for me.
Just updating XCode did not work.
I also fidgeted with the Deployment Target which I believe refreshed the simulators list.
UPDATE: I confirm again that when I go to info.plist and just click on the deployment target drop down, the simulators list gets update. Little funny.
Ran into this issue many times for the last updates. Nothing really helped, until I came across a Microsoft forum where someone mentioned the Apple SDK path needs a trailing slash, which is not added when using the Browse button to navigate to the Apple SDK Location.
So when using Visual Studio for Mac, navigate to Visual Studio -> Preferences -> Projects -> SDK Locations -> Apple and please note your Apple SDK Location should be something like:
/Applications/Xcode.app/
rather than
/Applications/Xcode.app
Changing the "Minimum System Version" did the trick for me.
Eg. I had 14.4 and I changed it to 14.0 and restart VS the all the simulators appreared.
I resolved the issue as well by going under the Visual Studio --> Check for Updates menu and switching the channel to "Xcode 11 Previews". Finally some updates were available and I updated everything normally. I also updated everything in the "Stable" and "Preview" channels as well. Now I have iPhone 8 and iPhone 11 simulators working, however I no longer have any of the other simulators like iPhone 7, etc. like I did before.
After updating Xcode via the app store, restart your machine. The simulators should reappear.
UPDATE
This didn't work for me after the latest update. However, setting the startup project to Android, then switching back to iOS was enough to repopulate the list for me after restarting my machine.
info.plist has an option called Minimum supported version which says which version of the iOS you are targeting.
in my case it was 10.3 earlier, when i have upgraded xcode (12.4) and vs for mac(8.9.6) to support iOS14. this caused the conflict between the xcode supported iOS version and plist version.
I changed it to 14 in plist for the Minimum supported version and it worked for me.
In summary check the xcode supported version and update the minimum supported version accordingly
Same here, just need to change 'Minimum system version' on your info.plist file in my case was 12.0 and then updated to 12.1 and vualaaaaa the simulator list refresh it.
I had the same problem when the iOS 14 updates were first installed. I had already installed both XCode and VS updates.
What I did is: I restarted the Mac and I had to install the XCode Command-line tools from VS separately. Then the simulators were visible.
What always works for me is connecting an iPhone device. After I connect it, the simulators appear. I guess connecting a physical device also refreshes the simulators list.
This time, nothing was working for me, until I deleted /Library/Caches/Xamarin/XMA and /Library/Caches/Xamarin/mtbs and restarted VS. That helped.
Here's the actual solution if updating everything else still doesn't work. Open terminal, type in "instruments -s devices" to see a list of all the installed simulators.
In your info.plist set "Minimum System Version" to match the lowest simulator version you have installed.
After plugging in my physical phone with the usb cable, the list of simulator devices appeared in like 2 seconds... Before plugging in my phone, only the generic simulator and my phone were shown as deployment options
Just restart of my Mac worked...

Android Studio 3.0.1 for Mac not opening/installing SDK

I've downloaded Android Studio 3.0.1 for Mac and as I started it, it showed the splash screen for loading but did nothing else relevant (in the case, means showing the menu for starting/opening/importing projects).
After some research, I found that I could bypass this screen if I change the idea.properties and put on the following line:
disable.android.first.run=true
After that I can now reach the SDK Manager window, but no SDK update sites, platforms or tools shows up.
I'm running macOS X High Sierra 10.13.2.
Can anyone help me on installing the SDK tools and platforms?
Edit:
SDK Platform Screenshot
SDK Tools Screenshot
SDK Update Sites Screenshot
Uninstall and install it again. It should have downloaded the Android SDK components while installing but it doesn't seem to be the case. Make sure your connected to the internet during the installation, and once the installation is completed, ensure that they have been downloaded by checking the default Android SDK location on MacOS. Then try opening Android Studio without needing to change any config.
By the time this question was made, there was no solution.
The OS requirements were Mac OS High Sierra up to 10.12. There was no Android Studio for Mac OS 10.13.
Currently there is a version that supports Mac OS 10.13.
edit: also, I found out that permission problems may cause unexpected behavior of some apps (Visual Studio Code also broke). After the permissions check, the software worked like a charm.

Xamarin: error MT1108: Could not find developer tools for this 11.0.3 (15A432) device

I started to have this issue once I upgraded my phone to iOS 11.0.3.
It seems that now Visual Studio Community Edition for Mac (v7.2 build 636)
I've tried with both with XCode v9.0 (9A235) and v9.0.1 (9A1004)
This is the error that I receive in the application output in Visual Studio for Mac:
"error MT1108: Could not find developer tools for this 11.0.3 (15A432) device. Please ensure you are using a compatible Xcode version and then connect this device to Xcode to install the development support files."
I've verified that the path is set correctly for xcode-select, so in theory, it should work correctly. I'm almost thinking that the Xamarin toolchain does not yet support iOS v11.0.3
I've also tried deleting the bin/obj folders to no avail.
Might anyone be able to confirm that the Xamarin toolchain is compatible with iOS v11.0.3, and if so are there any special steps that need to be taken to make the toolchain recognize the version?
I can potentially downgrade my device to v11.0.1, but before I do I'd like to know if the toolchain is indeed incompatible.
Please let me know if there is more information that I can provide.
Apple ships some extra development code for devices when it release Xcode (an additional disk image to be loaded by the operating system).
In general Xcode ships them for everything it support at that point of time. Which means that when a newer version of iOS is shipped after the Xcode release the missing disk image might be unavailable until an updated Xcode is released (Apple can't guarantee future compatibility of the disk image).
E.g. for Xcode 9.0 (I don't have 9.0.1 installed)
/Applications/Xcode9.app/Contents//Developer/Platforms/iPhoneOS.platform/DeviceSupport/11.0 (15A372)/DeveloperDiskImage.dmg
Xamarin.iOS tries to load the image based on the device version. If it cannot find it it will report the MT1108 error. A potential workaround would be to rename (or copy) the disk image to match your iOS version number. YMMV depending on the changes that Apple introduced in that iOS update.
Note that Xamarin.iOS does not need the disk image for most features. The most visible one, where it's required, is to automatically start the application on devices.
As you found out the deployment works and you can manually start the application and the debugger will connect. I'll update the documentation to include this information.
Update
There was no further Xcode 9.0.x release after iOS 11.0.3. However the next Xcode release (9.1) included support for all 11.0.x versions.
/Applications/Xcode91.app/Contents//Developer/Platforms/iPhoneOS.platform/DeviceSupport/11.0/DeveloperDiskImage.dmg
The shasum of both images are identical so you can assume the one from Xcode9.0 could be renamed/copied without any issue.
Navigate to project folder and delete folders named bin & obj. That should fix the problem.

Get android studio (or the gradle part) running on OS X 10.7.5

I need to start android-development to develop an app for a motorola smartwatch on my good old mac OS X lion. Therefore I tried installing android studio when I got to the point where everything goes wrong and that's where I realised that mac OS X 1.8 was required.
After looking for workarounds (I am pretty sure there must be some as I found people claiming having android studio running on a not-requirement-meeting OS) I stumbled upon a question on SO. Although the answer there suggested to forget about android studio, I tried again and I discovered that you could install android studio without AVD. This turned out better than expected and after replacing the ADB with an older (mac os x 10.7.5 compiled) version, I finally managed to start a new project.
Although everything seems to work now, gradle hangs when I try to build a random project with blank activity. As I don't find much information about gradle, its system requirements and I don't have any experience with it, I was wondering whether someone would know a solution.
Which leads to my actual question: Is there a workaround to get android studio running on an older mac OS X? For instance by solving the gradle-problem or maybe some totally other technique or am I doomed to use eclipse (assuming I am not dual-booting)?
Any help is welcome!
It is actually possible. You can download any version of android studio (I guess, didn't try). After I found someone that could explain me how gradle works, I managed to get 1.4 working on my 'old' mac.
You just have to take the following points into account
Make sure you don't install any AVD-part as this only works as from mac OS X 10.8. For me this meant performing a custom installation and deselect ADV. I also deselected the other intel software, but I don't know whether this is necessary.
Replace your platform-tools folder (which is simply in your android sdk folder e.g. /Users/YourName/Library/Android/sdk) with an older version that I downloaded from https://dl-ssl.google.com/android/repository/platform-tools_r19.0.1-macosx.zip. If necessary your tools folder can also be downgraded to https://dl-ssl.google.com/android/repository/tools_r22.6.2-macosx.zip
If you've done this, you can normally already work with android studio and create your own project, but then gradle starts to freak out because the build-tools don't work (again this can be found in your android sdk folder). I had two folders in the build-tools directory: 19.1.0 and 23.0.1. Because the build-tools in 23.0.1 don't work for mac OS X 10.7, you can actually just delete that folder or get any other folder for the version you like, but you need to tell gradle. To do this, you can follow the options listed in the answers on this question.
I hope this helps all people who ever want to get started with Android Studio on an older version of mac OS X

Resources