Visual Studio issue pairing to Mac - xamarin

Using latest Visual Studio for Windows 17.4.2, connecting to my Mac having Xcode 14.1, I get this message when Pairing to Mac:
The Xcode version installed on the Mac (14.1) is not compatible with
this version of Visual Studio. This may cause unexpected warnings or
errors when building and deploying iOS projects. Please install Xcode
'13.3'. To download a specific version of Xcode, visit:
https://developer.apple.com/downloads.
If I continue, no iOS simulators are available for debugging. And when trying to debug on my iPhone connected by wire the the Mac, I get a compiler error:
fatal error: 'CHIP/CHIP.h' file not found
I have search the web. Only old articles appear from September. I have tried XCode 14.0 still, same issues.
Last resort was downloading XCode 13.4.1 that seems ton works. I can start simulation... Finally!
Is it really true that XCode 14 is yet not supported by Visual Studio?

Please be noted that the final builds of Xcode 14.1 are ready for you to test on Xamarin, but they are not included in IDE (it is not supported yet in MAUI), you have to install the pkg files of Xamarin.iOS and Xamarin.Mac to your Mac,refer to Xcode 14.1 Support · Issue #16659 · xamarin/xamarin-macios.
Is it really true that XCode 14 is yet not supported by Visual Studio?
Xcode 14 is supported, and it is recommended that you use Xcode 14.0 for now. The Xcode version in AppStore is Xcode14.1 currently, you can download Xcode 14.0 from the downloads page in the Apple Developer Portal.

Related

Simulators do not appear in Visual Studio with Xcode 14, can anyone assist?

I have installed Xcode 14 in macbook. However, simulators do not appear in Visual Studio.
Can anyone please help?
The problem is fixed in Visual Studio 17.3.5:
https://learn.microsoft.com/en-us/visualstudio/releases/2022/release-notes#1735--visual-studio-2022-version-1735
The latest version adds XCode 14 support.
Xcode 14 isn't supported by Xamarin. You will need to downgrade to Xcode 13 in order to get simulators working again.
In my case I even had to setup a new iPhone simulator from Xcode after downgrading.
You can find a link to XC13 here.
It's recommended that you do not upgrade to Xcode 14 just yet and keep using Xcode 13.4.1. You could try to downgrade Xcode (Go to downloads page in the Apple Developer Portal, sign in with your apple developer account, select Xcode13.4.1 to download and install). Then you can open Xcode, go to Preferences > Location > Command Line Tools, and make sure to select version 13.4.1.
You can also use the build from xcode14 branch if you need to keep Xcode 14. To get Xcode 14 support for Xamarin SDKs, follow the guidance on GitHub. These SDKs will also come to Visual Studio.
Resolved.
Solution - Updated Visual studio to 2022.
Thanks all of u for suggestions.

Your Xcode version may be too old for your iOS version

I have updated my phone's OS version to iOS 14 and spent today updating Xcode to version 12, yet when I try to build my Flutter app on my iPhone 11 - iOS 14 through Android Studio, it gives me this error:
Your Xcode version may be too old for your iOS version.
═══════════════════════════════════════════════════════════════════════════════════
2020-09-18 19:14:26.576 ios-deploy[30916:201883] [ !! ] Error 0xe8000022: The service is invalid. AMDeviceSecureStartService(device, CFSTR("com.apple.debugserver"), NULL, &con)
Could not run build/ios/iphoneos/Runner.app on 00008030-00012C200C45802E.
Try launching Xcode and selecting "Product > Run" to fix the problem:
open ios/Runner.xcworkspace
Error launching application on Azheen’s.
This problem is somewhat confusing, I got the same error with Xcode 12.0.1 and iOS 14.2 beta.
This solved for me
Download Device support files of iOS 14.0 from this link.
for iOS 14.2 beta there is a pull request that is not yet merged
Unzip and Paste it in this location. /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/
ReOpen Xcode.
This is what I did:
Updated Xcode
flutter clean on the terminal.
flutter upgrade on the terminal.
Open Xcode and run the application once.
flutter clean again.
flutter run.
It should work now.
This issued was raised a while back in August in the flutter repo. Currently, the issue has been fixed by the recent flutter update.
Run flutter upgrade to v1.20.4 to get the fix
I ran into this problem recently, most likely it can be caused due to the reason, that your iOS Device is running a higher version than you xcode can support.
Example:
Apple release new iOS for iPhone i.e. 14.2 and you upgrade your device right away, than you ran into this issue, because the xcode may not have the latest version of your device support files, meaning xcode can only suuport iOS 14.1 or lower. Apple sometimes release newer iOS without providing update of xcode device support files.
There is 4 solutions for this:
Keep your iOS Device on the current stable version of xcode
Downgrade your current iOS device
Install device support files manually
Install xcode beta from Apple Developer https://developer.apple.com/download/
It is an annoying issue, Apple should not release any iOS without having the supporting tools released at the same time, or they should run a warning.
Ran into this issue today on Visual Studio. It appeared that my Dart SDK version was too out of date and upgrading it appeared to fix the problem.
I did upgrade my Flutter version first, and then ran into a problem with the vsync property of AnimationController not being recognized, which was solved by upgrading the Dart SDK, so I'm not sure who the real culprit was (or if it was a combination of both).
Instructions on upgrading your Dart SDK: https://dart.dev/get-dart

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...

The iOS SDK version '...' is not installed, and no newer version was found

I get the error after updating Xamarin in Visual Studio which I had to do after a git pull. I have also applied the Xamarin updates in Xamarin Studio on my Mac build host. (Xamarin Studio > Check for updates).
The iOS SDK version '9.2' is not installed, and no newer version was found.
You can also modify the SDK version of your iOS project from visual studio in order to support older SDKs where you cant update the XCode or SDKs.
Open iOS project properties from Visual Studio.
Open iOS.Build tab
Set SDK version to 'Default'
Set Link Behaviour to 'Link Framework SDKs Only'
Save and Run the project
XCode needed updating to get the latest SDK.
The App Store told me there were updates, and mentioned SDK 9.2 in the summary so I updated.
It appears the cause was a commit on the csproj that bumped the SDK.
You can manually edit .csproj file and replace <MtouchSdkVersion>9.2</MtouchSdkVersion> with the version you actually have on your mac. This can be a solution when you use an old OS which does not offer updates for XCode.

Xamarin Studio Error: A valid Xcode installation could not be found

I updated Xcode this morning (version 4.6.2) and right now, I cannot compile my projects.
Error: A valid Xcode installation could not be found. If your copy of
Xcode is installed to a non-standard prefix, please specify the
location in Xamarin Studio's Preferences under 'SDK Locations'
I checked that SDK Locations are good but still same problem.
Any ideas to solve this problem ? Xamarin Studio 4.0.3 (Build 13)
OK, it seems to be the Bug of Xcode 4.6.2: http://forums.xamarin.com/discussion/comment/10620/#Comment_10620
There is a known issue with Xcode 4.6.2, we would recommend that you
re-download Xcode 4.6.1 and continue using that until we get a fix out
for Xamarin Studio. You can re-download Xcode 4.6.1 from
https://developer.apple.com/downloads/index.action
The only one way is to go back to 4.6.1 :(
Xamarin Studio 4.0.4 released, fixes incompatibility with Xcode 4.6.2
I have the same problem. Is a bug and you need download 4.6.1 from https://developer.apple.com/downloads
You just need to be registered as Apple developer and will find previous version on Developer Tools
Do you have to have a paid developeraccount to get the 4.6.1 version of xcode from apple?
I only have the free account and I haven't found it on the apple hp.
Edit:
A Screenshot from my downloadssection on the apple hp:

Resources