Skip to content

Commit

Permalink
Prefer forward-declaration over import in Objective-C header files
Browse files Browse the repository at this point in the history
Per @pixlwave, this helps prevent build failures:

> We had random cycle errors while building a while back and it was
> eventually solved by removing all imports of `GeneratedInterface-Swift.h`
> in every [Objective-C header] file.
  • Loading branch information
wtimme committed Jul 5, 2022
1 parent 4cf16e9 commit 6e761f8
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

#import <Foundation/Foundation.h>
@import Intents;
#import "GeneratedInterface-Swift.h"
@protocol ContactResolving;

NS_ASSUME_NONNULL_BEGIN

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#import "SendMessageIntentHandler.h"
#import "ContactResolver.h"
#import "MXKAccountManager.h"
#import "GeneratedInterface-Swift.h"

@interface SendMessageIntentHandler ()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

#import <Foundation/Foundation.h>
@import Intents;
#import "GeneratedInterface-Swift.h"
@protocol ContactResolving;

NS_ASSUME_NONNULL_BEGIN

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#import "StartAudioCallIntentHandler.h"
#import "MXKAccountManager.h"
#import "ContactResolver.h"
#import "GeneratedInterface-Swift.h"

@interface StartAudioCallIntentHandler ()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

#import <Foundation/Foundation.h>
@import Intents;
#import "GeneratedInterface-Swift.h"
@protocol ContactResolving;

NS_ASSUME_NONNULL_BEGIN

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#import "StartVideoCallIntentHandler.h"
#import "ContactResolver.h"
#import "MXKAccountManager.h"
#import "GeneratedInterface-Swift.h"

@interface StartVideoCallIntentHandler ()

Expand Down

0 comments on commit 6e761f8

Please sign in to comment.