-
Notifications
You must be signed in to change notification settings - Fork 138
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
Testing release 0.74.1: multiple errors when creating a new project #2164
Comments
Indeed, |
I had a look at https://github.com/microsoft/react-native-macos/blob/main/packages/rn-tester/Podfile to fix the Podfile, as it has been updated fairly recently. However, even after removing
The app opens, there is a toolbar but no window. The previous version does work, with similar steps. Thank you! |
@morukutsu I think the problem is that - (NSURL *)bundleURL
{
#if DEBUG
return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index"];
#else
return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];
#endif
} Here's the error I got from Xcode.
|
@kaiyes should be fixed now |
Just documenting for anyone on v0.74. When generating a fresh
It can be fixed, as suggested above, by applying the following patch to - (NSURL *)sourceURLForBridge:(RCTBridge *)bridge
{
- #if DEBUG
- return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index"];
- #else
- return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];
- #endif
+ return [self bundleURL];
}
+
+ - (NSURL *)bundleURL
+ {
+ #if DEBUG
+ return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index"];
+ #else
+ return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];
+ #endif
+ } |
* Move example -> example-prev * Init React Native Test App yarn init-test-app --version 0.73.0 (and manually bump react-native-* versions afterwards) * Merge example-prev into example * Add osx to podspec * Fix metro config to resolve react-native-safe-area-context * Install pods * Write macOS equivalents for all iOS code * Raise macOS deployment target to 10.15 * Delete example-prev * Trying and failing to get macOS app to build * Apply Tommy Nguyen's suggestions to fix pod installation Co-authored-by: Tommy Nguyen <[email protected]> * Stop using compat components for macOS * Restore example to its original state * Add example-macos * Reduce macOS deployment target to 10.15 * Make example-macos use RNTesterApp instead of bespoke app * Remove example-macos * Pin react-native and react-native-macos to v0.74 * Init [email protected] project I temporarily renamed the "name" field in package.json to "RNSACExample", then ran `npx react-native-macos-init` to generate a project by that name. * Fix bundleURL microsoft/react-native-macos#2164 (comment) * Fix Metro config * Run yarn format:write --------- Co-authored-by: Tommy Nguyen <[email protected]>
Environment
Steps to reproduce the bug
Hello. I am testing the new release 0.74.1 with a clean project.
Test sequence:
The second command will fail with the same error as #2152.
Afaik, this one should have been fixed with a fix to react-native-macos-init.
Should be the package be updated on NPM as well? (see https://www.npmjs.com/package/react-native-macos-init?activeTab=versions)
Then it fails with another error:
Commenting the line ":flipper_configuration => FlipperConfiguration.disabled" in the podfile will allow the build to proceed. However, on my end running
npx react-native run-macos
then does not open the app. It seems there's at least an issue with the podfile, but atm I don't have a good enough understanding of the system to debug it.Thank you!
Expected Behavior
No response
Actual Behavior
No response
Reproducible Demo
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: