Skip to content

Commit

Permalink
Switch fastlane builds back to stable Xcode and remove support for bu…
Browse files Browse the repository at this point in the history
…ilding with the iOS 12 SDK
  • Loading branch information
c99koder committed Sep 12, 2019
1 parent a6eecb7 commit 2a76847
Show file tree
Hide file tree
Showing 7 changed files with 2 additions and 26 deletions.
2 changes: 0 additions & 2 deletions IRCCloud/Classes/AppDelegate.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@
-(void)setActiveScene:(UIWindow *)window;
@end

#ifdef __IPHONE_13_0
@interface SceneDelegate : NSObject <UIWindowSceneDelegate> {
AppDelegate *_appDelegate;
}
Expand All @@ -68,4 +67,3 @@
@property (strong, nonatomic) ECSlidingViewController *slideViewController;
@property (strong, nonatomic) SplashViewController *splashViewController;
@end
#endif
14 changes: 0 additions & 14 deletions IRCCloud/Classes/AppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -155,12 +155,10 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(
[[NSUserDefaults standardUserDefaults] registerDefaults:@{@"bgTimeout":@(30), @"autoCaps":@(YES), @"host":IRCCLOUD_HOST, @"saveToCameraRoll":@(YES), @"photoSize":@(1024), @"notificationSound":@(YES), @"tabletMode":@(YES), @"imageService":@"IRCCloud", @"uploadsAvailable":@(NO), @"browser":[SFSafariViewController class]?@"IRCCloud":@"Safari", @"warnBeforeLaunchingBrowser":@(NO), @"imageViewer":@(YES), @"videoViewer":@(YES), @"inlineWifiOnly":@(NO), @"iCloudLogs":@(NO), @"clearFormattingAfterSending":@(YES), @"backgroundUploads":@(YES)}];
[[NSUserDefaults standardUserDefaults] registerDefaults:@{@"fontSize":@([UIFontDescriptor preferredFontDescriptorWithTextStyle:UIFontTextStyleBody].pointSize * 0.8)}];

#ifdef __IPHONE_13_0
if (@available(iOS 13, *)) {
if([UITraitCollection currentTraitCollection].userInterfaceStyle == UIUserInterfaceStyleDark)
[[NSUserDefaults standardUserDefaults] registerDefaults:@{@"theme":@"midnight"}];
}
#endif

if([[NSUserDefaults standardUserDefaults] objectForKey:@"path"]) {
IRCCLOUD_HOST = [[NSUserDefaults standardUserDefaults] objectForKey:@"host"];
Expand Down Expand Up @@ -585,19 +583,11 @@ -(void)userNotificationCenter:(UNUserNotificationCenter *)center openSettingsFor
}];
}

#ifdef __IPHONE_13_0
-(void)application:(UIApplication *)application handleActionWithIdentifier:(NSString *)identifier forLocalNotification:(UILocalNotification *)notification withResponseInfo:(NSDictionary *)responseInfo completionHandler:(void (^)(void))completionHandler {
#else
-(void)application:(UIApplication *)application handleActionWithIdentifier:(NSString *)identifier forLocalNotification:(UILocalNotification *)notification withResponseInfo:(NSDictionary *)responseInfo completionHandler:(void (^)())completionHandler {
#endif
[self handleAction:[notification.userInfo objectForKey:@"identifier"] userInfo:[notification.userInfo objectForKey:@"userInfo"] response:[[notification.userInfo objectForKey:@"responseInfo"] objectForKey:UIUserNotificationActionResponseTypedTextKey] completionHandler:completionHandler];
}

#ifdef __IPHONE_13_0
- (void)application:(UIApplication *)application handleActionWithIdentifier:(NSString *)identifier forRemoteNotification:(NSDictionary *)userInfo withResponseInfo:(NSDictionary *)responseInfo completionHandler:(void (^)(void))completionHandler {
#else
- (void)application:(UIApplication *)application handleActionWithIdentifier:(NSString *)identifier forRemoteNotification:(NSDictionary *)userInfo withResponseInfo:(NSDictionary *)responseInfo completionHandler:(void (^)())completionHandler {
#endif
[self handleAction:identifier userInfo:userInfo response:[responseInfo objectForKey:UIUserNotificationActionResponseTypedTextKey] completionHandler:completionHandler];
}

Expand Down Expand Up @@ -1015,7 +1005,6 @@ -(void)removeScene:(id)scene {
}

-(void)setActiveScene:(UIWindow *)window {
#ifdef __IPHONE_13_0
for(SceneDelegate *d in _activeScenes) {
if(d.window == window) {
self.window = d.window;
Expand All @@ -1026,11 +1015,9 @@ -(void)setActiveScene:(UIWindow *)window {
break;
}
}
#endif
}
@end

#ifdef __IPHONE_13_0
@implementation SceneDelegate
-(void)scene:(UIScene *)scene willConnectToSession:(UISceneSession *)session options:(UISceneConnectionOptions *)connectionOptions API_AVAILABLE(ios(13.0)) {
_appDelegate = (AppDelegate *)[UIApplication sharedApplication].delegate;
Expand Down Expand Up @@ -1096,4 +1083,3 @@ -(void)sceneWillEnterForeground:(UIScene *)scene API_AVAILABLE(ios(13.0)) {
}
}
@end
#endif
2 changes: 0 additions & 2 deletions IRCCloud/Classes/LoginSplashViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,9 @@ - (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldReceive
- (void)viewDidLoad {
[super viewDidLoad];

#ifdef __IPHONE_13_0
if (@available(iOS 13, *)) {
self.view.overrideUserInterfaceStyle = UIUserInterfaceStyleLight;
}
#endif
self->_kbSize = CGSizeZero;

UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(hideKeyboard:)];
Expand Down
2 changes: 0 additions & 2 deletions IRCCloud/Classes/MainViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -285,10 +285,8 @@ - (void)_themeChanged {

- (void)applyTheme {
self->_currentTheme = [UIColor currentTheme];
#ifdef __IPHONE_13_0
if (@available(iOS 13, *))
self.view.window.overrideUserInterfaceStyle = [self->_currentTheme isEqualToString:@"dawn"]?UIUserInterfaceStyleLight:UIUserInterfaceStyleDark;
#endif
self.view.window.backgroundColor = [UIColor textareaBackgroundColor];
self.view.backgroundColor = [UIColor contentBackgroundColor];
self.slidingViewController.view.backgroundColor = self.navigationController.view.backgroundColor = [UIColor navBarColor];
Expand Down
4 changes: 0 additions & 4 deletions ShareExtension/ShareViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -126,15 +126,11 @@ - (void)viewDidLoad {
AudioServicesPlaySystemSound(weakSelf.sound);
};
[UIColor setTheme:@"dawn"];
#ifdef __IPHONE_13_0
if (@available(iOS 13, *)) {
[UIColor setTheme:[UITraitCollection currentTraitCollection].userInterfaceStyle == UIUserInterfaceStyleDark?@"midnight":@"dawn"];
} else {
[UIColor setTheme:@"dawn"];
}
#else
[UIColor setTheme:@"dawn"];
#endif
[super viewDidLoad];
self.textView.superview.superview.superview.superview.backgroundColor = [UIColor contentBackgroundColor];
[[NSNotificationCenter defaultCenter] addObserver:self
Expand Down
2 changes: 1 addition & 1 deletion build-scripts/BUILD
Original file line number Diff line number Diff line change
@@ -1 +1 @@
50
51
2 changes: 1 addition & 1 deletion fastlane/Fastfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
fastlane_version "2.102.0"

default_platform :ios
xcode_select("/Applications/Xcode-beta.app")
# xcode_select("/Applications/Xcode-beta.app")
def app_vers
File.read('../build-scripts/VERSION').split('\n')[0].strip
end
Expand Down

0 comments on commit 2a76847

Please sign in to comment.