RIBs
RIBs copied to clipboard
iOS tutorials contain error
I use ios/tutorials/tutorial1 and follow every steps in wiki/iOS-Tutorial-1 and wiki/iOS-Tutorial-2. The project doesn't compile once tutorial 2 is finished. I don't have much experience in Swift and it's a bit painful to pin down the cause, nor do I have enough experience see if I did anything wrong in RIB architecture. I mean, I'm interested in the architecture, and I want to follow the tutorials and see how it works. The sample code should just compile if I follow every single step in the tutorial. Please correct the sample code or steps in tutorials. Thank you.
Can you please elaborate on the specific compiler errors that you are seeing?
The tutorials project README's incorrectly stated that the project for tutorial 2 is the end result of tutorial 1. This isn't true and has been fixed. Additionally, there seems to be a problem with the Xcode templates as they produce a uppercased variable names. Working on a fix.
There is problem with the naming giving in the tutorial: The name has been changed from LoggedOutBuilder to LogOutBuilder in the documentation:
-
let loggedOutBuilder = LoggedOutBuilder(dependency: component)
-
let loggedOutBuilder = LogOutBuilder(dependency: component)
-extension RootComponent: LoggedOutDependency { +extension RootComponent: LogOutDependency {
One other feedback with the tutorial:
It should be easier to understand to break the following line into two:
-
let launchRouter = RootBuilder(dependency: AppComponent()).build()
-
let rootBuilder = RootBuilder(dependency: AppComponent()) -
let launchRouter = rootBuilder.build()
Tutorial3: In the example code there is weak var inside protocol. But XCode doesn't like it:
'weak' should not be applied to a property declaration in a protocol and will be disallowed in future versions
@Byku would you be willing to make a PR after going through all of the examples in the tutorials?
@Byku, please do.
@Byku would you be willing to make a PR after going through all of the examples in the tutorials?
@artman @ermik There are no errors in the code. The error's only at wiki page, but github doesn't allow create pull requests to wiki pages.
@Byku I totally forgot about that, how silly of me. If you could, please go over the example code in the wiki and the source code that concerns this issue, then summarize your findings for one of @uber staff members who will fix the errors you can't make a PR for.
If this is not something you are interested in doing please respond so that other people may take it on.
cc @artman @neakor @sbarow guys you may want to keep an eye out for this becoming actionable for you.
@Byku happy to help to get your fixes over to the wiki. You can clone the wiki source from https://github.com/uber/RIBs.wiki.git.