为什么要修复"Frameworks/Flutter.framework:权限被拒绝";同时使用flutter模块构建iOS本机应用程序时? [英] Why to fix "Frameworks/Flutter.framework: Permission denied" while building iOS native app with flutter module?

查看:101
本文介绍了为什么要修复"Frameworks/Flutter.framework:权限被拒绝";同时使用flutter模块构建iOS本机应用程序时?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建了一个iOS单视图应用程序(hostapp),并将其转换为pod工作区.运行良好.然后创建flutter模块(clientapp),提供给iOS团队.独立运行良好.关闭hostapp和clientapp的Bitcode,因为它导致其他问题.现在通过podfile将clientapp添加到hostapp,内部代码没有更改.在hostapp中安装pod之后,我尝试构建它.然后它抛出/Users/iVoIP/Library/Developer/Xcode/DerivedData/hostapp-czxdwjjefjvrnhhdvbmaqeczngbh/Build/Products/Debug-iphonesimulator/hostapp.app/Frameworks/Flutter.framework:权限被拒绝

I created an iOS single view app (hostapp) and converted it to pod workspace. Runs well. Then created flutter module (clientapp), provided iOS team. Runs well, independently. Turned off Bitcode for hostapp and clientapp, as it caused other problems. Now added clientapp to hostapp via podfile, no internal code changes. After pod install in hostapp, I tried building it. Then it throws /Users/iVoIP/Library/Developer/Xcode/DerivedData/hostapp-czxdwjjefjvrnhhdvbmaqeczngbh/Build/Products/Debug-iphonesimulator/hostapp.app/Frameworks/Flutter.framework: Permission denied

  • hostapp和clientapp都是默认的iOS和flutter应用程序.没有任何变化.
  • 我遵循了此官方指南 https://github.com/flutter/flutter/wiki/Add-Flutter-to-existing-apps .
  • 曾尝试搜索类似的问题,但没有成功.
  • 在Xcode 10和11上进行了测试
  • 尝试过旧版
  • 尝试过与Xcode 11、10、9.3兼容等
  • 将颤振chmod更改为777
  • /Users/iVoIP/Library/Developer/Xcode/DerivedData/hostapp-czxdwjjefjvrnhhdvbmaqeczngbh/Build/Products/Debug-iphonesimulator/hostapp.app/Frameworks/ chmod更改为777
  • Both hostapp and clientapp are default iOS and flutter app. No changes whatsoever.
  • I followed this official guide https://github.com/flutter/flutter/wiki/Add-Flutter-to-existing-apps.
  • Have tried to search for similar issue but no success there.
  • Tested on Xcode 10 and 11
  • Tried legacy build
  • Tried Xcode 11, 10, 9.3-compatible, etc
  • Changed flutter chmod to 777
  • Changed /Users/iVoIP/Library/Developer/Xcode/DerivedData/hostapp-czxdwjjefjvrnhhdvbmaqeczngbh/Build/Products/Debug-iphonesimulator/hostapp.app/Frameworks/ chmod to 777
PhaseScriptExecution [CP]\ Embed\ Pods\ Frameworks /Users/iVoIP/Library/Developer/Xcode/DerivedData/hostapp-czxdwjjefjvrnhhdvbmaqeczngbh/Build/Intermediates.noindex/hostapp.build/Debug-iphonesimulator/hostapp.build/Script-4899A4A5D85C0D737A68EFD6.sh (in target 'hostapp' from project 'hostapp')
    cd /Users/iVoIP/projects/xcode/hostapp
    /bin/sh -c /Users/iVoIP/Library/Developer/Xcode/DerivedData/hostapp-czxdwjjefjvrnhhdvbmaqeczngbh/Build/Intermediates.noindex/hostapp.build/Debug-iphonesimulator/hostapp.build/Script-4899A4A5D85C0D737A68EFD6.sh

mkdir -p /Users/iVoIP/Library/Developer/Xcode/DerivedData/hostapp-czxdwjjefjvrnhhdvbmaqeczngbh/Build/Products/Debug-iphonesimulator/hostapp.app/Frameworks
rsync --delete -av --filter P .*.?????? --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "/Users/iVoIP/projects/xcode/hostapp/Pods/../../clientapp/.ios/Flutter/engine/Flutter.framework" "/Users/iVoIP/Library/Developer/Xcode/DerivedData/hostapp-czxdwjjefjvrnhhdvbmaqeczngbh/Build/Products/Debug-iphonesimulator/hostapp.app/Frameworks"
building file list ... done
Flutter.framework/
Flutter.framework/Flutter
Flutter.framework/Info.plist
Flutter.framework/icudtl.dat
Flutter.framework/_CodeSignature/
Flutter.framework/_CodeSignature/CodeResources

sent 94440038 bytes  received 120 bytes  188880316.00 bytes/sec
total size is 94428117  speedup is 1.00
Stripped /Users/iVoIP/Library/Developer/Xcode/DerivedData/hostapp-czxdwjjefjvrnhhdvbmaqeczngbh/Build/Products/Debug-iphonesimulator/hostapp.app/Frameworks/Flutter.framework/Flutter of architectures: armv7 arm64
Code Signing /Users/iVoIP/Library/Developer/Xcode/DerivedData/hostapp-czxdwjjefjvrnhhdvbmaqeczngbh/Build/Products/Debug-iphonesimulator/hostapp.app/Frameworks/Flutter.framework with Identity -
/usr/bin/codesign --force --sign -  --preserve-metadata=identifier,entitlements '/Users/iVoIP/Library/Developer/Xcode/DerivedData/hostapp-czxdwjjefjvrnhhdvbmaqeczngbh/Build/Products/Debug-iphonesimulator/hostapp.app/Frameworks/Flutter.framework'
/Users/iVoIP/Library/Developer/Xcode/DerivedData/hostapp-czxdwjjefjvrnhhdvbmaqeczngbh/Build/Products/Debug-iphonesimulator/hostapp.app/Frameworks/Flutter.framework: replacing existing signature
/Users/iVoIP/Library/Developer/Xcode/DerivedData/hostapp-czxdwjjefjvrnhhdvbmaqeczngbh/Build/Products/Debug-iphonesimulator/hostapp.app/Frameworks/Flutter.framework: Permission denied
Command PhaseScriptExecution failed with a nonzero exit code

推荐答案

在此路径下的Flutter文件夹中找到 xcode_backend.sh 文件 flutter/packages/flutter_tools/bin,然后在第140行将其更改为

Locate xcode_backend.sh file in the Flutter folder at this path ‎⁨flutter/packages⁩/flutter_tools/⁨bin⁩ and at line 140 change it to

    RunCommand find "${derived_dir}/engine/Flutter.framework" -type f -iname '.h' -exec chmod a-w "{}" \;

这会做到的!

这篇关于为什么要修复"Frameworks/Flutter.framework:权限被拒绝";同时使用flutter模块构建iOS本机应用程序时?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆