Bug 59722 - MMP should detect dynamic registrar + MapKit Info.plist and add hard reference (and other request via info.plist frameworks)
Summary: MMP should detect dynamic registrar + MapKit Info.plist and add hard referenc...
Status: RESOLVED ANSWERED
Alias: None
Product: Xamarin.Mac
Classification: Desktop
Component: Other ()
Version: 3.8.0 (d15-4)
Hardware: PC Mac OS
: Low normal
Target Milestone: Future Cycle (TBD)
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2017-09-25 13:05 UTC by Alain
Modified: 2017-12-04 21:47 UTC (History)
4 users (show)

Tags:
Is this bug a regression?: No
Last known good build:


Attachments
Log with the problem (1.01 MB, text/rtf)
2017-09-25 14:16 UTC, Alain
Details
Log Detail (1.01 MB, text/rtf)
2017-09-25 14:50 UTC, Alain
Details
This is the log 3 detail (3.95 MB, text/rtf)
2017-09-25 15:01 UTC, Alain
Details


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:
Status:
RESOLVED ANSWERED

Description Alain 2017-09-25 13:05:53 UTC
I posted my app Xamarin.MAC at APPLE and it rejects for the following reason:

From: Apple
2. 1 Performance: App Completeness (macOS)
Guideline 2.1 - Performance


Your app contains the Maps entity, but it does not link against the MapKit framework.

Next Steps

If you would like to include Maps, please link against the MapKit framework and submit an updated binary.

I do not understand at all because Maps works perfectly in the application so the link with Maps must be correct. I added the following key to the Entilement file: com.apple.developer.maps because they asked me to do so.

Then they refused with the above error.

I want to make clear that I have posted my application already 10 times without having any problem but I had not put "com.apple.developer.maps" and now, APPLE asked me to put it

I compiled my MAC application in AOT: all with the --linkplateform option, is that what can be problem, I do not think.

I really need help because our customers are waiting for this update.

Thank you

Alain
Comment 1 Chris Hamons 2017-09-25 14:00:57 UTC
@Alain - When filing bug, posting a link to the full build log is extremely helpful in cases like this. Right now, I only have your description to go on, which is not much.

Xamarin.Mac can dynamically load frameworks under the hood, but it appears Apple is insisting upon a hard reference to MapKit.

I would check your build output to see if mmp added one, but since I don't have that I'll guess that it isn't there.

Once I get more info, I can dig farther but adding the following to mmp arguments should force the reference, even with linking/AOT.

--link_flags="-framework MapKit"
Comment 2 Alain 2017-09-25 14:16:03 UTC
Created attachment 24917 [details]
Log with the problem

here is my log without the option --link_flags
Comment 3 Chris Hamons 2017-09-25 14:35:34 UTC
Your msbuild is set on standard verbosity, which means I'm not seeing the clang invocation.

Please set Xamarin Studio -> Preferences -> Projects -> Build -> Log verbosity to at least detailed or invoke msbuild with /v:detailed

Also, as I noted on the forum (this is why splitting the conversation over multiple mediums is a bad idea) knowing what otool -L Foo.App/Contents/MacOS/Foo outputs would also be useful.
Comment 4 Alain 2017-09-25 14:50:30 UTC
Created attachment 24918 [details]
Log Detail

here is my log with the detail

I posted the app at APPLE with the compile option you gave me.
Comment 5 Chris Hamons 2017-09-25 14:53:35 UTC
I'm still not seeing the clang invocation. Please double check the verbosity settings, and swap it to diagnostic instead of detailed if necessary.

I also requested otool -L output which I do not see.
Comment 6 Alain 2017-09-25 15:01:14 UTC
Created attachment 24919 [details]
This is the log 3 detail

Log 3 Detail
Comment 7 Alain 2017-09-25 15:06:50 UTC
MacBook-Pro-de-Alain-2:AppStore macbookrogister$ otool -L Medinect.app
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/objdump: 'Medinect.app': Is a directory
MacBook-Pro-de-Alain-2:AppStore macbookrogister$ otool -L Medinect.app/Contents/MacOS/Foo
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/objdump: 'Medinect.app/Contents/MacOS/Foo': No such file or directory
MacBook-Pro-de-Alain-2:AppStore macbookrogister$
Comment 8 Chris Hamons 2017-09-25 15:09:13 UTC
No, Foo was a variable in my example.

In your case it would be

Medinect.app/Contents/MacOS/Medinect
Comment 9 Alain 2017-09-25 16:37:09 UTC
MacBook-Pro-de-Alain-2:AppStore macbookrogister$ otool -L Medinect.app/Contents/MacOS/Medinect
Medinect.app/Contents/MacOS/Medinect:
	/System/Library/Frameworks/Foundation.framework/Versions/C/Foundation (compatibility version 300.0.0, current version 1349.63.0)
	/System/Library/Frameworks/AppKit.framework/Versions/C/AppKit (compatibility version 45.0.0, current version 1504.82.104)
	/System/Library/Frameworks/CoreLocation.framework/Versions/A/CoreLocation (compatibility version 1.0.0, current version 2101.0.62)
	/System/Library/Frameworks/CoreText.framework/Versions/A/CoreText (compatibility version 1.0.0, current version 1.0.0)
	/System/Library/Frameworks/WebKit.framework/Versions/A/WebKit (compatibility version 1.0.0, current version 603.1.30)
	/System/Library/Frameworks/CoreVideo.framework/Versions/A/CoreVideo (compatibility version 1.2.0, current version 1.5.0)
	/System/Library/Frameworks/JavaScriptCore.framework/Versions/A/JavaScriptCore (compatibility version 1.0.0, current version 603.1.30)
	/System/Library/Frameworks/MapKit.framework/Versions/A/MapKit (compatibility version 1.0.0, current version 0.0.0)
	/System/Library/Frameworks/Quartz.framework/Versions/A/Quartz (compatibility version 1.0.0, current version 1.0.0)
	/System/Library/Frameworks/QuartzCore.framework/Versions/A/QuartzCore (compatibility version 1.2.0, current version 1.11.0)
	/System/Library/Frameworks/Security.framework/Versions/A/Security (compatibility version 1.0.0, current version 57740.51.2)
	/System/Library/Frameworks/SystemConfiguration.framework/Versions/A/SystemConfiguration (compatibility version 1.0.0, current version 888.51.1)
	/System/Library/Frameworks/CloudKit.framework/Versions/A/CloudKit (compatibility version 1.0.0, current version 651.14.0)
	/System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL (compatibility version 1.0.0, current version 1.0.0)
	/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 1349.64.0)
	/System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices (compatibility version 1.0.0, current version 775.19.0)
	/System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices (compatibility version 1.0.0, current version 48.0.0)
	/System/Library/Frameworks/Carbon.framework/Versions/A/Carbon (compatibility version 2.0.0, current version 157.0.0)
	/System/Library/Frameworks/OpenAL.framework/Versions/A/OpenAL (compatibility version 1.0.0, current version 1.0.0)
	/usr/lib/libiconv.2.dylib (compatibility version 7.0.0, current version 7.0.0)
	/System/Library/Frameworks/PCSC.framework/Versions/A/PCSC (compatibility version 1.0.0, current version 1.0.0)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1238.50.2)
	/usr/lib/libobjc.A.dylib (compatibility version 1.0.0, current version 228.0.0)
MacBook-Pro-de-Alain-2:AppStore macbookrogister$
Comment 10 Alain 2017-09-25 16:40:06 UTC
Chris,

the log and execution of iTool was done with the parameter:

--link_flags="-framework MapKit"

and when I look, I now see MapKit so I hope it will go to APPLE.

Alain
Comment 11 Vincent Dondain [MSFT] 2017-11-02 21:29:28 UTC
Hi Alain,

MapKit seems to now be included, have you tried submitting your app to Apple again?

I'm going to confirm this bug as mmp should be smart enough and add a hard reference to MapKit.
Comment 12 Chris Hamons 2017-11-02 21:32:10 UTC
For future us - In the case of dynamic registrar (irrespective of linking) with an info.plist that contains MapKit (and possibly other frameworks you have to ask to use), we should recognize them and force a hard reference to clang, instead of the default.
Comment 13 Alain 2017-12-02 17:04:30 UTC
Chris,

I published a new application at APPLE and refused again for the same reason.

I do have these compilation parameters:

- [ ] --aot:all --linkplatform --link_flags="-framework MapKit" --link_flags="-force_load libsqlcipher.a -framework MapKit -framework Security -force_load eID-SDK -framework PCSC"

I ran the iTool command and I can see the framework:

I republished the application by indicating the result of the iTool.

Since this problem, I posted the application 3 times without problem. The only difference is that I'm with Xamarin.Mac 4.0 now, before I was with 3.8

Another thing, the problem of DSYM is still not resolved, I still have to manually delete them in the app.

Alain



MacBook-Pro-de-Alain-2:AppStore macbookrogister$ otool -L Medinect.app/Contents/MacOS/Medinect
Medinect.app/Contents/MacOS/Medinect:
	/System/Library/Frameworks/Foundation.framework/Versions/C/Foundation (compatibility version 300.0.0, current version 1443.14.0)
	/System/Library/Frameworks/MapKit.framework/Versions/A/MapKit (compatibility version 1.0.0, current version 0.0.0)
	/System/Library/Frameworks/CoreLocation.framework/Versions/A/CoreLocation (compatibility version 1.0.0, current version 2236.0.11)
	/System/Library/Frameworks/CoreText.framework/Versions/A/CoreText (compatibility version 1.0.0, current version 1.0.0)
	/System/Library/Frameworks/AppKit.framework/Versions/C/AppKit (compatibility version 45.0.0, current version 1561.10.101)
	/System/Library/Frameworks/WebKit.framework/Versions/A/WebKit (compatibility version 1.0.0, current version 604.3.5)
	/System/Library/Frameworks/JavaScriptCore.framework/Versions/A/JavaScriptCore (compatibility version 1.0.0, current version 604.3.5)
	/System/Library/Frameworks/CoreVideo.framework/Versions/A/CoreVideo (compatibility version 1.2.0, current version 1.5.0)
	/System/Library/Frameworks/CloudKit.framework/Versions/A/CloudKit (compatibility version 1.0.0, current version 720.0.0)
	/System/Library/Frameworks/QuartzCore.framework/Versions/A/QuartzCore (compatibility version 1.2.0, current version 1.11.0)
	/System/Library/Frameworks/Security.framework/Versions/A/Security (compatibility version 1.0.0, current version 58286.20.16)
	/System/Library/Frameworks/SystemConfiguration.framework/Versions/A/SystemConfiguration (compatibility version 1.0.0, current version 963.0.0)
	/System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL (compatibility version 1.0.0, current version 1.0.0)
	/System/Library/Frameworks/Quartz.framework/Versions/A/Quartz (compatibility version 1.0.0, current version 1.0.0)
	/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 1445.12.0)
	/System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices (compatibility version 1.0.0, current version 822.9.0)
	/System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices (compatibility version 1.0.0, current version 50.0.0)
	/System/Library/Frameworks/Carbon.framework/Versions/A/Carbon (compatibility version 2.0.0, current version 158.0.0)
	/System/Library/Frameworks/OpenAL.framework/Versions/A/OpenAL (compatibility version 1.0.0, current version 1.0.0)
	/usr/lib/libiconv.2.dylib (compatibility version 7.0.0, current version 7.0.0)
	/System/Library/Frameworks/PCSC.framework/Versions/A/PCSC (compatibility version 1.0.0, current version 1.0.0)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1252.0.0)
	/usr/lib/libobjc.A.dylib (compatibility version 1.0.0, current version 228.0.0)
Comment 14 Alain 2017-12-03 14:29:42 UTC
Chris,

I republished a second time my application this Saturday and refused by APPLE this Sunday.

Can you give me a solution as soon as possible because our customers are waiting for this version?

thank you very much

Alain

Your app contains the Maps entitlement, but it does not link against the MapKit framework.

Next Steps

If you do not intend to use Maps, please remove the Maps entitlement. 

If you would like to include Maps, please link against the MapKit framework and submit an updated binary.
Comment 15 Alain 2017-12-04 09:00:20 UTC
Chris,

I posted the application a third time by removing Maps from Entitlement.list because Maps is hardcoded in Xamarin but unfortunately refused by APPLE invoking that I use Maps without having Maps in the entitlement file.

No chance...

Please, give me a solution today

Alain
Comment 16 Alain 2017-12-04 14:31:57 UTC
Sorry but do you have a solution for me ?
Comment 17 Chris Hamons 2017-12-04 15:28:57 UTC
@Alain - Do not move the status of a bug to IN_PROGRESS to get someone to look at it.

 Alain <alain.rogister@appl.be> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |IN_PROGRESS


This is unacceptable.

> Please, give me a solution today

Bugzilla is not a private support line, please do not abuse it as one.
Comment 18 Alain 2017-12-04 15:37:38 UTC
Ok, sorry, I did not know.

I doubt that this is not a private support but understand that it is very fussing to still have this problem in Xamarin now and my customers are waiting for the update of the application

Alain
Comment 19 Dominic N [MSFT] 2017-12-04 21:32:43 UTC
Hey Alain - engineering isn't always going to be able to respond right away on Bugzilla items. For quick responses with engineers dedicated to one-on-one support, I'd suggest checking out the "Create an incident" link here: https://www.xamarin.com/support

We'll be closing this issue to assist in clean tracking moving forward.
Comment 20 Chris Hamons 2017-12-04 21:47:37 UTC
https://bugzilla.xamarin.com/show_bug.cgi?id=60974 has the actionable non-support items.