IBM Worklight - “权限被拒绝”在Xcode中构建时 [英] IBM Worklight - "Permission denied" when building in Xcode
问题描述
我按照developerWorks上的官方指南创建并构建了一个Worklight项目。我在Android设备上部署了应用程序并且运行正常。但是当我使用Xcode构建生成的本机项目时,我收到以下错误:
I created and built a Worklight project following the official guide on developerWorks. I deployed the app on Android device and it worked fine. But when I built the generated native project with Xcode, I got the following error:
运行自定义构建阶段脚本:buildtime.sh
/Users/gengsm/Documents/workspace/MobileClientMobileBankIphone-apsfwvobsizahnbjzlwhgbsbwusj/Build/Intermediates/MobileClientMobileBankIphone.build/Debug-iphonesimulator/MobileClientMobileBankIphone.build/Script-427B829D1393724500F223DC.sh:B $ b line 7:
/ Users / gengsm / Documents / workspace / BTT_Mobile / MobileClient / apps / MobileBank / iphone / native / buildtime.sh:
Permission denied DONE with script:buildtime.sh(exitStatus = 126)\ n \ n
Running a custom build phase script: buildtime.sh /Users/gengsm/Documents/workspace/MobileClientMobileBankIphone-apsfwvobsizahnbjzlwhgbsbwusj/Build/Intermediates/MobileClientMobileBankIphone.build/Debug-iphonesimulator/MobileClientMobileBankIphone.build/Script-427B829D1393724500F223DC.sh: line 7: /Users/gengsm/Documents/workspace/BTT_Mobile/MobileClient/apps/MobileBank/iphone/native/buildtime.sh: Permission denied DONE with script: buildtime.sh (exitStatus=126)\n\n
推荐答案
这可能是在Windows中创建的Worklight项目,然后生成的Xcode项目被移动要在Mac中构建Xcode ...
This is probably a Worklight project that was created in Windows and then the generated Xcode project was moved to Mac to be built in Xcode...
这里的问题是buildtime.sh文件丢失了它的执行权限。
这个缺陷是已修复并将在Workli中提供ght 6.1.0,将在未来几周内发布。
The problem here is that the buildtime.sh file lost its Execute permission.
This defect is fixed and will be available in Worklight 6.1.0, available in the coming weeks.
解决方案:
-
假设您已将生成的Xcode项目从Windows带到Mac:
Assuming you have brought the generated Xcode project from Windows to Mac:
- 提取压缩项目
- 在其中找到buildtime.sh文件
- 右键单击>获取信息
- 在底部更改
所有者
读取权限& amp;写
- Extract the zipped project
- find in it the buildtime.sh file
- Right-click it > Get Info
- At the bottom change the
Owner
permission toRead & Write
如果这不起作用,你也可以使用 CHMOD 更改权限:
- 将路径复制到包含buildtime.sh文件的文件夹
- 打开终端应用程序
- 运行以下命令(但使用您自己的路径从上面1开始):
chmod 755 /Users/idan/Documents/Worklight/workspace-6001/TestProject/apps/TestApp/iphone/native/buildtime.sh
- Copy the path to the folder holding the buildtime.sh file
- Open the Terminal app
- Run the following command (but use your own path from 1 above):
chmod 755 /Users/idan/Documents/Worklight/workspace-6001/TestProject/apps/TestApp/iphone/native/buildtime.sh
如果您在Mac中拥有整个Worklight项目,那么在Eclipse中:
If you have the entire Worklight project in Mac, then in Eclipse:
- 右键单击iphone\\\
ative\buildtime.sh文件>属性 - 添加
执行
所有者的权限
- 重新构建以生成更新的Xcode项目
- 在Xcode中打开>运行
- Right-click the iphone\native\buildtime.sh file > properties
- Add the
Execute
permission forOwner
- Re-build to generate an updated Xcode project
- Open in Xcode > Run
您还可以:
- 创建Worklight pr在Eclipse中在Mac 中开始使用。
这个项目不应该出现这个问题。
- Create the Worklight project to begin with, in Eclipse in Mac.
This project should not exhibit this issue then.
这篇关于IBM Worklight - “权限被拒绝”在Xcode中构建时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!