Skip to content
This repository has been archived by the owner on Jan 16, 2021. It is now read-only.

Commit

Permalink
Merge pull request #146 from ParsePlatform/nlutsenko.extensions
Browse files Browse the repository at this point in the history
Make ParseUI fully compile from source for app extensions.
  • Loading branch information
nlutsenko committed Sep 8, 2015
2 parents 8767f4d + 5e054b4 commit 1a6f669
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ - (void)_dismissAction {
[self dismissViewControllerAnimated:YES completion:nil];
}

- (void)_forgotPasswordAction {
- (void)_forgotPasswordAction PF_EXTENSION_UNAVAILABLE("") {
NSString *title = NSLocalizedString(@"Reset Password", @"Forgot password request title in PFLogInViewController");
NSString *message = NSLocalizedString(@"Please enter the email address for your account.",
@"Email request message in PFLogInViewController");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -399,11 +399,13 @@ - (void)_handleDeletionError:(NSError *)error {

[self presentViewController:errorController animated:YES completion:nil];
} else {
UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:NSLocalizedString(@"Error", @"Error")
message:errorMessage
delegate:nil
cancelButtonTitle:NSLocalizedString(@"OK", @"OK")
otherButtonTitles:nil];
// Cast to `id` is required for building succesfully for app extensions,
// this code actually never runs in App Extensions, since they are iOS 8.0+, so we are good with just a hack
UIAlertView *alertView = [(id)[UIAlertView alloc] initWithTitle:NSLocalizedString(@"Error", @"Error")
message:errorMessage
delegate:nil
cancelButtonTitle:NSLocalizedString(@"OK", @"OK")
otherButtonTitles:nil];

[alertView show];
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,7 @@ - (void)removeObjectsAtIndexPaths:(NSArray *)indexPaths animated:(BOOL)animated
}

[[BFTask taskForCompletionOfAllTasks:allDeletionTasks]
continueWithBlock:deletionHandlerBlock];
continueWithBlock:deletionHandlerBlock];
}

- (PFTableViewCell *)tableView:(UITableView *)otherTableView cellForNextPageAtIndexPath:(NSIndexPath *)indexPath {
Expand Down Expand Up @@ -531,11 +531,13 @@ - (void)_handleDeletionError:(NSError *)error {

[self presentViewController:errorController animated:YES completion:nil];
} else {
UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:NSLocalizedString(@"Error", @"Error")
message:errorMessage
delegate:nil
cancelButtonTitle:NSLocalizedString(@"OK", @"OK")
otherButtonTitles:nil];
// Cast to `id` is required for building succesfully for app extensions,
// this code actually never runs in App Extensions, since they are iOS 8.0+, so we are good with just a hack
UIAlertView *alertView = [(id)[UIAlertView alloc] initWithTitle:NSLocalizedString(@"Error", @"Error")
message:errorMessage
delegate:nil
cancelButtonTitle:NSLocalizedString(@"OK", @"OK")
otherButtonTitles:nil];

[alertView show];
}
Expand Down

0 comments on commit 1a6f669

Please sign in to comment.