-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Expo plugin to simplify installation with expo #2415
base: master
Are you sure you want to change the base?
Conversation
The old configuration required modification if the android app directory wasn't at the root of the project. With this change, the script should work no matter where the android directory exists in the repo.
I have updated the PR to include an Expo plugin to make it easier for Expo builds to include react-native-code-push without as much configuration. I have updated the android and ios docs to reflect this new method of configuration. |
This will also resolve this issue #2366 |
@microsoft-github-policy-service agree company="latitudegames" |
Any updates? It would help a lot |
Are there any updates ? :) |
It's just waiting for review. It would probably be good if anyone else could test what I've done to confirm that it works. |
Seems not working when project is using Expo Router
|
@chhornponleu to fix the expo router problem, in your index.js/ts, try to do it like this:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your PR !
I suggest you make a few changes to react native 71.
Co-authored-by: rvasseur31 <[email protected]>
Co-authored-by: rvasseur31 <[email protected]>
Co-authored-by: rvasseur31 <[email protected]>
Great suggestions! Thank you for the additions! |
It looks like we might need to integrate this with the tests in order to resolve the checks. I don't think I'm going to have time to dive into that for a while, so if anyone else is able to help with that I would welcome the help. |
@deggertsen I try use your solution, but I have some error in app.plugin.js
What should I do? |
Take a look at my implementation https://github.com/mgscreativa/react-native-code-push-expo-plugin-managed-workflow |
Hi @deggertsen if you give some guidance on where should I get my hands into, I can help |
I tried, and it works. I saw you build ts to js and Expo-plugins can apply our plugin to android + ios template. |
Honestly, I'm not sure. It looks like all that's needed are written tests for the plugin, but I haven't written tests using the method I'm seeing here so I would have to learn it in order to implement it same as you. If I already knew how, I would have already done it. Thanks for your willingness to help. Maybe the Microsoft team can give some additional guidance, but perhaps they are in the same boat 😆 . |
My updates always fail to install and immediately rollback. I used to have Note: I had an error
"plugins": [
[
"react-native-code-push",
{
"ios": {
"CodePushDeploymentKey": "my key is set correctly here"
},
"android": {
"CodePushDeploymentKey": "",
"CodePushPublicKey": ""
}
}
]
],
"updates": {
"enabled": false,
"fallbackToCacheTimeout": 0
}
"react-native-code-push": "github:deggertsen/react-native-code-push"
import App from "./App";
import { Platform, AppRegistry } from "react-native";
import { name as appName } from "./app.json";
import codePush from "react-native-code-push";
const codePushOptions = {
checkFrequency: codePush.CheckFrequency.ON_APP_RESUME,
mandatoryInstallMode: codePush.InstallMode.IMMEDIATE,
installMode: codePush.InstallMode.IMMEDIATE,
updateDialog: {
appendReleaseDescription: true,
title: "A new update is available!",
mandatoryContinueButtonLabel: "Download & Restart",
descriptionPrefix: "",
mandatoryUpdateMessage: ""
}
};
if (Platform.OS !== "windows") {
const { registerRootComponent } = require("expo");
registerRootComponent(codePush(codePushOptions)(App));
} else {
AppRegistry.registerComponent(appName, () => App);
} |
Same as above for me. |
Have you tried my implementation? https://github.com/mgscreativa/react-native-code-push-expo-plugin-managed-workflow |
I have and I have the exact same result (my app is ejected by the way). I tried the setup from this PR, the plugin pre-built on his repo, and the plugin on your repo. |
@WilliamWelsh, I think you should remove these lines :
It may cause a conflict in your native files |
The issue on Android happens only when the app is downloaded from the Play Store. If I run At the same time app downloaded from the Play Store errored with the: |
I am running into the same issue as @WilliamWelsh. I opened an issue here: #2615 Does anyone have a resolution? |
Haven't been able to figure it out yet, going to try this next: https://github.com/GSTJ/react-native-code-push-plugin
Removed and the issue persists |
@imwexpex any update on your situation? I am about to make the call to use Expo EAS Updates instead of codepush because of this Android issue. I already use expo updates but I do self-hosted updates with the old cli. My team preferred codePush so we wanted to try it. |
Worth looking into this if you haven't already. expo/config-plugins#204 |
I am running into the same thing on When it comes to Immediately after the next force restart (user closes app) the codepush bundle is no longer used and the original bundle that was included with Another thing to note, there is no It looks something like this albeit with a few of the values swapped out:
We can see tho, isPending is false which makes sense since it has already been downloaded and installed from the original download and restart, with failedInstall: false as well - but the original bundle from the |
Given the announcement of the retirement of App Center on March 31, 2025 including CodePush I'm interested in seeing what the "special version of CodePush" is and if we might have an open source repo that we can use to build better support for Expo. If anyone gets any information before I do, please share!
|
I talk with them by email. They just told me that will be an "standalone" version (without use AppCenter). Also the API will be the same. But no more data. |
The old configuration required modification if the android app directory wasn't at the root of the project. With this change, the script should work no matter where the android directory exists in the repo.