Skip to content

Commit 29e012c

Browse files
committed
Explicitly import Foundation, UIKit, and other required frameworks
When moving from frameworks to Swift packages, see for example #15622 and #15651, we lose the framework headers which had statements like `#import <Foundation/Foundation.h>`. This means that basic frameworks such as Foundation and UIKit are no longer imported as part of consumers frameworks such as Yosemite. To simplify the code review of the upcoming PRs migrating those frameworks to Swift packages in `Modules/`, this PR preemptively adds the required imports in the files that need them. This was done by running `git reset trunk` on the workbench branch `temp-branch-for-swiftpm-migration` and only committing the `import` additions in this branch.
1 parent f1d4f88 commit 29e012c

File tree

110 files changed

+128
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

110 files changed

+128
-0
lines changed

WooCommerce/Classes/Analytics/WooAnalyticsEvent.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import Foundation
2+
import UIKit
23
import Yosemite
34
import WooFoundation
45

WooCommerce/Classes/Authentication/Epilogue/StorePickerViewModel.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import Foundation
22
import Experiments
3+
import UIKit
34
import Yosemite
45
import protocol Storage.StorageManagerType
56
import protocol WooFoundation.Analytics

WooCommerce/Classes/Authentication/Jetpack Setup/Native Jetpack Setup/JetpackSetupViewModel.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import Foundation
2+
import UIKit
23
import Yosemite
34
import enum Alamofire.AFError
45
import enum Networking.NetworkError

WooCommerce/Classes/Authentication/Navigation Exceptions/NonAtomicSiteViewModel.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import Foundation
2+
import UIKit
23
import Yosemite
34

45
/// Configuration and actions for an ULErrorViewController, modelling

WooCommerce/Classes/Authentication/PostSiteCredentialLoginChecker.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import UIKit
12
import Yosemite
23
import protocol Networking.ApplicationPasswordUseCase
34
import protocol WooFoundation.Analytics

WooCommerce/Classes/Blaze/BlazeLocalNotificationScheduler.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import Foundation
2+
import UserNotifications
13
import Yosemite
24
import protocol Storage.StorageManagerType
35
import Combine

WooCommerce/Classes/Extensions/Product+SwiftUIPreviewHelpers.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#if canImport(SwiftUI) && DEBUG
22

3+
import Foundation
34
import Yosemite
45

56
extension Product {

WooCommerce/Classes/Extensions/ShippingLabel+Helpers.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import Foundation
12
import Yosemite
23

34
extension ShippingLabel {

WooCommerce/Classes/GoogleAds/GoogleAdsCampaignCoordinator.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import Foundation
2+
import UIKit
23
import Yosemite
34
import protocol WooFoundation.Analytics
45

WooCommerce/Classes/Model/APNSDevice+Woo.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import Foundation
2+
import UIKit
23
import Yosemite
34

45

0 commit comments

Comments
 (0)