使用 MDM 时 NativeScript 应用程序在 iOS 14.2 上崩溃

NativeScript app crashing on iOS 14.2 when using an MDM

应用程序在 iOS 14.1 及更低版本(使用 MDM 部署)上运行良好。当使用 MDM 工具部署时,iOS 14.2 会崩溃(在正常部署时工作正常)。

我们的 MDM 提供商向我们发送了此 link 以进行故障排除:https://developer.apple.com/forums/thread/666399

Xamarin 团队有一个修复程序,但它非常特定于 Xamarin。寻找 NativeScript 修复。

我们的应用基于

nativescript  6.7.8
tns-ios 6.5.3

崩溃日志:

error     11:00:27.580673-0500  cloudd  [Request 0x145166db0] Finishing request with error 0x143e47750
error     11:00:27.597337-0500  cloudd  Couldn't pull url from backing account <private> or context <private>
error     11:00:27.597455-0500  cloudd  Couldn't pull url from backing account <private> or context <private>
error     11:00:27.663547-0500  duetexpertd      <private> - unable to load NSUserDefaults suite
error     11:00:27.689133-0500  dasd     Activity <private> not tracked as being started, ignoring it
error     11:00:28.593288-0500  SpringBoard     Snapshot generation request for bundleID: our.app.id rejected due to the app being denylisted.
error     11:00:28.614079-0500  kernel   System Policy: mobileapp(492) deny(1) dynamic-code-generation MAP_JIT requires the dynamic-codesigning entitlement
error     11:00:28.645842-0500  SpringBoard     Snapshot generation request for bundleID: our.app.id rejected due to the app being denylisted.
error     11:00:28.647825-0500  wifid     __WiFiManagerUpdateFamilyPreferences_block_invoke_2: error loading family members: Error Domain=com.apple.family.error Code=-1004 "(null)"
error     11:00:28.647958-0500  familycircled     No iCloud, no family. You know the rules.
error     11:00:28.876152-0500  kernel   Sandbox: mobileapp(492) deny(2) file-test-existence /private/etc/.mdns_debug
error     11:00:29.286648-0500  runningboardd  RBSStateCapture remove item called for untracked item <RBProcessMonitorObserver| qos:0 qos:(null) configs:{            }>
error     11:00:29.297266-0500  SpringBoard     Unable to get short BSD proc info for 492: No such process
error     11:00:29.304982-0500  SpringBoard     Unable to get short BSD proc info for 492: No such process
error     11:00:29.326567-0500  SpringBoard     Error acquiring assertion: <Error Domain=RBSAssertionErrorDomain Code=2 "Specified target process does not exist" UserInfo={NSLocalizedFailureReason=Specified target process does not exist}>
error     11:00:29.337173-0500  familycircled     No iCloud, no family. You know the rules.
error     11:00:29.339870-0500  wifid     __WiFiManagerUpdateFamilyPreferences_block_invoke_2: error loading family members: Error Domain=com.apple.family.error Code=-1004 "(null)"
error     11:00:29.354877-0500  SpringBoard     tried to remove an assertion that was never added: <SBFloatingDockBehaviorAssertion: 0x2813fbf80> {
    pinned = NO;
    animated = YES;
    gesture possible = YES;
    visible progress = 0.000000;
    level = in app;
    reason = in app;
    timestamp = 2020-12-08 16:00:28 +0000;
}
error     11:00:29.361299-0500  SpringBoard     HW kbd: Failed to set keyboard focus pid:0 ((null)) scene:(null)
error     11:00:29.361396-0500  SpringBoard     HW kbd: Failed to set keyboard focus pid:0 ((null)) scene:(null)
error     11:00:29.362488-0500  SpringBoard     Snapshot generation request for bundleID: our.app.id rejected due to the app being denylisted.
error     11:00:29.374109-0500  SpringBoard     Error creating the CFMessagePort needed to communicate with PPT.
error     11:00:29.817637-0500  duetexpertd      <private> - Current subscription is in a recursion. StreamId: homeScreen
error     11:00:29.817768-0500  duetexpertd      <private> - Current subscription is in a recursion. StreamId: homeScreen
error     11:00:29.818027-0500  duetexpertd      <private> - Current subscription is in a recursion. StreamId: homeScreen
error     11:00:29.818279-0500  duetexpertd      <private> - Current subscription is in a recursion. StreamId: homeScreen
error     11:00:29.818612-0500  duetexpertd      <private> - Current subscription is in a recursion. StreamId: homeScreen
error     11:00:29.818805-0500  duetexpertd      <private> - Current subscription is in a recursion. StreamId: homeScreen
error     11:00:29.819149-0500  duetexpertd      <private> - Current subscription is in a recursion. StreamId: homeScreen
error     11:00:29.819241-0500  duetexpertd      <private> - Current subscription is in a recursion. StreamId: homeScreen
error     11:00:29.820290-0500  duetexpertd      <private> - Current subscription is in a recursion. StreamId: homeScreen
error     11:00:29.820425-0500  duetexpertd      <private> - Current subscription is in a recursion. StreamId: homeScreen
error     11:00:29.820482-0500  duetexpertd      <private> - Current subscription is in a recursion. StreamId: homeScreen
error     11:00:29.820559-0500  duetexpertd      <private> - Current subscription is in a recursion. StreamId: homeScreen

你能试试吗:

Select Target Runner -> Build Settings -> Strip Style -> 从“All 符号”到“非全局符号”

请注意,这是一个官方跟踪的 NativeScript 问题:https://github.com/NativeScript/NativeScript/issues/9079