Tag: parse.com

使用parsingjoin两个表

我有一个数据库在parse.com 我有一个名为UserDetail类 在那个类中,我有一个数组Field,称为occupationid符( occupationid 对于这个专栏,我有另一个Occupation称为Occupation ,其中列像occupationid , occupationname 现在我想从UserDetail获取所有数据以及来自occupation类的所有数据,根据存储在UserDetail的occupationid UserDetail UserDetail 用户名 – 职业 – 详情 Jhon – [“1”,“3”,“4”] – ajfdkaldjlajsdkfjaldkf Occupation 职业 – 职业 1 – 会计师 2 – 律师 3 – 画家 4 – 作家 像智者一样。 我已经阅读了文档,关于我阅读的PFRelation但没有得到如何应用在我的情况来获取这种types的数据。 我也试过 PFQuery *getuserdetail = [PFQuery queryWithClassName:@"UserDetail"]; [getuserdetail orderByAscending:@"celebid"]; PFQuery *getoccupation = [PFQuery queryWithClassName:@"Occupation"]; [getoccupation whereKey:@"occupationid" matchesKey:@"occupationid" […]

Parse.com从相关的PFObject获取PFUser

我将[PFUser currentUser]用户ID作为[PFUser currentUser]一个关键字保存为Parse。 我想在表格视图中显示照片以及PFUser的详细信息。 但是,当我尝试获取用户 – PFUser *user = [self.photo objectForKey:@"user"]; – 然后尝试访问用户的显示名称,我得到以下exception: Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Key "profilePicture" has no data. Call fetchIfNeeded before getting its value.' 然而,调用fetchIfNeeded会使表崩溃,而AnyPic教程正是我所要做的,而不使用fetchIfNeeded。 PFUser *user = [self.photo objectForKey:@"user"];只是调用PFUser *user = [self.photo objectForKey:@"user"]; 一切正常。 我在某个地方错过了一个步骤吗? 谢谢! 这里是cellForRowAtIndexPath : – (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath object:(PFObject *)object […]

没有声音在ios 8parsing推送

这很奇怪,在更新我的应用程序以支持通过Parse(使用Parse仪表板)发送的iOS 8推送通知后,推送通知将不会发出任何声音。 我发现Stackoverflow上的这个副本,但发布的答案是不适合我: 在parsing推送通知为ios8没有声音 我已经检查了通知中心,并启用了消息和声音。 创build了一个新的应用程序的干净版本 检查是否有其他推送消息在应用程序上发出声音 使用Parse rest api并将声音设置为默认值。 没有任何我尝试过的工作。 使用parsing代码更新我的应用程序: // Register for Push Notitications, if running iOS 8 if ([application respondsToSelector:@selector(registerUserNotificationSettings:)]) { UIUserNotificationType userNotificationTypes = (UIUserNotificationTypeAlert | UIUserNotificationTypeBadge | UIUserNotificationTypeSound); UIUserNotificationSettings *settings = [UIUserNotificationSettings settingsForTypes:userNotificationTypes categories:nil]; [application registerUserNotificationSettings:settings]; [application registerForRemoteNotifications]; } else { // Register for Push Notifications before iOS 8 [application […]

parsing和watchkit扩展

我正在构build一个使用WatchKit的应用程序,并希望用PFObject中的数据填充表中的数据,但是出现此错误: 终止应用程序由于未捕获的exception“NSInvalidUnarchiveOperationException”,原因:“此解码器将只解码采用NSSecureCoding的类。 类“PFObject”不采用它。 与此帖有同样的问题

类的Parse列值始终为零

在使用查询获取对象时,只有特定的列被提取,其余的是零。 我也试过fetchIfNeededInBackgroundWithBlock但没有运气。 查询: let query = PFQuery(className:"Order") query.whereKey("buyerUser", equalTo: PFUser.currentUser()!) query.findObjectsInBackgroundWithBlock { (orders: [PFObject]?, error: NSError?) -> Void in if(error == nil){ print(orders?.first) } } 输出: Optional(<Order: 0x7ff778011940, objectId: KytyBZD9zV, localId: (null)> { buyerUser = "<PFUser: 0x7ff77353e520, objectId: xxxxx, localId: (null)>"; charged = 1; fulfilled = 0; item = "<Item: 0x7ff778011dd0, objectId: GN277W4mO0, localId: (null)>"; […]

在初始化抛出exception之前,通过调用enableLocalDatastore在Parse上启用本地数据存储

在parsing文档中,明确指出[Parse enableLocalDatastore]; 应该在[Parse setApplicationId:clientKey:];之前调用[Parse setApplicationId:clientKey:]; : https : //parse.com/docs/ios_guide#localdatastore-find/iOS 但是,就我而言,它立即抛出一个exception: *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'You have to call setApplicationId:clientKey: on Parse to configure Parse.' 如果我移动代码执行后[Parse setApplicationId:clientKey:]; 我没有得到一个错误,但本地商店似乎并没有工作。 似乎Parse自己的文档是误导性的。 任何人都有解决办法?

Parse.com与iOS应用程序和Objective-C代码

直到最近,我一直使用Parse.com进行数据pipe理我的应用程序我正在做一个新的项目,我有一些问题…. PS我正在使用Xcode 6 首先有PFImageView ,你可以证实这一点? 在这一点上没有咨询PFImageView我怎么能在我的应用程序中绘制图片? 我不明白你为什么不能在我的应用PFImageView中使用 另外,当我做一个查询,以前(使用键盘上的inputbutton)出现了查询的自动构build块,但现在我发现自己 PFQuery *query = [PFUser query]; [query findObjectsInBackgroundWithBlock: (nullable PFArrayResultBlock (nullable) block] 发生什么parse.com? 我在哪里做错了? 有人可以给我这个帮助吗?

如何在parsing中使用includeKey查询“Or”?

所以,我在Parse and Place模型中有Event模型。 每个模型都有地方。 另外我有用户,每个事件都有主人。 所以,我需要在我的位置周围10英里的地方获得我的活动或事件,以获得我使用的活动 let query = Event.query() query.whereKey("author", containedIn: [PFUser.currentUser()!]) query.includeKey("place") 它的工作,但现在我需要添加OR操作,并find我使用的10英里的事件 let placeQuery = PFQuery(className: "Place") placeQuery.whereKey("location", nearGeoPoint: PFGeoPoint(latitude: location!.coordinate.latitude, longitude: location!.coordinate.longitude), withinMiles: 20.0) 而我怎么需要主查询使用这两个? 我努力了 var resultQuery:PFQuery = PFQuery.orQueryWithSubqueries([query, placeQuery]) 但它给了我一个错误,orQueryWithSubqueries需要使用相同的类

parsingiOS – 如何查询另一个类的PFUser细节

我正在尝试为我的iOS社交应用程序编写一个Parse查询,该查询将显示跟随活动用户的所有用户。 这是我到目前为止: PFQuery *followingUser = [PFQuery queryWithClassName:@"Activity"]; [followingUser whereKey:@"Activity" equalTo:@"follow"]; [followingUser whereKey:@"fromUser" equalTo:self.user]; [followingUser includeKey:@"User"]; [followingUser setCachePolicy:kPFCachePolicyCacheThenNetwork]; 目前,这正确地给了我跟随其他用户的所有活动用户的logging,但是这不会给我相应logging的PFUser详细信息(用户configuration文件图片,显示名称等)。 任何想法如何我可以很容易地在一个查询中绘制PFUser的细节? 提前致谢

Swift无法从parse.com中检索图像

我使用的Xcode 6.4,它工作正常,但当我更新到Xcode 7似乎查询不适用于照片。 我得到的用户名表视图,但图像不显示我得到这个错误时,在模拟器iPhone 5testing: 应用传输安全已阻止明文HTTP(http://)资源加载,因为它是不安全的。 临时例外可以通过您的应用程序的Info.plist文件进行configuration。 而当我在iPhone 6上testing时,我得到这个错误: 致命错误:意外地发现零,而解包一个可选值 (LLDB) 并向我展示这条线上的红线: query.whereKey("user", equalTo: PFUser.currentUser()!.username!)