/ iOS

Best iOS hacks from Twitter: September Edition

It has been a while since my last article on iOS development tips. Time to fix it!

You probably noticed that September was a month of excitement because of Swift 4.2, Mojave Dark Mode, iOS 12 and launch of three new iPhones. Aside from Apple-related news, our community talked about Xcode 10 hidden features, XCTest runtime, keyboard shortcuts and innovative Xcode ability to email certificate creator 😅.

Let's take a look at what interesting has been shared around the Twitter-verse.

Twitter tip #1

As always, more iPhone models means more work for developers. The iPhone XS will not affect you if your apps already support iPhone X as it has the same screen size. However, the upcoming 6.5-inch OLED iPhone XS Max was released with a new iPad-like landscape mode. It might bring us some troubles... Arek Holko shows some things to watch out:

For specific guidance, read how iOS apps will adapt to the iPhone XS Max and iPhone XR screen sizes. To summarise:

Twitter tip #2

In case you have not done this yet — here is a useful reminder for beta testers of iOS/macOS etc.. Go to settings -> General -> Profiles in order to avoid getting stuck in beta world.

Twitter tip #3

If you like Dark Mode from Mojave, but results in Xcode becoming weird for you, check this alternative out:

And please….

Twitter tip #4

Keyboard shortcuts can save a good amount on time. This is a useful tip if you use multiple tabs in Xcode. And if the shortcut doesn’t work for you, check Xcode’s Key Bindings preferences:

Twitter tip #5

A secret gem here! A new Quicklook feature is available in Xcode 10 which allows you to export NSData into a separate file to investigate it later:

Twitter tip #6

Want to undo some changes under git? No need to go into the console or into any other application in order for git to discard the changes. With Xcode 10, you can do it without leaving code editor:

Twitter tip #7

This subtle difference in declaring setUp() and tearDown() functions will make a huge difference when you're writing tests. Worth noticing and keep that in mind:

Twitter tip #8

This tip will help you use placeholders in the code to avoid compiler error messages. Also, you can use placeholders to create your first code snippets, which can save you even more time!

Twitter tip #9

When life is hard… Here is a way of using Media in Xcode 10.

Twitter tip #10

Xcode 10 brings new navigation features for Storyboard/Xib based applications. Learn more:

Twitter tip #11

This tip shows you how to follow the Dependency Injection Principle if you use Static Class for your Network communication.

Twitter tip #12

And this is how Xcode suggests solving an issue of synchronizing certificates on multiple machines. 😀 Radical approach for sure!

Now it’s time to use these tips on your brand-new Dark Mode Mojave ;) Feel free to add more tips I have missed in the comments below.

P.S: Huge thanks to our Lead iOS developer, Andrew Chersky, for bringing and describing more tips into the final article.

Lisa Dziuba

Lisa Dziuba

Swift Learner & Flawless App co-founder. Part of CocoaHeadsUA team. Product Hunt Maker of the Year Runner-Up. Fun, happy and food addicted girl :)

Read More
Best iOS hacks from Twitter: September Edition