-
Notifications
You must be signed in to change notification settings - Fork 1
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
[Question] Codepush Integration #1
Comments
@mgscreativa - i know this is a lot of information but wasnt sure if you had any insights for me or not, as I see your example utilizes expo and expo router too! Banging my head against a wall right now trying to figure it out, so anything could be helpful 🙌 |
@mgscreativa - I should note, after iOS silent codepush successful update and app suspend that did apply the codepush bundle - then after force closing the app to see if it would still be applied and wasnt, when I try my manual approach (through a button in a drawer component), it hits the no update available showing to me that the app does have the update downloaded already? |
Hi! that's really strange because upon update, the bundle gets overwritten. The best approach I suggest is that you download and compile test apps with my project and try to replicate the issue, If you can't then there's an issue with your code. Another thing I notice is that if you see ios an android folders in your project, then it's not an expo managed project. This example is an Expo managed app that uses a dev build to work Another thing I notice is in your codepush build command, I think you missed |
@mgscreativa - so with the prebuild command I am doing and the I will definitely try adding the
In terms of this, how do you go about creating a build that does not have the Currently I am using Am I off basis here in my thinking? |
I guess a better way to state this, I would not really need codepush OTA on dev client builds as that is where I currently do development, I would need them for the production/beta builds that are distributed through the app stores & TestFlight (for my QA testers) - which in my thought process would be the same as a |
Okay so adding the |
Upon further testing, the bundle does correctly install like ive said, I have methods setup to attach on the codepush label in the version im running to be able to tell which codepush update the app is running. That all works just fine on iOS, once I close out the app, the I have this method to run:
And the LocalPackage within the second useEffect does show in the Alert.alert, which shows some keys points that all look correct to me:
But like I said, its not running the codepush bundle, its the original bundle |
I don't really know why that happens to you, I have it working in several production apps Expo managed, and locally compiled with EAS. This demo is based on this PR microsoft/react-native-code-push#2415 from @deggertsen, you can take a look at the PR and update my test project files just to check. Another check you can do is to use this repo and compile it and send it to test flight to see if the modified bundle hits the app after restart. If it does, then there's an issue with your project. |
Damn that is wild, I wonder what are your steps for building a standalone app? From your commands it looks like you do it locally - have you ever tried using Trying to not have to do local builds and need to involve xcode & android studio with the new workflow |
Local builds are not hard at all, you just need to setup the dev environment for iOS and android and EAS does the rest. Didn't tried EAS cloud build, but believe me, local builds are the same and the error you account for is not related to the build process, because it will fail otherwise |
@mgscreativa - Hey man! been digging this past week trying to get codepush to work within my Expo managed project.
I have codepush setup as well through app center, and can also create and deploy codepush bundles to appcenter as well.
The steps i use to create a codepush update & test it:
package.json scripts:
Steps in order:
preview-staging
profile for bothios
andandroid
npx expo prebuild
to generate the ios and android folders needed locally for the codepush updateyarn update:staging:all
to which i get successfull codepush bundles and releases to appcenterAndroid is not working at all for me when it comes to codepush updates - when trying through a manual approach, it would see that there is an update for the installed version, download it, then when trying to install it i would run into this error:
When it comes to iOS on both the manual approach & the silent approach through only the codepush decorator, it would download, install, and restart the app. After it restarted it would succesfully use the codepush bundle, but upon force closing the app and then re opening, it would not use the bundle anymore and be on the original js bundle included in the adhoc release.
Im using Expo sdk 49 with Expo Router with the
expo-dev-client
setup.I have internal
adhoc
testing setup as well where I can utilize thepreview-staging
build profiles that has also been working as expected, I have been able to continuously utilizeeas build
commands to build new builds for testing throughpreview-staging
with everything working.My current setup in eas.json.
I have an index.tsx file right now that looks like this:
codePushWrap is just a simple wrapper method that uses
codePush
My manual approach looks like this:
The text was updated successfully, but these errors were encountered: