Xamarin Studio (Xamarin.iOS) not including build number on archive? - xcode

Since updating my Mac to XCode 8 (For iOS 10 support) Xamarin Studio is not including the Build # in archives. In the Archives window the build number (Code column) is empty, then when uploading the IPA to our Enterprise app store we get an error saying the Build # is invalid.
Has anyone else run into this issue since upgrading? I've tried restarting Xcode, Xamarin and the Mac itself with no luck.

Ended up being unrelated to my recent XCode update. Rather, we had previously pushed a version "0.2.1" which equates to "21" in our EMM solution (it ignores 0's). I'm not sure if the same can be said about the App store. So version 1.0.1 = 11, which is less than 21 thus the build # error. I'm not sure why Xamarin no longer shows the build # in the Archive screen but it ended up not being related to the problem we were having.

Related

Even after rolling back to Xcode 13.3.1 I can no longer debug apps on my iPhone with iOS 15.6

After my iPhone 13 updated to iOS 15.6, Xcode 13.4.1 no longer was able to debug apps on the device. Many posts and Xcode support recommend that I roll back to Xcode 13.3.1.
So I renamed Xcode to "Xcode 13.4.1", downloaded the xip for 13.3.1 and also confirmed that I am running the previous version, via the About menu.
Yet I still get the following error:
Failed to prepare device for development. This operation can fail if
the version of the OS on the device is incompatible with the installed
version of Xcode. You may also need to restart your mac and device in
order to correctly detect compatibility.
I have cleaned the build folder, I also downloaded the 15.5 image, renamed it to 15.6, and placed it in the DeviceSupport folder. But it nothing has worked.
I don't know if Xcode uses any config files that I need to clean, or anything else I can't think of. Has anyone been through this?
Xcode 13.4 (build 13F100) has a known issue preparing devices running iOS 15.6 beta and is not officially supported. The fix is to wait for a newer build of 13.4.x Xcode.
Anecdotally some have said it works after disconnecting the phone and restarting both the phone and the Mac.
There are two workarounds:
The official workaround from Apple is to install Xcode 13.3.1. You have tried this. The majority of the config files are inside the Xcode directory. You can download AppCleaner and have it show you everything it would delete if you allowed it to uninstall Xcode. For me that list was 11 GB and 39 files. I'd exam those files and possibly make copies of anything outside /Applications/Xcode.app before allowing it to remove.
Navigate to
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/ and duplicate the 15.5 folder with a new name of 15.6. If this works, it is much safer.

Setting SDK to 12.1

I keep getting the warning:
This app was built with the iOS 11.4 SDK. Starting March 2019, all iOS
apps submitted to the App Store must be built with the iOS 12.1 SDK or
later, included in Xcode 10.1 or later.
...when I upload to the app store.
I run Xcode 10.1, and I also set the base SDK to 12.1 as in the screenshot, but I still get the warning after archiving and uploading. Is there anything else I need to do? Deployment target is 9.0.
Just make sure you are using latest version of Xcode for compiling and uploading your build. Also make sure that you app screens support the all-screen design of iPhone XS Max or the 12.9-inch iPad Pro (3rd generation). Also check if all the pods are also build on latest SDK
I had 2 versions of Xcode (9 and 10) on my machine and after uploading I was also getting this warning. May be lame but once I removed Xcode 9 from my machine this warning went away.
Note: This is just a workaround. I'm not sure it can solve your problem.
Your Base SDK setting is different from mine.
Since I have just uploaded my app to Appstore without any problem (Nov 13, 2018 at 10:23 PM),
I think it's worth a try to set it to iphoneos like in the image and try to archive and upload again.
Xcode version 10.1 (10B61)

Setting the SDK for ios build

I uploaded my first Nativescript app to the apple app store and got a message that my build used SDK 11 and was ok, but future releases will be required to use SDK 12. I have been unable to find where you set the SDK the compiler uses. I have used a combination of command line to build at times, but usually the Sidekick app. Can someone help me know how to get my project to use SDK 12?

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.

Problems building Xamarin.iOS project with Visual Studio using Xamarin 3. Error 11 The maximum deployment target for iOS is 9.1

We use Xamarin on Windows with Visual Studio to build our app for iOS.
We recently upgraded to Xamarin 4 and found we were not able to build.
Various errors including builds hanging, Linked Away exceptions.
After some effort we decided to revert to Xamarin 3 using the links on this page
https://store.xamarin.com/account/my/subscription/downloads#xamarin3
Where it says "Looking for the version before Xamarin 4? Get the latest stable version of Xamarin 3".
We now cannot build and get the following error:
**Error 178 The maximum deployment target for iOS is 9.1 (current deployment target is 9.2).
Please select an older deployment target in your project's Info.plist.**
In Visual Studio, this setting is selected in the project settings and the only value available is 9.2. If I try and update in the .csproj file xml, it gets overwritten.
I have had a look at all the various versions of Xamarin for Visual Studio and for the Mac (in the show all versions on the above page) and cannot find versions that will allow us to build. i.e. versions with the old build client with matching Xamarin.iOS versions.
Are there matching Xamarin.iOS releases still available for both Mac and windows that use Xamarin 3?
Is there a way I am missing of forcing the SDK value to match the build server?
For what it's worth the answer was in the error message (kind of).
The necessary update to Info.plist was adding the following:
<key>MinimumOSVersion</key>
<string>9.1</string>
This was only apparent after I had noticed that there was an editor called PListEditoryFactory, which gives a ui to edit Info.plist.
The file didn't open in PListEditoryFactory by default, so it just looked like an xml file to me.
In the ui the field needed editing is called 'Deployment Target', needs to be 9.1.
Another curveball was that the error message says that the 'current deployment target ' is 9.2, which was the value selected (and only option) in the iOS project settings TargetSDK dropdown.
What this is for and how it is different to the Info.plist setting I dont know.

Resources