Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions Parse/Internal/PFAlertView.m
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@

#import "PFAlertView.h"

#import <UIKit/UIKit.h>

@interface PFAlertView () <UIAlertViewDelegate>

@property (nonatomic, copy) PFAlertViewCompletion completion;
Expand Down Expand Up @@ -62,6 +60,7 @@ + (void)showAlertWithTitle:(NSString *)title

[viewController presentViewController:alertController animated:YES completion:nil];
} else {
#if __IPHONE_OS_VERSION_MIN_REQUIRED < __IPHONE_8_0
__block PFAlertView *pfAlertView = [[self alloc] init];
UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:title
message:message
Expand All @@ -83,9 +82,12 @@ + (void)showAlertWithTitle:(NSString *)title

alertView.delegate = pfAlertView;
[alertView show];
#endif
}
}

#if __IPHONE_OS_VERSION_MIN_REQUIRED < __IPHONE_8_0

///--------------------------------------
#pragma mark - UIAlertViewDelegate
///--------------------------------------
Expand All @@ -100,4 +102,6 @@ - (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)butto
}
}

#endif

@end
13 changes: 6 additions & 7 deletions Parse/Internal/Push/Utilites/PFPushUtilities.m
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
#import <dlfcn.h>

#if TARGET_OS_IPHONE

#import <AudioToolbox/AudioToolbox.h>

#import "PFAlertView.h"
#endif

#import "PFInstallationPrivate.h"
Expand Down Expand Up @@ -60,12 +60,11 @@ + (void)showAlertViewWithTitle:(NSString *)title message:(NSString *)message {
NSString *cancelButtonTitle = NSLocalizedStringFromTableInBundle(@"OK", @"Parse",
[NSBundle bundleForClass:[self class]],
@"Default alert view cancel button title.");
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:title
message:message
delegate:nil
cancelButtonTitle:cancelButtonTitle
otherButtonTitles:nil];
[alert show];
[PFAlertView showAlertWithTitle:title
message:message
cancelButtonTitle:cancelButtonTitle
otherButtonTitles:nil
completion:nil];
}

+ (void)playAudioWithName:(NSString *)audioFileName {
Expand Down