xcode-select: error: tool 'actool' requires Xcode - ios

I used XCode 12 in Big Sur 11, downloaded from App Store. But today, Apple doesn't allow me to upload my game through XCode anymore with this message:
all ios apps submitted to the app store must be built with the ios 15 sdk Xcode 13
So I tried to update XCode to 13, but App Store doesn't allow me because my macOS is not 12.
But I found on the official apple website that XCode 13.2 is available in Big Sur 11.3, so I just updated my macOS to Big Sur 11.6.
https://developer.apple.com/support/xcode/
But still, I was not allowed to download XCode 13 from App Store and I found apple's official webpage that can download XCode versions manually.
So I downloaded 13.2.1 with something called command-line-interface, uninstall the XCode 12, and install both. I put the XCode.app into the Applications directory.
Launching XCode 13.2 was successful without any error, but the build of my project always failed with this message:
xcode-select: error: tool 'actool' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance
So I searched about it, but nothing related was found. I already tried this:
$ sudo xcode-select -s /Applications/Xcode.app/Contents/Developer
But nothing changed. Still, I see the same error message. I'm pretty sure that installing XCode by downloading it causes this trouble. But there's no OS update available on my MacBook because Big Sur is my last supported version, and App Store does not allow me to download XCode 13.
How do I solve this issue? What am I missing?

Related

Failed to prepare device for development error when deploying app

I am trying to run my app on a physical device. The applicaiton builds but it doesnt deploy my app to the device.
I get this following error:
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.
Details:
I have xcode version 13.2.1
device is iphone 11 pro max with ios version 15.6 installed.
I tried to upgrade my xcode to 13.4.1 but on app store there is no button that indicates that i can upgrade.
Things I have tried:
restarting mac
restarting iphone device
closing and reopening xcode
cleaning project and rebuilding.
Any help will be appreciated.
Download xCode 13.4.1 directly using the link
https://download.developer.apple.com/Developer_Tools/Xcode_13.4.1/Xcode_13.4.1.xip

App Store must be built with the iOS 15 SDK or later, included in Xcode 13 or later

ERROR ITMS-90725: "SDK Version Issue. This app was built with the iOS 14.4 SDK. All iOS apps submitted to the App Store must be built with the iOS 15 SDK or later, included in Xcode 13 or later."
In my case, I have a Mid 2012 MacBook Pro .. so max support Xcode version 12.x and
Mac OS Catalina. SO cannot install Xcode 13.x
If there's a way to run a build on XCode 12, that has the iOS Deployment Target set to 15 - that would be greatly appreciated. Any suggestions?
Thanks
We also recently got this message from Apple, which is quite an issue for us as our build nodes were not capable of running Xcode 13, and further their own previous posts on the issue only suggested that in order to upload to the App Store apps were required to be built with Xcode 13 after Apr 25, not that they also required linking against the iOS 15 SDK, or that apps already uploaded to the app store before the deadline would require this to be approved for release.
We're half way through upgrading our build machines to run a version of MacOS that supports Xcode 13 (causing various issues with other parts of our build of course), installing Xcode 13, and now we have to work out how to upgrade our Xcode project to use the iOS 15 SDK without it breaking even more stuff (actually, initial investigation suggests we don't need to change our project settings at all, it will happen automatically). Happy days, but that's Apple for you (in contrast, most of our MS-stack-based and Android-based applications are using quite old and in some cases out-of-LTS versions of various libraries and build tools, as we haven't had the resources to upgrade yet, but certainly haven't any issues with publishing or running them).
https://developer.apple.com/news/?id=2t1chhp3
Check your iOS SDK version using command
xcodebuild -showsdks
and xcode version with command
/usr/bin/xcodebuild -version
If your xcode is less than 13 and iOS Sdk less than 15 - you need to update it.
By the way, here is a useful link, it will help you with dependencies https://developer.apple.com/support/xcode

How to fix error "Could not locate device support files"

I have the latest Xcode 11.1
iOS is updated to the latest release 13.2
I'm getting error:
Could not locate device support files.
This iPhone 6s is running iOS 13.2 (17B84), which may
not be supported by this version of Xcode. An updated
version of Xcode may be found on the
App Store or at developer.apple.com.
This happens to all iOS devices running 13.2
What I'm missing here?
That's easy.
Those files are contained in Xcode itself.
Thus, all you have to do to use devices with a newer iOS version - create junction folder (hard link) of those support files from new Xcode (in our case - the beta 11.2) to older Xcode (11.1).
And yes, before that you have to download beta Xcode 11.2.
Otherwise, you also can download only support files from the Internet, if someone already shared them and just toss 'em to Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport
P.S. to create junction folder use this command in terminal:
ln -s /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/13.2 /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport
It allows you to not to duplicate the same files across your Mac
P.S. Be aware! You have to launch newer Xcode (Beta) you downloaded at least one time to install updated Xcode Tools before you can use symlinks (hard links, junction folder) to Device Support files in older Xcode, otherwise you'll get an error and will not be able to build your app.
I've been reading about hacks to get it to work on the current version of Xcode. Honestly not interested in going down that path. Bottom line, Apple released iOS/iPadOS 13.2 but did not release Xcode 11.2 (still in beta). Gotta go to developer.apple.com and download the latest beta of Xcode 11.2 to run apps on both iOS and iPadOS 13.2 devices. Hopefully they release Xcode 11.2 soon. The last beta was from Oct 11.

Submit to App Store built with iOS 12.1 SDK

I’m using Xamarin Forms 3.4 and VSTS to build and deploy to iTunes and Google Play.
During February (perhaps a bit earlier) I was getting a warning when I was trying to deploy to iTunes. The warning was the following
SDK Version Issue - 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
Everything that I tried so far didn’t work.
So I added a “Bash script” step before the build step and added the following 2 lines in the script
sudo $AGENT_HOMEDIRECTORY/scripts/select-xamarin-sdk.sh 5_16_0
echo '##vso[task.setvariable variable=MD_APPLE_SDK_ROOT;]'/Applications/Xcode_10.1.app;sudo xcode-select --switch /Applications/Xcode_10.1.app/Contents/Developer
I found the previous script and guideline in https://learn.microsoft.com/en-us/azure/devops/pipelines/agents/hosted?view=azure-devops&tabs=yaml&viewFallbackFrom=vsts#xcode
The build is successful but the deployment to iTunes fails with the error
ERROR ITMS-90596: "Invalid Bundle. The asset catalog at 'Payload/MyApp.iOS.app/Assets.car' can't be processed. Rebuild your app, and all included extensions and frameworks, with the latest GM version of Xcode and resubmit."
Before adding the “Bash script” step, I didn’t have this problem in iTunes deployment.
So I guess that the question is obvious… what am I doing wrong?
Go to This Link And look at
Apple has indicated that starting in March 2019, all apps and updates
submitted to the App Store must have been built with the iOS 12.1 SDK
or later, included in Xcode 10.1 or later. Apps should also support
the iPhone XS and 12.9" iPad Pro screen sizes.
I think in your case maybe updating Visual studio will solve your issue, Because updating VS will update your Xamarin.iOS sdk version to 12.1+ if it is lower than this.
And also if you have Xcode 9.4 installed then you will need to install Xcode 10.1 to provide support for iOS 12.0 and above for Visual Studio
You can download latest version of Xcode from following link
How to download Xcode DMG or XIP file?

Facebook review build must work on Xcode 7.3 simulator?

Facebook has rejected a simulator build created with Xcode 9.4.1, targeting iOS 11+, that was submitted for review with the message:
Please ensure that the Simulator Build provided works with Xcode Version 7.3, as this is the software our team uses in review. More information about creating simulator builds can be found here.
Is it possible to create such a build with Xcode 9?
I have tried installing the build I submitted on the Xcode 7.3.1 simulator like this:
DEVELOPER_DIR=/path/to/Xcode-7.3.1.app/Contents/Developer\
&&\
xcrun simctl install booted \
/Path/to/Xcode/DerivedData/App-Identifier/Build/Products/Release-iphonesimulator/App.app
but when I try to launch the app it crashes immediately, leaving an assertion failed: message with some hex digits in the system log. I suspect this is because it does not support iOS 9.3, which the simulator is running, but there could have been other changes to the simulator that are causing it to fail.
The link facebook provided says to run in the Xcode iPhone 5 simulator, but my version of Xcode only seems to have simulators going back to the 5s.
Do I need to make my app run under iOS 9.3? Or re-write it in swift 2.2 so I can build it using xcode 7.3?

Resources