title: how to disable bluetooth after unsubscribing to nearby api with ios swift?
body: <p>I have read in other posts on SO that it's not possible to disable the bluetooth programatically.</p>
  
  <p>Does this make sense? As i enable it programmatically when I subscribe to (google) nearby api.</p>
  
  <p>Here is my code. Unsubscribing doesn't disable the BT. </p>
  
  <p>Any other way to achieve that?</p>
  
  <pre><code>/// Stops publishing/subscribing.
  public func unsubscribeNearbyApi() {
      subscription = nil
      //                    self.messageMgr?.removeObserver(&lt;#T##observer: NSObject##NSObject#&gt;, forKeyPath: &lt;#T##String#&gt;)
      //                    self.messageMgr?.removeObserver(&lt;#T##observer: NSObject##NSObject#&gt;, forKeyPath: &lt;#T##String#&gt;, context:&lt;#T##UnsafeMutablePointer&lt;Void&gt;#&gt;)
  }
  
  /// Starts scanning for nearby devices that are publishing
  // their names.
  func subscribeNearbyApi() {
  
      let params: GNSSubscriptionParams = GNSSubscriptionParams.init(
          messageNamespace: "inline-beacon",
          type: "line",
          strategy:
          GNSStrategy.init(paramsBlock: { (params: GNSStrategyParams!) -&gt; Void in
              params.includeBLEBeacons = true;
          }))
  
      if (self.messageMgr == nil)
      {
          getPermissions()
      }
      if let messageMgr = self.messageMgr {
          subscription = messageMgr.subscriptionWithParams(params,
              messageFoundHandler:{[unowned self] (message: GNSMessage!) -&gt; Void in
  </code></pre>