Skip to content

Commit d4d561f

Browse files
committed
First commit
0 parents  commit d4d561f

File tree

17 files changed

+1583
-0
lines changed

17 files changed

+1583
-0
lines changed

Notification test.xcodeproj/project.pbxproj

+479
Large diffs are not rendered by default.

Notification test.xcodeproj/project.xcworkspace/contents.xcworkspacedata

+7
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<Scheme
3+
LastUpgradeVersion = "0500"
4+
version = "1.3">
5+
<BuildAction
6+
parallelizeBuildables = "YES"
7+
buildImplicitDependencies = "YES">
8+
<BuildActionEntries>
9+
<BuildActionEntry
10+
buildForTesting = "YES"
11+
buildForRunning = "YES"
12+
buildForProfiling = "YES"
13+
buildForArchiving = "YES"
14+
buildForAnalyzing = "YES">
15+
<BuildableReference
16+
BuildableIdentifier = "primary"
17+
BlueprintIdentifier = "27ED45601825CB4600B91F32"
18+
BuildableName = "Notification test.app"
19+
BlueprintName = "Notification test"
20+
ReferencedContainer = "container:Notification test.xcodeproj">
21+
</BuildableReference>
22+
</BuildActionEntry>
23+
</BuildActionEntries>
24+
</BuildAction>
25+
<TestAction
26+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
27+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
28+
shouldUseLaunchSchemeArgsEnv = "YES"
29+
buildConfiguration = "Debug">
30+
<Testables>
31+
<TestableReference
32+
skipped = "NO">
33+
<BuildableReference
34+
BuildableIdentifier = "primary"
35+
BlueprintIdentifier = "27ED45811825CB4700B91F32"
36+
BuildableName = "Notification testTests.xctest"
37+
BlueprintName = "Notification testTests"
38+
ReferencedContainer = "container:Notification test.xcodeproj">
39+
</BuildableReference>
40+
</TestableReference>
41+
</Testables>
42+
<MacroExpansion>
43+
<BuildableReference
44+
BuildableIdentifier = "primary"
45+
BlueprintIdentifier = "27ED45601825CB4600B91F32"
46+
BuildableName = "Notification test.app"
47+
BlueprintName = "Notification test"
48+
ReferencedContainer = "container:Notification test.xcodeproj">
49+
</BuildableReference>
50+
</MacroExpansion>
51+
</TestAction>
52+
<LaunchAction
53+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
54+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
55+
launchStyle = "0"
56+
useCustomWorkingDirectory = "NO"
57+
buildConfiguration = "Debug"
58+
ignoresPersistentStateOnLaunch = "NO"
59+
debugDocumentVersioning = "YES"
60+
allowLocationSimulation = "YES">
61+
<BuildableProductRunnable>
62+
<BuildableReference
63+
BuildableIdentifier = "primary"
64+
BlueprintIdentifier = "27ED45601825CB4600B91F32"
65+
BuildableName = "Notification test.app"
66+
BlueprintName = "Notification test"
67+
ReferencedContainer = "container:Notification test.xcodeproj">
68+
</BuildableReference>
69+
</BuildableProductRunnable>
70+
<AdditionalOptions>
71+
</AdditionalOptions>
72+
</LaunchAction>
73+
<ProfileAction
74+
shouldUseLaunchSchemeArgsEnv = "YES"
75+
savedToolIdentifier = ""
76+
useCustomWorkingDirectory = "NO"
77+
buildConfiguration = "Release"
78+
debugDocumentVersioning = "YES">
79+
<BuildableProductRunnable>
80+
<BuildableReference
81+
BuildableIdentifier = "primary"
82+
BlueprintIdentifier = "27ED45601825CB4600B91F32"
83+
BuildableName = "Notification test.app"
84+
BlueprintName = "Notification test"
85+
ReferencedContainer = "container:Notification test.xcodeproj">
86+
</BuildableReference>
87+
</BuildableProductRunnable>
88+
</ProfileAction>
89+
<AnalyzeAction
90+
buildConfiguration = "Debug">
91+
</AnalyzeAction>
92+
<ArchiveAction
93+
buildConfiguration = "Release"
94+
revealArchiveInOrganizer = "YES">
95+
</ArchiveAction>
96+
</Scheme>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>SchemeUserState</key>
6+
<dict>
7+
<key>Notification test.xcscheme</key>
8+
<dict>
9+
<key>orderHint</key>
10+
<integer>0</integer>
11+
</dict>
12+
</dict>
13+
<key>SuppressBuildableAutocreation</key>
14+
<dict>
15+
<key>27ED45601825CB4600B91F32</key>
16+
<dict>
17+
<key>primary</key>
18+
<true/>
19+
</dict>
20+
<key>27ED45811825CB4700B91F32</key>
21+
<dict>
22+
<key>primary</key>
23+
<true/>
24+
</dict>
25+
</dict>
26+
</dict>
27+
</plist>

Notification test/AppDelegate.h

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
//
2+
// AppDelegate.h
3+
// Notification test
4+
//
5+
// Created by Kyle on 11/2/13.
6+
// Copyright (c) 2013 Kyle kersey. All rights reserved.
7+
//
8+
9+
#import <Cocoa/Cocoa.h>
10+
11+
//@interface AppDelegate : NSObject <NSApplicationDelegate>
12+
@interface AppDelegate : NSObject <NSApplicationDelegate, NSUserNotificationCenterDelegate>
13+
14+
@property (weak) IBOutlet NSTextField *nTitle;
15+
@property (weak) IBOutlet NSTextField *nMessage;
16+
-(IBAction)showNotification:(id)sender;
17+
18+
@property (assign) IBOutlet NSWindow *window;
19+
20+
@end

Notification test/AppDelegate.m

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
//
2+
// AppDelegate.m
3+
// Notification test
4+
//
5+
// Created by Kyle on 11/2/13.
6+
// Copyright (c) 2013 Kyle kersey. All rights reserved.
7+
//
8+
9+
#import "AppDelegate.h"
10+
11+
@implementation AppDelegate
12+
@synthesize nTitle;
13+
@synthesize nMessage;
14+
15+
- (IBAction)showNotification:(id)sender{
16+
NSUserNotification *notification = [[NSUserNotification alloc] init];
17+
notification.title = [nTitle stringValue];
18+
notification.informativeText = [nMessage stringValue];
19+
notification.soundName = NSUserNotificationDefaultSoundName;
20+
21+
[[NSUserNotificationCenter defaultUserNotificationCenter] deliverNotification:notification];
22+
}
23+
24+
- (void)applicationDidFinishLaunching:(NSNotification *)aNotification
25+
{
26+
// Insert code here to initialize your application
27+
[[NSUserNotificationCenter defaultUserNotificationCenter] setDelegate:self];
28+
}
29+
- (BOOL)userNotificationCenter:(NSUserNotificationCenter *)center shouldPresentNotification:(NSUserNotification *)notification{
30+
return YES;
31+
}
32+
33+
@end

0 commit comments

Comments
 (0)