From 4c7e2615c36a60cc9c102b64fbd2c13030456329 Mon Sep 17 00:00:00 2001 From: jan Date: Mon, 6 Mar 2023 23:32:33 +0100 Subject: [PATCH] ios podfile fix --- ios/Podfile | 27 +++++++++++++++------------ src/caj/helper/storage/appData.ts | 7 ++++++- 2 files changed, 21 insertions(+), 13 deletions(-) diff --git a/ios/Podfile b/ios/Podfile index 60ad3c5..983296b 100644 --- a/ios/Podfile +++ b/ios/Podfile @@ -3,21 +3,24 @@ require_relative '../node_modules/@react-native-community/cli-platform-ios/nativ platform :ios, min_ios_version_supported prepare_react_native_project! -# If you are using a react-native-flipper your iOS build will fail when NO_FLIPPER=1 is set. -# because react-native-flipper depends on (FlipperKit,…) that will be excluded + +# If you are using a `react-native-flipper` your iOS build will fail when `NO_FLIPPER=1` is set. +# because `react-native-flipper` depends on (FlipperKit,...) that will be excluded # -# To fix this you can also exclude react-native-flipper using a react-native.config.js -# js -# module.exports = -#. dependencies: -#. …(process.env.NO_FLIPPER ? ‘react-native-flipper’: platforms: iOS: null : ), -# -flipper_config = ENV’NO_FLIPPER’ == “1” ? FlipperConfiguration.disabled : FlipperConfiguration.enabled -linkage = ENV’USE_FRAMEWORKS’ +# To fix this you can also exclude `react-native-flipper` using a `react-native.config.js` +# ```js +# module.exports = { +# dependencies: { +# ...(process.env.NO_FLIPPER ? { 'react-native-flipper': { platforms: { ios: null } } } : {}), +# ``` +flipper_config = ENV['NO_FLIPPER'] == "1" ? FlipperConfiguration.disabled : FlipperConfiguration.enabled + +linkage = ENV['USE_FRAMEWORKS'] if linkage != nil - Pod::UI.puts “Configuring Pod with #linkageally linked Frameworks”.green + Pod::UI.puts "Configuring Pod with #{linkage}ally linked Frameworks".green use_frameworks! :linkage => linkage.to_sym -End +end + target 'ClickAndJoinApp' do config = use_native_modules! diff --git a/src/caj/helper/storage/appData.ts b/src/caj/helper/storage/appData.ts index 18a451a..ff1838e 100644 --- a/src/caj/helper/storage/appData.ts +++ b/src/caj/helper/storage/appData.ts @@ -1,7 +1,12 @@ import EncryptedStorage from 'react-native-encrypted-storage'; export async function getData(key: string): Promise { - return EncryptedStorage.getItem(key); + return new Promise((resolve, reject) => { + EncryptedStorage.getItem(key).then(value => { + if (value === undefined) resolve(null); + else resolve(value); + }); + }); } export async function setData(key: string, value: string): Promise {