Thread 1: signal SIGINT

Hello. I am new to Xcode.

I have a project using Xcode 10.2 swift 5.

When I run the project to my real Iphone 6 phone the program stop at debug and the app hung until i click continue program in the debug

The variable languageLabels is defined as

The thread 1 failed at this line when i get a value from dictionary

Can some help?

You need to provide some info:

  • what is the output from the print statement above ?
  • how is languagesLabels defined ?: show the complete definition.
  • Are you sure it is not nil ?
  • what is key ?

Some code formatting with formatter (<>) tool will make it easier to read:

languageLabels = (MyFunctions.getValue(key: Utils.languageLabelsKey) as! NSDictionary 

if i print the a value from the key without using get i.e  

languageLabels!.get(key)  
print("my labes \(languageLabels[key])") 

I get my labes Optional(Done) but when I get using .get 

let lngValue = languageLabels!.get(key) 

program stop in debug and I have to click continue program execution for the app to continue launching languagesLabels is not nil

Could you show

  • get function in MyFunctions

There is probably an error there. and how you declared in Utils

  • languageLabelsKey
Thread 1: signal SIGINT
 
 
Q