Norway


Topics

Topics

can be a messy place. Today we’ll check out a tool from the folks at Venmo that can help us tidy up called Synx. Let’s take a look.

At its core, Synx’s main purpose is to reorganize the files and folders in our Xcode project folder to match the groups and structure we’ve setup inside Xcode’s Navigator pane.

We can start by organizing a project full of content:

- synx 1 - #264: Keep Xcode Project Folders Organized with Synx 📂 – Little Bites of Cocoa – Tips and techniques for iOS and Mac development

Then we’ll install Synx:

gem install 

Then we can simply head into our project’s directory and run the main command:

synx ./OCMock.xcodeproj

- synx gif 1 - #264: Keep Xcode Project Folders Organized with Synx 📂 – Little Bites of Cocoa – Tips and techniques for iOS and Mac development

Synx will work its magic and re-organize our files on disk, creating directories and moving files as needed to make things match the groups in our project.

- synx 3 - #264: Keep Xcode Project Folders Organized with Synx 📂 – Little Bites of Cocoa – Tips and techniques for iOS and Mac development

Additionally, we can also use Synx to remove files no longer referenced in our project, like this:

synx --prune ./OCMock.xcodeproj

We’re also provided a couple arguments to help us control how Synx behaves.

We can exclude files:

synx --exclusion /OCMockTests ./OCMock.xcodeproj

Last but not least, for those of us who like to manually sort our files by concept rather than name, we can disable sorting:

synx --no-sort-by-name ./OCMock.xcodeproj

Choosing how to organize projects can be a very subjective and personal choice, this is just one approach. Always use whatever works best.

Learn more about Synx at git.io/synx.



Source link

LEAVE A REPLY

Please enter your comment!
Please enter your name here