On my iOS simulator the application seems to always fail on the firebase update function.
updateProfile(key: string, name: string, value?: any) {
let path = "/profiles/" + key
return firebase.update(path, {"photoUrl": value} )
.catch(this.handleErrors);
}
Below is the output and the node is never updated. However, on Android it goes through without issue.
Sep 1 09:28:10 Winterfell prayinghandsng[19972]: CONSOLE LOG file:///app/shared/profile/profile.service.js:27:20: updating /profiles/-KQ_vqnfRt9ahoa-WaC0
Sep 1 09:28:10 Winterfell com.apple.CoreSimulator.SimDevice.BC6BDC7A-E456-4297-B49C-4C3773FD4F46.launchd_sim[1618] (UIKitApplication:org.nativescript.prayinghands[0x2b3f][19972]): Service exited with abnormal code: 1
is there a difference in how this function should be used for iOS as oppose to Android?
I must say this one is not part of my standard testsuite / demo app. setValue is though. This needs testing..
@EddyVerbruggen I was able to help @dondragon2 through this issue. It ended up being the value wasn't a string. I had him cast it to a string before updating and that solved the issue.
based on some checks with Sean, we found the following error in Xcode
0x10f51771c <+3094>: movq 0x24d10d(%rip), %rsi ; "stringWithFormat:"
0x10f517723 <+3101>: leaq 0x1c7446(%rip), %rdx ; @"(%@) Cannot store object of type %@ at %@. Can only store objects of type NSNumber, NSString, NSDictionary, and NSArray."
I gave us some more insight into what the error might be. From Nativescript it wasn't very intuitive that it was string value issue
Thanks for figuring this our! Any idea what type the value was?
The value was an NSUrl coming as the result from the getDownloadUrl() function.
Ah, that's something I should adjust in getDownloadUrl then as on Android I do return a String.
OK, this should not pop up again, once released.