首页 > 解决方案 > 调整 Xcode 设置后,如何在 NS Preview 中使用“UITabBarControllerImpl”解决 CONSOLE WARN?

问题描述

我对移动应用程序开发非常陌生,尽管此时我已经决定使用 Svelte-Native,但几周前我正在考虑各种框架(React Native 和 Kivy)。Svelte-Native's, Your First App是我尝试的第一个教程,当时一切正常。然后我查看了 React Native,最后考虑了Kivy。我从来没有最终让 Kivy 工作,但这本身就很好——我暂时不会使用它。然而,当我试图让 Kivy 工作时,我不得不在 Xcode 的设置中进行很多修改。我怀疑它在如此低的级别上进行了某种配置,以至于影响了 NS Preview 和 NS Playground。

当我运行时ns preview,二维码显示得很好,但是当我用我的 iPhone 12 扫描它时,我的终端和手机上都出现了错误日志。

LOG from device Peter’s iPhone: CONSOLE WARN file:///app/tns_modules/@nativescript/core/ui/tab-view/tab-view.js:17:14: Objective-C class name "UITabBarControllerImpl" is already in use - using "UITabBarControllerImpl1" instead.
CONSOLE WARN file:///app/tns_modules/@nativescript/core/ui/tab-view/tab-view.js:78:14: Objective-C class name "UITabBarControllerDelegateImpl" is already in use - using "UITabBarControllerDelegateImpl1" instead.
CONSOLE WARN file:///app/tns_modules/@nativescript/core/ui/tab-view/tab-view.js:116:14: Objective-C class name "UINavigationControllerDelegateImpl" is already in use - using "UINavigationControllerDelegateImpl1" instead.
CONSOLE INFO file:///app/vendor.js:38:36: HMR: Hot Module Replacement Enabled. Waiting for signal.
2021-06-24 10:46:32.720 nsplaydev[20450:7282202] PlayLiveSync: applicationDidFinishLaunching
CONSOLE LOG file:///app/vendor.js:5722:24: Application Launched
CONSOLE ERROR file:///app/vendor.js:3057:16: [HMR][Svelte] Unrecoverable error in <App>: next update will trigger a full reload
2021-06-24 10:46:32.729 nsplaydev[20450:7282202] ***** Fatal JavaScript exception - application has been terminated. *****
2021-06-24 10:46:32.729 nsplaydev[20450:7282202] Native stack trace:
1   0x105916348 NativeScript::reportFatalErrorBeforeShutdown(JSC::ExecState*, JSC::Exception*, bool)
2   0x105950434 NativeScript::FFICallback<NativeScript::ObjCMethodCallback>::ffiClosureCallback(ffi_cif*, void*, void**, void*)
3   0x1064bb388 ffi_closure_SYSV_inner
4   0x1064bc1b4 .Ldo_closure
5   0x1963ad6d4 <redacted>
6   0x1963ad67c <redacted>
7   0x1963acbe8 <redacted>
8   0x1963ac5a8 _CFXNotificationPost
9   0x1976b16ac <redacted>
10  0x198e3e370 <redacted>
11  0x198e44388 <redacted>
12  0x198497c98 <redacted>
13  0x198a00f58 _UIScenePerformActionsWithLifecycleActionMask
14  0x198498830 <redacted>
15  0x1984982f0 <redacted>
16  0x198498640 <redacted>
17  0x198497e7c <redacted>
18  0x1984a03c0 <redacted>
19  0x19890e970 <redacted>
20  0x198a19d68 _UISceneSettingsDiffActionPerformChangesWithTransitionContext
21  0x1984a00b8 <redacted>
22  0x1982c7fa0 <redacted>
23  0x1982c6920 <redacted>
24  0x1982c7bc8 <redacted>
25  0x198e42528 <redacted>
26  0x198937fd0 <redacted>
27  0x1a59e45d8 <redacted>
28  0x1a5a0fd44 <redacted>
29  0x1a59f36a4 <redacted>
30  0x1a5a0fa0c <redacted>
31  0x19603f81c <redacted>
2021-06-24 10:46:32.731 nsplaydev[20450:7282202] JavaScript stack trace:
2021-06-24 10:46:32.731 nsplaydev[20450:7282202] create_fragment(file:///app/bundle.js:290:17)
at init(file:///app/vendor.js:7356:52)
at App(file:///app/bundle.js:373:63)
at createProxiedComponent(file:///app/vendor.js:3622:22)
at ProxyComponent(file:///app/vendor.js:3239:92)
at file:///app/vendor.js:3298:16
at resolveComponentElement(file:///app/vendor.js:5529:36)
at navigate(file:///app/vendor.js:5542:60)
at create(file:///app/vendor.js:5729:89)
at file:///app/tns_modules/@nativescript/core/ui/builder/builder.js:18:36
at createRootView(file:///app/tns_modules/@nativescript/core/application/application.js:292:61)
at file:///app/tns_modules/@nativescript/core/application/application.js:243:38
at file:///app/tns_modules/@nativescript/core/application/application.js:174:34
at file:///app/tns_modules/@nativescript/core/application/application.js:163:30
at [native code]
at file:///app/tns_modules/@nativescript/core/application/application.js:36:32
at UIApplicationMain([native code])
at run(file:///app/tns_modules/@nativescript/core/application/application.js:312:26)
at file:///app/vendor.js:5726:87
at initializePromise([native code])
at Promise([native code])
at svelteNative(file:///app/vendor.js:5719:23)
at file:///app/bundle.js:459:67
at ./app.ts(file:///app/bundle.js:472:34)
at __webpack_require__(file:///app/runtime.js:817:34)
at checkDeferredModules(file:///app/runtime.js:44:42)
at webpackJsonpCallback(file:///app/runtime.js:31:39)
at anonymous(file:///app/bundle.js:2:61)
at evaluate([native code])
at moduleEvaluation([native code])
at [native code]
at asyncFunctionResume([native code])
at [native code]
at promiseReactionJob([native code])
2021-06-24 10:46:32.731 nsplaydev[20450:7282202] JavaScript error:
file:///app/bundle.js:290:17: JS ERROR ReferenceError: Can't find variable: Page
2021-06-24 10:46:32.732 nsplaydev[20450:7282202] PlayLiveSync: Uncaught Exception
2021-06-24 10:46:32.732 nsplaydev[20450:7282202] *** JavaScript call stack:
(
    0   UIApplicationMain@[native code]
    1   run@file:///app/tns_modules/@nativescript/core/application/application.js:312:26
    2   @file:///app/vendor.js:5726:87
    3   initializePromise@:1:11
    4   Promise@[native code]
    5   svelteNative@file:///app/vendor.js:5719:23
    6   @file:///app/bundle.js:459:67
    7   ./app.ts@file:///app/bundle.js:472:34
    8   __webpack_require__@file:///app/runtime.js:817:34
    9   checkDeferredModules@file:///app/runtime.js:44:42
    10  webpackJsonpCallback@file:///app/runtime.js:31:39
    11  anonymous@file:///app/bundle.js:2:61
    12  evaluate@[native code]
    13  moduleEvaluation@:1:11
    14  @:2:1
    15  asyncFunctionResume@:1:11
    16  @:24:9
    17  promiseReactionJob@:1:11
)
2021-06-24 10:46:32.732 nsplaydev[20450:7282202] *** Terminating app due to uncaught exception 'NativeScript encountered a fatal error: ReferenceError: Can't find variable: Page
 at 
create_fragment(file:///app/bundle.js:290:17)
at init(file:///app/vendor.js:7356:52)
at App(file:///app/bundle.js:373:63)
at createProxiedComponent(file:///app/vendor.js:3622:22)
at ProxyComponent(file:///app/vendor.js:3239:92)
at file:///app/vendor.js:3298:16
at resolveComponentElement(file:///app/vendor.js:5529:36)
at navigate(file:///app/vendor.js:5542:60)
at create(file:///app/vendor.js:5729:89)
at file:///app/tns_modules/@nativescript/core/ui/builder/builder.js:18:36
at createRootView(file:///app/tns_modules/@nativescript/core/application/application.js:292:61)
at file:///app/tns_modules/@nativescript/core/application/application.js:243:38
at file:///app/tns_modules/@nativescript/core/application/application.js:174:34
at file:///app/tns_modules/@nativescript/core/application/application.js:163:30
at [native code]
at file:///app/tns_modules/@nativescript/core/application/application.js:36:32
at UIApplicationMain([native code])
at run(file:///app/tns_modules/@nativescript/core/application/application.js:312:26)
at file:///app/vendor.js:5726:87
at initializePromise([native code])
at Promise([native code])
at svelteNative(file:///app/vendor.js:5719:23)
at file:///app/bundle.js:459:67
at ./app.ts(file:///app/bundle.js:472:34)
at __webpack_require__(file:///app/runtime.js:817:34)
at checkDeferredModules(file:///app/runtime.js:44:42)
at webpackJsonpCallback(file:///app/runtime.js:31:39)
at anonymous(file:///app/bundle.js:2:61)
at evaluate([native code])
at moduleEvaluation([native code])
at [native code]
at asyncFunctionResume([native code])
at [native code]
at promiseReactionJob([native code])
', reason: '(null)'
*** First throw call stack:
(0x196452754 0x1aaf197a8 0x105916820 0x105950434 0x1064bb388 0x1064bc1b4 0x1963ad6d4 0x1963ad67c 0x1963acbe8 0x1963ac5a8 0x1976b16ac 0x198e3e370 0x198e44388 0x198497c98 0x198a00f58 0x198498830 0x1984982f0 0x198498640 0x198497e7c 0x1984a03c0 0x19890e970 0x198a19d68 0x1984a00b8 0x1982c7fa0 0x1982c6920 0x1982c7bc8 0x198e42528 0x198937fd0 0x1a59e45d8 0x1a5a0fd44 0x1a59f36a4 0x1a5a0fa0c 0x19603f81c 0x19604330c 0x1a5a37fa0 0x1a5a37c30 0x1a5a38184 0x1963cc9e8 0x1963cc8e4 0x1963cbbe8 0x1963c5bc8 0x1963c5360 0x1ada03734 0x198e40584 0x198e45df4 0x1064bc044 0x1064baae8 0x1064ba648 0x1058d93d8 0x106487b10 0x106484f28 0x106484f28 0x106484f28 0x1064665e8 0x105a14e48 0x1061c0df0 0x1061c1478 0x106487ca8 0x106485ed4 0x106484f28 0x106484f28 0x106484f28 0x106484f28 0x106484e80 0x106484f28 0x1064665e8 0x105a14e48 0x1062b8cb4 0x1058f18f4 0x1061899d0 0x1064877cc 0x106484f28 0x106484f28 0x106484f28 0x106484e80 0x106484f28 0x1064665e8 0x105a14e48 0x1062b8e50 0x106182d9c 0x1058e7304 0x105960350 0x1069b225c 0x104dff524 0x196081cf8)
libc++abi: terminating with uncaught exception of type NSException
2021-06-24 10:46:32.732 nsplaydev[20450:7282202] PlayLiveSync: Uncaught Exception

我该如何解决这个问题?

任何帮助将不胜感激。先感谢您。

标签: nativescripthybrid-mobile-appmobile-developmentsvelte-native

解决方案


推荐阅读