Я работаю над приложением iOS с расширением файла, например. .vlin
и я хочу, чтобы устройство iOS распознавало это расширение. До сих пор я могу добиться следующего
.vlin
поддерживается в родном почтовом клиенте iphone- при нажатии
.vlin
файл открывается в моемVlin
приложении.
Я использую кордову и добавил настройки конфигурации в config.xml.
Но почему-то он не работает для браузера сафари iOS. Если я попытаюсь открыть файл в iOS Safari, он откроется в самом браузере как текстовый файл. Я хочу, чтобы он открывался в моем приложении Vlin
для iOS.
Мой код info.plist и config.xml:
<platform name="ios">
<preference name="IosLaunchMode" value="singleTask" />
<config-file platform="ios" target="*-Info.plist" parent="UIFileSharingEnabled">
<true />
</config-file>
<config-file platform="ios" target="*-Info.plist" parent="CFBundleDocumentTypes">
<array>
<dict>
<key>CFBundleTypeName</key>
<string>com.example.vlin.vlin</string>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>LSHandlerRank</key>
<string>Owner</string>
<key>LSItemContentTypes</key>
<array>
<string>com.example.vlin.vlin</string>
</array>
</dict>
</array>
</config-file>
<config-file platform="ios" target="*-Info.plist" parent="UTExportedTypeDeclarations">
<array>
<dict>
<key>UTTypeConformsTo</key>
<array>
<string>public.data</string>
</array>
<key>UTTypeDescription</key>
<string>Vlin document</string>
<key>UTTypeIdentifier</key>
<string>com.example.vlin.vlin</string>
<key>UTTypeTagSpecification</key>
<dict>
<key>public.filename-extension</key>
<string>vlin</string>
</dict>
</dict>
</array>
</config-file>
Any help is much appreciated, thanks in advance.
инфо.plist
<key>UIFileSharingEnabled</key> <true/> <key>CFBundleDocumentTypes</key> <array> <dict> <key>CFBundleTypeName</key> <string>com.example.vlin.vlin</string> <key>CFBundleTypeRole</key> <string>Editor</string> <key>LSHandlerRank</key> <string>Owner</string> <key>LSItemContentTypes</key> <array> <string>com.example.vlin.vlin</string> </array> </dict> </array> <key>UTExportedTypeDeclarations</key> <array> <dict> <key>UTTypeConformsTo</key> <array> <string>public.data</string> </array> <key>UTTypeDescription</key> <string>Vlin document</string> <key>UTTypeIdentifier</key> <string>com.example.vlin.vlin</string> <key>UTTypeTagSpecification</key> <dict> <key>public.filename-extension</key> <string>vlin</string> </dict> </dict> </array> </dict>
пример формата файла: invite.vlin
{
"invite”: {
"name": “Some College",
"identifier": “xxxxxxxxxxxxxxxxx”
},
“value”: “xxxxxxxxxxxxxx”
}
invite.vlin
. - person pradeep1991singh   schedule 11.10.2016