When will OMZ release an Xcode Template for Python3?
Is it in the works? As soon as its available I'll be able to move forward on a lot of projects.
It looks like my workaround for High Sierra has stopped working on Mojave... Replacing the
fileutility that Xcode uses doesn't seem entirely trivial, due to System Integrity Protection.
I still have a Mac with High Sierra to upload builds, but I think I'll have to change my approach pretty soon, and there isn't really much of a point releasing the Py3 template as it is, because it's probably broken for everyone on Mojave…
If I don't find a better way, I might just package the standard library as a zip file, and unzip it on first launch, but that would require more storage space and also slow down the first launch.
@omz The version I have posted works on Mojave
@omz From what I read, the file ~/.magic is checked by
filebefore using the usual /usr/share/misc/magic.mgc, though maybe that is not documented anywhere. So you might try crafting a file there and see if you can get file to change its output.
@omz I just played around a little and found that
#LyXat the start of a Python script apparently guarantees
fileto recognize it as a LyX document, overriding all of the Python code detection patterns. I'm still on OS X 10.11, but I have a newer
fileversion (5.35) installed through MacPorts, so hopefully its behavior is close to the version that 10.14 has.
I don't quite understand how magic file entries are prioritized and why exactly this works. I'm guessing it's because the LyX pattern looks for a literal string at byte 0, whereas the "smart" Python code detection patterns do a string search over a byte range, so the LyX rule is preferred because it's simpler.
~/.magicis documented in the manpage of my MacPorts version of
file, but not in the OS X default version's manpage. Maybe it's just a version difference, in which case it should work on 10.14. A custom magic file would probably be the best solution, so we don't have to keep looking for new ways to trick
fileevery time they improve their Python patterns.
@JonB That's really interesting, but I can't get it to work.
filejust ignores my custom
~/.magicfile (that works when I pass it with the
#LyXapproach seems to be working on Mojave, though I haven't yet tested with the entire library. Thanks!
Could you share the link to the latest Pythonista3 template again as the link above does not work anymore?
Also, have you also managed to successfully upload any app on macOS Catalina?
I would also be appreciated if you could post it again.
Thanks a lot in advance.
Here is the last version I used. I have not tried to use this in a while I imagine it may not work with the latest version of Xcode but you are welcome to try.
@RomSpy actually your template works well with today’s XCode & latest iOS 14. I only had to on/off the Workspace checking in the build settings, and that’s it. Thanks!
Thanks for this!
When I physically connect an iPad it works beautifully in Xcode 13.3.1 (MacOS 12.3.1) on a Mac Mini M1
However, building for a simulator, I get this:
ld: building for iOS Simulator, but linking in dylib built for iOS, file '/Users/andreas/Library/Mobile Documents/com~apple~CloudDocs/CloudSrc/Pythonista3AppTemplate Updated/Pythonista3AppTemplate/Py3Kit.framework/Py3Kit' for architecture arm64
I suspect the linker is telling me that the arm64 version is meant for an iOS device and that it is missing an arm64 version for MacOS? Does anybody know of a solution?