-
Notifications
You must be signed in to change notification settings - Fork 24.3k
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
bridge is not set (bridge always be nil) #15407
Comments
Hey, thanks for reporting this issue! It looks like your description is missing some necessary information, or the list of reproduction steps is not complete. Can you please add all the details specified in the template? This is necessary for people to be able to understand and reproduce the issue being reported. I am going to close this, but feel free to open a new issue with the additional information provided. Thanks! |
Finally, I got the solution.
When you use it!
|
@Liqiankun your demo is working.but i want to know why dose it work? |
@ZiBo1233 Truth be told! I don't know! |
@Liqiankun It's just my guess:In your demo, you create a singleton.The Object is the only one.So the class's bridge becomes the singleton.So,no matter where or when you use it , the bridge object is the same .so ,it works. |
I create a iOS class to post event from Native to JS refer to the react native document.
but when I try to execute send event ,it give me an error that
we can see that the bridge is nil;
and this is my code :
.h
.m
code to invoke that :
React-Native Version: 0.45.1
Platform : iOS 10
The text was updated successfully, but these errors were encountered: