Skip to content
This repository has been archived by the owner on Dec 12, 2022. It is now read-only.

Improve generated Swift header imports #956

Merged
merged 5 commits into from
Nov 26, 2021
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
4 changes: 4 additions & 0 deletions MatrixKit.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,16 @@ Pod::Spec.new do |s|

s.subspec 'Core' do |core|
core.source_files = "MatrixKit", "MatrixKit/**/*.{h,m,swift}", "Libs/**/*.{h,m,swift}"
core.exclude_files = ['MatrixKit/MatrixKit-Bridging-Header.h']
core.private_header_files = ['MatrixKit/Utils/MXKSwiftHeader.h']
core.resources = ["MatrixKit/**/*.{xib}", "MatrixKit/Assets/MatrixKitAssets.bundle"]
core.dependency 'DTCoreText'
end

s.subspec 'AppExtension' do |ext|
ext.source_files = "MatrixKit", "MatrixKit/**/*.{h,m,swift}", "Libs/**/*.{h,m,swift}"
ext.exclude_files = ['MatrixKit/MatrixKit-Bridging-Header.h']
ext.private_header_files = ['MatrixKit/Utils/MXKSwiftHeader.h']
ext.resources = ["MatrixKit/**/*.{xib}", "MatrixKit/Assets/MatrixKitAssets.bundle"]
ext.dependency 'DTCoreText/Extension'
end
Expand Down
2 changes: 0 additions & 2 deletions MatrixKit/Categories/MXEvent+MatrixKit.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
limitations under the License.
*/

#import <MatrixSDK/MatrixSDK.h>

#import "MXKEventFormatter.h"

/**
Expand Down
2 changes: 0 additions & 2 deletions MatrixKit/Categories/NSBundle+MatrixKit.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@

#import <UIKit/UIKit.h>

#import <MatrixSDK/MatrixSDK.h>

/**
Define a `NSBundle` category at MatrixKit level to retrieve images and sounds from MatrixKit Assets bundle.
*/
Expand Down
3 changes: 2 additions & 1 deletion MatrixKit/Controllers/MXKRecentListViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@

#import "MXKInterleavedRecentsDataSource.h"
#import "MXKInterleavedRecentTableViewCell.h"
#import <MatrixSDK/MatrixSDK-Swift.h>

#import "MXKSwiftHeader.h"

@interface MXKRecentListViewController ()
{
Expand Down
3 changes: 0 additions & 3 deletions MatrixKit/MatrixKit.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@

#import <UIKit/UIKit.h>

#import <MatrixSDK/MatrixSDK.h>

#import "MXKConstants.h"

#import "MXKAppSettings.h"
Expand Down Expand Up @@ -153,4 +151,3 @@
#import "MXKSessionGroupsDataSource.h"
#import "MXKGroupListViewController.h"
#import "MXKGroupTableViewCell.h"
#import "MXKSwiftHeader.h"
1 change: 0 additions & 1 deletion MatrixKit/Models/RoomList/MXKRecentCellData.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
*/

#import <Foundation/Foundation.h>
#import <MatrixSDK/MatrixSDK.h>

#import "MXKRecentCellDataStoring.h"

Expand Down
5 changes: 4 additions & 1 deletion MatrixKit/Models/RoomList/MXKRecentCellData.m
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,12 @@

#import "MXKRecentCellData.h"

@import MatrixSDK;

#import "MXKDataSource.h"
#import "MXEvent+MatrixKit.h"
#import <MatrixSDK/MatrixSDK-Swift.h>

#import "MXKSwiftHeader.h"

@implementation MXKRecentCellData
@synthesize roomSummary, dataSource, lastEventDate;
Expand Down
1 change: 0 additions & 1 deletion MatrixKit/Models/RoomList/MXKSessionRecentsDataSource.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
*/

#import <UIKit/UIKit.h>
#import <MatrixSDK/MatrixSDK.h>

#import "MXKConstants.h"
#import "MXKDataSource.h"
Expand Down
5 changes: 4 additions & 1 deletion MatrixKit/Models/RoomList/MXKSessionRecentsDataSource.m
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,11 @@

#import "MXKSessionRecentsDataSource.h"

@import MatrixSDK;

#import "MXKRoomDataSourceManager.h"
#import <MatrixSDK/MatrixSDK-Swift.h>

#import "MXKSwiftHeader.h"

#pragma mark - Constant definitions
NSString *const kMXKRecentCellIdentifier = @"kMXKRecentCellIdentifier";
Expand Down
2 changes: 2 additions & 0 deletions Samples/MatrixKitSample/MXKSampleJSQMessagesViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@

#import <MobileCoreServices/MobileCoreServices.h>

#import "MXKSwiftHeader.h"

@interface MXKSampleJSQMessagesViewController ()
{
/**
Expand Down
1 change: 1 addition & 0 deletions changelog.d/5194.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Improve generated Swift header imports.