故事是这样的,我在用一个开源软件DevToys,使用过程中发现一个 Bug ,然后开发者已经消失大半年了,所以打算自己修改。但是作为 0 基础 Mac 开发小白,虽然找到了有问题的代码段,但是我运行的时候报错了,搜了一圈似乎不太像是缺少库,好像是去签名问题。(我自然没什么签名了)
我把要签名的地方都选成了 Sign to Run Locally 。。。但还是报错,这下不知道要怎么处理了。Sparkle 这个看起来像是弄 mac 软件更新的。我看 Package Dependencies 里面又有她 Sparkle 2.1.0,迷茫了,老铁们求助
dyld[21502]: Library not loaded: @rpath/Sparkle.framework/Versions/B/Sparkle
Referenced from: <F062C5E2-9437-36C7-94AF-91A87E2F8850> /Users/haseochen/Library/Developer/Xcode/DerivedData/DevToys-btgymifvomgazifyksowkrjsikxu/Build/Products/Debug/DevToys.app/Contents/MacOS/DevToys
Reason: tried: '/Users/haseochen/Library/Developer/Xcode/DerivedData/DevToys-btgymifvomgazifyksowkrjsikxu/Build/Products/Debug/Sparkle.framework/Versions/B/Sparkle' (code signature in <E31C20B8-205C-398E-97D3-833E34BFD904> '/Users/haseochen/Library/Developer/Xcode/DerivedData/DevToys-btgymifvomgazifyksowkrjsikxu/Build/Products/Debug/Sparkle.framework/Versions/B/Sparkle' not valid for use in process: mapped file has no Team ID and is not a platform binary (signed with custom identity or adhoc?)), '/Users/haseochen/Library/Developer/Xcode/DerivedData/DevToys-btgymifvomgazifyksowkrjsikxu/Build/Products/Debug/PackageFrameworks/Sparkle.framework/Versions/B/Sparkle' (no such file), '/usr/lib/swift/Sparkle.framework/Versions/B/Sparkle' (no such file, not in dyld cache), '/System/Volumes/Preboot/Cryptexes/OS/usr/lib/swift/Sparkle.framework/Versions/B/Sparkle' (no such file), '/Users/haseochen/Library/Developer/Xcode/DerivedData/DevToys-btgymifvomgazifyksowkrjsikxu/Build/Products/Debug/DevToys.app/Contents/Frameworks/Sparkle.framework/Versions/B/Sparkle' (code signature in <E31C20B8-205C-398E-97D3-833E34BFD904> '/Users/haseochen/Library/Developer/Xcode/DerivedData/DevToys-btgymifvomgazifyksowkrjsikxu/Build/Products/Debug/DevToys.app/Contents/Frameworks/Sparkle.framework/Versions/B/Sparkle' not valid for use in process: mapped file has no Team ID and is not a platform binary (signed with custom identity or adhoc?)), '/Users/haseochen/Library/Developer/Xcode/DerivedData/DevToys-btgymifvomgazifyksowkrjsikxu/Build/Products/Debug/PackageFrameworks/Sparkle.framework/Versions/B/Sparkle' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/haseochen/Library/Developer/Xcode/DerivedData/DevToys-btgymifvomgazifyksowkrjsikxu/Build/Products/Debug/PackageFrameworks/Sparkle.framework/Versions/B/Sparkle' (no such file), '/Users/haseochen/Library/Developer/Xcode/DerivedData/DevToys-btgymifvomgazifyksowkrjsikxu/Build/Products/Debug/PackageFrameworks/Sparkle.framework/Versions/B/Sparkle' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/haseochen/Library/Developer/Xcode/DerivedData/DevToys-btgymifvomgazifyksowkrjsikxu/Build/Products/Debug/PackageFrameworks/Sparkle.framework/Versions/B/Sparkle' (no such file), '/Users/haseochen/Library/Developer/Xcode/DerivedData/DevToys-btgymifvomgazifyksowkrjsikxu/Build/Products/Debug/PackageFrameworks/Sparkle.framework/Versions/B/Sparkle' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/haseochen/Library/Developer/Xcode/DerivedData/DevToys-btgymifvomgazifyksowkrjsikxu/Build/Products/Debug/PackageFrameworks/Sparkle.framework/Versions/B/Sparkle' (no such file), '/Users/haseochen/Library/Developer/Xcode/DerivedData/DevToys-btgymifvomgazifyksowkrjsikxu/Build/Products/Debug/PackageFrameworks/Sparkle.framework/Versions/B/Sparkle' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/haseochen/Library/Developer/Xcode/DerivedData/DevToys-btgymifvomgazifyksowkrjsikxu/Build/Products/Debug/PackageFrameworks/Sparkle.framework/Versions/B/Sparkle' (no such file), '/Users/haseochen/Library/Developer/Xcode/DerivedData/DevToys-btgymifvomgazifyksowkrjsikxu/Build/Products/Debug/PackageFrameworks/Sparkle.framework/Versions/B/Sparkle' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/haseochen/Library/Developer/Xcode/DerivedData/DevToys-btgymifvomgazifyksowkrjsikxu/Build/Products/Debug/PackageFrameworks/Sparkle.framework/Versions/B/Sparkle' (no such file), '/Users/haseochen/Library/Developer/Xcode/DerivedData/DevToys-btgymifvomgazifyksowkrjsikxu/Build/Products/Debug/PackageFrameworks/Sparkle.framework/Versions/B/Sparkle' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/haseochen/Library/Developer/Xcode/DerivedData/DevToys-btgymifvomgazifyksowkrjsikxu/Build/Products/Debug/PackageFrameworks/Sparkle.framework/Versions/B/Sparkle' (no such file), '/Users/haseochen/Library/Developer/Xcode/DerivedData/DevToys-btgymifvomgazifyksowkrjsikxu/Build/Products/Debug/PackageFrameworks/Sparkle.framework/Versions/B/Sparkle' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/haseochen/Library/Developer/Xcode/DerivedData/DevToys-btgymifvomgazifyksowkrjsikxu/Build/Products/Debug/PackageFrameworks/Sparkle.framework/Versions/B/Sparkle' (no such file), '/Users/haseochen/Library/Developer/Xcode/DerivedData/DevToys-btgymifvomgazifyksowkrjsikxu/Build/Products/Debug/PackageFrameworks/Sparkle.framework/Versions/B/Sparkle' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/haseochen/Library/Developer/Xcode/DerivedData/DevToys-btgymifvomgazifyksowkrjsikxu/Build/Products/Debug/PackageFrameworks/Sparkle.framework/Versions/B/Sparkle' (no such file), '/Users/haseochen/Library/Developer/Xcode/DerivedData/DevToys-btgymifvomgazifyksowkrjsikxu/Build/Products/Debug/PackageFrameworks/Sparkle.framework/Versions/B/Sparkle' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/haseochen/Library/Developer/Xcode/DerivedData/DevToys-btgymifvomgazifyksowkrjsikxu/Build/Products/Debug/PackageFrameworks/Sparkle.framework/Versions/B/Sparkle' (no such file), '/Users/haseochen/Library/Developer/Xcode/DerivedData/DevToys-btgymifvomgazifyksowkrjsikxu/Build/Products/Debug/PackageFrameworks/Sparkle.framework/Versions/B/Sparkle' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/haseochen/Library/Developer/Xcode/DerivedData/DevToys-btgymifvomgazifyksowkrjsikxu/Build/Products/Debug/PackageFrameworks/Sparkle.framework/Versions/B/Sparkle' (no such file), '/Users/haseochen/Library/Developer/Xcode/DerivedData/DevToys-btgymifvomgazifyksowkrjsikxu/Build/Products/Debug/PackageFrameworks/Sparkle.framework/Versions/B/Sparkle' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/haseochen/Library/Developer/Xcode/DerivedData/DevToys-btgymifvomgazifyksowkrjsikxu/Build/Products/Debug/PackageFrameworks/Sparkle.framework/Versions/B/Sparkle' (no such file), '/Users/haseochen/Library/Developer/Xcode/DerivedData/DevToys-btgymifvomgazifyksowkrjsikxu/Build/Products/Debug/PackageFrameworks/Sparkle.framework/Versions/B/Sparkle' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/haseochen/Library/Developer/Xcode/DerivedData/DevToys-btgymifvomgazifyksowkrjsikxu/Build/Products/Debug/PackageFrameworks/Sparkle.framework/Versions/B/Sparkle' (no such file), '/Users/haseochen/Library/Developer/Xcode/DerivedData/DevToys-btgymifvomgazifyksowkrjsikxu/Build/Products/Debug/PackageFrameworks/Sparkle.framework/Versions/B/Sparkle' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/haseochen/Library/Developer/Xcode/DerivedData/DevToys-btgymifvomgazifyksowkrjsikxu/Build/Products/Debug/PackageFrameworks/Sparkle.framework/Versions/B/Sparkle' (no such file), '/Users/haseochen/Library/Developer/Xcode/DerivedData/DevToys-btgymifvomgazifyksowkrjsikxu/Build/Products/Debug/PackageFrameworks/Sparkle.framework/Versions/B/Sparkle' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/haseochen/Library/Developer/Xcode/DerivedData/DevToys-btgymifvomgazifyksowkrjsikxu/Build/Products/Debug/PackageFrameworks/Sparkle.framework/Versions/B/Sparkle' (no such file), '/usr/lib/swift/Sparkle.framework/Versions/B/Sparkle' (no such file, not in dyld cache), '/System/Volumes/Preboot/Cryptexes/OS/usr/lib/swift/Sparkle.framework/Versions/B/Sparkle' (no such file), '/Users/haseochen/Library/Developer/Xcode/DerivedData/DevToys-btgymifvomgazifyksowkrjsikxu/Build/Products/Debug/DevToys.app/Contents/Frameworks/Sparkle.framework/Versions/B/Sparkle' (code signature in <E31C20B8-205C-398E-97D3-833E34BFD904> '/Users/haseochen/Library/Developer/Xcode/DerivedData/DevToys-btgymifvomgazifyksowkrjsikxu/Build/Products/Debug/DevToys.app/Contents/Frameworks/Sparkle.framework/Versions/B/Sparkle' not valid for use in process: mapped file has no Team ID and is not a platform binary (signed with custom identity or adhoc?)), '/Users/haseochen/Library/Developer/Xcode/DerivedData/DevToys-btgymifvomgazifyksowkrjsikxu/Build/Products/Debug/PackageFrameworks/Sparkle.framework/Versions/B/Sparkle' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/haseochen/Library/Developer/Xcode/DerivedData/DevToys-btgymifvomgazifyksowkrjsikxu/Build/Products/Debug/PackageFrameworks/Sparkle.framework/Versions/B/Sparkle' (no such file), '/Users/haseochen/Library/Developer/Xcode/DerivedData/DevToys-btgymifvomgazifyksowkrjsikxu/Build/Products/Debug/PackageFrameworks/Sparkle.framework/Versions/B/Sparkle' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/haseochen/Library/Developer/Xcode/DerivedData/DevToys-btgymifvomgazifyksowkrjsikxu/Build/Products/Debug/PackageFrameworks/Sparkle.framework/Versions/B/Sparkle' (no such file), '/Users/haseochen/Library/Developer/Xcode/DerivedData/DevToys-btgymifvomgazifyksowkrjsikxu/Build/Products/Debug/PackageFrameworks/Sparkle.framework/Versions/B/Sparkle' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/haseochen/Library/Developer/Xcode/DerivedData/DevToys-btgymifvomgazifyksowkrjsikxu/Build/Products/Debug/PackageFrameworks/Sparkle.framework/Versions/B/Sparkle' (no such file), '/Users/haseochen/Library/Developer/Xcode/DerivedData/DevToys-btgymifvomgazifyksowkrjsikxu/Build/Products/Debug/PackageFrameworks/Sparkle.framework/Versions/B/Sparkle' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/haseochen/Library/Developer/Xcode/DerivedData/DevToys-btgymifvomgazifyksowkrjsikxu/Build/Products/Debug/PackageFrameworks/Sparkle.framework/Versions/B/Sparkle' (no such file), '/Users/haseochen/Library/Developer/Xcode/DerivedData/DevToys-btgymifvomgazifyksowkrjsikxu/Build/Products/Debug/PackageFrameworks/Sparkle.framework/Versions/B/Sparkle' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/haseochen/Library/Developer/Xcode/DerivedData/DevToys-btgymifvomgazifyksowkrjsikxu/Build/Products/Debug/PackageFrameworks/Sparkle.framework/Versions/B/Sparkle' (no such file), '/Users/haseochen/Library/Developer/Xcode/DerivedData/DevToys-btgymifvomgazifyksowkrjsikxu/Build/Products/Debug/PackageFrameworks/Sparkle.framework/Versions/B/Sparkle' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/haseochen/Library/Developer/Xcode/DerivedData/DevToys-btgymifvomgazifyksowkrjsikxu/Build/Products/Debug/PackageFrameworks/Sparkle.framework/Versions/B/Sparkle' (no such file), '/Users/haseochen/Library/Developer/Xcode/DerivedData/DevToys-btgymifvomgazifyksowkrjsikxu/Build/Products/Debug/PackageFrameworks/Sparkle.framework/Versions/B/Sparkle' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/haseochen/Library/Developer/Xcode/DerivedData/DevToys-btgymifvomgazifyksowkrjsikxu/Build/Products/Debug/PackageFrameworks/Sparkle.framework/Versions/B/Sparkle' (no such file), '/Users/haseochen/Library/Developer/Xcode/DerivedData/DevToys-btgymifvomgazifyksowkrjsikxu/Build/Products/Debug/PackageFrameworks/Sparkle.framework/Versions/B/Sparkle' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/haseochen/Library/Developer/Xcode/DerivedData/DevToys-btgymifvomgazifyksowkrjsikxu/Build/Products/Debug/PackageFrameworks/Sparkle.framework/Versions/B/Sparkle' (no such file), '/Users/haseochen/Library/Developer/Xcode/DerivedData/DevToys-btgymifvomgazifyksowkrjsikxu/Build/Products/Debug/PackageFrameworks/Sparkle.framework/Versions/B/Sparkle' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/haseochen/Library/Developer/Xcode/DerivedData/DevToys-btgymifvomgazifyksowkrjsikxu/Build/Products/Debug/PackageFrameworks/Sparkle.framework/Versions/B/Sparkle' (no such file), '/Users/haseochen/Library/Developer/Xcode/DerivedData/DevToys-btgymifvomgazifyksowkrjsikxu/Build/Products/Debug/PackageFrameworks/Sparkle.framework/Versions/B/Sparkle' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/haseochen/Library/Developer/Xcode/DerivedData/DevToys-btgymifvomgazifyksowkrjsikxu/Build/Products/Debug/PackageFrameworks/Sparkle.framework/Versions/B/Sparkle' (no such file), '/Users/haseochen/Library/Developer/Xcode/DerivedData/DevToys-btgymifvomgazifyksowkrjsikxu/Build/Products/Debug/PackageFrameworks/Sparkle.framework/Versions/B/Sparkle' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/haseochen/Library/Developer/Xcode/DerivedData/DevToys-btgymifvomgazifyksowkrjsikxu/Build/Products/Debug/PackageFrameworks/Sparkle.framework/Versions/B/Sparkle' (no such file), '/Users/haseochen/Library/Developer/Xcode/DerivedData/DevToys-btgymifvomgazifyksowkrjsikxu/Build/Products/Debug/PackageFrameworks/Sparkle.framework/Versions/B/Sparkle' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/haseochen/Library/Developer/Xcode/DerivedData/DevToys-btgymifvomgazifyksowkrjsikxu/Build/Products/Debug/PackageFrameworks/Sparkle.framework/Versions/B/Sparkle' (no such file), '/Users/haseochen/Library/Developer/Xcode/DerivedData/DevToys-btgymifvomgazifyksowkrjsikxu/Build/Products/Debug/PackageFrameworks/Sparkle.framework/Versions/B/Sparkle' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/haseochen/Library/Developer/Xcode/DerivedData/DevToys-btgymifvomgazifyksowkrjsikxu/Build/Products/Debug/PackageFrameworks/Sparkle.framework/Versions/B/Sparkle' (no such file), '/Users/haseochen/Library/Developer/Xcode/DerivedData/DevToys-btgymifvomgazifyksowkrjsikxu/Build/Products/Debug/PackageFrameworks/Sparkle.framework/Versions/B/Sparkle' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/haseochen/Library/Developer/Xcode/DerivedData/DevToys-btgymifvomgazifyksowkrjsikxu/Build/Products/Debug/PackageFrameworks/Sparkle.framework/Versions/B/Sparkle' (no such file), '/Library/Frameworks/Sparkle.framework/Versions/B/Sparkle' (no such file), '/System/Library/Frameworks/Sparkle.framework/Versions/B/Sparkle' (no such file, not in dyld cache)
1
razaro 2023-05-09 19:57:11 +08:00
把错误代码喂给 GPT-4 ,是这么说的,不知道对不对。
It appears that the Sparkle framework is not being loaded properly. The error message indicates that the library is not found at any of the paths it's trying to search for. Also, the code signature is not valid for use in the process. Here are some steps to resolve this issue: Check if the Sparkle framework is added to your project correctly: a. In Xcode, select your project in the Project Navigator. b. In the "General" tab, scroll down to the "Frameworks, Libraries, and Embedded Content" section. c. Make sure Sparkle.framework is listed. If it's not, click on the "+" button and add the Sparkle framework. Make sure Sparkle framework is embedded in your app: a. In Xcode, select your project in the Project Navigator. b. Go to the "Build Phases" tab. c. In the "Embed Frameworks" phase, check if Sparkle.framework is present. If not, add it. Code signing issues can occur if the Team ID is not set or the binary is signed with a custom identity or ad hoc. Verify your code signing settings: a. In Xcode, select your project in the Project Navigator. b. Go to the "Signing & Capabilities" tab. c. Make sure "Automatically manage signing" is enabled and your team is selected. d. Check if the "Signing Certificate" is set to a valid option (e.g., "Development" or "Distribution"). Clean the build folder and derived data: a. In Xcode, go to "Product" > "Clean Build Folder" in the menu bar. b. Close Xcode and delete the DerivedData folder for your project. You can find its path in the error message you provided: "/Users/haseochen/Library/Developer/Xcode/DerivedData/DevToys-btgymifvomgazifyksowkrjsikxu" Restart Xcode and build your project again. If the issue persists, you might consider re-downloading the Sparkle framework and adding it to your project again. Make sure you're using the correct version of the framework compatible with your project. |
2
ferrum 2023-05-09 20:28:00 +08:00 via iPhone
不太了解 Sparkle 这个框架,但看报错信息,像是 Sparkle 需要 Team ID 才能正常工作,不能 run locally 。
你就直接把这个框架删了,然后把相关的引用也删了,反正也是个在线更新的框架,不影响功能。 |
3
weeei 2023-05-09 20:33:05 +08:00
没遇到你说的问题,可以顺利 run 起来。
你把依赖都下载回来了吗? |
4
weeei 2023-05-09 20:38:32 +08:00
解决方案:移除 Sparkle ,然后把 CoreUtils 类型改成 Static ,去掉 Embed 。直接编译就能运行了。
|
5
weeei 2023-05-09 22:04:34 +08:00
|
6
weeei 2023-05-09 22:05:04 +08:00
打包好了,签名了。
|
7
xtinput 2023-05-09 23:23:09 +08:00
Sparkle 是应用程序自动升级的,删了不影响程序功能
|
9
weeei 2023-05-10 12:29:15 +08:00
@tpxcer 链接: https://pan.baidu.com/s/1k7mfx6E8GG8pj_YnMJh6Ew?pwd=82b2 提取码: 82b2 复制这段内容后打开百度网盘手机 App ,操作更方便哦
|