ios podfile fix
parent
a89455f887
commit
4c7e2615c3
27
ios/Podfile
27
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!
|
||||
|
|
|
@ -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> {
|
||||
|
|
Loading…
Reference in New Issue