Bug 59512 - Watch extensions aren't stripped
Summary: Watch extensions aren't stripped
Status: RESOLVED DUPLICATE of bug 56345
Alias: None
Product: iOS
Classification: Xamarin
Component: MSBuild ()
Version: master
Hardware: PC Mac OS
: --- major
Target Milestone: 15.6
Assignee: Bugzilla
Depends on:
Reported: 2017-09-15 11:43 UTC by Rolf Bjarne Kvinge [MSFT]
Modified: 2017-10-13 17:35 UTC (History)
2 users (show)

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

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description Rolf Bjarne Kvinge [MSFT] 2017-09-15 11:43:06 UTC

1. build

* cd msbuild/tests/MyWatch2Container (in xamarin-macios)
* msbuild /verbosity:diag /p:Platform=iPhone /p:Configuration=Release (https://gist.github.com/rolfbjarne/b9842148818648d4e21da762e0235f02)

2. check that a lot of symbols are still present in the extension

* nm bin/iPhone/Release/MyWatch2Container.app/Watch/MyWatchApp2.app/PlugIns/MyWatchKit2Extension.appex/MyWatchKit2Extension | wc
   25049   74903 1212380

3. strip the extension

*  strip -s ../MyWatchKit2Extension/obj/iPhone/Release/mtouch-symbols.list  bin/iPhone/Release/MyWatch2Container.app/Watch/MyWatchApp2.app/PlugIns/MyWatchKit2Extension.appex/MyWatchKit2Extension

4. the number of symbols is significantly smaller now

* nm bin/iPhone/Release/MyWatch2Container.app/Watch/MyWatchApp2.app/PlugIns/MyWatchKit2Extension.appex/MyWatchKit2Extension | wc
     302     605    7847
Comment 1 Jeffrey Stedfast 2017-10-13 17:35:16 UTC
The problem is the following evaluation for _GenerateAppExtensionDebugSymbols:

Target "_GenerateAppExtensionDebugSymbols" skipped, due to false condition; ('$(ComputedPlatform)' == 'iPhone' And '$(IsAppExtension)' == 'false' And '$(IsWatchApp)' == 'false') was evaluated as ('iPhone' == 'iPhone' And 'False' == 'false' And 'True' == 'false').

Current git master of Xamarin.iOS.Common.targets no longer checks $(IsWatchApp) == 'false' as of https://github.com/xamarin/xamarin-macios/pull/2215

*** This bug has been marked as a duplicate of bug 56345 ***