andpor / react-native-sqlite-storage

Full featured SQLite3 Native Plugin for React Native (Android and iOS)
MIT License
2.75k stars 521 forks source link

"dependency.platforms.ios.project" is not allowed. #527

Open featuriz opened 2 years ago

featuriz commented 2 years ago

When npx react-native start -- --reset-cache warn Package react-native-sqlite-storage contains invalid configuration: "dependency.platforms.ios.project" is not allowed. Please verify it's properly linked using "react-native config" command and contact the package maintainers about this.

My configs:

"react-native-sqlite-storage": "^6.0.1", // Latest as of now

react-native.config.js

module.exports = {
  project: {
    android: {}, // grouped into "project"
  },
  assets: ['./src/assets/fonts/'], // stays the same
};

Solution

I'm using for only android : node_modules/react-native-sqlite-storage/react-native.config.js file delete ios solves.

module.exports = {
    dependency: {
        platforms: {
            // ios: {
            //  project: './platforms/ios/SQLite.xcodeproj'
            // },
            android: {
                sourceDir: './platforms/android'
            },
            windows: {
                sourceDir: './platforms/windows',
                solutionFile: 'SQLitePlugin.sln',
                projects: [
                  {
                    projectFile: 'SQLitePlugin/SQLitePlugin.vcxproj',
                    directDependency: true,
                  }
                ],
            }
        }
    }
}

Then running npx react-native start -- --reset-cache will not throw error.