- iOS 8+
- Latest version of Xcode
-
Open App.xcodeproj. When open press run using a simulator or device.
-
Find OAuthAttributes and add the keys and secrets, remember to fix the tests
-
Run the test using CMD + U
-
The project has one view controller called TweetListViewController that shows a list of tweets being tracked. If there is no tweets available you have the chance to retry. In case the stream fails you are able to reconnect also.
-
Unit tests are done with XCTest. The test covearage is 87% there are some bits that will be better cover using App testing with other tools. It would be possible to add more coverage using something like OCMock for Apple classes. (NSURLSession, etc) for that we will have to do some unit testing in Objective C where we pretent to use OCMock.
-
There are not third party libraries and the code is written using the below coding standards
- Use descriptive names with camelcase for classes, methods, variables, etc. Classes should be capitalized while method names should start with lowercase
- One line between any line of code (Not on variables definitions)
- Method braces always open in the same line
- Use one space separation between any operators for clarity
- Use //MARK: - to make navigating the code easier
- Conditionals bodies should always be in braces
- Should only be used when increases clarity
- There should be an space between method arguments
- ClassName+Functionality
- Declare all protocols in its own file
- File should have the same name as the protocol
- Avoid using self since Swift doesn’t require it to access objects or methods
- Don't include their definition unless is necessary e.g () -> () in remove () -> ()
- Try to use native types when available
- Let the compiler infer the type for a constant or variable unless you need to specify a type
- No need to use them, you should not have two statements in the same line
- Should be removed as the code belongs to the team not to the person the has created the class
- Keep it simple
- Keep classes and methods short
- No comments (the code should be self explanatory)
- Classes
-
- AppDelegate
-
- Utils
-
- Vendors
-
- Model
-
-
- Domain
-
-
-
- Services
-
-
- Controllers
-
-
- ViewControllers (Storyboards)
-
-
-
- Views
-
-
- Resources
-
-
- Images, fonts, strings, plists, etc
-
- Create class folders in finder and drag them to Xcode
- Configuration driven by xcconfigs
- Unit testing is done using XCTest