使用Unity,编辑器模式没有问题,iOS上报错误
System.Collections.Generic.ICollection`1.CopyTo
错误位置:
string[] receipts = PlayerPrefsEx.GetStringArray("unfinished_iap_receipt");
List<string> unFinIAPReceipts = new List<string>(receipts);
出错原因:
Most of Linq extension methods from Linq for Collections are not working with IEnumerables on iOS since they require AOT runtime compiler which is not supported.
However there is a Linq for iOS library on Asset Store that is similar to Linq but doesn't require a runtime compiler. So you can use it on iOS and ToArray() method will work with this library.