Skip to content

Webview unable to load local assets or from CDNs along with window.postMessage not working in iOS release buildΒ #20226

Closed
@ghost

Description

Environment

React Native Environment Info:
System:
OS: macOS High Sierra 10.13.5
CPU: x64 Intel(R) Core(TM) i5-5350U CPU @ 1.80GHz
Memory: 310.16 MB / 8.00 GB
Shell: 5.3 - /bin/zsh
Binaries:
Node: 8.11.1 - /usr/local/bin/node
Yarn: 1.5.1 - /usr/local/bin/yarn
npm: 5.6.0 - /usr/local/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
SDKs:
iOS SDK:
Platforms: iOS 11.4, macOS 10.13, tvOS 11.4, watchOS 4.3
Android SDK:
Build Tools: 26.0.3, 27.0.3
API Levels: 26, 27
IDEs:
Android Studio: 3.1 AI-173.4819257
Xcode: 9.4.1/9F2000 - /usr/bin/xcodebuild
npmPackages:
react: 16.4.1 => 16.4.1
react-native: ^0.56.0 => 0.56.0
npmGlobalPackages:
create-react-native-app: 1.0.0
react-native-cli: 2.0.1

Description

I am using webview to display chart for my app using chartjs and jquery library I am able to view charts fine in iOS debug mode but in release config, all I get is a white screen, I tried to check if atleast window.postMessage was working using setinterval code in my .html file, but I dont get any response from webview.

To check for window.postMessage I have also tried to possible solution from issue , still its not working

I have tried to inject the complete html code as well instead of serving the html as local asset file, still not success.

This issue is only present in iOS, works perfectly fine for android.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions