diff --git a/Beethoven.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Beethoven.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
new file mode 100644
index 0000000..18d9810
--- /dev/null
+++ b/Beethoven.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
@@ -0,0 +1,8 @@
+
+
+
+
+ IDEDidComputeMac32BitWarning
+
+
+
diff --git a/Example/GuitarTuner/GuitarTuner.xcodeproj/project.pbxproj b/Example/GuitarTuner/GuitarTuner.xcodeproj/project.pbxproj
index 8ab3832..5ef94e5 100644
--- a/Example/GuitarTuner/GuitarTuner.xcodeproj/project.pbxproj
+++ b/Example/GuitarTuner/GuitarTuner.xcodeproj/project.pbxproj
@@ -126,9 +126,7 @@
D57D40FA1BE95A350026B005 /* Frameworks */,
D57D40FB1BE95A350026B005 /* Resources */,
9A1FE1805890F1ADECBB5C91 /* [CP] Embed Pods Frameworks */,
- C388AD861F71DDEC8588850E /* [CP] Copy Pods Resources */,
BBF9D165E87DC40FC3115EAE /* 📦 Embed Pods Frameworks */,
- 6F77F9EE9820226CF5C57DF3 /* 📦 Copy Pods Resources */,
);
buildRules = (
);
@@ -150,7 +148,7 @@
TargetAttributes = {
D57D40FC1BE95A350026B005 = {
CreatedOnToolsVersion = 7.0.1;
- DevelopmentTeam = 6YMA3EN78R;
+ DevelopmentTeam = KMUT74CVY5;
LastSwiftMigration = 0900;
};
};
@@ -160,6 +158,7 @@
developmentRegion = English;
hasScannedForEncodings = 0;
knownRegions = (
+ English,
en,
Base,
);
@@ -219,28 +218,13 @@
shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n";
showEnvVarsInLog = 0;
};
- 6F77F9EE9820226CF5C57DF3 /* 📦 Copy Pods Resources */ = {
- isa = PBXShellScriptBuildPhase;
- buildActionMask = 2147483647;
- files = (
- );
- inputPaths = (
- );
- name = "📦 Copy Pods Resources";
- outputPaths = (
- );
- runOnlyForDeploymentPostprocessing = 0;
- shellPath = /bin/sh;
- shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-GuitarTuner/Pods-GuitarTuner-resources.sh\"\n";
- showEnvVarsInLog = 0;
- };
9A1FE1805890F1ADECBB5C91 /* [CP] Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
- "${SRCROOT}/Pods/Target Support Files/Pods-GuitarTuner/Pods-GuitarTuner-frameworks.sh",
+ "${PODS_ROOT}/Target Support Files/Pods-GuitarTuner/Pods-GuitarTuner-frameworks.sh",
"${BUILT_PRODUCTS_DIR}/Beethoven/Beethoven.framework",
"${BUILT_PRODUCTS_DIR}/Cartography/Cartography.framework",
"${BUILT_PRODUCTS_DIR}/Hue/Hue.framework",
@@ -255,7 +239,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
- shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-GuitarTuner/Pods-GuitarTuner-frameworks.sh\"\n";
+ shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-GuitarTuner/Pods-GuitarTuner-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
BBF9D165E87DC40FC3115EAE /* 📦 Embed Pods Frameworks */ = {
@@ -273,21 +257,6 @@
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-GuitarTuner/Pods-GuitarTuner-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
- C388AD861F71DDEC8588850E /* [CP] Copy Pods Resources */ = {
- isa = PBXShellScriptBuildPhase;
- buildActionMask = 2147483647;
- files = (
- );
- inputPaths = (
- );
- name = "[CP] Copy Pods Resources";
- outputPaths = (
- );
- runOnlyForDeploymentPostprocessing = 0;
- shellPath = /bin/sh;
- shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-GuitarTuner/Pods-GuitarTuner-resources.sh\"\n";
- showEnvVarsInLog = 0;
- };
/* End PBXShellScriptBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
@@ -363,7 +332,7 @@
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
- SWIFT_VERSION = 3.0;
+ SWIFT_VERSION = 5.0;
};
name = Debug;
};
@@ -409,7 +378,7 @@
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
- SWIFT_VERSION = 3.0;
+ SWIFT_VERSION = 5.0;
VALIDATE_PRODUCT = YES;
};
name = Release;
@@ -420,13 +389,13 @@
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
- DEVELOPMENT_TEAM = 6YMA3EN78R;
+ DEVELOPMENT_TEAM = KMUT74CVY5;
INFOPLIST_FILE = "$(SRCROOT)/GuitarTuner/Info.plist";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.vadymmarkov.GuitarTuner;
PRODUCT_NAME = GuitarTuner;
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
- SWIFT_VERSION = 4.0;
+ SWIFT_VERSION = 5.0;
};
name = Debug;
};
@@ -436,13 +405,13 @@
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
- DEVELOPMENT_TEAM = 6YMA3EN78R;
+ DEVELOPMENT_TEAM = 4C97DN55EV;
INFOPLIST_FILE = "$(SRCROOT)/GuitarTuner/Info.plist";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.vadymmarkov.GuitarTuner;
PRODUCT_NAME = GuitarTuner;
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
- SWIFT_VERSION = 4.0;
+ SWIFT_VERSION = 5.0;
};
name = Release;
};
diff --git a/Example/GuitarTuner/GuitarTuner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Example/GuitarTuner/GuitarTuner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
new file mode 100644
index 0000000..18d9810
--- /dev/null
+++ b/Example/GuitarTuner/GuitarTuner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
@@ -0,0 +1,8 @@
+
+
+
+
+ IDEDidComputeMac32BitWarning
+
+
+
diff --git a/Example/GuitarTuner/GuitarTuner/Source/AppDelegate.swift b/Example/GuitarTuner/GuitarTuner/Source/AppDelegate.swift
index d0267a3..d34bad8 100644
--- a/Example/GuitarTuner/GuitarTuner/Source/AppDelegate.swift
+++ b/Example/GuitarTuner/GuitarTuner/Source/AppDelegate.swift
@@ -8,7 +8,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
lazy var viewController: ViewController = .init()
func application(_ application: UIApplication,
- didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
+ didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
window = UIWindow(frame: UIScreen.main.bounds)
window?.rootViewController = navigationController
@@ -26,7 +26,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
navigationBar.isTranslucent = false
navigationBar.shadowImage = UIImage()
navigationBar.titleTextAttributes = [
- NSAttributedStringKey.foregroundColor: UIColor.white
+ NSAttributedString.Key.foregroundColor: UIColor.white
]
}
}
diff --git a/Example/GuitarTuner/GuitarTuner/Source/ViewController.swift b/Example/GuitarTuner/GuitarTuner/Source/ViewController.swift
index e82a165..b497519 100644
--- a/Example/GuitarTuner/GuitarTuner/Source/ViewController.swift
+++ b/Example/GuitarTuner/GuitarTuner/Source/ViewController.swift
@@ -31,11 +31,11 @@ final class ViewController: UIViewController {
button.layer.cornerRadius = 20
button.backgroundColor = UIColor(hex: "3DAFAE")
button.titleLabel?.font = UIFont.systemFont(ofSize: 20)
- button.setTitleColor(UIColor.white, for: UIControlState())
+ button.setTitleColor(UIColor.white, for: UIControl.State())
button.addTarget(self, action: #selector(ViewController.actionButtonDidPress(_:)),
for: .touchUpInside)
- button.setTitle("Start".uppercased(), for: UIControlState())
+ button.setTitle("Start".uppercased(), for: UIControl.State())
return button
}()
diff --git a/Example/GuitarTuner/Podfile b/Example/GuitarTuner/Podfile
index edd92fd..d490dac 100644
--- a/Example/GuitarTuner/Podfile
+++ b/Example/GuitarTuner/Podfile
@@ -4,6 +4,21 @@ platform :ios, '9.0'
target 'GuitarTuner' do
pod 'Beethoven', path: '../../'
- pod 'Hue', '~> 3.0'
- pod 'Cartography'
+ pod 'Hue', '~> 5.0'
+ pod 'Cartography', '~> 3.0'
+end
+
+post_install do |installer|
+ installer.pods_project.targets.each do |target|
+ target.build_configurations.each do |config|
+ config.build_settings['SWIFT_VERSION'] = '5.0'
+ config.build_settings.delete('CODE_SIGNING_ALLOWED')
+ config.build_settings.delete('CODE_SIGNING_REQUIRED')
+ end
+ end
+ installer.pods_project.build_configurations.each do |config|
+ config.build_settings['SWIFT_VERSION'] = '5.0'
+ config.build_settings.delete('CODE_SIGNING_ALLOWED')
+ config.build_settings.delete('CODE_SIGNING_REQUIRED')
+ end
end
diff --git a/Example/GuitarTuner/Podfile.lock b/Example/GuitarTuner/Podfile.lock
index 2745cc9..6a8220f 100644
--- a/Example/GuitarTuner/Podfile.lock
+++ b/Example/GuitarTuner/Podfile.lock
@@ -1,25 +1,31 @@
PODS:
- - Beethoven (4.0.0):
+ - Beethoven (4.0.2):
- Pitchy (~> 3.0)
- - Cartography (2.0.0)
- - Hue (3.0.0)
+ - Cartography (3.1.0)
+ - Hue (5.0.0)
- Pitchy (3.0.0)
DEPENDENCIES:
- Beethoven (from `../../`)
- - Cartography
- - Hue (~> 3.0)
+ - Cartography (~> 3.0)
+ - Hue (~> 5.0)
+
+SPEC REPOS:
+ trunk:
+ - Cartography
+ - Hue
+ - Pitchy
EXTERNAL SOURCES:
Beethoven:
- :path: ../../
+ :path: "../../"
SPEC CHECKSUMS:
- Beethoven: 0cb6d02eace9841d29fcb52f92334d2bd4c8e131
- Cartography: d295eb25ab54bb57eecd8c2f04e9648c850f1281
- Hue: b8fe1e43eef13631331eebecb2198b68e2622f95
+ Beethoven: 04f99571a7ad2a37184161762be757fe0b8ccc20
+ Cartography: 1988b7578871a56c036e7af17195cb2190edf18c
+ Hue: c129cb67be7d093a82bbbc30ce8a96757bf6f37a
Pitchy: 15407e4425b6d88fa3e7eef8927ba659fab52d7a
-PODFILE CHECKSUM: 38c90b3edadf248124cd55d1086854ecf4e5c51b
+PODFILE CHECKSUM: 36c8d115bba4c2b8ff7ae95956fd288002fa13e5
-COCOAPODS: 1.3.1
+COCOAPODS: 1.8.4
diff --git a/Source/PitchEngine.swift b/Source/PitchEngine.swift
index 27e94a3..696b3dd 100644
--- a/Source/PitchEngine.swift
+++ b/Source/PitchEngine.swift
@@ -73,12 +73,12 @@ public final class PitchEngine {
let audioSession = AVAudioSession.sharedInstance()
- switch audioSession.recordPermission() {
+ switch audioSession.recordPermission {
case AVAudioSessionRecordPermission.granted:
activate()
case AVAudioSessionRecordPermission.denied:
DispatchQueue.main.async {
- if let settingsURL = URL(string: UIApplicationOpenSettingsURLString) {
+ if let settingsURL = URL(string: UIApplication.openSettingsURLString) {
UIApplication.shared.openURL(settingsURL)
}
}
diff --git a/Source/SignalTracking/SignalTracker.swift b/Source/SignalTracking/SignalTracker.swift
index 6e7e374..82a21d0 100644
--- a/Source/SignalTracking/SignalTracker.swift
+++ b/Source/SignalTracking/SignalTracker.swift
@@ -16,7 +16,7 @@ public protocol SignalTracker: class {
var levelThreshold: Float? { get set }
var peakLevel: Float? { get }
var averageLevel: Float? { get }
- weak var delegate: SignalTrackerDelegate? { get set }
+ var delegate: SignalTrackerDelegate? { get set }
func start() throws
func stop()
diff --git a/Source/SignalTracking/Units/InputSignalTracker.swift b/Source/SignalTracking/Units/InputSignalTracker.swift
index 02bf586..648add2 100644
--- a/Source/SignalTracking/Units/InputSignalTracker.swift
+++ b/Source/SignalTracking/Units/InputSignalTracker.swift
@@ -39,14 +39,14 @@ final class InputSignalTracker: SignalTracker {
// MARK: - Tracking
func start() throws {
- try session.setCategory(AVAudioSessionCategoryPlayAndRecord)
+ try session.setCategory(AVAudioSession.Category.playAndRecord)
// check input type
let currentRoute = session.currentRoute
if currentRoute.outputs.count != 0 {
for description in currentRoute.outputs {
- if (description.portType != AVAudioSessionPortHeadphones) { // input from speaker if port is not headphones
- try session.overrideOutputAudioPort(AVAudioSessionPortOverride.speaker)
+ if (description.portType != AVAudioSession.Port.headphones) { // input from speaker if port is not headphones
+ try session.overrideOutputAudioPort(AVAudioSession.PortOverride.speaker)
} else { // input from default (headphones)
try session.overrideOutputAudioPort(.none)
}
diff --git a/Source/SignalTracking/Units/OutputSignalTracker.swift b/Source/SignalTracking/Units/OutputSignalTracker.swift
index 89e7b34..fc082d1 100644
--- a/Source/SignalTracking/Units/OutputSignalTracker.swift
+++ b/Source/SignalTracking/Units/OutputSignalTracker.swift
@@ -36,7 +36,7 @@ final class OutputSignalTracker: SignalTracker {
func start() throws {
let session = AVAudioSession.sharedInstance()
- try session.setCategory(AVAudioSessionCategoryPlayback)
+ try session.setCategory(AVAudioSession.Category.playback)
audioEngine = AVAudioEngine()
audioPlayer = AVAudioPlayerNode()