Search code examples
pythonxcodecocoakivycocoapods

How to solve Xcode rsync file transfer issue for a kivy-ios application?


I want to compile an application developed with Python and the library Kivy for ios devices. I have followed the process explained at this page and created a Xcode project using the command:

toolchain create <title> <app_directory>

I then opened the project using the command:

open touchtracer-ios/touchtracer.xcodeproj

However when trying to launch the app using the play button I have obtained after a few minutes the error Command PhaseScriptExecution failed with a nonzero exit code.

Here is the complete log of the error:

Showing Recent Messages
tools/game_tools/

tools/game_tools/__init__.py

tools/game_tools/sound.py

tools/game_tools/__pycache__/

tools/game_tools/__pycache__/__init__.cpython-311.pyc

tools/game_tools/__pycache__/sound.cpython-311.pyc

tools/kivads_src/

tools/kivads_src/BListener.java

tools/kivads_src/FullScreen.java

tools/kivads_src/ICallback.java

tools/kivads_src/RCallback.java

tools/kivads_src/RICallback.java

tools/kivy_tools/

tools/kivy_tools/__init__.py

tools/kivy_tools/image_button.py

tools/kivy_tools/image_with_text.kv

tools/kivy_tools/image_with_text.py

tools/kivy_tools/image_with_text_button.kv

tools/kivy_tools/image_with_text_button.py

tools/kivy_tools/screen.kv

tools/kivy_tools/screen.py

tools/kivy_tools/tools_kivy.py

tools/kivy_tools/images/

tools/kivy_tools/images/defaulttheme.atlas

tools/kivy_tools/images/defaulttheme.png



sent 2397664951 bytes  received 1256148 bytes  15939675.08 bytes/sec

total size is 2394471022  speedup is 1.00

rsync warning: some files vanished before they could be transferred (code 24) at /AppleInternal/Library/BuildRoots/0032d1ee-80fd-11ee-8227-6aecfccc70fe/Library/Caches/com.apple.xbs/Sources/rsync/rsync/main.c(996) [sender=2.6.9]

Command PhaseScriptExecution failed with a nonzero exit code

To solve this problem, I have searched on internet for more info and found this page mentioning a similar issue. I have tried the solution proposing to update CocoaPods and clean the build folder but without any improvements.

I have updated Cocoapods using this command:

sudo gem install cocoapods

My current Xcode version is 15.2 and my CocoaPods version is 1.15.2.

Could you please help me to solve this issue ? I really have no idea about how to fix it.


Solution

  • Explanation

    I managed to found the reason behind this problem, this happened because my application compilation folder (denoted touchtracer-ios in the kivy demo) was located inside my project folder. This is bad because when the project tries to compile, it includes as well the compilation files and tries to compile them which creates a loop where the compilation keep creating a YourApp folder inside a YourApp folder and so on.

    Solution

    To solve it, remove the <your_app>-ios folder from your main project folder and put it elsewhere by running the command toolchain create <title> <app_directory> outside your main project folder.