-
Notifications
You must be signed in to change notification settings - Fork 143
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
Update macOS init template to enable New Architecture #1854
Update macOS init template to enable New Architecture #1854
Conversation
This PR sets the macos app size under RCT to be a fixed 1024x768 (code), is there anyway I can override this number? I tried update
@Saadnajmi @shwanton thank you. |
To be clear, the window is not resizable? And you can't programmatically access the window/ set the frame afterwards? |
The window is resizable. However I want to set the window size to screen size upon launch, I tried to set the frame in appdelegate:
This builds but doesn't change the launch window size though; I also tested using a 800x600 rect to make sure it's not a problem with |
@xysun Isee, ideally the user can specify their frame in their app, rather than our hardcoded default. To that end, I think the intention is RCTAppDelegate's Also, in case you want more control over your window and app delegate in general, this might be useful: https://github.com/microsoft/rnx-kit/blob/main/packages/react-native-host/README.md |
@xysun you can't pass any configs to RTCAppDelegate, you can search the RP code for "NSMakeRect(0,0,1024,768)", and you will see it's hardcoded. you can't use applicationDidFinishLaunching to set up the window size, too. because the window is created on the superclass. at that moment, windows on sharedApplication are empty. in the end, you have to do it on applicationDidBecomeActive hook.
|
Please select one of the following
Summary
**The default template was never upgraded to 0.71 and was not loading the new arch when
RCT_NEW_ARCH_ENABLED=1
flag was passed topod install
This PR picks #1853 to main
Changelog
[MACOS] [FIXED] - Update macOS init template to enable New Architecture
Test Plan
See test plan in #1853