FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Known iOS Folders are coming back undefined · Issue #3433 · NativeScript/NativeScript · GitHub

Known iOS Folders are coming back undefined #3433

Description

Did you verify this is a real problem by searching Stack Overflow and the other open issues in this repo?

YES

Tell us about the problem

I'm trying to access fs.knownFolders.ios.sharedPublic() (or any other known .ios folder, besides Library), so I can use utils.ios.openFile() to open various files (such as pdf, doc..etc) with their default application. The returned fs.Folder is undefined, example:

let sharedPublic: fs.Folder = fs.knownFolders.ios.sharedPublic();
if (isUndefined(sharedPublic)) {
    console.log(`Shared public is undefined!`);
} else {
    console.log(`Shared public: ${sharedPublic.path}`);
}
CONSOLE LOG file:///app/app.component.ts:14:24: Shared public is undefined!

I also attempted to add UIFileSharingEnabled to my Info.plist:

        ...
        <key>UIFileSharingEnabled</key>
	<true/>
</dict>
</plist>

Which platform(s) does your issue occur on?

iOS

Please provide the following version numbers that your issue occurs with:

  • CLI: 2.4.2
  • Cross-platform modules: 2.4.4
  • Runtime(s): "tns-ios": 2.4.0
  • Plugin(s): "nativescript-angular": 1.3.0, "nativescript-theme-core": ^0.2.1

Please tell us how to recreate the issue in as much detail as possible.

I created this example app that illustrates the problem: https://github.com/jzgoda/tns_ios_folders_undefined

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions


      Back | FazBrowse Home | New Git URL