The following are some notes I’m compiling as I’m beginning a journey
down the rabbit hole, writing an app in Swift utilizing the VIPER app development methodology
I had trouble importing nested source code into XCode before realizing that I
needed to import the folder with corresponding Groups. This is done by
clicking the checkbox “Create Groups for any Added Folders”
Without doing this, the compiler was not able to build the project.
- Since there is no way to do method swizzling in Swift, there are no real easy ways to do mocking/stubbing the way we used to do so in Ruby. Instead, this is forcing me to rely on plain old Swift structs. There are some simple ways to stub, but it ends up looking kind of awkward and very wiring-intensive like this:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
- Using the
boascaffolding generators helped me understand the concepts behind the view.
- Tip: Build a VIPER module, but don’t build it all at once. Just focus on the Presenter-Interactor-Wireframe component, or the DataStore-Entity-Interactor component. This will keep your head from exploding.
- Dude. I miss vim. Alcatraz + xvim helped a little…
- xcodebuild + xcpretty + Guard-shell == some sort of CI feedback loop.
- Manually creating mocks in Swift = kind of painful. If you override (subclass) a NSObject in Swift, you must provide it with the
@objcpragma, otherwise it throws a segfault error
- You must contact CircleCI manually if you want to activate an iOS build (it’s still in beta). What are some other good CI tools to use with iOS?