Quantcast
Channel: Active questions tagged react-native+ios - Stack Overflow
Viewing all articles
Browse latest Browse all 16750

How do I pick a .pgw file in the iOS document picker?

$
0
0

I'm developing an iOS app that needs to read .pgw files (https://en.wikipedia.org/wiki/World_file) from the local device storage. I have a sample file on my device that I'm trying to open from within the app. When I open the document picker, I can see the file but it's greyed out and I can't select it. In that screenshot, malaysia-google-earth.pgw is the file I'm trying to open.

If I change the file extension of that file to .txt, it's no longer greyed out and I can select it. So I know it's a problem with the file extension.

I've tried to add .pgw to the supported document types list for the app, but since there is no Uniform Type Identifier for this extension, I'm not sure if I'm adding it correctly. My Info.plist file includes these keys:

<key>CFBundleDocumentTypes</key><array><dict><key>CFBundleTypeIconFiles</key><array/><key>CFBundleTypeName</key><string>PNG World File</string><key>CFBundleTypeRole</key><string>Editor</string><key>LSHandlerRank</key><string>Alternate</string><key>LSItemContentTypes</key><array><string>public.pgw</string></array></dict></array><key>LSSupportsOpeningDocumentsInPlace</key><true/><key>UIFileSharingEnabled</key><key>UTExportedTypeDeclarations</key><array><dict><key>UTTypeConformsTo</key><array><string>public.data</string></array><key>UTTypeDescription</key><string>PNG World File</string><key>UTTypeIconFiles</key><array/><key>UTTypeIdentifier</key><string>public.pgw</string><key>UTTypeTagSpecification</key><dict><key>public.filename-extension</key><array><string>pgw</string></array></dict></dict></array><true/>

I am using iOS version 13.6, and this is a React Native app using react-native-document-picker.


Viewing all articles
Browse latest Browse all 16750

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>