Ускорение Python

Попробуйте следующее:

func reloadComplicationTimeline() {
    #if os(watchOS)
    let server = CLKComplicationServer.sharedInstance()
    if let activeComplicationFamilies = server.activeComplications {
    for comp in activeComplicationFamilies {
        server.reloadTimeline(for: comp)
    }
   #endif
}



func sendComplication(complication: Complication) {
        guard WCSession.default.activationState == .activated else {
            delegate?.failedToSendComplication(reason: "Could not connect to your Apple Watch.")
            return
        }
        guard let context = convertComplicationToDictionary(complication: complication) else {
            delegate?.failedToSendComplication(reason: "Couldn't cast complication to a dictionary.")
            return
        }
        #if os(iOS)
        if WCSession.default.isComplicationEnabled {
            let userInfoTranser = WCSession.default.transferCurrentComplicationUserInfo(context)
            delegate?.didSendComplication()
        } else {
            delegate?.failedToSendComplication(reason: "Due to hardware limitations, you can only send a certain amount of complications in a day. You have exceeded that limit for today. You can still set complications from the Apple Watch app.")
        }
        #endif
    }

Вот хороший пример от Apple, который может помочь вам больше: источник

42
задан Blorgbeard 5 October 2008 в 22:30
поделиться

1 ответ

Помимо (отличного) psyco и (красивого) shedskin , я бы рекомендовал попробовать cython отличный форк из пирекса .

Или, если никуда не торопитесь, рекомендую просто подождать. Появляются новые виртуальные машины на питоне, и unladen-swallow станет популярным.

1
ответ дан 26 November 2019 в 23:16
поделиться
Другие вопросы по тегам:

Похожие вопросы: