NativeScript / NativeScript/nativescript-cli

NS7 App iOS 14 Simulator no console or trace output

未關閉
#5,454 6 則留言 4 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 Issue。

主要語言
JavaScript
星號
1.1k
分支
204
平均合併
1 天 9 小時
30 天內合併 PR
8

描述

Environment
nativescript has 7.1.0 version and is up to date.
@nativescript/core has 7.1.0 version and is up to date.
@nativescript/ios has 7.1.0 version and is up to date.
@nativescript/android has 7.0.1 version and is up to date.

Node v14.15.2 / NPM v6.14.9
Xcode 12.2
Big Sur 11.1

Mac Mini (M1 2020) Curious to know if my hardware would have an effect on this issue?

Describe the bug
When running an app in the iOS 14 simulator, I cannot see any console.log or Trace.write. If I run a 13.X Simulator I can see

To Reproduce
Create a hello world app using ns create

Run the app in the iOS simulator any device.

app/main-view-model.ts

import { Observable, Trace } from '@nativescript/core';

//...

onTap() {
        this._counter--;
        this.updateMessage();
				alert('tapped'); // Works
				console.log('logged console'); // Does not work
				Trace.write(
					"Trace shown to console",
					Trace.categories.Debug
				); // Does not work
    }


Expected behavior
For the console log and trace messages to show in the terminal that is running ns run ios

As you can imagine this makes debugging projects painful!!

Any insight appreciated.

貢獻指南

開啟貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

研究方向

從 app/main-view-model.ts 中的 hello-world 重現開始,並在 iOS 14 和 iOS 13 模擬器上執行 ns run ios,比較終端輸出。檢查 issue 中描述的 console.log 和 Trace.write 行為;當兩則訊息在 iOS 14 終端中的顯示結果與 iOS 13 上一致時,即表示完成。

由索引模型根據 Issue 內容生成。

評估

技術堆疊
ios, javascript
領域
cli, mobile-dev
Issue 類型
缺陷
難度
3/5
預估耗時
1-2 天
活躍度
停滯
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。