Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't associate with file extensions other than images. #121

Open
jammind opened this issue Oct 20, 2022 · 0 comments
Open

Can't associate with file extensions other than images. #121

jammind opened this issue Oct 20, 2022 · 0 comments

Comments

@jammind
Copy link

jammind commented Oct 20, 2022

I have tried associating my app with ".zip" and with my file extension ".line" and then running cordova build again. Neither of them works.

  1. To handle ".zip" files, I have updated package.json
"cc.fovea.cordova.openwith": {
    "ANDROID_MIME_TYPE": "application/zip",
    "IOS_URL_SCHEME": "tinkamoline",
    "IOS_UNIFORM_TYPE_IDENTIFIER": "public.archive"
}
  1. To handle ".line" files, I have updated package.json
"cc.fovea.cordova.openwith": {
    "ANDROID_MIME_TYPE": "tinkamo/line",
    "IOS_URL_SCHEME": "tinkamoline",
    "IOS_UNIFORM_TYPE_IDENTIFIER": "com.tinkamo.line"
}

and the code xxxx-info.plist

	<key>UTExportedTypeDeclarations</key>
	<array>
		<dict>
			<key>UTTypeIdentifier</key>
			<string>com.tinkamo.line</string>
			<key>UTTypeReferenceURL</key>
			<string>http://www.w3.org/Graphics/JPEG/</string>
			<key>UTTypeDescription</key>
			<string>Tinkano Line code</string>
			<key>UTTypeIconFile</key>
			<string>public.archive.icns</string>
			<key>UTTypeConformsTo</key>
			<array>
				<string>public.archive</string>
			</array>
			<key>UTTypeTagSpecification</key>
			<dict>
				<key>com.apple.ostype</key>
				<string>Tinkano Line code</string>
				<key>public.filename-extension</key>
				<array>
					<string>line</string>
					<string>line.zip</string>
				</array>
				<key>public.mime-type</key>
				<string>tinkamo/line</string>
			</dict>
		</dict>
	</array>

Testing procedure.

  1. Put a .zip and a .line file in the iOS Files app.
  2. Press and hold each file and choose Share from the popup menu.
  3. In the pull-up File Sharing view, there is no entry of my app.

IMG_DD09BA5213D7-1

@jammind jammind changed the title Will the plugin register new UTI in the Xcode project or shall I edit the .plist manually? Can't associate with file extensions other than images. Oct 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant