mirror of
https://github.com/ReactiveX/RxSwift.git
synced 2024-10-04 22:17:41 +03:00
Adds UITests for macOS.
This commit is contained in:
parent
59e096d027
commit
7299e0a6b3
22
RxExample/RxExample-macOSUITests/Info.plist
Normal file
22
RxExample/RxExample-macOSUITests/Info.plist
Normal file
@ -0,0 +1,22 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>en</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>$(EXECUTABLE_NAME)</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>$(PRODUCT_NAME)</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>BNDL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1</string>
|
||||
</dict>
|
||||
</plist>
|
@ -0,0 +1,36 @@
|
||||
//
|
||||
// RxExample_macOSUITests.swift
|
||||
// RxExample
|
||||
//
|
||||
// Created by Krunoslav Zaher on 10/30/16.
|
||||
// Copyright © 2016 Krunoslav Zaher. All rights reserved.
|
||||
//
|
||||
|
||||
import XCTest
|
||||
|
||||
class RxExample_macOSUITests: XCTestCase {
|
||||
|
||||
override func setUp() {
|
||||
super.setUp()
|
||||
|
||||
// Put setup code here. This method is called before the invocation of each test method in the class.
|
||||
|
||||
// In UI tests it is usually best to stop immediately when a failure occurs.
|
||||
continueAfterFailure = false
|
||||
// UI tests must launch the application that they test. Doing this in setup will make sure it happens for each test method.
|
||||
XCUIApplication().launch()
|
||||
|
||||
// In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this.
|
||||
}
|
||||
|
||||
override func tearDown() {
|
||||
// Put teardown code here. This method is called after the invocation of each test method in the class.
|
||||
super.tearDown()
|
||||
}
|
||||
|
||||
func testExample() {
|
||||
// Use recording to get started writing UI tests.
|
||||
// Use XCTAssert and related functions to verify your tests produce the correct results.
|
||||
}
|
||||
|
||||
}
|
@ -32,6 +32,7 @@
|
||||
C822B1DF1C14CEAA0088A01A /* BindingExtensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = C822B1DE1C14CEAA0088A01A /* BindingExtensions.swift */; };
|
||||
C822B1E31C14E4810088A01A /* SimpleTableViewExampleViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = C822B1E21C14E4810088A01A /* SimpleTableViewExampleViewController.swift */; };
|
||||
C822B1E71C14E7250088A01A /* SimpleTableViewExampleSectionedViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = C822B1E61C14E7250088A01A /* SimpleTableViewExampleSectionedViewController.swift */; };
|
||||
C82E1DB31DC69E8D004A6413 /* RxExample_macOSUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = C82E1DB21DC69E8D004A6413 /* RxExample_macOSUITests.swift */; };
|
||||
C83367231AD029AE00C668A7 /* Example.swift in Sources */ = {isa = PBXBuildFile; fileRef = C833670F1AD029AE00C668A7 /* Example.swift */; };
|
||||
C83367241AD029AE00C668A7 /* HtmlParsing.swift in Sources */ = {isa = PBXBuildFile; fileRef = C83367111AD029AE00C668A7 /* HtmlParsing.swift */; };
|
||||
C83367251AD029AE00C668A7 /* ImageService.swift in Sources */ = {isa = PBXBuildFile; fileRef = C83367121AD029AE00C668A7 /* ImageService.swift */; };
|
||||
@ -267,6 +268,13 @@
|
||||
remoteGlobalIDString = C8F0C0581BBBFBCE001B112F;
|
||||
remoteInfo = "RxBlocking-watchOS";
|
||||
};
|
||||
C82E1DB51DC69E8D004A6413 /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = C83366D51AD0293800C668A7 /* Project object */;
|
||||
proxyType = 1;
|
||||
remoteGlobalIDString = C88BB8B91B07E6C90064D411;
|
||||
remoteInfo = "RxExample-OSX";
|
||||
};
|
||||
C849EF661C3190360048AC4A /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = C83366D51AD0293800C668A7 /* Project object */;
|
||||
@ -358,6 +366,9 @@
|
||||
C822B1DE1C14CEAA0088A01A /* BindingExtensions.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BindingExtensions.swift; sourceTree = "<group>"; };
|
||||
C822B1E21C14E4810088A01A /* SimpleTableViewExampleViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SimpleTableViewExampleViewController.swift; sourceTree = "<group>"; };
|
||||
C822B1E61C14E7250088A01A /* SimpleTableViewExampleSectionedViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SimpleTableViewExampleSectionedViewController.swift; sourceTree = "<group>"; };
|
||||
C82E1DB01DC69E8D004A6413 /* RxExample-macOSUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "RxExample-macOSUITests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
C82E1DB21DC69E8D004A6413 /* RxExample_macOSUITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RxExample_macOSUITests.swift; sourceTree = "<group>"; };
|
||||
C82E1DB41DC69E8D004A6413 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||
C83366DD1AD0293800C668A7 /* RxExample-iOS.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "RxExample-iOS.app"; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
C833670F1AD029AE00C668A7 /* Example.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Example.swift; sourceTree = "<group>"; };
|
||||
C83367111AD029AE00C668A7 /* HtmlParsing.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HtmlParsing.swift; sourceTree = "<group>"; };
|
||||
@ -458,6 +469,13 @@
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
C82E1DAD1DC69E8D004A6413 /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
C83366DA1AD0293800C668A7 /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
@ -577,6 +595,15 @@
|
||||
path = SimpleTableViewExampleSectioned;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
C82E1DB11DC69E8D004A6413 /* RxExample-macOSUITests */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
C82E1DB21DC69E8D004A6413 /* RxExample_macOSUITests.swift */,
|
||||
C82E1DB41DC69E8D004A6413 /* Info.plist */,
|
||||
);
|
||||
path = "RxExample-macOSUITests";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
C83366D41AD0293800C668A7 = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
@ -589,6 +616,7 @@
|
||||
C886A6751D85AC7B00653EE4 /* Extensions */,
|
||||
C849EF621C3190360048AC4A /* RxExample-iOSTests */,
|
||||
C88C2B281D67EC5200B01A98 /* RxExample-iOSUITests */,
|
||||
C82E1DB11DC69E8D004A6413 /* RxExample-macOSUITests */,
|
||||
C83366DE1AD0293800C668A7 /* Products */,
|
||||
);
|
||||
sourceTree = "<group>";
|
||||
@ -600,6 +628,7 @@
|
||||
C88BB8DC1B07E6C90064D411 /* RxExample.app */,
|
||||
C849EF611C3190360048AC4A /* RxExample-iOSTests.xctest */,
|
||||
C88C2B271D67EC5200B01A98 /* RxExample-iOSUITests.xctest */,
|
||||
C82E1DB01DC69E8D004A6413 /* RxExample-macOSUITests.xctest */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
@ -917,6 +946,24 @@
|
||||
/* End PBXGroup section */
|
||||
|
||||
/* Begin PBXNativeTarget section */
|
||||
C82E1DAF1DC69E8D004A6413 /* RxExample-macOSUITests */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = C82E1DB71DC69E8D004A6413 /* Build configuration list for PBXNativeTarget "RxExample-macOSUITests" */;
|
||||
buildPhases = (
|
||||
C82E1DAC1DC69E8D004A6413 /* Sources */,
|
||||
C82E1DAD1DC69E8D004A6413 /* Frameworks */,
|
||||
C82E1DAE1DC69E8D004A6413 /* Resources */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
C82E1DB61DC69E8D004A6413 /* PBXTargetDependency */,
|
||||
);
|
||||
name = "RxExample-macOSUITests";
|
||||
productName = "RxExample-macOSUITests";
|
||||
productReference = C82E1DB01DC69E8D004A6413 /* RxExample-macOSUITests.xctest */;
|
||||
productType = "com.apple.product-type.bundle.ui-testing";
|
||||
};
|
||||
C83366DC1AD0293800C668A7 /* RxExample-iOS */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = C83366FF1AD0293900C668A7 /* Build configuration list for PBXNativeTarget "RxExample-iOS" */;
|
||||
@ -995,10 +1042,16 @@
|
||||
C83366D51AD0293800C668A7 /* Project object */ = {
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
LastSwiftUpdateCheck = 0800;
|
||||
LastSwiftUpdateCheck = 0810;
|
||||
LastUpgradeCheck = 0800;
|
||||
ORGANIZATIONNAME = "Krunoslav Zaher";
|
||||
TargetAttributes = {
|
||||
C82E1DAF1DC69E8D004A6413 = {
|
||||
CreatedOnToolsVersion = 8.1;
|
||||
DevelopmentTeam = 783T66X79Y;
|
||||
ProvisioningStyle = Automatic;
|
||||
TestTargetID = C88BB8B91B07E6C90064D411;
|
||||
};
|
||||
C83366DC1AD0293800C668A7 = {
|
||||
CreatedOnToolsVersion = 6.2;
|
||||
DevelopmentTeam = 783T66X79Y;
|
||||
@ -1044,6 +1097,7 @@
|
||||
C88BB8B91B07E6C90064D411 /* RxExample-OSX */,
|
||||
C849EF601C3190360048AC4A /* RxExample-iOSTests */,
|
||||
C88C2B261D67EC5200B01A98 /* RxExample-iOSUITests */,
|
||||
C82E1DAF1DC69E8D004A6413 /* RxExample-macOSUITests */,
|
||||
);
|
||||
};
|
||||
/* End PBXProject section */
|
||||
@ -1192,6 +1246,13 @@
|
||||
/* End PBXReferenceProxy section */
|
||||
|
||||
/* Begin PBXResourcesBuildPhase section */
|
||||
C82E1DAE1DC69E8D004A6413 /* Resources */ = {
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
C83366DB1AD0293800C668A7 /* Resources */ = {
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
@ -1230,6 +1291,14 @@
|
||||
/* End PBXResourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXSourcesBuildPhase section */
|
||||
C82E1DAC1DC69E8D004A6413 /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
C82E1DB31DC69E8D004A6413 /* RxExample_macOSUITests.swift in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
C83366D91AD0293800C668A7 /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
@ -1387,6 +1456,11 @@
|
||||
/* End PBXSourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXTargetDependency section */
|
||||
C82E1DB61DC69E8D004A6413 /* PBXTargetDependency */ = {
|
||||
isa = PBXTargetDependency;
|
||||
target = C88BB8B91B07E6C90064D411 /* RxExample-OSX */;
|
||||
targetProxy = C82E1DB51DC69E8D004A6413 /* PBXContainerItemProxy */;
|
||||
};
|
||||
C849EF671C3190360048AC4A /* PBXTargetDependency */ = {
|
||||
isa = PBXTargetDependency;
|
||||
target = C83366DC1AD0293800C668A7 /* RxExample-iOS */;
|
||||
@ -1400,6 +1474,75 @@
|
||||
/* End PBXTargetDependency section */
|
||||
|
||||
/* Begin XCBuildConfiguration section */
|
||||
C82E1DB81DC69E8D004A6413 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
CLANG_ANALYZER_NONNULL = YES;
|
||||
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVES = YES;
|
||||
CODE_SIGN_IDENTITY = "-";
|
||||
COMBINE_HIDPI_IMAGES = YES;
|
||||
DEBUG_INFORMATION_FORMAT = dwarf;
|
||||
DEVELOPMENT_TEAM = 783T66X79Y;
|
||||
INFOPLIST_FILE = "RxExample-macOSUITests/Info.plist";
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks";
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.12;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "io.rx.RxExample-macOSUITests";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SDKROOT = macosx;
|
||||
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
|
||||
SWIFT_VERSION = 3.0;
|
||||
TEST_TARGET_NAME = "RxExample-OSX";
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
C82E1DB91DC69E8D004A6413 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
CLANG_ANALYZER_NONNULL = YES;
|
||||
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVES = YES;
|
||||
CODE_SIGN_IDENTITY = "-";
|
||||
COMBINE_HIDPI_IMAGES = YES;
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
DEVELOPMENT_TEAM = 783T66X79Y;
|
||||
INFOPLIST_FILE = "RxExample-macOSUITests/Info.plist";
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks";
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.12;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "io.rx.RxExample-macOSUITests";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SDKROOT = macosx;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
|
||||
SWIFT_VERSION = 3.0;
|
||||
TEST_TARGET_NAME = "RxExample-OSX";
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
C82E1DBA1DC69E8D004A6413 /* Release-Tests */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
CLANG_ANALYZER_NONNULL = YES;
|
||||
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVES = YES;
|
||||
CODE_SIGN_IDENTITY = "-";
|
||||
COMBINE_HIDPI_IMAGES = YES;
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
DEVELOPMENT_TEAM = 783T66X79Y;
|
||||
INFOPLIST_FILE = "RxExample-macOSUITests/Info.plist";
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks";
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.12;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "io.rx.RxExample-macOSUITests";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SDKROOT = macosx;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
|
||||
SWIFT_VERSION = 3.0;
|
||||
TEST_TARGET_NAME = "RxExample-OSX";
|
||||
};
|
||||
name = "Release-Tests";
|
||||
};
|
||||
C83366FD1AD0293900C668A7 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
@ -1745,6 +1888,15 @@
|
||||
/* End XCBuildConfiguration section */
|
||||
|
||||
/* Begin XCConfigurationList section */
|
||||
C82E1DB71DC69E8D004A6413 /* Build configuration list for PBXNativeTarget "RxExample-macOSUITests" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
C82E1DB81DC69E8D004A6413 /* Debug */,
|
||||
C82E1DB91DC69E8D004A6413 /* Release */,
|
||||
C82E1DBA1DC69E8D004A6413 /* Release-Tests */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
};
|
||||
C83366D81AD0293800C668A7 /* Build configuration list for PBXProject "RxExample" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
|
@ -28,6 +28,16 @@
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES">
|
||||
<Testables>
|
||||
<TestableReference
|
||||
skipped = "NO">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "C82E1DAF1DC69E8D004A6413"
|
||||
BuildableName = "RxExample-macOSUITests.xctest"
|
||||
BlueprintName = "RxExample-macOSUITests"
|
||||
ReferencedContainer = "container:RxExample.xcodeproj">
|
||||
</BuildableReference>
|
||||
</TestableReference>
|
||||
</Testables>
|
||||
<MacroExpansion>
|
||||
<BuildableReference
|
||||
|
@ -0,0 +1,56 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "0810"
|
||||
version = "1.3">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
buildImplicitDependencies = "YES">
|
||||
</BuildAction>
|
||||
<TestAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES">
|
||||
<Testables>
|
||||
<TestableReference
|
||||
skipped = "NO">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "C82E1DAF1DC69E8D004A6413"
|
||||
BuildableName = "RxExample-macOSUITests.xctest"
|
||||
BlueprintName = "RxExample-macOSUITests"
|
||||
ReferencedContainer = "container:RxExample.xcodeproj">
|
||||
</BuildableReference>
|
||||
</TestableReference>
|
||||
</Testables>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
</TestAction>
|
||||
<LaunchAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
launchStyle = "0"
|
||||
useCustomWorkingDirectory = "NO"
|
||||
ignoresPersistentStateOnLaunch = "NO"
|
||||
debugDocumentVersioning = "YES"
|
||||
debugServiceExtension = "internal"
|
||||
allowLocationSimulation = "YES">
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
</LaunchAction>
|
||||
<ProfileAction
|
||||
buildConfiguration = "Release"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||
savedToolIdentifier = ""
|
||||
useCustomWorkingDirectory = "NO"
|
||||
debugDocumentVersioning = "YES">
|
||||
</ProfileAction>
|
||||
<AnalyzeAction
|
||||
buildConfiguration = "Debug">
|
||||
</AnalyzeAction>
|
||||
<ArchiveAction
|
||||
buildConfiguration = "Release"
|
||||
revealArchiveInOrganizer = "YES">
|
||||
</ArchiveAction>
|
||||
</Scheme>
|
@ -16,6 +16,12 @@ class IntroductionExampleViewController : ViewController {
|
||||
@IBOutlet var a: NSTextField!
|
||||
@IBOutlet var b: NSTextField!
|
||||
@IBOutlet var c: NSTextField!
|
||||
|
||||
@IBOutlet var leftTextView: NSTextView!
|
||||
@IBOutlet var rightTextView: NSTextView!
|
||||
let textViewTruth = Variable<String>("System Truth")
|
||||
|
||||
@IBOutlet var speechEnabled: NSButton!
|
||||
@IBOutlet var slider: NSSlider!
|
||||
@IBOutlet var sliderValue: NSTextField!
|
||||
|
||||
@ -24,8 +30,6 @@ class IntroductionExampleViewController : ViewController {
|
||||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
|
||||
showAlert("After you close this, prepare for a loud sound ...")
|
||||
|
||||
// c = a + b
|
||||
let sum = Observable.combineLatest(a.rx.text.orEmpty, b.rx.text.orEmpty) { (a: String, b: String) -> (Int, Int) in
|
||||
return (Int(a) ?? 0, Int(b) ?? 0)
|
||||
@ -42,9 +46,14 @@ class IntroductionExampleViewController : ViewController {
|
||||
// Also, tell it out loud
|
||||
let speech = NSSpeechSynthesizer()
|
||||
|
||||
sum
|
||||
.map { (a, b) in
|
||||
return "\(a) + \(b) = \(a + b)"
|
||||
Observable.combineLatest(sum, speechEnabled.rx.state) { ($0, $1) }
|
||||
.flatMapLatest { (operands, state) -> Observable<String> in
|
||||
let (a, b) = operands
|
||||
if state == 0 {
|
||||
return .empty()
|
||||
}
|
||||
|
||||
return .just("\(a) + \(b) = \(a + b)")
|
||||
}
|
||||
.subscribe(onNext: { result in
|
||||
if speech.isSpeaking {
|
||||
|
@ -1,7 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<document type="com.apple.InterfaceBuilder3.Cocoa.Storyboard.XIB" version="3.0" toolsVersion="11185.3" systemVersion="15G31" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" initialViewController="B8D-0N-5wS">
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.Cocoa.Storyboard.XIB" version="3.0" toolsVersion="11542" systemVersion="16B2555" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" initialViewController="B8D-0N-5wS">
|
||||
<dependencies>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="11185.3"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="11542"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<scenes>
|
||||
<!--Application-->
|
||||
@ -129,11 +130,11 @@
|
||||
</textFieldCell>
|
||||
</textField>
|
||||
<slider verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Wbs-Vv-RvG">
|
||||
<rect key="frame" x="54" y="157" width="502" height="20"/>
|
||||
<rect key="frame" x="54" y="158" width="502" height="19"/>
|
||||
<sliderCell key="cell" continuous="YES" state="on" alignment="left" maxValue="100" doubleValue="50" tickMarkPosition="above" sliderType="linear" id="0FL-dG-a0V"/>
|
||||
</slider>
|
||||
<textField verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="35N-M1-mEj">
|
||||
<rect key="frame" x="208" y="123" width="96" height="22"/>
|
||||
<rect key="frame" x="208" y="124" width="96" height="22"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="96" id="UjJ-QN-7sX"/>
|
||||
<constraint firstAttribute="height" constant="22" id="p0d-PC-IYH"/>
|
||||
@ -145,38 +146,119 @@
|
||||
</textFieldCell>
|
||||
</textField>
|
||||
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="uJU-xc-Cnn">
|
||||
<rect key="frame" x="56" y="126" width="136" height="17"/>
|
||||
<rect key="frame" x="56" y="127" width="136" height="17"/>
|
||||
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Slider Value (0 - 100):" id="Pbz-ZR-CzF">
|
||||
<font key="font" metaFont="system"/>
|
||||
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
|
||||
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
|
||||
</textFieldCell>
|
||||
</textField>
|
||||
<button translatesAutoresizingMaskIntoConstraints="NO" id="lGZ-My-b3K">
|
||||
<rect key="frame" x="486" y="319" width="120" height="18"/>
|
||||
<buttonCell key="cell" type="check" title="Speech Enabled" bezelStyle="regularSquare" imagePosition="left" inset="2" id="ssU-Is-Hrt">
|
||||
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
|
||||
<font key="font" metaFont="system"/>
|
||||
</buttonCell>
|
||||
</button>
|
||||
<scrollView horizontalLineScroll="10" horizontalPageScroll="10" verticalLineScroll="10" verticalPageScroll="10" hasHorizontalScroller="NO" usesPredominantAxisScrolling="NO" translatesAutoresizingMaskIntoConstraints="NO" id="1OR-hU-htp">
|
||||
<rect key="frame" x="58" y="26" width="147" height="54"/>
|
||||
<clipView key="contentView" id="gWx-fI-mXT">
|
||||
<rect key="frame" x="1" y="1" width="145" height="52"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<textView importsGraphics="NO" usesFontPanel="YES" findStyle="panel" continuousSpellChecking="YES" allowsUndo="YES" usesRuler="YES" allowsNonContiguousLayout="YES" quoteSubstitution="YES" dashSubstitution="YES" smartInsertDelete="YES" id="9nX-EI-UMF">
|
||||
<rect key="frame" x="0.0" y="0.0" width="145" height="52"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||
<size key="minSize" width="145" height="52"/>
|
||||
<size key="maxSize" width="463" height="10000000"/>
|
||||
<color key="insertionPointColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
|
||||
</textView>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||
</clipView>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="54" id="2Fi-ft-kze"/>
|
||||
<constraint firstAttribute="width" constant="147" id="Iha-ik-jFN"/>
|
||||
</constraints>
|
||||
<scroller key="horizontalScroller" hidden="YES" verticalHuggingPriority="750" doubleValue="1" horizontal="YES" id="FUf-0U-Mpx">
|
||||
<rect key="frame" x="-100" y="-100" width="87" height="18"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
</scroller>
|
||||
<scroller key="verticalScroller" verticalHuggingPriority="750" doubleValue="1" horizontal="NO" id="6LN-c2-Aps">
|
||||
<rect key="frame" x="130" y="1" width="16" height="52"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
</scroller>
|
||||
</scrollView>
|
||||
<scrollView horizontalLineScroll="10" horizontalPageScroll="10" verticalLineScroll="10" verticalPageScroll="10" hasHorizontalScroller="NO" usesPredominantAxisScrolling="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Eih-kn-NCC">
|
||||
<rect key="frame" x="364" y="27" width="145" height="52"/>
|
||||
<clipView key="contentView" id="sRf-ms-io0">
|
||||
<rect key="frame" x="1" y="1" width="143" height="50"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<textView importsGraphics="NO" usesFontPanel="YES" findStyle="panel" continuousSpellChecking="YES" allowsUndo="YES" usesRuler="YES" allowsNonContiguousLayout="YES" quoteSubstitution="YES" dashSubstitution="YES" smartInsertDelete="YES" id="F32-Tg-SgN">
|
||||
<rect key="frame" x="0.0" y="0.0" width="143" height="50"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||
<size key="minSize" width="143" height="50"/>
|
||||
<size key="maxSize" width="463" height="10000000"/>
|
||||
<color key="insertionPointColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
|
||||
</textView>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||
</clipView>
|
||||
<scroller key="horizontalScroller" hidden="YES" verticalHuggingPriority="750" doubleValue="1" horizontal="YES" id="cJP-Qd-YpF">
|
||||
<rect key="frame" x="-100" y="-100" width="87" height="18"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
</scroller>
|
||||
<scroller key="verticalScroller" verticalHuggingPriority="750" doubleValue="1" horizontal="NO" id="urA-m6-7zR">
|
||||
<rect key="frame" x="128" y="1" width="16" height="50"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
</scroller>
|
||||
</scrollView>
|
||||
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="foi-fP-Wpg">
|
||||
<rect key="frame" x="228" y="44" width="123" height="17"/>
|
||||
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="<- Synchronized ->" id="jnS-vm-DF3">
|
||||
<font key="font" metaFont="system"/>
|
||||
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
|
||||
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
|
||||
</textFieldCell>
|
||||
</textField>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstItem="zhP-9C-de5" firstAttribute="centerY" secondItem="Thn-ge-MNK" secondAttribute="centerY" id="1hB-vb-8wU"/>
|
||||
<constraint firstAttribute="centerY" secondItem="6lb-zc-c5S" secondAttribute="centerY" constant="126.5" id="3Es-uc-xme"/>
|
||||
<constraint firstItem="zEm-ia-8D5" firstAttribute="leading" secondItem="6lb-zc-c5S" secondAttribute="trailing" constant="44" id="4YD-Sv-3PW"/>
|
||||
<constraint firstItem="zhP-9C-de5" firstAttribute="centerY" secondItem="zEm-ia-8D5" secondAttribute="centerY" id="6x6-ry-73f"/>
|
||||
<constraint firstItem="lGZ-My-b3K" firstAttribute="leading" secondItem="OPN-Cj-AXY" secondAttribute="trailing" constant="8" id="9IT-JY-nJn"/>
|
||||
<constraint firstItem="lGZ-My-b3K" firstAttribute="centerY" secondItem="OPN-Cj-AXY" secondAttribute="centerY" id="Ats-Ca-cmV"/>
|
||||
<constraint firstItem="foi-fP-Wpg" firstAttribute="centerY" secondItem="9nX-EI-UMF" secondAttribute="centerY" id="KbQ-uz-UMk"/>
|
||||
<constraint firstAttribute="trailing" secondItem="Wbs-Vv-RvG" secondAttribute="trailing" constant="56" id="PVJ-9U-aoZ"/>
|
||||
<constraint firstItem="uvp-P6-I33" firstAttribute="top" secondItem="GIP-PK-nj4" secondAttribute="bottom" constant="14" id="Pp9-qm-Arb"/>
|
||||
<constraint firstItem="6lb-zc-c5S" firstAttribute="leading" secondItem="15P-I4-Ofm" secondAttribute="leading" constant="56" id="PvR-bi-zxk"/>
|
||||
<constraint firstItem="F32-Tg-SgN" firstAttribute="leading" secondItem="foi-fP-Wpg" secondAttribute="trailing" constant="16" id="REI-3T-T4F"/>
|
||||
<constraint firstItem="35N-M1-mEj" firstAttribute="top" secondItem="Wbs-Vv-RvG" secondAttribute="bottom" constant="14" id="XjL-NS-FKB"/>
|
||||
<constraint firstItem="6lb-zc-c5S" firstAttribute="centerY" secondItem="zEm-ia-8D5" secondAttribute="centerY" constant="0.5" id="Yxd-Vc-Mha"/>
|
||||
<constraint firstItem="uJU-xc-Cnn" firstAttribute="top" secondItem="Wbs-Vv-RvG" secondAttribute="bottom" constant="16" id="aTW-iC-ZJu"/>
|
||||
<constraint firstItem="2kf-g2-Xe7" firstAttribute="leading" secondItem="15P-I4-Ofm" secondAttribute="leading" constant="58" id="aUY-dz-Bkn"/>
|
||||
<constraint firstItem="foi-fP-Wpg" firstAttribute="leading" secondItem="9nX-EI-UMF" secondAttribute="trailing" constant="26" id="biw-Hz-9nq"/>
|
||||
<constraint firstItem="OPN-Cj-AXY" firstAttribute="centerY" secondItem="Thn-ge-MNK" secondAttribute="centerY" id="cze-3D-fjj"/>
|
||||
<constraint firstItem="2kf-g2-Xe7" firstAttribute="top" secondItem="15P-I4-Ofm" secondAttribute="top" constant="9" id="dVJ-tS-uK5"/>
|
||||
<constraint firstItem="1OR-hU-htp" firstAttribute="top" secondItem="uJU-xc-Cnn" secondAttribute="bottom" constant="47" id="eOB-YW-yLG"/>
|
||||
<constraint firstItem="Wbs-Vv-RvG" firstAttribute="top" secondItem="uvp-P6-I33" secondAttribute="bottom" constant="53" id="gJ8-k4-cPu"/>
|
||||
<constraint firstItem="GIP-PK-nj4" firstAttribute="top" secondItem="zhP-9C-de5" secondAttribute="bottom" constant="38" id="hP1-SO-AwZ"/>
|
||||
<constraint firstItem="Eih-kn-NCC" firstAttribute="top" secondItem="9nX-EI-UMF" secondAttribute="top" id="ilL-Dk-XdY"/>
|
||||
<constraint firstItem="zhP-9C-de5" firstAttribute="centerX" secondItem="GIP-PK-nj4" secondAttribute="centerX" id="jGy-4g-Az3"/>
|
||||
<constraint firstItem="Eih-kn-NCC" firstAttribute="height" secondItem="9nX-EI-UMF" secondAttribute="height" id="nkQ-r9-ine"/>
|
||||
<constraint firstItem="Wbs-Vv-RvG" firstAttribute="leading" secondItem="15P-I4-Ofm" secondAttribute="leading" constant="56" id="oZe-4i-rFT"/>
|
||||
<constraint firstItem="uJU-xc-Cnn" firstAttribute="leading" secondItem="15P-I4-Ofm" secondAttribute="leading" constant="58" id="qNL-oi-8XY"/>
|
||||
<constraint firstItem="35N-M1-mEj" firstAttribute="leading" secondItem="uJU-xc-Cnn" secondAttribute="trailing" constant="18" id="rna-lY-yUb"/>
|
||||
<constraint firstItem="Thn-ge-MNK" firstAttribute="leading" secondItem="zhP-9C-de5" secondAttribute="trailing" constant="44" id="s0C-Xr-olp"/>
|
||||
<constraint firstItem="OPN-Cj-AXY" firstAttribute="leading" secondItem="Thn-ge-MNK" secondAttribute="trailing" constant="44" id="wsy-fG-oAX"/>
|
||||
<constraint firstItem="1OR-hU-htp" firstAttribute="leading" secondItem="15P-I4-Ofm" secondAttribute="leading" constant="58" id="wzX-Uc-OY3"/>
|
||||
<constraint firstItem="uvp-P6-I33" firstAttribute="centerX" secondItem="GIP-PK-nj4" secondAttribute="centerX" id="y3H-7u-VYu"/>
|
||||
<constraint firstItem="zhP-9C-de5" firstAttribute="leading" secondItem="zEm-ia-8D5" secondAttribute="trailing" constant="44" id="zH7-w8-JmD"/>
|
||||
<constraint firstItem="Eih-kn-NCC" firstAttribute="width" secondItem="9nX-EI-UMF" secondAttribute="width" id="zTN-i2-SRG"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<connections>
|
||||
@ -184,8 +266,11 @@
|
||||
<outlet property="b" destination="zhP-9C-de5" id="roc-0E-LNn"/>
|
||||
<outlet property="c" destination="OPN-Cj-AXY" id="QWI-hj-WBi"/>
|
||||
<outlet property="disposeButton" destination="GIP-PK-nj4" id="GRz-GM-yYC"/>
|
||||
<outlet property="leftTextView" destination="9nX-EI-UMF" id="ghG-Sj-I19"/>
|
||||
<outlet property="rightTextView" destination="F32-Tg-SgN" id="Fnc-WS-OAI"/>
|
||||
<outlet property="slider" destination="Wbs-Vv-RvG" id="P4j-BE-GM4"/>
|
||||
<outlet property="sliderValue" destination="35N-M1-mEj" id="sJI-D2-QJ8"/>
|
||||
<outlet property="speechEnabled" destination="lGZ-My-b3K" id="vRT-G4-KIF"/>
|
||||
</connections>
|
||||
</viewController>
|
||||
<customObject id="Q2y-PY-QrU" userLabel="First Responder" customClass="NSResponder" sceneMemberID="firstResponder"/>
|
||||
|
Loading…
Reference in New Issue
Block a user