Skip to content

Error reading license [Error: ENOENT: no such file or directory] #12

Description

@Aleksej3333

image

const licPath =
  Platform.OS === 'ios'
    ? RNFS.MainBundlePath + '/regula.license'
    : 'regula.license';
const readFile = Platform.OS === 'ios' ? RNFS.readFile : RNFS.readFileAssets;
const readLicense = async () => {
    try {
      const license = await readFile(licPath);
      console.log('license', license);
    } catch (err) {
      console.log('Error reading license');
    }
  };

[Error: ENOENT: no such file or directory, open '/Users/ag/Library/Developer/CoreSimulator/Devices/51847DA5-88F9-4336-AE1A-16C16499686F/data/Containers/Bundle/Application/3F0BA254-38E9-48B1-834C-DA174431DA57/SimpleFormApplication.app/regula.license']

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions