Skip to content
This repository was archived by the owner on Sep 19, 2024. It is now read-only.

Add basic watchOS support #28

Merged
merged 5 commits into from
Jun 10, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Update to Swift 5
  • Loading branch information
tomlokhorst committed Jun 10, 2019
commit 997b6e5e80991de0556ba28e3d5c06b317bffe95
2 changes: 1 addition & 1 deletion Library/UIKit/UIColor+ColorResource.swift
Original file line number Diff line number Diff line change
@@ -36,7 +36,7 @@ public extension UIColor {
- returns: A color that exactly or best matches the desired traits with the given resource (R.color.*), or nil if no suitable color was found.
*/
@available(watchOSApplicationExtension 4.0, *)
public convenience init?(resource: ColorResourceType) {
convenience init?(resource: ColorResourceType) {
self.init(named: resource.name)
}
#endif
2 changes: 1 addition & 1 deletion Library/UIKit/UIImage+ImageResource.swift
Original file line number Diff line number Diff line change
@@ -33,7 +33,7 @@ public extension UIImage {

- returns: An image that exactly or best matches the desired traits with the given resource (R.image.*), or nil if no suitable image was found.
*/
public convenience init?(resource: ImageResourceType) {
convenience init?(resource: ImageResourceType) {
self.init(named: resource.name)
}
#endif
34 changes: 19 additions & 15 deletions R.swift.Library.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
@@ -402,28 +402,29 @@
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 0720;
LastUpgradeCheck = 1000;
LastUpgradeCheck = 1100;
ORGANIZATIONNAME = "Mathijs Kadijk";
TargetAttributes = {
2F5FBC3F21355A1400A83A69 = {
CreatedOnToolsVersion = 10.0;
LastSwiftMigration = 1100;
ProvisioningStyle = Automatic;
};
806E69911C42BD9C00DE3A8B = {
CreatedOnToolsVersion = 7.2;
LastSwiftMigration = 0900;
LastSwiftMigration = 1020;
};
806E699A1C42BD9C00DE3A8B = {
CreatedOnToolsVersion = 7.2;
LastSwiftMigration = 0900;
LastSwiftMigration = 1020;
};
D592464D1C117A55007F94C7 = {
CreatedOnToolsVersion = 7.1.1;
LastSwiftMigration = 0900;
LastSwiftMigration = 1020;
};
D59246571C117A55007F94C7 = {
CreatedOnToolsVersion = 7.1.1;
LastSwiftMigration = 0900;
LastSwiftMigration = 1020;
};
};
};
@@ -432,6 +433,7 @@
developmentRegion = English;
hasScannedForEncodings = 0;
knownRegions = (
English,
en,
);
mainGroup = D59246441C117A54007F94C7;
@@ -638,7 +640,7 @@
SDKROOT = watchos;
SKIP_INSTALL = YES;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
SWIFT_VERSION = 4.2;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = 4;
WATCHOS_DEPLOYMENT_TARGET = 2.2;
};
@@ -669,7 +671,7 @@
PRODUCT_NAME = Rswift;
SDKROOT = watchos;
SKIP_INSTALL = YES;
SWIFT_VERSION = 4.2;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = 4;
WATCHOS_DEPLOYMENT_TARGET = 2.2;
};
@@ -691,7 +693,7 @@
PRODUCT_NAME = Rswift;
SDKROOT = appletvos;
SKIP_INSTALL = YES;
SWIFT_VERSION = 4.2;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = 3;
TVOS_DEPLOYMENT_TARGET = 9.0;
};
@@ -713,7 +715,7 @@
PRODUCT_NAME = Rswift;
SDKROOT = appletvos;
SKIP_INSTALL = YES;
SWIFT_VERSION = 4.2;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = 3;
TVOS_DEPLOYMENT_TARGET = 9.0;
};
@@ -727,7 +729,7 @@
PRODUCT_BUNDLE_IDENTIFIER = nl.mathijskadijk.RswiftTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = appletvos;
SWIFT_VERSION = 4.2;
SWIFT_VERSION = 5.0;
TVOS_DEPLOYMENT_TARGET = 9.1;
};
name = Debug;
@@ -740,7 +742,7 @@
PRODUCT_BUNDLE_IDENTIFIER = nl.mathijskadijk.RswiftTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = appletvos;
SWIFT_VERSION = 4.2;
SWIFT_VERSION = 5.0;
TVOS_DEPLOYMENT_TARGET = 9.1;
};
name = Release;
@@ -749,6 +751,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
@@ -807,6 +810,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
@@ -873,7 +877,7 @@
PRODUCT_NAME = Rswift;
SKIP_INSTALL = YES;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 4.2;
SWIFT_VERSION = 5.0;
};
name = Debug;
};
@@ -894,7 +898,7 @@
PRODUCT_BUNDLE_IDENTIFIER = nl.mathijskadijk.rswift.library;
PRODUCT_NAME = Rswift;
SKIP_INSTALL = YES;
SWIFT_VERSION = 4.2;
SWIFT_VERSION = 5.0;
};
name = Release;
};
@@ -905,7 +909,7 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = nl.mathijskadijk.RswiftTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 4.2;
SWIFT_VERSION = 5.0;
};
name = Debug;
};
@@ -916,7 +920,7 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = nl.mathijskadijk.RswiftTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 4.2;
SWIFT_VERSION = 5.0;
};
name = Release;
};
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1000"
LastUpgradeVersion = "1100"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
@@ -27,6 +27,15 @@
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "D592464D1C117A55007F94C7"
BuildableName = "Rswift.framework"
BlueprintName = "Rswift-iOS"
ReferencedContainer = "container:R.swift.Library.xcodeproj">
</BuildableReference>
</MacroExpansion>
<Testables>
<TestableReference
skipped = "NO">
@@ -39,17 +48,6 @@
</BuildableReference>
</TestableReference>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "D592464D1C117A55007F94C7"
BuildableName = "Rswift.framework"
BlueprintName = "Rswift-iOS"
ReferencedContainer = "container:R.swift.Library.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
@@ -70,8 +68,6 @@
ReferencedContainer = "container:R.swift.Library.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1000"
LastUpgradeVersion = "1100"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
@@ -27,6 +27,15 @@
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "806E69911C42BD9C00DE3A8B"
BuildableName = "Rswift.framework"
BlueprintName = "Rswift-tvOS"
ReferencedContainer = "container:R.swift.Library.xcodeproj">
</BuildableReference>
</MacroExpansion>
<Testables>
<TestableReference
skipped = "NO">
@@ -39,17 +48,6 @@
</BuildableReference>
</TestableReference>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "806E69911C42BD9C00DE3A8B"
BuildableName = "Rswift.framework"
BlueprintName = "Rswift-tvOS"
ReferencedContainer = "container:R.swift.Library.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
@@ -70,8 +68,6 @@
ReferencedContainer = "container:R.swift.Library.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"