• madivad

    Good point re local decreyption key and storing it in the cloud.

    TBH, it's more an exercise in "how" to do it, mostly because I've never worried too much because it is only me. But I'm looking to want to do more interesting stuff with APIs that are potentially dangerous (very limited financial access) and also "play" with the idea of using git a bit more (I am aware of .gitignore and will be using it).

    No github login credentials or deliberate sharing of any ssh keys or anything like that, certainly not intentional.

    With "the cloud: it's not so much a concern of a targeted attack or anything like that, but just a leaking of information, say through an app that may have too much privilege or a little more scope than what I intended. And just about learning better practices.

    For the time being I have independent files on the devices, but this project is going to get bigger (hopefully) and so I might move development to an actual computer as I am always hampered by doing real coding on the ipad. I DO do it, but it's just never great.

    For the time being I just have a single import which has the credentials on the device itself, ie not in the cloud. It's probably better that way :)

    posted in Pythonista read more
  • madivad

    ahh no worries then.

    What's the best way to "secure" these keys to be used by multiple devices?

    Obviously importing them from another file from the cloud means they are "on the cloud".

    Can python scripts in the Cloud data area access scripts on your device area?

    I think I'll probably just include a key script file on each device, I'm guessing that's the norm? I don't plan to distribute that file off my device, should I be concerned about encrypting it?

    posted in Pythonista read more
  • madivad

    What’s the best way to use environment variables for Pythonista? And how do I set them in the first place? I’m looking to not store an api key in a file if I can avoid it. I’ve been all through the settings and I nothing jumped out at me.

    I do realise I could import keys from an external file but I’m surprised I haven’t seen anything specific for Pythonista since we don’t have that level of customisation with our (i)OS :)

    posted in Pythonista read more
  • madivad

    @bennr01 That is a brilliant and well constructed reply. Great work.

    posted in Pythonista read more
  • madivad

    I’d forgotten about your repos!

    I ended up working it out, for me it’s the custom dialog where the control is misaligned, with the inbuilt control it aligns correctly

    Edit: just confirmed, I downloaded that git, comment out line 89 (and join 90 back to the end of 89) and then edit the 'diag' at the end of the doc from:

    diag = dialogs.form_dialog(title = 'Form Dialog', sections=form_list_of_sections)
    

    To

    diag = my_form_dialog(title = 'Form Dialog', sections=form_list_of_sections)
    

    And run that on a smaller screen

    posted in Pythonista read more
  • madivad

    I think I may have solved this issue...

    I’ve created dozens of files over the last couple of weeks trying to get to the bottom of this. But syncing between the iPad and iPhone has just stopped working for pythonista (only, everything else has been fine)

    It IS a shame pythonista doesn’t have a “pull down” refresh option at the top of the iCloud folder, but what I have found is that if I go to the file explorer on the left and go down to “Open External” and then select files (as opposed to folder, it’s not guaranteed to work there), I can see all the files, even newly created files on either device. The iCloud folder in that location is up to date, it’s just that pythonista’s version of it hasn’t refreshed (at least in my case) for whatever reason...

    But now, after having done that, it seems this may be fixed! So far so good!

    posted in Pythonista read more
  • madivad

    @cvp just because this has got a little disjointed and long and a few edits have been made here and there, could you paste the entire source in the next response please?

    I’m about to test something else, downloading pythonista on one of my old phones... I want to rule something out :)

    posted in Pythonista read more
  • madivad

    @cvp yeah that’s it, from your previous post (before this one) I went looking and did find it...

    Yeah, they are both set to push, I was kinda hopeful for a moment that was the problem, but it does not appear so... :(

    posted in Pythonista read more
  • madivad

    @cvp amazing content as usual! That is cool (the images).

    Something interesting, what happens when you run one of these on your phone? For me, the segmented control is largely off the screen (form/dialog).

    segmented control off screen

    posted in Pythonista read more
  • madivad

    Interesting that you mention the push data setting... I too have been having issues having iCloud sync between devices. This wasn’t a problem before updating my iPad to iOS 13, that’s possibly not related, but it sure seems to be.

    I have to manually force an update every time to get data in pythonista shared via the iCloud mechanism, it’s becoming a real PITA. (As discussed in this thread: https://forum.omz-software.com/topic/6091/icloud-syncing-and-pythonista )

    I’m curious, you talk about the push data setting on an older iPad mini, I was wondering what iOS version? And would you be able to describe in great detail where that exact setting is? I’ve search in both devices and I’m not seeing anything that gives me that specifically. I’m guessing my iOS is probably newer than that iPad (my phone is iOS 12 and the iPad iOS 13).

    posted in Pythonista read more
  • madivad

    @simon_hibbs did you end up making anything of this?

    posted in Pythonista read more
  • madivad

    @tomkirn yes, how did you find that? I too was going by the docs, happening across this tonight “fullscreen” fixes it. Thanks.

    posted in Pythonista read more
  • madivad

    Lol, I had missed that! iPhone 5S. OMG, the code area would be so small! Lol

    posted in Pythonista read more
  • madivad

    @cvp said:

            cell.content_view.remove_subview(tf)
            del self.values[tf.name]
            del tf 
    

    I knew it was something like that, I was giving it a go but hadn’t got it right.

    Thanks.

    posted in Pythonista read more
  • madivad

    @cvp are all your devices on iOS 13?

    I have a hunch that because the latest beta was compiled under Xcode with iOS 13 in mind, that the issue is with my iOS 12 iPhone. I’ll update it probably soon, and see how we go then.

    posted in Pythonista read more
  • madivad

    @cvp I always found it to be ok when everything was on iOS 12, however, now they just don’t synchronize at all... ever.

    It would be interesting to see the comparison when two devices are on iOS 12 or iOS 13 (ie on the same iOS). Give the issues Apple has with iOS and cloud , it’s quite possible something changed between the two iOS.

    Regardless, using working copy and forcing a sync, always works. It would be very handy if pythonista had the same functionality, yet at least we have that (if you have it installed!)

    posted in Pythonista read more
  • madivad

    @cvp I finally got back to this, I got it all working as expected, the only issue I have is with the custom rows (My segmented control*, My button, and My face), they allow the cursor into the row label on the left hand side if the user touches near them.

    I’ve spent a couple of hours going over the cradle and only minimally beginning to understand it :)

    * the segmented control is ok in the custom/my_form_dialog and doesn’t allow the cursor in. It only allows the cursor when using the inbuilt dialog.

    posted in Pythonista read more
  • madivad

    Interesting. For me, it’s in either direction...

    When it first happened, I created files : aaa on one and bbb on the other...

    They never synced.

    But since my working copy back, they do, it’s only when .... !!!

    I just realised I hadn’t run the working copy hack in reverse (from the iPhone to the iPad!). In just checking the iPad, I found that files are still not here from the iPhone (all in the pythonista iCloud folder!).. oh well, all transfered now!

    posted in Pythonista read more
  • madivad

    @cvp you are incredible...

    I saw your first posts on the way to work and thought, “yeah, I have to get to that!” And now I log back and on and find this!!!! MUCH to digest!

    I will be back (busy the next few days, but the kids are on holidays after tomorrow and I’ll slow down on the workload, so I should be able to get into this more)

    Seriously, thanks for your contributions, you are awesome!

    posted in Pythonista read more
Internal error.

Oops! Looks like something went wrong!