【问题标题】:Failing to create objective sharpie bindings for FBSDKShareKit cocoapod未能为 FBSDKShareKit cocoapod 创建客观的 Sharpie 绑定
【发布时间】:2021-02-02 06:22:58
【问题描述】:

我正在尝试重新创建 cocoapod FBSDKShareKit 的绑定。

我执行了:

sharpie pod init ios FBSDKShareKit
sharpie pod bind

我得到的错误:

While building module 'FBSDKShareKit' imported from /private/var/folders/something.h:1:
In file included from <module-includes>:1:
In file included from /Users/something/ShareKit/build/Release-maccatalyst/FBSDKShareKit/FBSDKShareKit.framework/Headers/FBSDKShareKit-umbrella.h:13:
In file included from /Users/something/ShareKit/build/Release-maccatalyst/FBSDKShareKit/FBSDKShareKit.framework/Headers/FBSDKAppGroupContent.h:30:
/Users/something/ShareKit/build/Release-maccatalyst/FBSDKShareKit/FBSDKShareKit.framework/Headers/FBSDKCoreKitImport.h:29:10: fatal error: 
      'FBSDKCoreKit/FBSDKCoreKit.h' file not found
 #import <FBSDKCoreKit/FBSDKCoreKit.h>
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/private/var/folders/something.h:1:9: fatal error: could not build module 'FBSDKShareKit'
@import FBSDKShareKit;
 ~~~~~~~^~~~~~~~~~~~~

Binding...
2 errors generated.
Error while processing /private/var/folders/something.h.

Done. Exiting with error code 1.
error: Clang failed to parse input and exited with code 1

似乎某些参考未正确解析/复制。谷歌没有告诉我这个问题(或者我问了错误的问题)。

过去有人见过这个错误,甚至知道解决方案吗?

【问题讨论】:

    标签: ios xamarin xamarin.ios objective-sharpie


    【解决方案1】:

    在 dalexsoto (Discord DotNetEvolution) 的启发下找到了解决方法:

    1. sudo gem uninstall cocoapods &amp;&amp; sudo gem install cocoapods -v 1.5.0
      • 最新版本的 cocoapods 与最新版本的 Objective Sharpie 不兼容。
    2. sharpie pod init ios FBSDKShareKit
      • 只是常规的下载和准备。
    3. sharpie pod bind(失败)
      • 第一次绑定尝试失败,但创建了所有必要的文件。
    4. cp -r ./build/Release-maccatalyst/FBSDKCoreKit/* ./build/Release-maccatalyst/FBSDKShareKit/
      • 将 FBSDKCoreKit 的构建工件复制到 FBSDKShareKit 的构建目标文件夹。这样就满足了 Facebook sdk 头文件之间的引用。
    5. sharpie pod bind
      • 绑定现在按预期工作。万岁!

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2022-08-18
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-04-11
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多