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
|
platform :ios, min_ios_version_supported
|
||||||
prepare_react_native_project!
|
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
|
# To fix this you can also exclude `react-native-flipper` using a `react-native.config.js`
|
||||||
# js
|
# ```js
|
||||||
# module.exports =
|
# module.exports = {
|
||||||
#. dependencies:
|
# dependencies: {
|
||||||
#. …(process.env.NO_FLIPPER ? ‘react-native-flipper’: platforms: iOS: null : ),
|
# ...(process.env.NO_FLIPPER ? { 'react-native-flipper': { platforms: { ios: null } } } : {}),
|
||||||
#
|
# ```
|
||||||
flipper_config = ENV’NO_FLIPPER’ == “1” ? FlipperConfiguration.disabled : FlipperConfiguration.enabled
|
flipper_config = ENV['NO_FLIPPER'] == "1" ? FlipperConfiguration.disabled : FlipperConfiguration.enabled
|
||||||
linkage = ENV’USE_FRAMEWORKS’
|
|
||||||
|
linkage = ENV['USE_FRAMEWORKS']
|
||||||
if linkage != nil
|
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
|
use_frameworks! :linkage => linkage.to_sym
|
||||||
End
|
end
|
||||||
|
|
||||||
|
|
||||||
target 'ClickAndJoinApp' do
|
target 'ClickAndJoinApp' do
|
||||||
config = use_native_modules!
|
config = use_native_modules!
|
||||||
|
|
|
@ -1,7 +1,12 @@
|
||||||
import EncryptedStorage from 'react-native-encrypted-storage';
|
import EncryptedStorage from 'react-native-encrypted-storage';
|
||||||
|
|
||||||
export async function getData(key: string): Promise<string | null> {
|
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> {
|
export async function setData(key: string, value: string): Promise<void> {
|
||||||
|
|
Loading…
Reference in New Issue