datalogic / xamarin-samples

Sample apps that use the Datalogic Xamarin SDK
6 stars 10 forks source link

Why are the UsesLibrary tags missing? #1

Closed Cybrosys closed 7 years ago

Cybrosys commented 7 years ago

A quick question, why don't you have the following tags in your AssemblyInfo.cs files?

[assembly: UsesLibrary(Name = "com.datalogic.extension.selfshopping")] [assembly: UsesLibrary(Name = "com.datalogic.device")]

codybrookshear commented 7 years ago

Hi Mikael.

It happens for you behind the scenes; those tags get set in AssemblyInfo.cs in the NuGet packages directly (datalogic-xamarin-sdk and datalogic-xamarin-sdk-selfshopping), so it's not necessary to do so in your application.

-Cody

Cybrosys commented 7 years ago

OK. I was worried that was the case. I'm using compiler flags depending on which hardware i'm compiling for, so I need to be able to include/exclude certain UsesLibrary statements otherwise I can't deploy.

For example:

#if DATALOGIC
[assembly: UsesLibrary(Name = "com.datalogic.extension.selfshopping")]
[assembly: UsesLibrary(Name = "com.datalogic.device")]
#elif
...
...
#endif

I'll continue using my own Bindings Libraries then 😄

codybrookshear commented 7 years ago

Hi Mikael, I have made the requested change regarding having the UsesLibrary embedded in the NuGet packages. Please update to these NuGet packages:

Datalogic Xamarin SDK 1.4.78-beta Datalogic Xamarin SDK Self-Shopping 1.1.8-beta

You will need to include a uses-library statement to either AndroidManifest.xml or AssemblyInfo.cs in your application now. See here for more details: https://datalogic.github.io/xamarin/quick-start/#Android manifest

Also, the sample projects have been updated to use the new libraries and have the necessary changes in AssemblyInfo.cs: https://github.com/datalogic/xamarin-samples

Thanks, Cody Brookshear

codybrookshear commented 5 years ago

Mikael, Is this still an issue for you? I can't find this issue in the xamarin-samples repo any longer...

Cody


From: Mikael Nensén notifications@github.com Sent: Friday, April 26, 2019 7:40 AM To: datalogic/xamarin-samples Cc: Brookshear, Cody; Assign Subject: Re: [datalogic/xamarin-samples] Why are the UsesLibrary tags missing? (#1)

Hi,

I think there was a miscommunication here.

The issue is that you have the UseLibraryAttribute tags embedded in your NuGet packages. This makes it impossible for me to use them because I have the same project for multiple different hardware vendors, but different build configurations.

When I add your NuGet packages to the project, I'm no longer able to install my app on any other hardware, because the installation tries to validate that the specified libraries exist on the non-datalogic-device.

Please remove any UseLibraryAttribute from your NuGet packages so we can manage it ourselves.

if VENDOR_X

[assembly: UsesLibrary(Name = "....")]

[assembly: UsesPermission(Name = "....")] [assembly: UsesLibrary(Name = "....")]

elif DATALOGIC

[assembly: UsesLibrary(Name = "com.datalogic.extension.selfshopping")] // Cradle [assembly: UsesLibrary(Name = "com.datalogic.device")] // Scanning

elif VENDOR_Y

....

endif

— You are receiving this because you were assigned. Reply to this email directly, view it on GitHubhttps://github.com/datalogic/xamarin-samples/issues/1#issuecomment-487081582, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ADY6P6BEPYSDNW4LKFDKDITPSMH5FANCNFSM4DENZBZA.

CONFIDENTIALITY NOTICE. This message is for the sole use of the intended recipient(s) and may contain confidential and/or privileged information. Any unauthorized review, use, disclosure, or distribution is prohibited. If you are not the intended recipient, please destroy all copies of the original message, including any and all attachments, and notify the sender immediately.

Cybrosys commented 5 years ago

@codybrookshear No, I was at fault. I thought I was looking at the source code of the NuGet package when I was looking at the source code of a Sample app; that's why I removed my previous comment.

We have successfully swapped out our old binding libraries for your NuGet packages and everything is up and running. Thank you.