How to save a text file in external storage in ios using flutter?

后端 未结 2 350
独厮守ぢ
独厮守ぢ 2020-12-31 11:42

I have created an app in which user can create and save a text file in the local storage of Android. I have used path_provider package which gives <

2条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-31 11:56

    As a compliment do @ni. answer, you must enable both keys. This is what it should look on:

    Xcode (info.plist):

    Info.plist on Xcode

    Editor (info.plist):

    LSSupportsOpeningDocumentsInPlace
    
    UIFileSharingEnabled
    
    

    Info in source:

    In iOS 11 and later, if both this keys LSSupportsOpeningDocumentsInPlace and the UIFileSharingEnabled key are YES, the local file provider grants access to all the documents in the app’s Documents directory. These documents appear in the Files app, and in a document browser. Users can open and edit these document in place.

    Source: Apple developer - iOS keys

提交回复
热议问题