电容iOS同步失败,离子

Posted

技术标签:

【中文标题】电容iOS同步失败,离子【英文标题】:Capacitor iOS sync fail with ionic 【发布时间】:2021-04-10 11:15:39 【问题描述】:

我正在尝试为 ios 生成一个捆绑包,但 pod 向我抛出了这个错误。 我 95% 确定这是插件的问题,但我无法解决。

我尝试重新安装 pod,重新创建电容器 ios。 我在 mac 上做,用新的 m1

✔ 在 25.89 毫秒内更新 android 插件

找到 2 个适用于 android 的电容器插件: @capacitor-community/保持清醒 (1.0.0) 电容器保持屏幕开启(1.0.0-alpha.6) 找到 6 个适用于 android 的 Cordova 插件 cc.fovea.cordova.purchase (10.1.1) 科尔多瓦插件设备 (2.0.3) 科尔多瓦插件文件(6.0.2) 科尔多瓦插件文件传输(1.7.1) 科尔多瓦插件离子(5.4.7) 科尔多瓦插件白名单 (1.3.4) 在此输入代码

✔ 在 65.89 毫秒内更新 android

✔ 在 8.94 毫秒内更新 iOS 插件 找到 2 个适用于 ios 的电容器插件: @capacitor-community/保持清醒 (1.0.0) 电容器保持屏幕开启(1.0.0-alpha.6) 找到 5 个适用于 ios 的 Cordova 插件 cc.fovea.cordova.purchase (10.1.1) 科尔多瓦插件设备 (2.0.3) 科尔多瓦插件文件(6.0.2) 科尔多瓦插件文件传输(1.7.1) 科尔多瓦插件离子(5.4.7) ⠋ 使用 "pod i 更新 iOS 原生依赖项⠙ 使用 "pod i 更新 iOS 原生依赖项⠹ 使用 "pod i 更新 iOS 原生依赖项⠸ 使用 "pod i 更新 iOS 原生依赖项⠼ 使用 "pod i 更新 iOS 原生依赖项⠴ 更新 iOS 原生依赖项使用 "pod i⠦ 使用 "pod i⠧ 更新 iOS 本机依赖项 使用 "pod i⠇ 更新 iOS 本机依赖项 使用 "pod i⠏ 更新 iOS 本机依赖项 使用 "pod i 更新 iOS 本机依赖项

✖ 使用“pod install”更新 iOS 原生依赖项(可能需要几分钟):

✖更新ios: [错误] 分析依赖关系

―――MARKDOWN模板―――――――――――――――――――――――――――――――――――――――― ――――――――――――――――――

命令

/opt/homebrew/Cellar/cocoapods/1.10.0_2/libexec/bin/pod install

报告

你做了什么?

你预计会发生什么?

发生了什么?

堆栈

   CocoaPods : 1.10.0
        Ruby : ruby 2.6.3p62 (2019-04-16 revision 67580) [universal.arm64e-darwin20]
    RubyGems : 3.0.3
        Host : macOS 11.0.1 (20B29)
       Xcode : 12.3 (12C33)
         Git : git version 2.24.3 (Apple Git-128)
Ruby lib dir : /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib
Repositories : 

插件

cocoapods-deintegrate : 1.0.4
cocoapods-plugins     : 1.0.0
cocoapods-search      : 1.0.0
cocoapods-trunk       : 1.5.0
cocoapods-try         : 1.2.0

播客文件

platform :ios, '11.0'
use_frameworks!

# workaround to avoid Xcode caching of Pods that requires
# Product -> Clean Build Folder after new Cordova plugins installed
# Requires CocoaPods 1.6 or newer
install! 'cocoapods', :disable_input_output_paths => true

def capacitor_pods
  # Automatic Capacitor Pod dependencies, do not delete
  pod 'Capacitor', :path => '../../node_modules/@capacitor/ios'
  pod 'CapacitorCordova', :path => '../../node_modules/@capacitor/ios'
  pod 'CapacitorCommunityKeepAwake', :path => '../../node_modules/@capacitor-community/keep-awake'
  pod 'CapacitorKeepScreenOn', :path => '../../node_modules/capacitor-keep-screen-on'
  pod 'CordovaPlugins', :path => '../capacitor-cordova-ios-plugins'
  # Do not delete
end

target 'App' do
  capacitor_pods
  # Add your Pods here
end

错误

LoadError - dlopen(/opt/homebrew/Cellar/cocoapods/1.10.0_2/libexec/gems/ffi-1.14.2/lib/ffi_c.bundle, 0x0009): missing compatible arch in /opt/homebrew/Cellar/cocoapods/1.10.0_2/libexec/gems/ffi-1.14.2/lib/ffi_c.bundle - /opt/homebrew/Cellar/cocoapods/1.10.0_2/libexec/gems/ffi-1.14.2/lib/ffi_c.bundle
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
/opt/homebrew/Cellar/cocoapods/1.10.0_2/libexec/gems/ffi-1.14.2/lib/ffi.rb:6:in `rescue in <top (required)>'
/opt/homebrew/Cellar/cocoapods/1.10.0_2/libexec/gems/ffi-1.14.2/lib/ffi.rb:3:in `<top (required)>'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
/opt/homebrew/Cellar/cocoapods/1.10.0_2/libexec/gems/ethon-0.12.0/lib/ethon.rb:2:in `<top (required)>'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
/opt/homebrew/Cellar/cocoapods/1.10.0_2/libexec/gems/typhoeus-1.4.0/lib/typhoeus.rb:2:in `<top (required)>'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
/opt/homebrew/Cellar/cocoapods/1.10.0_2/libexec/gems/cocoapods-1.10.0/lib/cocoapods/sources_manager.rb:74:in `cdn_url?'
/opt/homebrew/Cellar/cocoapods/1.10.0_2/libexec/gems/cocoapods-1.10.0/lib/cocoapods/sources_manager.rb:36:in `create_source_with_url'
/opt/homebrew/Cellar/cocoapods/1.10.0_2/libexec/gems/cocoapods-1.10.0/lib/cocoapods/sources_manager.rb:21:in `find_or_create_source_with_url'
/opt/homebrew/Cellar/cocoapods/1.10.0_2/libexec/gems/cocoapods-1.10.0/lib/cocoapods/installer/analyzer.rb:178:in `block in sources'
/opt/homebrew/Cellar/cocoapods/1.10.0_2/libexec/gems/cocoapods-1.10.0/lib/cocoapods/installer/analyzer.rb:177:in `map'
/opt/homebrew/Cellar/cocoapods/1.10.0_2/libexec/gems/cocoapods-1.10.0/lib/cocoapods/installer/analyzer.rb:177:in `sources'
/opt/homebrew/Cellar/cocoapods/1.10.0_2/libexec/gems/cocoapods-1.10.0/lib/cocoapods/installer/analyzer.rb:1073:in `block in resolve_dependencies'
/opt/homebrew/Cellar/cocoapods/1.10.0_2/libexec/gems/cocoapods-1.10.0/lib/cocoapods/user_interface.rb:64:in `section'
/opt/homebrew/Cellar/cocoapods/1.10.0_2/libexec/gems/cocoapods-1.10.0/lib/cocoapods/installer/analyzer.rb:1072:in `resolve_dependencies'
/opt/homebrew/Cellar/cocoapods/1.10.0_2/libexec/gems/cocoapods-1.10.0/lib/cocoapods/installer/analyzer.rb:124:in `analyze'
/opt/homebrew/Cellar/cocoapods/1.10.0_2/libexec/gems/cocoapods-1.10.0/lib/cocoapods/installer.rb:414:in `analyze'
/opt/homebrew/Cellar/cocoapods/1.10.0_2/libexec/gems/cocoapods-1.10.0/lib/cocoapods/installer.rb:239:in `block in resolve_dependencies'
/opt/homebrew/Cellar/cocoapods/1.10.0_2/libexec/gems/cocoapods-1.10.0/lib/cocoapods/user_interface.rb:64:in `section'
/opt/homebrew/Cellar/cocoapods/1.10.0_2/libexec/gems/cocoapods-1.10.0/lib/cocoapods/installer.rb:238:in `resolve_dependencies'
/opt/homebrew/Cellar/cocoapods/1.10.0_2/libexec/gems/cocoapods-1.10.0/lib/cocoapods/installer.rb:160:in `install!'
/opt/homebrew/Cellar/cocoapods/1.10.0_2/libexec/gems/cocoapods-1.10.0/lib/cocoapods/command/install.rb:52:in `run'
/opt/homebrew/Cellar/cocoapods/1.10.0_2/libexec/gems/claide-1.0.3/lib/claide/command.rb:334:in `run'
/opt/homebrew/Cellar/cocoapods/1.10.0_2/libexec/gems/cocoapods-1.10.0/lib/cocoapods/command.rb:52:in `run'
/opt/homebrew/Cellar/cocoapods/1.10.0_2/libexec/gems/cocoapods-1.10.0/bin/pod:55:in `<top (required)>'
/opt/homebrew/Cellar/cocoapods/1.10.0_2/libexec/bin/pod:23:in `load'
/opt/homebrew/Cellar/cocoapods/1.10.0_2/libexec/bin/pod:23:in `<main>'

―――模板结束―――――――――――――――――――――――――――――――――――――――― ――――――――――――――――――――――

[!] 哦不,发生了错误。

搜索与您类似的现有 GitHub 问题: https://github.com/CocoaPods/CocoaPods/search?q=dlopen%28%2Fopt%2Fhomebrew%2FCellar%2Fcocoapods%2F1.10.0_2%2Flibexec%2Fgems%2Fffi-1.14.2%2Flib%2Fffi_c.bundle%2C+0x0009%29%3A+missing+compatible+arch+in+%2Fopt%2Fhomebrew%2FCellar%2Fcocoapods%2F1.10.0_2%2Flibexec%2Fgems%2Fffi-1.14.2%2Flib%2Fffi_c.bundle+-+%2Fopt%2Fhomebrew%2FCellar%2Fcocoapods%2F1.10.0_2%2Flibexec%2Fgems%2Fffi-1.14.2%2Flib%2Fffi_c.bundle&type=Issues

如果不存在,请使用上面显示的模板在以下位置创建一个工单: https://github.com/CocoaPods/CocoaPods/issues/new

请务必先阅读贡献指南,详细了解如何正确提交工单: https://github.com/CocoaPods/CocoaPods/blob/master/CONTRIBUTING.md

不要忘记匿名化任何私人数据!

正在寻找关于 cocoapods/cocoapods 的相关问题... 搜索检查失败:nil:NilClass 的未定义方法“map”

npm 错误!代码 1 npm 错误!路径 /Users/user/Desktop/Apps/test npm 错误!命令失败 npm 错误!命令 sh -c cap update

npm 错误!可以在以下位置找到此运行的完整日志: npm 错误! /Users/user/.npm/_logs/2021-01-04T16_37_26_175Z-debug.log

【问题讨论】:

【参考方案1】:

ffi gem 似乎还不支持 M1 芯片。

从 brew 中卸载 cocoapods,然后尝试以 Rosetta 模式运行终端。右键单击终端,获取在 Rosetta 中运行的信息。然后通过键入以下内容从那里安装 ffi gem:

sudo gem install ffi

然后继续安装 cocoapods

sudo gem install cocoapods

最后

pod install

之后,您可以将终端恢复为原生,或者您可以复制应用程序并保持一个原生和一个在 Rosetta 模式下。

【讨论】:

现在怎么样? : 哦 根据这篇文章,自制的cocoapods稳定版,支持m1 mac:dev.to/staceypyee/…

以上是关于电容iOS同步失败,离子的主要内容,如果未能解决你的问题,请参考以下文章

离子与电容器在飞溅后去除白屏?

apicloud IOS WiFi真机同步失败

mysql主从同步失败Last_IO_Error: Got fatal error 1236 from master解决方法

mysql主从同步失败Last_IO_Error: Got fatal error 1236 from master解决方法

mysql主从同步失败Last_IO_Error: Got fatal error 1236 from master解决方法

mysql主从同步失败Last_IO_Error: Got fatal error 1236 from master解决方法