Share sheet shows "Copy to…" instead of "Open in…" for apps that support open-in-place; shows the correct caption after the first time it was used

Originator:lextar
Number:rdar://38357167 Date Originated:March 11 2018, 9:07 PM
Status:Open Resolved:
Product:iOS + SDK Product Version:11.2.6
Classification:Bug Reproducible:Always
 
Area:
UIKit

Summary:
When an app supports open in place (LSSupportsOpeningDocumentsInPlace in Info.plist), the share sheet shows "Copy in <app name>" instead of "Open in <app name>". After the "Copy in" action is used once, the share sheet correctly shows the "Open in" caption.

I've attached a sample project and a video.

I added only this to the Info.plist of an empty example project in Xcode:

<key>CFBundleDocumentTypes</key>
<array>
	<dict>
		<key>CFBundleTypeName</key>
		<string>Text</string>
		<key>LSHandlerRank</key>
		<string>Default</string>
		<key>LSItemContentTypes</key>
		<array>
			<string>public.text</string>
		</array>
	</dict>
</array>
<key>LSSupportsOpeningDocumentsInPlace</key>
<true/>
<key>UIFileSharingEnabled</key>
<false/>

Steps to Reproduce:
- install the sample app ("OpenInPlaceShareSheetBug") on an iOS device
- open the Files app
- tap and hold a .txt file and choose "Share"

Expected Results:
- the share sheet should show "Open in In Place" ("In Place" is the bundle display name of the sample app)

Actual Results:
- the share sheet shows "Copy to In Place" instead

When you tap on "Copy to In Place", the file is actually opened in place in the app - it is not copied despite what the title says. When you then try to open the share sheet for a second time, it correctly shows "Open in In Place".

Version/Build:
iOS 11.2.6

Configuration:
iPad Pro 10.5"

Comments

Sample Project

You can download the sample project from https://www.textasticapp.com/support/OpenInPlaceShareSheetBug.zip


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!