Hello @AndresOlivares-4330 ,
Xamarin Hot Restart enables you to quickly test changes to your app without a Mac machine during development. You need to download iTunes and install it, then sign in your Apple Dev account and enable
Automatic Provisioning. For more details, refer to //docs.microsoft.com/en-us/xamarin/xamarin-forms/deploy-test/hot-restart
There are also
some limitations, you cannot use Xamarin Hot Restart to create app bundles for publishing, it just for development.
Best Regards,
Wenyan Zhang
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note:
Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.
I recently came to an awkward situation, unsure how to resolve it. Thanks to the help of inspect.dev, I was able to find my issue and continue development.
A few weeks ago I began working on a small freelance project, using Flask, MongoDB, and some vanilla HTML/JS/CSS. I had separated my project into the frontend application as its own Flask application, and the API as its own Flask application. I primarily did this because I didn’t want to expose database models to the client, as well as simplify the development process [I am working with a buddy who handles primarily the frontend side of our project].
Context:
I had deployed both applications to Heroku, which is configured for easy deployment of applications, with options of free tiers to users. Everyone has most likely faced a CORS [Cross-Origin Resource Sharing] issue before, as have I. Everyone had been tested and validated locally, and on my chrome browser in Windows 10. All is great, right? Nope.
Issue I had faced:
I had tested all browsers on Windows 10, however I knew the application may be used at some point on iOS. I luckily own an iPhone and iPad I was able to test it on [if I would have had a mac, things would be a lot easier].
I noticed that none of the data I was expecting was loading, and the Heroku logs only indicated that I was receiving OPTIONS requests from my apple device. I searched and searched why I was only receiving OPTIONS requests from my device, and came to learn that Apple has a different set of restrictions for Preflight requests.
Preflight Requests: Small request that is sent by the browser before the actual request. It contains info like which HTTP method is used, as well as if any custom HTTP headers are present. This gives the server a chance to examine what the actual request looks like before it’s made. [source]
So now I know that, although I was getting a successful preflight response status [200], I couldn’t figure out the custom header it wasn’t liking.
Remember I have been doing this on an iPad, and no dev-tools are easily viewable on the actual device. Here is where the magic happens
Debugging an iPad’s browser with Windows 10:
Inspect has thankfully built an npm package for debugging iOS devices from your chrome browser on your machine. Prerequisite for this would be to ensure you have Node.js installed.
Step 1: Install the npm package
npm install remotedebug-ios-webkit-adapter -g
Note that this has technically been migrated to inspect.dev’s application, however for the sake of this project this package was sufficient.
Step 2: Plug in your apple device
Step 3: Start the remote debug package on an unused port:
remotedebug_ios_webkit_adapter --port=9000
Step 4: Open chrome on windows, and navigate to device inspection
chrome://inspect/#devices
Step 5: Select Configure ‘Discover network targets’
Select configure…Step 6: Add the port you have opened from running the debugger
Step 7: Enable web inspection from your iOS device
Settings > Safari > Advanced and toggle Web Inspector
Step 8: Click inspect under the target
You should now be able to inspect your device and its devtools!
Summary:
I found out after viewing the network logs, that my server’s CORS configuration had a response header of Access-Control-Allow-Origin set to “*”, meaning the origin was not locked to one url. This doesn’t work with iOS’s preflight request policies. I altered this to map to the app’s url, redeployed, and all was successful.
I was thankful to see the logs on my iOS device, right from my work station. It was hard to research, but quick to debug and will definitely be used in the future.