22

将 React Native 从 0.61.5 升级到 0.63.2 后,Flipper在 IOS 上导致错误为typedef redefinition with different types ('uint8_t' (aka 'unsigned char') vs 'enum clockid_t')

在 github 上有一些建议的答案,但没有一个能解决我的问题https://github.com/facebook/flipper/issues/834

有没有人想出如何解决这个问题?

非常感谢

4

6 回答 6

20

请注意,如果您有 use_frameworks!启用后,Flipper 将无法工作,您应该在 Podfile 中禁用接下来的几行。

  # use_flipper!
  # post_install do |installer|
  #   flipper_post_install(installer)
  # end
于 2021-03-03T08:36:00.573 回答
3

使用以下代码更新您的 pod 文件。

use_flipper!({ 'Flipper-Folly' => '2.3.0' }) # update this part
 post_install do |installer|
   flipper_post_install(installer)
 end
于 2021-03-02T13:18:42.337 回答
2

第1步:

转到YOUR_PROJECT > ios > Podfile然后评论这些行

  # use_flipper!()

  # post_install do |installer|
  #   react_native_post_install(installer)
  #   __apply_Xcode_12_5_M1_post_install_workaround(installer)
  # end

第2步:

在第 1 步之后,您必须在路径上运行pod update命令。YOUR_PROJECT > ios

宾果游戏完成。


重要的

如果您在执行上述 2 个步骤后遇到一些错误,

  1. 转到YOUR_PROJECT > ios > YOUR_PROJECT_NAME >并运行此命令
  2. plutil ./Info.plist它会告诉你问题出在哪里。
  3. 然后从您的文本编辑器中修复该问题。
于 2021-12-06T07:14:23.020 回答
0

如果您不想从应用程序中删除 Flipper,请执行此解决方案。

你的 pod.file 像这样

add_flipper_pods!('Flipper' => '0.74.0')

通过这样做升级 Flipper-Folly

删除此行 add_flipper_pods!('Flipper' => '0.74.0')

添加这一行add_flipper_pods!('Flipper-Folly' => '2.3.0')

于 2021-05-19T11:52:18.657 回答
0

就我而言,我的 XCode 版本是 11.5,它不支持 Flipper 中的更新版本。将我的 XCode 更新到版本 12 立即修复了它。

于 2021-06-07T10:15:25.030 回答
0

我需要指定版本:

  # https://github.com/facebook/flipper/releases
  # https://cocoapods.org/pods/Flipper-Folly
  # https://cocoapods.org/pods/OpenSSL-Universal
  use_flipper!({
    "Flipper" => "0.134.0",
    "Flipper-Folly" => "2.6.10",
    "OpenSSL-Universal" => "1.1.1100"
  })

对于完整的 Podfile,它可能会有所帮助:

require_relative "../node_modules/expo/scripts/autolinking"
require_relative "../node_modules/react-native/scripts/react_native_pods"
require_relative "../node_modules/@react-native-community/cli-platform-ios/native_modules"

platform :ios, "12.0"

target "socializus" do
  use_expo_modules!

  config = use_native_modules!

  use_react_native!(
    path: config[:reactNativePath],
    hermes_enabled: false
  )

  # https://github.com/facebook/flipper/releases
  # https://cocoapods.org/pods/Flipper-Folly
  # https://cocoapods.org/pods/OpenSSL-Universal
  use_flipper!({
    "Flipper" => "0.134.0",
    "Flipper-Folly" => "2.6.10",
    "OpenSSL-Universal" => "1.1.1100"
  })

  post_install do |installer|
    flipper_post_install(installer)
    react_native_post_install(installer)

    installer.pods_project.targets.each do |target|
      target.build_configurations.each do |config|
        config.build_settings.delete "IPHONEOS_DEPLOYMENT_TARGET"
      end
    end
  end
end
于 2022-02-15T20:30:54.773 回答