ARC unavailable methods in Swift

偶尔善良 提交于 2019-12-06 00:10:27
B.S.

Here I found the same question. I answered more deeply there. I could not find something more good, so I went ahead with my old assumptions.

I Added this category to Bridging Header. It worked fine.

#import <EstimoteSDK/EstimoteSDK.h>

@interface ESTNearable (Ex)

/// Solving the compiler problem that "zone" method is unavailable in Swift
@property (readonly) ESTNearableZone nearableZone;

@end

// Implementation

@implementation ESTNearable (Ex)

- (ESTNearableZone)nearableZone
{
    return self.zone;
}

@end

After that I just used nearableZone method in Swift

var zone = someNearable.nearableZone
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!