Gargob
Gargob

Reputation: 251

deleted storyboard xcode but present during execution

I deleted my storyboard by accident in XCode. However, when I run my app, the app executes as if the old storyboard is still present. Is there a way to get the old one back or have a new one take its place?

Thanks in advance.

Upvotes: 1

Views: 2899

Answers (2)

Dannie P
Dannie P

Reputation: 4622

If you run on simulator (and it has the version of storyboard you need), you probably can just get the storyboard from simulator app folder. In my case the path would be:
~/Library/Application Support/iPhone Simulator/6.1/Applications/87519545-64CB-4917-B3CF-821F7BF968BD/audio converting.app/en.lproj/MainStoryboard.storyboardc

But it's always better to use e.g. git for source code versioning.

Hope it helps.

Upvotes: 0

David Rönnqvist
David Rönnqvist

Reputation: 56645

How to probably get the old one back

You have most likely just deleted the reference from your project so the file is still there. You can find the file by going to your project folder (on disk). It can be found by right clicking your project in Xcode and choosing "Show in Finder"

Show in finder

The Storyboard file should be located in your main locale folder (english per default)

e.lproj

If the file is there you can just drag it back to your project.

Stoyboard file

If it is not there you have to find the file some other way... You are using some kind of version control, right? You can also replace it with another storyboard.

How to replace it with a new one

You can specify a new storyboard in the Summary tab of your target.

You can find it by

  1. Pressing your project
  2. Pressing your target
  3. Selecting your new Storyboard from the drop down.

Changing to another Storyboard

Upvotes: 4

Related Questions