Contacts plugin not always showing contacts

I have the contacts plugin in my app and on one test device (iPhone 5, iOS 9.02) the contact list does not show. And when I do a search, nothing appears. I get no error messages. On some of my other devices like some Android or iOS 8.x devices it does work. This particular problem device has 1200 contacts. Anyone have some suggestions on how to fix? I’ll paste the relevant part of my code. Although maybe it is more of a configuration issue?

			$scope.getAllContacts = function(searchQuery) {
			 try{
				var opts = {                                           //search options
				  filter : searchQuery,                                          // 'Bob'
				  multiple: true,                                      // Yes, return any contact that matches criteria
				  fields:  [ 'displayName', 'name' ]
				};
				if(ionic.Platform.isAndroid()){
					opts.hasPhoneNumber = true;         //hasPhoneNumber only works for android.
				};
				
				$ionicLoading.show();

				$cordovaContacts.find(opts).then(function (contactsFound) {
				  $scope.contacts = contactsFound;
				  $ionicLoading.hide();
				});


			 }catch(err){
				 alert(err.message);
			 }
		};

		$scope.getAllContacts("Ja"); //All test devices have contacts containing "Ja"

wrap your call of native api like $cordovaContacts.find() in $ionicPlatform.ready() to ensure that device and cordova is ready.
http://ionicframework.com/docs/api/service/$ionicPlatform/

2 Likes