@neoskola/auto-play 0.2.13 → 0.2.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -74,7 +74,7 @@ class AutoPlayInterfaceController: NSObject, CPInterfaceControllerDelegate {
74
74
  private func pushNowPlayingTemplateSafely(animated: Bool) async -> Bool {
75
75
  return await withCheckedContinuation { continuation in
76
76
  do {
77
- try ObjCExceptionCatcher.tryBlock {
77
+ try ObjCExceptionCatcher.execute {
78
78
  self.interfaceController.pushTemplate(
79
79
  CPNowPlayingTemplate.shared,
80
80
  animated: animated
@@ -6,7 +6,7 @@
6
6
  /// with CPNowPlayingTemplate). This wrapper makes those exceptions catchable.
7
7
  @interface ObjCExceptionCatcher : NSObject
8
8
 
9
- + (BOOL)tryBlock:(void(NS_NOESCAPE ^_Nonnull)(void))tryBlock
10
- error:(NSError * _Nullable * _Nullable)error;
9
+ + (BOOL)executeBlock:(void(NS_NOESCAPE ^_Nonnull)(void))block
10
+ error:(NSError * _Nullable * _Nullable)error;
11
11
 
12
12
  @end
@@ -2,9 +2,9 @@
2
2
 
3
3
  @implementation ObjCExceptionCatcher
4
4
 
5
- + (BOOL)tryBlock:(void(NS_NOESCAPE ^)(void))tryBlock error:(NSError **)error {
5
+ + (BOOL)executeBlock:(void(NS_NOESCAPE ^)(void))block error:(NSError **)error {
6
6
  @try {
7
- tryBlock();
7
+ block();
8
8
  return YES;
9
9
  } @catch (NSException *exception) {
10
10
  NSLog(@"[ObjCExceptionCatcher] Caught exception: %@ — %@", exception.name, exception.reason);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@neoskola/auto-play",
3
- "version": "0.2.13",
3
+ "version": "0.2.14",
4
4
  "description": "Android Auto and Apple CarPlay for react-native",
5
5
  "main": "lib/index",
6
6
  "module": "lib/index",