How to handle issues after generating multiple environment in iOS (Swift)?

114 views Asked by At

I am trying to handle multiple environment in iOS project. I have followed proper steps of generating "Production" and "Development" Targets.

But, when I try to run Target "Development", it crashes on UI, like,

Problem: Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[ setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key capacityWeightLabel.'

Solution:

  1. For handling this Crash, I have unchecked specific target and checked again.
  2. reconnected IBOutlet again to specific control.

Hectic thing is I need to do this for every crash wherever it will appear. How I can handle this situation.?

Please help!

Thanks in advance

1

There are 1 answers

1
Abu Ul Hassan On

1- Copy Your Storyboard and other nibs if exist

2- Remove Storyboard and other nibs from Project

3- Drag and drop copied files in to project root folder a popup will appear

4- select the targets you want to share same files

Doing this will allow you to handle these kind of crash issues.