Estimote / iOS-Proximity-SDK

Estimote Proximity SDK for iOS
https://developer.estimote.com
Apache License 2.0
61 stars 27 forks source link

Xcode 11 GM support #48

Closed alex-kovalenko closed 5 years ago

alex-kovalenko commented 5 years ago

Hi!

When can we expect Xcode 11 GM support?

Thanks, Alex.

alexbartisro commented 5 years ago

On my current implementation onEnter is never called on iOS 13.

Edit:

private func setupBeaconObserver(with zones: [BeaconZone]) {
    let credentials = CloudCredentials(appID: appID, appToken: appToken)
    self.zones = zones

    self.proximityObserver = ProximityObserver(credentials: credentials, onError: { error in
      #if STAGING || EXPERIMENTAL
      DispatchQueue.main.async {
        self.delegate?.showAlert(with: "Development visible error: \(error.localizedDescription)")
      }
      #endif
    })

    var proximityZones = [ProximityZone]()

    for zone in zones {
      let proximityZone = ProximityZone(tag: zone.tag ?? "", range: ProximityRange.near)

      proximityZone.onEnter = { zoneContext in
         //never called on iOS 13. Works fine on iOS 12.
        self.beaconNotificationManager.showLocalNotification(for: zone)
      }

      proximityZones.append(proximityZone)
    }

    self.proximityObserver.startObserving(proximityZones)
  }
heypiotr commented 5 years ago

Is that in the foreground or background? Does your app have correct permissions? Note that on iOS 13, you need the new Bluetooth permission.

(Also, the process to obtain the "always" location permission also changed slightly, so you may want to double-check that as well. Maybe this will come handy: https://blog.estimote.com/post/186160021855/get-ready-for-ios-13-bluetooth-and-location)

alexbartisro commented 5 years ago

@heypiotr that's in the foreground? Yeah, I;ve added NSBluetoothAlwaysUsageDescription permission and it successfully asks for permission at first launch.

chwastek commented 5 years ago

@trusk89

  1. is it iOS 13 or 13.1 beta 3?
  2. I assume there is simply no action at all once observer start to work? (no crashes but nothing happens basically?)
alexbartisro commented 5 years ago

@chwastek

  1. 13.1
  2. exactly

Edit: same on iOS 13 GM

heypiotr commented 5 years ago

The problem was actually in the "EstimoteBluetoothScanning" library, a low-level library that the Proximity SDK uses for low-level Bluetooth scanning. We've just released version 1.0.6 of that library with iOS 13 fixes, so you should be able to simply run pod update EstimoteBluetoothScanning in your project to fetch this latest version.

We'll also be releasing stable 1.5.0 later today or tomorrow, built with Xcode 11 GM, and with EstimoteBluetoothScanning requirement bumped to 1.0.6.

alexbartisro commented 5 years ago

@heypiotr thanks for all the help!

heypiotr commented 5 years ago

1.5.0 is out :tada:

https://github.com/Estimote/iOS-Proximity-SDK/releases/tag/v1.5.0

Thanks all for your help/reports!