title: How to access a private objective C variable in Swift View Controller?
body: <p>I've got next to no knowledge about Objective-C. I'm working with an Obj-C framework for an AVCaptureSession. I need to have access to the AVCaptureVideoDataOutput of the camera's session. </p>
  
  <p>In the .m file the session is initialized and set up. </p>
  
  <pre><code>@property (nonatomic, strong) AVCaptureSession *session;
  </code></pre>
  
  <p>I cannot move the property from the .m to .h file because the .m file needs it for all of the functions to set it up.</p>
  
  <p>I also tried making them readwrite / readonly in the .m and .h respectively to avoid a redeclaration issue, but then when I call on the camera.session after I'm starting the camera up, "session" returns nil and the app crashes.</p>
  
  <p>I don't know if there would be any problem just moving all of the code into the .h file so it's all publicly accessable? </p>
  
  <p>How can I access the session property from a .m file in my View Controller?</p>