[英]Compound Queries (Specifically .or()) on iOS using the Parse API for Unity
So I have a script in Unity that uses the .Or() method of ParseQueries to get some rows from our Parse database. 因此,我在Unity中有一个脚本,该脚本使用ParseQueries的.Or()方法从我们的Parse数据库中获取一些行。 Specifically to retrieve rows that represent matches with the corresponding usernames for both players.
专门用于检索代表与两个玩家的相应用户名匹配的行。
The code in question looks like this. 有问题的代码看起来像这样。
var query1 = ParseObject.GetQuery("Game").WhereEqualTo("hostUsername", (string)ParseUser.CurrentUser["username"]).WhereEqualTo("p2username", parseUsername);
var query2 = ParseObject.GetQuery("Game").WhereEqualTo("hostUsername", parseUsername).WhereEqualTo("p2username", (string)ParseUser.CurrentUser["username"]);
//Runs both query 1 and query 2, and counts the combined results.
query1.Or(query2).CountAsync().ContinueWith(t =>
{
int count = t.Result;
if (count != 0)
{
query1.Or(query2).FirstAsync().ContinueWith(y =>
{
//Do stuff with the first result
});
}
});
This works just fine on Android devices, no problem there. 这在Android设备上正常运行,没有问题。 However, when we build our game for iOS devices, or at least iPhones, we get the following error message:
但是,当我们为iOS设备或至少iPhone开发游戏时,会出现以下错误消息:
System.Linq.Enumerable.<CreateConcatIterator>c__Iterator1<Parse.ParseQuery<Parse.ParseObject>> doesn't implement interface System.Collections.Generic.IEnumerable<Parse.ParseQuery<T>>
* Assertion: should not be reached at mini-trampolines.c:183
I did some googling and it seems like this might be a bug in either the Facebook SDK or Parse's API? 我做了一些谷歌搜索,看来这可能是Facebook SDK或Parse API中的错误? There were a handful of threads about it on the old Parse forums, but no solution that I could see.
在旧的Parse论坛上有很多关于它的话题,但是我看不到任何解决方案。
Someone made this: https://developers.facebook.com/bugs/750897958275392/ post on the developers page for Facebook and in July one of the devs there said that they are still working on it. 有人这样做: https : //developers.facebook.com/bugs/750897958275392/在Facebook开发人员页面上的帖子,7月,一位开发人员说他们仍在努力。
My question is simply, has anyone encountered the issue and discovered a solution and/or a workaround? 我的问题很简单,是否有人遇到问题并找到解决方案和/或解决方法? Pending a response from Facebook, I'm guessing I need to take another approach to this, but I'm lost as to what that might be.
在等待Facebook回应之前,我猜想我需要采取另一种方法,但是我对可能的情况迷失了。
Greatly appreciate any responses and help anyone can give. 非常感谢您的任何回应,并可以帮助任何人。
这是用于解析的Unity SDK中的错误,请订阅此错误以进行更新: https : //developers.facebook.com/bugs/750897958275392/
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.