In unix world, /tmp folder is most of time not on the same file system than the current running OS.
Building/packaging IOS app in Forge uses of temporary folder & python function os.rename
, which is a wrapper over shell rename
command. This command can not work on different file system.
Following is the error encountered with forge run:
[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
--- EDIT ---
This is an app with Facebook connect enabled ( as you can see as it tries to replace APP_ID)
--- EDIT ---
By manually changing function used in python source file (in .templates/ directory), this works (so shutil.move is the only solution)