title: return Dictonary from Objective c file to Swift?
body: <p>I am working with open cv and swift. While returning <code>NSDictionary</code> from Objective-C file to Swift getting an error.</p>
  
  <pre><code>2018-10-10 12:43:25.972927+0530 OPencvwithSwift[2430:618249] -[__NSFrozenDictionaryM length]: unrecognized selector sent to instance 0x1c022b6e0
  2018-10-10 12:43:25.973704+0530 OPencvwithSwift[2430:618249] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSFrozenDictionaryM length]: unrecognized selector sent to instance 0x1c022b6e0'
  *** First throw call stack:
  (0x183eb6d8c 0x1830705ec 0x183ec4098 0x183ebc5c8 0x183da241c 0x1053c23d4 0x105360aa0 0x10585294c 0x104aec9a0 0x104ae287c 0x105cd51dc 0x105cd519c 0x105cd9d2c 0x183e5f070 0x183e5cbc8 0x183d7cda8 0x185d62020 0x18dd9c758 0x104af984c 0x18380dfc0)
  libc++abi.dylib: terminating with uncaught exception of type NSException
  </code></pre>
  
  <p>Here is Objective c code - </p>
  
  <pre><code>- (NSDictionary *)predict:(UIImage*)img confidence:(double)confidence {
  
      cv::Mat src = [img cvMatRepresentationGray];
      int label;
      NSLog(@"%d",label);
      std::cout&lt;&lt;_labelsDictionary;
      self-&gt;_faceClassifier-&gt;predict(src, label, confidence);
      NSLog(@"%f",confidence);
      NSMutableDictionary *dict = [[NSMutableDictionary alloc]initWithCapacity:10];
      [dict setObject:[NSNumber numberWithInt:confidence] forKey:_labelsDictionary[@(label)]];
      NSLog(@"%@",dict);
      return dict;
  }
  </code></pre>
  
  <p>Calling this function from Swift:</p>
  
  <pre><code>let result = facemodel?.predict(greyimage, confidence: confidence) // crash on this line
  </code></pre>