xamarin / xamarin-macios

.NET for iOS, Mac Catalyst, macOS, and tvOS provide open-source bindings of the Apple SDKs for use with .NET managed languages such as C#
Other
2.43k stars 507 forks source link

Cannot archive iOS project due to codesign exited with code 1 #10641

Closed pietrodicaprio closed 9 months ago

pietrodicaprio commented 3 years ago

Steps to Reproduce

Option 1:

  1. Create a project
  2. Build the iOS project targeting a simulator and/or real device
  3. Modify anything in the code
  4. Build again without using project rebuild or project clean functions

Option 2:

  1. Create a project
  2. Try to archive the project in order to send it for the Apple Store

Expected Behavior

In Option 1: being able to build the project without having to clear the project every time In Option 2: being able to archive the project

Actual Behavior

In Option 1: "codesign" exits with code 1 without completing the build In Option 2: "codesign" exits with code 1 after a successful build of all the projects part of the solution

Environment

Microsoft Visual Studio Professional 2019
Version 16.8.5
VisualStudio.16.Release/16.8.5+31005.135
Microsoft .NET Framework
Version 4.8.04084

Installed Version: Professional

ASP.NET and Web Tools 2019   16.8.559.8768
ASP.NET and Web Tools 2019

ASP.NET Core Razor Language Services   16.1.0.2052803+84e121f1403378489b842e1797df2f3f5a49ac3c
Provides languages services for ASP.NET Core Razor.

ASP.NET Web Frameworks and Tools 2019   16.8.559.8768
For additional information, visit https://www.asp.net/

Azure App Service Tools v3.0.0   16.8.559.8768
Azure App Service Tools v3.0.0

Azure Functions and Web Jobs Tools   16.8.559.8768
Azure Functions and Web Jobs Tools

C# Tools   3.8.0-5.20604.10+9ed4b774d20940880de8df1ca8b07508aa01c8cd
C# components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.

Common Azure Tools   1.10
Provides common services for use by Azure Mobile Services and Microsoft Azure Tools.

Extensibility Message Bus   1.2.6 (master@34d6af2)
Provides common messaging-based MEF services for loosely coupled Visual Studio extension components communication and integration.

IntelliCode Extension   1.0
IntelliCode Visual Studio Extension Detailed Info

JetBrains ReSharper 2020.2.4   Build 202.0.20200925.65451
JetBrains ReSharper package for Microsoft Visual Studio. For more information about ReSharper, visit http://www.jetbrains.com/resharper. Copyright Β© 2021 JetBrains, Inc.

Microsoft Azure Tools   2.9
Microsoft Azure Tools for Microsoft Visual Studio 2019 - v2.9.30924.1

Microsoft Continuous Delivery Tools for Visual Studio   0.4
Simplifying the configuration of Azure DevOps pipelines from within the Visual Studio IDE.

Microsoft JVM Debugger   1.0
Provides support for connecting the Visual Studio debugger to JDWP compatible Java Virtual Machines

Microsoft Library Manager   2.1.113+g422d40002e.RR
Install client-side libraries easily to any web project

Microsoft MI-Based Debugger   1.0
Provides support for connecting Visual Studio to MI compatible debuggers

Microsoft Visual Studio Tools for Containers   1.1
Develop, run, validate your ASP.NET Core applications in the target environment. F5 your application directly into a container with debugging, or CTRL + F5 to edit & refresh your app without having to rebuild the container.

Mono Debugging for Visual Studio   16.8.43 (00471f8)
Support for debugging Mono processes with Visual Studio.

NuGet Package Manager   5.8.1
NuGet Package Manager in Visual Studio. For more information about NuGet, visit https://docs.nuget.org/

ProjectServicesPackage Extension   1.0
ProjectServicesPackage Visual Studio Extension Detailed Info

SQL Server Data Tools   16.0.62102.01130
Microsoft SQL Server Data Tools

TypeScript Tools   16.0.21016.2001
TypeScript Tools for Microsoft Visual Studio

Visual Basic Tools   3.8.0-5.20604.10+9ed4b774d20940880de8df1ca8b07508aa01c8cd
Visual Basic components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.

Visual F# Tools   16.8.0-beta.20507.4+da6be68280c89131cdba2045525b80890401defd
Microsoft Visual F# Tools

Visual Studio Code Debug Adapter Host Package   1.0
Interop layer for hosting Visual Studio Code debug adapters in Visual Studio

Visual Studio Container Tools Extensions   1.0
View, manage, and diagnose containers within Visual Studio.

Visual Studio Tools for Containers   1.0
Visual Studio Tools for Containers

VisualStudio.DeviceLog   1.0
Information about my package

VisualStudio.Foo   1.0
Information about my package

VisualStudio.Mac   1.0
Mac Extension for Visual Studio

Xamarin   16.8.000.262 (d16-8@4d60f9c)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.

Xamarin Designer   16.8.0.507 (remotes/origin/d16-8@e87b24884)
Visual Studio extension to enable Xamarin Designer tools in Visual Studio.

Xamarin Templates   16.8.112 (86385a3)
Templates for building iOS, Android, and Windows apps with Xamarin and Xamarin.Forms.

Xamarin.Android SDK   11.1.0.26 (d16-8/a36ce73)
Xamarin.Android Reference Assemblies and MSBuild support.
    Mono: 5e9cb6d
    Java.Interop: xamarin/java.interop/d16-8@79d9533
    ProGuard: Guardsquare/proguard/proguard6.2.2@ebe9000
    SQLite: xamarin/sqlite/3.32.1@1a3276b
    Xamarin.Android Tools: xamarin/xamarin-android-tools/d16-8@2fb1cbc

Xamarin.iOS and Xamarin.Mac SDK   14.10.0.4 (5a05865f6)
Xamarin.iOS and Xamarin.Mac Reference Assemblies and MSBuild support.

Build Logs

Gist nor Pastebin are accepting a so long log (314k rows) BuildConsoleOutput_AllOK_codesign1.log (23MB) BuildConsoleOutput_AllOK_codesign1.zip (1.3MB)

Example Project (If Possible)

n/a - any project shows the problem

VS bug #1279080

rolfbjarne commented 3 years ago

It seems the build log you've provided is for a successful build, could you also provide a build log for the failing build, where codesign fails?

pietrodicaprio commented 3 years ago

It seems the build log you've provided is for a successful build, could you also provide a build log for the failing build, where codesign fails?

Dear @rolfbjarne , the above attached logs are from what I called "Option 2" and the error is shown in the error log section of the Archive Manager after the successful build: image

Please find here logs about:

Tried again with Gist but does not save the complete log BuildConsoleOutput_DoubleBuild_codesign1.log (21.1MB) BuildConsoleOutput_DoubleBuild_codesign1.zip (1.24MB) Full Gist: https://gist.githubusercontent.com/pietrodicaprio/23c1f05aa554be02f5a2e24b9121c12f/raw/d47b2f29930bc5b31de99104bfcdf8c01f8d4eca/BuildConsoleOutput_DoubleBuild_codesign1.log

Last part of it, maybe it's enough for you:

4>Output files: bin\iPhone\Release\device-builds\iphone12.1-14.3/SFEEDO.iOS.app\_CodeSignature\CodeResources
4>Set Property: _CodesignDisableTimestamp=False
4>Done building target "_CodesignAppBundle" in project "MobileHybrid.iOS.csproj".: (TargetId:757)
4>Target "_CreateLocalOutputBundle" skipped, due to false condition; ('$(IsLocalEnvironmentReady)' == 'true') was evaluated as ('' == 'true').
4>Target "_CodesignAppBundle" skipped. Previously built successfully.
4>Target "_CodesignVerify: (TargetId:758)" in file "C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets" from project "F:\Development\Non-Repo\BlazorTest\MobileHybrid\MobileHybrid.iOS\MobileHybrid.iOS.csproj" (target "CoreCodesign" depends on it):
4>Task "CodesignVerify" skipped, due to false condition; ('$(IsMacEnabled)' == 'true' And '@(_ResolvedAppExtensionReferences)' != '') was evaluated as ('True' == 'true' And '' != '').
4>Using "CodesignVerify" task from assembly "C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\Xamarin\iOS\Xamarin.iOS.Tasks.dll".
4>Task "CodesignVerify" (TaskId:451)
4>  Task Parameter:CodesignAllocate=\Applications\Xcode.app\Contents\Developer\Toolchains\XcodeDefault.xctoolchain\usr\bin\codesign_allocate (TaskId:451)
4>  Task Parameter:Resource=bin\iPhone\Release\device-builds\iphone12.1-14.3/SFEEDO.iOS.app (TaskId:451)
4>  Task Parameter:SessionId=b2849ea27c37a8799a76f8f22079b455464e23064edcc89404e52bf6eac1f3bd (TaskId:451)
4>  CodesignVerify: 2021-02-16T08:27:50.7898377+01:00 - Started (TaskId:451)
4>  CodesignVerify: 2021-02-16T08:27:50.7898377+01:00 - Initializing (TaskId:451)
4>  [xma]: Trying to get a Build Connection for Session 'b2849ea27c37a8799a76f8f22079b455464e23064edcc89404e52bf6eac1f3bd': Xamarin.VisualStudio.Build.BuildConnection.b2849ea27c37a8799a76f8f22079b455464e23064edcc89404e52bf6eac1f3bd, Lifetime: AppDomain (TaskId:451)
4>  CodesignVerify: 2021-02-16T08:27:50.8028371+01:00 - Initialized (TaskId:451)
4>  CodesignVerify: 2021-02-16T08:27:50.8028371+01:00 - There's no available inputs to copy to the Mac (TaskId:451)
4>  CodesignVerify: 2021-02-16T08:27:50.8028371+01:00 - Serializing intputs (TaskId:451)
4>  CodesignVerify: 2021-02-16T08:27:50.8058370+01:00 - Executing (TaskId:451)
4>  [xma]: Starting remote task execution for 'MobileHybrid.iOS': Xamarin.iOS.Tasks.CodesignVerify (TaskId:451)
4>  [xma]: Sending Request Xamarin.Messaging.Build.Contracts.ExecuteTaskMessage to topic xvs/build/execute-task/MobileHybrid.iOS/b2849ea002fCodesignVerify (TaskId:451)
========== Build: 3 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

image if I double click on the error VS shows me this peace of config: image

Maybe matters. maybe not, I forgot to mention that I'm using Mobile Blazor Bindings and I already succeded in creating a .ipa and loading it on Test Flight. The issue just started being there on any of my projects.

pietrodicaprio commented 3 years ago

Tried to change anything in the iOS project and then build without cleaning:

4>Done building target "_CalculateCodesignAppBundleInputs" in project "MobileHybrid.iOS.csproj".: (TargetId:755)
4>Target "_EmbedMobileProvision" skipped. Previously built successfully.
4>Target "_CodesignNativeLibraries" skipped. Previously built successfully.
4>Target "_CollectFrameworks" skipped. Previously built successfully.
4>Target "_CodesignFrameworks" skipped, due to false condition; ('$(_CanOutputAppBundle)' == 'true' And '@(_Frameworks)' != '') was evaluated as ('True' == 'true' And '' != '').
4>Target "_ReadAppExtensionCodesignProperties" skipped. Previously built successfully.
4>Target "_CodesignAppExtensions" skipped, due to false condition; ('$(_CanOutputAppBundle)' == 'true' And '@(_AppExtensionCodesignProperties)' != '') was evaluated as ('True' == 'true' And '' != '').
4>Target "_PrepareCodesignAppExtension" skipped, due to false condition; ('$(_CanOutputAppBundle)' == 'true' And '$(IsAppExtension)' == 'true' And '@(_ResolvedAppBundleExtensions)' == '') was evaluated as ('True' == 'true' And 'False' == 'true' And '' == '').
4>Target "_CalculateCodesignAppBundleInputs" skipped. Previously built successfully.
4>Target "_CodesignAppBundle: (TargetId:756)" in file "C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets" from project "F:\Development\Non-Repo\BlazorTest\MobileHybrid\MobileHybrid.iOS\MobileHybrid.iOS.csproj" (target "CoreCodesign" depends on it):
4>Skipping target "_CodesignAppBundle" because all output files are up-to-date with respect to the input files.
4>Input files: bin\iPhone\Release\device-builds\iphone12.1-14.3\SFEEDO.iOS.app\AppIcon60x60%402x.png;bin\iPhone\Release\device-builds\iphone12.1-14.3\SFEEDO.iOS.app\AppIcon76x76%402x~ipad.png;bin\iPhone\Release\device-builds\iphone12.1-14.3\SFEEDO.iOS.app\Assets.car;bin\iPhone\Release\device-builds\iphone12.1-14.3\SFEEDO.iOS.app\Info.plist;bin\iPhone\Release\device-builds\iphone12.1-14.3\SFEEDO.iOS.app\LaunchScreen.storyboardc\Info.plist;bin\iPhone\Release\device-builds\iphone12.1-14.3\SFEEDO.iOS.app\LaunchScreen.storyboardc\UIViewController-X5k-f2-b5h.nib;bin\iPhone\Release\device-builds\iphone12.1-14.3\SFEEDO.iOS.app\LaunchScreen.storyboardc\X5k-f2-b5h-view-yd7-JS-zBw.nib;bin\iPhone\Release\device-builds\iphone12.1-14.3\SFEEDO.iOS.app\SFEEDO.iOS;bin\iPhone\Release\device-builds\iphone12.1-14.3\SFEEDO.iOS.app\wwwroot\index.html;bin\iPhone\Release\device-builds\iphone12.1-14.3\SFEEDO.iOS.app\wwwroot\_content\MobileHybrid\assets\css\colors.css;bin\iPhone\Release\device-builds\iphone12.1-14.3\SFEEDO.iOS.app\wwwroot\_content\MobileHybrid\assets\css\extra.css;bin\iPhone\Release\device-builds\iphone12.1-14.3\SFEEDO.iOS.app\wwwroot\_content\MobileHybrid\assets\css\fonts.css;bin\iPhone\Release\device-builds\iphone12.1-14.3\SFEEDO.iOS.app\wwwroot\_content\MobileHybrid\assets\css\index.css;bin\iPhone\Release\device-builds\iphone12.1-14.3\SFEEDO.iOS.app\wwwroot\_content\MobileHybrid\assets\css\ios.css;bin\iPhone\Release\device-builds\iphone12.1-14.3\SFEEDO.iOS.app\wwwroot\_content\MobileHybrid\assets\css\reset.css;bin\iPhone\Release\device-builds\iphone12.1-14.3\SFEEDO.iOS.app\wwwroot\_content\MobileHybrid\assets\css\rules.css;bin\iPhone\Release\device-builds\iphone12.1-14.3\SFEEDO.iOS.app\wwwroot\_content\MobileHybrid\assets\css\style.css;bin\iPhone\Release\device-builds\iphone12.1-14.3\SFEEDO.iOS.app\wwwroot\_content\MobileHybrid\assets\images\app_icon.jpg;bin\iPhone\Release\device-builds\iphone12.1-14.3\SFEEDO.iOS.app\wwwroot\_content\MobileHybrid\assets\images\app_icon.png;bin\iPhone\Release\device-builds\iphone12.1-14.3\SFEEDO.iOS.app\wwwroot\_content\MobileHybrid\assets\images\app_splash.png;bin\iPhone\Release\device-builds\iphone12.1-14.3\SFEEDO.iOS.app\wwwroot\_content\MobileHybrid\assets\images\background\bg_1.jpg;bin\iPhone\Release\device-builds\iphone12.1-14.3\SFEEDO.iOS.app\wwwroot\_content\MobileHybrid\assets\images\background\bg_login copia.jpg;bin\iPhone\Release\device-builds\iphone12.1-14.3\SFEEDO.iOS.app\wwwroot\_content\MobileHybrid\assets\images\background\bg_login.jpg;bin\iPhone\Release\device-builds\iphone12.1-14.3\SFEEDO.iOS.app\wwwroot\_content\MobileHybrid\assets\images\background\bg_main copia.jpg;bin\iPhone\Release\device-builds\iphone12.1-14.3\SFEEDO.iOS.app\wwwroot\_content\MobileHybrid\assets\images\background\bg_main.jpg;bin\iPhone\Release\device-builds\iphone12.1-14.3\SFEEDO.iOS.app\wwwroot\_content\MobileHybrid\assets\images\background\border_radius_right_price.png;bin\iPhone\Release\device-builds\iphone12.1-14.3\SFEEDO.iOS.app\wwwroot\_content\MobileHybrid\assets\images\brand\logo-full.png;bin\iPhone\Release\device-builds\iphone12.1-14.3\SFEEDO.iOS.app\wwwroot\_content\MobileHybrid\assets\images\brand\logo.png;bin\iPhone\Release\device-builds\iphone12.1-14.3\SFEEDO.iOS.app\wwwroot\_content\MobileHybrid\assets\images\brand\sfeedo-brand-focused.png;bin\iPhone\Release\device-builds\iphone12.1-14.3\SFEEDO.iOS.app\wwwroot\_content\MobileHybrid\assets\images\brand\sfeedo-brand.png;bin\iPhone\Release\device-builds\iphone12.1-14.3\SFEEDO.iOS.app\wwwroot\_content\MobileHybrid\assets\images\brand\sfeedo-brand.svg;bin\iPhone\Release\device-builds\iphone12.1-14.3\SFEEDO.iOS.app\wwwroot\_content\MobileHybrid\assets\images\brand\sfeedo-partner.png;bin\iPhone\Release\device-builds\iphone12.1-14.3\SFEEDO.iOS.app\wwwroot\_content\MobileHybrid\assets\images\brand\sfeedo-player.png;bin\iPhone\Release\device-builds\iphone12.1-14.3\SFEEDO.iOS.app\wwwroot\_content\MobileHybrid\assets\images\icons\icona_vetrina_arancione.png;bin\iPhone\Release\device-builds\iphone12.1-14.3\SFEEDO.iOS.app\wwwroot\_content\MobileHybrid\assets\images\icons\icona_vetrina_azzurro.png;bin\iPhone\Release\device-builds\iphone12.1-14.3\SFEEDO.iOS.app\wwwroot\_content\MobileHybrid\assets\images\icons\icon_Events.png;bin\iPhone\Release\device-builds\iphone12.1-14.3\SFEEDO.iOS.app\wwwroot\_content\MobileHybrid\assets\images\icons\icon_Events_Active.png;bin\iPhone\Release\device-builds\iphone12.1-14.3\SFEEDO.iOS.app\wwwroot\_content\MobileHybrid\assets\images\icons\icon_Friends.png;bin\iPhone\Release\device-builds\iphone12.1-14.3\SFEEDO.iOS.app\wwwroot\_content\MobileHybrid\assets\images\icons\icon_Friends_Circle.png;bin\iPhone\Release\device-builds\iphone12.1-14.3\SFEEDO.iOS.app\wwwroot\_content\MobileHybrid\assets\images\icons\icon_Friends_CircleActive.png;bin\iPhone\Release\device-builds\iphone12.1-14.3\SFEEDO.iOS.app\wwwroot\_content\MobileHybrid\assets\images\icons\icon_Gen_Invalid.png;bin\iPhone\Release\device-builds\iphone12.1-14.3\SFEEDO.iOS.app\wwwroot\_content\MobileHybrid\assets\images\icons\icon_Gen_Valid.png;bin\iPhone\Release\device-builds\iphone12.1-14.3\SFEEDO.iOS.app\wwwroot\_content\MobileHybrid\assets\images\icons\icon_Gen_X.png;bin\iPhone\Release\device-builds\iphone12.1-14.3\SFEEDO.iOS.app\wwwroot\_content\MobileHybrid\assets\images\icons\icon_Gen_XActive.png;bin\iPhone\Release\device-builds\iphone12.1-14.3\SFEEDO.iOS.app\wwwroot\_content\MobileHybrid\assets\images\icons\icon_Home.png;bin\iPhone\Release\device-builds\iphone12.1-14.3\SFEEDO.iOS.app\wwwroot\_content\MobileHybrid\assets\images\icons\icon_Home_Active.png;bin\iPhone\Release\device-builds\iphone12.1-14.3\SFEEDO.iOS.app\wwwroot\_content\MobileHybrid\assets\images\icons\icon_LogBook.png;bin\iPhone\Release\device-builds\iphone12.1-14.3\SFEEDO.iOS.app\wwwroot\_content\MobileHybrid\assets\images\icons\icon_LogBook_Active.png;bin\iPhone\Release\device-builds\iphone12.1-14.3\SFEEDO.iOS.app\wwwroot\_content\MobileHybrid\assets\images\icons\icon_Menu.png;bin\iPhone\Release\device-builds\iphone12.1-14.3\SFEEDO.iOS.app\wwwroot\_content\MobileHybrid\assets\images\icons\icon_Menu_Plus_Circle.png;bin\iPhone\Release\device-builds\iphone12.1-14.3\SFEEDO.iOS.app\wwwroot\_content\MobileHybrid\assets\images\icons\icon_Minus_Circle.png;bin\iPhone\Release\device-builds\iphone12.1-14.3\SFEEDO.iOS.app\wwwroot\_content\MobileHybrid\assets\images\icons\icon_Partner.png;bin\iPhone\Release\device-builds\iphone12.1-14.3\SFEEDO.iOS.app\wwwroot\_content\MobileHybrid\assets\images\icons\icon_Partner_white.png;bin\iPhone\Release\device-builds\iphone12.1-14.3\SFEEDO.iOS.app\wwwroot\_content\MobileHybrid\assets\images\icons\icon_Partner_white.svg;bin\iPhone\Release\device-builds\iphone12.1-14.3\SFEEDO.iOS.app\wwwroot\_content\MobileHybrid\assets\images\icons\icon_Player.png;bin\iPhone\Release\device-builds\iphone12.1-14.3\SFEEDO.iOS.app\wwwroot\_content\MobileHybrid\assets\images\icons\icon_Player_white.png;bin\iPhone\Release\device-builds\iphone12.1-14.3\SFEEDO.iOS.app\wwwroot\_content\MobileHybrid\assets\images\icons\icon_Player_white.svg;bin\iPhone\Release\device-builds\iphone12.1-14.3\SFEEDO.iOS.app\wwwroot\_content\MobileHybrid\assets\images\icons\icon_Settings.png;bin\iPhone\Release\device-builds\iphone12.1-14.3\SFEEDO.iOS.app\wwwroot\_content\MobileHybrid\assets\images\icons\icon_Spark.png;bin\iPhone\Release\device-builds\iphone12.1-14.3\SFEEDO.iOS.app\wwwroot\_content\MobileHybrid\assets\images\icons\icon_Spark_Active.png;bin\iPhone\Release\device-builds\iphone12.1-14.3\SFEEDO.iOS.app\wwwroot\_content\MobileHybrid\assets\images\icons\icon_Status_Draw.png;bin\iPhone\Release\device-builds\iphone12.1-14.3\SFEEDO.iOS.app\wwwroot\_content\MobileHybrid\assets\images\icons\icon_Status_Invalid.png;bin\iPhone\Release\device-builds\iphone12.1-14.3\SFEEDO.iOS.app\wwwroot\_content\MobileHybrid\assets\images\icons\icon_Status_Loser.png;bin\iPhone\Release\device-builds\iphone12.1-14.3\SFEEDO.iOS.app\wwwroot\_content\MobileHybrid\assets\images\icons\icon_Status_WaitingAnswer.png;bin\iPhone\Release\device-builds\iphone12.1-14.3\SFEEDO.iOS.app\wwwroot\_content\MobileHybrid\assets\images\icons\icon_Status_WaitingResult.png;bin\iPhone\Release\device-builds\iphone12.1-14.3\SFEEDO.iOS.app\wwwroot\_content\MobileHybrid\assets\images\icons\icon_Status_WaitingSelection.png;bin\iPhone\Release\device-builds\iphone12.1-14.3\SFEEDO.iOS.app\wwwroot\_content\MobileHybrid\assets\images\icons\icon_Status_WaitingStart.png;bin\iPhone\Release\device-builds\iphone12.1-14.3\SFEEDO.iOS.app\wwwroot\_content\MobileHybrid\assets\images\icons\icon_Status_Winner.png;bin\iPhone\Release\device-builds\iphone12.1-14.3\SFEEDO.iOS.app\wwwroot\_content\MobileHybrid\assets\images\icons\status\wait.svg;bin\iPhone\Release\device-builds\iphone12.1-14.3\SFEEDO.iOS.app\wwwroot\_content\MobileHybrid\assets\images\icons\Zicon_Player.png;bin\iPhone\Release\device-builds\iphone12.1-14.3\SFEEDO.iOS.app\wwwroot\_content\MobileHybrid\assets\images\sample\beer.jpg;bin\iPhone\Release\device-builds\iphone12.1-14.3\SFEEDO.iOS.app\wwwroot\_content\MobileHybrid\assets\images\sample\burger.jpg;bin\iPhone\Release\device-builds\iphone12.1-14.3\SFEEDO.iOS.app\wwwroot\_content\MobileHybrid\assets\images\sample\local_sample.jpg;bin\iPhone\Release\device-builds\iphone12.1-14.3\SFEEDO.iOS.app\wwwroot\_content\MobileHybrid\assets\images\sample\logodo.png;bin\iPhone\Release\device-builds\iphone12.1-14.3\SFEEDO.iOS.app\wwwroot\_content\MobileHybrid\assets\images\sample\pub.jpg;bin\iPhone\Release\device-builds\iphone12.1-14.3\SFEEDO.iOS.app\wwwroot\_content\MobileHybrid\assets\images\sample\pub2.jpg;bin\iPhone\Release\device-builds\iphone12.1-14.3\SFEEDO.iOS.app\wwwroot\_content\MobileHybrid\assets\images\sample\qr.png;bin\iPhone\Release\device-builds\iphone12.1-14.3\SFEEDO.iOS.app\wwwroot\_content\MobileHybrid\assets\images\sample\salame-fiorettino.jpg;bin\iPhone\Release\device-builds\iphone12.1-14.3\SFEEDO.iOS.app\wwwroot\_content\MobileHybrid\assets\images\sample\user-1.jpg;bin\iPhone\Release\device-builds\iphone12.1-14.3\SFEEDO.iOS.app\wwwroot\_content\MobileHybrid\assets\images\sample\user-2.jpg;bin\iPhone\Release\device-builds\iphone12.1-14.3\SFEEDO.iOS.app\wwwroot\_content\MobileHybrid\assets\images\sample\user-3.jpg;bin\iPhone\Release\device-builds\iphone12.1-14.3\SFEEDO.iOS.app\wwwroot\_content\MobileHybrid\assets\images\sample\user-4.jpg;bin\iPhone\Release\device-builds\iphone12.1-14.3\SFEEDO.iOS.app\wwwroot\_content\MobileHybrid\assets\images\sample\user-5.jpg;bin\iPhone\Release\device-builds\iphone12.1-14.3\SFEEDO.iOS.app\wwwroot\_content\MobileHybrid\assets\images\sample\user-6.jpg;bin\iPhone\Release\device-builds\iphone12.1-14.3\SFEEDO.iOS.app\wwwroot\_content\MobileHybrid\assets\images\sample\user-7.jpg;bin\iPhone\Release\device-builds\iphone12.1-14.3\SFEEDO.iOS.app\wwwroot\_content\MobileHybrid\css\app.css;bin\iPhone\Release\device-builds\iphone12.1-14.3\SFEEDO.iOS.app\wwwroot\_content\MobileHybrid\css\bootstrap\bootstrap.min.css;bin\iPhone\Release\device-builds\iphone12.1-14.3\SFEEDO.iOS.app\wwwroot\_content\MobileHybrid\css\bootstrap\bootstrap.min.css.map;bin\iPhone\Release\device-builds\iphone12.1-14.3\SFEEDO.iOS.app\wwwroot\_content\MobileHybrid\css\open-iconic\FONT-LICENSE;bin\iPhone\Release\device-builds\iphone12.1-14.3\SFEEDO.iOS.app\wwwroot\_content\MobileHybrid\css\open-iconic\font\css\open-iconic-bootstrap.min.css;bin\iPhone\Release\device-builds\iphone12.1-14.3\SFEEDO.iOS.app\wwwroot\_content\MobileHybrid\css\open-iconic\font\fonts\open-iconic.eot;bin\iPhone\Release\device-builds\iphone12.1-14.3\SFEEDO.iOS.app\wwwroot\_content\MobileHybrid\css\open-iconic\font\fonts\open-iconic.otf;bin\iPhone\Release\device-builds\iphone12.1-14.3\SFEEDO.iOS.app\wwwroot\_content\MobileHybrid\css\open-iconic\font\fonts\open-iconic.svg;bin\iPhone\Release\device-builds\iphone12.1-14.3\SFEEDO.iOS.app\wwwroot\_content\MobileHybrid\css\open-iconic\font\fonts\open-iconic.ttf;bin\iPhone\Release\device-builds\iphone12.1-14.3\SFEEDO.iOS.app\wwwroot\_content\MobileHybrid\css\open-iconic\font\fonts\open-iconic.woff;bin\iPhone\Release\device-builds\iphone12.1-14.3\SFEEDO.iOS.app\wwwroot\_content\MobileHybrid\css\open-iconic\ICON-LICENSE;bin\iPhone\Release\device-builds\iphone12.1-14.3\SFEEDO.iOS.app\wwwroot\_content\MobileHybrid\css\open-iconic\README.md;bin\iPhone\Release\device-builds\iphone12.1-14.3\SFEEDO.iOS.app\wwwroot\_content\MobileHybrid\favicon.ico;bin\iPhone\Release\device-builds\iphone12.1-14.3\SFEEDO.iOS.app\wwwroot\_content\MobileHybrid\weather.json
4>Output files: bin\iPhone\Release\device-builds\iphone12.1-14.3/SFEEDO.iOS.app\_CodeSignature\CodeResources
4>Set Property: _CodesignDisableTimestamp=False
4>Done building target "_CodesignAppBundle" in project "MobileHybrid.iOS.csproj".: (TargetId:756)
4>Target "_CreateLocalOutputBundle" skipped, due to false condition; ('$(IsLocalEnvironmentReady)' == 'true') was evaluated as ('' == 'true').
4>Target "_CodesignAppBundle" skipped. Previously built successfully.
4>Target "_CodesignVerify: (TargetId:757)" in file "C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets" from project "F:\Development\Non-Repo\BlazorTest\MobileHybrid\MobileHybrid.iOS\MobileHybrid.iOS.csproj" (target "CoreCodesign" depends on it):
4>Task "CodesignVerify" skipped, due to false condition; ('$(IsMacEnabled)' == 'true' And '@(_ResolvedAppExtensionReferences)' != '') was evaluated as ('True' == 'true' And '' != '').
4>Using "CodesignVerify" task from assembly "C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\Xamarin\iOS\Xamarin.iOS.Tasks.dll".
4>Task "CodesignVerify" (TaskId:436)
4>  Task Parameter:CodesignAllocate=\Applications\Xcode.app\Contents\Developer\Toolchains\XcodeDefault.xctoolchain\usr\bin\codesign_allocate (TaskId:436)
4>  Task Parameter:Resource=bin\iPhone\Release\device-builds\iphone12.1-14.3/SFEEDO.iOS.app (TaskId:436)
4>  Task Parameter:SessionId=b2849ea27c37a8799a76f8f22079b455464e23064edcc89404e52bf6eac1f3bd (TaskId:436)
4>  CodesignVerify: 2021-02-16T08:56:47.3440444+01:00 - Started (TaskId:436)
4>  CodesignVerify: 2021-02-16T08:56:47.3440444+01:00 - Initializing (TaskId:436)
4>  [xma]: Trying to get a Build Connection for Session 'b2849ea27c37a8799a76f8f22079b455464e23064edcc89404e52bf6eac1f3bd': Xamarin.VisualStudio.Build.BuildConnection.b2849ea27c37a8799a76f8f22079b455464e23064edcc89404e52bf6eac1f3bd, Lifetime: AppDomain (TaskId:436)
4>  CodesignVerify: 2021-02-16T08:56:47.3560428+01:00 - Initialized (TaskId:436)
4>  CodesignVerify: 2021-02-16T08:56:47.3560428+01:00 - There's no available inputs to copy to the Mac (TaskId:436)
4>  CodesignVerify: 2021-02-16T08:56:47.3560428+01:00 - Serializing intputs (TaskId:436)
4>  CodesignVerify: 2021-02-16T08:56:47.3600431+01:00 - Executing (TaskId:436)
4>  [xma]: Starting remote task execution for 'MobileHybrid.iOS': Xamarin.iOS.Tasks.CodesignVerify (TaskId:436)
4>  [xma]: Sending Request Xamarin.Messaging.Build.Contracts.ExecuteTaskMessage to topic xvs/build/execute-task/MobileHybrid.iOS/b2849ea002fCodesignVerify (TaskId:436)
4>  [xma]: Received Response of Xamarin.Messaging.Build.Contracts.ExecuteTaskMessage to topic buildb2849ea27c37a8799a76f8f22079b455464e23064edcc89404e52bf6eac1f3bd35604Pietr/+/xvs/build/execute-task/MobileHybrid.iOS/b2849ea002fCodesignVerify (TaskId:436)
4>  CodesignVerify: 2021-02-16T08:56:47.6069565+01:00 - Logging messages (TaskId:436)
4>  Environment Variables passed to tool: (TaskId:436)
4>    CODESIGN_ALLOCATE=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/codesign_allocate (TaskId:436)
4>  /usr/bin/codesign --verify -vvvv "-R=anchor apple generic and certificate 1[field.1.2.840.113635.100.6.2.1] exists and (certificate leaf[field.1.2.840.113635.100.6.1.2] exists or certificate leaf[field.1.2.840.113635.100.6.1.4] exists)" bin/iPhone/Release/device-builds/iphone12.1-14.3/SFEEDO.iOS.app  (TaskId:436)
4>  bin/iPhone/Release/device-builds/iphone12.1-14.3/SFEEDO.iOS.app: code object is not signed at all (TaskId:436)
4>  In architecture: arm64 (TaskId:436)
4>C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets(1912,3): error MSB6006: "codesign" exited with code 1.
4>  CodesignVerify: 2021-02-16T08:56:47.6069565+01:00 - Finished (TaskId:436)
4>Done executing task "CodesignVerify" -- FAILED. (TaskId:436)
4>Done building target "_CodesignVerify" in project "MobileHybrid.iOS.csproj" -- FAILED.: (TargetId:757)
4>
4>Project Performance Summary:
4>       13 ms  F:\Development\Repos\MobileBlazorBindings\src\Microsoft.MobileBlazorBindings.Core\Microsoft.MobileBlazorBindings.Core.csproj   4 calls
4>                  0 ms  GetTargetFrameworks                        2 calls
4>                 13 ms  GetCopyToOutputDirectoryItems              2 calls
4>       17 ms  F:\Development\Repos\MobileBlazorBindings\src\Microsoft.MobileBlazorBindings.WebView.JS\Microsoft.MobileBlazorBindings.WebView.JS.csproj   2 calls
4>                  1 ms  GetTargetFrameworks                        1 calls
4>                 16 ms  GetCopyToOutputDirectoryItems              1 calls
4>      239 ms  F:\Development\Repos\MobileBlazorBindings\src\Microsoft.MobileBlazorBindings\Microsoft.MobileBlazorBindings.csproj   2 calls
========== Build: 3 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

there is more detail than previous log about codesign command

rolfbjarne commented 3 years ago

OK, this seems specific to Windows, so I've assigned it to the corresponding team.

sencagri commented 2 years ago

Is there any solution to this. I tried everything but nothing works. Cannot build ios app.

visma-tomi-tavela commented 2 years ago

Xcode 13.2 / 13.2.1 Building Xamarin.Forms project with VS for Mac works.

Building same Xamarin.Forms project from Windows (Visual Studio 2022) using Mac as remote build host, getting error:

Error Couldn't codesign bin/iPhoneSimulator/Debug/XXX/Frameworks/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator15.2.sdk/../../../../../Toolchains/XcodeDefault.xctoolchain/usr/lib/swift-5.0/iphonesimulator/libswiftCore.dylib: codesign failed with exit code 1

When downgrading Xcode to 13.1, both builds work as expected.

quentinR0bert commented 2 years ago

Any news about this ? For development case it's okay because it's work when execute a new build, but we can't do this on a CI. We must stay at Xcode 13.1 and old Xamarin.iOS version on our CI.