ExtensionList: 一個快速獲取App Extension列表的Tweak.

English Version
Or you can directly go to my github page for further infomation.

ExtensionList 現(xiàn)已上架Bigboss源. 戳這里
Reveal2Loader也已上架,戳這里

Reveal升級2.0之后可以看Plugins,但是RevealLoader配合Applist只能看到用戶安裝的App,因此抽時間仿照Applist寫了ExtensionList并且開源。順便重寫了下RevealLoader,也開源在Reveal2Loader

ExtensionList

ExtensionList使用的是LSApplicationWorkspaceinstalledPlugins函數來獲取所有安裝的Plugin,其中包含Today Widget, AppleWatch App等各種App Extension,并支持predicate過濾。

詳細用法可以參考Applist的使用說明

ALSectionDescriptors

  • avaliable-extensions
    ExtensionList移除了ALSectionDescriptors字段suppress-hidden-apps參數。并增加了avaliable-extensions的BOOL屬性,用于過濾系統(tǒng)版本要求高于當前設備iOS版本的Plugin。默認值是true

  • predicate
    ExtensionList獲取到的是LSPlugInKitProxy實例的數組,predicate是針對這個類的屬性進行過濾。LSPlugInKitProxy其中一個屬性是protocol,對應的是iOS私有服務的ID。如你需要過濾today extension,就可以在predicate字段寫入protocol contains 'com.apple.widget-extension'

關于App Extension的類型,以及對應的ID,可以參考官網文檔,或者看extension(*.appex)對應的Info.plist中的NSExtensionPointIdentifier字段。

  • A demo of ALSectionDescriptors
ALSectionDescriptors = (
    {
        title = "Custom Keyboard";
        predicate = "protocol contains 'keyboard-service'";
        "icon-size" = 29;
        "cell-class-name" = ELSwitchCell;
        "avaliable-extensions" = 0;
    },
)

Reveal2Loader

內置了一個RevealServer-2的framework。路徑在/Library/Frameworks/RevealServer.framework,可以自己替換。
這個沒什么好說,只是改了下PreferenceLoader目錄下的plist。

IMG_2937.PNG
IMG_2938.PNG
IMG_2939.PNG
最后編輯于
?著作權歸作者所有,轉載或內容合作請聯(lián)系作者
平臺聲明:文章內容(如有圖片或視頻亦包括在內)由作者上傳并發(fā)布,文章內容僅代表作者本人觀點,簡書系信息發(fā)布平臺,僅提供信息存儲服務。

推薦閱讀更多精彩內容