Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial
marsela meco
511 Pointsmessage not showing up in iPhone
in self destructing message iPhone app, at very last stage, i click build, but the inbox won't show anything, no messages i send to myself will show up? Please help? Thankyou!
4 Answers
Dennis Walsh
5,793 PointsMarsela,
Can you be a little more specific about where in the last stage, Retrieving and Viewing Data from Parse.com, you are stuck? Can you see the users and messages in Parse.com when you log in directly?
marsela meco
511 PointsThanks for helping out! I'm on "Retrieving Data from Parse.com." in last stage. when i send a photo to myself, afterwards i quit simulator and rebuild it, then inbox is still blank. BUT Parse "messages" group comes up with a new message ID-so message went throughout o backend. IDK, please help, maybe i missed a line of code or something.
Dennis Walsh
5,793 PointsMarsela,
Could it be since you are sending the message your self, and you are then viewing the message, that it is being removed, since you are the last recipient of the message? It is a disappearing message application after all.
So you are listed as your own friend? You are sending the message from you to you, not to another "friend"? If you create several users in the app, and send messages to them, does it show up as expected? If they send you messages, do they show up? The messages should appear since the data is retrieved from Parse.com each time the app is launched (InboxView.m in viewWillAppear).
The retrieveMessages method is where you are requesting the data from Parse.com. It should allow you to receive messages sent to yourself since it is only looking for the current user ID as the message recipient ID, however, I am not my own friend, so I cannot test it at the moment. I will have to review where I am removing myself.
Try this just to be sure you are running the most current version of your app, you can either try to Clean the app under Product->Clean or just delete the app in the simulator, then run it again. When I get quirky behavior in an app I like to make sure it is not related to a build issue.
You can also try running the Treehouse version of the app against your Parse.com account and see if you get the same results. You will need to change the access information (application ID and client key) in AppDelegate.m. You can get this information from Parse.com.
Christopher Kelley
3,310 PointsDouble check that your class names match in your code and your Parse dashboard. I ran into a simple typo in my CameraViewController uploadMessage() method where I wrote:
PFObject *message = [PFObject objectWithClassName:@"Message"];
instead of:
PFObject *message = [PFObject objectWithClassName:@"Messages"];
Note the singular "Message" in the first line. Presumably I was writing "message" so many times in that block I mis-typed it in the class name.
Obviously, since I was storing my messages in a class called "Message", but retrieving from a class called "Messages", I was getting zero results in my inbox.
I'm surprised that Parse doesn't return an error if you request data from a non-existent class. Could have saved me some time!
Good luck,
Chris