• filippocld

    It is possible, @omz just has to set “.md” as a compatible file extension in the Editorial’s info.plist file

    Even better would be a QuickLook extension, which lets you preview the file directly in the Files app

    posted in Editorial read more
  • filippocld

    I believe you have to this from a Mac by reading all iCloud tabs, if i try and succeed i'll tell you :-)

    posted in Editorial read more
  • filippocld

    @rtorot there's the objc_util module and with it you can do anything if you know objective c and ctypes

    posted in Editorial read more
  • filippocld

    The big advantage of editorial is that you can extend all the app's functionality through the Python programming language. (And by all i mean you could theoretically make an app in editorial, if you know how to use Objective-C).
    But there are more user friendly modules such as the ui module which lets you create simple user interfaces.

    If you don't know how to use python there is still a block based workflow system which is pretty powerful. And you can still build UIs with that.

    Editorial also includes an handy web browser (i am not sure if 1Writer has it)

    Plus if i am not mistaken there's an update coming in the future :-)

    posted in Editorial read more
  • filippocld

    Yeah, it takes a bit more but it's usable. Let's hope for some speed in the future :-)

    posted in Pythonista read more
  • filippocld

    Maybe it can be used for most cases. I'd really like this syntax

    posted in Pythonista read more
  • filippocld

    What does ObjCInstance(self).tag=hash('SideBar') do?

    posted in Pythonista read more
  • filippocld

    When iOS 10 was released i did this script to show a notification. The problem is the two action buttons are not shown. Does anyone know what is the problem?

    from objc_util import *
    import random
    
    load_framework('UserNotifications')
    
    nc = ObjCClass('UNUserNotificationCenter').currentNotificationCenter()
    nc.requestAuthorizationWithOptions_completionHandler_(4L, None)
    
    err = None
    d = NSDictionary.dictionary() #empty dict
    
    # imgurl = nsurl('file:///private/var/mobile/Containers/Shared/AppGroup/09FE1A2B-E1E5-4112-B78F-665929FD7600/Pythonista3/Documents/Objective-C/swift.png') #gets deleted somehow...
    imgurl = nsurl('file:///var/containers/Bundle/Application/586AFA89-329A-4E66-9221-2D9EA78A4F46/Pythonista3.app/AppIcon60x60@3x.png')  # Must be a local file
    
    action = ObjCClass("UNNotificationAction").alloc()._initWithIdentifier_title_options_('firstButton', 'First', d)
    action.isAuthenticationRequired = True
    #action.isDestructive = True  # Red Text
    
    textaction=ObjCClass("UNTextInputNotificationAction").alloc()._initWithIdentifier_title_options_textInputButtonTitle_textInputPlaceholder_('textInput','Title',d,'InputButtonTitle','Placeholder')
    
    category = ObjCClass("UNNotificationCategory").alloc()._initWithIdentifier_actions_minimalActions_intentIdentifiers_options_('pythonista', [action,textaction], [action,textaction], d, d)
    
    nc.setNotificationCategories_([category])
    
    attachment1 = ObjCClass("UNNotificationAttachment").attachmentWithIdentifier_URL_options_error_('pythonistaimg', imgurl, d, err)
    
    content = ObjCClass("UNMutableNotificationContent").new()
    content.setCategoryIdentifier_('pythonista')
    content.title = 'Hello, iOS 10'
    content.subtitle = 'Introduction to Notifications'
    content.shouldAddToNotificationsList = True
    content.badge = random.randint(1, 100)
    content.body = "Let's talk about notifications!"
    content.shouldAlwaysAlertWhileAppIsForeground = True
    #content.attachments = [attachment1] #Commemted for debug purposes
    
    trigger = ObjCClass("UNTimeIntervalNotificationTrigger").alloc()._initWithTimeInterval_repeats_(1, False)
    request = ObjCClass("UNNotificationRequest").alloc()._initWithIdentifier_content_trigger_('pythonistaNotification', content, trigger)
    
    nc.addNotificationRequest_(request)
    

    The Notification is shown but has no buttons.
    I've seen people say "you have to specify a delegate" but i've seen others that don't use it. So I dunno

    Thanks in advance,
    Filippo

    posted in Pythonista read more
  • filippocld

    I am not 100% sure but since iOS is sandboxed I don't think it can be done

    posted in Pythonista read more
  • filippocld

    Maybe you can download the cert, but the signing part should be done by Xcode codesign, so i don't think that's possible

    posted in Pythonista read more

Internal error.

Oops! Looks like something went wrong!