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.


    Best way to deploy an app for private company use

    Pythonista
    4
    9
    3647
    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.
    • d_elphee
      d_elphee last edited by

      My apologies if this has been answered in the past, but I have been searching and coming up empty. I am very new to programming in general, but I have written an app for people in my company to use. I am wondering what the best way to deploy it is. If everyone downloads the Pythonista app, and I put my app on their iPad, then they can use it but it is very easy for them to accidentally mess up the code and render it useless. If this is the best option then so be it, but I thought I'd ask the question and see what you all have to say. Thank you.

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

        I haven't done this yet, but it is possible to submit pythonista apps to the AppStore. On omz's GitHub (the admin) you can find a template for using pythonista code in Xcode, from where your code can be submitted for everyone to download.

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

          if you use pythonista, you could have your script wtite-protect itself, which at least makes it harder to accidentally edit. or put the major logic inside a zip file, and use zipimport

          d_elphee 1 Reply Last reply Reply Quote 0
          • ellie_ff1493
            ellie_ff1493 last edited by

            i'd hash the py files to see if something changed but I don't know how well that will work and it only tells you something is wrong and doesn't fix it

            d_elphee 1 Reply Last reply Reply Quote 0
            • d_elphee
              d_elphee @Drizzel last edited by

              @Drizzel thank you, I’ve read about this. Needs to be Python 2.x, right?

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

                @JonB I’ll google how to write-protect... didn’t know you could do that. I don’t understand about the zip file thing. Could you elaborate how this works?

                1 Reply Last reply Reply Quote 0
                • d_elphee
                  d_elphee @ellie_ff1493 last edited by

                  @ellie_ff1493 good idea; at least I’d know if an error was an unintended edit or some other problem.

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

                    https://forum.omz-software.com/topic/3713/preventing-app-from-being-changed/2

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

                      as for zipmport, you would do
                      sys.path.insert(0,'pathtozipfile.zip')
                      then simply import the name

                      https://docs.python.org/2/library/zipimport.html

                      so your main script might look like
                      mainscript.py:

                      os.chmod(file, 0o100444)
                      sys.path.insert(0,'myfile.zip')
                      import myapp
                      myapp.main()

                      where you include a file myapp.py in myfile.zip, which includes a main() function that has your app's logic.

                      for initial installation, you might point them to a bit.ly link which includes an executable url:
                      https://forum.omz-software.com/topic/3929/new-url-scheme

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