• arandomperson

    @mikael I assume so but I haven’t tested it with any other players, nevertheless it would probably be easy to support them.

    posted in Pythonista read more
  • arandomperson

    Hi there! I have been working on this module for the past few days and I think it's ready to be shared. Find it here.

    This provides the following classes,

    • MusicQueueViewer
      • Provides a viewer to select a song/songs in the queue.
    • MQVSong
      • A wrapper for MPMediaItem.
    • MusicPlayerController
      • Provides methods to replace and reorder the queue.

    Currently, for MusicPlayerController, those are the only two methods, but contributions are always welcome. And this requires the rubicon module.

    The repo also has two examples,
    Upnext, allows the user to select multiple songs to be moved up in the queue and to be played next.
    MusicStopper, allows the user to select the last song to be played, I find this useful when I am playing music to go to sleep.

    Have fun!

    posted in Pythonista read more
  • arandomperson

    Assuming that you’re typing, you can try to shake your device

    posted in General Discussion read more
  • arandomperson

    @mikael well, ever since the update, UITableViews are always in the native light theme and I want a native dark theme one. Other than that though... maybe I'm just crazy.

    posted in Pythonista read more
  • arandomperson

    @cvp I Swear I tried that before lol. Thank you so much!

    posted in Pythonista read more
  • arandomperson

    Hello! I'm making a UITableView by scratch, and am trying to use the constant "UITableViewAutomaticDimension" for the row heights. But I am having trouble accessing it. I have tried using the C function "CFBundleGetDataPointerForName" and the following,

    lib = ctypes.CDLL(None)
    print(lib.UITableViewAutomaticDimension)
    pointer = ctypes.cast(lib.UITableViewAutomaticDimension, ctypes.c_void_p)
    print(objc_util.ObjCInstance(pointer))
    

    Any help would be great!

    posted in Pythonista read more
  • arandomperson

    @JonB yeah, changing c_void_p to c_byte still results in a crash with the same fault log, and setting the handler to None also results in a crash with the same fault log.

    posted in Pythonista read more
  • arandomperson

    @JonB oops my mistake, though it still crashes unfortunately.
    Thanks for the reply!

    posted in Pythonista read more
  • arandomperson

    I'm trying to implement Face ID in a script, but following the example Touch ID scripts it just results in a crash, with faulthandler just saying Aborted

    This is what i'm using,

    from objc_util import *
    
    context = ObjCClass('LAContext').alloc().init()
    policy = 1
    reason = "FaceID Testing"
    
    def _handler(_cmd, success, error):
        autherr = ObjCInstance(error).localizedDescription()
        print(autherr)
        if success:
            print('authenicated')
    
    handler = ObjCBlock(_handler,restype = None, argtypes = [c_void_p, c_void_p, c_void_p])
    context.evaluatePolicy_localizedReason_reply_(policy, reason, handler)
    

    Using the "canEvaluatePolicy:error:" function, it returns true, so i'm assuming that Face ID works.
    Also setting policy to 2, defaults to passcode authentication.
    Of course it can as simple as @omz not adding "NSFaceIDUsageDescription" to pythonista's Info.plist

    Thanks for any help!

    posted in Pythonista read more
  • arandomperson

    @mikael faulthandler seems really useful, Thanks!

    posted in Pythonista read more

Internal error.

Oops! Looks like something went wrong!