Becoming a Better iOS Developer Through Tooling

Becoming a Better iOS Developer Through Tooling

Slides for a presentation that I gave at AltConf 2017, in San José, California.

I talked about how investing in you toolset can help you reach the next level as an iOS developer.


Oscar Swanros

June 08, 2017


  1. @swanros Becoming a Better iOS Developer Through Tooling AltConf 2017

  2. @swanros Oscar Swanros @Swanros Colima, México

  3. @swanros CloudApp

  4. @swanros Promo code at the end of the presentation

  5. @swanros Colima

  6. @swanros Sergio Tapiro Velasco

  7. @swanros

  8. @swanros I got some for you!

  9. @swanros What?

  10. @swanros tooling architecture

  11. @swanros Tools can be modular

  12. @swanros Swift is modular by nature

  13. @swanros open public fileprivate private internal

  14. @swanros class ContactView: UIView { private lazy var avatarImageView =

    AvatarImageView() }
  15. @swanros open class P3NetworkOperation: P3Operation { // MARK: - Private

    Support Types private enum OperationType { case GetData case Download } }
  16. @swanros public class BaseNetworkOperation<T: Codable>: P3NetworkOperation { override public var

    headerParams: [String : String]? { var headers: [String:String] = [:] if let session = SessionManager.sharedManager.currentSession { headers["Authorization"] = "Token token=\"\(session.token)\"" } if [.put, .patch, .post].contains(method) { headers["Content-Type"] = "application/json" } return headers } }
  17. @swanros Tools can be dependencies too

  18. @swanros

  19. @swanros

  20. @swanros

  21. @swanros “have you used the Facebook SDK with Swift 3?”

  22. @swanros

  23. @swanros every single part of your app that you don't

    have _control_ of in your app, is a dependency
  24. @swanros data services

  25. @swanros data persistence

  26. @swanros if it’s not essential…

  27. @swanros Tools can prevent us from making mistakes

  28. @swanros

  29. @swanros public enum APIError: String, ErrorConvertible { case malformedServerResponse =

    "malformed_error_response" case emailTaken = "email_taken" case unverifiedUser = "unverified_user" // ... public var errorDescription: String { return self.description } public var domain: String { return "net.Pacific3.CallicoAPIKit.Error" } } extension APIError: CustomStringConvertible { public var description: String { switch self { case .phoneNumberTaken: return "Phone number already taken." case .emailTaken: return "Email already taken.” } } }
  30. @swanros public struct UserCollection: JSONParselable, Collection, IteratorProtocol, CustomDebugStringConvertible, ExpressibleByArrayLiteral {

    } let users: UserCollection = [firstUser, secondUser]
  31. @swanros public class GetContactsOperation: BaseOperation<UserCollection> { public override var simpleEndpoint:

    EndpointConvertible { return Endpoint.contacts } public var contacts: UserCollection? public init?() { super.init() } override func generated(result: UserCollection) { contacts = result finish() } } guard let op = GetContactsOperation() else { return } P3OperationQueue().addOperation(op)
  32. @swanros Your architecture and toolset should work for you, not

    against you
  33. @swanros don’t trip yourself up

  34. @swanros new features requests may arrive at any time

  35. @swanros no iOS app is feature-complete for more than 360

  36. @swanros /users/:user_id/favorites

  37. @swanros Demo

  38. @swanros This is not an universal solution

  39. @swanros Your toolset should be much more than just pieces

    of code
  40. @swanros Soft tools Personal/professional relationships Ability to speak to people

    Asking for help is actually okay
  41. @swanros Meta tools How are you going to know why

    you did something? Document every single decision you make Time machines do exist!
  42. @swanros Questions?

  43. @swanros cloudlovesaltconf 50% off

  44. @swanros GRACIAS @swanros