Workflow for exporting to X-code
macnfly last edited by
Hi, The export function to xcode is not working at the moment. Will it be back in the next update ?
In the meantime. Is there a workflow to follow to manually get a script with images and txt files from Pythonista to the newest version of xcode ? Maybe downgrade xcode to an earlier version ?
Appreciate a little help
Best regards Peter
Edit: Sorry for posting this in the wrong forum section at first (Markdown forum)
zencuke last edited by
Check the 1.5 release notes. It has a link for an xCode project you can download and add your Python code to.
Bortels last edited by
Got a link? The docs in my pythonista say:
Xcode export is currently not available from within the app. I’m working on a way to create Xcode projects from Pythonista scripts on a Mac instead; details will be available on the Pythonista website soon.
I'd dearly love that to be out-of-date. :-)
Gerzer last edited by
Here's the link: Pythonista Xcode template
This template does not work with Xcode 6.1 & iOS 8. I'd love to see it updated soon!
JonB last edited by
A number of people have gotten xcode 6.1 working. I'm not sure if there is a difference between
This last thread has never been updated by someone who has gotten things working with pyui files... It would be nice to know where images and text files show up using the find bundled files script from the second script. Note that for os8, you have to modify the bundle path to instead start at
os.path.expanduser('~'), though possibly the Textures folder
dvader9 last edited by
@JonB, both forum threads you've linked to are relevant to making the Xcode template work.
I'm hoping that I (or someone else) can put together at least a few bullet points for the forum, that will guide other people in the translation of scripts toward a working Xcode project.
Off the top of my head, what I perceived as "broken" pieces with Xcode 6.1 are:
a) support for 64-bit architecture, so you need to make sure you change the project settings to compile for non-64-bit for now. Not sure if support for 64-bit is coming down the road in Pythonista 1.6.
b) path to supporting files is not a trivial issue, so we need to figure out where .py, .pyui, images and other files are located. Ole's Textures directory seems to be visible from everywhere, so using any images and icons from that directory hasn't caused any problems on my end. For other files, using the find_bundled_files script can help you debug the location of your files (see https://omz-forums.appspot.com/pythonista/post/5234293353742336)
c) other than the path to supporting files, I've seen some slight differences in certain Views (e.g. height of a small pop-over) between iOS 7 and iOS 8. My solution has been to create two different scripts that deal with these two operating systems. Not pretty, but it has worked.
Note that my experience in making apps is very limited. I'm still waiting to hear back (after 2 weeks) whether an app I did with my daughter will make it through to the store - another simple drawing App. I'll make sure to update the thread that pertains to Pythonista-based Apps, should that be the case.
Hope this helps. Something more comprehensive will be useful for all.
@JonB, Sorry, I did not mean to imply that it could not work, just that the existing templates are broken. I'm hoping that my students will spend the bulk of their time working on their Python code, not creating workarounds in Xcode!
JonB last edited by
Dvader, did you ever find where pyui files and/ or user images go? If that was documented publicly, it would probably get folks most of the way there...
Yes, the location of the .pyui file would be helpful.