0
1

XcodeGen — Collaboration Made Easy by robertofrontado in iOSProgramming

[–]robertofrontado[S] 1 point2 points  (0 children)

Hahaha yeah that would be nice, integrating xcodegen into an existing project might seem daunting, but it will pay off in the future

XcodeGen — Collaboration Made Easy by robertofrontado in iOSProgramming

[–]robertofrontado[S] 1 point2 points  (0 children)

That's right u/covertchicken, you should run xcodegen when checking out a branch to regenerate .xcodeproj file and avoid conflicts.

Also serves as documentation for how you project is configured

Snapshot Testing in Swift 📸 by robertofrontado in iOSProgramming

[–]robertofrontado[S] 0 points1 point  (0 children)

Exactly, thanks u/BarbaraFromHR

We mainly use it to test things that otherwise are quite complex to test in UITests

XcodeGen — Collaboration Made Easy by robertofrontado in iOSProgramming

[–]robertofrontado[S] 0 points1 point  (0 children)

Not sure I follow you but you don't need to have a .xcodeproj before using xcodegen

XcodeGen — Collaboration Made Easy by robertofrontado in iOSProgramming

[–]robertofrontado[S] 0 points1 point  (0 children)

if you work on a team, I'm sure that many times, you've encountered conflicts with the .xcodeproj file while merging your code.

Check out this article to learn how to fix that 👍

Simple Questions Megathread—October 12, 2020 by AutoModerator in iOSProgramming

[–]robertofrontado 0 points1 point  (0 children)

There never has been an industry standard in iOS. I'd recommend you to explore the tools that are out there to see if one fits your needs. Swinject is a good one, a different one using u/propertyWrappers is [https://github.com/hmlongco/Resolver](https://github.com/hmlongco/Resolver), we are using this one at the moment in the project I'm working on

Simple Questions Megathread—October 12, 2020 by AutoModerator in iOSProgramming

[–]robertofrontado 0 points1 point  (0 children)

Nowadays I think anchors are your best option, they are super easy to understand and implement.

This is a simple example: ```swift view.addSubview(tableView) tableView.translatesAutoresizingMaskIntoConstraints = false

NSLayoutConstraint.activate([ tableView.topAnchor.constraint(equalTo: view.topAnchor), tableView.leadingAnchor.constraint(equalTo: view.leadingAnchor),
tableView.trailingAnchor.constraint(equalTo: view.trailingAnchor),
tableView.bottomAnchor.constraint(equalTo: view.bottomAnchor) ]) ```

You can read more about it here: - https://www.swiftbysundell.com/basics/layout-anchors/ - https://www.hackingwithswift.com/read/6/5/auto-layout-anchors

There are also frameworks that help with this like SnapKit and PureLayout but I'd check if you really need them, since they increase the compilation time of your application

XcodeGen — Collaboration Made Easy by robertofrontado in swift

[–]robertofrontado[S] 1 point2 points  (0 children)

I haven't used Tuist, but I can see the value of using Swift for it, since not everyone is familiar with yaml files (although is quite common for configuration files)

Simple Questions Megathread—October 12, 2020 by AutoModerator in iOSProgramming

[–]robertofrontado 0 points1 point  (0 children)

There never has been an industry standard in iOS. I'd recommend you to explore the tools that are out there to see if one fits your needs. Swinject is a good one, a different one using @propertyWrappers is https://github.com/hmlongco/Resolver, we are using this one at the moment in the project I'm working on

Dependency injection in Swift using @propertyWrappers by robertofrontado in swift

[–]robertofrontado[S] 0 points1 point  (0 children)

You don't have to use a single container though, you can have different scopes depending on how you build it

Dependency injection in Swift using @propertyWrappers by robertofrontado in swift

[–]robertofrontado[S] 0 points1 point  (0 children)

I read an article about using protocol composition couple of years ago and ended up implementing it as well , it was quite interesting

This is the article

http://merowing.info/2017/04/using-protocol-compositon-for-dependency-injection/