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.


    Publishing a UI Project to the App Store?

    Pythonista
    publishing exporting app store
    8
    14
    15380
    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.
    • procryon
      procryon last edited by

      Hey all, I have a quick question. I have a couple UI apps semi-finished and was wondering if it’s possible to export them to Xcode or get them to the App Store somehow. I’ve read that there are ways to export Pythonista apps if they’re written in Python 2.0 or something like that but never the UI.

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

        I am very interested in answers to this question even if (being new to Pythonista) I can't help.

        I would like to deploy UI apps on devices for users (family) who would have a lot of difficulty entering Pythonista, finding the script and then finding the run button and then finding their way out of it.
        Ideally I would like to encapsulate my script/UI in an App available through an Icon to the user. I am not interested in publishing to the AppStore because these apps are for customised day to day management and are of no interest to other users. (I don't mind publishing the code, I just don't see the need to clutter the AppStore with trivia).

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

          Apple wants highly polished apps that are broadly applicable to many people so they will probably reject apps that are hackish or just for my family for inclusion in the official App Store. Last time I looked, they also required a $99 membership in their Developer Program. https://forum.omz-software.com/topic/3744/xcode-template-for-pythonista talks about recent experiences using https://github.com/omz/PythonistaAppTemplate to publish Pythonista apps to the App Store.

          1 Reply Last reply Reply Quote 0
          • Phuket2
            Phuket2 @olly last edited by

            @olly , have a look at this link about Pythonista's URL scheme. You can create a Home screen Icon that could run your script. As long as you did the setup for family and friends you should be able to make it fairly painless thing for them to run your script.
            But you have made me think of something. Would be nice if Pythonista had a param that could be passed to run Pythonista in a non development mode. Not as a security measure, just more like you describe. They click an icon on the home screen and basically Pythonista goes into a type of silent mode just to host the script.
            I will put an issue on the Pythonista github repo. I think this would be a great addition. It may have be requested before, not sure.

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

              Thanks for the help guys, one last thing. If I used the Pythonista UI Editor, will I need to rewrite it as a script or is it possible to export that?

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

                Yes you can publish apps to the App Store. As indicated above, you need to be a registered developer etc. You also need to use the modified Xcode package which includes the “texinfo” workaround.

                If your app idea is just for family, distribute it using TestFlight and avoid the app approval process and Apple’s UI rules etc. It’s like a private App Store, and you can send it to up to 2000 people.

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

                  @Phuket2

                  It would be great if the non-development mode is implemented. I would like to know if it is possible that when the use tap the “X” in my view window(full screen), it will transfer the user to the home screen so that he/she won’t modify my code accidentally. Is it even possible to take away the “X” so that it would just like a real app?

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

                    Hello. I have a couple simple apps on the app store (https://itunes.apple.com/al/developer/donnie-herman/id837266303) and more on the way, so I may be able to offer some information about your options. I provided 3 options I know of, starting with the most elegant method moving to the least elegant method. Method 1 and 2 require a Mac.

                    1. Publish on App store. Create an iOS developer account and publish the app through Xcode. The App store requires a $99/year fee. You can submit apps there free for download, even if it has a limited user base. It requires some time to get all the icons and description Apple worthy, but it is smooth sailing after that. Apple will reject it if it has no lasting value for the customer. However, if it is presented as a tool, Apple will not be so strong on the criticism as it is hard to gauge if it is functional value or not. Once on the App store, it will require some maintenance over time as iOS updates. App store apps should be updated at least once a year by compiling under the latest Xcode. You can also distribute the app via TestFlight and share a download link. You do not need to have it approved on the app store for Test flight, but will still have to pay $99/yr.

                    2. Manually install the app on the device. If you can physically hold the device in your hand, you can do the following.

                    • Run your Pythonista app in Xcode using @omz's Xcode template.
                    • You can test your app using the iPhone simulator or by plugging in the device.
                    • In this case plug in your family members phone or iPad to a MAC and run Xcode pointing to that plugged in device. The app will install on their phone and will work just like an App store app. You can disconnect the phone and that family member is set run the app anytime like normal.

                    Be aware that this app will not be updated or supported in any way, but only by manually installing via Xcode. It is possible an iOS update can break your app because the python APIs can become deprecated, and a app reinstall will be needed. Right now I have a bunch of real apps on my phone written in pythonista that I installed via Xcode. A great way to run unauthorized Apps.

                    1. Create a Pythonista script shortcut on the home screen or use the URL scheme. This is what @Phuket2 mentioned but I have done a twist on this to prevent exposing the code for accidental editing. One thing I do is I run the main program as a module, and call it will a different .py file. So if the user gets brought to Pythonista code editor, they only see the module being called and not the source code.

                    Good luck!

                    henryaukc 1 Reply Last reply Reply Quote 0
                    • donnieh
                      donnieh last edited by

                      @henryaukc I know you cannot go to the home screen from a script, but I have done both of the below methods.

                      1. Just call another app using the url scheme. For example, you could call the settings app. It doesn't get you home but it exits the app.

                      2. I have called a script before from my main script( the App ) where the called script was designed to crash pythonista. (Cringing is expected). It is such a dirty way, but it brought me to the home screen instantly when I needed. You can also open Safari with a bogus URL and get it to crash, leaving you at the home screen. Obviously these options are grabbing at straws but I'd thought I would share.

                      1 Reply Last reply Reply Quote 0
                      • henryaukc
                        henryaukc @donnieh last edited by henryaukc

                        @donnieh Thank a lot! I will consider to try option 1 & 2 when my script becomes useful enough to be put on App store or TestFlight with the annual fee $99. But you just give me a very promising future for me to looking forward. Thanks again for you detailed reply.

                        Regarding option 3, can you illustrate more with simple code? Can we set the python files as read-only?

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

                          @henryaukc To present a view without the x button, use the hide_title_bar=True parameter.

                          View.present(hide_title_bar=True)
                          

                          Swipe down with 2 fingers to kill the script.

                          henryaukc 1 Reply Last reply Reply Quote 0
                          • donnieh
                            donnieh last edited by donnieh

                            @henryaukc For option 3, main.py could maybe be:

                            import myapp
                            myapp.run()
                            

                            This is what the user would see if they ended up at the code editor. It is basically calling your app as a module. It is not a good solution but they will not easily be able to edit your code if the script stops. It there is an error with an input, Pythonista may bring the user to the source code though :(

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

                              you can set files as readonly, using

                              os.chmod

                              1 Reply Last reply Reply Quote 1
                              • henryaukc
                                henryaukc @donnieh last edited by

                                @donnieh

                                OH, this is what I need! Though I just discovered someone shared about using navigationView to do so. Thanks a lot!

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