omz:forum

    • Register
    • Login
    • Search
    • Recent
    • Popular

    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.


    When will OMZ release an Xcode Template for Python3?

    Pythonista
    13
    57
    40186
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • RomSpy
      RomSpy last edited by

      @vignesh Are you archiving your app before uploading? If that is not working export your .ipa file and use the application loader instead that usually solves the problem you are describing.

      vignesh 1 Reply Last reply Reply Quote 0
      • vignesh
        vignesh @RomSpy last edited by

        @RomSpy which files did you have to add the #import 'pythonista' line on? Even on application loader I am still getting the same error

        1 Reply Last reply Reply Quote 0
        • RomSpy
          RomSpy last edited by RomSpy

          @vignesh You need to add it to every .py file in the template. You shouldn’t get an upload error just the code not signed error from not having the import Pythonista.

          Try this: https://stackoverflow.com/questions/46463778/xcode-9-an-error-occurred-uploading-to-the-itunes-store

          vignesh 1 Reply Last reply Reply Quote 0
          • vignesh
            vignesh @RomSpy last edited by

            @RomSpy I tried what was provided in the stackoverflow, but it did not make a difference. Do you happen to remember which files from the Pythonista3Xcode Template you had to add the #import 'pythonista' line to? I already did the one for the py3kit_preflight.py

            JonB 1 Reply Last reply Reply Quote 0
            • ccc
              ccc last edited by

              I find the template and the info on how to use the template to be in Dropbox and scattered across numerous forum threads. It would be more helpful if the up-to-date template with docs and a few working examples were in a repo. https://github.com/omz/PythonistaAppTemplate or other.

              1 Reply Last reply Reply Quote 0
              • JonB
                JonB @vignesh last edited by

                @vignesh you have to fix every .py file. Are you getting code signing errors?

                vignesh 1 Reply Last reply Reply Quote 0
                • RomSpy
                  RomSpy last edited by

                  @vignesh I will upload the fixed template for you later today.

                  vignesh 1 Reply Last reply Reply Quote 1
                  • vignesh
                    vignesh @JonB last edited by

                    @JonB I looked into it more and I'm pretty sure I am

                    1 Reply Last reply Reply Quote 0
                    • vignesh
                      vignesh @RomSpy last edited by

                      @RomSpy Thank you so much!

                      1 Reply Last reply Reply Quote 0
                      • RomSpy
                        RomSpy last edited by

                        Updated template https://www.dropbox.com/s/7t6ew3ts4e58l8e/Pythonista3AppTemplate.zip?dl=0

                        vignesh 2 Replies Last reply Reply Quote 1
                        • vignesh
                          vignesh @RomSpy last edited by

                          @RomSpy So in the updated template, in the Py3kit_preflight.py file, there is no "#import pythonista' " statement at the beginning, was this intentional?

                          1 Reply Last reply Reply Quote 0
                          • vignesh
                            vignesh @RomSpy last edited by

                            @RomSpy with the updated template, I am still getting code signing errors :(

                            RomSpy 1 Reply Last reply Reply Quote 0
                            • RomSpy
                              RomSpy last edited by

                              It was not intentional I must have uploaded the wrong file. Sorry. I will get a new one.

                              1 Reply Last reply Reply Quote 0
                              • RomSpy
                                RomSpy @vignesh last edited by

                                @vignesh sorry I pasted the wrong link. I have both the original and the modified template in my Dropbox. https://www.dropbox.com/s/mvzc0lhhv6pcfju/Pythonista3AppTemplate Updated.zip?dl=0

                                vignesh 1 Reply Last reply Reply Quote 1
                                • vignesh
                                  vignesh @RomSpy last edited by

                                  @RomSpy it worked and my app is waiting on review now thank you!!

                                  RomSpy 1 Reply Last reply Reply Quote 0
                                  • RomSpy
                                    RomSpy @vignesh last edited by

                                    @vignesh You’re welcome.

                                    1 Reply Last reply Reply Quote 1
                                    • omz
                                      omz last edited by

                                      It looks like my workaround for High Sierra has stopped working on Mojave... Replacing the file utility 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.

                                      RomSpy 1 Reply Last reply Reply Quote 0
                                      • RomSpy
                                        RomSpy @omz last edited by

                                        @omz The version I have posted works on Mojave

                                        1 Reply Last reply Reply Quote 0
                                        • JonB
                                          JonB last edited by

                                          @omz From what I read, the file ~/.magic is checked by file before 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.

                                          1 Reply Last reply Reply Quote 1
                                          • dgelessus
                                            dgelessus last edited by

                                            @omz I just played around a little and found that #LyX at the start of a Python script apparently guarantees file to 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 file version (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.

                                            @JonB ~/.magic is 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 file every time they improve their Python patterns.

                                            1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post
                                            Powered by NodeBB Forums | Contributors