Sign up for our Awesome weekly Newsletter.

 

  • Hand-curated with the best of the week iOS development News, Tools, Code snippets, Techniques, Productivity hacks, Tutorials, and Videos.
  • One email keeps you in the know
  • Delivered straight to your inbox every Friday morning
  • Completely FREE

 



All App Store Apps Required to Have a Privacy Policy: Starting October 3rd

Starting October 3, 2018, App Store Connect will require a privacy policy for all new apps and app updates in order to be submitted for distribution on the App Store or through TestFlight external testing. In addition, your app’s privacy policy link or text will only be editable when you submit a new version of your app. 

To add or edit your privacy policy for the App Store:

1. Go to My Apps in App Store Connect, and click on your app.
2. Under App Store, click on App Information.
3. In the top right corner, add your privacy policy link for iOS apps or macOS apps, or enter text directly for tvOS apps.
4. Click Save.

Source: All New and Updated App Store Apps Required to Have a Privacy Policy Starting October – Mac Rumors

Defer Statement: How to use it in Swift!

Here is a hidden gem in Swift called defer. Defer allows you to defer (no surprises there!) execution of a block of code until the end of the current scope is reached.

func updateImage() {
    defer { print("Did update image") }
    
    print("Will update image")
    imageView.image = updatedImage
}
Above code prints the folowing :
// Will update Image
// Did update image

The most common use case seen around is opening and closing a context, for example when handling access to files. A FileHandle requires to be closed once the access has been finished. You can benefit from the defer statement to ensure you don’t forget to do this.

Source: Defer usage in Swift – Swift Programming – Medium

Best Practices: Structuring Your Swift Code!

As your project grows in size, it’s essential that your code is structured well so that future maintenance doesn’t become a pain.

If there is one thing that you can to take from this article then it’s this quote below:

Whenever you touch a part of the code base, you should try to leave it better than how you found it

Check out the article below by John Sundell who provides some great tips to organize your code base which will pay big dividends down the road.

Source: Structuring Swift code — Swift by Sundell

Migrating from iOS to Mac : Build an macOS app in Swift

If you are an iOS developer and have been looking forward to Apple opening up the gates to port your iOS apps to MacOS, then it’s going to be a long and painful waiting game. But fret not, check out this great tutorial from Cory Bohon where he explains some core differences between the two platforms and builds a simple Mac App that you can download and explore.

Source: Migrating from iOS to Mac — Part II: Build an macOS app in Swift

Unit Tests: The complete guide to Network Unit Testing in Swift!

Networking is one of the most popular features in iOS development but is also the most unintuitive for developers to write unit tests against it. Check out the linked article below to find out how to write unit tests for your networking piece of your code.

Check out this insightful article linked below to find out how to write unit tests for your networking piece of your code.

Source: The complete guide to Network Unit Testing in Swift

Make Your iOS App ‘Feel’ Better: A Guide Over Taptic Engine & Haptic Feedback!

If you have watched the wonderful WWDC 2017 talk about designing sound for apps then you will know how much impact sound can have on the app’s user experience. With the release of the iPhone 6S and 6S Plus, Apple introduced Taptic Engine which provides tactile sensations in the form of vibrations (called haptic signals.) and along with it came a suite of API’s that developers can harness to make big usability improvements. Check out the article linked below which goes in depth into the API.

Source: Make Your iOS App ‘Feel’ Better — A Guide Over Taptic Engine & Haptic Feedback

App Store: Are app reviews worth reading?

App reviews are highly opinion based and not fact based and normally not a great way to gauge if an app is good or bad. They sure can be helpful (for a developer), but most reviews are composed of biased rants and half-legible reviews which are hard to sift through. Sadly, most people judge an app just by looking at the app’s review scores even though it does not actually reflect the quality of an app.

People want to be heard, and giving a 1-star or 5-star rating adds oomph to your opinion.

Check out this fantastic article by John Saito who has sifted through 1000’s of app reviews to provide his take on app store reviews. Quote from the article:

After crunching the numbers, I found that over 70% of our app reviews were either 5-star or 1-star reviews. Over two-thirds of reviewers either loved or hated our app.

Source: Are app reviews worth reading? – Dropbox Design – Medium