morrowdigital / watermelondb-expo-plugin

125 stars 30 forks source link

Expo Dev Client Build Crashes: use_modular_headers! #15

Closed sravis02 closed 1 year ago

sravis02 commented 1 year ago

I have installed WatermelonDB, and the Config-Plugin. Then i wanted to create a development build with expo for the IOS simulator.

The build crashed when installing the pods.

...
Installing libevent (2.1.12)
Installing libvmaf (2.3.0)
Installing libwebp (1.2.4)
Installing react-native-safe-area-context (4.5.0)
Installing react-native-skia (0.1.172)
Installing simdjson (3.1.0-wmelon1)
[!] The following Swift pods cannot yet be integrated as static libraries:
The Swift pod `WatermelonDB` depends upon `simdjson`, which does not define modules. To opt into those targets generating module maps (which is necessary to import them from Swift when building as static libraries), you may set `use_modular_headers!` globally in your Podfile, or specify `:modular_headers => true` for particular dependencies.

Did I forget to setup something?

This is how the plugins part of my app.json looks

"plugins": [
      "@morrowdigital/watermelondb-expo-plugin",
      [
        "expo-build-properties",
        {
          "android": {
            "kotlinVersion": "1.6.10"
          }
        }
      ],
      [
        "expo-image-picker",
        {
          "photosPermission": "The app accesses your photos to let you preview your tattoos"
        }
      ]
    ]

Thanks

ersin-demirtas commented 1 year ago

@sravis02 I had the same issue, updated the ios/Podfile for the watermelondb dependencies.

  pod 'WatermelonDB', :path => '../node_modules/@nozbe/watermelondb'
  pod 'React-jsi', :path => '../node_modules/react-native/ReactCommon/jsi', :modular_headers => true
  pod 'simdjson', path: '../node_modules/@nozbe/simdjson', :modular_headers => true

to build again run yarn expo run:ios or yarn expo run:andorid

brunokiafuka commented 1 year ago

Hi thanks for flagging this issue, we have PR which fixes #16 this issue. We will update the lib once we merge it.

brunokiafuka commented 1 year ago

Hi we will be pushing a fix for "@nozbe/watermelondb": "^0.25.5",

brunokiafuka commented 1 year ago

Hi can we install "@morrowdigital/watermelondb-expo-plugin": "^2.1.1" and re-run the npx expo run:[ios | android]. This new version aims to fix "@nozbe/watermelondb": "^0.26.0", please make sure that you have it on the lates version.

Feel free to reopen the issue if this persists. Thanks :)