Welcome!
This is the community forum for my apps Pythonista and Editorial.
For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.
Xcode Template for Pythonista
-
@omz Thanks so much for getting back to me.
I will give it a try and see what happens.By any chance do you have an update to the GitHub repo with the changes already made to the pylib and pylib_ext, so that I do not have to run the scrip and change anything?
Thanks again, Patrick
-
Trying to run my app via xcode and the current template. How do you force it to run the Python 3 interpretor?
-
@omz I have used your script and changed all the files in pylib and pylib_ext. I even placed the header at the top of the files in "scripts". It still compiles OK to simulator and devices but I am still getting a code signing error.
Any ideas?
Here is my fork with the fix: https://github.com/Mr-Coxall/PythonistaAppTemplate -
@mrcoxall It looks like you're submitting the app directly from the Xcode organizer? Try exporting the archive first ("for App Store deployment"), and then submit it using the Application Loader tool (right-click Xcode in Dock -> Open Developer Tool...). Not sure if this will actually fix the error, but I've seen similar problems in the past that only happened with Xcode, and not with Application Loader.
-
@omz Based on my experiments, am I correct in assuming that the template only has the 2.7 interpretor? Any hope the the 3.5/3.6 template will be forthcoming? I am learning swift just in case.
-
@omz I tried as you suggest and used the Application Loader. Same problem happening. Still getting code signing errors. Have tried using "Auto code signing" and even old school downloading the certificate myself and still getting the same messages.
Have you been able to get anything uploaded to the App Store?
Do you have a template that I could try?Thanks
-
Wondering if anyone has been able to submit an app successfully since Jan 1, 2017.
I still am getting signing errors and have no workaround that will work.
I have app waiting to get approved and need a solution.Thanks
-
Have you tried the recommendations here?
http://stackoverflow.com/questions/39889093/itunes-software-service-authentication-error-domain-error-434 -
I know this is an older thread, but I just wanted to confirm that with the texinfo fix, I have successfully submitted and had an app approved in the last few days.
So the fix is required to get past the automatic filter, but submission is OK with the workaround.
-
@omz Getting back to the question of @polymerchm : Is it possible to run python3 in Xcode? Using a she-bang line like "#! python3" does not work. sys.version still returns "2.7.5 (default, Feb 15 2016, 15:15:36)". Thanks!
-
@marcus67 It's currently not possible, I'm afraid.
-
@omz Thanks for getting back to me.
I was wondering if there is any explanation on why it is no longer possible?
I used Pythonista last year with my grade 11 programming course and got over a dozen apps published on the App Store. I have just started using it again with this years group and told them we will be doing the same thing. If there is anything I can do to help the process along, please let me know. We will not be starting to write the final apps until December.Thanks
-
This post is deleted! -
-
@JonB The texinfo trick continues to work. Had an app accepted just last week.
-
Would it be possible to create a repo or a page on Pythonista-Tools that could be a FAQ for using the template? It seems like there are several prereqs and then several steps to complete the process and it would be great to have a landing page for sharing all that tribal knowledge.
-
I spoke too soon. I had to upgrade Xcode because of iOS11 compatibility, and now I'm back to getting the code signing errors for all the .py files, even if they have the texinfo header. Building apps for local distribution works fine, I just can't sign the code as part of the validation process for the App Store.
-
Looks like the texinfo hack needs to be modified. The code signing process uses file(1) to check the type of file in the package, and file(1) identifies executable code by checking against different file types and scoring each file type. Apple modified the matching "magic" for python to look for python keywords like "def", "import", "try", "except", etc and each use gives a higher score to python. So for the tex info hack to work, it needs to occur more frequently than the python keywords. Some files just need a single texinfo line; other files need 400+ copies of the texinfo line (some of the python checks only examine the first 4096 characters of the file). Its easy to modify the script above to accomplish this, but hardly elegant.
Hopefully somebody will find this useful and find a simple fix.... like perhaps there's another file type that short-circuits the checking magic? Also, the Apple developer documentation say that script files could go into a specially named subfolder, which would be much simpler, but I've haven't gotten this to work.
-
out of curiosity, is
file
used locally, or on the server?
Couldn't you use th older file version for identifying text files? -
@JonB said:
out of curiosity, is file used locally, or on the server?
Yes, It's locally.
@TheRealBret
You can replace older version of 'usr/bin/file' and 'usr/share/file' to fix it, if your mac os version has updated to 10.13.