Skip to content

Commit 1388353

Browse files
authored
chore: Fix new arch message serialization by adding 'isMainFrame' property to the data structure in iOS implementation. (#11)
* Fix new arch message serialization by adding 'isMainFrame' property to the data structure in iOS implementation. * changeset message
1 parent 13b20a1 commit 1388353

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

.changeset/few-ghosts-enjoy.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@phantom/react-native-webview': patch
3+
---
4+
5+
Add isMainFrame to new arch serialization layer

apple/RNCWebView.mm

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,8 @@ - (instancetype)initWithFrame:(CGRect)frame
134134
.canGoBack = static_cast<bool>([[dictionary valueForKey:@"canGoBack"] boolValue]),
135135
.canGoForward = static_cast<bool>([[dictionary valueForKey:@"canGoForward"] boolValue]),
136136
.loading = static_cast<bool>([[dictionary valueForKey:@"loading"] boolValue]),
137-
.data = std::string([[dictionary valueForKey:@"data"] UTF8String])
137+
.data = std::string([[dictionary valueForKey:@"data"] UTF8String]),
138+
.isMainFrame = static_cast<bool>([[dictionary valueForKey:@"isMainFrame"] boolValue])
138139
};
139140
webViewEventEmitter->onMessage(data);
140141
}

0 commit comments

Comments
 (0)