So if I understand correctly your app appears correctly in the list of 
options for the file. But the arg isn't passed when you click on the app. 
On which version of iOS are you testing this?

On Thursday, June 3, 2021 at 4:36:41 PM UTC+3 P5music wrote:

>
> My CN1 app has to open data files with custom extension when the user 
> selects one of them to be opened from the Files app, or another app (like 
> opening it as e-mail attachment, for example).
> The import/export feature works.
>
> This is a part of the ios.plistInject string:
>
>
> <key>UTExportedTypeDeclarations</key><array> 
> <dict><key>UTTypeDescription</key><string>List of 
> datatype</string><key>UTTypeConformsTo</key><array><string>public.json</string><string>public.database</string><string>public.data</string><string>public.text</string><string>public.content</string></array><key>UTTypeIdentifier</key><string>com.myapp.datatype</string><key>UTTypeTagSpecification</key><dict><key>public.filename-extension</key><array><string>ext</string></array><key>public.mime-type</key><array><string>application/json</string>
>  
> </array> </dict> </dict> </array>
>
> the ios.plistInject has also other keys that correspond to working 
> features of the app, so it means that the plist injection is accepted and 
> processed by XCode.
>
> Instead, the custom extension is not registered in the system (iOS 
> simulator).
>
> The Swift counterpart of the CN1 app is able to register the extension, so 
> when the data file with custom extension is displayed as json it shows its 
> description 
> "List of datatype"
>
> Only the file name is displayed instead with the CN1 app installed.
>
> The CN1 app does not open the file if the user selects it in the Files 
> app, and no option is available.
>
> The following code is used, and it works on the CN1 simulator
>
> // it is in the start() method
> String arg=Display.getInstance().getProperty("AppArg",null);
>         System.out.println("arg="+arg);
>         if (arg!=null) importArg(arg);
>
> Is that string in ios.plistInject wrong? It is the same of the Swift app, 
> it was pasted from there in fact (see below).
>
> Thanks in advance.
>
> <key>UTExportedTypeDeclarations</key>
>     <array>
>         <dict>
>             <key>UTTypeDescription</key>
>             <string>List of datatype</string>
>             <key>UTTypeConformsTo</key>
>             <array>
>                 <string>public.json</string>
>                 <string>public.database</string>
>                 <string>public.data</string>
>                 <string>public.text</string>
>                 <string>public.content</string>
>             </array>
>             <key>UTTypeIdentifier</key>
>             <string>com.myapp.datatype</string>
>             <key>UTTypeTagSpecification</key>
>             <dict>
>                 <key>public.filename-extension</key>
>                 <array>
>                     <string>ext</string>
>                 </array>
>                 <key>public.mime-type</key>
>                 <array>
>                     <string>application/json</string>
>                 </array>
>             </dict>
>         </dict>
>     </array>

-- 
You received this message because you are subscribed to the Google Groups 
"CodenameOne Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/codenameone-discussions/5dc8fb38-4fdd-4598-a43d-1ef3830de819n%40googlegroups.com.

Reply via email to