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
    40205
    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.
    • vignesh
      vignesh last edited by

      This post is deleted!
      1 Reply Last reply Reply Quote 0
      • vignesh
        vignesh @omz last edited by

        @omz in this new template do you guys have photos working?

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

          @omz I am not sure if it is just me but the new template works great in the simulator but I cannot upload it to the App Store because it has the same code signing errors the previous template had.

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

            @RomSpy Could you show me a screenshot of those errors?

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

              @omz it may be operator error. I found an issue with how I was signing the app. I tried to upload it again to see but I am just having connection errors right now.

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

                @omz after messing around with the template and my code signing settings which work on the previous template this is what I found:

                I added #import 'pythonista' to the pykit_preflight.py and the error went away on that file.
                Also it seems that any .py file with a "#!" near the top also has code signing issues.

                I may be doing something wrong as I am not that familiar with Xcode code signing but on the off chance that it is not me here is the error code.

                The error received is:

                ERROR ITMS-90035: "Invalid Signature. Code object is not signed at all. The file at path [Pythonista3AppTemplate.app/Frameworks/Py3Kit.framework/pylib/wave.py] is not properly signed. Make sure you have signed your application with a distribution certificate, not an ad hoc certificate or a development certificate. Verify that the code signing settings in Xcode are correct at the target level (which override any values at the project level). Additionally, make sure the bundle you are uploading was built using a Release target in Xcode, not a Simulator target. If you are certain your code signing settings are correct, choose "Clean All" in Xcode, delete the "build" directory in the Finder, and rebuild your release target. For more information, please consult https://developer.apple.com/library/ios/documentation/Security/Conceptual/CodeSigningGuide/Introduction/Introduction.html"

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

                  there was a long thread about this topic. The issue is that the file command says .py files are executable, and thus need to be signed. The import pythonista was to trick file into thinking it is objc source code. It should be possuble to create a custom .mgc file that file uses to determine file types, and maybe trigger on the shebang line, etc, that makes it say it is a plain text file.

                  others created a script to go through every file in the template and add the import statement.

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

                    @omz is there any chance we'll get a today widget for this App Template? Maybe have two separate scripts, main.py for the main app and today_widget.py for the today widget?

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

                      @JonB Where would you put the import statements? When I say #import "pythonista" it says that 'pythonista' file not found

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

                        @RomSpy Did you figure out how to get your app uploaded?

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

                          Sorry, i should have linked to the long thread:
                          https://forum.omz-software.com/topic/3744/xcode-template-for-pythonista/31?page=2

                          Near the middle, someone posted a script that automatically inserted #\input texinfo at the start of every file, but it required sometimes hundreds of these. Later omz said that tou could replace that with #import pythonista, which fools the filecommand. you could probably modify the script to use that instead.

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

                            This post is deleted!
                            1 Reply Last reply Reply Quote 0
                            • vignesh
                              vignesh @JonB last edited by vignesh

                              @JonB

                              So for example, this file is the PYAAppDelegate.h and I put '#import pythonista' at the top as seen in the code excerpt below.

                              //
                              // AppDelegate.h
                              // Pythonista3AppTemplate
                              //
                              // Created by Ole Zorn on 25.08.18.
                              // Copyright © 2018 Ole Zorn. All rights reserved.
                              //

                              #import pythonista
                              #import <UIKit/UIKit.h>

                              @interface PYAAppDelegate : UIResponder <UIApplicationDelegate>

                              @property (strong, nonatomic) UIWindow *window;

                              @end

                              This results in an error that states "Expected "FILENAME" or <FILENAME>"

                              What do I do to get rid of this error?

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

                                No no no. You only add this to the python files (.py), not .h or .c or .m, etc.

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

                                  @JonB ok so now the only problem I'm having is the error saying :

                                  "App Store Connect Operation Error
                                  ERROR ITMS-90035: "Invalid Signature. Code object is not signed at all. The file at path [Pythonista3AppTemplate.app/Frameworks/Py3Kit.framework/pykit_preflight.py] is not properly signed. Make sure you have signed your application with a distribution certificate, not an ad hoc certificate or a development certificate. Verify that the code signing settings in Xcode are correct at the target level (which override any values at the project level). Additionally, make sure the bundle you are uploading was built using a Release target in Xcode, not a Simulator target. If you are certain your code signing settings are correct, choose "Clean All" in Xcode, delete the "build" directory in the Finder, and rebuild your release target. For more information, please consult https://developer.apple.com/library/ios/documentation/Security/Conceptual/CodeSigningGuide/Introduction/Introduction.html""

                                  I think that's the last roadblock. Thanks so much for your help so far!

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

                                    @JonB hmmmm, now when I try to upload it again all it says is "app store connect operation error: an error occurred uploading to the app store"

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

                                      Did you add that line to the pykit_preflight.py?

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

                                        @JonB what is pykit_preflight.py? I don't have that file

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

                                          Did you read the error message?

                                          Pythonista3AppTemplate.app/Frameworks/Py3Kit.framework/pykit_preflight.py

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

                                            @JonB Nevermind, I found it after showing the package contents of the py3kit framework!

                                            But now I while i'm uploading, it stopped after a full bar stating "Completed App Store Operation" and it seems like it should be done, but it's not finishing the upload.

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