Skip to content

Commit 69cf25b

Browse files
committed
Fix version tag setting
1 parent 32f8e7f commit 69cf25b

File tree

11 files changed

+37
-12
lines changed

11 files changed

+37
-12
lines changed

--NAME--.xcodeproj/project.pbxproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@
137137
BDE2CE1724A3E887004AC8FA /* Dev.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Dev.xcconfig; path = Configuration/Dev.xcconfig; sourceTree = "<group>"; };
138138
BDE2CE1824A3E8DB004AC8FA /* Staging.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Staging.xcconfig; path = Configuration/Staging.xcconfig; sourceTree = "<group>"; };
139139
BDE2CE1924A3EBD1004AC8FA /* Common.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Common.xcconfig; path = Configuration/Common.xcconfig; sourceTree = "<group>"; };
140-
BDEFCA2825F64BF10095858D /* --NAME--AU.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = "--NAME--AU.entitlements"; sourceTree = "<group>"; };
140+
BDEFCA2825F64BF10095858D /* AU.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = AU.entitlements; sourceTree = "<group>"; };
141141
C4201A2822403120006E4333 /* ViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = "<group>"; };
142142
C433F56022404C7C00F1B750 /* ViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = "<group>"; };
143143
C437FE3A222367A6008D6C09 /* --NAME--Host.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "--NAME--Host.app"; sourceTree = BUILT_PRODUCTS_DIR; };
@@ -319,7 +319,7 @@
319319
C4BEE7B722236A58001E6B6D /* Extension */ = {
320320
isa = PBXGroup;
321321
children = (
322-
BDEFCA2825F64BF10095858D /* --NAME--AU.entitlements */,
322+
BDEFCA2825F64BF10095858D /* AU.entitlements */,
323323
C4201A2822403120006E4333 /* ViewController.swift */,
324324
C4C9EAAB2227D79D003FEE1C /* ViewController.xib */,
325325
C4BEE7BE22236A58001E6B6D /* Info.plist */,
@@ -1085,7 +1085,7 @@
10851085
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
10861086
CLANG_WARN_UNREACHABLE_CODE = YES;
10871087
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
1088-
CODE_SIGN_ENTITLEMENTS = "macOS/Extension/--NAME--AU.entitlements";
1088+
CODE_SIGN_ENTITLEMENTS = macOS/Extension/AU.entitlements;
10891089
CODE_SIGN_IDENTITY = "Mac Developer";
10901090
CODE_SIGN_STYLE = Automatic;
10911091
COPY_PHASE_STRIP = NO;
@@ -1430,7 +1430,7 @@
14301430
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
14311431
CLANG_WARN_UNREACHABLE_CODE = YES;
14321432
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
1433-
CODE_SIGN_ENTITLEMENTS = "macOS/Extension/--NAME--AU.entitlements";
1433+
CODE_SIGN_ENTITLEMENTS = macOS/Extension/AU.entitlements;
14341434
CODE_SIGN_IDENTITY = "Mac Developer";
14351435
CODE_SIGN_STYLE = Automatic;
14361436
COPY_PHASE_STRIP = NO;

iOS/App/AppDelegate.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// Copyright © 2022 Brad Howes. All rights reserved.
2+
#if os(iOS)
23

34
import UIKit
45
import AUv3Support
@@ -10,3 +11,5 @@ final class AppDelegate: AUv3Support_iOS.AppDelegate {
1011
// NOTE: this special form sets the subsystem name and must run before any other logger calls.
1112
private let log: OSLog = Shared.logger(Bundle.main.auBaseName + "Host", "AppDelegate")
1213
}
14+
15+
#endif

iOS/App/MainViewController.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// Copyright © 2021 Brad Howes. All rights reserved.
2+
#if os(iOS)
23

34
import AUv3Support
45
import AUv3Support_iOS
@@ -39,3 +40,4 @@ final class MainViewController: UIViewController {
3940
}
4041
}
4142

43+
#endif

iOS/Extension/Base.lproj/MainInterface.storyboard

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
<!--ViewController-->
1818
<scene sceneID="tne-QT-ifu">
1919
<objects>
20-
<viewController id="BYZ-38-t0r" userLabel="ViewController" customClass="ViewController" customModule="__NAME__AU" customModuleProvider="target" sceneMemberID="viewController">
20+
<viewController id="BYZ-38-t0r" userLabel="ViewController" customClass="ViewController" customModule="--NAME--AU" customModuleProvider="target" sceneMemberID="viewController">
2121
<view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC">
2222
<rect key="frame" x="0.0" y="0.0" width="667" height="375"/>
2323
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>

iOS/Extension/ViewController.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// Copyright © 2022 Brad Howes. All rights reserved.
2+
#if os(iOS)
23

34
import AUv3Support
45
import CoreAudioKit
@@ -232,3 +233,5 @@ private enum InternalConstants {
232233
private class EmptyClass {}
233234
static let bundle = Bundle(for: InternalConstants.EmptyClass.self)
234235
}
236+
237+
#endif

macOS/App/AppDelegate.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// Copyright © 2022 Brad Howes. All rights reserved.
2+
#if os(macOS)
23

34
import Cocoa
45
import AUv3Support
@@ -27,3 +28,5 @@ class AppDelegate: NSObject, NSApplicationDelegate {
2728
NSWorkspace.shared.open(appStoreUrl)
2829
}
2930
}
31+
32+
#endif

macOS/App/MainViewController.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
// Copyright © 2021 Brad Howes. All rights reserved.
22

3+
#if os(macOS)
4+
35
import AUv3Support
46
import AUv3Support_macOS
57
import CoreAudioKit
@@ -65,3 +67,5 @@ extension MainViewController {
6567
hostViewManager?.showInitialPrompt()
6668
}
6769
}
70+
71+
#endif

macOS/App/MainWindowController.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
// Copyright © 2021 Brad Howes. All rights reserved.
22

3+
#if os(macOS)
4+
35
import Cocoa
46

57
/**
@@ -11,3 +13,5 @@ final class MainWindowController: NSWindowController {
1113
@IBOutlet public weak var bypassButton: NSButton!
1214
@IBOutlet public weak var presetsButton: NSPopUpButton!
1315
}
16+
17+
#endif
File renamed without changes.

macOS/Extension/ViewController.swift

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
// Copyright © 2022 Brad Howes. All rights reserved.
22

3+
#if os(macOS)
4+
35
import AUv3Support
46
import CoreAudioKit
57
import Kernel
@@ -14,13 +16,14 @@ extension Knob: @retroactive AUParameterValueProvider, @retroactive RangedContro
1416
/**
1517
Controller for the AUv3 filter view. Handles wiring up of the controls with AUParameter settings.
1618
*/
17-
@objc open class ViewController: AUViewController {
19+
@objc final public class ViewController: AUViewController {
1820

1921
// NOTE: this special form sets the subsystem name and must run before any other logger calls.
2022
private let log: OSLog = Shared.logger(Bundle.main.auBaseName + "AU", "ViewController")
2123

2224
private let parameters = Parameters()
2325
private var viewConfig: AUAudioUnitViewConfiguration!
26+
private var versionTagValue: String = ""
2427

2528
@IBOutlet private weak var controlsView: NSView!
2629

@@ -45,7 +48,7 @@ extension Knob: @retroactive AUParameterValueProvider, @retroactive RangedContro
4548
@IBOutlet private weak var odd90Control: NSSwitch!
4649
@IBOutlet private weak var negativeFeedbackControl: NSSwitch!
4750

48-
@IBOutlet private weak var versionTag: NSTextView!
51+
@IBOutlet private weak var versionTag: NSTextField!
4952

5053
private lazy var controls: [ParameterAddress: (Knob, FocusAwareTextField)] = [
5154
.depth: (depthControl, depthValueLabel),
@@ -88,6 +91,10 @@ public extension ViewController {
8891
os_log(.info, log: log, "viewDidLoad END")
8992
}
9093

94+
override func viewDidAppear() {
95+
versionTag.text = versionTagValue
96+
}
97+
9198
override func mouseDown(with event: NSEvent) {
9299
// Allow for clicks on the common NSView to end editing of values
93100
NSApp.keyWindow?.makeFirstResponder(nil)
@@ -104,15 +111,12 @@ extension ViewController: AUAudioUnitFactory {
104111
@objc public func createAudioUnit(with componentDescription: AudioComponentDescription) throws -> AUAudioUnit {
105112
let bundle = InternalConstants.bundle
106113

107-
DispatchQueue.main.async {
108-
self.versionTag.string = bundle.versionTag
109-
}
110-
111114
let kernel = KernelBridge(bundle.auBaseName, maxDelayMilliseconds: parameters[.delay].maxValue)
112115
let audioUnit = try FilterAudioUnitFactory.create(componentDescription: componentDescription,
113116
parameters: parameters,
114117
kernel: kernel,
115118
viewConfigurationManager: self)
119+
self.versionTagValue = bundle.versionTag
116120
self.audioUnit = audioUnit
117121
return audioUnit
118122
}
@@ -201,3 +205,5 @@ private enum InternalConstants {
201205
private class EmptyClass {}
202206
static let bundle = Bundle(for: InternalConstants.EmptyClass.self)
203207
}
208+
209+
#endif

0 commit comments

Comments
 (0)