Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

React Native 0.73.4 issue on iOS - AppState is changing #640

Open
avivdim opened this issue Feb 23, 2024 · 3 comments
Open

React Native 0.73.4 issue on iOS - AppState is changing #640

avivdim opened this issue Feb 23, 2024 · 3 comments

Comments

@avivdim
Copy link

avivdim commented Feb 23, 2024

I was able to implement the new changes on Android Kotlin files and it was working fine,
But I had an issue with iOS implementation.
Splash screen is showing up and i was able to hide it but when i used hide command it was changing my app state to inactive and cause a couple of issues as i'm listening to the appstate changes..issue is only on iOS

I was trying to use all the hacks that is seen lately on AppDelegate
BOOL ret = [super application:application didFinishLaunchingWithOptions:launchOptions]; if (ret == YES) { [RNSplashScreen show]; } return ret;

Nothing is working. Any solutions for this issue?

@trancongdung12
Copy link

Same issue

@trancongdung12
Copy link

fixxed in #637

@jkyoo82
Copy link

jkyoo82 commented Sep 12, 2024

It's working me..

#import "AppDelegate.h"

#import <React/RCTBundleURLProvider.h>
#import "RNSplashScreen.h"

@implementation AppDelegate

  • (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
    {
    self.moduleName = @"wizonebiz_app";
    // You can add your custom initial props in the dictionary below.
    // They will be passed down to the ViewController used by React Native.
    self.initialProps = @{};

    //[RNSplashScreen show];

    //return [super application:application didFinishLaunchingWithOptions:launchOptions];
    [super application:application didFinishLaunchingWithOptions:launchOptions];
    [RNSplashScreen show];

    return YES;

}

  • (NSURL *)sourceURLForBridge:(RCTBridge *)bridge
    {
    return [self bundleURL];
    }

  • (NSURL *)bundleURL
    {
    #if DEBUG
    return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index"];
    #else
    return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];
    #endif
    }

@EnD

My Enviroment
System:
OS: Windows 11 10.0.22631
CPU: (6) x64 Intel(R) Core(TM) i5-9600KF CPU @ 3.70GHz
Memory: 17.28 GB / 31.92 GB
Binaries:
Node:
version: 18.20.2
path: C:\Program Files\nodejs\node.EXE
Yarn:
version: 3.6.4
path: C:\Program Files\nodejs\yarn.CMD
npm:
version: 10.8.1
path: C:\Program Files\nodejs\npm.CMD
Watchman: Not Found
SDKs:
Android SDK: Not Found
Windows SDK:
AllowAllTrustedApps: Disabled
AllowDevelopmentWithoutDevLicense: Enabled
IDEs:
Android Studio: AI-241.18034.62.2411.12071903
Visual Studio:
- 16.11.34407.143 (Visual Studio Professional 2019)
Languages:
Java: 17.0.10
Ruby: Not Found
npmPackages:
"@react-native-community/cli": Not Found
react:
installed: 18.2.0
wanted: 18.2.0
react-native:
installed: 0.74.3
wanted: 0.74.3
react-native-windows: Not Found
npmGlobalPackages:
"react-native": Not Found
Android:
hermesEnabled: true
newArchEnabled: false
iOS:
hermesEnabled: Not found
newArchEnabled: Not found

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants