Failed to resolve UserNotifications.UNNotificationRequest

I'm using the UA Xamarin iOS sdk package.  Building gives me an error:

 

Failed to resolve "UserNotifications.UNNotificationRequest" reference from "Xamarin.iOS, Version=0.0.0.0, Culture=neutral, PublicKeyToken=84e04ff9cfb79065"    <myprojectName.iOS    C:\Program Files (x86)\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets

Didn't find what you were looking for?

New post

Comments

24 comments

  • Hi Patrick,

    It sounds like your Xamarin project may not have the correct iOS SDK downloaded, is that correct?

    Can you confirm that your Xamarin project has the latest version of the iOS SDK downloaded and installed on your computer?

    Comment actions Permalink
    0
  • Thanks, is it requiring the latest version, or which version? 

    Comment actions Permalink
    0
  • Patrick,

    Yes, it would require the latest version.

    Comment actions Permalink
    0
  • Thanks.  I tried removing the package temporarily, and removed all references to Urban Airship.  The project still doesn't build with the same error.  Is there an artifact left over possibly?

    Comment actions Permalink
    0
  • Patrick,

    It sounds like your environment might not be set up correctly if you're still running into the same error.

    Are you working with Xamarin Studio, or using the Xamarin Studio Plugin?

    Comment actions Permalink
    0
  • I'm using Visual Studio Community 2015 Update 3.  I've cleared the cache on the Mac build host as well.  I'm not sure what 'environment' is required when using the Urban Airship SDK.  I added it simply by using the 'add components' feature in the iOS project in Visual Studio.  This is the way most Xamarin components are added.  All that did was add a reference .dll called 'AirshipBindings'.  I got the build error after adding this .dll.  After removing the .dll, the error remains, even after removing the dll and everything else I mentioned.  There must be some artifact either in the Xamarin cache on the local machine or the Mac build host where its still trying to reference this class.

    Comment actions Permalink
    0
  • Patrick,

    I'm mostly wanting to make sure you've run through these steps.

    Comment actions Permalink
    0
  • Thanks,  yes those steps are complete.  I'm able to create, build and run numerous other Xamarin projects just fine.

    Comment actions Permalink
    0
  • Patrick,

    And you've already clean and rebuilt your project already?

    Does a new project yield the same results?

    Comment actions Permalink
    0
  • Yes I've cleaned and rebuilt, as well as removed every reference from the iOS project.  A new project works fine

    Comment actions Permalink
    0
  • Patrick,

    Well, at least the new project works fine. Does the new project also build properly with UA in the project? Or does that continue to give you problems?

    If so, would you be able to post your full logs and/or your project? I'd like to take a closer look at it if I can. Visual Studio can be a bit picky sometimes.

    Comment actions Permalink
    0
  • Thanks, the project still builds with error when UA is added back in.  Where can I get the logs to post?

     

    Comment actions Permalink
    0
  • Patrick,

    These should just be your Visual Studio Logs

    Comment actions Permalink
    0
  • Ok thanks.  Is there a private location I can send them to?

    Comment actions Permalink
    0
  • Patrick,

    I just sent an invite to upload your files.

    Comment actions Permalink
    0
  • I'll send them. Thank you very much

    Comment actions Permalink
    0
  • Ok sent

    Comment actions Permalink
    0
  • Patrick,

    Just to confirm, which version of Xcode are you currently running on the Mac?

     

    Comment actions Permalink
    0
  • I'm running version 7.2.  Thanks

    Comment actions Permalink
    0
  • Patrick,

    That might be an issue. Could you update to Xcode 8?

    Comment actions Permalink
    0
  • Unfortunately I can't do that right in the middle of multiple projects.  I understand that what the UA lib needs, I will get to that when I can.  Right now I just want to remove the library cleanly.  Was hoping you could help locate where the leftover artifact is.  I'm not including it in the project at all, but still the project does not build.  I'm trying to avoid starting over from scratch on a new project and copying in all existing code

    Comment actions Permalink
    0
  • Patrick,

    Out of curiosity, does the project build in Xamarin Studio at all?

    I'm not able to find much in the logs that indicates anything, so I can't say with much certainty what the problem is.

     

    Comment actions Permalink
    0
  • I found out it was actually another library!  I'm eating crow at this point!  My apologies and thanks for your support!

    Comment actions Permalink
    0
  • Patrick,

    No worries! Good to hear you got it working!

    Comment actions Permalink
    0

Please sign in to leave a comment.