mirror of
https://github.com/BlueWallet/BlueWallet.git
synced 2024-11-20 02:09:10 +01:00
Merge pull request #6559 from BlueWallet/removesplash
DEL: Artificial Splash delay
This commit is contained in:
commit
9a6a6d12ed
12
App.tsx
12
App.tsx
@ -1,6 +1,6 @@
|
|||||||
import 'react-native-gesture-handler'; // should be on top
|
import 'react-native-gesture-handler'; // should be on top
|
||||||
import React, { useEffect } from 'react';
|
import React from 'react';
|
||||||
import { NativeModules, Platform, useColorScheme } from 'react-native';
|
import { useColorScheme } from 'react-native';
|
||||||
import { NavigationContainer } from '@react-navigation/native';
|
import { NavigationContainer } from '@react-navigation/native';
|
||||||
import { SafeAreaProvider } from 'react-native-safe-area-context';
|
import { SafeAreaProvider } from 'react-native-safe-area-context';
|
||||||
import { navigationRef } from './NavigationService';
|
import { navigationRef } from './NavigationService';
|
||||||
@ -9,18 +9,10 @@ import { NavigationProvider } from './components/NavigationProvider';
|
|||||||
import { BlueStorageProvider } from './blue_modules/storage-context';
|
import { BlueStorageProvider } from './blue_modules/storage-context';
|
||||||
import MasterView from './MasterView';
|
import MasterView from './MasterView';
|
||||||
import { SettingsProvider } from './components/Context/SettingsContext';
|
import { SettingsProvider } from './components/Context/SettingsContext';
|
||||||
const { SplashScreen } = NativeModules;
|
|
||||||
|
|
||||||
const App = () => {
|
const App = () => {
|
||||||
const colorScheme = useColorScheme();
|
const colorScheme = useColorScheme();
|
||||||
|
|
||||||
useEffect(() => {
|
|
||||||
if (Platform.OS === 'ios') {
|
|
||||||
// Call hide to setup the listener on the native side
|
|
||||||
SplashScreen?.addObserver();
|
|
||||||
}
|
|
||||||
}, []);
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<NavigationContainer ref={navigationRef} theme={colorScheme === 'dark' ? BlueDarkTheme : BlueDefaultTheme}>
|
<NavigationContainer ref={navigationRef} theme={colorScheme === 'dark' ? BlueDarkTheme : BlueDefaultTheme}>
|
||||||
<NavigationProvider>
|
<NavigationProvider>
|
||||||
|
@ -1,22 +1,13 @@
|
|||||||
import 'react-native-gesture-handler'; // should be on top
|
import 'react-native-gesture-handler'; // should be on top
|
||||||
import React, { Suspense, lazy, useEffect } from 'react';
|
import React, { Suspense, lazy } from 'react';
|
||||||
import { NativeModules, Platform } from 'react-native';
|
|
||||||
import MainRoot from './navigation';
|
import MainRoot from './navigation';
|
||||||
import { useStorage } from './blue_modules/storage-context';
|
import { useStorage } from './blue_modules/storage-context';
|
||||||
import Biometric from './class/biometrics';
|
import Biometric from './class/biometrics';
|
||||||
const CompanionDelegates = lazy(() => import('./components/CompanionDelegates'));
|
const CompanionDelegates = lazy(() => import('./components/CompanionDelegates'));
|
||||||
const { SplashScreen } = NativeModules;
|
|
||||||
|
|
||||||
const MasterView = () => {
|
const MasterView = () => {
|
||||||
const { walletsInitialized } = useStorage();
|
const { walletsInitialized } = useStorage();
|
||||||
|
|
||||||
useEffect(() => {
|
|
||||||
if (Platform.OS === 'ios') {
|
|
||||||
// Call hide to setup the listener on the native side
|
|
||||||
SplashScreen?.addObserver();
|
|
||||||
}
|
|
||||||
}, []);
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Biometric />
|
<Biometric />
|
||||||
|
@ -7,14 +7,14 @@
|
|||||||
android:required="false" />
|
android:required="false" />
|
||||||
|
|
||||||
<uses-permission android:name="android.permission.INTERNET" />
|
<uses-permission android:name="android.permission.INTERNET" />
|
||||||
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
|
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />
|
||||||
<uses-permission android:name="android.permission.CAMERA"/>
|
<uses-permission android:name="android.permission.CAMERA" />
|
||||||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
|
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
|
||||||
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
|
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
|
||||||
<uses-permission android:name="android.permission.READ_MEDIA_IMAGES" />
|
<uses-permission android:name="android.permission.READ_MEDIA_IMAGES" />
|
||||||
<uses-permission android:name="android.permission.USE_BIOMETRIC" />
|
<uses-permission android:name="android.permission.USE_BIOMETRIC" />
|
||||||
<uses-permission android:name="android.permission.USE_FINGERPRINT" />
|
<uses-permission android:name="android.permission.USE_FINGERPRINT" />
|
||||||
<uses-permission android:name="android.permission.POST_NOTIFICATIONS"/>
|
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
|
||||||
<uses-permission android:name="android.permission.VIBRATE" />
|
<uses-permission android:name="android.permission.VIBRATE" />
|
||||||
<uses-permission android:name="android.permission.ACTION_OPEN_DOCUMENT" />
|
<uses-permission android:name="android.permission.ACTION_OPEN_DOCUMENT" />
|
||||||
<uses-permission android:name="android.permission.ACTION_GET_CONTENT" />
|
<uses-permission android:name="android.permission.ACTION_GET_CONTENT" />
|
||||||
@ -33,24 +33,26 @@
|
|||||||
android:theme="@style/AppTheme"
|
android:theme="@style/AppTheme"
|
||||||
android:networkSecurityConfig="@xml/network_security_config">
|
android:networkSecurityConfig="@xml/network_security_config">
|
||||||
|
|
||||||
<meta-data android:name="com.dieam.reactnativepushnotification.notification_channel_name"
|
<meta-data
|
||||||
android:value="BlueWallet notifications"/> <!-- YOUR NOTIFICATION CHANNEL NAME -->
|
android:name="com.dieam.reactnativepushnotification.notification_channel_name"
|
||||||
<meta-data android:name="com.dieam.reactnativepushnotification.notification_channel_description"
|
android:value="BlueWallet notifications" />
|
||||||
android:value="Notifications about incoming payments"/> <!-- YOUR NOTIFICATION CHANNEL DESCRIPTION -->
|
<meta-data
|
||||||
|
android:name="com.dieam.reactnativepushnotification.notification_channel_description"
|
||||||
<!-- Change the value to true to enable pop-up for in foreground (remote-only, for local use ignoreInForeground) -->
|
android:value="Notifications about incoming payments" />
|
||||||
<meta-data android:name="com.dieam.reactnativepushnotification.notification_foreground"
|
<meta-data
|
||||||
android:value="true"/>
|
android:name="com.dieam.reactnativepushnotification.notification_foreground"
|
||||||
<!-- Change the value to false if you don't want the creation of the default channel -->
|
android:value="true" />
|
||||||
<meta-data android:name="com.dieam.reactnativepushnotification.channel_create_default"
|
<meta-data
|
||||||
android:value="true"/>
|
android:name="com.dieam.reactnativepushnotification.channel_create_default"
|
||||||
<!-- Change the resource name to your App's accent color - or any other color you want -->
|
android:value="true" />
|
||||||
<meta-data android:name="com.dieam.reactnativepushnotification.notification_color"
|
<meta-data
|
||||||
android:resource="@color/white"/> <!-- or @android:color/{name} to use a standard color -->
|
android:name="com.dieam.reactnativepushnotification.notification_color"
|
||||||
|
android:resource="@color/white" />
|
||||||
|
|
||||||
<receiver android:name="com.dieam.reactnativepushnotification.modules.RNPushNotificationActions" />
|
<receiver android:name="com.dieam.reactnativepushnotification.modules.RNPushNotificationActions" />
|
||||||
<receiver android:name="com.dieam.reactnativepushnotification.modules.RNPushNotificationPublisher" />
|
<receiver android:name="com.dieam.reactnativepushnotification.modules.RNPushNotificationPublisher" />
|
||||||
<receiver android:name="com.dieam.reactnativepushnotification.modules.RNPushNotificationBootEventReceiver"
|
<receiver
|
||||||
|
android:name="com.dieam.reactnativepushnotification.modules.RNPushNotificationBootEventReceiver"
|
||||||
android:exported="true">
|
android:exported="true">
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
<action android:name="android.intent.action.BOOT_COMPLETED" />
|
<action android:name="android.intent.action.BOOT_COMPLETED" />
|
||||||
@ -59,20 +61,11 @@
|
|||||||
|
|
||||||
<service
|
<service
|
||||||
android:name="com.dieam.reactnativepushnotification.modules.RNPushNotificationListenerService"
|
android:name="com.dieam.reactnativepushnotification.modules.RNPushNotificationListenerService"
|
||||||
android:exported="false" >
|
android:exported="false">
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
<action android:name="com.google.firebase.MESSAGING_EVENT" />
|
<action android:name="com.google.firebase.MESSAGING_EVENT" />
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
</service>
|
</service>
|
||||||
<activity android:name=".SplashActivity"
|
|
||||||
android:exported="true"
|
|
||||||
>
|
|
||||||
<intent-filter>
|
|
||||||
<action android:name="android.intent.action.MAIN" />
|
|
||||||
<category android:name="android.intent.category.LAUNCHER" />
|
|
||||||
</intent-filter>
|
|
||||||
</activity>
|
|
||||||
|
|
||||||
|
|
||||||
<activity
|
<activity
|
||||||
android:name=".MainActivity"
|
android:name=".MainActivity"
|
||||||
@ -81,6 +74,10 @@
|
|||||||
android:configChanges="keyboard|keyboardHidden|orientation|screenSize|uiMode"
|
android:configChanges="keyboard|keyboardHidden|orientation|screenSize|uiMode"
|
||||||
android:windowSoftInputMode="adjustResize"
|
android:windowSoftInputMode="adjustResize"
|
||||||
android:exported="true">
|
android:exported="true">
|
||||||
|
<intent-filter>
|
||||||
|
<action android:name="android.intent.action.MAIN" />
|
||||||
|
<category android:name="android.intent.category.LAUNCHER" />
|
||||||
|
</intent-filter>
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
<action android:name="android.intent.action.VIEW" />
|
<action android:name="android.intent.action.VIEW" />
|
||||||
<category android:name="android.intent.category.DEFAULT" />
|
<category android:name="android.intent.category.DEFAULT" />
|
||||||
@ -109,7 +106,6 @@
|
|||||||
android:mimeType="text/plain"
|
android:mimeType="text/plain"
|
||||||
android:pathPattern=".*\\.psbt" />
|
android:pathPattern=".*\\.psbt" />
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
|
|
||||||
</activity>
|
</activity>
|
||||||
|
|
||||||
<meta-data android:name="com.bugsnag.android.API_KEY" android:value="17ba9059f676f1cc4f45d98182388b01" />
|
<meta-data android:name="com.bugsnag.android.API_KEY" android:value="17ba9059f676f1cc4f45d98182388b01" />
|
||||||
@ -118,11 +114,11 @@
|
|||||||
<queries>
|
<queries>
|
||||||
<intent>
|
<intent>
|
||||||
<action android:name="android.intent.action.VIEW" />
|
<action android:name="android.intent.action.VIEW" />
|
||||||
<data android:scheme="https"/>
|
<data android:scheme="https" />
|
||||||
</intent>
|
</intent>
|
||||||
<intent>
|
<intent>
|
||||||
<action android:name="android.intent.action.VIEW" />
|
<action android:name="android.intent.action.VIEW" />
|
||||||
<data android:scheme="http"/>
|
<data android:scheme="http" />
|
||||||
</intent>
|
</intent>
|
||||||
</queries>
|
</queries>
|
||||||
</manifest>
|
</manifest>
|
||||||
|
@ -1,26 +0,0 @@
|
|||||||
package io.bluewallet.bluewallet; // Replace with your package name
|
|
||||||
|
|
||||||
import android.content.Intent;
|
|
||||||
import android.os.Bundle;
|
|
||||||
import android.os.Handler;
|
|
||||||
import androidx.appcompat.app.AppCompatActivity;
|
|
||||||
|
|
||||||
public class SplashActivity extends AppCompatActivity {
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
|
||||||
super.onCreate(savedInstanceState);
|
|
||||||
setContentView(R.layout.splash_screen); // Replace with your layout name
|
|
||||||
|
|
||||||
int SPLASH_DISPLAY_LENGTH = 1000; // Splash screen duration in milliseconds
|
|
||||||
|
|
||||||
new Handler().postDelayed(new Runnable() {
|
|
||||||
@Override
|
|
||||||
public void run() {
|
|
||||||
Intent mainIntent = new Intent(SplashActivity.this, MainActivity.class);
|
|
||||||
SplashActivity.this.startActivity(mainIntent);
|
|
||||||
SplashActivity.this.finish();
|
|
||||||
}
|
|
||||||
}, SPLASH_DISPLAY_LENGTH);
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,13 +0,0 @@
|
|||||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:background="@color/background_color">
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:layout_width="100dp"
|
|
||||||
android:layout_height="75dp"
|
|
||||||
android:scaleType="fitCenter"
|
|
||||||
android:layout_centerInParent="true"
|
|
||||||
android:src="@drawable/splash_icon" />
|
|
||||||
</RelativeLayout>
|
|
||||||
|
|
@ -74,11 +74,13 @@ export const BlueStorageProvider = ({ children }: { children: React.ReactNode })
|
|||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
setWallets(BlueApp.getWallets());
|
setWallets(BlueApp.getWallets());
|
||||||
|
(async () => {
|
||||||
BlueElectrum.isDisabled().then(setIsElectrumDisabled);
|
const isElectrumDisabledValue = await BlueElectrum.isDisabled();
|
||||||
if (walletsInitialized) {
|
setIsElectrumDisabled(isElectrumDisabledValue);
|
||||||
|
if (walletsInitialized && !isElectrumDisabledValue) {
|
||||||
BlueElectrum.connectMain();
|
BlueElectrum.connectMain();
|
||||||
}
|
}
|
||||||
|
})();
|
||||||
}, [walletsInitialized]);
|
}, [walletsInitialized]);
|
||||||
|
|
||||||
const saveToDisk = async (force: boolean = false) => {
|
const saveToDisk = async (force: boolean = false) => {
|
||||||
|
@ -151,13 +151,11 @@
|
|||||||
B4A29A3A2B55C990002A67DF /* BlueWalletWatch.app in Embed Watch Content */ = {isa = PBXBuildFile; fileRef = B40D4E30225841EC00428FCC /* BlueWalletWatch.app */; platformFilter = ios; };
|
B4A29A3A2B55C990002A67DF /* BlueWalletWatch.app in Embed Watch Content */ = {isa = PBXBuildFile; fileRef = B40D4E30225841EC00428FCC /* BlueWalletWatch.app */; platformFilter = ios; };
|
||||||
B4A29A3C2B55C990002A67DF /* Stickers.appex in Embed App Extensions */ = {isa = PBXBuildFile; fileRef = 6D2A6461258BA92C0092292B /* Stickers.appex */; platformFilter = ios; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; };
|
B4A29A3C2B55C990002A67DF /* Stickers.appex in Embed App Extensions */ = {isa = PBXBuildFile; fileRef = 6D2A6461258BA92C0092292B /* Stickers.appex */; platformFilter = ios; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; };
|
||||||
B4A29A3D2B55C990002A67DF /* WidgetsExtension.appex in Embed App Extensions */ = {isa = PBXBuildFile; fileRef = 6DD4109C266CADF10087DE03 /* WidgetsExtension.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; };
|
B4A29A3D2B55C990002A67DF /* WidgetsExtension.appex in Embed App Extensions */ = {isa = PBXBuildFile; fileRef = 6DD4109C266CADF10087DE03 /* WidgetsExtension.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; };
|
||||||
B4AB21072B61D8CA0080440C /* SplashScreen.swift in Sources */ = {isa = PBXBuildFile; fileRef = B4AB21062B61D8CA0080440C /* SplashScreen.swift */; };
|
|
||||||
B4AB21092B61DC3F0080440C /* SplashScreen.m in Sources */ = {isa = PBXBuildFile; fileRef = B4AB21082B61DC3F0080440C /* SplashScreen.m */; };
|
|
||||||
B4AB225D2B02AD12001F4328 /* XMLParserDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = B4AB225C2B02AD12001F4328 /* XMLParserDelegate.swift */; };
|
B4AB225D2B02AD12001F4328 /* XMLParserDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = B4AB225C2B02AD12001F4328 /* XMLParserDelegate.swift */; };
|
||||||
B4AB225E2B02AD12001F4328 /* XMLParserDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = B4AB225C2B02AD12001F4328 /* XMLParserDelegate.swift */; };
|
B4AB225E2B02AD12001F4328 /* XMLParserDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = B4AB225C2B02AD12001F4328 /* XMLParserDelegate.swift */; };
|
||||||
B4EE583C226703320003363C /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = B40D4E35225841ED00428FCC /* Assets.xcassets */; };
|
B4EE583C226703320003363C /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = B40D4E35225841ED00428FCC /* Assets.xcassets */; };
|
||||||
C59F90CE0D04D3E4BB39BC5D /* libPods-BlueWalletUITests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6F02C2F7CA3591E4E0B06EBA /* libPods-BlueWalletUITests.a */; };
|
C59F90CE0D04D3E4BB39BC5D /* libPods-BlueWalletUITests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6F02C2F7CA3591E4E0B06EBA /* libPods-BlueWalletUITests.a */; };
|
||||||
C978A716948AB7DEC5B6F677 /* BuildFile in Frameworks */ = {isa = PBXBuildFile; };
|
C978A716948AB7DEC5B6F677 /* (null) in Frameworks */ = {isa = PBXBuildFile; };
|
||||||
/* End PBXBuildFile section */
|
/* End PBXBuildFile section */
|
||||||
|
|
||||||
/* Begin PBXContainerItemProxy section */
|
/* Begin PBXContainerItemProxy section */
|
||||||
@ -445,8 +443,6 @@
|
|||||||
B49038D82B8FBAD300A8164A /* BlueWalletUITest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BlueWalletUITest.swift; sourceTree = "<group>"; };
|
B49038D82B8FBAD300A8164A /* BlueWalletUITest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BlueWalletUITest.swift; sourceTree = "<group>"; };
|
||||||
B4A29A452B55C990002A67DF /* BlueWallet.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = BlueWallet.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
B4A29A452B55C990002A67DF /* BlueWallet.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = BlueWallet.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||||
B4A29A462B55C990002A67DF /* BlueWallet-NoLDK.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "BlueWallet-NoLDK.plist"; sourceTree = "<absolute>"; };
|
B4A29A462B55C990002A67DF /* BlueWallet-NoLDK.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "BlueWallet-NoLDK.plist"; sourceTree = "<absolute>"; };
|
||||||
B4AB21062B61D8CA0080440C /* SplashScreen.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SplashScreen.swift; sourceTree = "<group>"; };
|
|
||||||
B4AB21082B61DC3F0080440C /* SplashScreen.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SplashScreen.m; sourceTree = "<group>"; };
|
|
||||||
B4AB225C2B02AD12001F4328 /* XMLParserDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = XMLParserDelegate.swift; sourceTree = "<group>"; };
|
B4AB225C2B02AD12001F4328 /* XMLParserDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = XMLParserDelegate.swift; sourceTree = "<group>"; };
|
||||||
B4D3235A177F4580BA52F2F9 /* libRNCSlider.a */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = archive.ar; path = libRNCSlider.a; sourceTree = "<group>"; };
|
B4D3235A177F4580BA52F2F9 /* libRNCSlider.a */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = archive.ar; path = libRNCSlider.a; sourceTree = "<group>"; };
|
||||||
B642AFB13483418CAB6FF25E /* libRCTQRCodeLocalImage.a */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = archive.ar; path = libRCTQRCodeLocalImage.a; sourceTree = "<group>"; };
|
B642AFB13483418CAB6FF25E /* libRCTQRCodeLocalImage.a */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = archive.ar; path = libRCTQRCodeLocalImage.a; sourceTree = "<group>"; };
|
||||||
@ -474,7 +470,7 @@
|
|||||||
files = (
|
files = (
|
||||||
782F075B5DD048449E2DECE9 /* libz.tbd in Frameworks */,
|
782F075B5DD048449E2DECE9 /* libz.tbd in Frameworks */,
|
||||||
764B49B1420D4AEB8109BF62 /* libsqlite3.0.tbd in Frameworks */,
|
764B49B1420D4AEB8109BF62 /* libsqlite3.0.tbd in Frameworks */,
|
||||||
C978A716948AB7DEC5B6F677 /* BuildFile in Frameworks */,
|
C978A716948AB7DEC5B6F677 /* (null) in Frameworks */,
|
||||||
773E382FE62E836172AAB98B /* libPods-BlueWallet.a in Frameworks */,
|
773E382FE62E836172AAB98B /* libPods-BlueWallet.a in Frameworks */,
|
||||||
);
|
);
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
@ -865,8 +861,6 @@
|
|||||||
B4AB21052B61D8890080440C /* SplashScreen */ = {
|
B4AB21052B61D8890080440C /* SplashScreen */ = {
|
||||||
isa = PBXGroup;
|
isa = PBXGroup;
|
||||||
children = (
|
children = (
|
||||||
B4AB21062B61D8CA0080440C /* SplashScreen.swift */,
|
|
||||||
B4AB21082B61DC3F0080440C /* SplashScreen.m */,
|
|
||||||
);
|
);
|
||||||
name = SplashScreen;
|
name = SplashScreen;
|
||||||
sourceTree = "<group>";
|
sourceTree = "<group>";
|
||||||
@ -1116,7 +1110,7 @@
|
|||||||
);
|
);
|
||||||
mainGroup = 83CBB9F61A601CBA00E9B192;
|
mainGroup = 83CBB9F61A601CBA00E9B192;
|
||||||
packageReferences = (
|
packageReferences = (
|
||||||
6DFC806E24EA0B6C007B8700 /* XCRemoteSwiftPackageReference "EFQRCode.git" */,
|
6DFC806E24EA0B6C007B8700 /* XCRemoteSwiftPackageReference "EFQRCode" */,
|
||||||
B41B76832B66B2FF002C48D5 /* XCRemoteSwiftPackageReference "bugsnag-cocoa" */,
|
B41B76832B66B2FF002C48D5 /* XCRemoteSwiftPackageReference "bugsnag-cocoa" */,
|
||||||
);
|
);
|
||||||
productRefGroup = 83CBBA001A601CBA00E9B192 /* Products */;
|
productRefGroup = 83CBBA001A601CBA00E9B192 /* Products */;
|
||||||
@ -1502,9 +1496,7 @@
|
|||||||
files = (
|
files = (
|
||||||
B44033E92BCC371A00162242 /* MarketData.swift in Sources */,
|
B44033E92BCC371A00162242 /* MarketData.swift in Sources */,
|
||||||
B44033CA2BCC350A00162242 /* Currency.swift in Sources */,
|
B44033CA2BCC350A00162242 /* Currency.swift in Sources */,
|
||||||
B4AB21092B61DC3F0080440C /* SplashScreen.m in Sources */,
|
|
||||||
B44033EE2BCC374500162242 /* Numeric+abbreviated.swift in Sources */,
|
B44033EE2BCC374500162242 /* Numeric+abbreviated.swift in Sources */,
|
||||||
B4AB21072B61D8CA0080440C /* SplashScreen.swift in Sources */,
|
|
||||||
B44033DD2BCC36C300162242 /* LatestTransaction.swift in Sources */,
|
B44033DD2BCC36C300162242 /* LatestTransaction.swift in Sources */,
|
||||||
6D32C5C62596CE3A008C077C /* EventEmitter.m in Sources */,
|
6D32C5C62596CE3A008C077C /* EventEmitter.m in Sources */,
|
||||||
B44033FE2BCC37D700162242 /* MarketAPI.swift in Sources */,
|
B44033FE2BCC37D700162242 /* MarketAPI.swift in Sources */,
|
||||||
@ -2627,7 +2619,7 @@
|
|||||||
/* End XCConfigurationList section */
|
/* End XCConfigurationList section */
|
||||||
|
|
||||||
/* Begin XCRemoteSwiftPackageReference section */
|
/* Begin XCRemoteSwiftPackageReference section */
|
||||||
6DFC806E24EA0B6C007B8700 /* XCRemoteSwiftPackageReference "EFQRCode.git" */ = {
|
6DFC806E24EA0B6C007B8700 /* XCRemoteSwiftPackageReference "EFQRCode" */ = {
|
||||||
isa = XCRemoteSwiftPackageReference;
|
isa = XCRemoteSwiftPackageReference;
|
||||||
repositoryURL = "https://github.com/EFPrefix/EFQRCode.git";
|
repositoryURL = "https://github.com/EFPrefix/EFQRCode.git";
|
||||||
requirement = {
|
requirement = {
|
||||||
@ -2648,7 +2640,7 @@
|
|||||||
/* Begin XCSwiftPackageProductDependency section */
|
/* Begin XCSwiftPackageProductDependency section */
|
||||||
6DFC806F24EA0B6C007B8700 /* EFQRCode */ = {
|
6DFC806F24EA0B6C007B8700 /* EFQRCode */ = {
|
||||||
isa = XCSwiftPackageProductDependency;
|
isa = XCSwiftPackageProductDependency;
|
||||||
package = 6DFC806E24EA0B6C007B8700 /* XCRemoteSwiftPackageReference "EFQRCode.git" */;
|
package = 6DFC806E24EA0B6C007B8700 /* XCRemoteSwiftPackageReference "EFQRCode" */;
|
||||||
productName = EFQRCode;
|
productName = EFQRCode;
|
||||||
};
|
};
|
||||||
B41B76842B66B2FF002C48D5 /* Bugsnag */ = {
|
B41B76842B66B2FF002C48D5 /* Bugsnag */ = {
|
||||||
|
@ -41,8 +41,6 @@ NSUserDefaults *group = [[NSUserDefaults alloc] initWithSuiteName:@"group.io.blu
|
|||||||
[NSUserDefaults.standardUserDefaults setValue:@"" forKey:@"deviceUIDCopy"];
|
[NSUserDefaults.standardUserDefaults setValue:@"" forKey:@"deviceUIDCopy"];
|
||||||
}
|
}
|
||||||
|
|
||||||
[self addSplashScreenView];
|
|
||||||
|
|
||||||
self.moduleName = @"BlueWallet";
|
self.moduleName = @"BlueWallet";
|
||||||
// You can add your custom initial props in the dictionary below.
|
// You can add your custom initial props in the dictionary below.
|
||||||
// They will be passed down to the ViewController used by React Native.
|
// They will be passed down to the ViewController used by React Native.
|
||||||
@ -56,22 +54,6 @@ NSUserDefaults *group = [[NSUserDefaults alloc] initWithSuiteName:@"group.io.blu
|
|||||||
return [super application:application didFinishLaunchingWithOptions:launchOptions];
|
return [super application:application didFinishLaunchingWithOptions:launchOptions];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)addSplashScreenView
|
|
||||||
{
|
|
||||||
// Get the rootView
|
|
||||||
RCTRootView *rootView = (RCTRootView *)self.window.rootViewController.view;
|
|
||||||
|
|
||||||
// Capture the launch screen view
|
|
||||||
UIStoryboard *launchScreenStoryboard = [UIStoryboard storyboardWithName:@"LaunchScreen" bundle:nil];
|
|
||||||
UIViewController *launchScreenVC = [launchScreenStoryboard instantiateInitialViewController];
|
|
||||||
UIView *launchScreenView = launchScreenVC.view;
|
|
||||||
launchScreenView.frame = self.window.bounds;
|
|
||||||
[self.window addSubview:launchScreenView];
|
|
||||||
|
|
||||||
// Keep a reference to the launch screen view to remove it later
|
|
||||||
rootView.loadingView = launchScreenView;
|
|
||||||
}
|
|
||||||
|
|
||||||
- (NSURL *)sourceURLForBridge:(RCTBridge *)bridge
|
- (NSURL *)sourceURLForBridge:(RCTBridge *)bridge
|
||||||
{
|
{
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
|
@ -1,14 +0,0 @@
|
|||||||
//
|
|
||||||
// SplashScreen.m
|
|
||||||
// BlueWallet
|
|
||||||
//
|
|
||||||
// Created by Marcos Rodriguez on 1/24/24.
|
|
||||||
// Copyright © 2024 BlueWallet. All rights reserved.
|
|
||||||
//
|
|
||||||
|
|
||||||
#import <React/RCTBridgeModule.h>
|
|
||||||
|
|
||||||
@interface RCT_EXTERN_MODULE(SplashScreen, NSObject)
|
|
||||||
RCT_EXTERN_METHOD(addObserver)
|
|
||||||
RCT_EXTERN_METHOD(dismissSplashScreen)
|
|
||||||
@end
|
|
@ -1,39 +0,0 @@
|
|||||||
//
|
|
||||||
// SplashScreen.swift
|
|
||||||
// BlueWallet
|
|
||||||
//
|
|
||||||
// Created by Marcos Rodriguez on 1/24/24.
|
|
||||||
// Copyright © 2024 BlueWallet. All rights reserved.
|
|
||||||
//
|
|
||||||
|
|
||||||
import Foundation
|
|
||||||
import React
|
|
||||||
|
|
||||||
@objc(SplashScreen)
|
|
||||||
class SplashScreen: NSObject, RCTBridgeModule {
|
|
||||||
static func moduleName() -> String! {
|
|
||||||
return "SplashScreen"
|
|
||||||
}
|
|
||||||
|
|
||||||
static func requiresMainQueueSetup() -> Bool {
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
|
|
||||||
@objc
|
|
||||||
func addObserver() {
|
|
||||||
NotificationCenter.default.addObserver(self, selector: #selector(dismissSplashScreen), name: NSNotification.Name("HideSplashScreen"), object: nil)
|
|
||||||
}
|
|
||||||
|
|
||||||
@objc
|
|
||||||
func dismissSplashScreen() {
|
|
||||||
DispatchQueue.main.async {
|
|
||||||
if let rootView = UIApplication.shared.delegate?.window??.rootViewController?.view as? RCTRootView {
|
|
||||||
rootView.loadingView?.removeFromSuperview()
|
|
||||||
rootView.loadingView = nil
|
|
||||||
}
|
|
||||||
NotificationCenter.default.removeObserver(self, name: NSNotification.Name("HideSplashScreen"), object: nil)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
@ -1,5 +1,5 @@
|
|||||||
import React, { useCallback, useContext, useEffect, useReducer, useRef } from 'react';
|
import React, { useCallback, useContext, useEffect, useReducer, useRef } from 'react';
|
||||||
import { View, Image, ActivityIndicator, NativeModules, StyleSheet } from 'react-native';
|
import { View, Image, ActivityIndicator, StyleSheet } from 'react-native';
|
||||||
import Biometric, { BiometricType } from '../class/biometrics';
|
import Biometric, { BiometricType } from '../class/biometrics';
|
||||||
import { BlueStorageContext } from '../blue_modules/storage-context';
|
import { BlueStorageContext } from '../blue_modules/storage-context';
|
||||||
import triggerHapticFeedback, { HapticFeedbackTypes } from '../blue_modules/hapticFeedback';
|
import triggerHapticFeedback, { HapticFeedbackTypes } from '../blue_modules/hapticFeedback';
|
||||||
@ -49,8 +49,6 @@ function reducer(state: State, action: Action): State {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const { SplashScreen } = NativeModules;
|
|
||||||
|
|
||||||
const UnlockWith: React.FC = () => {
|
const UnlockWith: React.FC = () => {
|
||||||
const [state, dispatch] = useReducer(reducer, initialState);
|
const [state, dispatch] = useReducer(reducer, initialState);
|
||||||
const isUnlockingWallets = useRef(false);
|
const isUnlockingWallets = useRef(false);
|
||||||
@ -91,8 +89,6 @@ const UnlockWith: React.FC = () => {
|
|||||||
}, [state.isAuthenticating, startAndDecrypt, successfullyAuthenticated]);
|
}, [state.isAuthenticating, startAndDecrypt, successfullyAuthenticated]);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
SplashScreen?.dismissSplashScreen();
|
|
||||||
|
|
||||||
const startUnlock = async () => {
|
const startUnlock = async () => {
|
||||||
const storageIsEncrypted = await isStorageEncrypted();
|
const storageIsEncrypted = await isStorageEncrypted();
|
||||||
const isBiometricUseCapableAndEnabled = await Biometric.isBiometricUseCapableAndEnabled();
|
const isBiometricUseCapableAndEnabled = await Biometric.isBiometricUseCapableAndEnabled();
|
||||||
|
Loading…
Reference in New Issue
Block a user