Building Kivy for iOS $ ./toolchain.py produces error

460 views
Skip to first unread message

anna.he

unread,
Nov 15, 2016, 5:00:57 AM11/15/16
to Kivy users support
Hey everybody,

I am really new in using Kivy and produced my first small App with it. It works well on Android but I have problems in testing the App on my iPhone. I followed the instructions on: https://kivy.org/docs/guide/packaging-ios.html Everytime I type '$ ./toolchain.py' (also in the combinations '$ -/toolchain.py kivy', '$ ./toolchain.py recipes' I get the following error:

Traceback (most recent call last):

  File "./toolchain.py", line 200, in <module>

    class ArchSimulator(Arch):

  File "./toolchain.py", line 205, in ArchSimulator

    sysroot = sh.xcrun("--sdk", "iphonesimulator", "--show-sdk-path").strip()

  File "./tools/external/sh.py", line 1021, in __call__

    return RunningCommand(cmd, call_args, stdin, stdout, stderr)

  File "./tools/external/sh.py", line 486, in __init__

    self.wait()

  File "./tools/external/sh.py", line 500, in wait

    self.handle_command_exit_code(exit_code)

  File "./tools/external/sh.py", line 516, in handle_command_exit_code

    raise exc(self.ran, self.process.stdout, self.process.stderr)

sh.ErrorReturnCode_1: 


  RAN: '/usr/bin/xcrun --sdk iphonesimulator --show-sdk-path'


  STDOUT:



  STDERR:

xcrun: error: SDK "iphonesimulator" cannot be located

xcrun: error: SDK "iphonesimulator" cannot be located

xcrun: error: unable to lookup item 'Path' in SDK 'iphonesimulator'


I am using macOS 10.12 and Xcode 8.1. In Xcode I downloaded iPhone Simulator 10.0 and 9.0. 

Python-Code is written in Python 2.7 and I installed the Kivy.app 1.9.1


Can you help me to get rid of this error?


Thank you in advance


anna.he

ZenCODE

unread,
Nov 15, 2016, 11:48:39 AM11/15/16
to Kivy users support
Are you sure you have installed the XCode command line tools? Please check that and try again?

anna.he

unread,
Nov 16, 2016, 6:25:31 AM11/16/16
to Kivy users support

The Command Line Tools are installed. I can type gcc or make without beeing prompted to install the Command Line Tools.

ZenCODE

unread,
Nov 16, 2016, 7:21:05 AM11/16/16
to Kivy users support
gcc is part of the old toolset. XCode uses clang now. But you say these are installed? All I can think is to make sure your installed SDK's match your selection of SDK in XCode? Otherwise, out of my depth, sorry :-(

Emmanuel Nabi

unread,
Nov 16, 2016, 10:09:48 AM11/16/16
to Kivy users support

i getting the same error since 3 days ago. i have search the internet with no apparent solutions. i was able to deploy my app to android, getting it to the iPhone has been a major headache. 

anna.he

unread,
Nov 24, 2016, 5:00:39 AM11/24/16
to Kivy users support
Dear all,

thank you for your advices. I tried to check which iOS SDK I have using: $ xcodebuild -showsdks
Doing this I got the following error message:

tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance

I fixed this with
$ sudo xcode-select -s /Applications/Xcode.app/Contents/Developer
Afterwards the toolchain.py also worked!

ZenCODE

unread,
Nov 24, 2016, 5:55:43 AM11/24/16
to Kivy users support
Awesomeness. Thanks for posting back :-)

Dave Toth

unread,
Oct 3, 2017, 1:29:11 PM10/3/17
to Kivy users support
Thanks for posting your fix!  Doing what you said fixed my problem, too!

Dave
Reply all
Reply to author
Forward
0 new messages