dotnet / maui

.NET MAUI is the .NET Multi-platform App UI, a framework for building native device applications spanning mobile, tablet, and desktop.
https://dot.net/maui
MIT License
22.25k stars 1.76k forks source link

Could not deploy iOS app from VS for Mac stable version #11752

Closed jingliancui closed 1 year ago

jingliancui commented 1 year ago

Description

Even I uninstall vs for mac follow this link https://learn.microsoft.com/en-us/visualstudio/mac/uninstall?view=vsmac-2022, and reinstall it, it still shows this error.

Screenshot 2022-11-30 at 16 58 20

vs info:

Visual Studio Community 2022 for Mac
Version 17.4 (build 2406)
Installation UUID: 10ba87bd-0398-47b7-911f-df1122619622

Runtime
.NET 6.0.9 (64-bit)
Architecture: Arm64

Roslyn (Language Service)
4.4.0-3.22461.4+8ab250290a4010c11a21521f78dbc87dbb7aac81

NuGet
Version: 6.3.1.1

.NET SDK (Arm64)
SDK: Not installed

.NET Runtime (Arm64)
Runtime: /usr/local/share/dotnet/x64/dotnet
Runtime Versions:
    6.0.10
    6.0.9
    6.0.4
    6.0.1
    5.0.16 (x64 – Unsupported)
    5.0.13 (x64 – Unsupported)
    3.1.28 (x64 – Unsupported)
    3.1.25 (x64 – Unsupported)
    3.1.24 (x64 – Unsupported)
    3.1.22 (x64 – Unsupported)

Xamarin.Profiler
'/Applications/Xamarin Profiler.app' not found

Updater
Version: 11

Xamarin Designer
Version: 17.4.0.136
Hash: d49c9ff6d3
Branch: remotes/origin/d17-4
Build date: 2022-11-02 23:47:17 UTC

Apple Developer Tools
Xcode 14.1 (21534.1)
Build 14B47b

Xamarin.Mac
Xamarin.Mac not installed. Can't find /Library/Frameworks/Xamarin.Mac.framework/Versions/Current/Version.

Xamarin.iOS
Xamarin.iOS not installed.
Can't find mtouch or the Version file at /Library/Frameworks/Xamarin.iOS.framework/Versions/Current.

Xamarin.Android
Not Installed

Microsoft Build of OpenJDK
Java SDK: /Library/Java/JavaVirtualMachines/microsoft-11.jdk
11.0.12
Android Designer EPL code available here:
https://github.com/xamarin/AndroidDesigner.EPL

Eclipse Temurin JDK
Java SDK: /Library/Java/JavaVirtualMachines/temurin-8.jdk
1.8.0.302
Android Designer EPL code available here:
https://github.com/xamarin/AndroidDesigner.EPL

Android SDK Manager
Version: 17.4.0.54
Hash: 6eabb9e
Branch: remotes/origin/d17-4
Build date: 2022-11-02 23:47:26 UTC

Android Device Manager
Version: 0.0.0.1206
Hash: 886af39
Branch: 886af39
Build date: 2022-11-02 23:47:26 UTC

Build Information
Release ID: 1704002406
Git revision: dfb45c1152306f0d5f77334f9d026b0aadb7ec90
Build date: 2022-11-02 23:44:22+00
Build branch: release-17.4
Build lane: release-17.4

Operating System
Mac OS X 13.0.1
Darwin 22.1.0 Darwin Kernel Version 22.1.0
    Sun Oct  9 20:14:30 PDT 2022
    root:xnu-8792.41.9~2/RELEASE_ARM64_T8103 arm64

Steps to Reproduce

not need

Link to public reproduction project repository

not need

Version with bug

6.0.400

Last version that worked well

Unknown/Other

Affected platforms

iOS

Affected platform versions

iOS 16

Did you find any workaround?

no

Relevant log output

/usr/local/share/dotnet/x64/packs/Microsoft.iOS.Sdk/15.4.454/tools/bin/mlaunch -sdkroot "/Applications/Xcode.app/Contents/Developer" --installdev "/Users/ericcui/Desktop/SampleApp/SampleApp/bin/Debug/net6.0-ios/ios-arm64/SampleApp.app" --device ios "--devname=eric的iPhone" -v -v
Using Xcode 14.1 found in /Applications/Xcode.app/Contents/Developer
Xamarin.Hosting: Xamarin.Hosting
Xamarin.Hosting:     Version: 29a1c1382e (main)
Xamarin.Hosting:     Xcode: /Applications/Xcode.app
Xamarin.Hosting:     Xcode Version: 14.1
Xamarin.Hosting:     Verbosity: 2
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: <3BBA1E58-71C9-3514-B181-7041610E13D9> /Applications/Xcode.app/Contents/SharedFrameworks/DVTITunesSoftwareServiceFoundation.framework/Versions/A/DVTITunesSoftwareServiceFoundation
  Reason: tried: '/usr/lib/swift/ContentDelivery.framework/Versions/A/ContentDelivery' (no such file, not in dyld cache), '/System/Volumes/Preboot/Cryptexes/OS/usr/lib/swift/ContentDelivery.framework/Versions/A/ContentDelivery' (no such file), '/usr/local/share/dotnet/x64/packs/Microsoft.iOS.Sdk/15.4.454/tools/lib/mlaunch/mlaunch.app/Contents/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, not in dyld cache), '/System/Volumes/Preboot/Cryptexes/OS/usr/lib/swift/ContentDelivery.framework/Versions/A/ContentDelivery' (no such file), '/usr/local/share/dotnet/x64/packs/Microsoft.iOS.Sdk/15.4.454/tools/lib/mlaunch/mlaunch.app/Contents/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/Volumes/Preboot/Cryptexes/OS@rpath/ContentDelivery.framework/Versions/A/ContentDelivery' (no such file), '/usr/lib/swift/ContentDelivery.framework/Versions/A/ContentDelivery' (no such file, not in dyld cache), '/System/Volumes/Preboot/Cryptexes/OS/usr/lib/swift/ContentDelivery.framework/Versions/A/ContentDelivery' (no such file), '/usr/local/share/dotnet/x64/packs/Microsoft.iOS.Sdk/15.4.454/tools/lib/mlaunch/mlaunch.app/Contents/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, not in dyld cache), '/System/Volumes/Preboot/Cryptexes/OS/usr/lib/swift/ContentDelivery.framework/Versions/A/ContentDelivery' (no such file), '/usr/local/share/dotnet/x64/packs/Microsoft.iOS.Sdk/15.4.454/tools/lib/mlaunch/mlaunch.app/Contents/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), '/Library/Frameworks/ContentDelivery.framework/Versions/A/ContentDelivery' (no such file), '/System/Library/Frameworks/ContentDelivery.framework/Versions/A/ContentDelivery' (no such file, not in dyld cache)

Application could not be uploaded to the device.
coen22 commented 1 year ago

I think it's because of a path issue. I had something similar. Try to run:

sudo xcode-select -s /Applications/Xcode.app

Or otherwise:

xcode-select -p

Though it would be nice if the MAUI build tools could give a clearer error message or detect the correct path.

jingliancui commented 1 year ago

Sorry, it doesn't work. @coen22

Screenshot 2022-11-30 at 18 16 45
coen22 commented 1 year ago

Maybe try opening Xcode. It probably has to update some files, after having updated through the App Store.

jingliancui commented 1 year ago

@coen22 Sorry, it still doesn't work.

Screenshot 2022-11-30 at 20 05 46
coen22 commented 1 year ago

That's odd, if I'm correct it should point to

/Applications/Xcode.app/Contents/SharedFrameworks/ContentDelivery.framework/Versions/A/ContentDelivery 

Perhaps you should try to get a list of simulators and run in through the CLI:

dotnet build -t:Run -f net7.0-ios -p:_DeviceName=:v2:udid=<Simulator_UUID>

You can get <Simulator_UUID> with the following code

/Applications/Xcode.app/Contents/Developer/usr/bin/simctl list
ghost commented 1 year ago

Thanks for the issue report @jingliancui! This issue appears to be a problem with Visual Studio, so we ask that you use the VS feedback tool to report the issue. That way it will get to the routed to the team that owns this experience in VS.

If you encounter a problem with Visual Studio, we want to know about it so that we can diagnose and fix it. By using the Report a Problem tool, you can collect detailed information about the problem, and send it to Microsoft with just a few button clicks.

  1. Go to the Visual Studio for Windows feedback tool or Visual Studio for Mac feedback tool to report the issue
  2. Close this bug, and consider adding a link to the VS Feedback issue so that others can follow its activity there.

This issue will be automatically closed in 3 days if there are no further comments.

drasticactions commented 1 year ago

CC @dalexsoto

I believe your issue is you're running Xcode 14.1, but the version of Xamarin.iOS / dotnet ios SDK you have is intended for Xcode 14, hence why it's not working. I'm not sure what versions of Xcode are supported for what dotnet bands (like, is there Xcode 14.1 support for net6?) but I think that's why it's throwing, based on that stack.

jingliancui commented 1 year ago

@drasticactions Sorry, I've download xcode 14.0.1 and it's still doesn't work. I'm going to download xcode14 .

Screenshot 2022-12-01 at 20 44 37
jingliancui commented 1 year ago

It doesn't work as well, I will submit an issue to vs feedback.

Screenshot 2022-12-01 at 21 09 25
mariomurrent-softwaresolutions commented 1 year ago

It doesn't work as well, I will submit an issue to vs feedback.

Screenshot 2022-12-01 at 21 09 25

Same here - let's see if that will be solved somehow

ghost commented 1 year ago

This issue is being closed due to inactivity. If this issue is still affecting you, please follow the steps above to use the VS Feedback Tool to report the issue.

zuzannaczaja commented 1 year ago

I still have problem with that.

mariomurrent-softwaresolutions commented 1 year ago

Same here

jingliancui commented 1 year ago

issue was closed at vs feedback, would you like to open this github issue? thanks https://developercommunity.visualstudio.com/t/Could-not-deploy-iOS-app-from-VS-for-Mac/10219036?q=Could+not+deploy+iOS+app+from+VS @PureWeen