title: could not execute support code to read Objective-C class data in the process. at real iPhone device
body: <p>when this objective-c based method call in Simulator, it doesn't matter.
  But in real iPhone device, it occurs <code>Thread 1: signal SIGABRT</code></p>
  
  <p><code>warning: could not execute support code to read Objective-C class data in the process. This may reduce the quality of type information available.</code></p>
  
  <p>here is code</p>
  
  <pre><code>+ (NSData *)aesDecrypt:(NSURL *)url :(NSString *)key {
  
  NSData *data = [NSData dataWithContentsOfURL: url];
  if (data == nil) {
      NSLog(@"file not found");
      return nil;
  }
  
  char keyPtr[kCCKeySizeAES128];
  bzero(keyPtr, sizeof(keyPtr));
  
  [key getCString:keyPtr maxLength:sizeof(keyPtr)];
  
  size_t bufferSize = [data length] + kCCBlockSizeAES128;
  size_t decryptedBytesSize = 0;
  
  void *buffer = malloc(bufferSize);
  
  CCCryptorStatus result = CCCrypt(kCCDecrypt, kCCAlgorithmAES128, kCCOptionPKCS7Padding, keyPtr, kCCKeySizeAES128, keyPtr, [data bytes],
          [data length], buffer, bufferSize, &amp;decryptedBytesSize);
  
  NSData *decrypted = [NSData dataWithBytes:buffer length:bufferSize];
  
  NSError *error;
  
  if (kCCSuccess != result) {
      NSLog(@"aes decrypt error");
      return nil;
  }
  
  return decrypted;
  }
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/kp14C.jpg" rel="noreferrer"><img src="https://i.stack.imgur.com/kp14C.jpg" alt="enter image description here"></a>
  <a href="https://i.stack.imgur.com/oxnno.png" rel="noreferrer"><img src="https://i.stack.imgur.com/oxnno.png" alt="enter image description here"></a></p>
  
  <p>I tried to fix that code several types.</p>
  
  <ul>
  <li>return other types.</li>
  <li>save NSData to files, and return nothing. read it in swift.</li>
  </ul>
  
  <p>All of my tries can't fix the problems: No problem in Simulator, death in real device - iPhone 6 with iOS 11.3.1</p>
  
  <p>EDIT) attach screenshot: <strong>Other Linker Flags</strong>
  <a href="https://i.stack.imgur.com/9tgRU.png" rel="noreferrer"><img src="https://i.stack.imgur.com/9tgRU.png" alt="enter image description here"></a></p>