This is an issue now as before a recent Needle change to hide AR buttons on unsupported devices, the âNeeds HTTPS for ARâ button would show for a url that wasnât https on an AR supported device. Now that button simply doesnât show and the user has no idea they need to use https url instead to see the Start AR button
Original Post on Discord
by user 103054507105067008
Generally recommend you enforce HTTPS for any website
Which is as simple as adding:
<script>
if(location.protocol == 'http:' && location.host.indexOf('localhost') < 0) location.protocol = 'https:';
</script>
to your index.html
Only noticed this when just typing the url in android chrome without typing any http stuff before, it defaults to non https
by user 103054507105067008
Ah thankyou
by user 103054507105067008
marcel
(marwi)
January 16, 2023, 12:00am
6
Look like this is the actual reason for this problem then? Discord
Yep, I agree thatâs annoying. I consider adding it to the WebXR component as a toggle, on by default (âEnforce HTTPSâ)
That would be very useful
by user 103054507105067008
I believe it will only open the HTTP one if the page youâre sharing from is on HTTP. That QR Code is always the literal URL youâre on
I think this is the issue causing the glitch one then, will include that script in my templates from now on cheers
by user 103054507105067008
Does this also affect when we are running from the unity editor? I am not seeing the button on my ios device when I run the sample project .
by user 690383379958333460
marcel
(marwi)
June 10, 2023, 12:00am
12
On iOS you need to have a USDZExporter component (because iOS does not have WebXR support (yet))
Where should I add the exporter component? I added it to the needle exporter, however, on my ios device it doesnât show the button
by user 580207235171614720
marcel
(marwi)
June 20, 2023, 12:00am
14
On iOS you need to add the USDZExporter component right now too.
Is it a separate exporter or a component to the exporter? I read that you should add it to the WebXR object and also tried that and it isnât working.
by user 580207235171614720
marcel
(marwi)
June 20, 2023, 12:00am
16
Itâs a separate component. You can theoretically add it anyhwere but itâs cleaner to put it next to the WebXR component.
marcel
(marwi)
June 20, 2023, 12:00am
17
When you add it export the scene / update your local host and then open the website on your iOS device