Xamarin.Forms.Contacts icon indicating copy to clipboard operation
Xamarin.Forms.Contacts copied to clipboard

ContactService.Android / iOS purpose

Open agat366 opened this issue 7 years ago • 4 comments

Hi!

I am trying to enhance some logic in the plugin, but don't quite understand a purpose of ContactService.Android and iOS projects (from DependencyService) folder as long as implementation of those services (seems) located in ContactService\Shared* corresponding files.

Any hint?

agat366 avatar Aug 03 '18 16:08 agat366

@agat366 You can use Nuget Plugin verison of Contacs instead of implementing dependency service to your project.

Download nuget, you can find it from here. and just use that code below:

async void GetContacts() 
{
  var contacts = await Plugin.ContactService.CrossContactService.Current.GetContactListAsync();
  //do something here with contacts.
}

enisn avatar Aug 04 '18 06:08 enisn

Yes. I surely can do that. I am aware of Nuget, thanks. )) But what I am actually trying to do is to enhance your package, possibly with Pull Request or even Forking as your current code doesn't support extraction of images from iOS.

agat366 avatar Aug 04 '18 09:08 agat366

I too forked the repo but have no clue (yet) of how to build the full plugin, at least on VS for Mac. I can build the shared implementation successfully. But I don't know how to build the platform dependant binaries (iOS & Android), again at least from VS. Are you using MSBuild command line to build the plugin?

nbsoftware avatar Sep 04 '18 10:09 nbsoftware

My bad... I didn't see at first that there was a specific sln file (DependencyService.ContactService.sln). Now that one doesn' build either...

/work/repositories/github/Xamarin.Forms.Contacts/DependencyService.ContactService/DependencyService.ContactService/CSC: Error CS0006: Metadata file '/work/repositories/github/Xamarin.Forms.Contacts/Plugin/ContactService/bin/Debug/netstandard2.0/Plugin.ContactService.dll' could not be found (CS0006) (DependencyService.ContactService)

Looking...

nbsoftware avatar Sep 04 '18 11:09 nbsoftware