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/ac81fcc8-e7d9-4469-85bd-7b20ae96c58cn%40googlegroups.com.

Reply via email to