title: Create singleton instance via extension per app?
body: <p>In the <a href="https://developer.apple.com/library/prerelease/ios/documentation/HealthKit/Reference/HKHealthStore_Class/" rel="nofollow">Apple documentation</a>, it says that some instances need to be create once per app like HKHealthStore:</p>
  
  <blockquote>
    <p>You need only a single HealthKit store per app. These are long-lived objects. Create the store once, and keep a reference for later use.</p>
  </blockquote>
  
  <p>Is doing something convenient like below safe or is there a better way?</p>
  
  <pre><code>public extension HKHealthStore {
  
      class var sharedInstance: HKHealthStore? {
          if !HKHealthStore.isHealthDataAvailable() {
              return nil
          }
  
          struct Singleton {
              static let instance = HKHealthStore()
          }
  
          return Singleton.instance
      }
  
  }
  </code></pre>
  
  <p>That way I can do this without polluting with custom managers:
  <code>HKHealthStore.shareInstance?.requestAuthorizationToShareTypes</code></p>
  
  <p>Is this ok or is there a better architectural approach?</p>