代码之家  ›  专栏  ›  技术社区  ›  The_Falcon

当使用Xcode 9构建时,文件提供程序扩展无法在iOS 9和10上启动

  •  0
  • The_Falcon  · 技术社区  · 8 年前

    我有iOS 11之前的操作+文档+文件提供程序扩展名。我看到的问题如下:

    当我的应用程序是用 Xcode 9 (无代码更改),文件提供程序 在iOS 11上运行良好,但在iOS 9和10上无法启动 .

    我需要在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>.
    

    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 回复  |  直到 8 年前
        1
  •  0
  •   The_Falcon    8 年前

    使用Xcode 9构建的文件提供程序无法在iOS 9和10上运行。这是iOS 11.1测试版发行说明中提到的一个苹果bug。希望他们能根据他们的文档在某个时候修复它,这应该是可行的。

    更新: 在Xcode 9.1中修复。