Skip to content

Commit effa9fa

Browse files
committed
[refact] Cleaning import in headers
1 parent 3f2428c commit effa9fa

37 files changed

+50
-100
lines changed

CloudView.h

-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@
66
// Copyright (c) 2013 Lis@cintosh. All rights reserved.
77
//
88

9-
#import <UIKit/UIKit.h>
10-
119
#import "Verb.h"
1210

1311
@interface CloudLabel : UILabel

CloudViewController.h

-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@
66
// Copyright (c) 2013 Lis@cintosh. All rights reserved.
77
//
88

9-
#import <UIKit/UIKit.h>
10-
119
@interface CloudViewController : UIViewController <UINavigationControllerDelegate>
1210
{
1311
NSArray * verbs;

EditNoteViewController.h

-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@
66
//
77
//
88

9-
#import <UIKit/UIKit.h>
10-
119
#import "Verb.h"
1210

1311
@interface EditNoteViewController : UIViewController

Fabric.framework/Headers/FABAttributes.h

+9-18
Original file line numberDiff line numberDiff line change
@@ -21,22 +21,11 @@
2121

2222
#define FAB_UNAVAILABLE(x) __attribute__((unavailable(x)))
2323

24-
#if __has_feature(nullability)
25-
#define fab_nullable nullable
26-
#define fab_nonnull nonnull
27-
#define fab_null_unspecified null_unspecified
28-
#define fab_null_resettable null_resettable
29-
#define __fab_nullable __nullable
30-
#define __fab_nonnull __nonnull
31-
#define __fab_null_unspecified __null_unspecified
32-
#else
33-
#define fab_nullable
34-
#define fab_nonnull
35-
#define fab_null_unspecified
36-
#define fab_null_resettable
37-
#define __fab_nullable
38-
#define __fab_nonnull
39-
#define __fab_null_unspecified
24+
#if !__has_feature(nullability)
25+
#define nonnull
26+
#define nullable
27+
#define _Nullable
28+
#define _Nonnull
4029
#endif
4130

4231
#ifndef NS_ASSUME_NONNULL_BEGIN
@@ -51,9 +40,11 @@
5140
/**
5241
* The following macros are defined here to provide
5342
* backwards compatability. If you are still using
54-
* them you should migrate to the new versions that
55-
* are defined above.
43+
* them you should migrate to the native nullability
44+
* macros.
5645
*/
46+
#define fab_nullable nullable
47+
#define fab_nonnull nonnull
5748
#define FAB_NONNULL __fab_nonnull
5849
#define FAB_NULLABLE __fab_nullable
5950
#define FAB_START_NONNULL NS_ASSUME_NONNULL_BEGIN

Fabric.framework/Headers/Fabric.h

+5
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,11 @@ NS_ASSUME_NONNULL_BEGIN
7171
*/
7272
- (id)init FAB_UNAVAILABLE("Use +sharedSDK to retrieve the shared Fabric instance.");
7373

74+
/**
75+
* Unavailable. Use `+sharedSDK` to retrieve the shared Fabric instance.
76+
*/
77+
+ (instancetype)new FAB_UNAVAILABLE("Use +sharedSDK to retrieve the shared Fabric instance.");
78+
7479
@end
7580

7681
NS_ASSUME_NONNULL_END

IVWebView.h

-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@
66
//
77
//
88

9-
#import <UIKit/UIKit.h>
10-
119
@interface IVWebView : UIWebView
1210

1311
@end

NSDate+addition.h

-3
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,6 @@
66
// Copyright 2011 Lis@cintosh. All rights reserved.
77
//
88

9-
#import <Foundation/Foundation.h>
10-
11-
129
@interface NSDate(addition)
1310

1411
- (NSInteger)second;

NSMutableAttributedString+addition.h

-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@
66
//
77
//
88

9-
#import <Foundation/Foundation.h>
10-
119
@interface NSMutableAttributedString (addition)
1210

1311
- (void)appendString:(NSString *)string attributes:(NSDictionary *)attributes;

NSString+addition.h

-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@
66
//
77
//
88

9-
#import <Foundation/Foundation.h>
10-
119
@interface NSString (addition)
1210

1311
- (NSAttributedString *)highlightOccurrencesOfString:(NSString *)occurence fontSize:(CGFloat)fontSize;

QuizResult.h

+2-3
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@
66
//
77
//
88

9-
#import <Foundation/Foundation.h>
10-
#import <CoreData/CoreData.h>
9+
@import CoreData;
1110

1211
@class Playlist;
1312

@@ -18,4 +17,4 @@
1817
@property (nonatomic, retain) NSNumber * wrongResponses;
1918
@property (nonatomic, retain) Playlist * playlist;
2019

21-
@end
20+
@end

QuizViewController.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
//
77
//
88

9-
#import <UIKit/UIKit.h>
10-
119
#import "Playlist.h"
10+
@import AVFoundation;
11+
@import Speech;
1212

1313
NS_ASSUME_NONNULL_BEGIN
1414

@@ -60,4 +60,4 @@ typedef NS_ENUM(NSUInteger, VerbForm) {
6060

6161
@end
6262

63-
NS_ASSUME_NONNULL_END
63+
NS_ASSUME_NONNULL_END

Shared/ManagedObjectContext.h

-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@
66
// Copyright (c) 2012 Lis@cintosh. All rights reserved.
77
//
88

9-
#import <Foundation/Foundation.h>
10-
119
@protocol ManagedObjectContext <NSObject>
1210

1311
- (NSManagedObjectContext *)managedObjectContext;

Shared/Playlist+additions.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
// Copyright (c) 2012 Lis@cintosh. All rights reserved.
77
//
88

9-
#import <CoreSpotlight/CoreSpotlight.h>
10-
#import <MobileCoreServices/MobileCoreServices.h>
9+
@import CoreSpotlight;
10+
@import MobileCoreServices;
1111

1212
#import "Playlist.h"
1313

Shared/Playlist.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
// Copyright (c) 2012 Lis@cintosh. All rights reserved.
77
//
88

9-
#import <CoreData/CoreData.h>
9+
@import CoreData;
1010

1111
@class Verb;
1212
@class QuizResult;

Shared/Quote.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
//
77
//
88

9-
#import <CoreData/CoreData.h>
9+
@import CoreData;
1010

1111
#import "Verb.h"
1212

Shared/Verb.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
// Copyright (c) 2012 Lis@cintosh. All rights reserved.
77
//
88

9-
#import <CoreData/CoreData.h>
9+
@import CoreData;
1010

1111
@class Playlist;
1212
@class Quote;

Shared/main.m

-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@
66
// Copyright Lisacintosh 2010. All rights reserved.
77
//
88

9-
#import <UIKit/UIKit.h>
10-
119
#import "AppDelegate_Phone.h"
1210
#import "AppDelegate_Pad.h"
1311

UIApplication+addition.h

-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@
66
//
77
//
88

9-
#import <UIKit/UIKit.h>
10-
119
@interface UIApplication (addition)
1210

1311
- (void)openExternalURL:(NSURL *)url;

UINavigationController+addition.h

-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@
66
//
77
//
88

9-
#import <UIKit/UIKit.h>
10-
119
@interface UINavigationController (addition)
1210

1311
@end

iPad/AppDelegate_Pad.h

+4-5
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,10 @@
66
// Copyright Lisacintosh 2010. All rights reserved.
77
//
88

9-
#import <UIKit/UIKit.h>
10-
#import <CoreData/CoreData.h>
11-
#import <CoreSpotlight/CoreSpotlight.h>
12-
13-
#import "MainViewController.h"
9+
@import CoreData;
10+
@import CoreSpotlight;
11+
@import Fabric;
12+
@import Crashlytics;
1413

1514
#import "ManagedObjectContext.h"
1615

iPad/AppDelegate_Pad.m

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88

99
#import "AppDelegate_Pad.h"
1010
#import "QuizViewController.h"
11+
#import "MainViewController.h"
1112

12-
#import <Fabric/Fabric.h>
13-
#import <Crashlytics/Crashlytics.h>
13+
#import "ManagedObjectContext.h"
1414

1515
@implementation AppDelegate_Pad
1616

iPad/MainViewController.h

+4-7
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,9 @@
66
// Copyright (c) 2012 Lis@cintosh. All rights reserved.
77
//
88

9-
#import <UIKit/UIKit.h>
10-
#import <CoreData/CoreData.h>
11-
#import <MessageUI/MessageUI.h>
12-
#import <AVFoundation/AVFoundation.h>
9+
@import CoreData;
10+
@import MessageUI;
11+
@import AVFoundation;
1312

1413
#import "IVWebView.h"
1514

@@ -19,8 +18,6 @@
1918
#import "Playlist+additions.h"
2019

2120
@interface MainViewController : UISplitViewController
22-
<UIPopoverControllerDelegate, UIPopoverPresentationControllerDelegate, UIWebViewDelegate, MFMailComposeViewControllerDelegate>
23-
{
24-
}
21+
<UIPopoverControllerDelegate, UIPopoverPresentationControllerDelegate, UIWebViewDelegate, MFMailComposeViewControllerDelegate>
2522

2623
@end

iPad/VerbOptionsViewController_Pad.h

-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@
66
// Copyright (c) 2012 Lis@cintosh. All rights reserved.
77
//
88

9-
#import <UIKit/UIKit.h>
10-
119
#import "Playlist.h"
1210
#import "Verb.h"
1311

iPad/WebViewController.h

-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@
66
//
77
//
88

9-
#import <UIKit/UIKit.h>
10-
119
@interface WebViewController : UIViewController
1210

1311
@property (nonatomic, assign) IBOutlet UIWebView * webView;

iPhone/AboutViewController.h

+2-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
//
77
//
88

9-
#import <UIKit/UIKit.h>
9+
@import SafariServices;
10+
@import Crashlytics;
1011

1112
@interface AboutViewController : UITableViewController
1213

iPhone/AboutViewController.m

-2
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@
77
//
88

99
#import "AboutViewController.h"
10-
#import <SafariServices/SafariServices.h>
11-
#import <Crashlytics/Crashlytics.h>
1210

1311
#import "NSDate+addition.h"
1412
#import "UIApplication+addition.h"

iPhone/AppDelegate_Phone.h

+5-5
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@
66
// Copyright Lisacintosh 2010. All rights reserved.
77
//
88

9-
#import <UIKit/UIKit.h>
10-
#import <CoreData/CoreData.h>
11-
#import <QuartzCore/QuartzCore.h>
12-
#import <CoreSpotlight/CoreSpotlight.h>
9+
@import CoreData;
10+
@import QuartzCore;
11+
@import CoreSpotlight;
12+
@import Fabric;
1313

14-
#import "ManagedObjectContext.h"
1514
#import "Playlist+additions.h"
15+
#import "ManagedObjectContext.h"
1616

1717
@interface AppDelegate_Phone : UIResponder <UIApplicationDelegate, UITabBarDelegate, ManagedObjectContext>
1818

iPhone/AppDelegate_Phone.m

-3
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,6 @@
1616
#import "SearchViewController.h"
1717
#import "ResultViewController.h"
1818

19-
#import <Fabric/Fabric.h>
20-
#import <Crashlytics/Crashlytics.h>
21-
2219
@implementation AppDelegate_Phone
2320

2421
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions

iPhone/EditableTableViewCell.h

-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@
66
// Copyright (c) 2012 Lis@cintosh. All rights reserved.
77
//
88

9-
#import <UIKit/UIKit.h>
10-
119
@class EditableTableViewCell;
1210
@protocol EditableTableViewCellDelegate
1311

iPhone/HelpViewController.h

-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@
66
// Copyright (c) 2013 Lis@cintosh. All rights reserved.
77
//
88

9-
#import <UIKit/UIKit.h>
10-
119
@interface HelpViewController : UIViewController <UIWebViewDelegate>
1210

1311
@property (nonatomic, assign) IBOutlet UIWebView * webView;

iPhone/LandscapeViewController.h

-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@
66
// Copyright (c) 2012 Lis@cintosh. All rights reserved.
77
//
88

9-
#import <UIKit/UIKit.h>
10-
119
@interface LandscapeViewController : UIViewController
1210

1311
@property (nonatomic, assign) IBOutlet UIWebView * webView;

iPhone/PlaylistsViewController.h

-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@
66
// Copyright 2011 Lis@cintosh. All rights reserved.
77
//
88

9-
#import <UIKit/UIKit.h>
10-
119
#import "Playlist.h"
1210

1311
#import "EditableTableViewCell.h"

iPhone/ResultViewController.h

+3-4
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,9 @@
66
// Copyright 2010 Lisacintosh. All rights reserved.
77
//
88

9-
#import <UIKit/UIKit.h>
10-
#import <CoreData/CoreData.h>
11-
#import <MessageUI/MessageUI.h>
12-
#import <AVFoundation/AVFoundation.h>
9+
@import CoreData;
10+
@import MessageUI;
11+
@import AVFoundation;
1312

1413
#import "IVWebView.h"
1514

0 commit comments

Comments
 (0)