Thank's to @Erel (in this post), I can now open all txt-files with combination of UIFileSharingEnabled and CFBundleDocumentTypes.
But...
in the next step, I can't combine LSSupportsOpeningDocumentsInPlace with UIFileSharingEnabled and CFBundleDocumentTypes.
The error comes when I try to open a text-file from the iOS Files-app on my iPhone.
My app then crash, and I get this error:
I have now read the "entire" internet..., but I'm not able to solve this problem.
Any idea?
B4X:
#PlistExtra: <key>UIFileSharingEnabled</key><true/>
#PlistExtra: <key>CFBundleDocumentTypes</key>
#PlistExtra: <array>
#PlistExtra: <dict>
#PlistExtra: <key>CFBundleTypeName</key>
#PlistExtra: <string>Text File</string>
#PlistExtra: <key>LSHandlerRank</key>
#PlistExtra: <string>Alternate</string>
#PlistExtra: <key>LSItemContentTypes</key>
#PlistExtra: <array>
#PlistExtra: <string>public.text</string>
#PlistExtra: </array>
#PlistExtra: </dict>
#PlistExtra: </array>
But...
in the next step, I can't combine LSSupportsOpeningDocumentsInPlace with UIFileSharingEnabled and CFBundleDocumentTypes.
B4X:
#PlistExtra: <key>LSSupportsOpeningDocumentsInPlace</key><true/>
#PlistExtra: <key>UIFileSharingEnabled</key><true/>
#PlistExtra: <key>CFBundleDocumentTypes</key>
#PlistExtra: <array>
#PlistExtra: <dict>
#PlistExtra: <key>CFBundleTypeName</key>
#PlistExtra: <string>Text File</string>
#PlistExtra: <key>LSHandlerRank</key>
#PlistExtra: <string>Alternate</string>
#PlistExtra: <key>LSItemContentTypes</key>
#PlistExtra: <array>
#PlistExtra: <string>public.text</string>
#PlistExtra: </array>
#PlistExtra: </dict>
#PlistExtra: </array>
The error comes when I try to open a text-file from the iOS Files-app on my iPhone.
My app then crash, and I get this error:
B4X:
*** Assertion failure in -[UIApplication _applicationOpenURLAction:payload:origin:], UIApplication.m:7956
Error occurred on line: 241 (Main)
Application has LSSupportsOpeningDocumentsInPlace key, but doesn't implement application:openURL:options: on delegate <B4IAppDelegate: 0x28377ce60>
Stack Trace: (
CoreFoundation 18E3CD08-C5BD-329B-AADA-4684E60F8805 + 39488
libobjc.A.dylib objc_exception_throw + 56
Foundation 50C2EC83-ADF0-3911-A0E0-FC6E4E0C0E60 + 4976464
UIKitCore 55D36A14-98DE-3A42-810E-220DE725A53B + 4597276
UIKitCore 55D36A14-98DE-3A42-810E-220DE725A53B + 13048848
libdispatch.dylib 694EC4A0-7CF4-3E50-947D-79A142B4D0DD + 407632
libdispatch.dylib 694EC4A0-7CF4-3E50-947D-79A142B4D0DD + 411592
libdispatch.dylib 694EC4A0-7CF4-3E50-947D-79A142B4D0DD + 286488
libdispatch.dylib 694EC4A0-7CF4-3E50-947D-79A142B4D0DD + 285584
CoreFoundation 18E3CD08-C5BD-329B-AADA-4684E60F8805 + 604200
CoreFoundation 18E3CD08-C5BD-329B-AADA-4684E60F8805 + 488616
CoreFoundation CFRunLoopRunSpecific + 584
GraphicsServices GSEventRunModal + 160
UIKitCore 55D36A14-98DE-3A42-810E-220DE725A53B + 3626536
UIKitCore UIApplicationMain + 312
SplitNote main + 104
dyld F328B8FD-5C49-3ECE-9A63-A51B44ACDE0C + 81392
)
SignalHandler 6
I have now read the "entire" internet..., but I'm not able to solve this problem.
Any idea?