在NativeScript中使用NSURLIsExcludedFromBackupKey [英] Using NSURLIsExcludedFromBackupKey in NativeScript

查看:96
本文介绍了在NativeScript中使用NSURLIsExcludedFromBackupKey的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在本机反应中,我们有:

In react native we have:

type MkdirOptions = {
  NSURLIsExcludedFromBackupKey?: boolean; // iOS only
};

NativeScript中的等效项是什么? 我需要一个knownFolders.documents()下的目录,该目录不会备份到iCloud.

What is the equivalent in NativeScript? I need a directory under knownFolders.documents() that will not be backed-up to iCloud.

推荐答案

尝试一下,

NSURL.URLWithString(path).setResourceValueForKeyError(true, NSURLIsExcludedFromBackupKey);

path是文件或文件夹的完整路径.

Where path is complete path of your file or folder.

这篇关于在NativeScript中使用NSURLIsExcludedFromBackupKey的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆