RIBs icon indicating copy to clipboard operation
RIBs copied to clipboard

iOS tutorials contain error

Open plasmabal opened this issue 7 years ago • 9 comments

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.

plasmabal avatar Jan 25 '18 07:01 plasmabal

Can you please elaborate on the specific compiler errors that you are seeing?

edrew08 avatar Jan 25 '18 14:01 edrew08

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.

artman avatar Jan 31 '18 05:01 artman

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()
    

meiyu123 avatar Mar 30 '18 20:03 meiyu123

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 avatar Nov 18 '18 05:11 Byku

@Byku would you be willing to make a PR after going through all of the examples in the tutorials?

ermik avatar Nov 20 '18 12:11 ermik

@Byku, please do.

artman avatar Nov 28 '18 23:11 artman

@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 avatar Dec 08 '18 18:12 Byku

@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.

ermik avatar Dec 10 '18 20:12 ermik

@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.

artman avatar Dec 10 '18 21:12 artman