digital signature - How to notarize a C# dynamic library (.dylib) in MacOS? - Stack Overflow

I built a C# dynamic library that I plan to use as part of another application in MacOS. I was able sig

I built a C# dynamic library that I plan to use as part of another application in MacOS. I was able sign the library, but notarization always fails. Below are the commands I use and their respective output. I appreciate all the help I can get.

1- Listing available Identities:

security find-identity -p codesigning -v

  • Output:
1) XXXXXXXXXXXXXXXXXX "Developer ID Application: MyName (MyTeamID)"

2- Verifying file format:

file $DestinationPath/CoreDLL.dylib

  • Output:
PathToFile/FileName.dylib: PE32+ executable (DLL) (console) Aarch64 Mono/.Net assembly, for MS Windows

3- Signing the Library:

codesign --force --timestamp --verbose --options runtime --entitlements $EntitlementsPath --sign "Developer ID Application: MyName (MyTeamsID)" "$AppPath/$CoreDLL.dylib"

  • Output:

    PathToDLL/CoreDLL.dylib: signed generic [CoreDLL]

4- Verifying the signature

codesign --verify --verbose "PathToDLL/CoreDLL.dylib"

  • Output

    PathToDLL/CoreDLL.dylib: valid on disk

    PathToDLL/CoreDLL.dylib: satisfies its Designated Requirement

5- Notarizing the library

zip -r CoreDLL.zip CoreDLL.dylib

xcrun notarytool submit "CoreDLL.zip" --apple-id "MyEmail" --password "MyPassword" --team-id "MyTeamID" --wait

  • Output:
{
  "logFormatVersion": 1,
  "jobId": "0ccb587f-17aa-4971-b0ee-b16d00e3c1ef",
  "status": "Invalid",
  "statusSummary": "Archive contains critical validation errors",
  "statusCode": 4000,
  "archiveFilename": "CoreDLL.zip",
  "uploadDate": "2025-03-14T02:08:53.500Z",
  "sha256": "44fddf1ca0ec388ce8536ae55e6b038392d35aa713d4509c97b7295f38dba8e1",
  "ticketContents": null,
  "issues": [
    {
      "severity": "error",
      "code": null,
      "path": "CoreDLL.zip",
      "message": "Package CoreDLL.zip has no signed executables or bundles. No tickets can be generated.",
      "docUrl": null,
      "architecture": null
    },
    {
      "severity": "warning",
      "code": null,
      "path": "CoreDLL.zip/CoreDLL.dmg",
      "message": "The contents of the package at CoreDLL.zip/CoreDLL.dmg could not be extracted.",
      "docUrl": null,
      "architecture": null
    }
  ]
}

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744675730a4587314.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信