Tag: parse.com

从Parse.com播放audio

我正试图播放一个audio文件,我保存在parsing。 我从保存的对象中获取来自PFFile的url。 当我运行的应用程序avplayer不产生任何audio。 我testing了avplayer是否正在玩下面的第一个代码片段,并打印出“播放”,这意味着播放器正在播放,但没有audio。 我也尝试设置avplayer的音量,并没有帮助。 不明白为什么不玩,如果有人想帮我。 audio文件url: http : //files.parsetfss.com/292b6f11-5fee-4be7-b317-16fd494dfa3d/tfss-ccc3a843-967b-4773-b92e-1cf2e8f3c1c6-testfile.wav 这个代码停止avplayer,如果它正在播放: if (player.rate > 0) && (player.error == nil) { // player is playing println("Playing") } else { println("Not Playing") } AVPlayer代码: let objectAudio: PFObject = object as PFObject let parseAudio: PFFile = objectAudio.valueForKey("audioFileParse") as PFFile let audioPath: String = parseAudio.url let urlParse: NSURL = […]

没有使用Parse Push和Xamarin IOS注册的设备

我正尝试使用Parse Push和Xamarin IOS设置推送通知。 我遵循这些指南: https://www.parse.com/docs/dotnet/guide#push-notifications-push-on-xamarin-ios https://www.parse.com/apps/quickstart#parse_push/ios/xamarin/existing https: //developer.xamarin.com/guides/cross-platform/application_fundamentals/notifications/ios/remote_notifications_in_ios/ https://groups.google.com/forum/#!topic/parse-developers/65WAfRIiEnA 从我的理解,我修改了我的AppDelegate, 我把这个添加到构造函数中: ParseClient.Initialize("MY APP ID", "MY DOT NET KEY"); 用适当的钥匙。 我将其添加到FinishedLaunching方法 if (Convert.ToInt16(UIDevice.CurrentDevice.SystemVersion.Split('.')[0].ToString()) < 8) { UIRemoteNotificationType notificationTypes = UIRemoteNotificationType.Alert | UIRemoteNotificationType.Badge | UIRemoteNotificationType.Sound; UIApplication.SharedApplication.RegisterForRemoteNotificationTypes(notificationTypes); } else { UIUserNotificationType notificationTypes = UIUserNotificationType.Alert | UIUserNotificationType.Badge | UIUserNotificationType.Sound; var settings = UIUserNotificationSettings.GetSettingsForTypes(notificationTypes, new NSSet(new string[] { })); UIApplication.SharedApplication.RegisterUserNotificationSettings(settings); […]

parsing目标C库在上崩溃

我正在运行Parse.com版本1.4.2中的最新iOS Objective C SDK。我正在使用下面的追溯方式在全新安装中频繁地崩溃。 它发生在模拟器,我的debugging设备和我的应用程序的发布/生产版本。 Thread 2 Crashed: 1 libobjc.A.dylib objc_msgSend + 6 2 Foundation -[NSString getExternalRepresentation:extendedAttributes:forWritingToURLOrPath:usingEncoding:error:] + 312 3 Foundation writeStringToURLOrPath + 44 4 Foundation -[NSString writeToFile:atomically:encoding:error:] + 22 5 Aftermath +[PFInternalUtils installationId] (PFInternalUtils.m:308) 6 Aftermath +[PFNetworkCommandRunner createRequest:] (PFNetworkCommandRunner.m:62) 7 Aftermath +[PFNetworkCommandRunner runCommandAsync:inOperation:] (PFNetworkCommandRunner.m:133) 8 Aftermath +[PFRetryingCommandRunner runCommandAsync:inOperation:attemptsMade:delay:] (PFRetryingCommandRunner.m:42) 9 Aftermath +[PFRetryingCommandRunner runCommandAsync:inOperation:] (PFRetryingCommandRunner.m:35) […]

Parse.com通过超出突发限制的拒绝服务

我已经使用Parse为使用从Parse.com网站下载的iOS SDK创buildiOS应用程序。 为了创build这种应用程序,ApplicationID和ClientID密钥都embedded在iOS应用程序中,并在应用程序使用时从应用程序发送到服务器。 这基本上把ApplicationID和ClientID置于明显的位置,这样任何用户都可以编写一个小程序,它会反复调用我的应用程序的各种Parse apis。 我在分析教程中遵循了所有的安全build议,所有的数据都有适当的angular色和ACL。 但是,一个单纯的用户可以简单地通过调用我的parsing应用程序的loginAPI每秒超过30次来降低我的整个应用程序。 我是否错过了一些东西,或者这是从iOS应用程序使用Parse.com作为后端的致命缺陷? 有没有人有解决这个问题?

如何使这个Parse.com云代码调用?

注意: 这里有一些来自CA的parsing: https://www.parse.com/questions/ios-when-will-swift-for-parse-be-ready (注意这个问题是多么受欢迎 – 热门话题)。 希望它可以帮助别人 这是一个iOS7parsing云代码调用… SWIFT如何做到这一点? 干杯 要清楚… 你可以在SWIFT中使用“callFunctionInBackground” ,还是只需要调用一个objc类? -(void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath { int thisRow = indexPath.row; PFUser *delFriend = [self.theFriends objectAtIndex:thisRow]; NSLog(@"you wish to delete .. %@", [delFriend fullName] ); // note, this cloud call is happily is set and forget // there's no return either way. life's […]

parsingiOS SDK:从Xcode调用云端函数

脚本 我有这两个我想在我的应用程序中使用的云function。 他们检查用户的在线状态,我想为每个用户设置一个布尔键“isOnline”,如果用户在线,则为YES;如果不是,则为“否”。 var moment = require("moment"); Parse.Cloud.define("registerActivity", function(request, response) { var user = request.user; user.set("lastActive", new Date()); user.save().then(function (user) { response.success(); }, function (error) { console.log(error); response.error(error); }); }); Parse.Cloud.define("getOnlineUsers", function(request, response) { var userQuery = new Parse.Query(Parse.User); var activeSince = moment().subtract("minutes", 2).toDate(); userQuery.greaterThan("lastActive", activeSince); userQuery.find().then(function (users) { response.success(users); }, function (error) { response.error(error); […]

在iOS 8 Today Extension中获取parse.com用户数据时出现exception

我正在尝试获取PFUser的PFObjects列表,以显示在iOS 8 Today窗口小部件中。 在Parse的这篇博客文章之后,我已经在Xcode的主应用程序和扩展中启用了相同的App Groups和Keychain Sharing。 我也启用了我的主要应用程序的AppDelegate和我今天的扩展viewDidLoad以下: [Parse enableLocalDatastore]; [Parse enableDataSharingWithApplicationGroupIdentifier:@"group.com.me.myapp" containingApplication:@"com.me.myapp"]; [Parse setApplicationId:@"myAppId" clientKey:@"myClientId"]; 在widgetPerformUpdateWithCompletionHandler ,我构build并执行了我的查询: – (void) widgetPerformUpdateWithCompletionHandler:(void (^)(NCUpdateResult))completionHandler { PFQuery *query = [PFQuery queryWithClassName:@"Note"]; [query whereKey:@"User" equalTo:[PFUser currentUser]]; [query findObjectsInBackgroundWithBlock:^(NSArray *objects, NSError *error) { if (!error) { // check for difference between current and new data if([self hasNewData:objects]) { // fresh data […]

在Parse iOS中链接用户ID和安装ID

在我的Parse仪表板的Data Browser窗格中,我看到了Installation and User类。 但是,对于特定设备上的特定用户,objectIds不匹配。 现在,用户订阅的频道只能在安装类中看到。 有没有办法将用户标识(从用户类)链接到安装标识,以便可以知道用户订阅了哪些渠道? 任何链接到教程或解决scheme,将不胜感激。

快速parsinggeopoint swift获取当前位置

试图使用parsingPFGeoPoint.geoPointForCurrentLocationInBackground获取当前位置,当我发送一些东西到我的后端。 代码看起来像 NSLog("Before block") PFGeoPoint.geoPointForCurrentLocationInBackground { (geoPoint: PFGeoPoint!, error: NSError!) -> Void in NSLog("inside block") if !error { // do something with the new geoPoint } } 我从来没有在控制台上得到我的内部块。 我安装了核心位置框架,它允许我做类似的事情 let point = PFGeoPoint(latitude:40.0, longitude:-30.0) 如果这样做有帮助,我不需要上面的电话时请求用户位置。

parse.com deviceToken和PFInstallation未保存

我遇到了我的iOS应用程序PFInstallation的一个奇怪的行为。 在每次启动应用程序时,我正在注册设备以接收推送通知,并在方法didRegisterForRemoteNotificationsWithDeviceToken上调用以下代码: PFInstallation *currentInstallation = [PFInstallation currentInstallation]; [currentInstallation setDeviceTokenFromData:deviceToken]; NSLog(@"%@", currentInstallation ); [currentInstallation saveInBackgroundWithBlock:^(BOOL succeeded, NSError *error) { if (succeeded) { NSLog(@"currentInstallation saved" ); } if (error) { NSLog(@"currentInstallation NOT saved" ); } }]; 当我在我的iphone上安装应用程序时,安装将通过其deviceToken正确保存。 我绝对相信,前几天我手动删除deviceToken通过parsing仪表板(尝试的东西),然后在应用程序重新启动设备令牌再次正确保存。 我正在使用的某些频道也是如此。 今天deviceToken没有被保存,也没有通道。 saveInBackgroundWithBlock成功,但deviceToken字段为空。 currentInstallation的NSLog包含deviceToken,但不保存。 在试图理解这种行为的原因时,我发现如果我添加行currentInstallation.deviceToken = @""; 仅在PFInstallation *currentInstallation = [PFInstallation currentInstallation]; 那么deviceToken会被正确保存。 使用Parse大师向我解释为什么会发生这种情况,为什么前几天它不是? 我最近升级了这个应用程序的分析框架,可以这样做的原因?