From 969d065770758c0026960746becbbe1b93ea1129 Mon Sep 17 00:00:00 2001 From: gcojocaru1 <90767547+gcojocaru1@users.noreply.github.com> Date: Wed, 6 Oct 2021 12:16:22 +0300 Subject: [PATCH] fixed platform detection Fixed platform detection because `Platform ` is an object and to get the platform we should use `OS` key --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index 55ddff50..11da50e0 100644 --- a/index.js +++ b/index.js @@ -6,7 +6,7 @@ const { RNIosSettingsBundle } = NativeModules; export default { get: (key,callback) => { - if(Platform == 'android') + if(Platform.OS == 'android') return callback([1,'it works only on ios!']); RNIosSettingsBundle.getValByKey(key,callback);