How to show MyApp Icon to Document Folder shared by UIFileSharingEnabled in "On my iPhone"
I would like to show my app (Falcon) on Chrome, Udemy, etc.
This app is currently under development.
Please let me know if there are any requirements to show it.
I would be happy if iCloud also solves this problem at the same time because the icon is not displayed.
For example, can it be displayed even if it is not released in the AppStore?
This is my Info.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDocumentTypes</key>
<array>
<dict>
<key>CFBundleTypeName</key>
<string>Falcon Package</string>
<key>LSHandlerRank</key>
<string>Owner</string>
<key>LSItemContentTypes</key>
<array>
<string>lamina1331.Falcon</string>
</array>
</dict>
</array>
<key>NSUbiquitousContainers</key>
<dict>
<key>iCloud.lamina1331.Falcon</key>
<dict>
<key>NSUbiquitousContainerIsDocumentScopePublic</key>
<true/>
<key>NSUbiquitousContainerName</key>
<string>Falcon</string>
<key>NSUbiquitousContainerSupportedFolderLevels</key>
<string>Any</string>
</dict>
</dict>
<key>UIFileSharingEnabled</key>
<true/>
<key>UTExportedTypeDeclarations</key>
<array>
<dict>
<key>UTTypeConformsTo</key>
<array>
<string>public.data</string>
</array>
<key>UTTypeDescription</key>
<string>Falcon Package</string>
<key>UTTypeIconFiles</key>
<array>
<string>DocumentIcon</string>
</array>
<key>UTTypeIdentifier</key>
<string>lamina1331.Falcon</string>
<key>UTTypeTagSpecification</key>
<dict>
<key>public.filename-extension</key>
<array>
<string>flcpkg</string>
</array>
</dict>
</dict>
</array>
<key>UTImportedTypeDeclarations</key>
<array>
<dict>
<key>UTTypeConformsTo</key>
<array>
<string>public.data</string>
</array>
<key>UTTypeDescription</key>
<string>Falcon Package</string>
<key>UTTypeIconFiles</key>
<array>
<string>DocumentIcon</string>
</array>
<key>UTTypeIdentifier</key>
<string>lamina1331.Falcon</string>
<key>UTTypeTagSpecification</key>
<dict>
<key>public.filename-extension</key>
<array>
<string>flcpkg</string>
</array>
</dict>
</dict>
</array>
</dict>
</plist>
Post
Replies
Boosts
Views
Activity
My app needs to share data files with multiple devices owned by a single user.
I also want to implement this mechanism without setting up a server.
Therefore, I want to make it read/write to local data on the user's own cloud drive (e.g. iCloud, Google Drive, One Drive, Dropbox) and read/use them as needed.
I have tried “.fileImporter” to get the URL, but the button is grayed out and cannot be opened.
Sorry for my poor English.
struct FilePathSettingView: View {
@State private var isPickerPresented: Bool = false
var fileControll = FileControll()
var body: some View {
VStack {
Text("Storage Setting")
Button(action:{
isPickerPresented = true
})
{
Text("Select place")
}
.fileImporter(
isPresented: $isPickerPresented,
allowedContentTypes: [.directory, .folder],
allowsMultipleSelection: false,
onCompletion: { result in
switch result {
case .success(let urls):
guard let url = urls.first else { return }
let accessGranted = url.startAccessingSecurityScopedResource()
defer {
if accessGranted {
url.stopAccessingSecurityScopedResource()
}
}
guard accessGranted else {
print("Failed to access security-scoped resource.")
return
}
fileControll.createDirectoryStructure(in: url)
case .failure(let error):
print("Failed to select directory: \(error.localizedDescription)")
}
}
)
}
}
}