Skip to content

Commit a33cc75

Browse files
Expose public functions to Objective-C with @objc
Also, fix some warnings
1 parent 4781218 commit a33cc75

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

ios/AppConfigSettingsFramework/ManagedAppConfigSettings.swift

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ open class ManagedAppConfigSettings: NSObject {
1616

1717
fileprivate static var token:Int = 0
1818
fileprivate static var manager:ManagedAppConfigSettings?
19+
@objc
1920
open var delegate:ManagedAppConfigSettingsDelegate?
2021

2122
// MARK: Public Methods
@@ -25,7 +26,8 @@ open class ManagedAppConfigSettings: NSObject {
2526

2627
- returns: ManagedAppConfigSettings instance
2728
*/
28-
open static func clientInstance() -> ManagedAppConfigSettings
29+
@objc
30+
public static func clientInstance() -> ManagedAppConfigSettings
2931
{
3032
_ = ManagedAppConfigSettings.__once
3133
return manager!
@@ -35,6 +37,7 @@ open class ManagedAppConfigSettings: NSObject {
3537
Start the ManagedAppConfigSettings, including adding observers
3638
It is recommended to set the delegate before calling start()
3739
*/
40+
@objc
3841
open func start()
3942
{
4043
NotificationCenter.default.addObserver(forName: UserDefaults.didChangeNotification, object: nil, queue: OperationQueue.main) { (notification:Notification) -> Void in
@@ -48,9 +51,10 @@ open class ManagedAppConfigSettings: NSObject {
4851
}
4952
}
5053
}
51-
self.checkAppConfigChanges()
54+
_ = self.checkAppConfigChanges()
5255
}
5356

57+
@objc
5458
open func end()
5559
{
5660
NotificationCenter.default.removeObserver(self, name: UserDefaults.didChangeNotification, object: nil);
@@ -61,6 +65,7 @@ open class ManagedAppConfigSettings: NSObject {
6165

6266
- returns: dictionary of key/value pairs
6367
*/
68+
@objc
6469
open func appConfig () -> [String : Any]? {
6570
if let serverConfig = UserDefaults.standard.dictionary(forKey: kMDM_CONFIGURATION_KEY)
6671
{

0 commit comments

Comments
 (0)