ios


Parse update PFUser Class String


I am trying to update a specific users "totalScore" column in my Users class in parse. The "totalScore" is a string value. I am running the code below in didSelectRowAtIndexPath:. I am getting self.friends from the queried list of users I want displayed in my tableview. When I run this code and log it, it seems to work fine but the object never updates in my data browser. Also: I am able to update this object online just not in app! Thanks!
PFUser *user = [self.friends objectAtIndex:indexPath.row];
PFQuery *query = [PFQuery queryWithClassName:#"_User"];
[query whereKey:#"objectId" equalTo:user.objectId];
[query getFirstObjectInBackgroundWithBlock:^(PFObject * userStats, NSError *error) {
if (!error) {
[userStats setObject:#"#5" forKey:#"totalScore"];
[userStats saveInBackground];
} else {
// Did not find any UserStats for the current user
NSLog(#"Error: %#", error);
}
}];
You can't update any users information that's not you for security reasons. You have to be the currentUser to change your info.
Here is a workaround using cloud code :
https://parse.com/questions/users-editing-other-users-in-javascript-sdk

Related Links

Error: IOSurface.h not found
Can CIDetector returns more than one CIFeature of type CIDetectorTypeRectangle?
Firebase InstanceID Token Refresh delay on ios device
iOS Local Notification Sound Not Working
How to embed framework without copying in project
Itunes connect team not showing in Xcode
NSMutableArray addobject refrence count +2? [duplicate]
Official way to use the new keyboard click sounds in iOS 10
Gradually change background color based on scroll
UICollectionViewCell pushed down when embedded in navigation controller
self.navigationController always returns nil using storyboard to storyboard navigation
How to do unwind segue in Xcode
Camera view overlay with ROI
App size with an extension in App Store
Setting UITextView's cursor position generates warning
PKRevealController Crashes

Categories

HOME
odoo-10
demandware
auth0
android-sqlite
haskell-stack
jsonschema
styling
prometheus
r-caret
prestashop-1.7
h2o
executable
zend-expressive
chart.js2
nanotime
calabash-android
apex
orchardcms-1.10
data-annotations
textmatebundles
selenium-edgedriver
liferay-aui
code-signing
sumifs
point-cloud-library
x-sendfile
laravel-valet
jsplumb
react-redux-form
google-shared-contacts
ose
deep-copy
spring-data-cassandra
confirm
bits
jetty-9
texture-mapping
angular-xeditable
sweet.js
phasset
kendo-chart
html-lists
glumpy
cakephp-2.3
ckcontainer
intrinsics
blpapi
filenet-content-engine
mtp
push-api
multiscreen
omap
conditional-statements
mysql5
tab-delimited
razor-2
laravel-validation
bonecp
asp.net-apicontroller
yourls
execcommand
transport-stream
emitmapper
webcal
loadlibrary
speaker
ad-hoc-distribution
ribbon-control
undeclared-identifier
cellphone
semantic-zoom
custom-tag
n900
network-scan
iequalitycomparer
help-authoring
sharepoint-feature
virtual-server
reference-library

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App