Skip to content

Commit 2aeb11e

Browse files
committed
msglist [nfc]: Document that assetsUrl is a file URL, and why
1 parent 6082f4f commit 2aeb11e

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/webview/MessageList.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,17 @@ export type Props = $ReadOnly<{|
7575

7676
/**
7777
* The URL of the platform-specific assets folder.
78+
*
79+
* This will be a `file:` URL.
7880
*/
81+
// It could be perfectly reasonable for this to be an `http:` or `https:`
82+
// URL instead, at least in development. We'd then just need to adjust
83+
// the `originWhitelist` we pass to `WebView`.
84+
//
7985
// - On iOS: We can't easily hardcode this because it includes UUIDs.
8086
// So we bring it over the React Native bridge in ZLPConstants.m.
87+
// It's a file URL because the app bundle's `resourceURL` is:
88+
// https://developer.apple.com/documentation/foundation/bundle/1414821-resourceurl
8189
//
8290
// - On Android: Different apps' WebViews see different (virtual) root
8391
// directories as `file:///`, and in particular the WebView provides

0 commit comments

Comments
 (0)