ios podfile fix

alpha
Jan Umbach 2023-03-06 23:32:33 +01:00
parent a89455f887
commit 4c7e2615c3
2 changed files with 21 additions and 13 deletions

View File

@ -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 = ENVNO_FLIPPER == “1” ? FlipperConfiguration.disabled : FlipperConfiguration.enabled
linkage = ENVUSE_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!

View File

@ -1,7 +1,12 @@
import EncryptedStorage from 'react-native-encrypted-storage';
export async function getData(key: string): Promise<string | null> {
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<void> {