macOS์ WebView๋ ํ์ด์ง๋ฅผ ๋ก๋ํ์ง๋ง ํ์ด์ง ๋ด์์ ํ์ํ ์ ์์ต๋๋ค. SPA๋ฅผ ๋ก๋ํ ๋ ๋ฐ์ํ๋ค๊ณ ์๊ฐํฉ๋๋ค. ํญ์ ์ง์ผ๋ก ๋์๊ฐ๋๋ค.
๋ํ ์ฒ์์๋ webview๊ฐ ํ์ด์ง๋ฅผ ๋ก๋ํ์ง ์๊ณ ํญ์ ๋ ๋ฒ์งธ๋ก ๋ก๋ํฉ๋๋ค.
3.0์์๋ ์ ์์ ์ผ๋ก ์๋ํ์ง๋ง ๋ฌธ์ ๋ 3.1 ์ด์์์ ๋ฐ์ํฉ๋๋ค.
ContentPage
WebView
์ถ๊ฐSource
์์ฑ์ ์
๋ ฅํฉ๋๋ค.Navigation.PushAsync
๋ฅผ ํตํด ์ ํ์ด์ง๋ก ์ด๋ํ์ด์ง๋ ์ฒ์์ ๋ก๋๋๋ฉฐ XF 3.0์์์ ๊ฐ์ด ํ์ด์ง ๋ด๋ถ๋ฅผ ํ์ํ ์ ์์ต๋๋ค.
ํ์ด์ง๊ฐ ๋ ๋ฒ์งธ๋ก ๋ก๋๋๊ณ ํ์ด์ง ๋ด๋ถ๋ฅผ ํ์ํ ์ ์์ต๋๋ค.
๋ณด๊ณ ๋ ๋ค๋ฅธ ๋ฌธ์ ์ ๋ํด ์๋ํ๋ ์ฌ์์ฐ์ NRE๋ฅผ ์ฌ์ฉํ์ฌ 3.3์์ ๋ค์ ํ์ํ๋ ค๊ณ ํ ๋ ์ค์ ๋ก ์ถฉ๋ํฉ๋๋ค. ์ด ๋ฌธ์ ๋ฅผ ์ผ์ผํฌ ์ ์๋ ๋ณ๊ฒฝ ์ฌํญ์ด ์์์ต๋๊น?
(์ฐ์ฐํ ํ์๋จ)
๋๋ 3.3(๋ง์ง๋ง ์์ )์์ ๋ค์ ํ ์คํธํ๊ณ NRE๋ฅผ ์ฐพ์์ต๋๋ค. WebView๋ก ํ์ด์ง๋ฅผ ํ์ํ๊ณ ๋ค๋ก ๋ฒํผ์ ๋น ๋ฅด๊ฒ ํด๋ฆญํ ๋ ๋ฐ์ํฉ๋๋ค. ๋ ๋ฌธ์ ๋ชจ๋ ๋์ผํ WebView๋ฅผ ์ฌ์ฉํ๋ฉฐ ๋์์ฌ ๋ ์๋ฌด ์์ ๋ ์ํ๋์ง ์์ต๋๋ค.
NRE๊ฐ ์ด ๋ค๋ฅธ ๋ฌธ์ ์ ๊ด๋ จ์ด ์๋ค๊ณ ์๊ฐํฉ๋๋ค. #4001 that has been done at 3.4 #4188
NRE์ ์คํ ์ถ์ (์ฐธ์กฐ๋ ๋ฌธ์ ์ ๋์ผ):
Object reference not set to an instance of an object
at Xamarin.Forms.Platform.MacOS.WebViewRenderer+FormsWebFrameDelegate.FinishedLoad (WebKit.WebView sender, WebKit.WebFrame forFrame) [0x00017] in <1d80e21b8be74ba38bdf2bd5d3e4d5a0>:0
at (wrapper managed-to-native) AppKit.NSApplication.NSApplicationMain(int,string[])
at AppKit.NSApplication.Main (System.String[] args) [0x00040] in /Library/Frameworks/Xamarin.Mac.framework/Versions/5.0.0.0/src/Xamarin.Mac/AppKit/NSApplication.cs:100
at WebViewIssues.macOS.MainClass.Main (System.String[] args) [0x00017] in /Volumes/VMware Shared Folders/Compartido/WebViewIssues/WebViewIssues/WebViewIssues.macOS/Main.cs:11
๊ทธ๋ฌ๋ ์กฐ๊ธ ๋ ๊ธฐ๋ค๋ ธ๋ค๊ฐ ๋ค์ ์ค๋ฉด NRE๊ฐ ๋ฐ์ํ์ง ์๊ณ ์ค๋ช
๊ณผ ๊ฐ์ด ๋ฌธ์ ๊ฐ ๋ฐ์ํ๋ค๋ ๊ฒ์ ์์์ต๋๋ค(์ฌ์์ ์๋จ/์ค๋ฅธ์ชฝ ๋ฒํผ).
3.0์์๋ ๋ชจ๋ ๊ฒ์ด ์ ์์
๋๋ค. (UWP์์๋ OK)
Xamarin.Mac ์ฑ์์ WebView๋ฅผ ์ฌ์ฉํ๋ ค๊ณ ํ๋๋ฐ ์ด ๋ฌธ์ ๋ ์์ต๋๋ค!, ํ์ด์ง ๊ฐ์ ํ์ํ ์ ์์ต๋๋ค.
Xamarin.Forms 3.0์์๋ ํ์์ด ๊ด์ฐฎ์ ๊ฒ ๊ฐ์ง๋ง ํ์ ์ด๋ฒคํธ๋ ๋ฐ์ํ์ง ์์ต๋๋ค. Xamarin.Forms 3.1์์๋ ํ์ ์ด๋ฒคํธ๊ฐ ๋ฐ์ํ์ง๋ง ํ์ด์ง ๊ฐ์ ํ์ํ ์ ์์ต๋๋ค.