Skip to content

Commit

Permalink
fix linked framework "ObjectiveC"
Browse files Browse the repository at this point in the history
  • Loading branch information
NikSativa committed Sep 28, 2024
1 parent 48cab07 commit 337bb09
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
3 changes: 1 addition & 2 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@ let package = Package(
],
targets: [
.target(name: "DIKit",
dependencies: [
],
dependencies: [],
path: "Source",
resources: [
.process("PrivacyInfo.xcprivacy")
Expand Down
4 changes: 3 additions & 1 deletion Source/SelfInjectable.swift
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#if canImport(ObjectiveC)
import Foundation
import ObjectiveC

Expand Down Expand Up @@ -32,7 +33,7 @@ extension NSObject {
@objc
private(set) var dipTag: String? {
get {
withUnsafePointer(to: AssociatedKeys.dipTag) { key in
return withUnsafePointer(to: AssociatedKeys.dipTag) { key in
var key = key
return objc_getAssociatedObject(self, &key) as? String
}
Expand Down Expand Up @@ -63,3 +64,4 @@ extension NSObject {
}
}
}
#endif
2 changes: 2 additions & 0 deletions Source/ViewControllerFactory.swift
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,9 @@ extension Impl.ViewControllerFactory: ViewControllerFactory {
let storyboard = UIStoryboard(name: klass, bundle: bundle)

let controller: T = instantiateInitialViewController(from: storyboard)
#if canImport(ObjectiveC)
controller.resolveDependnciesIfNeeded(with: resolver)
#endif
return controller
}

Expand Down

0 comments on commit 337bb09

Please sign in to comment.