diff --git a/.travis.yml b/.travis.yml index a15d29916..3760af61c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,5 @@ language: objective-c -osx_image: xcode9 +osx_image: xcode10 before_install: true install: true branches: @@ -24,7 +24,7 @@ matrix: env: - XCODE_SDK=appletvsimulator - XCODE_ACTION="build-for-testing test-without-building" - - XCODE_DESTINATION="platform=tvOS Simulator,name=Apple TV 1080p" + - XCODE_DESTINATION="platform=tvOS Simulator,name=Apple TV 4K" - xcode_scheme: ReactiveObjC-watchOS env: - XCODE_SDK=watchsimulator @@ -55,6 +55,7 @@ matrix: env: - JOB=CARTHAGE-watchOS - script: + - gem install cocoapods --pre - pod repo update --silent - pod lib lint ReactiveObjC.podspec env: diff --git a/Cartfile.resolved b/Cartfile.resolved index e51e1869a..1dec54b7a 100644 --- a/Cartfile.resolved +++ b/Cartfile.resolved @@ -1,3 +1,3 @@ -github "Quick/Nimble" "v7.0.2" +github "Quick/Nimble" "v7.3.1" github "Quick/Quick" "v1.2.0" github "jspahrsummers/xcconfigs" "3d9d99634cae6d586e272543d527681283b33eb0" diff --git a/Carthage/Checkouts/Nimble b/Carthage/Checkouts/Nimble index 38c9ab084..cd6dfb86f 160000 --- a/Carthage/Checkouts/Nimble +++ b/Carthage/Checkouts/Nimble @@ -1 +1 @@ -Subproject commit 38c9ab0846a3fbec308eb2aa9ef68b10a7434eb4 +Subproject commit cd6dfb86f496fcd96ce0bc6da962cd936bf41903 diff --git a/ReactiveObjC.xcodeproj/project.pbxproj b/ReactiveObjC.xcodeproj/project.pbxproj index 1417bb70f..af597fe65 100644 --- a/ReactiveObjC.xcodeproj/project.pbxproj +++ b/ReactiveObjC.xcodeproj/project.pbxproj @@ -13,6 +13,13 @@ 3A17B4A71E8EFDD800C8999E /* RACAnnotations.h in Headers */ = {isa = PBXBuildFile; fileRef = 3A17B4A51E8EFDCD00C8999E /* RACAnnotations.h */; settings = {ATTRIBUTES = (Public, ); }; }; 3A17B4A81E8EFDDA00C8999E /* RACAnnotations.h in Headers */ = {isa = PBXBuildFile; fileRef = 3A17B4A51E8EFDCD00C8999E /* RACAnnotations.h */; settings = {ATTRIBUTES = (Public, ); }; }; 3A17B4A91E8EFDDF00C8999E /* RACAnnotations.h in Headers */ = {isa = PBXBuildFile; fileRef = 3A17B4A51E8EFDCD00C8999E /* RACAnnotations.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 4AC5B3B221D405B8005920AA /* RACSwiftBridgingSpec.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4AC5B3B121D405B8005920AA /* RACSwiftBridgingSpec.swift */; }; + 4AC5B3B321D405B8005920AA /* RACSwiftBridgingSpec.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4AC5B3B121D405B8005920AA /* RACSwiftBridgingSpec.swift */; }; + 4AC5B3B421D405B8005920AA /* RACSwiftBridgingSpec.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4AC5B3B121D405B8005920AA /* RACSwiftBridgingSpec.swift */; }; + 4AC5B3B621D40E75005920AA /* Deprecations+Removals.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4AC5B3B521D40E75005920AA /* Deprecations+Removals.swift */; }; + 4AC5B3B721D40E75005920AA /* Deprecations+Removals.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4AC5B3B521D40E75005920AA /* Deprecations+Removals.swift */; }; + 4AC5B3B821D40E75005920AA /* Deprecations+Removals.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4AC5B3B521D40E75005920AA /* Deprecations+Removals.swift */; }; + 4AC5B3B921D40E75005920AA /* Deprecations+Removals.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4AC5B3B521D40E75005920AA /* Deprecations+Removals.swift */; }; 57A4D1B21BA13D7A00F7D4B1 /* RACCompoundDisposableProvider.d in Sources */ = {isa = PBXBuildFile; fileRef = D037646A19EDA41200A782A9 /* RACCompoundDisposableProvider.d */; }; 57A4D1B31BA13D7A00F7D4B1 /* RACSignalProvider.d in Sources */ = {isa = PBXBuildFile; fileRef = D03764A319EDA41200A782A9 /* RACSignalProvider.d */; }; 57A4D1C11BA13D7A00F7D4B1 /* EXTRuntimeExtensions.m in Sources */ = {isa = PBXBuildFile; fileRef = D037666819EDA57100A782A9 /* EXTRuntimeExtensions.m */; }; @@ -765,6 +772,8 @@ 314304151ACA8B1E00595017 /* MKAnnotationView+RACSignalSupport.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "MKAnnotationView+RACSignalSupport.h"; sourceTree = ""; }; 314304161ACA8B1E00595017 /* MKAnnotationView+RACSignalSupport.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "MKAnnotationView+RACSignalSupport.m"; sourceTree = ""; }; 3A17B4A51E8EFDCD00C8999E /* RACAnnotations.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RACAnnotations.h; sourceTree = ""; }; + 4AC5B3B121D405B8005920AA /* RACSwiftBridgingSpec.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RACSwiftBridgingSpec.swift; sourceTree = ""; }; + 4AC5B3B521D40E75005920AA /* Deprecations+Removals.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Deprecations+Removals.swift"; sourceTree = ""; }; 57A4D2411BA13D7A00F7D4B1 /* ReactiveObjC.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = ReactiveObjC.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 57A4D2441BA13F9700F7D4B1 /* tvOS-Application.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "tvOS-Application.xcconfig"; sourceTree = ""; }; 57A4D2451BA13F9700F7D4B1 /* tvOS-Base.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "tvOS-Base.xcconfig"; sourceTree = ""; }; @@ -1184,6 +1193,7 @@ isa = PBXGroup; children = ( D037666519EDA57100A782A9 /* extobjc */, + 4AC5B3B521D40E75005920AA /* Deprecations+Removals.swift */, 314304151ACA8B1E00595017 /* MKAnnotationView+RACSignalSupport.h */, 314304161ACA8B1E00595017 /* MKAnnotationView+RACSignalSupport.m */, D037642A19EDA41200A782A9 /* NSArray+RACSequenceAdditions.h */, @@ -1438,6 +1448,7 @@ D03766A519EDA60000A782A9 /* RACSubscriberExamples.m */, D03766A619EDA60000A782A9 /* RACSubscriberSpec.m */, D03766A719EDA60000A782A9 /* RACSubscriptingAssignmentTrampolineSpec.m */, + 4AC5B3B121D405B8005920AA /* RACSwiftBridgingSpec.swift */, D03766A819EDA60000A782A9 /* RACTargetQueueSchedulerSpec.m */, D03766B019EDA60000A782A9 /* RACTupleSpec.m */, D03766B219EDA60000A782A9 /* UIActionSheetRACSupportSpec.m */, @@ -1944,31 +1955,31 @@ ORGANIZATIONNAME = GitHub; TargetAttributes = { 57A4D1AF1BA13D7A00F7D4B1 = { - LastSwiftMigration = 0800; + LastSwiftMigration = 1010; }; 7DFBED021CDB8C9500EE435B = { CreatedOnToolsVersion = 7.3.1; - LastSwiftMigration = 0800; + LastSwiftMigration = 1010; }; A9B315531B3940610001CB9C = { CreatedOnToolsVersion = 7.0; - LastSwiftMigration = 0800; + LastSwiftMigration = 1010; }; D04725E919E49ED7006002AA = { CreatedOnToolsVersion = 6.1; - LastSwiftMigration = 0800; + LastSwiftMigration = 1010; }; D04725F419E49ED7006002AA = { CreatedOnToolsVersion = 6.1; - LastSwiftMigration = 0800; + LastSwiftMigration = 1010; }; D047260B19E49F82006002AA = { CreatedOnToolsVersion = 6.1; - LastSwiftMigration = 0800; + LastSwiftMigration = 1010; }; D047261519E49F82006002AA = { CreatedOnToolsVersion = 6.1; - LastSwiftMigration = 0800; + LastSwiftMigration = 1010; }; }; }; @@ -2130,6 +2141,7 @@ 57A4D1FE1BA13D7A00F7D4B1 /* RACSubscriptionScheduler.m in Sources */, 57A4D1FF1BA13D7A00F7D4B1 /* RACTargetQueueScheduler.m in Sources */, 57A4D2001BA13D7A00F7D4B1 /* RACTestScheduler.m in Sources */, + 4AC5B3B921D40E75005920AA /* Deprecations+Removals.swift in Sources */, 57A4D2011BA13D7A00F7D4B1 /* RACTuple.m in Sources */, 57A4D2021BA13D7A00F7D4B1 /* RACTupleSequence.m in Sources */, 57A4D2031BA13D7A00F7D4B1 /* RACUnarySequence.m in Sources */, @@ -2179,6 +2191,7 @@ 7DFBED5E1CDB8DE300EE435B /* RACSubscriptingAssignmentTrampolineSpec.m in Sources */, 7DFBED5F1CDB8DE300EE435B /* RACTargetQueueSchedulerSpec.m in Sources */, 7DFBED601CDB8DE300EE435B /* RACTupleSpec.m in Sources */, + 4AC5B3B421D405B8005920AA /* RACSwiftBridgingSpec.swift in Sources */, 7DFBED631CDB8DE300EE435B /* UIBarButtonItemRACSupportSpec.m in Sources */, 7DFBED641CDB8DE300EE435B /* UIButtonRACSupportSpec.m in Sources */, 7DFBED671CDB8DE300EE435B /* RACTestExampleScheduler.m in Sources */, @@ -2249,6 +2262,7 @@ A9B315991B3940750001CB9C /* RACSignal+Operations.m in Sources */, A9B3159A1B3940750001CB9C /* RACSignalSequence.m in Sources */, A9B3159B1B3940750001CB9C /* RACStream.m in Sources */, + 4AC5B3B821D40E75005920AA /* Deprecations+Removals.swift in Sources */, A9B3159C1B3940750001CB9C /* RACStringSequence.m in Sources */, A9B3159D1B3940750001CB9C /* RACSubject.m in Sources */, A9B3159E1B3940750001CB9C /* RACSubscriber.m in Sources */, @@ -2340,6 +2354,7 @@ D037658C19EDA41200A782A9 /* RACEvent.m in Sources */, D03765B219EDA41200A782A9 /* RACQueueScheduler.m in Sources */, D037652A19EDA41200A782A9 /* NSObject+RACSelectorSignal.m in Sources */, + 4AC5B3B621D40E75005920AA /* Deprecations+Removals.swift in Sources */, D03765AE19EDA41200A782A9 /* RACPassthroughSubscriber.m in Sources */, D03765BC19EDA41200A782A9 /* RACReturnSignal.m in Sources */, ); @@ -2386,6 +2401,7 @@ D03766DF19EDA60000A782A9 /* RACCompoundDisposableSpec.m in Sources */, D03766E519EDA60000A782A9 /* RACDisposableSpec.m in Sources */, D0C3132019EF2D9700984962 /* RACTestObject.m in Sources */, + 4AC5B3B221D405B8005920AA /* RACSwiftBridgingSpec.swift in Sources */, D03766D319EDA60000A782A9 /* NSUserDefaultsRACSupportSpec.m in Sources */, D03766C119EDA60000A782A9 /* NSObjectRACAppKitBindingsSpec.m in Sources */, D03766DB19EDA60000A782A9 /* RACChannelSpec.m in Sources */, @@ -2442,6 +2458,7 @@ D03765FB19EDA41200A782A9 /* RACSubscriptionScheduler.m in Sources */, D037658119EDA41200A782A9 /* RACEmptySequence.m in Sources */, D037654B19EDA41200A782A9 /* NSUserDefaults+RACSupport.m in Sources */, + 4AC5B3B721D40E75005920AA /* Deprecations+Removals.swift in Sources */, D037660F19EDA41200A782A9 /* RACUnarySequence.m in Sources */, D03765FF19EDA41200A782A9 /* RACTargetQueueScheduler.m in Sources */, D03765DF19EDA41200A782A9 /* RACSignalSequence.m in Sources */, @@ -2537,6 +2554,7 @@ D037670419EDA60000A782A9 /* RACSubjectSpec.m in Sources */, D03766F219EDA60000A782A9 /* RACSchedulerSpec.m in Sources */, D03766E019EDA60000A782A9 /* RACCompoundDisposableSpec.m in Sources */, + 4AC5B3B321D405B8005920AA /* RACSwiftBridgingSpec.swift in Sources */, D03766E619EDA60000A782A9 /* RACDisposableSpec.m in Sources */, D03766D419EDA60000A782A9 /* NSUserDefaultsRACSupportSpec.m in Sources */, D03766DC19EDA60000A782A9 /* RACChannelSpec.m in Sources */, @@ -2571,6 +2589,9 @@ isa = XCBuildConfiguration; baseConfigurationReference = 57A4D2461BA13F9700F7D4B1 /* tvOS-Framework.xcconfig */; buildSettings = { + CLANG_ENABLE_MODULES = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; ENABLE_BITCODE = YES; @@ -2579,6 +2600,8 @@ "DTRACE_PROBES_DISABLED=1", ); INFOPLIST_FILE = ReactiveObjC/Info.plist; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 4.2; }; name = Debug; }; @@ -2586,6 +2609,9 @@ isa = XCBuildConfiguration; baseConfigurationReference = 57A4D2461BA13F9700F7D4B1 /* tvOS-Framework.xcconfig */; buildSettings = { + CLANG_ENABLE_MODULES = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; ENABLE_BITCODE = YES; @@ -2594,6 +2620,8 @@ "DTRACE_PROBES_DISABLED=1", ); INFOPLIST_FILE = ReactiveObjC/Info.plist; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 4.2; }; name = Test; }; @@ -2601,6 +2629,9 @@ isa = XCBuildConfiguration; baseConfigurationReference = 57A4D2461BA13F9700F7D4B1 /* tvOS-Framework.xcconfig */; buildSettings = { + CLANG_ENABLE_MODULES = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; ENABLE_BITCODE = YES; @@ -2609,6 +2640,8 @@ "DTRACE_PROBES_DISABLED=1", ); INFOPLIST_FILE = ReactiveObjC/Info.plist; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 4.2; }; name = Release; }; @@ -2616,6 +2649,9 @@ isa = XCBuildConfiguration; baseConfigurationReference = 57A4D2461BA13F9700F7D4B1 /* tvOS-Framework.xcconfig */; buildSettings = { + CLANG_ENABLE_MODULES = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; ENABLE_BITCODE = YES; @@ -2624,6 +2660,7 @@ "DTRACE_PROBES_DISABLED=1", ); INFOPLIST_FILE = ReactiveObjC/Info.plist; + SWIFT_VERSION = 4.2; }; name = Profile; }; @@ -2632,14 +2669,16 @@ baseConfigurationReference = 57A4D2441BA13F9700F7D4B1 /* tvOS-Application.xcconfig */; buildSettings = { ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + CLANG_ENABLE_MODULES = YES; CODE_SIGN_IDENTITY = ""; FRAMEWORK_SEARCH_PATHS = ( "$(SDKROOT)/Developer/Library/Frameworks", "$(inherited)", ); INFOPLIST_FILE = ReactiveObjCTests/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_NAME = "$(PROJECT_NAME)Tests"; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 4.2; }; name = Debug; }; @@ -2648,14 +2687,16 @@ baseConfigurationReference = 57A4D2441BA13F9700F7D4B1 /* tvOS-Application.xcconfig */; buildSettings = { ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + CLANG_ENABLE_MODULES = YES; CODE_SIGN_IDENTITY = ""; FRAMEWORK_SEARCH_PATHS = ( "$(SDKROOT)/Developer/Library/Frameworks", "$(inherited)", ); INFOPLIST_FILE = ReactiveObjCTests/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_NAME = "$(PROJECT_NAME)Tests"; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 4.2; }; name = Test; }; @@ -2664,14 +2705,16 @@ baseConfigurationReference = 57A4D2441BA13F9700F7D4B1 /* tvOS-Application.xcconfig */; buildSettings = { ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + CLANG_ENABLE_MODULES = YES; CODE_SIGN_IDENTITY = ""; FRAMEWORK_SEARCH_PATHS = ( "$(SDKROOT)/Developer/Library/Frameworks", "$(inherited)", ); INFOPLIST_FILE = ReactiveObjCTests/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_NAME = "$(PROJECT_NAME)Tests"; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 4.2; }; name = Release; }; @@ -2680,14 +2723,15 @@ baseConfigurationReference = 57A4D2441BA13F9700F7D4B1 /* tvOS-Application.xcconfig */; buildSettings = { ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + CLANG_ENABLE_MODULES = YES; CODE_SIGN_IDENTITY = ""; FRAMEWORK_SEARCH_PATHS = ( "$(SDKROOT)/Developer/Library/Frameworks", "$(inherited)", ); INFOPLIST_FILE = ReactiveObjCTests/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_NAME = "$(PROJECT_NAME)Tests"; + SWIFT_VERSION = 4.2; }; name = Profile; }; @@ -2695,6 +2739,9 @@ isa = XCBuildConfiguration; baseConfigurationReference = A97451351B3A935E00F48E55 /* watchOS-Framework.xcconfig */; buildSettings = { + CLANG_ENABLE_MODULES = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; ENABLE_BITCODE = YES; @@ -2703,6 +2750,8 @@ "DTRACE_PROBES_DISABLED=1", ); INFOPLIST_FILE = ReactiveObjC/Info.plist; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 4.2; }; name = Debug; }; @@ -2710,6 +2759,9 @@ isa = XCBuildConfiguration; baseConfigurationReference = A97451351B3A935E00F48E55 /* watchOS-Framework.xcconfig */; buildSettings = { + CLANG_ENABLE_MODULES = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; ENABLE_BITCODE = YES; @@ -2718,6 +2770,8 @@ "DTRACE_PROBES_DISABLED=1", ); INFOPLIST_FILE = ReactiveObjC/Info.plist; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 4.2; }; name = Test; }; @@ -2725,6 +2779,9 @@ isa = XCBuildConfiguration; baseConfigurationReference = A97451351B3A935E00F48E55 /* watchOS-Framework.xcconfig */; buildSettings = { + CLANG_ENABLE_MODULES = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; ENABLE_BITCODE = YES; @@ -2733,6 +2790,8 @@ "DTRACE_PROBES_DISABLED=1", ); INFOPLIST_FILE = ReactiveObjC/Info.plist; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 4.2; }; name = Release; }; @@ -2740,6 +2799,9 @@ isa = XCBuildConfiguration; baseConfigurationReference = A97451351B3A935E00F48E55 /* watchOS-Framework.xcconfig */; buildSettings = { + CLANG_ENABLE_MODULES = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; ENABLE_BITCODE = YES; @@ -2748,6 +2810,7 @@ "DTRACE_PROBES_DISABLED=1", ); INFOPLIST_FILE = ReactiveObjC/Info.plist; + SWIFT_VERSION = 4.2; }; name = Profile; }; @@ -2801,11 +2864,15 @@ isa = XCBuildConfiguration; baseConfigurationReference = D047263A19E49FE8006002AA /* Mac-Framework.xcconfig */; buildSettings = { + CLANG_ENABLE_MODULES = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; FRAMEWORK_VERSION = A; INFOPLIST_FILE = ReactiveObjC/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks"; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 4.2; USER_HEADER_SEARCH_PATHS = ReactiveObjC/extobjc; }; name = Debug; @@ -2814,11 +2881,15 @@ isa = XCBuildConfiguration; baseConfigurationReference = D047263A19E49FE8006002AA /* Mac-Framework.xcconfig */; buildSettings = { + CLANG_ENABLE_MODULES = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; FRAMEWORK_VERSION = A; INFOPLIST_FILE = ReactiveObjC/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks"; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 4.2; USER_HEADER_SEARCH_PATHS = ReactiveObjC/extobjc; }; name = Release; @@ -2828,13 +2899,15 @@ baseConfigurationReference = D047263719E49FE8006002AA /* Mac-Application.xcconfig */; buildSettings = { ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + CLANG_ENABLE_MODULES = YES; FRAMEWORK_SEARCH_PATHS = ( "$(DEVELOPER_FRAMEWORKS_DIR)", "$(inherited)", ); INFOPLIST_FILE = ReactiveObjCTests/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; PRODUCT_NAME = "$(PROJECT_NAME)Tests"; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 4.2; }; name = Debug; }; @@ -2843,13 +2916,15 @@ baseConfigurationReference = D047263719E49FE8006002AA /* Mac-Application.xcconfig */; buildSettings = { ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + CLANG_ENABLE_MODULES = YES; FRAMEWORK_SEARCH_PATHS = ( "$(DEVELOPER_FRAMEWORKS_DIR)", "$(inherited)", ); INFOPLIST_FILE = ReactiveObjCTests/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; PRODUCT_NAME = "$(PROJECT_NAME)Tests"; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 4.2; }; name = Release; }; @@ -2857,11 +2932,15 @@ isa = XCBuildConfiguration; baseConfigurationReference = D047263419E49FE8006002AA /* iOS-Framework.xcconfig */; buildSettings = { + CLANG_ENABLE_MODULES = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; ENABLE_BITCODE = YES; INFOPLIST_FILE = ReactiveObjC/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 4.2; USER_HEADER_SEARCH_PATHS = ReactiveObjC/extobjc; }; name = Debug; @@ -2870,11 +2949,15 @@ isa = XCBuildConfiguration; baseConfigurationReference = D047263419E49FE8006002AA /* iOS-Framework.xcconfig */; buildSettings = { + CLANG_ENABLE_MODULES = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; ENABLE_BITCODE = YES; INFOPLIST_FILE = ReactiveObjC/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 4.2; USER_HEADER_SEARCH_PATHS = ReactiveObjC/extobjc; }; name = Release; @@ -2884,9 +2967,11 @@ baseConfigurationReference = D047263219E49FE8006002AA /* iOS-Application.xcconfig */; buildSettings = { ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + CLANG_ENABLE_MODULES = YES; INFOPLIST_FILE = ReactiveObjCTests/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_NAME = "$(PROJECT_NAME)Tests"; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 4.2; }; name = Debug; }; @@ -2895,9 +2980,11 @@ baseConfigurationReference = D047263219E49FE8006002AA /* iOS-Application.xcconfig */; buildSettings = { ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + CLANG_ENABLE_MODULES = YES; INFOPLIST_FILE = ReactiveObjCTests/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_NAME = "$(PROJECT_NAME)Tests"; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 4.2; }; name = Release; }; @@ -2927,11 +3014,14 @@ isa = XCBuildConfiguration; baseConfigurationReference = D047263A19E49FE8006002AA /* Mac-Framework.xcconfig */; buildSettings = { + CLANG_ENABLE_MODULES = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; FRAMEWORK_VERSION = A; INFOPLIST_FILE = ReactiveObjC/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks"; + SWIFT_VERSION = 4.2; USER_HEADER_SEARCH_PATHS = ReactiveObjC/extobjc; }; name = Profile; @@ -2941,13 +3031,14 @@ baseConfigurationReference = D047263719E49FE8006002AA /* Mac-Application.xcconfig */; buildSettings = { ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + CLANG_ENABLE_MODULES = YES; FRAMEWORK_SEARCH_PATHS = ( "$(DEVELOPER_FRAMEWORKS_DIR)", "$(inherited)", ); INFOPLIST_FILE = ReactiveObjCTests/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; PRODUCT_NAME = "$(PROJECT_NAME)Tests"; + SWIFT_VERSION = 4.2; }; name = Profile; }; @@ -2955,11 +3046,14 @@ isa = XCBuildConfiguration; baseConfigurationReference = D047263419E49FE8006002AA /* iOS-Framework.xcconfig */; buildSettings = { + CLANG_ENABLE_MODULES = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; ENABLE_BITCODE = YES; INFOPLIST_FILE = ReactiveObjC/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + SWIFT_VERSION = 4.2; USER_HEADER_SEARCH_PATHS = ReactiveObjC/extobjc; }; name = Profile; @@ -2969,9 +3063,10 @@ baseConfigurationReference = D047263219E49FE8006002AA /* iOS-Application.xcconfig */; buildSettings = { ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + CLANG_ENABLE_MODULES = YES; INFOPLIST_FILE = ReactiveObjCTests/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_NAME = "$(PROJECT_NAME)Tests"; + SWIFT_VERSION = 4.2; }; name = Profile; }; @@ -3001,11 +3096,15 @@ isa = XCBuildConfiguration; baseConfigurationReference = D047263A19E49FE8006002AA /* Mac-Framework.xcconfig */; buildSettings = { + CLANG_ENABLE_MODULES = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; FRAMEWORK_VERSION = A; INFOPLIST_FILE = ReactiveObjC/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks"; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 4.2; USER_HEADER_SEARCH_PATHS = ReactiveObjC/extobjc; }; name = Test; @@ -3015,13 +3114,15 @@ baseConfigurationReference = D047263719E49FE8006002AA /* Mac-Application.xcconfig */; buildSettings = { ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + CLANG_ENABLE_MODULES = YES; FRAMEWORK_SEARCH_PATHS = ( "$(DEVELOPER_FRAMEWORKS_DIR)", "$(inherited)", ); INFOPLIST_FILE = ReactiveObjCTests/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; PRODUCT_NAME = "$(PROJECT_NAME)Tests"; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 4.2; }; name = Test; }; @@ -3029,11 +3130,15 @@ isa = XCBuildConfiguration; baseConfigurationReference = D047263419E49FE8006002AA /* iOS-Framework.xcconfig */; buildSettings = { + CLANG_ENABLE_MODULES = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; ENABLE_BITCODE = YES; INFOPLIST_FILE = ReactiveObjC/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 4.2; USER_HEADER_SEARCH_PATHS = ReactiveObjC/extobjc; }; name = Test; @@ -3043,9 +3148,11 @@ baseConfigurationReference = D047263219E49FE8006002AA /* iOS-Application.xcconfig */; buildSettings = { ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + CLANG_ENABLE_MODULES = YES; INFOPLIST_FILE = ReactiveObjCTests/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_NAME = "$(PROJECT_NAME)Tests"; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 4.2; }; name = Test; }; diff --git a/ReactiveObjC/Deprecations+Removals.swift b/ReactiveObjC/Deprecations+Removals.swift new file mode 100644 index 000000000..acd3784fe --- /dev/null +++ b/ReactiveObjC/Deprecations+Removals.swift @@ -0,0 +1,19 @@ +// +// Deprecations+Removals.swift +// ReactiveObjC +// +// Created by Adam Sharp on 26/12/18. +// Copyright © 2018 GitHub. All rights reserved. +// + +@available(*, deprecated, renamed: "RACSignalError.notEnabled") +public let RACCommandErrorNotEnabled = RACCommandError.notEnabled.rawValue + +@available(*, deprecated, renamed: "RACSignalError.methodSwizzlingRace") +public let RACSelectorSignalErrorMethodSwizzlingRace = RACSelectorSignalError.methodSwizzlingRace + +@available(*, deprecated, renamed: "RACSignalError.noMatchingCase") +public let RACSignalErrorNoMatchingCase = RACSignalError.noMatchingCase.rawValue + +@available(*, deprecated, renamed: "RACSignalError.timedOut") +public let RACSignalErrorTimedOut = RACSignalError.timedOut.rawValue diff --git a/ReactiveObjC/NSObject+RACAppKitBindings.m b/ReactiveObjC/NSObject+RACAppKitBindings.m index 9c00edda0..06fd5d011 100644 --- a/ReactiveObjC/NSObject+RACAppKitBindings.m +++ b/ReactiveObjC/NSObject+RACAppKitBindings.m @@ -93,7 +93,7 @@ - (instancetype)initWithTarget:(id)target bindingName:(NSString *)bindingName op @weakify(self); - void (^cleanUp)() = ^{ + void (^cleanUp)(void) = ^{ @strongify(self); id target = self.target; diff --git a/ReactiveObjC/NSObject+RACKVOWrapper.m b/ReactiveObjC/NSObject+RACKVOWrapper.m index 32e99e266..099dc773a 100644 --- a/ReactiveObjC/NSObject+RACKVOWrapper.m +++ b/ReactiveObjC/NSObject+RACKVOWrapper.m @@ -54,7 +54,7 @@ - (RACDisposable *)rac_observeKeyPath:(NSString *)keyPath options:(NSKeyValueObs BOOL isObject = attributes->objectClass != nil || strstr(attributes->type, @encode(id)) == attributes->type; BOOL isProtocol = attributes->objectClass == NSClassFromString(@"Protocol"); - BOOL isBlock = strcmp(attributes->type, @encode(void(^)())) == 0; + BOOL isBlock = strcmp(attributes->type, @encode(void(^)(void))) == 0; BOOL isWeak = attributes->weak; // If this property isn't actually an object (or is a Class object), diff --git a/ReactiveObjC/NSObject+RACSelectorSignal.h b/ReactiveObjC/NSObject+RACSelectorSignal.h index bb3672eca..1ea871712 100644 --- a/ReactiveObjC/NSObject+RACSelectorSignal.h +++ b/ReactiveObjC/NSObject+RACSelectorSignal.h @@ -14,14 +14,16 @@ NS_ASSUME_NONNULL_BEGIN /// The domain for any errors originating from -rac_signalForSelector:. -extern NSString * const RACSelectorSignalErrorDomain; +extern NSErrorDomain const RACSelectorSignalErrorDomain; -/// -rac_signalForSelector: was going to add a new method implementation for -/// `selector`, but another thread added an implementation before it was able to. -/// -/// This will _not_ occur for cases where a method implementation exists before -/// -rac_signalForSelector: is invoked. -extern const NSInteger RACSelectorSignalErrorMethodSwizzlingRace; +typedef NS_ERROR_ENUM(RACSelectorSignalErrorDomain, RACSelectorSignalError) { + /// -rac_signalForSelector: was going to add a new method implementation for + /// `selector`, but another thread added an implementation before it was able to. + /// + /// This will _not_ occur for cases where a method implementation exists before + /// -rac_signalForSelector: is invoked. + RACSelectorSignalErrorMethodSwizzlingRace = 1, +}; @interface NSObject (RACSelectorSignal) diff --git a/ReactiveObjC/NSObject+RACSelectorSignal.m b/ReactiveObjC/NSObject+RACSelectorSignal.m index 63e232003..ed809e2ef 100644 --- a/ReactiveObjC/NSObject+RACSelectorSignal.m +++ b/ReactiveObjC/NSObject+RACSelectorSignal.m @@ -18,8 +18,7 @@ #import #import -NSString * const RACSelectorSignalErrorDomain = @"RACSelectorSignalErrorDomain"; -const NSInteger RACSelectorSignalErrorMethodSwizzlingRace = 1; +NSErrorDomain const RACSelectorSignalErrorDomain = @"RACSelectorSignalErrorDomain"; static NSString * const RACSignalForSelectorAliasPrefix = @"rac_alias_"; static NSString * const RACSubclassSuffix = @"_RACSelectorSignal"; diff --git a/ReactiveObjC/RACBlockTrampoline.m b/ReactiveObjC/RACBlockTrampoline.m index a2d589f1f..eaa0ea2f8 100644 --- a/ReactiveObjC/RACBlockTrampoline.m +++ b/ReactiveObjC/RACBlockTrampoline.m @@ -28,7 +28,7 @@ - (instancetype)initWithBlock:(id)block { + (id)invokeBlock:(id)block withArguments:(RACTuple *)arguments { NSCParameterAssert(block != NULL); - RACBlockTrampoline *trampoline = [[self alloc] initWithBlock:block]; + RACBlockTrampoline *trampoline = [(RACBlockTrampoline *)[self alloc] initWithBlock:block]; return [trampoline invokeWithArguments:arguments]; } diff --git a/ReactiveObjC/RACCommand.h b/ReactiveObjC/RACCommand.h index 4a2686057..20762dbf2 100644 --- a/ReactiveObjC/RACCommand.h +++ b/ReactiveObjC/RACCommand.h @@ -13,10 +13,12 @@ NS_ASSUME_NONNULL_BEGIN /// The domain for errors originating within `RACCommand`. -extern NSString * const RACCommandErrorDomain; +extern NSErrorDomain const RACCommandErrorDomain; -/// -execute: was invoked while the command was disabled. -extern const NSInteger RACCommandErrorNotEnabled; +typedef NS_ERROR_ENUM(RACCommandErrorDomain, RACCommandError) { + /// -execute: was invoked while the command was disabled. + RACCommandErrorNotEnabled = 1, +}; /// A `userInfo` key for an error, associated with the `RACCommand` that the /// error originated from. diff --git a/ReactiveObjC/RACCommand.m b/ReactiveObjC/RACCommand.m index 6cda3ac78..4342f80ba 100644 --- a/ReactiveObjC/RACCommand.m +++ b/ReactiveObjC/RACCommand.m @@ -19,11 +19,9 @@ #import "RACSignal+Operations.h" #import -NSString * const RACCommandErrorDomain = @"RACCommandErrorDomain"; +NSErrorDomain const RACCommandErrorDomain = @"RACCommandErrorDomain"; NSString * const RACUnderlyingCommandErrorKey = @"RACUnderlyingCommandErrorKey"; -const NSInteger RACCommandErrorNotEnabled = 1; - @interface RACCommand () { // Atomic backing variable for `allowsConcurrentExecution`. volatile uint32_t _allowsConcurrentExecution; diff --git a/ReactiveObjC/RACDisposable.m b/ReactiveObjC/RACDisposable.m index 25f266977..3cba07f4f 100644 --- a/ReactiveObjC/RACDisposable.m +++ b/ReactiveObjC/RACDisposable.m @@ -52,7 +52,7 @@ - (instancetype)initWithBlock:(void (^)(void))block { } + (instancetype)disposableWithBlock:(void (^)(void))block { - return [[self alloc] initWithBlock:block]; + return [(RACDisposable *)[self alloc] initWithBlock:block]; } - (void)dealloc { diff --git a/ReactiveObjC/RACSignal+Operations.h b/ReactiveObjC/RACSignal+Operations.h index 3c9ef0460..5d645e6f8 100644 --- a/ReactiveObjC/RACSignal+Operations.h +++ b/ReactiveObjC/RACSignal+Operations.h @@ -24,14 +24,15 @@ NS_ASSUME_NONNULL_BEGIN /// The domain for errors originating in RACSignal operations. -extern NSString * const RACSignalErrorDomain; - -/// The error code used with -timeout:. -extern const NSInteger RACSignalErrorTimedOut; - -/// The error code used when a value passed into +switch:cases:default: does not -/// match any of the cases, and no default was given. -extern const NSInteger RACSignalErrorNoMatchingCase; +extern NSErrorDomain const RACSignalErrorDomain; + +typedef NS_ERROR_ENUM(RACSignalErrorDomain, RACSignalError) { + /// The error code used with -timeout:. + RACSignalErrorTimedOut = 1, + /// The error code used when a value passed into +switch:cases:default: does not + /// match any of the cases, and no default was given. + RACSignalErrorNoMatchingCase = 2, +}; @interface RACSignal<__covariant ValueType> (Operations) diff --git a/ReactiveObjC/RACSignal+Operations.m b/ReactiveObjC/RACSignal+Operations.m index dbc4df773..87967adfd 100644 --- a/ReactiveObjC/RACSignal+Operations.m +++ b/ReactiveObjC/RACSignal+Operations.m @@ -29,10 +29,7 @@ #import #import -NSString * const RACSignalErrorDomain = @"RACSignalErrorDomain"; - -const NSInteger RACSignalErrorTimedOut = 1; -const NSInteger RACSignalErrorNoMatchingCase = 2; +NSErrorDomain const RACSignalErrorDomain = @"RACSignalErrorDomain"; // Subscribes to the given signal with the given blocks. // @@ -331,7 +328,7 @@ - (RACSignal *)bufferWithTime:(NSTimeInterval)interval onScheduler:(RACScheduler RACSerialDisposable *timerDisposable = [[RACSerialDisposable alloc] init]; NSMutableArray *values = [NSMutableArray array]; - void (^flushValues)() = ^{ + void (^flushValues)(void) = ^{ @synchronized (values) { [timerDisposable.disposable dispose]; diff --git a/ReactiveObjCTests/RACSwiftBridgingSpec.swift b/ReactiveObjCTests/RACSwiftBridgingSpec.swift new file mode 100644 index 000000000..653418f36 --- /dev/null +++ b/ReactiveObjCTests/RACSwiftBridgingSpec.swift @@ -0,0 +1,33 @@ +import Quick +import Nimble +import ReactiveObjC + +final class RACSwiftBridgingSpec: QuickSpec { + override func spec() { + describe("RACCommandError") { + it("bridges RACCommandErrorNotEnabled to a Swift error code") { + let error: Error = NSError(domain: RACCommandErrorDomain, code: 1) + expect(RACCommandError.notEnabled ~= error).to(beTrue()) + } + } + + describe("RACSelectorSignalError") { + it("bridges RACSelectorSignalErrorMethodSwizzlingRace to a Swift error code") { + let error: Error = NSError(domain: RACSelectorSignalErrorDomain, code: 1) + expect(RACSelectorSignalError.methodSwizzlingRace ~= error).to(beTrue()) + } + } + + describe("RACSignalError") { + it("bridges RACSignalErrorTimedOut to a Swift error code") { + let error: Error = NSError(domain: RACSignalErrorDomain, code: 1) + expect(RACSignalError.timedOut ~= error).to(beTrue()) + } + + it("bridges RACSignalErrorNoMatchingCase to a Swift error code") { + let error: Error = NSError(domain: RACSignalErrorDomain, code: 2) + expect(RACSignalError.noMatchingCase ~= error).to(beTrue()) + } + } + } +}