简体   繁体   English

在构建阶段使用运行脚本将文件复制到资源包时出现权限被拒绝错误

[英]Getting permission denied error while copying files to resource bundle using run script in build phase

I am trying to copy certain files to my app's resource bundle using the run script build phase in XCODE5.我正在尝试使用 XCODE5 中的运行脚本构建阶段将某些文件复制到我的应用程序的资源包。

I am avoiding to use copy files build phase, as I would like to copy all the files in a particular folder in one go.我避免使用复制文件构建阶段,因为我想一次性复制特定文件夹中的所有文件。

I was first testing to copy just one file:我首先测试只复制一个文件:

cp "${SRCROOT}/RetaliSense/Default_Resource/Mylogo.png" "${BUILT_PRODUCTS_DIR}/{PRODUCT_NAME}.app" cp "${SRCROOT}/RetaliSense/Default_Resource/Mylogo.png" "${BUILT_PRODUCTS_DIR}/{PRODUCT_NAME}.app"

But I am getting this error:但我收到此错误:

Cp: /Users/DPS/Library/Developer/Xcode/DerivedData/RetaliSense-baptfuxnuenrneanatjvvlcmnphi/Build/Products/Debug-iphonesimulator/{PRODUCT_NAME}.app/Mylogo.png: Permission denied Cp:/Users/DPS/Library/Developer/Xcode/DerivedData/RetaliSense-baptfuxnuenrneanatjvvlcmnphi/Build/Products/Debug-iphonesimulator/{PRODUCT_NAME}.app/Mylogo.png:权限被拒绝

How do I fix this?我该如何解决?

Please use,请用,

cp "${SRCROOT}/RetaliSense/Default_Resource/Mylogo.png" "${BUILT_PRODUCTS_DIR}/ $ {PRODUCT_NAME}.app" cp "${SRCROOT}/RetaliSense/Default_Resource/Mylogo.png" "${BUILT_PRODUCTS_DIR}/ $ {PRODUCT_NAME}.app"

instead of,代替,

cp "${SRCROOT}/RetaliSense/Default_Resource/Mylogo.png" "${BUILT_PRODUCTS_DIR}/{PRODUCT_NAME}.app" cp "${SRCROOT}/RetaliSense/Default_Resource/Mylogo.png" "${BUILT_PRODUCTS_DIR}/{PRODUCT_NAME}.app"

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 复制文件构建阶段无法正常工作 - Copying Files Build Phase is not working properly 运行ionic build ios命令时权限被拒绝错误? - Permission denied error when I run ionic build ios command? 詹金斯(Jenkins)建立Xcode-取得建立错误“权限被拒绝” - Jenkins building Xcode - getting build error “permission denied” Xcode 中的运行脚本和构建阶段在哪里? - Where is the Run Script and Build Phase in Xcode? 在Xcode中切换运行脚本构建阶段 - Toggle run script build phase in Xcode 用于访问“副本捆绑资源” xcode构建阶段文件的变量? - Variables to access the “copy bundle resources” xcode build phase files? 在构建阶段运行脚本中使用 Firebase 上传符号时,Xcode 构建永远不会完成 - Xcode build never finishes when using Firebase upload-symbols in Build Phase Run Script 使用 Github 操作时,我遇到“权限被拒绝错误” - While using Github Actions, I'm facing "Permission denied error" iOS xcode 5 crashlytics错误 - Shell脚本调用错误 - ./Crashlytics.framework/run:权限被拒绝 - iOS xcode 5 crashlytics error - Shell Script Invocation Error - ./Crashlytics.framework/run: Permission denied 在管理器 loadFromPreferencesWithCompletionHandler 上获取权限被拒绝错误 - Getting Permission Denied error on manager loadFromPreferencesWithCompletionHandler
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM