Skip to content

magiclabs/react-native-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

✨ Magic React Native Demo Apps

This repository contains two mobile applications demonstrating Magic's React Native SDKs and extensions for both Bare React Native and Expo managed workflows.

🔑 Setup and Installation

  1. Get Magic API Keys: Sign up or login to the developer dashboard to receive API keys.

  2. Clone the Repository:

# SSH
$ git clone [email protected]:magiclabs/react-native-demo.git
# HTTPS
$ git clone https://github.com/magiclabs/react-native-demo.git
  1. Configure API Keys: Update the Magic publishable API key in both projects:
  • Bare React Native Example: MagicBareRnExample/hooks/magic.ts
  • Expo Example: MagicExpoRNExample/hooks/magic.ts

Replace 'YOUR_PUBLISHABLE_KEY' with your actual Magic publishable API key.

📱 Expo Tutorial (Managed Workflow)

The Expo example uses Expo Router for navigation and includes modern React Native features.

$ cd MagicExpoRNExample
$ yarn install
$ yarn start

When the bundler starts:

  • Press i to open iOS simulator
  • Press a to open Android emulator
  • Press w to open in web browser

🔧 Bare React Native Tutorial (Standalone Workflow)

The Bare React Native example provides full native control and custom configurations.

$ cd MagicBareRNExample
$ yarn install

iOS Setup

$ cd ios
$ pod install
$ cd ..
$ yarn ios

Android Setup

$ yarn android

🚨 Troubleshooting

Error code 65 (iOS Build Issues)

If you encounter Error code 65 when running yarn ios:

  1. Clean Build: Follow these steps to clean your iOS build.

  2. Update AppDelegate: If updating React Native versions, manually update the AppDelegate.mm file in Xcode as suggested here.

Pod Install Issues

If you encounter issues with pod install:

$ cd ios
$ pod install

Metro Cache Issues

Clear Metro cache if you encounter bundling issues:

$ yarn start --reset-cache

📚 Additional Resources

📄 License

This project is licensed under the MIT License.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 5