mrossen Active Member Licensed User Longtime User Dec 31, 2019 #1 Hi, I am trying to detach at custom file format "lps" from mail, and open it with my own app and save the file I have followed this links: How do I register a custom filetype in iOS I am currently creating a app in which i want to let the user backup their files (plist + m4a). I zip the files and change the extension to a custom one (specifically for my app, say "*.MyBackup").... stackoverflow.com How do I associate file types with an iPhone application? On the subject of associating your iPhone app with file types. In this informative question I learned that apps could be associated with custom URL protocols. That was almost one year ago and si... stackoverflow.com But It is a mess for me. I can not se the logic here. I have got this to work: https://www.b4x.com/android/forum/threads/open-external-files-with-your-app.50525/#content The file I try to setup with my app is a text file like a windows ini file It is used to setup a device. I would like to email a customer this lps file, and he can open it with email, and get it over to my app and then program the device. But I am stucked!! Has any one got this thing with custom file types to work. I have added this to my app B4X: Copy #PlistExtra:<key>CFBundleDocumentTypes</key> #PlistExtra:<Array><dict><key>CFBundleTypeIconFiles</key> #PlistExtra:<Array> #PlistExtra:<string>Icon-iPad-doc320.png</string> #PlistExtra:<string>Icon-iPad-doc.png</string> #PlistExtra:</Array> #PlistExtra:<key>CFBundleTypeName</key> #PlistExtra:<string>LPS File</string> #PlistExtra:<key>CFBundleTypeRole</key> #PlistExtra:<string>Viewer</string> #PlistExtra:<key>LSHandlerRank</key> #PlistExtra:<string>Owner</string> #PlistExtra:<key>LSItemContentTypes</key> #PlistExtra:<Array><string>com.lp.imail.lps</string> #PlistExtra:<string>Public.comma-separated-values-text</string> #PlistExtra:</Array></dict></Array> #PlistExtra:<key>UTExportedTypeDeclarations</key> #PlistExtra:<Array><dict><key>UTTypeConformsTo</key><Array><string>Public.data</string></Array> #PlistExtra:<key>UTTypeDescription</key><string>LPS File</string><key>UTTypeIdentifier</key><string>com.lp.imail.lps</string> #PlistExtra:<key>UTTypeTagSpecification</key><dict><key>Public.filename-extension</key><string>lps</string> #PlistExtra:<key>Public.mime-Type</key><string>application/octet-stream</string> #PlistExtra:</dict></dict></Array> Mogens Attachments iMail.zip iMail.zip 18.6 KB · Views: 494
Hi, I am trying to detach at custom file format "lps" from mail, and open it with my own app and save the file I have followed this links: How do I register a custom filetype in iOS I am currently creating a app in which i want to let the user backup their files (plist + m4a). I zip the files and change the extension to a custom one (specifically for my app, say "*.MyBackup").... stackoverflow.com How do I associate file types with an iPhone application? On the subject of associating your iPhone app with file types. In this informative question I learned that apps could be associated with custom URL protocols. That was almost one year ago and si... stackoverflow.com But It is a mess for me. I can not se the logic here. I have got this to work: https://www.b4x.com/android/forum/threads/open-external-files-with-your-app.50525/#content The file I try to setup with my app is a text file like a windows ini file It is used to setup a device. I would like to email a customer this lps file, and he can open it with email, and get it over to my app and then program the device. But I am stucked!! Has any one got this thing with custom file types to work. I have added this to my app B4X: Copy #PlistExtra:<key>CFBundleDocumentTypes</key> #PlistExtra:<Array><dict><key>CFBundleTypeIconFiles</key> #PlistExtra:<Array> #PlistExtra:<string>Icon-iPad-doc320.png</string> #PlistExtra:<string>Icon-iPad-doc.png</string> #PlistExtra:</Array> #PlistExtra:<key>CFBundleTypeName</key> #PlistExtra:<string>LPS File</string> #PlistExtra:<key>CFBundleTypeRole</key> #PlistExtra:<string>Viewer</string> #PlistExtra:<key>LSHandlerRank</key> #PlistExtra:<string>Owner</string> #PlistExtra:<key>LSItemContentTypes</key> #PlistExtra:<Array><string>com.lp.imail.lps</string> #PlistExtra:<string>Public.comma-separated-values-text</string> #PlistExtra:</Array></dict></Array> #PlistExtra:<key>UTExportedTypeDeclarations</key> #PlistExtra:<Array><dict><key>UTTypeConformsTo</key><Array><string>Public.data</string></Array> #PlistExtra:<key>UTTypeDescription</key><string>LPS File</string><key>UTTypeIdentifier</key><string>com.lp.imail.lps</string> #PlistExtra:<key>UTTypeTagSpecification</key><dict><key>Public.filename-extension</key><string>lps</string> #PlistExtra:<key>Public.mime-Type</key><string>application/octet-stream</string> #PlistExtra:</dict></dict></Array> Mogens
mrossen Active Member Licensed User Longtime User Dec 31, 2019 #3 Arhh. Sorry!!! @Erel. Can you move this question to B4i forum? Mogens Upvote 0
Erel B4X founder Staff member Licensed User Longtime User Dec 31, 2019 #4 mrossen said: @Erel. Can you move this question to B4i forum? Click to expand... Done. Public.mime <> public.mime. Check the case of all values. Upvote 0
mrossen said: @Erel. Can you move this question to B4i forum? Click to expand... Done. Public.mime <> public.mime. Check the case of all values.
mrossen Active Member Licensed User Longtime User Jan 4, 2020 #5 Hi, I have been over this again and again the last days. With no luck. It will not compile. If I removes the part after the linie 8 it compiles. Anyone has at clue to what can be wrong. B4X: Copy #PlistExtra:<key>CFBundleDocumentTypes</key> #PlistExtra:<array><dict><key>CFBundleTypeIconFiles</key><array/> #PlistExtra:<key>CFBundleTypeName</key><string>LPS File</string> #PlistExtra:<key>LSHandlerRank</key><string>Alternate</string> #PlistExtra:<key>LSItemContentTypes</key><array> #PlistExtra:<string>com.lp.imail.lps</string> #PlistExtra:</array></dict></array> #PlistExtra:<key>UTExportedTypeDeclarations</key> #PlistExtra:<Array><dict><key>UTTypeConformsTo</key> #PlistExtra:<Array><string>public.plain-text</string><string>public.text</string></Array> #PlistExtra:<key>UTTypeDescription</key> #PlistExtra:<string>imail File</string> #PlistExtra:<key>UTTypeIdentifier</key> #PlistExtra:<string>com.lp.imail.lps</string> #PlistExtra:<key>UTTypeTagSpecification</key> #PlistExtra:<dict><key>public.filename-extension</key> #PlistExtra:<string>lps</string> #PlistExtra:<key>public.mime-type</key> #PlistExtra:<string>text/plain</string> #PlistExtra:</dict></dict></Array> Mogens Upvote 0
Hi, I have been over this again and again the last days. With no luck. It will not compile. If I removes the part after the linie 8 it compiles. Anyone has at clue to what can be wrong. B4X: Copy #PlistExtra:<key>CFBundleDocumentTypes</key> #PlistExtra:<array><dict><key>CFBundleTypeIconFiles</key><array/> #PlistExtra:<key>CFBundleTypeName</key><string>LPS File</string> #PlistExtra:<key>LSHandlerRank</key><string>Alternate</string> #PlistExtra:<key>LSItemContentTypes</key><array> #PlistExtra:<string>com.lp.imail.lps</string> #PlistExtra:</array></dict></array> #PlistExtra:<key>UTExportedTypeDeclarations</key> #PlistExtra:<Array><dict><key>UTTypeConformsTo</key> #PlistExtra:<Array><string>public.plain-text</string><string>public.text</string></Array> #PlistExtra:<key>UTTypeDescription</key> #PlistExtra:<string>imail File</string> #PlistExtra:<key>UTTypeIdentifier</key> #PlistExtra:<string>com.lp.imail.lps</string> #PlistExtra:<key>UTTypeTagSpecification</key> #PlistExtra:<dict><key>public.filename-extension</key> #PlistExtra:<string>lps</string> #PlistExtra:<key>public.mime-type</key> #PlistExtra:<string>text/plain</string> #PlistExtra:</dict></dict></Array> Mogens
Erel B4X founder Staff member Licensed User Longtime User Jan 5, 2020 #6 mrossen said: It will not compile. Click to expand... 1. Where is the error message? 2. Post the generated Objects\src\B4iProject\B4iProject-Info.plist file. Upvote 0
mrossen said: It will not compile. Click to expand... 1. Where is the error message? 2. Post the generated Objects\src\B4iProject\B4iProject-Info.plist file.
mrossen Active Member Licensed User Longtime User Jan 5, 2020 #7 Hi, I have attach the files. I have renamed the plist file to txt. I could not upload plist extention Mogens Attachments Build.PNG 16.3 KB · Views: 585 Error.png 55.7 KB · Views: 524 B4iProject-Info.txt B4iProject-Info.txt 4 KB · Views: 495 Upvote 0
Hi, I have attach the files. I have renamed the plist file to txt. I could not upload plist extention Mogens
Erel B4X founder Staff member Licensed User Longtime User Jan 5, 2020 #8 Should be <array> not <Array> Again: check the case of all values. Upvote 0
mrossen Active Member Licensed User Longtime User Jan 5, 2020 #9 Hi Erel, Thank you. It was the uppercase A in <array> It now compiles. Mogens Upvote 0