Everything is working perfectly inside unity editor, but when I build for iOS and test on device I get this error everytime I try to login to facebook:

Terminating app due to uncaught exception ‘NSInternalInconsistencyException’, reason: ‘can’t start iterating in the middle of an iteration’

Here’s the code I’m using inside Unity:

using UnityEngine;
using System.Collections;
using System.Collections.Generic;
using UnityEngine.UI;
using Facebook.Unity;

public class NewFbLogin : MonoBehaviour 
{
	public Button fbLoginBtn;

	public void FbLogin()
	{
		var perms = new List<string>(){"public_profile", "email", "user_friends"};
		FB.LogInWithReadPermissions(perms, AuthCallback);
	}

	private void AuthCallback (ILoginResult result) 
	{
		if (FB.IsLoggedIn) 
		{
			// AccessToken class will have session details
			var aToken = Facebook.Unity.AccessToken.CurrentAccessToken;
			// Print current access token's User ID
			Debug.Log(aToken.UserId);
			// Print current access token's granted permissions
			foreach (string perm in aToken.Permissions) 
			{
				Debug.Log(perm);
			}

			fbLoginBtn.gameObject.SetActive(false);
		} else {
			Debug.Log("User cancelled login");
		}
	}
}

Am I missing something?

Thanks for your help!

This is what i have figured.

My app crashes when pressing my login button, i don’t see any Facebook pages it just closes immediately. Not running iAds just unity ads