Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Intro to iOS] Assignment 3 - Twitter - Review My App #1

Open
randyting opened this issue Oct 5, 2015 · 8 comments
Open

[Intro to iOS] Assignment 3 - Twitter - Review My App #1

randyting opened this issue Oct 5, 2015 · 8 comments

Comments

@randyting
Copy link
Owner

My app is complete with bugs. Please see README.md for a description of the bugs. I'm working on reverting to a version of the codebase without the bug. Thanks! /cc @codepath

@randyting
Copy link
Owner Author

@codepath I just fixed the first bug. I was presenting the main navigation stack modally on top of the LoginViewController, but I never dismiss the modally presented view controller when I log out. This causes some weird state in which the a new view controller is modally presented on the LoginViewController even when the original modally presented view controller wasn't dismissed. I solved this problem for now by embedding the login view controller in a navigation controller and pushing the rest of the views on top of that instead of presenting modally.

I still can't run the app in the simulator without the debugger, but it works perfectly on hardware.

Sorry for any inconvenience (late submission). =)

@codepathreview
Copy link

You were in time, and in general I start reviewing apps in the morning.

It is best to have at max 1 view controller presented as a modal.

--dirk

@codepathreview
Copy link

that version of SwiftyJSON wasn't released yet for Cocoapods?

@randyting
Copy link
Owner Author

screen shot 2015-10-05 at 11 42 57 am

This versions of SwiftyJSON is released for Cocoapods, but it needs to be built as a framework because it's written in Swift. When I use use_frameworks! in my Podfile, I get the error shown in the screengrab above. Looks like BDBOAuth1Manager has issues building as a framework. This looks like an open issue that the creator of BDBOAuth1Manager is looking into:

bdbergeron/BDBOAuth1Manager#35
http://stackoverflow.com/questions/31740248/xcode-swift-pods-installation-import-file-not-found

As a workaround, I build all my pods as static libraries and manually added the SwiftyJSON project to my workspace. Have you tried this before? Any tips for a better way to do this?

@randyting
Copy link
Owner Author

Also, if possible, I'd like some feedback on my specific implementations of:

  1. Cached NSDateFormatter. I get an error when I don't include this:
  required init?(coder aDecoder: NSCoder) {
      fatalError("init(coder:) has not been implemented")
  }

What should I implement here?

  1. My implementation of storing the TwitterUser object into NSUserDefaults. I think I need to look deeper into NSCoding to really understand what I'm doing, but I hacked together a solution for serializing the TwitterUser object. Is this the correct implementation? Will we be learning more about NSCoding in this course?

@randyting
Copy link
Owner Author

I just spent a few hours trying to figure out why my app doesn't start up in the simulator without the debugger connected. Looks like when I don't import SwiftyJSON in any of the files, the issue goes away. I'm going to parse JSONs the good old fashioned way on the next assignment. This library has caused me enough trouble already. I would like to know if you have any better ideas for parsing JSON.

Thanks,

Randy

@codepathreview
Copy link

Yeah, sometimes XCode can be a b*tch, sorry. Meanwhile I cant compile and run your app, so will just look at your sourcecode

@codepathreview
Copy link

👍 nice work. The point of this homework was to explore a simple example of a full MVC application with a RESTful API. For each point in the homework feedback checklist, I'll either confirm that you're on the right track with the implementation, or I'll provide some feedback:

  • You should declare all unnecessarily public properties as private for better encapsulation.
  • Nice work specifying the Auto Layout constraints.
  • Note that you should try handling the conditionally present retweet label in the cells. This is a situation where its not possible to specify the behavior that you want solely using Interface Builder.
  • Nice work setting up the controls within the Tweet cells. It can sometimes be hard to have a clean design for embedded controls because it usually involves cumbersome plumbing. This is an instance where I think having the model handle the network action helps greatly simplify the implementation.
  • Nice work handling the post tweet insertion into the feed. In real MVC apps, the more polished experiences have to do a certain amount of local object management to make a fully seamless experience.

In general, you should challenge yourself to create visually polished applications. That's where you'll find all the rough edges of the iOS framework and earn the next level of mastery.

-- dirk

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants