Skip to content
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

Switch to expo #151

Open
0xturboblitz opened this issue Jul 17, 2024 · 9 comments
Open

Switch to expo #151

0xturboblitz opened this issue Jul 17, 2024 · 9 comments

Comments

@0xturboblitz
Copy link
Member

0xturboblitz commented Jul 17, 2024

Expo is a better tool stack for app development, switching to it would make publishing easier.

We've had trouble in previous attempts to switch as we use native modules for NFC reading and proving, and the expo interfaces for calling native modules seems to have recently changed.

We would probably switch to bare workflow with development builds and not managed workflow because of those native modules.

If anyone wants to try their hand at this, feel free to dm. Warning: this is not as simple as a normal expo migration, also to be tested the app has to be built on a device, as right now the proving native modules is only compiled for mobile architecture.

@0xturboblitz 0xturboblitz changed the title switch to expo Switch to expo Jul 17, 2024
@jorgezerpa
Copy link

jorgezerpa commented Jul 23, 2024

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged

hey! @0xturboblitz

I have migrated some React Native apps to Expo in the past. Of course I have 4 years of experience building apps with react native using Expo as framework, so I know the tools and how to manage any possible error that can appear during migration.

How I plan on tackling this issue

I will take as a guideline the official expo documentation

And of course fixing any carryover that happen through the process. I think I can have this in less than a week

Copy link

onlydustapp bot commented Jul 23, 2024

Hey @jorgezerpa!
Thanks for showing interest.
We've created an application for you to contribute to Proof of Passport.
Go check it out on OnlyDust!

@remicolin
Copy link
Member

hi @jorgezerpa you can start working on it

@jorgezerpa
Copy link

Thanks @remicolin I'm starting to work.

@jorgezerpa
Copy link

jorgezerpa commented Jul 27, 2024

Hi! @remicolin,

I already migrated the project and run it using Expo on Android, All seems to goes well.

Of course, the native modules did not works (as it was expected). When try to executing (ie -> open the passport scanner) it totally breaks the app. So, I have a couple questions and ideas:

  1. Can you confirm me that this are all the native modules currently used in the app:
  • MRZScannerModule (Just for IOS)
  • CameraActivityModule (Just for Android)
  • Prover
  • PassportReader
  1. The best way I see to make this modules work, is to convert them into expo modules Reference 1 and reference 2 . However, I think the best way is to create an app/modules folder, where I implement the code for each module. Do you think this is a good approach? maybe do you have some other idea or way to do it?

pd: I am making all this on Android first, when its done I will move to IOS, to repeat the steps.

thanks in advance.

@0xturboblitz
Copy link
Member Author

Hi,

  1. Almost: for NFC reading there is NativeModules.PassportReader but also NativeModules.RNPassportReader that is imported here under the hood
  2. Seems like a good approach.

feel free to dm if we can help

@remicolin
Copy link
Member

hi @jorgezerpa we are implementing qrcodes scanning modules on new-ux branch let's see how we can anticipate that.
can you create a tg group with the three of us? my tg is @colinremi

@jorgezerpa
Copy link

Hi! I have some bad news. I tried to make the migration by some different ways, but nothing seems to work for me, this are the steps I follow to try to migrate the project:

  1. Execute npx install-expo-modules@latest

  2. run npx expo install —fix to use the packages versions required for Expo
    image

  3. Then I ran npx expo run:android and receive a couple of errors, so I have to make some modifications to build.gradle files and some others. You can check those changes here comparing the last 2 commits.

  4. After all This, I was able to run the app using "yarn expo run:android", so migration to Expo was partially successfull )with exception of the native modules that still do not work).

  5. Then, I try to follow this steps the create the native modules but each time I tried to build the app it gives error "Could not find method useCoreDependencies() for arguments [] on project ':camera-activity-module' of type org.gradle.api.Project." .

  6. After researching, I found it is due to the version of the Expo SDK that I have been usign, when I install it the command detects that the most appropiated version for the project was expo@49.

  7. Then I change it to Expo@51 (latest) and of course it gives errors on compilation. So I try to fix them here. But, regards after the modifications the project builds "correctly"( with no errors) the app just throws me out when try to start it.

  8. I have been researching to alternatives or other ways to make the migrations, but did not found nothing.

I will let free this issue for someone that wants to give it a try. By now I do not find a way to make it work.

@0xturboblitz @remicolin By the way, thanks for the chance, I hope the info that I let up here can be helpfull to fix this issue. I am available for any questions if you need it.

Of course, I will still looking up for other issues in which I believe I can help. This project catches my attention a lot.

Happy coding :)

@0xturboblitz
Copy link
Member Author

@jorgezerpa Thanks for trying and sharing progress. I had a similar experience, this is indeed challenging.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants