Skip to content

Commit 2b71086

Browse files
committed
Fix: background crashes due to CPU over-utilization and socket issues
1 parent 25a806c commit 2b71086

File tree

3 files changed

+24
-3
lines changed

3 files changed

+24
-3
lines changed

NearBee.podspec

+6-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Pod::Spec.new do |s|
22
s.name = 'NearBee'
33
s.swift_version = '5.0'
4-
s.version = '0.3.6-beta1'
4+
s.version = '0.4.0'
55
s.summary = 'iOS library for Eddystone beacons'
66

77
s.homepage = 'https://github.com/Beaconstac/NearBee-iOS-SDK'
@@ -22,6 +22,11 @@ Pod::Spec.new do |s|
2222
s.resource = 'NearBee/NearBeeResources.bundle'
2323
s.xcconfig = { 'LIBRARY_SEARCH_PATHS' => '$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)' }
2424

25+
s.pod_target_xcconfig = {
26+
'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'arm64'
27+
}
28+
s.user_target_xcconfig = { 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'arm64' }
29+
2530
s.dependency 'EddystoneScanner'
2631
s.dependency 'Socket.IO-Client-Swift'
2732
end

NearBee/NearBee-Swift.h

+18-2
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,18 @@ SWIFT_PROTOCOL("_TtP7NearBee16BeaconAttachment_") SWIFT_AVAILABILITY(ios,depreca
213213
@end
214214

215215

216+
SWIFT_CLASS_NAMED("GeoFenceAttachment")
217+
@interface GeoFenceAttachment : NSObject <Attachment>
218+
- (NSString * _Nullable)getTitle SWIFT_WARN_UNUSED_RESULT;
219+
- (NSString * _Nullable)getDescription SWIFT_WARN_UNUSED_RESULT;
220+
- (NSString * _Nullable)getIconURL SWIFT_WARN_UNUSED_RESULT;
221+
- (BOOL)isActive SWIFT_WARN_UNUSED_RESULT;
222+
- (NSString * _Nullable)getURL SWIFT_WARN_UNUSED_RESULT;
223+
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
224+
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
225+
@end
226+
227+
216228
/// Nearby
217229
/// Class that handles all the tasks
218230
SWIFT_CLASS("_TtC7NearBee7NearBee")
@@ -262,13 +274,13 @@ SWIFT_CLASS_NAMED("NearBeeAttachment")
262274

263275

264276

277+
278+
265279
@interface NearBeeAttachment (SWIFT_EXTENSION(NearBee))
266280
- (void)toggleSave;
267281
- (void)display:(NSString * _Nonnull)url;
268282
@end
269283

270-
271-
272284
@class NearBeeBusiness;
273285
@class NearBeePhysicalWeb;
274286
@class NSSet;
@@ -294,6 +306,7 @@ SWIFT_CLASS_NAMED("NearBeeBeacon")
294306
@interface NearBeeBeacon (SWIFT_EXTENSION(NearBee))
295307
- (id <Attachment> _Nullable)getAttachmentForCurrentDeviceLanguage SWIFT_WARN_UNUSED_RESULT;
296308
- (id <Attachment> _Nullable)getBestAvailableAttachment SWIFT_WARN_UNUSED_RESULT;
309+
- (float)getRSSI SWIFT_WARN_UNUSED_RESULT;
297310
@end
298311

299312

@@ -332,6 +345,7 @@ SWIFT_CLASS_NAMED("NearBeeBusiness")
332345
@property (nonatomic, readonly, strong) NSSet * _Nullable beacons;
333346
@end
334347

348+
@class NearBeeGeoFence;
335349

336350
SWIFT_PROTOCOL("_TtP7NearBee15NearBeeDelegate_")
337351
@protocol NearBeeDelegate
@@ -340,12 +354,14 @@ SWIFT_PROTOCOL("_TtP7NearBee15NearBeeDelegate_")
340354
- (void)onBeaconsUpdated:(NSArray<NearBeeBeacon *> * _Nonnull)beacons SWIFT_AVAILABILITY(ios,unavailable,message="'onBeaconsUpdated' has been renamed to 'didLoseBeacons:'");
341355
- (void)onBeaconsLost:(NSArray<NearBeeBeacon *> * _Nonnull)beacons SWIFT_AVAILABILITY(ios,unavailable,message="'onBeaconsLost' has been renamed to 'didUpdateBeacons:'");
342356
- (void)onError:(NSError * _Nonnull)error SWIFT_AVAILABILITY(ios,unavailable,message="'onError' has been renamed to 'didThrowError:'");
357+
- (void)onEnteredGeofence:(NearBeeGeoFence * _Nonnull)geofence :(GeoFenceAttachment * _Nonnull)attachment SWIFT_AVAILABILITY(ios,unavailable,message="'onEnteredGeofence' has been renamed to 'didEnterGeofence::'");
343358
@required
344359
- (void)didFindBeacons:(NSArray<NearBeeBeacon *> * _Nonnull)beacons;
345360
- (void)didUpdateBeacons:(NSArray<NearBeeBeacon *> * _Nonnull)beacons;
346361
- (void)didLoseBeacons:(NSArray<NearBeeBeacon *> * _Nonnull)beacons;
347362
- (void)didUpdateState:(enum NearBeeState)state;
348363
- (void)didThrowError:(NSError * _Nonnull)error;
364+
- (void)didEnterGeofence:(NearBeeGeoFence * _Nonnull)geofence :(GeoFenceAttachment * _Nonnull)attachment;
349365
@end
350366

351367

NearBee/libNearBee.a

-23.7 KB
Binary file not shown.

0 commit comments

Comments
 (0)