logo
down
shadow

How to obtain data directly from PFFile without warning


How to obtain data directly from PFFile without warning

By : user2948679
Date : November 15 2020, 06:54 AM
Hope this helps You are getting the warning because the data is not available locally and getData is a synchronous call to fetch the data from the server. When getData is called, it blocks the main thread - the UI - and stops all app interaction until the data downloads, which is why you are getting the error. Generally, blocking the UI to do a background operation, such as downloading, is very much frowned upon.
I would use the isDataAvailable property of PFFile to check if the data is available locally. If it isn't, use getDataInBackgroundWithBlock: to fetch the data in the background. You can use the completion method supplied by that call to update your imageView.
code :


Share : facebook icon twitter icon
Get two Data in one PFFile

Get two Data in one PFFile


By : user2431070
Date : March 29 2020, 07:55 AM
I think the issue was by ths following , You can't (easily) put two files into one PFFFile. PFFFile is meant to represent one file.
Make two instances of PFFile, one for the image and one for the sound file.
code :
PFFile *imageFile = [PFFile fileWithName:imageFileName data:imageFileData];
PFFile *soundFile = [PFFile fileWithName:soundFileName data:soundFileData];
[message setObject:imageFile forKey:@"imageFile"];
[message setObject:soundFile forKey:@"soundFile];
PFFile crash when getting data from cache

PFFile crash when getting data from cache


By : Alex
Date : March 29 2020, 07:55 AM
it should still fix some issue The problem was that I was creating a new PFFile, assigning it so some object's column locally and not saving it back to Parse. When a new file was created it's url property is nil, which should be fine, since it's not yet online. After that I was fetching the parent object whos child was that file - this was eventually messing things up because then I close the app and next time opening I was trying to fetch the data of that PFFile with url property equal to nil. That results in this exception above. A workaround suggested by a guy from Parse:
code :
PFFile *file = object[fileKey];
if ((file != nil) && [file isKindOfClass:[PFFile class]] && (file.url == nil)) {
    [object revertObjectForKey:fileKey];
}
Why should I use LayoutInflater to obtain a view if I can directly obtain it using findViewById()

Why should I use LayoutInflater to obtain a view if I can directly obtain it using findViewById()


By : goesang
Date : March 29 2020, 07:55 AM
it should still fix some issue Its not the same thing.
Inflate takes a Layout xml file and makes a View out of it.
how can I add UIImages to my PFFile array so that if query for a PFFIle images fails, it can be replaced by appending an

how can I add UIImages to my PFFile array so that if query for a PFFIle images fails, it can be replaced by appending an


By : Dmitriy Kupchinskiy
Date : March 29 2020, 07:55 AM
wish of those help Your app is crashing because you have more table view cells than pictures in picturesArray
Just check if indexPath.row < picturesArray.count before using picturesArray[x]
code :
if indexPath.row < picturesArray.count {
    self.picturesArray[indexPath.row].getDataInBackgroundWithBlock { (imageData: NSData?, error:NSError?) -> Void in

        if error == nil {
            let image = UIImage(data: imageData!)
            cell.senderProfileImage?.image = image
        }

    }
} else {
    cell.senderProfileImage?.image = UIImage(named: "logo")
}
let imageData:NSData = UIImagePNGRepresentation(UIImage(named: "imagename")!)!
self.picturesArray.append(PFFile(data: imageData))
self.picturesArray.append(UIImage(named: "logo"))
Caching PFFile data from Parse

Caching PFFile data from Parse


By : Nima Zomorrodi
Date : March 29 2020, 07:55 AM
Hope this helps PFFile will automatically cache the file for you, if the previous PFQuery uses caching policy such as:
Related Posts Related Posts :
  • No address associated with hostname using vagrant
  • 2 way data-binding between a polymer component and a model?
  • How can I rename an already published app in the Windows Dev Center?
  • Using Chef 12 , Chef Client unable to connect to chef Server
  • GCM notification not working (GoogleCloudMessaging)
  • Measured GFLOPS is greater then theoretical GFLOPS
  • Progress ABL - strip and add to temp table
  • Errors occuring when make-ing Aircrack-ng on raspberry pi
  • Detecting Handedness from Device Use
  • Query a manual list of data items
  • Similar to pivot - Windows 8.1 Desktop app
  • CKEDITOR And Styles configuration with only toolbar
  • Segmentation fault due to data alignment issue on MIC
  • how to connect a Java app ( java code ) to cloudant?
  • How to download a file/folder from remote (openshift) to local system
  • Where can i find customeditors in JBPM 6
  • Pig get distinct rows with counts
  • In Flex when is yylineno updated?
  • How does a semantic reasoner for protegé is made?
  • how to stop another rows to be select after select a row in uitableview
  • Setup cmd.exe parameter when starting ConEmu
  • WPF how to get the same visual size in different devices
  • How to convert tiff to searchable pdf using alfresco and tesseact?
  • Intel Media SDK: Regarding mfxIMPL Usage
  • How to pass values to SOAP service using web service consumer?
  • Post image base64 from iOS to twitter using request.js
  • I have installed chef server, client version 12.0.1 and 12.0.3 respectively but unable to authenticate to chef server
  • Minifying and publishing CSS and JavaScript using Visual Studio 2013 and LESS
  • Can't deploy kitchensink example
  • Facing issue in mule testing
  • db2 explain result about lock size
  • Make Firebug NOT autocomplete
  • Blank Space at bottom of Polymer Paper Dialog
  • How do you initialize application state at startup and access it from controllers in MVC 6?
  • can you help when to use field and when to use parameter and variable in jasper?
  • What are Talend change data capture's pluses and deltas in a production EAI+big data integration scenario?
  • Tree traversal in Rust vs Borrow Checker
  • how sensiya SDK distinct motion sitting and driving?
  • Test Dropbox webhooks implementation with self-signed certificate?
  • Custom axis labels for Core Plot
  • Using CLLocationManager in SpringBoard, but got the error with:depending on legacy on-demand authorization, which is not
  • retrieving selected documents in couchdb
  • How to unroll client side bundle
  • Why JPanel doesn't have all the lines in my app?
  • make ctrl+enter add semicolon to the end of the line
  • How to test low-bit ambient and burn-in protection when making watch faces?
  • What is causing this error in changing the default music font in a Lilypond document?
  • Using environment variables in POST payload
  • Use a custom helper in Middleman Frontmatter
  • LinkedIn r_basicprofile and r_fullprofile scope fields and why are both "redundant"?
  • Disconnecting 2 vertical "lines" with glDrawArrays GL_TRIANGLE_STRIP
  • Slow apigee query when using geolocation with wildcard search
  • Allocator replacement check
  • Javafx 8 how to make mouse cursor invisible?
  • Can you use OpenID Connect without obtaining OAuth credentials?
  • Appium send_keys overwritting previous text
  • Where do I find my google places 'place_id'?
  • Parse.com Stripe: Creating a charge that is not captured
  • Custom Vibe sequence in Pebble.js?
  • reuse property in my own owl ontology but change domain/range
  • shadow
    Privacy Policy - Terms - Contact Us © ourworld-yourmove.org