-
Notifications
You must be signed in to change notification settings - Fork 223
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't build Xamarin.ios with Xcode 15.1 and SDK 17 #2621
Comments
As a bare minimum, Microsoft should ensure AppCenter stays alive and supports the last Xamarin releases, preventing developers from having to waste time on yet a migration (from AppCenter to another build service), and rather can focus on migrating from Xamarin to MAUI. |
Is there any update on this incident? I also have this problem. |
@AngelAndresM not yet. As a workaround I published the app building with a local mac |
One possible solution is to use pre-build scripts to try and install Xcode 15 and the latest Xamarin.iOS versions. I have also submitted an issue for the macos-12 runner, which is what AppCenter uses, to get the latest Xamarin tools included: actions/runner-images#9512 |
I used a similar work-around to install the latest version of Xamarin.Android, to build against Android 34. See comment in issue #2611 for the script. |
Honestly doubt there will be support in a long time. I personally raised a ticket in the past to support this and they had it planned for like 1 month later (And when I asked it was already way too late so...) |
@follesoe Can you post the pre-build script you used here? I think many of us will need it. Thanks! |
@EmmanVazz I believe Xcode 15 is installed already. I have not done manual installs of Xamarin.iOS yet, but this is how I did it for Xamarin.Android: #!/usr/bin/env bash
PKG_URL="https://dl.xamarin.com/MonoforAndroid/Mac/xamarin.android-13.2.2.0.pkg"
PKG_NAME=${PKG_URL##*/}
curl -4fsLo "${PKG_NAME}" "${PKG_URL}"
sudo installer -pkg "${PKG_NAME}" -target / |
Not sure the above pre-build script (modified for Xamarin.iOS) will work here. My build is already installing |
@victorbeltranpinol , how do you update Xamarin.iOS to 16.4 in cs proj or code level in Xamarin iOS project? do we need to change any package as for me I kept Xamarin.IOS as reference only how can we update? |
@AjitKRuin You don't need to change your project. Migrate to Github Actions with:
happy hacking |
I was experiencing a similar issue, it was the nuget restore for solution failing as it was trying to restore things for Android also, even though I am building the iOS csproj.
This is the error in the nuget restore
Anyway the work around was to add an
Now it installs |
Thanks @jdinnen that worked for me! I had tried adding those to the |
Thanks @jdinnen. I can confirm that your solution works. The issue, as you mentioned, was caused by errors during the nuget restore for the Android projects, so, installing the xamarin-android cask on the I think this is probably an Appcenter bug, as it doesn't make sense that we need to worry about the android projects during the iOS build. Also, it only happens when upgrading to XCode 15.0.1 Preview, SDK version: Xamarin.iOS 16.4. |
Are you able to upload app to testflight with sdk 17 for ios? |
@AmaluThomas Yes, |
Maybe I do something wrong, but it doesn't work for me. I've tried to insert it into pre-build script for android and for ios but build is steal crashing. |
It's a pity, but it doesn't work for me. |
Thanks @jdinnen that worked for me. |
Ive added the post clone script, appcenter tells me the sdk is not available on agent. [command]/bin/bash /Users/runner/runners/3.240.1/scripts/select-xamarin-sdk.sh 6_12_25 Then i still receive the exact same error when it's trying to restore nugets for android... |
in appcenter in build configuration under build app section. set project combo on .csproj not the sln. |
Describe the solution you'd like
I would like to build the iOS Xamarin Forms using Xamarin.iOS 16.4 and Xcode 15.0.1 Preview
Additional context
When I try to build my app in the App Center using:
SDK version: Xamarin.iOS 16.4
Xcode version: 15.0.1 Preview
I have many errors like this:
/Users/runner/work/1/s/MyProject/obj/iPhone/Release/netstandard2.0/.NETStandard,Version=v2.0.AssemblyAttributes.cs(4,20): error CS0400: The type or namespace name 'System' could not be found in the global namespace (are you missing an assembly reference?) [/Users/runner/work/1/s/MyProject/MyProject.csproj]
/Users/runner/work/1/s/MyProject/obj/iPhone/Release/netstandard2.0/MyProject.AssemblyInfo.cs(14,55): error CS0518: Predefined type 'System.String' is not defined or imported [/Users/runner/work/1/s/MyProject/MyProject.csproj]
However, if I run the build using:
SDK version: Xamarin.iOS 16.2
Xcode version: 14.2
It works like a charm
I received this email from Apple, therefore I must build the APP using SDK iOS 17 and Xcode 15
ITMS-90725: SDK version issue - This app was built with the iOS 16.2 SDK. Starting April 29, 2024, all iOS and iPadOS apps must be built with the iOS 17 SDK or later, included in Xcode 15 or later, in order to be uploaded to App Store Connect or submitted for distribution.
Is there something not ready in the ios build machines of the App Center? Does somebody have success using xcode 15?
Thanks in advance
The text was updated successfully, but these errors were encountered: