Bug 39372 - mmp does not support frameworks via -native-reference
Summary: mmp does not support frameworks via -native-reference
Alias: None
Product: Xamarin.Mac
Classification: Desktop
Component: mmp ()
Version: 2.7.0
Hardware: PC Mac OS
: High normal
Target Milestone: 2.8.0 (C7)
Assignee: Chris Hamons
Depends on:
Reported: 2016-03-04 18:07 UTC by Aaron Bockover [MSFT]
Modified: 2016-06-03 11:33 UTC (History)
3 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 Aaron Bockover [MSFT] 2016-03-04 18:07:08 UTC
XS appears to support referencing native frameworks now, and even passes them to mmp via the -native-reference option, however, mmp complains that it cannot find the native library, and never translates the reference to the Clang -framework option (and no -F framework search path option either, if required).

It further does not copy the referenced framework into the app bundle (should be in bundle.app/Contents/Frameworks).

Finally, as the native framework is an explicit reference in the project, mmp should be raising _errors_. Currently the failure to make the reference is raised as a _warning_, and the build is allowed to proceed.

@chamons is aware of this and is working on a test case.
Comment 1 Chris Hamons 2016-03-04 22:25:08 UTC
Fixed in master / d4142a5ba95d44ef54bb7e1fdd060643fc124d63 and cycle7 / 747d23d28dd1b2b9efa415bb5f8dc576b5c83afa
Comment 2 Saurabh 2016-05-19 06:30:31 UTC
Hi Aaron/Chris, Could you please provide me some steps here so that I can reproduce and verify it at my end?
Comment 4 Saurabh 2016-05-20 09:05:29 UTC
I have followed below steps to reproduce this Issue:

1 - Create a new Xamarin.Mac binding project.
2 - Add a new native reference (iTunesLibrary.framework from /Library/Frameworks)
3 - Create a new XM Application in that solution
4 - Add a reference to the binding project.
5 - Build and launch

Builds Info:

Application launch successfully and I am getting iTunesLibrary.framework under bundle.app/Contents/Frameworks. this is the screencast for the same: http://www.screencast.com/t/ENzz6IuT32

=== Xamarin Studio Community ===

Version 6.0 (build 5165)
Installation UUID: 2939b8b4-8977-42bd-82d6-100275ccd9cd
	Mono 4.4.0 (mono-4.4.0-branch/0f5fdf2) (64-bit)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 404000168

=== Xamarin.Profiler ===

Version: 0.32.99
Location: /Applications/Xamarin Profiler.app/Contents/MacOS/Xamarin Profiler

=== Apple Developer Tools ===

Xcode 7.2 (9548)
Build 7C68

=== Xamarin.iOS ===

Version: (Xamarin Studio Community)
Hash: efefc1e
Branch: cycle7
Build date: 2016-05-13 17:19:05-0400

=== Xamarin Android Player ===

Version: 0.3.4
Location: /Applications/Xamarin Android Player.app

=== Xamarin.Mac ===

Version: (Xamarin Studio Community)

=== Build Information ===

Release ID: 600005165
Git revision: b44eb696fa41a04696a84d6af7fed9aa494e5580
Build date: 2016-05-19 02:59:52-04
Xamarin addins: c7761d054f38e9a210822aba6356398af0c36fa9
Build lane: monodevelop-lion-cycle7

=== Operating System ===

Mac OS X 10.10.5
Darwin Hello.local 14.5.0 Darwin Kernel Version 14.5.0
    Wed Jul 29 02:26:53 PDT 2015
    root:xnu-2782.40.9~1/RELEASE_X86_64 x86_64

Please let me know if there is anything alse I can check here.
Comment 5 Rajneesh Kumar 2016-06-03 11:33:29 UTC
I have checked this issue with the cycle 7 build: 

I observed that this issue no longer exist with this build. To verify this issue I have followed the steps and instruction provided in comment 3. After that I am successfully able to build and launch the application.

Screencast: http://www.screencast.com/t/IBr1preOp7c

This issue has been fixed , hence I am closing this issue.