文件提供程序扩展无法在iOS 9&使用Xcode 9构建时10

时间:2017-09-28 16:47:55

标签: ios xcode xcode9

我有iOS 11之前的Action + Document + File Provider扩展。我看到的问题如下:

当我的应用程序使用Xcode 8构建时,文件提供程序可以在所有iOS上正常运行。

当我的应用程序使用 Xcode 9 (无代码更改)构建时,文件提供程序在iOS 11上正常工作,但无法在iOS 9和10上启动。< / p>

文档选择器和操作扩展在任何地方都可以正常工作。

我需要在Xcode 9上构建,因为我想使用Xcode 8中不可用的类。

以下是成功(Xcode 8)和不成功(Xcode 9)尝试在主应用程序启动时注册文件提供程序扩展的设备日志。当另一个应用尝试呼叫分机时,会显示类似的消息。

iOS 10上的Xcode 9

installd(MobileSystemServices)[42] <Notice>: 0x16e107000 -[MIContainer makeContainerLiveReplacingContainer:reason:withError:]: Made container live for com.companyname.appname.fileprovider at /private/var/mobile/Containers/Data/PluginKitPlugin/5B502EFD-DFA7-4F23-BCCE-EBF63F455B98
lsd(MobileCoreServices)[75] <Notice>: Found extensionPointData dict <com.apple.fileprovider-ui> for <private>
lsd(MobileCoreServices)[75] <Notice>: Found extensionPointData dict <com.apple.fileprovider-nonui> for <private>
SpringBoard(UserNotificationsServer)[49] <Notice>: [com.companyname.appname] Application installed using default data provider
SpringBoard(UserNotificationsServer)[49] <Notice>: Create new default data providers
fileproviderd(MobileCoreServices)[21] <Notice>: LaunchServices observer: Installed plugins <private>
fileproviderd(Foundation)[21] <Notice>: discovered extensions
assertiond[59] <Notice>: Ignoring assertion request named "com.apple.extension.session" from <BSProcessHandle: 0x10022bb30; fileproviderd:21; valid: YES> because process { pid 224; bundleID (null) } is unknown.
fileproviderd(Foundation)[21] <Notice>: calling plugIn beginUsing:
fileproviderd(PlugInKit)[21] <Notice>: connection to plug-in <private>(C96A6048-676A-4B17-8DEF-983B0BEA5656) lost
fileproviderd(PlugInKit)[21] <Error>: Hub connection error Error Domain=NSCocoaErrorDomain Code=4097 "connection to service named com.companyname.appname.fileprovider" UserInfo={NSDebugDescription=connection to service named com.companyname.appname.fileprovider}
fileproviderd(Foundation)[21] <Notice>: PlugInKit error in beginUsing:
fileproviderd[21] <Fault>: [ERROR] Extension request failed. Error: <private>
fileproviderd[21] <Fault>: [ERROR] Error registering file provider extension <private>: <private>.
fileproviderd[21] <Notice>: [NOTICE] Trying to register file provider extension <private> again. Tries left: 2
fileproviderd(Foundation)[21] <Notice>: killing invalid plugIn
fileproviderd(Foundation)[21] <Notice>: completed calling plugIn beginUsing: for pid: 0
assertiond[59] <Notice>: Ignoring assertion request named "com.apple.extension.session" from <BSProcessHandle: 0x10022bb30; fileproviderd:21; valid: YES> because process { pid 224; bundleID (null) } is unknown.
fileproviderd(Foundation)[21] <Notice>: calling plugIn beginUsing:
fileproviderd(PlugInKit)[21] <Error>: plug-in <private> pre-screen sees activating state
fileproviderd(PlugInKit)[21] <Notice>: connection to plug-in <private>(C96A6048-676A-4B17-8DEF-983B0BEA5656) lost
fileproviderd(PlugInKit)[21] <Error>: Hub connection error Error Domain=NSCocoaErrorDomain Code=4097 "connection to service named com.companyname.appname.fileprovider" UserInfo={NSDebugDescription=connection to service named com.companyname.appname.fileprovider}
fileproviderd(Foundation)[21] <Notice>: PlugInKit error in beginUsing:
fileproviderd[21] <Fault>: [ERROR] Extension request failed. Error: <private>
fileproviderd(Foundation)[21] <Notice>: killing invalid plugIn
fileproviderd[21] <Fault>: [ERROR] Error registering file provider extension <private>: <private>.

iOS 10上的Xcode 8

fileproviderd(Foundation)[21] <Notice>: discovered extensions
installd(MobileSystemServices)[42] <Notice>: 0x16e107000 -[MIInstallableBundle _refreshUUIDForContainer:withError:]: Data container for com.companyname.appname.fileprovider is now at /private/var/mobile/Containers/Data/PluginKitPlugin/8B44BA26-5F62-465E-B40D-A0FE9F4277B1
lsd(MobileCoreServices)[75] <Notice>: Found extensionPointData dict <com.apple.fileprovider-ui> for <private>
lsd(MobileCoreServices)[75] <Notice>: Found extensionPointData dict <com.apple.fileprovider-nonui> for <private>
SpringBoard(UserNotificationsServer)[49] <Notice>: [com.companyname.appname] Application installed using default data provider
SpringBoard(UserNotificationsServer)[49] <Notice>: Create new default data providers
fileproviderd(Foundation)[21] <Notice>: discovered extensions
fileproviderd(MobileCoreServices)[21] <Notice>: LaunchServices: Waiting on mutex for local DB to be updated
fileproviderd(MobileCoreServices)[21] <Notice>: LaunchServices observer: Uninstalled plugins <private>
fileproviderd(MobileCoreServices)[21] <Notice>: LaunchServices observer: Installed plugins <private>
assertiond[59] <Notice>: Ignoring assertion request named "com.apple.extension.session" from <BSProcessHandle: 0x10022bb30; fileproviderd:21; valid: YES> because process { pid 224; bundleID (null) } is unknown.
fileproviderd(Foundation)[21] <Notice>: calling plugIn beginUsing:
FileProvider(ADAL)[319] <Notice>: ADAL version 2.3.1
kernel(Sandbox)[0] <Notice>: SandboxViolation: FileProvider(319) deny(1) file-read-data /private/var/mobile/Containers/Data/Application
kernel(Sandbox)[0] <Notice>: SandboxViolation: FileProvider(319) deny(1) file-read-data /private/var/mobile/Containers/Shared/AppGroup
fileproviderd(Foundation)[21] <Notice>: completed calling plugIn beginUsing: for pid: 319
FileProvider[319] <Notice>: ACFileProvider - "init" [319]:0x13dd560b0. Constructor

任何想法导致了什么以及如何解决这个问题? 感谢。

1 个答案:

答案 0 :(得分:0)

使用Xcode 9构建的文件提供程序无法在iOS 9和10上运行。这是iOS 11.1 Beta发行说明中提到的Apple bug。希望他们能够根据他们的文档在某些时候修复它。它可以起作用。

<强>更新 在Xcode 9.1中修复。