Skip to content

Cross-Platform native modules documentation for v0.79.0 has malformed JSON for the iOS modulesProvider #4579

@Zach-Dean-Attractions-io

Description

In version 0.79.0 of Cross-Platform Native Modules (C++) the documentation for registering the module in the platform for iOS tells you to modify the package.json as follows

     "start": "react-native start",
     "test": "jest"
   },
   "codegenConfig": {
     "name": "AppSpecs",
     "type": "modules",
     "jsSrcsDir": "specs",
     "android": {
       "javaPackageName": "com.sampleapp.specs"
     }
+    "ios": 
+       "modulesProvider": {
+         "NativeSampleModule":  "NativeSampleModuleProvider"
+       }
   },

   "dependencies": {

However, this JSON is malformed. There should be a comma after the "android" block ends and the "ios" block should be an object

     "start": "react-native start",
     "test": "jest"
   },
   "codegenConfig": {
     "name": "AppSpecs",
     "type": "modules",
     "jsSrcsDir": "specs",
     "android": {
       "javaPackageName": "com.sampleapp.specs"
-     }
+     },
-    "ios":
+    "ios": {
+       "modulesProvider": {
+         "NativeSampleModule":  "NativeSampleModuleProvider"
+       }
+    }
   },

   "dependencies": {

I've opened a PR: #4580

Metadata

Metadata

Assignees

No one assigned

    Labels

    StaleIssues/PR that are not getting much activity and are closer to be closed

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions