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

Use local host local server open html with the first server not active, to be public with the time open next #511

Open
anhvu1993 opened this issue Nov 9, 2021 · 1 comment

Comments

@anhvu1993
Copy link

anhvu1993 commented Nov 9, 2021

[Question] I am using Server local host to open an html on safari with the following error: safari cannot open the page because it could not connect to the server.
let localServer = HttpServer() let html = htmlFor(title: GlobalManager.shared.typeAppMakeIcon.name, urlToRedirect: deepLinkUrl, iconBase64: iconBase64, iconTutorial: tutorialBase64) guard let base64 = html.data(using: .utf8)?.base64EncodedString() else { return } localServer?["/s"] = { request in return .movedPermanently("data:text/html;base64,\(base64)") } try? localServer?.start(in_port_t(serverRandom)) UIApplication.shared.open(shortcutUrl)

@huynguyen1991
Copy link

@anhvu1993 : vấn đề này giải quyết được chưa bạn, share mình giải pháp với. Tks!

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

2 participants