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

Fix example app and upgrade packages #100

Merged
merged 7 commits into from
Oct 7, 2024

Conversation

mwclemy
Copy link
Contributor

@mwclemy mwclemy commented Sep 26, 2024

Issue: https://mxcom.atlassian.net/browse/CT-917

This MR does the following:

  • Upgrade react-native from 0.70.3 to 0.75.3(The most recent stable version) using the the React native upgrade helper

  • Upgrade @mxenabled/widget-post-message-definitions to 1.4.0(the latest version)

  • Fix the example app

Testing instructions

Note: Follow this setup guide if you don't have xcode or android studio setup

Step 1: Run the setup command

npx mx-widget-sdk-setup

Step 2: Start the Proxy Server

In order to make API calls from the widget, you will need to set up a proxy server.

Open a new terminal from the root of the react-native-widget-sdk project and run the following command to start the the proxy server:

npm run example:server

Enter Int or Prod credentials as prompted and keep the proxy server running as you run the react-native app.

Step 3: Start the Metro Server

You will need to start Metro, the JavaScript bundler that ships with React Native.

To start Metro, run the following command from the root of react-native-widget-sdk project:

npm example:start

Step 4: Start your Application

Let Metro Bundler run in its own terminal. Open a new terminal from the root of the react-native-widget-sdk project. Run the following command to start the Android or iOS app:

For Android

cd example
npm run android

For iOS

cd example
npm run ios

If everything is set up correctly, you should see the example app running in your Android Emulator or iOS Simulator shortly provided you have set up your emulator/simulator correctly.

This is one way to run your app — you can also run it directly from within Android Studio and Xcode respectively.

@mwclemy mwclemy marked this pull request as ready for review October 2, 2024 02:24
@mwclemy mwclemy requested a review from emilysallstrom October 2, 2024 17:35
Copy link
Collaborator

@emilysallstrom emilysallstrom left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good! I haven't run this locally yet but I'll plan on doing it this afternoon.

example/Gemfile.lock Show resolved Hide resolved
package.json Outdated Show resolved Hide resolved
emilysallstrom
emilysallstrom previously approved these changes Oct 7, 2024
Copy link
Collaborator

@emilysallstrom emilysallstrom left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested on both ios and android, everything looks good 👍

@mwclemy mwclemy merged commit 48c2b01 into master Oct 7, 2024
2 checks passed
@jcmunoz200
Copy link

do you know if there is a way to create custom widgets. That is to say to be able to change the interface without the need to implement everything through api @emilysallstrom @mwclemy

@mwclemy
Copy link
Contributor Author

mwclemy commented Oct 15, 2024

I'm not sure how you would create a custom widget without implementing our api. Clients that create their own widget experiences rely on our api to connect to an end user's account and fetch data and I don't see how you would get access to those data without using our api. Unless maybe I'm misunderstanding your question.

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

Successfully merging this pull request may close these issues.

3 participants