Skip to content

Commit f3a50a9

Browse files
committed
more swift 4 language settings
1 parent 5bd6e68 commit f3a50a9

6 files changed

Lines changed: 50 additions & 30 deletions

File tree

Example/Source/Base.lproj/Main.storyboard

Lines changed: 9 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="12120" systemVersion="16E195" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="upN-2p-DeK">
2+
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="13196" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="upN-2p-DeK">
33
<device id="retina4_7" orientation="portrait">
44
<adaptation id="fullscreen"/>
55
</device>
66
<dependencies>
7-
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="12088"/>
7+
<deployment identifier="iOS"/>
8+
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13173"/>
89
<capability name="Constraints to layout margins" minToolsVersion="6.0"/>
910
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
1011
</dependencies>
@@ -25,10 +26,10 @@
2526
<rect key="frame" x="16" y="20" width="343" height="647"/>
2627
<subviews>
2728
<stackView opaque="NO" contentMode="scaleToFill" distribution="fillEqually" spacing="8" translatesAutoresizingMaskIntoConstraints="NO" id="alq-jP-5MO">
28-
<rect key="frame" x="0.0" y="0.0" width="343" height="30"/>
29+
<rect key="frame" x="0.0" y="0.0" width="343" height="22"/>
2930
<subviews>
3031
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="pEF-zu-tpZ">
31-
<rect key="frame" x="0.0" y="0.0" width="109" height="30"/>
32+
<rect key="frame" x="0.0" y="0.0" width="167.5" height="22"/>
3233
<color key="backgroundColor" red="0.1803921568627451" green="0.80000000000000004" blue="0.44313725490196076" alpha="1" colorSpace="calibratedRGB"/>
3334
<state key="normal" title="Load AAC">
3435
<color key="titleColor" cocoaTouchSystemColor="darkTextColor"/>
@@ -38,7 +39,7 @@
3839
</connections>
3940
</button>
4041
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="cMD-ob-cpb">
41-
<rect key="frame" x="117" y="0.0" width="109" height="30"/>
42+
<rect key="frame" x="175.5" y="0.0" width="167.5" height="22"/>
4243
<color key="backgroundColor" red="0.1803921568627451" green="0.80000000000000004" blue="0.44313725490196076" alpha="1" colorSpace="calibratedRGB"/>
4344
<state key="normal" title="Load MP3">
4445
<color key="titleColor" cocoaTouchSystemColor="darkTextColor"/>
@@ -47,23 +48,13 @@
4748
<action selector="doLoadMP3" destination="upN-2p-DeK" eventType="touchUpInside" id="5qy-BC-ZSA"/>
4849
</connections>
4950
</button>
50-
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="hTi-Cr-9Fv">
51-
<rect key="frame" x="234" y="0.0" width="109" height="30"/>
52-
<color key="backgroundColor" red="0.1803921568627451" green="0.80000000000000004" blue="0.44313725490196076" alpha="1" colorSpace="calibratedRGB"/>
53-
<state key="normal" title="Load OGG">
54-
<color key="titleColor" cocoaTouchSystemColor="darkTextColor"/>
55-
</state>
56-
<connections>
57-
<action selector="doLoadOGG" destination="upN-2p-DeK" eventType="touchUpInside" id="hjb-ag-6Je"/>
58-
</connections>
59-
</button>
6051
</subviews>
6152
</stackView>
6253
<stackView opaque="NO" contentMode="scaleToFill" distribution="fillEqually" spacing="8" translatesAutoresizingMaskIntoConstraints="NO" id="BcZ-fY-in9">
63-
<rect key="frame" x="0.0" y="38" width="343" height="22"/>
54+
<rect key="frame" x="0.0" y="30" width="343" height="30"/>
6455
<subviews>
6556
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="j1y-7e-BVW">
66-
<rect key="frame" x="0.0" y="0.0" width="167.5" height="22"/>
57+
<rect key="frame" x="0.0" y="0.0" width="167.5" height="30"/>
6758
<color key="backgroundColor" red="0.94509803921568625" green="0.76862745098039209" blue="0.058823529411764705" alpha="1" colorSpace="calibratedRGB"/>
6859
<state key="normal" title="Randomize Progress">
6960
<color key="titleColor" cocoaTouchSystemColor="darkTextColor"/>
@@ -73,7 +64,7 @@
7364
</connections>
7465
</button>
7566
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="peu-Yh-DqX">
76-
<rect key="frame" x="175.5" y="0.0" width="167.5" height="22"/>
67+
<rect key="frame" x="175.5" y="0.0" width="167.5" height="30"/>
7768
<color key="backgroundColor" red="0.94509803920000002" green="0.76862745099999996" blue="0.058823529409999999" alpha="1" colorSpace="calibratedRGB"/>
7869
<state key="normal" title="Randomize Colors">
7970
<color key="titleColor" cocoaTouchSystemColor="darkTextColor"/>

Example/Source/ViewController.swift

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ class ViewController: UIViewController {
4242
})
4343
}
4444

45+
///TODO: figure out how to run these back-to-back
4546
@IBAction func doRunPerformanceProfile() {
4647
NSLog("RUNNING PERFORMANCE PROFILE")
4748

@@ -61,13 +62,15 @@ class ViewController: UIViewController {
6162
self.profileResult.append(" MP3:")
6263
self.doLoadMP3()
6364
})
65+
/*
6466
// Delay execution of my block for 9 seconds.
6567
DispatchQueue.main.asyncAfter(deadline: DispatchTime.now() + Double(Int64(9) * Int64(NSEC_PER_SEC)) / Double(NSEC_PER_SEC), execute: {
6668
self.profileResult.append(" OGG:")
6769
self.doLoadOGG()
6870
})
69-
// Delay execution of my block for 14 seconds.
70-
DispatchQueue.main.asyncAfter(deadline: DispatchTime.now() + Double(Int64(14) * Int64(NSEC_PER_SEC)) / Double(NSEC_PER_SEC), execute: {
71+
*/
72+
// Delay execution of my block for 9 seconds.
73+
DispatchQueue.main.asyncAfter(deadline: DispatchTime.now() + Double(Int64(9) * Int64(NSEC_PER_SEC)) / Double(NSEC_PER_SEC), execute: {
7174
let alert = UIAlertController(title: "PLEASE POST TO github.com/fulldecent/FDWaveformView/wiki", message: self.profileResult, preferredStyle: .alert)
7275
let action = UIAlertAction(title: "OK", style: .default)
7376
alert.addAction(action)

Example/iOS Example.xcodeproj/project.pbxproj

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@
246246
isa = PBXProject;
247247
attributes = {
248248
LastSwiftUpdateCheck = 0730;
249-
LastUpgradeCheck = 0830;
249+
LastUpgradeCheck = 0900;
250250
ORGANIZATIONNAME = "William Entriken";
251251
TargetAttributes = {
252252
D904BBBF1CDD3F170083BD78 = {
@@ -470,7 +470,7 @@
470470
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
471471
PRODUCT_BUNDLE_IDENTIFIER = net.phor.Tests;
472472
PRODUCT_NAME = "$(TARGET_NAME)";
473-
SWIFT_VERSION = 3.0;
473+
SWIFT_VERSION = 4.0;
474474
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/iOS Example.app/iOS Example";
475475
};
476476
name = Debug;
@@ -484,7 +484,7 @@
484484
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
485485
PRODUCT_BUNDLE_IDENTIFIER = net.phor.Tests;
486486
PRODUCT_NAME = "$(TARGET_NAME)";
487-
SWIFT_VERSION = 3.0;
487+
SWIFT_VERSION = 4.0;
488488
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/iOS Example.app/iOS Example";
489489
};
490490
name = Release;
@@ -498,14 +498,20 @@
498498
CLANG_CXX_LIBRARY = "libc++";
499499
CLANG_ENABLE_MODULES = YES;
500500
CLANG_ENABLE_OBJC_ARC = YES;
501+
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
501502
CLANG_WARN_BOOL_CONVERSION = YES;
503+
CLANG_WARN_COMMA = YES;
502504
CLANG_WARN_CONSTANT_CONVERSION = YES;
503505
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
504506
CLANG_WARN_EMPTY_BODY = YES;
505507
CLANG_WARN_ENUM_CONVERSION = YES;
506508
CLANG_WARN_INFINITE_RECURSION = YES;
507509
CLANG_WARN_INT_CONVERSION = YES;
510+
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
511+
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
508512
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
513+
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
514+
CLANG_WARN_STRICT_PROTOTYPES = YES;
509515
CLANG_WARN_SUSPICIOUS_MOVE = YES;
510516
CLANG_WARN_UNREACHABLE_CODE = YES;
511517
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
@@ -546,14 +552,20 @@
546552
CLANG_CXX_LIBRARY = "libc++";
547553
CLANG_ENABLE_MODULES = YES;
548554
CLANG_ENABLE_OBJC_ARC = YES;
555+
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
549556
CLANG_WARN_BOOL_CONVERSION = YES;
557+
CLANG_WARN_COMMA = YES;
550558
CLANG_WARN_CONSTANT_CONVERSION = YES;
551559
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
552560
CLANG_WARN_EMPTY_BODY = YES;
553561
CLANG_WARN_ENUM_CONVERSION = YES;
554562
CLANG_WARN_INFINITE_RECURSION = YES;
555563
CLANG_WARN_INT_CONVERSION = YES;
564+
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
565+
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
556566
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
567+
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
568+
CLANG_WARN_STRICT_PROTOTYPES = YES;
557569
CLANG_WARN_SUSPICIOUS_MOVE = YES;
558570
CLANG_WARN_UNREACHABLE_CODE = YES;
559571
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
@@ -592,7 +604,7 @@
592604
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
593605
PRODUCT_BUNDLE_IDENTIFIER = "net.phor.FDWaveformView.FDWaveformView-iOS";
594606
PRODUCT_NAME = "iOS Example";
595-
SWIFT_VERSION = 3.0;
607+
SWIFT_VERSION = 4.0;
596608
};
597609
name = Debug;
598610
};
@@ -609,7 +621,7 @@
609621
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
610622
PRODUCT_BUNDLE_IDENTIFIER = "net.phor.FDWaveformView.FDWaveformView-iOS";
611623
PRODUCT_NAME = "iOS Example";
612-
SWIFT_VERSION = 3.0;
624+
SWIFT_VERSION = 4.0;
613625
};
614626
name = Release;
615627
};

FDWaveformView.xcodeproj/project.pbxproj

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@
156156
isa = PBXProject;
157157
attributes = {
158158
LastSwiftUpdateCheck = 0730;
159-
LastUpgradeCheck = 0800;
159+
LastUpgradeCheck = 0900;
160160
ORGANIZATIONNAME = FDWaveformView_OWNER;
161161
TargetAttributes = {
162162
D9FEF4B31CCEBC0D0013FBDD = {
@@ -243,14 +243,20 @@
243243
CLANG_CXX_LIBRARY = "libc++";
244244
CLANG_ENABLE_MODULES = YES;
245245
CLANG_ENABLE_OBJC_ARC = YES;
246+
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
246247
CLANG_WARN_BOOL_CONVERSION = YES;
248+
CLANG_WARN_COMMA = YES;
247249
CLANG_WARN_CONSTANT_CONVERSION = YES;
248250
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
249251
CLANG_WARN_EMPTY_BODY = YES;
250252
CLANG_WARN_ENUM_CONVERSION = YES;
251253
CLANG_WARN_INFINITE_RECURSION = YES;
252254
CLANG_WARN_INT_CONVERSION = YES;
255+
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
256+
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
253257
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
258+
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
259+
CLANG_WARN_STRICT_PROTOTYPES = YES;
254260
CLANG_WARN_SUSPICIOUS_MOVE = YES;
255261
CLANG_WARN_UNREACHABLE_CODE = YES;
256262
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
@@ -294,14 +300,20 @@
294300
CLANG_CXX_LIBRARY = "libc++";
295301
CLANG_ENABLE_MODULES = YES;
296302
CLANG_ENABLE_OBJC_ARC = YES;
303+
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
297304
CLANG_WARN_BOOL_CONVERSION = YES;
305+
CLANG_WARN_COMMA = YES;
298306
CLANG_WARN_CONSTANT_CONVERSION = YES;
299307
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
300308
CLANG_WARN_EMPTY_BODY = YES;
301309
CLANG_WARN_ENUM_CONVERSION = YES;
302310
CLANG_WARN_INFINITE_RECURSION = YES;
303311
CLANG_WARN_INT_CONVERSION = YES;
312+
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
313+
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
304314
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
315+
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
316+
CLANG_WARN_STRICT_PROTOTYPES = YES;
305317
CLANG_WARN_SUSPICIOUS_MOVE = YES;
306318
CLANG_WARN_UNREACHABLE_CODE = YES;
307319
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
@@ -347,7 +359,6 @@
347359
PRODUCT_NAME = "$(TARGET_NAME)";
348360
SKIP_INSTALL = YES;
349361
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
350-
SWIFT_SWIFT3_OBJC_INFERENCE = On;
351362
SWIFT_VERSION = 4.0;
352363
};
353364
name = Debug;
@@ -368,7 +379,6 @@
368379
PRODUCT_BUNDLE_IDENTIFIER = net.phor.FDWaveformView.FDWaveformView;
369380
PRODUCT_NAME = "$(TARGET_NAME)";
370381
SKIP_INSTALL = YES;
371-
SWIFT_SWIFT3_OBJC_INFERENCE = On;
372382
SWIFT_VERSION = 4.0;
373383
};
374384
name = Release;

FDWaveformView.xcodeproj/xcshareddata/xcschemes/FDWaveformView.xcscheme

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "0830"
3+
LastUpgradeVersion = "0900"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"
@@ -26,6 +26,7 @@
2626
buildConfiguration = "Debug"
2727
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
2828
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
29+
language = ""
2930
shouldUseLaunchSchemeArgsEnv = "YES"
3031
codeCoverageEnabled = "YES">
3132
<Testables>
@@ -56,6 +57,7 @@
5657
buildConfiguration = "Debug"
5758
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
5859
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
60+
language = ""
5961
launchStyle = "0"
6062
useCustomWorkingDirectory = "NO"
6163
ignoresPersistentStateOnLaunch = "NO"

FDWaveformView.xcworkspace/xcshareddata/xcschemes/iOS Example.xcscheme

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "0830"
3+
LastUpgradeVersion = "0900"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"
@@ -26,6 +26,7 @@
2626
buildConfiguration = "Debug"
2727
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
2828
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
29+
language = ""
2930
shouldUseLaunchSchemeArgsEnv = "YES">
3031
<Testables>
3132
<TestableReference
@@ -55,6 +56,7 @@
5556
buildConfiguration = "Debug"
5657
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
5758
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
59+
language = ""
5860
launchStyle = "0"
5961
useCustomWorkingDirectory = "NO"
6062
ignoresPersistentStateOnLaunch = "NO"

0 commit comments

Comments
 (0)