title: Initializing properties of an Objective-C class in Swift results in unexpected values and types
body: <p>I'm trying to initialize an Objective C class in Swift but I'm getting very unexpected results. Properties are all strings and get set inline during initialization. When I try to use the new object, the properties are not what I set but seem to point to arbitrary values (I'm guessing they're just picking up whatever is in memory locations they're pointing to). Here is what I have:</p>
  
  <p>MTUserInfo.h</p>
  
  <pre><code>#import &lt;Foundation/Foundation.h&gt;
  
  @interface MTUserInfo : NSObject
  
  @property (nonatomic, readonly, assign) NSString* firstName;
  @property (nonatomic, readonly, assign) NSString* lastName;
  @property (nonatomic, readonly, assign) NSString* userEmail;
  @property (nonatomic, readonly, assign) NSString* userPhone;
  
  - (instancetype)initWithFirstName:(NSString*)firstName
                           lastName:(NSString*)lastName
                          userEmail:(NSString*)userEmail
                          userPhone:(NSString*)userPhone;
  
  @end
  </code></pre>
  
  <p>MTUserInfo.m</p>
  
  <pre><code>#import "MTUserInfo.h"
  
  @implementation MTUserInfo
  
  - (instancetype)initWithFirstName:(NSString *)firstName
                           lastName:(NSString *)lastName
                          userEmail:(NSString *)userEmail
                          userPhone:(NSString *)userPhone
  {
      self = [super init];
  
      if (self) {
          _firstName = firstName;
          _lastName = lastName;
          _userEmail = userEmail;
          _userPhone = userPhone;
      }
  
      return self;
  }
  
  @end
  </code></pre>
  
  <p>And my simple View controller in Swift:</p>
  
  <pre><code>import UIKit
  
  class ViewController: UIViewController {
      var userInfo: MTUserInfo
  
      required init?(coder aDecoder: NSCoder) {
          userInfo = MTUserInfo(firstName: "Firstname",
                                lastName: "Lastname",
                                userEmail: "email@provider.com",
                                userPhone: "555-555-4433")
  
          super.init(coder: aDecoder)
      }
  
      override func viewDidLoad() {
          super.viewDidLoad()
          // Do any additional setup after loading the view, typically from a nib.
      }
  
      override func viewDidAppear(_ animated: Bool) {
          super.viewDidAppear(animated)
  
          print("User info: ", self.userInfo.firstName)
      }
  
      override func didReceiveMemoryWarning() {
          super.didReceiveMemoryWarning()
          // Dispose of any resources that can be recreated.
      }
  }
  </code></pre>
  
  <p>When I debug it, here's what I get:
  <a href="https://i.stack.imgur.com/Xjorb.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Xjorb.png" alt="enter image description here"></a></p>
  
  <p>Any ideas on what's going on or how to fix it? I'm at a loss here.</p>
  
  <p>Btw, this is a simplified example. In my real app I have no control over the Objective-C classes, they're imported as a library.</p>