iOS-iPadOS app icon sizes with sketch file

DeviceIcon Size
App Icons
iPhone60×60 pt
20×120 px @2x
180×180 px @3x
iPad Pro83.5×83.5 pt
167×167 px @2x
iPad, iPad mini76×76 pt
152×152 px @2x
App Store1024×1024 pt (1024×1024 px @1x)
Device Spotlight icon size
iPhone40×40 pt (120×120 px @3x)
40×40 pt (80×80 px @2x)
iPad Pro, iPad, iPad mini 40×40 pt (80×80 px @2x)
Device Settings icon size
iPhone29×29 pt (87×87 px @3x)
29×29 pt (58×58 px @2x)
iPad Pro, iPad, iPad mini29×29 pt (58×58 px @2x)
Device Notification icon size
iPhone20×20 pt (60×60 px @3x)
20×20 pt (40×40 px @2x)
iPad Pro, iPad, iPad mini20×20 pt (40×40 px @2x)

Download sketch file

My thoughts on SwiftUI

I recently completed one medium size SwiftUI project and, it was a wonderful experience with MVVM architecture. I took some time to grab everything, but my struggles been paid off.

I no longer want to do a new project on the storyboard. You should not do it either. No fear just start you will finish it soon.

Storyboard was some improvements than single xib file, at least you did not have to open many tabs for xib which always slowed down Xcode. But it was always like this on Apple platform since Xcode 3.2, developing app means you have to handle xib file.

I always liked Android’s XML way than a xib file on a Xcode.

I never liked the Auto Layout either, but it always worked on all devices. But I hated it when I had to break a few constraints to add a few more to make space for a new TextField or Image. It has never been easy.

The most useful thing about SwiftUI that how easy it is to create a view and reuse it anywhere if you can make it in that way. The @Binding and @State are really helpful.

And the ViewModel updates a model which your view observes always. So my ViewModel has a property @Published whenever it changes its all observers will get the update by calling the property @ObservedObject or @StateObject.

The SwiftUI is very new but it is the best thing for app developers on Apple platforms. I even converting few more apps in SwiftUI in the coming months.

Download a demo login app I’m working on from github.

Git worktree example

Git corktree example with video

Git worktree is great a way to separate your code without having to create a new branch when you are not yet ready to commit.

I have created a new repo in GitHub and cloned in a dir ‘worktree-example’.

git clone [email protected]:sminrana/git-worktree-example.git

Open the dir with code . command and update the file. Now we can push it to main branch.

git add 
git commit -m "message"
git push origin main

It’s time to create our first worktree. We will put our worktree one dir up from our current dir where our main branch is. The documentation says -d flag with single hyphen but two hypen worked for me.

git worktree add --d ../test 

Now open test folder and open it in code . and make some changes in readme file then commit. Since worktree is detached HEAD you can’t commit to anywhere, for this we have create a new branch from here, run following command.

git switch -c dev
git push origin dev

You can remove worktree

git worktree remove test

and remove completely from ref.

git worktree prune

That’s all you needed. More git worktree commands

git worktree add --d ../hotfix 
git worktree remove hotfix
git worktree prune

Throwaway working tree
git worktree add --d <path>

Download source code