12

当我尝试签署 nwjs 框架时,我遇到了这个问题

codesign -f -v --deep -s '3rd Party Mac Developer Application: Company Name. (XXXXXXXXX)' --entitlements Child.plist hello.app/Contents/Versions/59.0.3071.115/nwjs\ Framework.framework

谁能建议我该怎么做

4

3 回答 3

2

我试过这个:

除了下面提到的应用程序文件之外,不要更改任何其他info.plist并且错误消失了。

  • 助手.app
  • app_mode_loader.app
  • nwjs.app [主应用程序]

同样在签署框架之前

codesign -f -v --deep -s '3rd Party Mac Developer Application: Company Name. (XXXXXXXXX)' --entitlements Child.plist hello.app/Contents/Versions/59.0.3071.115/nwjs\ Framework.framework/Versions/A/nwjs\ Framework

然后

codesign -f -v --deep -s '3rd Party Mac Developer Application: Company Name. (XXXXXXXXX)' --entitlements Child.plist hello.app/Contents/Versions/59.0.3071.115/nwjs\ Framework.framework
于 2017-08-23T08:55:41.320 回答
1

我在尝试签署我的 nwjs 应用程序时遇到了同样的问题,我收到了这条消息:

“Contents/Versions/67.0.3396.87/nwjs Framework.framework:嵌入式框架的根目录中存在未密封的内容”

我通过执行以下步骤解决了这个问题:

  1. 将 Versions/67.0.3396.87/nwjsFramework.framework/ libnode.dylib 移动到位于 Versions/67.0.3396.87/nwjsFramework.framework/Versions/ A/libnode.dylib的 A 文件夹中。
  2. 返回命令行到 Versions/67.0.3396.87/nwjsFramework.framework。
  3. 输入ln -s Versions/A/libnode.dylib
  4. 在此之后再次尝试签名。

从我读到的嵌入式框架文件夹中的一些文件应该位于文件夹内,以便能够对代码进行签名。所以上面的步骤将文件移动到所需的文件夹,然后第 3 步为我们移动的文件创建一个符号链接文件夹。

这对我有用,希望它能帮助您解决问题或阅读本文的人。

于 2018-06-28T18:25:58.670 回答
0

我制作了一个小脚本,应该可以帮助你。该文件夹60.0.3112.113因版本而异。

xattr删除不允许的内容很重要还请注意可执行文件的名称

app="yourapp.app"
identity="Developer ID Application: Yourname...."

echo "### removing unnecessary files"
rm -f "$app/Icon^M" #remove if exists
rm -r -f "$app/.idea" #remove if exists
xattr -cr "$app" #remove all unallowed files

echo "### signing libraries"
#codesign --force --verify --sign "$identity" "$app/Contents/Versions/60.0.3112.113/nwjs Framework.framework/Libraries/exif.so"
#codesign --force --verify --sign "$identity" "$app/Contents/Versions/60.0.3112.113/nwjs Framework.framework/libffmpeg.dylib"
codesign --force --verify --sign "$identity" "$app/Contents/Versions/60.0.3112.113/nwjs Framework.framework/libnode.dylib"

echo "### signing frameworks"
codesign --force --verify --sign "$identity" "$app/Contents/Versions/60.0.3112.113/nwjs Framework.framework/nwjs Framework"
codesign --force --verify --sign "$identity" "$app/Contents/Versions/60.0.3112.113/nwjs Framework.framework/Helpers/crashpad_handler"
codesign --force --verify --sign "$identity" "$app/Contents/Versions/60.0.3112.113/timeBro Helper.app/Contents/MacOS/timeBro Helper"
codesign --force --verify --sign "$identity" "$app/Contents/Versions/60.0.3112.113/timeBro Helper.app/"
codesign --force --verify --sign "$identity" "$app/Contents/Versions/60.0.3112.113/nwjs Framework.framework/helpers/crashpad_handler"

echo "### sing osx folder"
codesign --force --verify --sign "$identity"  "$app/Contents/MacOS/yourapp" #be careful here should be the exact name of your executably

echo "### signing app"
codesign --force --verify --sign "$identity" "$app"

echo "### verifying signature"
codesign -vv -d "$app"
于 2017-10-18T15:54:43.340 回答