I’m having an issue where localStorage is not defined. Per the release notes a shim should be enabled - but it appears to not exist. This is causing ParseJS to fail. According to the docs and examples, i believe i’m doing everything correctly. This happens in preview and in the iOS Simulator.
[Viewport]: Error: ReferenceError: localStorage is not defined: Name: ReferenceError: localStorage is not defined
Error message: Uncaught ReferenceError: localStorage is not defined
File name: js/parse.min.js
Adding to this - when a shim is applied manually. XMLHTTPRequest also fails to work.
[Viewport]: Error: Error: Cannot make a request: No definition of XMLHttpRequest was found.: Name: Error: Cannot make a request: No definition of XMLHttpRequest was found.
Error message: Uncaught Error: Cannot make a request: No definition of XMLHttpRequest was found.
File name: js/parse.min.js
Line number: 8403
FuseJS just uses localStorage for caching requests to/from the db. I removed ParseJS and inserted the snipped you posted into my mainview, and the problem remains the same. Adding to that i’ve done uno clean and uno doctor on the project and neither had a change. It seems the polyfills are nonexistent?
[Viewport]: Error: ReferenceError: window is not defined: Name: ReferenceError: window is not defined
Error message: Uncaught ReferenceError: window is not defined
File name: MainView.ux
Line number: 14
Source line: var myStorage = window.localStorage;
JS stack trace: ReferenceError: window is not defined
at Object._tempMethod (MainView.ux:14:21)
in Fuse.Reactive.DiagnosticSubject<MainView.ux:14>
[Viewport]: Error: ReferenceError: window is not defined: Name: ReferenceError: window is not defined
Error message: Uncaught ReferenceError: window is not defined
File name: MainView.ux
Line number: 14
Source line: var myStorage = window.localStorage;
JS stack trace: ReferenceError: window is not defined
at Object._tempMethod (MainView.ux:14:21)
in Fuse.Reactive.DiagnosticSubject<MainView.ux:14>
It’s a problem on your machine then, because that snippet works perfectly well on mine. Running uno clean is nice, but did you rebuild the project after you cleaned? Have you only tested local preview, or device previews too?