Skip to content

Commit

Permalink
Merge pull request #32 from orchetect/dev
Browse files Browse the repository at this point in the history
`MIDIEventLogger` Updates
  • Loading branch information
orchetect authored Aug 12, 2021
2 parents ee6f3ab + 52b5a5f commit ab7f9b6
Show file tree
Hide file tree
Showing 5 changed files with 49 additions and 8 deletions.
12 changes: 10 additions & 2 deletions Examples/MIDIEventLogger/MIDIEventLogger.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@
archiveVersion = 1;
classes = {
};
objectVersion = 55;
objectVersion = 54;
objects = {

/* Begin PBXBuildFile section */
E216886126C5E5A400BF7959 /* Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = E216886026C5E5A400BF7959 /* Info.plist */; };
E26A25B426C586F700FFCF40 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = E26A25B326C586F700FFCF40 /* Assets.xcassets */; };
E26A25B726C586F700FFCF40 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = E26A25B526C586F700FFCF40 /* Main.storyboard */; };
E26A25C126C5873B00FFCF40 /* HostingWindowKey.swift in Sources */ = {isa = PBXBuildFile; fileRef = E26A25BD26C5873B00FFCF40 /* HostingWindowKey.swift */; };
Expand All @@ -19,6 +20,7 @@
/* End PBXBuildFile section */

/* Begin PBXFileReference section */
E216886026C5E5A400BF7959 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
E26A25AC26C586F600FFCF40 /* MIDIEventLogger.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = MIDIEventLogger.app; sourceTree = BUILT_PRODUCTS_DIR; };
E26A25B326C586F700FFCF40 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
E26A25B626C586F700FFCF40 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
Expand Down Expand Up @@ -68,6 +70,7 @@
E26A25CE26C5AD4700FFCF40 /* ContentView SubViews.swift */,
E26A25BD26C5873B00FFCF40 /* HostingWindowKey.swift */,
E26A25BF26C5873B00FFCF40 /* logErrors.swift */,
E216886026C5E5A400BF7959 /* Info.plist */,
E26A25B326C586F700FFCF40 /* Assets.xcassets */,
E26A25B526C586F700FFCF40 /* Main.storyboard */,
);
Expand Down Expand Up @@ -115,7 +118,7 @@
};
};
buildConfigurationList = E26A25A726C586F600FFCF40 /* Build configuration list for PBXProject "MIDIEventLogger" */;
compatibilityVersion = "Xcode 13.0";
compatibilityVersion = "Xcode 12.0";
developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
Expand All @@ -142,6 +145,7 @@
files = (
E26A25B426C586F700FFCF40 /* Assets.xcassets in Resources */,
E26A25B726C586F700FFCF40 /* Main.storyboard in Resources */,
E216886126C5E5A400BF7959 /* Info.plist in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -303,6 +307,8 @@
ENABLE_HARDENED_RUNTIME = YES;
ENABLE_USER_SELECTED_FILES = readonly;
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_FILE = MIDIEventLogger/Info.plist;
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.utilities";
INFOPLIST_KEY_NSHumanReadableCopyright = "";
INFOPLIST_KEY_NSMainStoryboardFile = Main;
INFOPLIST_KEY_NSPrincipalClass = NSApplication;
Expand Down Expand Up @@ -334,6 +340,8 @@
ENABLE_HARDENED_RUNTIME = YES;
ENABLE_USER_SELECTED_FILES = readonly;
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_FILE = MIDIEventLogger/Info.plist;
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.utilities";
INFOPLIST_KEY_NSHumanReadableCopyright = "";
INFOPLIST_KEY_NSMainStoryboardFile = Main;
INFOPLIST_KEY_NSPrincipalClass = NSApplication;
Expand Down
6 changes: 3 additions & 3 deletions Examples/MIDIEventLogger/MIDIEventLogger/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,14 @@ class AppDelegate: NSObject, NSApplicationDelegate {
window = NSWindow(
contentRect: NSRect(x: 0,
y: 0,
width: ContentView.kMinHeight,
height: ContentView.kMinWidth),
width: ContentView.kMinWidth,
height: ContentView.kMinHeight),
styleMask: [.titled, .miniaturizable, .resizable],
backing: .buffered,
defer: false)

// Create the SwiftUI view that provides the window contents.
window.isReleasedWhenClosed = false
window.isReleasedWhenClosed = true

window.center()
window.setFrameAutosaveName("Main Window")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ extension ContentView {
VStack(alignment: .center, spacing: 8) {

Picker("UMP Group", selection: $midiGroup) {
ForEach(0..<15+1) {
ForEach(0..<15+1, id: \.self) {
let groupNum = $0 + 1
let groupNumHex = $0.hex.stringValue(padTo: 1, prefix: true)

Expand Down Expand Up @@ -78,7 +78,7 @@ extension ContentView {
VStack(alignment: .center, spacing: 8) {

Picker("Channel", selection: $midiChannel) {
ForEach(0..<15+1) {
ForEach(0..<15+1, id: \.self) {
let channelNum = $0 + 1
let channelNumHex = $0.hex.stringValue(padTo: 1, prefix: true)

Expand Down
3 changes: 2 additions & 1 deletion Examples/MIDIEventLogger/MIDIEventLogger/ContentView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,8 @@ struct ContentView: View {
// wait a short delay in order to give CoreMIDI time
// to set up the virtual endpoints we created in the view's init()
DispatchQueue.main
.asyncAfter(deadline: .now().advanced(by: .milliseconds(500)))
.asyncAfter(deadline: DispatchTime.now()
.advanced(by: .milliseconds(500)))
{
setInputConnectionToVirtual()
}
Expand Down
32 changes: 32 additions & 0 deletions Examples/MIDIEventLogger/MIDIEventLogger/Info.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<?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>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIconFile</key>
<string></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>$(PRODUCT_BUNDLE_PACKAGE_TYPE)</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>LSApplicationCategoryType</key>
<string>public.app-category.utilities</string>
<key>LSMinimumSystemVersion</key>
<string>$(MACOSX_DEPLOYMENT_TARGET)</string>
<key>NSMainStoryboardFile</key>
<string>Main</string>
<key>NSPrincipalClass</key>
<string>NSApplication</string>
</dict>
</plist>

0 comments on commit ab7f9b6

Please sign in to comment.