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

Discussion in 'iOS Questions' started by Alessandra Pellegri, Aug 2, 2015.

  1. Alessandra Pellegri

    Alessandra Pellegri Active Member Licensed 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:
    Code:
    #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
     
  2. Erel

    Erel Administrator Staff Member Licensed User

  3. Alessandra Pellegri

    Alessandra Pellegri Active Member Licensed User

    Ok, thank you Erel
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice