4

Legacy Build System has been deprecated since Xcode10+ but can still choose to use it. In the newest xcode Xcode13 you would encounter an error if attempt to use it - release note reference

We were able to get our App build to device using the New Build System but it only works on the initial build. The subsequent builds will encounter a Unable To Install error. We find that reopen Xcode, close out simulators, clearing derivedData, Clean Build folder would make the build work again but only once then the "Unable To Install" error would appear again.

Anyone else seeing similar issues in Xcode13? If so, do you have suggestions or workaround?

enter image description here

OLIVER.KOO
  • 5,654
  • 3
  • 30
  • 62

5 Answers5

4

This is the new option that needs to be added to WorkspaceSettings.xcsettings file:

  1. Right click on <<Your_Project>>.xcworkspace file and click show package contents
  2. open xcshareddata folder
  3. edit WorkspaceSettings.xcsettings file

<key>DisableBuildSystemDeprecationDiagnostic</key>
    <true/

Here's a complete WorkspaceSettings.xcsettings file with both settings (please ignore the unrelated PreviewsEnabled option):

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>BuildSystemType</key>
    <string>Original</string>
    <key>DisableBuildSystemDeprecationDiagnostic</key>
    <true/>
    <key>PreviewsEnabled</key>
    <false/>
</dict>
</plist>
Rahul R
  • 184
  • 1
  • 7
  • Path to the file for flutter project: ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings – Oleksandr Yefymov Feb 14 '22 at 22:28
  • Any idea how this can work for xcodebuild - it just ignores -UseModernBuildSystem=NO now and xcodebuild doesn't consider workspace settings afaik – Ed Lambert Jul 26 '22 at 13:51
  • To answer my own question if you set the above setting at a project level and pass -UseModernBuildSystem=NO it does then do what you intend. – Ed Lambert Jul 26 '22 at 18:01
2

There should be an option in Xcode 13 to keep using the legacy build system. File-> Workspace Settings -> Check "Don't show a diagnostic issue about build system deprecation" and click done.

Cristian Zumelzu
  • 842
  • 10
  • 15
1

If using CLI, you can use the following commands:

/usr/libexec/PlistBuddy -c "Add :DisableBuildSystemDeprecationDiagnostic bool" WorkspaceSettings.xcsettings
/usr/libexec/PlistBuddy -c "Set :DisableBuildSystemDeprecationDiagnostic true" WorkspaceSettings.xcsettings

Obviously, find the relevant file for the project to modify.

ufo
  • 674
  • 2
  • 12
  • 35
0

I have already installed both Apple Development and Distribution certificates in my local Keychain Access but I was facing the same problem with you though.

Interestingly, only thing that I changed Signing(Debug) option to Automatically manage signing and it builded up on my real device finally.

enter image description here

Emre Değirmenci
  • 715
  • 6
  • 22
-2

File -> build system -> new build system.

xcodedeveloper
  • 266
  • 2
  • 8