Questions tagged [mix-and-match]

Apple's term for mixing Swift and Objective-C code in the same project.

Apple's term for mixing Swift and Objective-C code in the same project.

https://developer.apple.com/library/content/documentation/Swift/Conceptual/BuildingCocoaApps/MixandMatch.html#//apple_ref/doc/uid/TP40014216-CH10-ID122

3 questions
3
votes
1 answer

static let sharedInstance not accessible from Objective-C code

Problem: The declared static let sharedInstance is not accessible from Objective-C code when building the main app target. Code: @objc public protocol ManagedObjectContextProvider { var context: NSManagedObjectContext { get } …
Fawkes
  • 3,831
  • 3
  • 22
  • 37
1
vote
2 answers

Cocoapod With Mix and Match Swift and Objective-c code

I've been tasked with splitting out the model layer of an existing app into a separate framework. I'm trying accomplish this using cocoapods to make a pod which I'll import back into the main app. The issue I'm having is the app I'm splitting the…
Mark Bridges
  • 8,228
  • 4
  • 50
  • 65
0
votes
1 answer

How to declare Objective-C method with custom Swift class in it

I want to declare an Objective-C method with a custom Swift class as one of it's arguments, like this: + (void)doCalculationsWithACustomSwiftObject:(CustomSwiftClass *)swiftObject andADictionanary:(NSDictionary *)ordinaryDictionary; The aim is to…
turingtested
  • 6,356
  • 7
  • 32
  • 47