在Unix世界中,/ tmp文件夹通常与当前正在运行的OS不在同一文件系统上。
在Forge中构建/打包IOS应用使用临时文件夹和python函数os.rename
,它是shell rename
命令的包装。此命令不能在其他文件系统上使用。
以下是伪造运行遇到的错误:
[DEBUG] Making Payload directory
[ERROR] [Errno 18] Invalid cross-device link
[DEBUG] Traceback (most recent call last):
File "/home/<user>/TriggerToolkit/build-tools/forge/async.py", line 96, in run
result = self._target(*self._args, **self._kwargs)
File "/home/<user>/TriggerToolkit/trigger/api/app.py", line 286, in run
forge_main.run(['--general.interactive', 'no'])
File "/home/<user>/TriggerToolkit/build-tools/forge/main.py", line 437, in run
build_to_run=build_to_run,
File "/home/<user>/forge-workspace/sfjozog/.template/generate_dynamic/customer_goals.py", line 126, in run_app
build_to_run.run()
File "/home/<user>/forge-workspace/sfjozog/.template/generate_dynamic/build.py", line 337, in run
self._call_with_params(task_method, task_args)
File "/home/<user>/forge-workspace/sfjozog/.template/generate_dynamic/build.py", line 296, in _call_with_params
return method(self, *params)
File "/home/<user>/forge-workspace/sfjozog/.template/generate_dynamic/ios_tasks.py", line 626, in run_ios
certificate_password=certificate_password,
File "/home/<user>/forge-workspace/sfjozog/.template/generate_dynamic/ios_tasks.py", line 571, in run_idevice
certificate_password=certificate_password,
File "/home/<user>/forge-workspace/sfjozog/.template/generate_dynamic/ios_tasks.py", line 387, in create_ipa_from_app
self._create_entitlements_file(build, temp_file_path)
File "/home/<user>/forge-workspace/sfjozog/.template/generate_dynamic/ios_tasks.py", line 323, in _create_entitlements_file
_replace_in_file(temp_file_path, 'APP_ID', bundle_id)
File "/home/<user>/forge-workspace/sfjozog/.template/generate_dynamic/ios_tasks.py", line 318, in _replace_in_file
os.rename(tmp_file, filename)
OSError: [Errno 18] Invalid cross-device link
-编辑-
这是一个启用了Facebook Connect的应用程序(您尝试替换APP_ID时可以看到)
-编辑-
通过手动更改python源文件(在.templates /目录中)使用的功能,此方法有效(因此,shutil.move是唯一的解决方案)
最佳答案
这里也提出了这个问题:
Trigger.io [Errno 18] Cross-device link
对此的响应提供了解决方法的选项。
关于ios - 无法在Linux env上运行/构建IOS。与另一个文件系统上的/tmp文件夹,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/13490312/