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.


    New Xcode Template (beta)

    Pythonista
    13
    31
    35309
    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.
    • jup310
      jup310 last edited by

      Hi, I tested the script using canvas module,
      but the program has stopped with an error below.

      Error (line 2): No module named canvas

      Do not support "canvas" in this version ?

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

        Thanks, could be that I forgot to include that, I'm looking into it.

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

          ...should be fixed now.

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

            Note that the simple crash in the TableView UI from the ui-tutorial, as reported here is fixed in this latest Xcode template.

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

              @omz, Thank you.
              now canvas is OK.

              The result of the last line's 'print "Selected File ="...' in this " file selection script " is not displayed.

              It displays in v1.5 or Pythonista IDE.
              Does this script is wrong ?

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

                UI works fine, but it possible to end the UI with the two fingers gesture which leaves the app in an unusable state. Is it possible to add a configuration switch for disabling the gesture or to disable it when running as separate app outside pythonista?

                Files dropped in the Script folder are read only in the documents folder after 'xCoding' (?) How can I add a file which I want to edit or to replace from outside (f.ex. a database file updated via iTunes/UIFileSharing)?

                Regards Tom

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

                  @tomkirn

                  UI works fine, but it possible to end the UI with the two fingers gesture which leaves the app in an unusable state. Is it possible to add a configuration switch for disabling the gesture or to disable it when running as separate app outside pythonista?

                  I have that on my todo list.

                  Files dropped in the Script folder are read only in the documents folder after 'xCoding' (?) How can I add a file which I want to edit or to replace from outside (f.ex. a database file updated via iTunes/UIFileSharing)?

                  If I understand you correctly, the easiest way would be to enable iTunes file sharing for the app. Just open the Info.plist file in the project, add a new row (select the last row and click the '+' button), enter UIFileSharingEnabled as the key, and select YES for the value. When you deploy the app to a device now, it should show up in iTunes' file sharing interface.

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

                    @OMZ: That's exactly what I have done.....and it is not my problem.

                    An example: in folder scripts I have three files (main.py, main.pyui, bes.db). All the files will be placed in the documents folder and can be accessed in iTunes. So far it is working well.

                    Now I replaced the bes.db via iTunes and start the program again. Surprise! The new bes.db will be overwritten with the old one and is gone. Another look into documents will show up the old version again.

                    Have I done something wrong?

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

                      OMZ,

                      Thanks so much for your effort. I can get an app to build, but when I try to add the .ipa to my device (ad hoc via iTunes) it says that it cannot be added because it's not a valid app.

                      I have a valid bundle ID, the info.plist looks OK, I can't figure out what it is. My PyCharm/Kivy-ios builds and techBASIC builds work fine.

                      Any thoughts?

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

                        OMZ,

                        FYI, I just replaced your info.plist with one from a working kivy-ios project and that works OK. Update: A newbie error I guess -- apparently the LS key LSRequiresIPhoneOS is required to build an app!

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

                          Love the new template! One thing: I can't seem to get the Pythonista 1.6/iOS 8 document picker in the dialogs module to work. Launching it makes my app crash. Any suggestions?

                          Thanks!

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

                            Quick tip: one of the differences between the previous template and this latest one, is that the "Skip Install" flag in the Build settings is set to Yes. This means that when you create an App Archive for submitting to the store, it doesn't automatically export it to your Organizer Tool.

                            I haven't gone through the whole pipeline with this project template yet: script in Pythonista on the iDevice -> porting script to Xcode -> debugging in Xcode -> submitting to store -> distributing on store; it's not a priority for me at this point, but I have been playing with some of the settings. You've given us a good tool, @omz, to learn Xcode at a very superficial level, thanks. Anybody gone through the whole pipeline yet?

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

                              @dvader9: I've done ad hoc deployment to local iPads. The template works well on the few examples I've tried. The modifications I had to make to the info.plist file are the "LSRequiresIPhoneOS" key as I mentioned above and that "Skip Install" flag in the Build Settings that you mentioned.

                              The kids in my class will soon be creating apps for submission -- I'll let everyone know how that goes.

                              @OMZ: Thanks again for all your work!

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

                                I was this close to posting a bug report about how I couldn't run the vanilla template. But then I read the part about using a non-64 bit simulator.

                                Anyways. THIS IS AWESOME! I'm excited.

                                Oh yea - will this not work for UI generated using the 1.5 version of pythonista?

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

                                  @omz This is probably a question directly for you.

                                  When running an app built with the Xcode template, the launch screen/image is shown and then a screen similar to the Pythonista console is shown for a few seconds. After that the app starts.

                                  I assume the console-like screen is loading up Python and all your code, but is there a way to overwrite this screen and possibly continue to show the launch screen/image defined in Xcode (or a custom image of some sort)? This would make the transition from launch screen to app much smoother looking.

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

                                    I was also curious about the question above. Not having a smoother transition from splash screen to app could hurt overall ux. @andymitchhank have you tried dropping the splash screen? Do you still see the "load" page so to speak?

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

                                      @jfryznke Just tested your idea and, unfortunately, the load page was still visible for a few seconds before the application loaded.

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

                                        @andymitchhank hmmm, hopefully @omz has a solution. I haven't come across this anywhere else in the forums or in my own experience using pythonista/xcode. I haven't taken anything COMPLETELY through the pipeline yet, so I'm not sure if I would encounter a similar problem but I love to troubleshoot before I get there and help others troubleshoot to learn from their experience. Keep me posted on your progress and I'll update you if I have a similar issue.

                                        In my other xcode experiences using a language other than obj c, I've never seen/heard something like this...it is intriguing.

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

                                          I haven't worked with the most recent XCode template, but my experience with the prior one is the same. My splash screen shows up, then everything goes blank for a second or 2, then my interface appears.

                                          I would really prefer that my splash screen remain visible till my first UI update takes place. Is there some way to force that to happen?

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

                                            @jesse so do you just experience a blank screen for a brief moment or a page filled with code?

                                            I feel that just a blank screen for a few moments is less of an issue than the problem @andymitchhank cited

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