Is it possible to debug/test a Blazor Wasm App on an iPhone?

Posted 2 years ago by Connor
0

Hello,

I'm currently developing a Blazor Wasm app that is meant for iPhone at the end of the day. I tried to have the iPhone and desktop PC that runs Visual Studio in the same network. When running the app in localhost, I tried to load the page in the iPhone's browser via http://<ip of desktop>:<port that application runs on>. Unfortunately, I did not succeed. I also tried to open the ports in my router settings. I'm beginning to believe, that this is not possible with Blazor Wasm. Does anybody know a solution for this? Is there another way to test my app on the iPhone before deploying it to a server?

Best regards,

Connor

  • 0

    You'll need to find the IPv4 address within your network.  If you open up your command line and enter ipconfig, it should provide that to you. Then, make sure that you have your application setup to run on that IP by adjusting your launchSettings.json file within your Server project (ProjectName > Properties > launchSettings.json).  Your IPv4 address will be something like 192.168.1.102, so your launchSettings.json will need adjusted like so:

    ...
      "YourProjectNameHere": {
        ...
        "applicationUrl": "https://localhost:5001;http://192.168.1.102:5000",
        ...
      }
    ...

    Then once your site is running locally, you should be able to visit your IPv4 address with the 5000 port on your phone.  My guess is your launchSettings.json is missing this, so the server doesn't know to listen on that address.

    Posted 2 years ago by selliott Edited 2 years ago
  • 0

    Thanks that really worked and now makes absolutely sense to me! Unfortunately, it only works on a private computer. My company's policies seem to refuse the connection.

    Posted 2 years ago by Connor
Someone is typing...

Post a Reply

You must be logged in to add a new post.
Number of online users: 1
An error has occurred. This application may no longer respond until reloaded. Reload 🗙