WKInterfaceDevice a private API now?!

Since the release of watchOS 6 beta, I am recieving an invalid binary message every time I upload my app with the following description:


ITMS-90338: Non-public API usage - The app contains or inherits from non-public classes in APPNAME: WKInterfaceDevice . If method names in your source code match the private Apple APIs listed above, altering your method names will help prevent this app from being flagged in future submissions. In addition, note that one or more of the above APIs may be located in a static library that was included with your app. If so, they must be removed. If you think this message was sent in error and that you have only used Apple-published APIs in accordance with the guidelines, send the app's Apple ID, along with detailed information about why you believe the above APIs were incorrectly flagged, to appreview@apple.com. For further information, visit the Technical Support Information at http://developer.apple.com/support/technical/


I never had any problem with using WKInterfaceDevice methods like .play() and checking wrist position. what's changed?!

Replies

I'm having the exactly same issue, couldn't upload new builds since watchOS 6 beata released

We are also seeing the same issue.

It appears that the official docs no longer reference iOS as a supported platform for WKInterfaceDevice.

Same here.

Same here

Same here.

We are having the same issue. We can't even upload for testflight testing and Apple so far keeps routing my inquiry to different departments. I will update here if I ever get an answer or if I notice this gets fixed.

This may not be the answer anyone wants to hear right now. I know for me, this delayed getting a testflight build to a large parter for integration testing by 4 days. So, in further researching this and based on the clues above about the iOS SDK no longer showing in the docs online. I looked through the class in the latest version of Xcode and viewed my docs from within Xcode. WKInterfaceDevice shows iOS SDK 8.2 and up. We then downloaded the latest beta version of Xcode and lo and behold, we can no longer even #import <WatchKit/WatchKit.h> into our iOS project files. Only from the watch extension and app. It appears that Apple is planning to remove access to this in the next release and somehow is already holding code to that standard in code analysis. I would guess that they will fix this and we will still have to react to the change before the official release, but if you want to just get up to date now, you should maybe have the watch app send the iOS app the information that you need about the device and audit your application for other previously supported WatchKit code. I can confirm that removing WatchKit references from the iOS project files has resulted in a successful upload to Apple and we are back to testing at least. So even if you are accessing only items that are documented to be accessible from within the iOS application, it appears that they are considering them private now based on a yet to be released version. So frustrating.

I think I have found the cause, you have to comment out these two methods in your projects!


WKInterfaceDevice.current().systemName
WKInterfaceDevice.current().systemVersion

Does that mean we still can use WKInterfaceDevice but not systemName and systemVersion?

I don't use this two methods. I'm using: WKInterfaceDevice.current().play(WKHapticType.start)


I cannot upload to TestFlight 😟

The app contains or inherits from non-public classes in APPNAME: WKInterfaceDevice

In that case, maybe it has something to do with Xcode 11 beta, try changing the command line tools from 11.0 to 10.2, I'd also remove Xcode 11 temporarily.


Hope this helps! I can't reproduce it anymore

I did not install Xcode 11 beta. Build is created using Xcode 10.2.1 (10E1001) from AppStore.

Back in business! 😉 Apple fixed the problem. Just submitted a new build to TestFlight. All is ok now.