iOS Question How to add info.plist into #PlistExtra ?

Alessandra Pellegri

Active Member
Licensed User
Longtime User
I have to associate a file extension to my app.
To do this I've found that I should add a code to info.plist, I've found here: http://stackoverflow.com/questions/2774343/how-do-i-associate-file-types-with-an-iphone-application

In B4I from what I understand I should add my code using #PlistExtra.
But how can I do this if my code is so long ?
I tried this:
B4X:
  #PlistExtra <key>CFBundleDocumentTypes</key>
   #PlistExtra <array>
   #PlistExtra <dict>
   #PlistExtra <key>CFBundleTypeIconFiles</key>
   #PlistExtra <array>
   #PlistExtra <string>hand.png</string>
   #PlistExtra <string>hand_p.png</string>
   #PlistExtra </array>
   #PlistExtra <key>CFBundleTypeName</key>
   #PlistExtra <string>Molecules Structure File</string>
   #PlistExtra <key>CFBundleTypeRole</key>
   #PlistExtra <string>Viewer</string>
   #PlistExtra <key>LSHandlerRank</key>
   #PlistExtra <string>Owner</string>
   #PlistExtra <key>LSItemContentTypes</key>
   #PlistExtra <array>
   #PlistExtra <string>com.sunsetlakesoftware.molecules.pdb</string>
   #PlistExtra <string>org.gnu.gnu-zip-archive</string>
   #PlistExtra </array>
   #PlistExtra </dict>
   #PlistExtra </array>
   #PlistExtra <key>UTExportedTypeDeclarations</key>
   #PlistExtra <array>
   #PlistExtra <dict>
   #PlistExtra <key>UTTypeConformsTo</key>
   #PlistExtra <array>
   #PlistExtra <string>public.plain-text</string>
   #PlistExtra <string>public.text</string>
   #PlistExtra </array>
   #PlistExtra <key>UTTypeDescription</key>
   #PlistExtra <string>Molecules Structure File</string>
   #PlistExtra <key>UTTypeIdentifier</key>
   #PlistExtra <string>com.sunsetlakesoftware.molecules.pdb</string>
   #PlistExtra <key>UTTypeTagSpecification</key>
   #PlistExtra <dict>
   #PlistExtra <key>public.filename-extension</key>
   #PlistExtra <string>pdb</string>
   #PlistExtra <key>public.mime-type</key>
   #PlistExtra <string>chemical/x-pdb</string>
   #PlistExtra </dict>
   #PlistExtra </dict>
   #PlistExtra </array>
But it doesn't work.

Perhaps I should put all my code on the same row ?

Thank you
 
Top