Building on XCode a Pythonista project as an stand alone application for iOS?
I have exported a project from Pythonista and tried it in XCode but I'm lost on what should I do in order to using it as an stand alone application on iOS, any hint/tutorial on this (I have tried to create a Target but without success). I would like to build it for my iPhone for example, is this possible right?
Thanks in advance, and sorry if my english isn't good enough.
ps: Love this App, is definitely the best App I have ever bought
omz last edited by
You need to be a registered iOS developer to make this work. This costs $99 per year and you need to set up some things in order to authorize your devices for testing etc. I can't really help you much with that (it's a pretty complex topic), but if you have all these things set up, you should be able to just hit the "run" button in Xcode.
Hi OMZ, thanks for your answer,
I'm already a registered iOS developer. I have done exactly what you sugest (set the desired target and running the project :), but the thing is, I am able to run the project in the iOS Simultaor but not in the actual device. When I set the target to my iPhone 4S, I get the following error output:
ld: file is universal (2 slices) but does not contain a(n) armv7s slice: /Users/.../Pythonista_SampleProject/Pythonista/lib/libpythonista for architecture armv7s
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Any ideas of what could be happening?
Thanks in advance.
omz last edited by
Ah, sorry about that, it's a misconfiguration that slipped through in the last update, but it's pretty easy to fix:
<li>Select the project in Xcode (the top-most item in the navigator)</li>
<li>Go to "Build Settings"</li>
<li>Double-click on the "Valid Architectures" setting (in the project column) and remove the armv7s entry from the list.</li>
Wow, thanks a lot man!
That did the trick :). Again, this is an enormous App. Congratulations for your work.
Just understand a bit about the python include statement and try to up the ante a bit to use xcode. I encounter the same issue and try the above, it still does not work.
May I ask what is the setting for Xcode 5.0?
I suspect it is related to choices here:
- Architectures which has 2 choice (1) standard architecture (including 64 bit) (arm64, arm7s, arm7) and (2) standard architecture (arm7s, arm7)
- Build Active architecture Only : (1) Yes or (2) No
- Valid architectures : arm64 arm7 arm7s
I tried various combination and it does not compile (running iphone simulator is ok). Is there any experience of which parameters to use.
BTW, I did try to delete any arm7s under the Valid Architectures, but the message is that the active architecture is arm7s.
I run a sample xcode project to my iphone5 and ipad retina and it seems the following setting is fine:
- standard architecture (arm7s, arm7)
- Latest IOS
- Active Yes
- arm64 arm7 arm7s
Run in the iDevices ok-ish but not the pythonista one.
In fact, the error of the pythonista is now changed. I used the same setting above and now it said (not before just suddenly) it use ARCHS=i386 and VALID_ARCHS=X86_64 which I am sure I have NOT chosen OS X. Confused, where does that come from. Clean it does not help.
I delete the whole project and re-install it again. It worked. At least for now, just remember NOT to "update to recommend setting"
Now I only have
- standard architecture armv7
- Latest IOS
- Active No
- arm64 armv7 armv7s
(The new setting always have both armv7 and armv7s.)
I think it must the way pythonista setup in an older setting. Hope the next round it would be updated.