How to create Master Detail app in xcode 13?

1.1k Views Asked by At

As shown in image there is no option for Master detail app which was available in older version of xcode...So question is it's name is changed or it is deprecated and not available in latest xcode versions? (one in the dark mode is latest xcode version while the other in light mode is older xcode)

/

2

There are 2 best solutions below

0
Anton Holub On

In fact this was changed even earlier - since XCode 12. For now all previously available templates like Master-Detail, Single View, Tabbed application are represented by single template - App.

For now you can (and should) create application flows on your own. This was done because Apple introduced new components with an easy API that make templates useless.

E.g. specifically for your case - since iOS 14 you can use UISplitViewController for creating master-details apps with very simple API - you can do it either programatically or via storyboards. If you want to have master-detail app with lower deployment target where UISplitViewController is not available - you have to use approach from Master-detail template using separate view controllers and segues.

0
malhal On

Download Xcode 11.7 from Apple here.

Copy:

Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/Xcode/Templates/Project Templates/iOS/Application/Master-Detail App.xctemplate

to:

~/Library/Developer/Xcode/Templates

You might have to create this Templates folder if you have never worked with user templates before.

Now in Xcode you should see this:

enter image description here

Also update the template to work on new Xcodes (Tested up to Xcode 15.1 beta 1) by opening Template Info.plist in your text editor and replace lines 458-461 with:

            <string>storageType</string>
            <key>Units</key>
            <dict>
                <key>Core Data</key>