Angular onesignal cordova插件中的ionic cordova添加平台ios错误

Angular onesignal cordova插件中的ionic cordova添加平台ios错误,angular,cordova,ionic-framework,cocoapods,onesignal,Angular,Cordova,Ionic Framework,Cocoapods,Onesignal,运行时出现此错误:$ionic cordova add platform ios。 你能帮我吗 谢谢 版本: Installing "onesignal-cordova-plugin" for ios "framework" tag with type "podspec" is deprecated and will be removed. Please use the "podspec" tag. Failed to install 'onesignal-cordova-plugin': un

运行时出现此错误:$ionic cordova add platform ios。 你能帮我吗

谢谢

版本:

Installing "onesignal-cordova-plugin" for ios
"framework" tag with type "podspec" is deprecated and will be removed. Please use the "podspec" tag.
Failed to install 'onesignal-cordova-plugin': undefined
(node:23148) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
CordovaError: Promise rejected with non-error: "/Library/Ruby/Gems/2.3.0/gems/claide-1.0.3/lib/claide/command.rb:439:in `help!': \u001b[31m[!] You cannot run CocoaPods as root.\u001b[39m (CLAide::Help)\n" +
  '\n' +
  '\u001b[4mUsage:\u001b[24m\n' +
  '\n' +
  '    $ \u001b[32mpod\u001b[39m \u001b[32mCOMMAND\u001b[39m\n' +
  '\n' +
  '      CocoaPods, the Cocoa library package manager.\n' +
  '\n' +
  '\u001b[4mCommands:\u001b[24m\n' +
  '\n' +
  '    \u001b[32m+ cache\u001b[39m      Manipulate the CocoaPods cache\n' +
  '    \u001b[32m+ env\u001b[39m        Display pod environment\n' +
  '    \u001b[32m+ init\u001b[39m       Generate a Podfile for the current directory\n' +
  '    \u001b[32m+ install\u001b[39m    Install project dependencies according to versions from a\n' +
  '                 Podfile.lock\n' +
  '    \u001b[32m+ ipc\u001b[39m        Inter-process communication\n' +
  '    \u001b[32m+ lib\u001b[39m        Develop pods\n' +
  '    \u001b[32m+ list\u001b[39m       List pods\n' +
  '    \u001b[32m+ outdated\u001b[39m   Show outdated project dependencies\n' +
  '    \u001b[32m+ repo\u001b[39m       Manage spec-repositories\n' +
  '    \u001b[32m+ setup\u001b[39m      Setup the CocoaPods environment\n' +
  '    \u001b[32m+ spec\u001b[39m       Manage pod specs\n' +
  '    \u001b[32m+ update\u001b[39m     Update outdated project dependencies and create new Podfile.lock\n' +
  '\n' +
  '\u001b[4mOptions:\u001b[24m\n' +
  '\n' +
  '    \u001b[34m--silent\u001b[39m     Show nothing\n' +
  '    \u001b[34m--version\u001b[39m    Show the version of the tool\n' +
  '    \u001b[34m--verbose\u001b[39m    Show more debugging information\n' +
  '    \u001b[34m--no-ansi\u001b[39m    Show output without ANSI codes\n' +
  '    \u001b[34m--help\u001b[39m       Show help banner of specified command\n' +
  "\tfrom /Library/Ruby/Gems/2.3.0/gems/cocoapods-1.8.4/lib/cocoapods/command.rb:47:in `run'\n" +
  "\tfrom /Library/Ruby/Gems/2.3.0/gems/cocoapods-1.8.4/bin/pod:55:in `<top (required)>'\n" +
  "\tfrom /usr/local/bin/pod:22:in `load'\n" +
  "\tfrom /usr/local/bin/pod:22:in `<main>'\n"
    at /usr/local/lib/node_modules/cordova/bin/cordova:29:15
    at processTicksAndRejections (internal/process/task_queues.js:85:5)
[ERROR] An error occurred while running subprocess cordova.

        cordova platform add ios exited with exit code 1.

        Re-running this command with the --verbose flag may provide more information.
“cordova ios”:“^5.1.1”

@ionic native/onesignal:“^5.19.1”

onesignal cordova插件“^2.8.1”

错误:

Installing "onesignal-cordova-plugin" for ios
"framework" tag with type "podspec" is deprecated and will be removed. Please use the "podspec" tag.
Failed to install 'onesignal-cordova-plugin': undefined
(node:23148) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
CordovaError: Promise rejected with non-error: "/Library/Ruby/Gems/2.3.0/gems/claide-1.0.3/lib/claide/command.rb:439:in `help!': \u001b[31m[!] You cannot run CocoaPods as root.\u001b[39m (CLAide::Help)\n" +
  '\n' +
  '\u001b[4mUsage:\u001b[24m\n' +
  '\n' +
  '    $ \u001b[32mpod\u001b[39m \u001b[32mCOMMAND\u001b[39m\n' +
  '\n' +
  '      CocoaPods, the Cocoa library package manager.\n' +
  '\n' +
  '\u001b[4mCommands:\u001b[24m\n' +
  '\n' +
  '    \u001b[32m+ cache\u001b[39m      Manipulate the CocoaPods cache\n' +
  '    \u001b[32m+ env\u001b[39m        Display pod environment\n' +
  '    \u001b[32m+ init\u001b[39m       Generate a Podfile for the current directory\n' +
  '    \u001b[32m+ install\u001b[39m    Install project dependencies according to versions from a\n' +
  '                 Podfile.lock\n' +
  '    \u001b[32m+ ipc\u001b[39m        Inter-process communication\n' +
  '    \u001b[32m+ lib\u001b[39m        Develop pods\n' +
  '    \u001b[32m+ list\u001b[39m       List pods\n' +
  '    \u001b[32m+ outdated\u001b[39m   Show outdated project dependencies\n' +
  '    \u001b[32m+ repo\u001b[39m       Manage spec-repositories\n' +
  '    \u001b[32m+ setup\u001b[39m      Setup the CocoaPods environment\n' +
  '    \u001b[32m+ spec\u001b[39m       Manage pod specs\n' +
  '    \u001b[32m+ update\u001b[39m     Update outdated project dependencies and create new Podfile.lock\n' +
  '\n' +
  '\u001b[4mOptions:\u001b[24m\n' +
  '\n' +
  '    \u001b[34m--silent\u001b[39m     Show nothing\n' +
  '    \u001b[34m--version\u001b[39m    Show the version of the tool\n' +
  '    \u001b[34m--verbose\u001b[39m    Show more debugging information\n' +
  '    \u001b[34m--no-ansi\u001b[39m    Show output without ANSI codes\n' +
  '    \u001b[34m--help\u001b[39m       Show help banner of specified command\n' +
  "\tfrom /Library/Ruby/Gems/2.3.0/gems/cocoapods-1.8.4/lib/cocoapods/command.rb:47:in `run'\n" +
  "\tfrom /Library/Ruby/Gems/2.3.0/gems/cocoapods-1.8.4/bin/pod:55:in `<top (required)>'\n" +
  "\tfrom /usr/local/bin/pod:22:in `load'\n" +
  "\tfrom /usr/local/bin/pod:22:in `<main>'\n"
    at /usr/local/lib/node_modules/cordova/bin/cordova:29:15
    at processTicksAndRejections (internal/process/task_queues.js:85:5)
[ERROR] An error occurred while running subprocess cordova.

        cordova platform add ios exited with exit code 1.

        Re-running this command with the --verbose flag may provide more information.
为ios安装“onesignal cordova插件”
类型为“podspec”的“framework”标记已弃用,将被删除。请使用“podspec”标签。
无法安装“onesignal cordova插件”:未定义
(节点:23148)[DEP0018]弃用警告:未处理的承诺拒绝已弃用。将来,未处理的承诺拒绝将使用非零退出代码终止Node.js进程。
CordovaError:承诺被拒绝,但没有错误:“/Library/Ruby/Gems/2.3.0/Gems/claide-1.0.3/lib/claide/command.rb:439:in`help!':\u001b[31m[!]无法以root身份运行CocoaPods。\u001b[39m(claide::help)\n”+
“\n”+
'\u001b[4M用法:\u001b[24m\n'+
“\n”+
“$\u001b[32mpod\u001b[39m\u001b[32mCOMMAND\u001b[39m\n”+
“\n”+
'CocoaPods,可可库包管理器。\n'+
“\n”+
'\u001b[4M命令:\u001b[24m\n'+
“\n”+
“\u001b[32m+缓存\u001b[39m]操作CocoaPods缓存\n”+
“\u001b[32m+env\u001b[39m显示盒环境\n”+
“\u001b[32m+init\u001b[39m为当前目录生成一个Podfile\n”+
“\u001b[32m+安装\u001b[39m安装项目依赖项,根据来自a的版本\n”+
'Podfile.lock\n'+
“\u001b[32m+ipc\u001b[39m进程间通信\n”+
“\u001b[32m+lib\u001b[39m开发吊舱\n”+
“\u001b[32m+列表\u001b[39m列表盒\n”+
“\u001b[32m+过时\u001b[39m显示过时的项目依赖项\n”+
“\u001b[32m+回购\u001b[39m管理规范存储库\n”+
“\u001b[32m+设置\u001b[39m设置CocoaPods环境\n”+
“\u001b[32m+规格\u001b[39m管理吊舱规格\n”+
“\u001b[32m+更新\u001b[39m更新过时的项目依赖项并创建新的Podfile.lock\n”+
“\n”+
'\u001b[4M选项:\u001b[24m\n'+
“\n”+
“\u001b[34m--无提示\u001b[39m不显示任何内容\n”+
'\u001b[34m--version\u001b[39m显示工具的版本\n'+
“\u001b[34m--verbose\u001b[39m显示更多调试信息\n”+
'\u001b[34m--没有ansi\u001b[39m显示没有ansi代码的输出\n'+
“\u001b[34m--help\u001b[39m显示指定命令的帮助横幅\n”+
“\t从/Library/Ruby/Gems/2.3.0/Gems/cocoapods-1.8.4/lib/cocoapods/command.rb:47:在'run'中\n”+
“\t从/Library/Ruby/Gems/2.3.0/Gems/cocoapods-1.8.4/bin/pod:55:在”'\n”+
“\t从/usr/local/bin/pod:22:加载”\n”+
“\t从/usr/local/bin/pod:22:在”\n”
at/usr/local/lib/node_modules/cordova/bin/cordova:29:15
在处理和拒绝时(内部/process/task_queues.js:85:5)
[错误]运行子进程cordova时出错。
cordova platform add ios已退出,退出代码为1。
使用--verbose标志重新运行此命令可能会提供更多信息。
试试这个

爱奥尼亚cordova平台添加ios--buildflag=“--allow root”