Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stencil build web component not loading on iOS WKWebView #93

Open
devendrashewale3 opened this issue Sep 10, 2024 · 2 comments
Open

Stencil build web component not loading on iOS WKWebView #93

devendrashewale3 opened this issue Sep 10, 2024 · 2 comments

Comments

@devendrashewale3
Copy link

devendrashewale3 commented Sep 10, 2024

I am traying to create Web component using stencil JS . Stencil build folder which has index.html actually loads the my stencil component. This Web components works fine on Mac os Safari browser and Android WebView however same build folder does not load on iOS WKWebView so I would like to ask the question to the stencil community does stencil web components are compatible with iOS WKWebView browser if yes then what would be probable root cause for not loading web component on iOS WKWebView. I have implemented WKNavigationDelegate, WKUIDelegate callbacks on the Swift ViewController which includes WKWebView instance. Normal HTML works fine however not showing content which embedded on the Stencil component. I have also checked all the required build files are available on the resource path. Below is the index.html code

<!doctype html><html dir="ltr" lang="en"><head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=5.0"> <title>Stencil Component Starter</title> <script type="module" src="/build/demo.esm.js" data-stencil></script> <script nomodule="" src="/build/demo.js" data-stencil></script> </head> <body> <my-component first="param1" middle="param2" last="param3"></body></html>

@valadas
Copy link
Collaborator

valadas commented Nov 9, 2024

I don't have an iOS device here but many updates were done in #95
Can you give it a fresh test and let us know if this is potentially now resolved ?

@david-poindexter
Copy link
Collaborator

Seeing as all Ionic components are built using Stencil, yes, they are supported on iOS. That said, I am not sure what the specific issue is here, but you may find some inspiration by looking into the Ionic Framework components to see if there are any differences in the way you are implementing versus the way they do things in Ionic Framework.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants