Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I am new to aws sdk, i have a bunch of S3GetObjectRequest requests added to a operation queue to get the files from s3. I have a situation where i need to check the file downloaded properly or not, if it is not downloaded i have to try it for at least three times to make sure that the file got download. For this firstly i need to identify the request when the complete/fail delegates are called. Does anyone have idea on adding user info to the S3GetObjectRequest request where we can check the file name and number of time the request is created. TIA.
All requests in the AWS SDK for iOS support a requesttag property. Setting this property will allow you to differentiate the requests:
getObjectRequest.requestTag = #"your-unique-tag";
getObjectRequest.delegate = YOUR_DELEGATE
[self.s3 getObject:getObjectRequest];
Then in your delegate methods:
-(void)request:(AmazonServiceRequest *)request didFailWithError:(NSError *)error
{
NSLog(#"didFailWithError called: %#", error);
if [request.requestTag isEqualToString:#"your-unique-tag"] {
// decide to retry or not
}
}
Related
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
I was wondering if you guys could show me how to setup Reset Password in Swift, I am currently using Firebase as my backend service. I just need the code.
The answer is in the API documentation:
-sendPasswordResetWithEmail:completion:
Initiates a password reset for the given email address.
See FIRAuthErrors for a list of error codes that are common to all API methods.
In Swift 3.x and Firebase 3.x it will look like this:
FIRAuth.auth()?.sendPasswordReset(withEmail: "email#email") { error in
// Your code here
}
Edit:
Firebase 4 changed the Firebase functions to be more aligned with the naming conventions in Swift.
Auth.auth().sendPasswordReset(withEmail: "email#email") { error in
// Your code here
}
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I'm creating a social media app.
I want to know a way to cache a users profile picture once downloaded from the Parse network and then each time the app is loaded check if an updated picture has been found and load that one, then cache that one.
I have no idea how to approach this, does anyone have any ideas?
There are plenty of third-party libraries for caching you can find on Github, or you can simply use NSUserDefaults or CoreData to save the pictures(or really anything) to disk. To check if a picture was modified, you can give the picture an identifier, compare it with the response from the server, and re-save the picture, or do whatever is needed.
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
someone know idea regarding to fetching sound data from webservice? I used simple play, pause, stop sound to access application resources folder. Now i want to update this. plz, having some idea. thanks in advance.
This is for downloading audio file from server
NSData *soundData = [NSData dataWithContentsOfURL:[NSURL URLWithString:#"SoundURL"]];
after downloading
AVAudioPlayer has a method for playing sound from NSData object .
You can use
- (id)initWithData:(NSData *)data error:(NSError **)outError method of AVAudioPlayer
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
Please help me,
I integrated DropBox SDK and getting failed downloading some time.
at that time this method called.
- (void)restClient:(DBRestClient*)client loadedFile:(NSString*)destPath contentType:(NSString*)contentType metadata:(DBMetadata*)metadata
Thanks in Advance.
May be help you.
Check you internet connection and try to use call this method in main thread if you are not calling in background.
dispatch_async(dispatch_get_main_queue(), ^{
[[self restClient] loadFile:path intoPath:destinationPath];
});
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
I need to display a homepage in my iPad application. I have been reading the URL Loading information on the Apple Developer site and am confused. In the sample code for SimpleURLConnections, they have a Python server.
A colleague mentioned that it should be just a couple lines of code, so clearly I am missing something. There must be an easier way to do this, but I'm at a loss as to what that is.
It should be easy loading an external browser with cocoa touch. You could use UIWebview with your own browser, but it's easier this way.
This is from my own app:
- (IBAction)doSupportURL {
[[UIApplication sharedApplication] openURL:[NSURL URLWithString: #"http://webpages.charter.net/apollosoftware/support/"]];
}
with UIWebView see loadRequest