Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • Save data to Parse DB table in iOS app

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 160
    Comment on it

    To save data in parse DB table, create one PFObject and write the information that you want to save to table. For example - I have a table name "Post" with column names : title, message, postTime. Lets save one record to this table.

    PFObject *newObj = [PFObject objectWithClassName:@"Post"];
           // In above line className means table name
            [newObj setObject:@"New post" forKey:@"title"];
            [newObj setObject:@"This is my first post" forKey:@"message"];
            [newObj setObject:[NSDate date] forKey:@"postTime"]; // postTime is date type column in table Post
    
            [newObj saveInBackgroundWithBlock:^(BOOL success, NSError *error){
            if(success){
            // object saved
            }
            }];
    

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: