4

I received a call from an Apple representative telling me that my app that has a WatchOS extension isn't compiled with Bitcode support and that if I try to submit further updates then they will be rejected.

This is a Xamarin.iOS application. I am using Visual Studio 2017 15.8.2, Xamarin.iOS 11.14.0.14 and XCode 9.4.1.

As far as I know, Bitcode has been enabled in my WatchOS projects for some time, and I was under the impression that I would already have had rejections by now if this wasn't the case (most recent update is less than 4 weeks ago).

In both the WatchOS and WatchOS Extension projects, I have the following project options for my AppStore builds:

<MtouchUseLlvm>True</MtouchUseLlvm>
<MtouchEnableBitcode>True</MtouchEnableBitcode>

I do not know how to prove that Bitcode was actually enabled in the resulting binaries. I have tried using otool:

$ otool -l MyApp.ipa/Payload/MyApp.app/Watch/MyAppWatch.app/MyAppWatch | grep bitcode

(no output)

$ otool -l MyApp.ipa/Payload/MyApp.app/Watch/MyAppWatch.app/MyAppWatch | grep __LLVM

(no output)

$ otool -l MyApp.ipa/Payload/MyApp.app/Watch/MyAppWatch.app/MyAppWatch/PlugIns/MyAppWatchExtension.appex/MyAppWatchExtension | grep bitcode

(no output)

$ otool -l MyApp.ipa/Payload/MyApp.app/Watch/MyAppWatch.app/MyAppWatch/PlugIns/MyAppWatchExtension.appex/MyAppWatchExtension | grep __LLVM

segname __LLVM
segname __LLVM

So it seems that the Watch Extension project has LLVM enabled, but nothing indicating Bitcode is enabled. The Watch project itself has no indication of either but I am not sure if that matters.

I've tried submitting a new binary using the Application Uploader and had no issues, but I am concerned I'll get a rejection during the review process and want to do what I can before getting to that point or at least be able to defend myself against a rejection.

EDIT: I have since submitted my app with watch extension, compiled with the same tools mentioned above, and gained app store approval, despite Apples warning telephone call. I have updated my toolset to Xamarin.iOS 12 and XCode 10 and ordered an Apple Watch 4. I will leave this question open a to see if the problem becomes more tangible (and the Apple warning more legitimate) with the new toolset.

jahmai
  • 65
  • 7
  • Did you update the VS or Xcode?Or you imported some third-part package? If project needs to support bitcode, it is necessary to require that all introduced third-party libraries be supported – Lucas Zhang Sep 18 '18 at 05:26
  • @LucasZ I haven't updated to XCode 10 yet, but everything else is up to date. My WatchOS Extension project doesn't depend on any native 3rd party libraries, just the managed Xamarin assemblies and a couple of small managed only portable assemblies. – jahmai Sep 18 '18 at 06:58

1 Answers1

4

See https://github.com/xamarin/xamarin-macios/issues/4810. There is a work around to get Xamarin watchOS app submitted to store. This script edited my extension Info.plist:

/usr/libexec/PlistBuddy -c 'Add :DTPlatformBuild string "15T212"' Info.plist
/usr/libexec/PlistBuddy -c 'Add :DTPlatformVersion string "4.3"' Info.plist
/usr/libexec/PlistBuddy -c 'Add :DTSDKBuild string "15T212"' Info.plist
/usr/libexec/PlistBuddy -c 'Add :DTSDKName string "watchos4.3"' Info.plist
/usr/libexec/PlistBuddy -c 'Add :DTXcode string "0940"' Info.plist
/usr/libexec/PlistBuddy -c 'Add :DTXcodeBuild string "9F1027a"' Info.plist

Currently only watchOS 4.3 is supported :-(.

t9mike
  • 1,546
  • 2
  • 19
  • 31
  • While this is really valuable to know, I'm still building with XCode 9.4.1 and don't have any issues uploading the binary, and not sure how this workaround relates to knowing whether Bitcode is enabled or not? – jahmai Sep 23 '18 at 12:27
  • 1
    I received a similar call, but it was more along the lines that the bitcode was not compatible. The impression I got was that my app would not run on new watches. My app is running on my new Series 4 for what its worth when compiled under latest Xamarin stable, Xcode 10 GM, and applying plist fix above. – t9mike Sep 23 '18 at 16:10
  • Ok that's interesting. Haven't tried my binary on the new Watch yet, will need to grab one. – jahmai Sep 23 '18 at 23:47
  • I am marking this as an answer. While it doesn't directly answer the question, it does address the issue in Xamarin which doesn't yet supported arm64_32 architecture which results in a rejection from the AppStore. This I believe is what the Apple support staff was (vaguely) referring to. – jahmai Nov 16 '18 at 03:28