evothings / phonegap-estimotebeacons

This repository is no longer maintained - new maintainer is welcome!
MIT License
338 stars 178 forks source link

How to keep plugin from loading on non iOS 7 devices? #25

Closed samrung closed 10 years ago

samrung commented 10 years ago

Thanks for the great plugin. I've got it working in Cordova 3.3 in 7.0 and 7.1.

However, the app I'm building is targeted for iOS 5.1 and above (iBeacons are not central to the overall app). Any attempt to run the app on anything less than 7 results in a fatal error on startup:

dyld: Symbol not found: _OBJCCLASS$_CLBeaconRegion

Obviously, iBeacons aren't supported in anything less than 7.0, but do you know of a way to conditionally load the plugin? I have code in onDeviceReady handlers to detect iOS version and not execute any of the iBeacon code, but it fails before it even gets to any of my code.

samrung commented 10 years ago

Nevermind, the issue was solved here:

https://github.com/Estimote/iOS-SDK/issues/77

kdzwinel commented 10 years ago

Great! Thanks for sharing.