This is Xamarin's bug tracking system. For product support, please use the support links listed in your Xamarin Account.
Bug 44257 - UIRequiredDeviceCapabilities for Watch app does not include "watch-companion"
Summary: UIRequiredDeviceCapabilities for Watch app does not include "watch-companion"
Status: VERIFIED FIXED
Alias: None
Product: iOS
Classification: Xamarin
Component: MSBuild (show other bugs)
Version: XI 10.0 (iOS10)
Hardware: PC Mac OS
: Normal normal
Target Milestone: (C9)
Assignee: Bugzilla
URL:
: 46047 (view as bug list)
Depends on:
Blocks:
 
Reported: 2016-09-13 18:22 UTC by Sarah Ann Tolsma
Modified: 2016-10-28 16:20 UTC (History)
7 users (show)

See Also:
Tags:
Is this bug a regression?: ---
Last known good build:


Attachments

Description Sarah Ann Tolsma 2016-09-13 18:22:56 UTC
On previous versions of Xcode, UIRequiredDeviceCapabilities was being automatically populated with "watch-companion". Instead, we had to manually add this property to our Info.plist file. Without it, we got the following error when submitting our app to the App Store:

ERROR ITMS-90360: "Missing Info.plist value. A value for the key 'UIRequiredDeviceCapabilities' in bundle Foo.app/Plugins/FooWatchException.appex is required."

Can Xamarin include this property automatically for Watch apps (or make sure upgrades from Xcode 7 -> Xcode 8 work correctly?)
Comment 1 Manuel de la Peña 2016-09-14 08:10:53 UTC
Hello,

Please include all version informations.

The easiest way to get exact version information is to use the 
"Xamarin Studio" menu, "About Xamarin Studio" item, "Show Details" 
button and copy/paste the version informations (you can use the 
"Copy Information" button).

Nevertheless this does look like a bug in Xamarin Studio rather than the iOS project.
Comment 2 Sarah Ann Tolsma 2016-09-15 21:50:18 UTC
Xamarin Studio Community
Version 6.1 (build 5441)
Installation UUID: affe5a6a-8341-420e-a6cd-2ceb617eb8d8
Runtime:
	Mono 4.6.0 (mono-4.6.0-branch/746756c) (64-bit)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 406000245

NuGet
Version: 3.4.3.0

Xamarin.Profiler
Not Installed

Xamarin.Android
Version: 7.0.0.18 (Xamarin Studio Community)
Android SDK: /Users/Sarah/Library/Developer/Xamarin/android-sdk-macosx
	Supported Android versions:
		4.0.3  (API level 15)
		4.1    (API level 16)
		4.2    (API level 17)
		4.3    (API level 18)
		4.4    (API level 19)
		4.4.87 (API level 20)
		5.0    (API level 21)
		5.1    (API level 22)
		6.0    (API level 23)
		7.0    (API level 24)

SDK Tools Version: 25.1.7
SDK Platform Tools Version: 24.0.2
SDK Build Tools Version: 23.0.2

Java SDK: /usr
java version "1.7.0_71"
Java(TM) SE Runtime Environment (build 1.7.0_71-b14)
Java HotSpot(TM) 64-Bit Server VM (build 24.71-b01, mixed mode)

Android Designer EPL code available here:
https://github.com/xamarin/AndroidDesigner.EPL

Xamarin Android Player
Not Installed

Apple Developer Tools
Xcode 8.0 (11246)
Build 8A218a

Xamarin.iOS
Version: 10.0.0.6 (Xamarin Studio Community)
Hash: 6c3fee4
Branch: xcode8
Build date: 2016-09-09 13:01:32-0400

Xamarin.Mac
Version: 2.10.0.99 (Xamarin Studio Community)

Build Information
Release ID: 601005441
Git revision: 68292d1ab289911c815ddc715dd7cc29a9752f9f
Build date: 2016-09-09 04:43:23-04
Xamarin addins: ed25d008672663eeb9db55f1ccecb3c24d2fd3b2
Build lane: monodevelop-lion-cycle8

Operating System
Mac OS X 10.11.5
Darwin sarah-macbook-pro.local 15.5.0 Darwin Kernel Version 15.5.0
    Tue Apr 19 18:36:36 PDT 2016
    root:xnu-3248.50.21~8/RELEASE_X86_64 x86_64
Comment 3 Manuel de la Peña 2016-09-20 10:19:40 UTC
Jeff will take a look at this issue.
Comment 4 Jeffrey Stedfast 2016-09-20 16:49:13 UTC
Strangely Apple's documentation for the UIRequiredDeviceCapabilities key does not even mention watch-companion (see docs here: https://developer.apple.com/library/content/documentation/General/Reference/InfoPlistKeyReference/Articles/iPhoneOSKeys.html#//apple_ref/doc/uid/TP40009252-SW3)

When Googling for more info, I discovered reports like this http://stackoverflow.com/questions/32542240/watch-companion-in-plist-required-by-itunesconnect-breaks-watch-app. It seems that these reports are all from about a year or so ago, so the bug was *probably* fixed which means theoretically, at least, auto-injecting this into the user's compiled Info.plist *should* be safe to do now (for WatchKit extensions).

Did you end up using an Array or a Dictionary?
Comment 5 Jeffrey Stedfast 2016-09-20 18:45:56 UTC
FWIW, Vincent and I were doing a bit more digging and Vincent discovered that watch-companion is for watchOS1 extensions.

For WatchOS2 Extensions, having this key breaks launching in the Simulator (it turns out that we *used to* auto-add watch-companion to the Info.plist of Watch Extensions until April or so in the MSBuild tasks until we discovered that it broke WatchOS2 Extensions).
Comment 6 Jeffrey Stedfast 2016-09-20 18:51:31 UTC
This is the patch that removed the logic that added watch-companion: https://github.com/xamarin/xamarin-macios/commit/94e35a8570a52c5a927e24830b65a857a7986d8d

To fix this, we'll need something similar, but that only affects watchOS1 extensions.
Comment 7 Sebastien Pouliot 2016-09-23 17:59:28 UTC
PR https://github.com/xamarin/xamarin-macios/pull/868
was merged in xamarin-macios/master 5922215e72596e8397cd701fa67f0f2e36802849
Comment 8 Oleg Demchenko 2016-09-29 03:47:04 UTC
Unfortunately, we don't have watchOS 1 apps pushed to the AppStore to perform a clean verification of this fix. However, I came up with two results:

1) https://gist.github.com/anonymous/5deb53e0f66124cd7e130df8489c9911 - with current stable, submission failure caused by a missing value of the `UIRequiredDeviceCapabilities` key.

2) https://gist.github.com/anonymous/899739d5fac81e24bdedf1b449afd196 - with the master builds of XI `UIRequiredDeviceCapabilities` is not listed as a reason for submission failure anymore even though publishing still fails because of the watchOS 1 restriction.
Comment 9 Sebastien Pouliot 2016-09-29 14:30:06 UTC
Testing submission of watchOS 2.x only apps is fine (there's nothing more, for submissions, that can be done) and should continue.

That can (like this bug) find issues because we're still supporting watchOS 1.x applications (e.g. for migration or for enterprise apps that don't go to the store).
Comment 10 Vincent Dondain 2016-10-28 16:20:56 UTC
*** Bug 46047 has been marked as a duplicate of this bug. ***

Note You need to log in before you can comment on or make changes to this bug.