• ProfSpaceCadet

    I made a module based on your code: https://gist.github.com/d44b83d80f2f77e4f832

    To run it you just call authenticate() with an optional string if you want to supply a reason. It will return True if the user authenticated (with either TouchID or passcode) and False if it was cancelled.

    posted in Pythonista read more
  • ProfSpaceCadet

    I have tried using SUIViewConrroller, but Pythonista still crashes. viewControllerForView_ seems to just return my original view controller.

    P.S. This seems to be more of a issue on iPad.

    posted in Pythonista read more
  • ProfSpaceCadet

    I am working on a Pythonista script that displays a UITabBarController, which contains multiple UINavigationControllers, containing UITableViewControllers. At some point I need to display a UIAlertController, but all the methods I've tried to present it either crash the app or push the UIAlertController to the navigation stack.

    My code:

    from objc_util import *
    from UIKit import *
    alert = UIAlertController.alertControllerWithTitle_message_preferredStyle_('Title', 'Message', 0)
    def alertActionCancel(sender):
      print 'Cancelled!'
    alertActionCancelBlock = ObjCBlock(alertActionCancel, None, [c_void_p])
    alert.addAction_(UIAlertAction.actionWithTitle_style_handler_('Cancel', 1, alertActionCancelBlock))
    myTableViewController.presentViewController_animated_completion_(alert, True, None) # This line crashes Pythonista

    Thanks in advance, any help is greatly appreciated.

    posted in Pythonista read more

Internal error.

Oops! Looks like something went wrong!