expo-beacon 0.5.2 → 0.5.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -242,11 +242,10 @@ public class ExpoBeaconModule: Module {
|
|
|
242
242
|
// MARK: - Eddystone Pair
|
|
243
243
|
|
|
244
244
|
Function("pairEddystone") { (identifier: String, namespace: String, instance: String) -> Void in
|
|
245
|
-
|
|
246
|
-
guard namespace.count == 20, namespace.wholeMatch(of: hexPattern) != nil else {
|
|
245
|
+
guard namespace.count == 20, namespace.range(of: "^[0-9a-fA-F]+$", options: .regularExpression) != nil else {
|
|
247
246
|
throw Exception(name: "INVALID_NAMESPACE", description: "Namespace must be 20 hex characters, got: \(namespace)")
|
|
248
247
|
}
|
|
249
|
-
guard instance.count == 12, instance.
|
|
248
|
+
guard instance.count == 12, instance.range(of: "^[0-9a-fA-F]+$", options: .regularExpression) != nil else {
|
|
250
249
|
throw Exception(name: "INVALID_INSTANCE", description: "Instance must be 12 hex characters, got: \(instance)")
|
|
251
250
|
}
|
|
252
251
|
|