Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

How does kivy/pyobjus work on iOS?

105 views
Skip to first unread message

Noob Saibot

unread,
Oct 17, 2013, 6:09:14 PM10/17/13
to kivy-...@googlegroups.com
I came across this question in stackoverflow on creating iOS apps in pure C code. Is it the case that kivy/pyobjus uses some .c scripts like the one in the question, embeds python into the C program, then calls kivy modules that way? Or is there more to it than that?

Doug Linder

unread,
Oct 17, 2013, 9:05:24 PM10/17/13
to kivy-...@googlegroups.com
https://github.com/kivy/kivy-ios/blob/master/tools/templates/main.m

In essence, yes.

The build is slightly more complicated in that it:

1) Compiles all the cython modules into static .a libraries.
2) Compiles all the .py files into .pyo object code
3) Links all the static libraries into one binary, and has a custom module loader to load symbols from the binary (see main.m).

It's slightly odd (and I don't understand why) but it *does* ship with a bunch of shared library files in lib/blah.so, but these seem to be 0kb placeholders to trick pythons module loader into working.

~
Doug.

Doug

unread,
Oct 17, 2013, 9:10:03 PM10/17/13
to kivy-...@googlegroups.com
(caveat; obviously main.m is objective-c not just plain c; but the majority of the rest of the code except for a few things like the bridge are in c
)


--
You received this message because you are subscribed to a topic in the Google Groups "Kivy users support" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/kivy-users/jsTcIlDOkiw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to kivy-users+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply all
Reply to author
Forward
0 new messages