Skip to content

Commit 3bdc11b

Browse files
authored
Merge pull request #40 from arangato/feature/xcode12
2 parents aca8926 + d9e7649 commit 3bdc11b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+102
-408
lines changed

.circleci/config.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ version: 2
22
jobs:
33
build:
44
macos:
5-
xcode: "10.0.0"
5+
xcode: "12.0.0"
66

77
steps:
88
- checkout

Cartfile.private

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
github "jspahrsummers/xcconfigs" "3d9d996"
2-
github "Quick/Quick" ~> 1.3.2
3-
github "Quick/Nimble" ~> 7.3.1
2+
github "Quick/Quick" ~> 3.0.0
3+
github "Quick/Nimble" ~> 8.1.1

Cartfile.resolved

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
github "Quick/Nimble" "v7.3.1"
2-
github "Quick/Quick" "v1.3.2"
1+
github "Quick/Nimble" "v8.1.1"
2+
github "Quick/Quick" "v3.0.0"
33
github "jspahrsummers/xcconfigs" "3d9d99634cae6d586e272543d527681283b33eb0"

Carthage/Checkouts/Nimble

Submodule Nimble updated 128 files

Carthage/Checkouts/Quick

Submodule Quick updated 98 files

ReactiveObjC.xcodeproj/project.pbxproj

+11-32
Original file line numberDiff line numberDiff line change
@@ -568,10 +568,6 @@
568568
D037661319EDA41200A782A9 /* RACUnit.m in Sources */ = {isa = PBXBuildFile; fileRef = D03764BF19EDA41200A782A9 /* RACUnit.m */; };
569569
D037661619EDA41200A782A9 /* RACValueTransformer.m in Sources */ = {isa = PBXBuildFile; fileRef = D03764C119EDA41200A782A9 /* RACValueTransformer.m */; };
570570
D037661719EDA41200A782A9 /* RACValueTransformer.m in Sources */ = {isa = PBXBuildFile; fileRef = D03764C119EDA41200A782A9 /* RACValueTransformer.m */; };
571-
D037661919EDA41200A782A9 /* UIActionSheet+RACSignalSupport.h in Headers */ = {isa = PBXBuildFile; fileRef = D03764C219EDA41200A782A9 /* UIActionSheet+RACSignalSupport.h */; settings = {ATTRIBUTES = (Public, ); }; };
572-
D037661B19EDA41200A782A9 /* UIActionSheet+RACSignalSupport.m in Sources */ = {isa = PBXBuildFile; fileRef = D03764C319EDA41200A782A9 /* UIActionSheet+RACSignalSupport.m */; };
573-
D037661D19EDA41200A782A9 /* UIAlertView+RACSignalSupport.h in Headers */ = {isa = PBXBuildFile; fileRef = D03764C419EDA41200A782A9 /* UIAlertView+RACSignalSupport.h */; settings = {ATTRIBUTES = (Public, ); }; };
574-
D037661F19EDA41200A782A9 /* UIAlertView+RACSignalSupport.m in Sources */ = {isa = PBXBuildFile; fileRef = D03764C519EDA41200A782A9 /* UIAlertView+RACSignalSupport.m */; };
575571
D037662119EDA41200A782A9 /* UIBarButtonItem+RACCommandSupport.h in Headers */ = {isa = PBXBuildFile; fileRef = D03764C619EDA41200A782A9 /* UIBarButtonItem+RACCommandSupport.h */; settings = {ATTRIBUTES = (Public, ); }; };
576572
D037662319EDA41200A782A9 /* UIBarButtonItem+RACCommandSupport.m in Sources */ = {isa = PBXBuildFile; fileRef = D03764C719EDA41200A782A9 /* UIBarButtonItem+RACCommandSupport.m */; };
577573
D037662519EDA41200A782A9 /* UIButton+RACCommandSupport.h in Headers */ = {isa = PBXBuildFile; fileRef = D03764C819EDA41200A782A9 /* UIButton+RACCommandSupport.h */; settings = {ATTRIBUTES = (Public, ); }; };
@@ -692,8 +688,6 @@
692688
D037671619EDA60000A782A9 /* RACTupleSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = D03766B019EDA60000A782A9 /* RACTupleSpec.m */; };
693689
D037671719EDA60000A782A9 /* test-data.json in Resources */ = {isa = PBXBuildFile; fileRef = D03766B119EDA60000A782A9 /* test-data.json */; };
694690
D037671819EDA60000A782A9 /* test-data.json in Resources */ = {isa = PBXBuildFile; fileRef = D03766B119EDA60000A782A9 /* test-data.json */; };
695-
D037671A19EDA60000A782A9 /* UIActionSheetRACSupportSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = D03766B219EDA60000A782A9 /* UIActionSheetRACSupportSpec.m */; };
696-
D037671C19EDA60000A782A9 /* UIAlertViewRACSupportSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = D03766B319EDA60000A782A9 /* UIAlertViewRACSupportSpec.m */; };
697691
D037671E19EDA60000A782A9 /* UIBarButtonItemRACSupportSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = D03766B419EDA60000A782A9 /* UIBarButtonItemRACSupportSpec.m */; };
698692
D037672019EDA60000A782A9 /* UIButtonRACSupportSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = D03766B519EDA60000A782A9 /* UIButtonRACSupportSpec.m */; };
699693
D037672419EDA60000A782A9 /* UIImagePickerControllerRACSupportSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = D03766B719EDA60000A782A9 /* UIImagePickerControllerRACSupportSpec.m */; };
@@ -938,10 +932,6 @@
938932
D03764BF19EDA41200A782A9 /* RACUnit.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RACUnit.m; sourceTree = "<group>"; };
939933
D03764C019EDA41200A782A9 /* RACValueTransformer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RACValueTransformer.h; sourceTree = "<group>"; };
940934
D03764C119EDA41200A782A9 /* RACValueTransformer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RACValueTransformer.m; sourceTree = "<group>"; };
941-
D03764C219EDA41200A782A9 /* UIActionSheet+RACSignalSupport.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIActionSheet+RACSignalSupport.h"; sourceTree = "<group>"; };
942-
D03764C319EDA41200A782A9 /* UIActionSheet+RACSignalSupport.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIActionSheet+RACSignalSupport.m"; sourceTree = "<group>"; };
943-
D03764C419EDA41200A782A9 /* UIAlertView+RACSignalSupport.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIAlertView+RACSignalSupport.h"; sourceTree = "<group>"; };
944-
D03764C519EDA41200A782A9 /* UIAlertView+RACSignalSupport.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIAlertView+RACSignalSupport.m"; sourceTree = "<group>"; };
945935
D03764C619EDA41200A782A9 /* UIBarButtonItem+RACCommandSupport.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIBarButtonItem+RACCommandSupport.h"; sourceTree = "<group>"; };
946936
D03764C719EDA41200A782A9 /* UIBarButtonItem+RACCommandSupport.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIBarButtonItem+RACCommandSupport.m"; sourceTree = "<group>"; };
947937
D03764C819EDA41200A782A9 /* UIButton+RACCommandSupport.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIButton+RACCommandSupport.h"; sourceTree = "<group>"; };
@@ -1029,8 +1019,6 @@
10291019
D03766A819EDA60000A782A9 /* RACTargetQueueSchedulerSpec.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RACTargetQueueSchedulerSpec.m; sourceTree = "<group>"; };
10301020
D03766B019EDA60000A782A9 /* RACTupleSpec.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RACTupleSpec.m; sourceTree = "<group>"; };
10311021
D03766B119EDA60000A782A9 /* test-data.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = "test-data.json"; sourceTree = "<group>"; };
1032-
D03766B219EDA60000A782A9 /* UIActionSheetRACSupportSpec.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = UIActionSheetRACSupportSpec.m; sourceTree = "<group>"; };
1033-
D03766B319EDA60000A782A9 /* UIAlertViewRACSupportSpec.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = UIAlertViewRACSupportSpec.m; sourceTree = "<group>"; };
10341022
D03766B419EDA60000A782A9 /* UIBarButtonItemRACSupportSpec.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = UIBarButtonItemRACSupportSpec.m; sourceTree = "<group>"; };
10351023
D03766B519EDA60000A782A9 /* UIButtonRACSupportSpec.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = UIButtonRACSupportSpec.m; sourceTree = "<group>"; };
10361024
D03766B719EDA60000A782A9 /* UIImagePickerControllerRACSupportSpec.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = UIImagePickerControllerRACSupportSpec.m; sourceTree = "<group>"; };
@@ -1363,10 +1351,6 @@
13631351
D03764C119EDA41200A782A9 /* RACValueTransformer.m */,
13641352
D04725EF19E49ED7006002AA /* ReactiveObjC.h */,
13651353
D04725ED19E49ED7006002AA /* Supporting Files */,
1366-
D03764C219EDA41200A782A9 /* UIActionSheet+RACSignalSupport.h */,
1367-
D03764C319EDA41200A782A9 /* UIActionSheet+RACSignalSupport.m */,
1368-
D03764C419EDA41200A782A9 /* UIAlertView+RACSignalSupport.h */,
1369-
D03764C519EDA41200A782A9 /* UIAlertView+RACSignalSupport.m */,
13701354
D03764C619EDA41200A782A9 /* UIBarButtonItem+RACCommandSupport.h */,
13711355
D03764C719EDA41200A782A9 /* UIBarButtonItem+RACCommandSupport.m */,
13721356
D03764C819EDA41200A782A9 /* UIButton+RACCommandSupport.h */,
@@ -1465,8 +1449,6 @@
14651449
D03766A719EDA60000A782A9 /* RACSubscriptingAssignmentTrampolineSpec.m */,
14661450
D03766A819EDA60000A782A9 /* RACTargetQueueSchedulerSpec.m */,
14671451
D03766B019EDA60000A782A9 /* RACTupleSpec.m */,
1468-
D03766B219EDA60000A782A9 /* UIActionSheetRACSupportSpec.m */,
1469-
D03766B319EDA60000A782A9 /* UIAlertViewRACSupportSpec.m */,
14701452
D03766B419EDA60000A782A9 /* UIBarButtonItemRACSupportSpec.m */,
14711453
D03766B519EDA60000A782A9 /* UIButtonRACSupportSpec.m */,
14721454
D03766B719EDA60000A782A9 /* UIImagePickerControllerRACSupportSpec.m */,
@@ -1768,7 +1750,6 @@
17681750
D037656F19EDA41200A782A9 /* RACDisposable.h in Headers */,
17691751
314304171ACA8B1E00595017 /* MKAnnotationView+RACSignalSupport.h in Headers */,
17701752
D037654519EDA41200A782A9 /* NSURLConnection+RACSupport.h in Headers */,
1771-
D037661D19EDA41200A782A9 /* UIAlertView+RACSignalSupport.h in Headers */,
17721753
D037650D19EDA41200A782A9 /* NSNotificationCenter+RACSupport.h in Headers */,
17731754
D037650119EDA41200A782A9 /* NSFileHandle+RACSupport.h in Headers */,
17741755
D037666119EDA41200A782A9 /* UITextView+RACSignalSupport.h in Headers */,
@@ -1818,7 +1799,6 @@
18181799
A1046B7B1BFF5662004D8045 /* EXTRuntimeExtensions.h in Headers */,
18191800
D037661119EDA41200A782A9 /* RACUnit.h in Headers */,
18201801
D03765FD19EDA41200A782A9 /* RACTargetQueueScheduler.h in Headers */,
1821-
D037661919EDA41200A782A9 /* UIActionSheet+RACSignalSupport.h in Headers */,
18221802
D037664D19EDA41200A782A9 /* UIStepper+RACSignalSupport.h in Headers */,
18231803
D037662119EDA41200A782A9 /* UIBarButtonItem+RACCommandSupport.h in Headers */,
18241804
D03765EB19EDA41200A782A9 /* RACSubject.h in Headers */,
@@ -2441,7 +2421,6 @@
24412421
D037662B19EDA41200A782A9 /* UICollectionReusableView+RACSignalSupport.m in Sources */,
24422422
D037659919EDA41200A782A9 /* RACIndexSetSequence.m in Sources */,
24432423
D03765D919EDA41200A782A9 /* RACSignal+Operations.m in Sources */,
2444-
D037661B19EDA41200A782A9 /* UIActionSheet+RACSignalSupport.m in Sources */,
24452424
D037650319EDA41200A782A9 /* NSFileHandle+RACSupport.m in Sources */,
24462425
D03765E319EDA41200A782A9 /* RACStream.m in Sources */,
24472426
D037655719EDA41200A782A9 /* RACBehaviorSubject.m in Sources */,
@@ -2457,7 +2436,6 @@
24572436
D03764FB19EDA41200A782A9 /* NSDictionary+RACSequenceAdditions.m in Sources */,
24582437
D037656919EDA41200A782A9 /* RACCompoundDisposableProvider.d in Sources */,
24592438
D037653B19EDA41200A782A9 /* NSString+RACSequenceAdditions.m in Sources */,
2460-
D037661F19EDA41200A782A9 /* UIAlertView+RACSignalSupport.m in Sources */,
24612439
D03765E919EDA41200A782A9 /* RACStringSequence.m in Sources */,
24622440
D037660B19EDA41200A782A9 /* RACTupleSequence.m in Sources */,
24632441
D03765D519EDA41200A782A9 /* RACSignal.m in Sources */,
@@ -2556,7 +2534,6 @@
25562534
D0C3132119EF2D9700984962 /* RACTestObject.m in Sources */,
25572535
D03766FC19EDA60000A782A9 /* RACSignalSpec.m in Sources */,
25582536
D037670819EDA60000A782A9 /* RACSubscriberSpec.m in Sources */,
2559-
D037671C19EDA60000A782A9 /* UIAlertViewRACSupportSpec.m in Sources */,
25602537
D03766F019EDA60000A782A9 /* RACPropertySignalExamples.m in Sources */,
25612538
D037670619EDA60000A782A9 /* RACSubscriberExamples.m in Sources */,
25622539
D03766D819EDA60000A782A9 /* RACBlockTrampolineSpec.m in Sources */,
@@ -2570,7 +2547,6 @@
25702547
D03766E619EDA60000A782A9 /* RACDisposableSpec.m in Sources */,
25712548
D03766D419EDA60000A782A9 /* NSUserDefaultsRACSupportSpec.m in Sources */,
25722549
D03766DC19EDA60000A782A9 /* RACChannelSpec.m in Sources */,
2573-
D037671A19EDA60000A782A9 /* UIActionSheetRACSupportSpec.m in Sources */,
25742550
D03766DA19EDA60000A782A9 /* RACChannelExamples.m in Sources */,
25752551
8B33C24021CBD31800BB82D2 /* RACNeverSignalSpec.m in Sources */,
25762552
D03766F619EDA60000A782A9 /* RACSequenceExamples.m in Sources */,
@@ -2790,17 +2766,18 @@
27902766
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
27912767
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
27922768
CLANG_WARN_COMMA = YES;
2769+
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
27932770
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
27942771
CLANG_WARN_STRICT_PROTOTYPES = YES;
27952772
CODE_SIGNING_REQUIRED = NO;
27962773
CURRENT_PROJECT_VERSION = 1;
27972774
ENABLE_TESTABILITY = YES;
2798-
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
2775+
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
27992776
MACOSX_DEPLOYMENT_TARGET = 10.9;
28002777
PRODUCT_BUNDLE_IDENTIFIER = "org.reactivecocoa.$(PRODUCT_NAME:rfc1034identifier)";
28012778
PRODUCT_NAME = "$(PROJECT_NAME)";
28022779
RUN_CLANG_STATIC_ANALYZER = NO;
2803-
TVOS_DEPLOYMENT_TARGET = 9.0;
2780+
TVOS_DEPLOYMENT_TARGET = 12.0;
28042781
VERSIONING_SYSTEM = "apple-generic";
28052782
VERSION_INFO_PREFIX = "";
28062783
WARNING_CFLAGS = (
@@ -2824,12 +2801,12 @@
28242801
CODE_SIGNING_REQUIRED = NO;
28252802
CURRENT_PROJECT_VERSION = 1;
28262803
GCC_OPTIMIZATION_LEVEL = 0;
2827-
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
2804+
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
28282805
MACOSX_DEPLOYMENT_TARGET = 10.9;
28292806
PRODUCT_BUNDLE_IDENTIFIER = "org.reactivecocoa.$(PRODUCT_NAME:rfc1034identifier)";
28302807
PRODUCT_NAME = "$(PROJECT_NAME)";
28312808
RUN_CLANG_STATIC_ANALYZER = NO;
2832-
TVOS_DEPLOYMENT_TARGET = 9.0;
2809+
TVOS_DEPLOYMENT_TARGET = 12.0;
28332810
VERSIONING_SYSTEM = "apple-generic";
28342811
VERSION_INFO_PREFIX = "";
28352812
WARNING_CFLAGS = (
@@ -2927,6 +2904,7 @@
29272904
baseConfigurationReference = D047263219E49FE8006002AA /* iOS-Application.xcconfig */;
29282905
buildSettings = {
29292906
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
2907+
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO;
29302908
INFOPLIST_FILE = ReactiveObjCTests/Info.plist;
29312909
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
29322910
PRODUCT_NAME = "$(PROJECT_NAME)Tests";
@@ -2952,16 +2930,17 @@
29522930
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
29532931
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
29542932
CLANG_WARN_COMMA = YES;
2933+
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
29552934
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
29562935
CLANG_WARN_STRICT_PROTOTYPES = YES;
29572936
CODE_SIGNING_REQUIRED = NO;
29582937
CURRENT_PROJECT_VERSION = 1;
2959-
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
2938+
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
29602939
MACOSX_DEPLOYMENT_TARGET = 10.9;
29612940
PRODUCT_BUNDLE_IDENTIFIER = "org.reactivecocoa.$(PRODUCT_NAME:rfc1034identifier)";
29622941
PRODUCT_NAME = "$(PROJECT_NAME)";
29632942
RUN_CLANG_STATIC_ANALYZER = NO;
2964-
TVOS_DEPLOYMENT_TARGET = 9.0;
2943+
TVOS_DEPLOYMENT_TARGET = 12.0;
29652944
VERSIONING_SYSTEM = "apple-generic";
29662945
VERSION_INFO_PREFIX = "";
29672946
WARNING_CFLAGS = (
@@ -3036,12 +3015,12 @@
30363015
CLANG_WARN_STRICT_PROTOTYPES = YES;
30373016
CODE_SIGNING_REQUIRED = NO;
30383017
CURRENT_PROJECT_VERSION = 1;
3039-
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
3018+
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
30403019
MACOSX_DEPLOYMENT_TARGET = 10.9;
30413020
PRODUCT_BUNDLE_IDENTIFIER = "org.reactivecocoa.$(PRODUCT_NAME:rfc1034identifier)-Tests";
30423021
PRODUCT_NAME = "$(PROJECT_NAME)";
30433022
RUN_CLANG_STATIC_ANALYZER = NO;
3044-
TVOS_DEPLOYMENT_TARGET = 9.0;
3023+
TVOS_DEPLOYMENT_TARGET = 12.0;
30453024
VERSIONING_SYSTEM = "apple-generic";
30463025
VERSION_INFO_PREFIX = "";
30473026
WARNING_CFLAGS = (

ReactiveObjC/NSObject+RACPropertySubscribing.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
#import <Foundation/Foundation.h>
1010
#import <ReactiveObjC/EXTKeyPathCoding.h>
11-
#import "metamacros.h"
11+
#import <ReactiveObjC/metamacros.h>
1212

1313
/// Creates a signal which observes `KEYPATH` on `TARGET` for changes.
1414
///

ReactiveObjC/NSObject+RACPropertySubscribing.m

-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
#import "RACSubscriber.h"
1818
#import "RACSignal+Operations.h"
1919
#import "RACTuple.h"
20-
#import <libkern/OSAtomic.h>
2120

2221
@implementation NSObject (RACPropertySubscribing)
2322

ReactiveObjC/RACBehaviorSubject.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
// Copyright (c) 2012 GitHub, Inc. All rights reserved.
77
//
88

9-
#import "RACSubject.h"
9+
#import <ReactiveObjC/RACSubject.h>
1010

1111
NS_ASSUME_NONNULL_BEGIN
1212

ReactiveObjC/RACChannel.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
// Copyright (c) 2013 GitHub, Inc. All rights reserved.
77
//
88

9-
#import "RACSignal.h"
10-
#import "RACSubscriber.h"
9+
#import <ReactiveObjC/RACSignal.h>
10+
#import <ReactiveObjC/RACSubscriber.h>
1111

1212
@class RACChannelTerminal<ValueType>;
1313

ReactiveObjC/RACCommand.m

+4-4
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
#import "RACScheduler.h"
1818
#import "RACSequence.h"
1919
#import "RACSignal+Operations.h"
20-
#import <libkern/OSAtomic.h>
20+
#import <stdatomic.h>
2121

2222
NSString * const RACCommandErrorDomain = @"RACCommandErrorDomain";
2323
NSString * const RACUnderlyingCommandErrorKey = @"RACUnderlyingCommandErrorKey";
@@ -26,7 +26,7 @@
2626

2727
@interface RACCommand () {
2828
// Atomic backing variable for `allowsConcurrentExecution`.
29-
volatile uint32_t _allowsConcurrentExecution;
29+
atomic_bool _allowsConcurrentExecution;
3030
}
3131

3232
/// A subject that sends added execution signals.
@@ -55,9 +55,9 @@ - (BOOL)allowsConcurrentExecution {
5555

5656
- (void)setAllowsConcurrentExecution:(BOOL)allowed {
5757
if (allowed) {
58-
OSAtomicOr32Barrier(1, &_allowsConcurrentExecution);
58+
_allowsConcurrentExecution = true;
5959
} else {
60-
OSAtomicAnd32Barrier(0, &_allowsConcurrentExecution);
60+
_allowsConcurrentExecution = false;
6161
}
6262

6363
[self.allowsConcurrentExecutionSubject sendNext:@(_allowsConcurrentExecution)];

ReactiveObjC/RACCompoundDisposable.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
// Copyright (c) 2012 GitHub, Inc. All rights reserved.
77
//
88

9-
#import "RACDisposable.h"
9+
#import <ReactiveObjC/RACDisposable.h>
1010

1111
NS_ASSUME_NONNULL_BEGIN
1212

ReactiveObjC/RACDisposable.m

+6-6
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@
88

99
#import "RACDisposable.h"
1010
#import "RACScopedDisposable.h"
11-
#import <libkern/OSAtomic.h>
11+
#import <stdatomic.h>
1212

1313
@interface RACDisposable () {
1414
// A copied block of type void (^)(void) containing the logic for disposal,
1515
// a pointer to `self` if no logic should be performed upon disposal, or
1616
// NULL if the receiver is already disposed.
1717
//
1818
// This should only be used atomically.
19-
void * volatile _disposeBlock;
19+
_Atomic(void *) _disposeBlock;
2020
}
2121

2222
@end
@@ -35,7 +35,7 @@ - (instancetype)init {
3535
self = [super init];
3636

3737
_disposeBlock = (__bridge void *)self;
38-
OSMemoryBarrier();
38+
atomic_thread_fence(memory_order_seq_cst);
3939

4040
return self;
4141
}
@@ -45,8 +45,8 @@ - (instancetype)initWithBlock:(void (^)(void))block {
4545

4646
self = [super init];
4747

48-
_disposeBlock = (void *)CFBridgingRetain([block copy]);
49-
OSMemoryBarrier();
48+
_disposeBlock = (void *)CFBridgingRetain([block copy]);
49+
atomic_thread_fence(memory_order_seq_cst);
5050

5151
return self;
5252
}
@@ -69,7 +69,7 @@ - (void)dispose {
6969

7070
while (YES) {
7171
void *blockPtr = _disposeBlock;
72-
if (OSAtomicCompareAndSwapPtrBarrier(blockPtr, NULL, &_disposeBlock)) {
72+
if (atomic_compare_exchange_strong(&_disposeBlock, &blockPtr, NULL)) {
7373
if (blockPtr != (__bridge void *)self) {
7474
disposeBlock = CFBridgingRelease(blockPtr);
7575
}

ReactiveObjC/RACDynamicSequence.m

+4-4
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
//
88

99
#import "RACDynamicSequence.h"
10-
#import <libkern/OSAtomic.h>
10+
#import <stdatomic.h>
1111

1212
// Determines how RACDynamicSequences will be deallocated before the next one is
1313
// shifted onto the autorelease pool.
@@ -114,10 +114,10 @@ + (RACSequence *)sequenceWithLazyDependency:(id (^)(void))dependencyBlock headBl
114114
}
115115

116116
- (void)dealloc {
117-
static volatile int32_t directDeallocCount = 0;
117+
static atomic_int directDeallocCount = 0;
118118

119-
if (OSAtomicIncrement32(&directDeallocCount) >= DEALLOC_OVERFLOW_GUARD) {
120-
OSAtomicAdd32(-DEALLOC_OVERFLOW_GUARD, &directDeallocCount);
119+
if (atomic_fetch_add(&directDeallocCount, 1) + 1 >= DEALLOC_OVERFLOW_GUARD) {
120+
atomic_fetch_add(&directDeallocCount, -DEALLOC_OVERFLOW_GUARD);
121121

122122
// Put this sequence's tail onto the autorelease pool so we stop
123123
// recursing.

ReactiveObjC/RACDynamicSignal.m

-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
#import "RACPassthroughSubscriber.h"
1313
#import "RACScheduler+Private.h"
1414
#import "RACSubscriber.h"
15-
#import <libkern/OSAtomic.h>
1615

1716
@interface RACDynamicSignal ()
1817

ReactiveObjC/RACGroupedSignal.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
// Copyright (c) 2012 GitHub, Inc. All rights reserved.
77
//
88

9-
#import "RACSubject.h"
9+
#import <ReactiveObjC/RACSubject.h>
1010

1111
NS_ASSUME_NONNULL_BEGIN
1212

ReactiveObjC/RACKVOChannel.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
// Copyright (c) 2012 GitHub, Inc. All rights reserved.
77
//
88

9-
#import "RACChannel.h"
9+
#import <ReactiveObjC/RACChannel.h>
1010
#import <ReactiveObjC/EXTKeyPathCoding.h>
11-
#import "metamacros.h"
11+
#import <ReactiveObjC/metamacros.h>
1212

1313
/// Creates a RACKVOChannel to the given key path. When the targeted object
1414
/// deallocates, the channel will complete.

0 commit comments

Comments
 (0)