Forum Xamarin.iOS

App runs fine on device, but not on simulator - no error

JesseMockJesseMock USUniversity ✭✭

Hi, I recently cleaned up my Xamarin.Forms solution which had old components and updated it to use the NuGet packages instead. One of the libraries "urbanairship" helps with push notifications and is causing some strange issue. My code is unchanged and used to work just fine. The code UAirship.TakeOff() which invokes the feature, causes the entire app to not run in the iOS simulator. The code does not even debug, but it builds fine. Code will not even reach the entry point in main.cs. The app builds, icon is shown in the simulator as installed, then its like the app is launching, then it just closes the app and debugging ends. No errors of any kind.

If I run the app on my real device, everything works just fine.

Also if I comment out the line UAirship.TakeOff() then everything works fine in the simulator.

Is there any other way or place I can look to see what is failing? My only option now to have this run in the simulator is to comment the code.


  • andnesandnes USMember ✭✭✭

    Seeing as push notifications don't work on simulators I would guess the package is trying to access something that isn't accessible or doesn't exist on the simulator. I think you already listed your options: comment the code when testing it on a device, or just run the app in the simulator.

  • JesseMockJesseMock USUniversity ✭✭

    Guys, I resolved this by going to my packages folder and deleting everything, shutting down VS, then when I reopened VS, it re-loaded all the NuGet packages from scratch and the issue no longer exists. Something was out of whack. I would suggest when updating an older solution with references to components, one might consider just wiping out stored binaries and letting VS rebuild them from the packages.config

Sign In or Register to comment.