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使用的是LSApplicationWorkspace
的installedPlugins
函數來獲取所有安裝的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。