skip to Main Content

It’s not possible to deploy any Xamarin iOS app on a physical device. Maybe someone of you already had the same issues and knows about a work around?

Xcode: Version 14.0 (14A309)
Visual Studio for Mac: 17.3.4 (build 4)

When trying to Debug I get following error. I’ve already tried multiple times to clean the project and delete bin and obj folders:

Target _CopyAppConfigFile:
  Skipping target "_CopyAppConfigFile" because all output files are up-to-date with respect to the input files.
Target CopyFilesToOutputDirectory:
    Xamarin.iOS -> .../Xamarin/Xamarin.iOS/bin/iPhone/Debug/Xamarin.iOS.exe
Target _CopyResourcesToBundle:
  Skipping target "_CopyResourcesToBundle" because all output files are up-to-date with respect to the input files.
Target _WriteAppManifest:
  Skipping target "_WriteAppManifest" because all output files are up-to-date with respect to the input files.
Target _CompileToNative:
    /Library/Frameworks/Xamarin.iOS.framework/Versions/Current/bin/mtouch @/Xamarin/Xamarin.iOS/obj/iPhone/Debug/device-builds/iphone14.2-16.0/response-file.rsp 
    Xamarin.iOS 15.12.0.2 (d17-3: 87f98a75e) using framework: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS16.0.sdk
    Compilation failed with code 1, command:
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -Wno-receiver-forward-class -Wno-objc-missing-super-calls -Wno-unguarded-availability-new -stdlib=libc++ -gdwarf-2 -std=c++14 -I/Library/Frameworks/Xamarin.iOS.framework/Versions/15.12.0.2/SDKs/MonoTouch.iphoneos.sdk/include -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS16.0.sdk -Qunused-arguments -miphoneos-version-min=9.0 -arch arm64 -c -o /Xamarin/Xamarin.iOS/obj/iPhone/Debug/device-builds/iphone14.2-16.0/mtouch-cache/arm64/registrar.o -x objective-c++ -D DEBUG /Xamarin/Xamarin.iOS/obj/iPhone/Debug/device-builds/iphone14.2-16.0/mtouch-cache/registrar.m
    In file included from /Xamarin/Xamarin.iOS/obj/iPhone/Debug/device-builds/iphone14.2-16.0/mtouch-cache/registrar.m:3:
    /Xamarin/Xamarin.iOS/obj/iPhone/Debug/device-builds/iphone14.2-16.0/mtouch-cache/registrar.h:112:9: fatal error: 'CHIP/CHIP.h' file not found
    #import <CHIP/CHIP.h>
            ^~~~~~~~~~~~~
    1 error generated.
    MTOUCH : error MT4109: Failed to compile the generated registrar code. Please file a bug report at https://github.com/xamarin/xamarin-macios/issues/new
Done building target "_CompileToNative" in project "Xamarin.iOS.csproj" -- FAILED.

When trying to Deploy a release build I get:

/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/bin/mlaunch -sdkroot "/Applications/Xcode.app/Contents/Developer" --installdev ".../Xamarin.iOS/bin/iPhone/Release/Xamarin.iOS.app" --device ios "--devname=iPhone 13 Pro" --install-progress
error HE0004: Could not load the framework 'DVTITunesSoftwareServiceFoundation' (path: /Applications/Xcode.app/Contents/SharedFrameworks/DVTITunesSoftwareServiceFoundation.framework/DVTITunesSoftwareServiceFoundation): 
dlopen(/Applications/Xcode.app/Contents/SharedFrameworks/DVTITunesSoftwareServiceFoundation.framework/DVTITunesSoftwareServiceFoundation, 0x0001): Library not loaded: '@rpath/ContentDelivery.framework/Versions/A/ContentDelivery'
  Referenced from: '/Applications/Xcode.app/Contents/SharedFrameworks/DVTITunesSoftwareServiceFoundation.framework/Versions/A/DVTITunesSoftwareServiceFoundation'
  Reason: tried: '/usr/lib/swift/ContentDelivery.framework/Versions/A/ContentDelivery' (no such file), '/Library/Frameworks/Xamarin.iOS.framework/Versions/15.12.0.2/lib/mlaunch/mlaunch.app/Contents/MacOS/../Frameworks/ContentDelivery.framework/Versions/A/ContentDelivery' (no such file), '/Applications/Xcode.app/Contents/SharedFrameworks/DVTITunesSoftwareServiceFoundation.framework/Versions/A/Frameworks/ContentDelivery.framework/Versions/A/ContentDelivery' (no such file), '/usr/lib/swift/ContentDelivery.framework/Versions/A/ContentDelivery' (no such file), '/Library/Frameworks/Xamarin.iOS.framework/Versions/15.12.0.2/lib/mlaunch/mlaunch.app/Contents/MacOS/../Frameworks/ContentDelivery.framework/Versions/A/ContentDelivery' (no such file), '/Applications/Xcode.app/Contents/SharedFrameworks/DVTITunesSoftwareServiceFoundation.framework/Versions/A/Frameworks/ContentDelivery.framework/Versions/A/ContentDelivery' (no such file), '/System/Library/Frameworks/ContentDelivery.framework/Versions/A/ContentDelivery' (no such file)
        

Application could not be uploaded to the device.

6

Answers


  1. I’ve had a similar issue. I’ve update the xcode to 14 and visual studio (from windows) stopped working with the xamarin.ios debug/build. I needed to downgrade the xcode to the previous version to get it working back.

    Login or Signup to reply.
  2. Apple released Xcode 14 overnight, which auto-updated on my machine, so it is now officially the version to use, but still no support for building Xamarin apps with VS Mac Preview. 🙁

    Login or Signup to reply.
  3. I suggest to downgrade to a previous version of XCode (e.g. https://download.developer.apple.com/Developer_Tools/Xcode_13.4.1/Xcode_13.4.1.xip if logged in as developer)

    Here you can select the XCode version you want: https://developer.apple.com/download/all

    You can have multiple XCode version installed side by side. Use sudo xcode-select -s /path/to/XCode.app to switch between them.

    Login or Signup to reply.
  4. Downgrading the Command Line Tools to 13.4 helped me.

    In xCode (still 14) -> Preferences -> Location -> Command Line Tools, select version 13.4 instead of 14. Restart tools and it worked again…

    enter image description here

    Hope it works for you too!

    Login or Signup to reply.
  5. With the latest update from Xamarin.iOS the issue is resolved. I am running 14.0.1 XCODE,
    17.3.6 Visual studio 2022 community
    16.0.0.72 Xamarin.iOS
    I am able to deploy the solution to both older(15.5) and newer(16.0) simulator
    So the issue is resolved, please update all the relevant tools. Note I have also checked deployment from Rider IDE.

    Login or Signup to reply.
  6. After installing command-line manually, command-line tools is empty, after selecting XCode 14.0.1 itself resolved the issue.

    enter image description here

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search