software-mansion / software-mansion/react-native-reanimated
react-native-worklets only supports bridgeless mode
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 11k
- Forks
- 1.5k
- Avg merge
- 3d 4h
- Merged PRs (30d)
- 172
Description
Description
"react-native": "0.81.4",
"react-native-reanimated": "^4.1.0",
"react-native-worklets": "^0.6.1",
on android it working fine but on ios when i run the app it succesfully build but after running instantly it give error:
auto isBridgeless = ![self.bridge isKindOfClass:[RCTCxxBridge class]];
react_native_assert(isBridgeless && "[Worklets] react-native-worklets only supports bridgeless mode");
AppDelegate.swift file is
// AppDelegate.swift
import UIKit
import FBSDKCoreKit
import React
import React_RCTAppDelegate
import ReactAppDependencyProvider
import AppAuth
import GoogleSignIn
@main
class AppDelegate: UIResponder, UIApplicationDelegate, RNAppAuthAuthorizationFlowManager {
var window: UIWindow?
var reactNativeDelegate: ReactNativeDelegate?
var reactNativeFactory: RCTReactNativeFactory?
// FIXED: Add required protocol property with proper access control
@objc public weak var authorizationFlowManagerDelegate: RNAppAuthAuthorizationFlowManagerDelegate?
func application(
_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? = nil
) -> Bool {
// Facebook SDK initialization
ApplicationDelegate.shared.application(
application,
didFinishLaunchingWithOptions: launchOptions
)
// Google Sign-In initialization
GIDSignIn.sharedInstance.restorePreviousSignIn { user, error in
if error != nil || user == nil {
// No saved credentials or error
} else {
// User was signed in automatically
}
}
// React Native initialization
let delegate = ReactNativeDelegate()
let factory = RCTReactNativeFactory(delegate: delegate)
delegate.dependencyProvider = RCTAppDependencyProvider()
reactNativeDelegate = delegate
reactNativeFactory = factory
window = UIWindow(frame: UIScreen.main.bounds)
factory.startReactNative(
withModuleName: "Arvo",
in: window,
launchOptions: launchOptions
)
return true
}
// Handle all redirect URLs
func application(
_ app: UIApplication,
open url: URL,
options: [UIApplication.OpenURLOptionsKey : Any] = [:]
) -> Bool {
// 1. Handle Google Sign-In
if GIDSignIn.sharedInstance.handle(url) {
return true
}
// 2. Handle Microsoft/OAuth redirect
if let authorizationFlowManagerDelegate = self.authorizationFlowManagerDelegate {
if authorizationFlowManagerDelegate.resumeExternalUserAgentFlow(with: url) {
return true
}
}
// 3. Facebook Login URL handling
return ApplicationDelegate.shared.application(
app,
open: url,
sourceApplication: options[.sourceApplication] as? String,
annotation: options[.annotation]
)
}
}
class ReactNativeDelegate: RCTDefaultReactNativeFactoryDelegate {
override func sourceURL(for bridge: RCTBridge) -> URL? {
// self.bundleURL()
}
override func bundleURL() -> URL? {
#if DEBUG
RCTBundleURLProvider.sharedSettings().jsBundleURL(forBundleRoot: "index")
#else
Bundle.main.url(forResource: "main", withExtension: "jsbundle")
#endif
}
}
// override func bundleURL() -> URL? {
// #if DEBUG
// return RCTBundleURLProvider.sharedSettings().jsBundleURL(forBundleRoot: "index")
// #else
// return Bundle.main.url(forResource: "main", withExtension: "jsbundle")
// #endif
// }
// }
Steps to reproduce
run app through Xcode on real device/simulator
Snack or a link to a repository
Reanimated version
4.1.0
Worklets version
0.6.1
React Native version
0.81.4
Platforms
iOS
JavaScript runtime
None
Workflow
None
Architecture
None
Build type
No response
Device
Real device
Host machine
None
Device model
iphone 14
Acknowledgements
Yes
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the reported iOS startup path in AppDelegate.swift and the bridgeless-mode assertion, using React Native 0.81.4, Reanimated 4.1.0, and Worklets 0.6.1. Reproduce on the reported device or simulator and determine why the app reaches this assertion. Done means the iOS app launches without the Worklets bridgeless-mode error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- objective-c, react-native, swift
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100