I’m not sure if anyone else has come across this bug but after upgrading to an iphone 6 with ios 8 app is throwing these erros in console:
Deprecated attempt to access property ‘userAgent’ on a non-Navigator object
Deprecated attempt to access property ‘geolocation’ on a non-Navigator object
Deprecated attempt to access property ‘platform’ on a non-Navigator object
the geolocation error is getting thrown on a simple getCurrentPostion call
Im getting this to, and Im about to explode… I cant solve this… please help!
Everything was just fine until i updated the Cordova CLI to 4.0 and xcode to 6.1.
Now everytime I add ios platform and build I get this error
** BUILD FAILED **
The following build commands failed:
CompileC build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVInvokedUrlCommand.o Classes/CDVInvokedUrlCommand.m normal i386 objective-c com.apple.compilers.llvm.clang.1_0.compiler
CompileC build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/NSDictionary+Extensions.o Classes/NSDictionary+Extensions.m normal i386 objective-c com.apple.compilers.llvm.clang.1_0.compiler
CompileC build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVPluginResult.o Classes/CDVPluginResult.m normal i386 objective-c com.apple.compilers.llvm.clang.1_0.compiler
CompileC build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/NSData+Base64.o Classes/NSData+Base64.m normal i386 objective-c com.apple.compilers.llvm.clang.1_0.compiler
(4 failures)
Error: /Users/tobias/Toxic projects/gapless/platforms/ios/cordova/build: Command failed with exit code 65
at ChildProcess.whenDone (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/superspawn.js:135:23)
at ChildProcess.EventEmitter.emit (events.js:98:17)
at maybeClose (child_process.js:753:16)
at Process.ChildProcess._handle.onexit (child_process.js:820:5)
To solve this I have to remove everything in (I have no idea what I delete…) /var/folders/yh/rl8xg50x6d937pszdn43wy4w0000gp/C/com.apple.DeveloperTools/6.1-6A1052d/Xcode/SharedPrecompiledHeaders
Then, when Im able to build, when I try to run the app from xcode (emulator) I get the error @itisdj got: Deprecated attempt to access property 'userAgent' on a non-Navigator object
hmmmmm… removing the space seems to have solved the error i got when building (thanks!!! and fuck xcode for that).
But Im still getting the “Deprecated attempt to access property”-error and it stops my app from working. Everything works on android and in the browser, but not ios.
I’ve tried to build with cordova platform add ios + cordova build ios but it gives me the same error…
Project on cordova ios platform 3.6.3. What version do run that works @mhartington?
edit: Im actually able to console.log something in $ionicPlatform.ready
EDIT: wtf… I don’t get the error if I use iOS 7.1, but the app still doesn’t work (in iOS emulator or on iOS device), I just see a black screen… But I get NO errors…
EDIT2: it seems like those errors doesnt actually do any harm. The real problem was this: