Native file documents

0
  i'm trying to implement the module “Native File documents” https://marketplace.mendix.com/link/component/114252 in an app created with Mx9.2, deployed to the sandbox and built with the Native template 1.0.90. I added the module and just implemented the SUB_ViewDocument nanflow. I receive the error below like if dependency was not set correctly... but it's supposed to be maanged automatically by Mx9 builder. Client: TypeError: null is not an object (evaluating 's.RNFSFileTypeRegular')   How can i make sure that the dependencies are correctly implemented by Mx9 ?
asked
2 answers
2

Hi,

 

The dependencies are tied to IsNativeFileSystemAvailable.

Just make sure to call IsNativeFileSystemAvailable at least once in your app. This is good practice anyway, it also allows your app to fail gracefully when a developer attempts to use the functionality in the Make It Native app.

I will put this in the documentation as well.

 

Edit: I published a new version with the function to share documents or images outside the app. This brought along more dependencies so I created several dependency files for key JavaScript actions. The native dependencies have been updated to newer versions as well. Be sure to click the Releases tab and then download the latest version from there. The default download button will download a really old version.

With regards,

 

Marcel

answered
1

I solved the problem by creating the dependencies json files beside their javascript files.

Not sure if it’s the way it’s supposed to be, but it works now...

in \javascriptsource\nativefiledocuments\actions

 

every json files are the same

{
    "nativeDependencies": {
        "react-native-file-viewer": "2.1.4",
        "react-native-fs": "2.16.6"
    }
}

 

answered