parse-platform
How to save batch of data in Parse Cloud Code?
Basically in cloud architecture, request time out time is around 60 sec, but you try to insert over thousands records in one transaction , it takes more than 60 seconds, that’s why your request always fail. There’s better ways to insert bigger amount of records, Task Queues Cron or scheduled task I think task queue … Read more
Swift convert time to time ago
I’ll just update the Truongky’s answer for Swif 3: extension Date { func getElapsedInterval() -> String { let interval = Calendar.current.dateComponents([.year, .month, .day], from: self, to: Date()) if let year = interval.year, year > 0 { return year == 1 ? “\(year)” + ” ” + “year ago” : “\(year)” + ” ” + “years … Read more
Parse Cloud Code relational query syntax
This stretch: // Also only fetch if never been sent before // HERE SHOULD USE THE BELOW RELATIONSHIP var innerQuery = new Parse.Query(Parse.User); innerQuery.exists(Parse.User); query.matchesQuery(“sentTo”, innerQuery); Could be changed to: // Also only fetch if never been sent before query.notContainedIn(“sentTo”,[Parse.User.current()]) That works.Parse Query
Swift: save video from NSURL to user camera roll
AssetsLibrary is deprecated 1: import Photos import Photos 2: Use this code to save video from url to camera library. PHPhotoLibrary.sharedPhotoLibrary().performChanges({ PHAssetChangeRequest.creationRequestForAssetFromVideoAtFileURL(nsUrlToYourVideo) }) { saved, error in if saved { let alertController = UIAlertController(title: “Your video was successfully saved”, message: nil, preferredStyle: .Alert) let defaultAction = UIAlertAction(title: “OK”, style: .Default, handler: nil) alertController.addAction(defaultAction) self.presentViewController(alertController, animated: … Read more
ProGuard Cannot Find Referenced Libraries
Made a few changes to proguard-project.txt file (if you have more than one module in your project – put it in the module which calls the *.jar file you are getting warned about): -keepattributes SourceFile,LineNumberTable -keep class com.parse.*{ *; } -dontwarn com.parse.** -dontwarn com.squareup.picasso.** -keepclasseswithmembernames class * { native <methods>; } The -dontwarn lines were … Read more
Parse error codes 209 and -34018
Take a look at this issue with parse on iOS: https://github.com/ParsePlatform/Parse-SDK-iOS-OSX/issues/437. I believe this was an issue in iOS and is now fixed