Xcode - 检查扩展的类型
Posted
技术标签:
【中文标题】Xcode - 检查扩展的类型【英文标题】:Xcode - check the type of extension 【发布时间】:2020-12-10 11:33:30 【问题描述】:在 ios 中有几个应用扩展被描述为here,我想知道如何区分每种类型。
在我当前的项目中,我有很多没有描述性名称的扩展。我怎么知道它们各自是什么类型的扩展?
【问题讨论】:
【参考方案1】:我终于想通了,我可以在每个扩展的 Info.plist 中检查扩展的类型。
例如,这些标识符分别属于通知服务扩展和通知内容扩展。
NSExtension -> NSExtensionPointIdentifier = com.apple.usernotifications.service
NSExtension -> NSExtensionPointIdentifier = com.apple.usernotifications.content-extension
【讨论】:
【参考方案2】:Info.plist
-> NSExtensionPointIdentifier
Action -> com.apple.ui-services
com.apple.services
Custom Keyboard -> com.apple.keyboard-service
File Provider -> com.apple.fileprovider-nonui
File Provider UI -> com.apple.fileprovider-actionsui
(MacOS)Finder Sync -> com.apple.FinderSync
Message Filter -> com.apple.identitylookup.message-filter
Photo Editing -> com.apple.photo-editing
Share -> com.apple.share-services
Call Directory -> com.apple.callkit.call-directory
Account Authentication -> com.apple.authentication-services-account-authentication-modification-ui
Audio Unit -> com.apple.AudioUnit-UI
Authentication Service -> com.apple.AppSSO.idp-extension
AutoFill Credential Provider -> com.apple.authentication-services-credential-provider-ui
Broadcast Setup UI -> com.apple.broadcast-services-setupui
Broadcast Upload -> com.apple.broadcast-services-upload
ClassKit Context Provider -> com.apple.classkit.context-provider
Content Blocker -> com.apple.Safari.content-blocker
iMessage, Sticker Pack -> com.apple.message-payload-provider
Intents -> com.apple.intents-service
Intents UI -> com.apple.intents-ui-service
Network Extension -> com.apple.networkextension.app-proxy
Notification Content -> com.apple.usernotifications.content-extension
//Notification Service - iOS v10 and XCode v8 - allows you to download some content(image, audio, video) ad show it in notification banner(3D Touch). You have 30 seconds to download and save a content. UNNotificationServiceExtension
Notification Service -> com.apple.usernotifications.service
Persistent Token, (MacOS) Smart Card Token -> com.apple.ctk-tokens
(MacOS)Photo Project -> com.apple.photo-project
Quick Look Preview -> com.apple.quicklook.preview
(MacOS)Safari -> com.apple.Safari.extension
Spotlight Index -> com.apple.spotlight.index
Thumbnail -> com.apple.quicklook.thumbnail
(tvOS)TV Top Shelf -> com.apple.tv-top-shelf
Unwanted Communication -> com.apple.identitylookup.classification-ui
Widget(Today) -> com.apple.widgetkit-extension
(MacOS)Xcode Source Editor -> com.apple.dt.Xcode.extension.source-editor
[App Extension(Widget, Today)][App Extension]
【讨论】:
以上是关于Xcode - 检查扩展的类型的主要内容,如果未能解决你的问题,请参考以下文章
Xcode 编译器错误:编译器无法在合理的时间内对该表达式进行类型检查(Xcode 12.0 SwiftUI)