-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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 Integration #634
Comments
Could you elaborate on the setps required to implement this on an existing React Native 0.73 project? |
Now projects come with Kotlin. Instead of mainActivity.java there is mainActivity.kt file. I think he's talking about this problem |
MainActivity.kt
|
Its working with Emulator only. Not working with Physical Device. App crashed |
same Any progress? |
Same issue |
The problem is with the release APK in a physical device! is there anyone checking this issue? because a found this other package: it looks that this package is no longer being mainteined!!!! |
I moved with react native bootsplash, its working
…On Thu, 28 Dec 2023, 8:03 pm pipo151086, ***@***.***> wrote:
The problem is with the release APK in a physical device!
is there anyone checking this issue?
because a found this other package:
https://github.com/zoontek/react-native-bootsplash
it looks that this package is no longer being mainteined!!!!
—
Reply to this email directly, view it on GitHub
<#634 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AR5EGHJE2M6GBQXZJ4V637TYLV7MRAVCNFSM6AAAAABATQZBUKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNZRGIZTAMRSGE>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
same issue |
This worked for me, thanks 😊 |
MainActivity.kt import org.devio.rn.splashscreen.SplashScreen class MainActivity : ReactActivity() { /**
|
It worked for me, just changing from java to kotlin syntax like below // ...
import org.devio.rn.splashscreen.SplashScreen
class MainActivity : ReactActivity() {
// ...
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
SplashScreen.show(this);
}
// ...
} |
Yep, its works for me |
I'm surprised
Using init {
SplashScreen.show(this)
} |
Strange, i dont know about this |
IOS crashing spalsh how to solve |
@mannoeu where did you added this block??
|
I only rename from // ...
public class MainActivity extends ReactActivity {
// ...
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
SplashScreen.show(this);
}
} to this // ...
import org.devio.rn.splashscreen.SplashScreen
class MainActivity : ReactActivity() {
// ...
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
SplashScreen.show(this);
}
// ...
} But, some people commented above that this causes an error for them. They suggested using the excerpt // ...
import org.devio.rn.splashscreen.SplashScreen
class MainActivity : ReactActivity() {
// ...
init {
SplashScreen.show(this)
}
// ...
} In my case it was not necessary. Only the syntax adjustment worked. |
@mannoeu thanks brother! It did work with
|
Hi, I only saw all the messages now, like 2 months later, well I didn't try on physical device, so I can't tell. |
@BenHurMartins I just tried on physical device and it is working fine! |
awesome, good to know @luis-cicada , thanks. Just to be sure, did you tried the boilerplate I shared or another solution proposed here? and, iOS or android? |
anyone share me full guide of MainApplication.Kt and MainActivity.kt files Code? both are not working app getting crashed while opening |
@Creativestarjsp you can follow this template |
@luis-cicada still work with you because I get this error
|
@BenHurMartins thanks pal! It works perfectly!! |
@BenHurMartins Thanks bro! It helped me a lot! |
For those like me that has MainActivity.kt with no override of the function onCreate at all, maybe this would help. The lines you need to add exactly are these, in your MainActivity.kt: After all imports you have already, add these two lines:
Then, no mather where, the rest:
This is working for me using react-native 0.74. Hope this help someone still blocked using this library in newer version on RN. |
thanks @bastiantowers.... you saved me....!!! |
In android/gradle.properties, ensure you have these lines:
in MainApplication.kt
in MainActivity.kt
in app.tsx
|
This is not an issue, only a heads up, considering there are not new updates on this library and until we get the new README.
I had some issues implementing splash screen on the newest react native version, using kotlin and to update the
AppDelegate.mm
. So after some digging and fixing, I want to share a boilerplate I created for general purposes and it also includes the splash screen implementation.To use it:
The GitHub Repo
The text was updated successfully, but these errors were encountered: