Skip to content

akshayjadhav4/mmkv-widget-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MMKV Widget Demo

A demonstration project showcasing the integration of MMKV (Memory-Mapped Key-Value) storage with iOS widgets. This project uses Expo and demonstrates how to share data between your main app and iOS widgets using MMKV storage.

Features

  • MMKV storage integration for efficient data persistence
  • iOS Widget support
  • Data sharing between main app and iOS widgets
  • Built with Expo and React Native

Installation

  1. Clone the repository:

    git clone https://github.com/akshayjadhav4/mmkv-widget-demo.git
    cd mmkv-widget-demo
  2. Install dependencies:

    npm install
  3. Create iOS native build:

    npx expo prebuild -p ios
  4. Start the development server:

    npm run ios

Development

For iOS development:

npx expo run:ios

Project Structure

  • app/ - Main application code using Expo Router
    • index.tsx - Main app screen
    • _layout.tsx - App layout configuration
  • ios/ - iOS native code (generated by prebuild)
    • Contains widget extension and native configurations
  • targets/ - iOS Widget extension code
    • Contains widget UI components and logic
    • Handles widget data updates and MMKV storage access
  • assets/ - Static assets like images and fonts
  • app.json - Expo configuration file
  • package.json - Project dependencies and scripts

Dependencies

Key dependencies include:

  • react-native-mmkv - For efficient key-value storage
  • expo-build-properties - For configuring native build properties
  • @bacons/apple-targets - For iOS widget configuration

For a complete list of dependencies, please refer to package.json.

Demo

Demo

About

Implementation of accessing react-native-mmkv storage in iOS widget using MMKVAppExtension

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published