Skip to content

Commit

Permalink
Added OS X demo and unit tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
ashfurrow committed May 5, 2014
1 parent 7fc58ab commit 29d7822
Show file tree
Hide file tree
Showing 17 changed files with 1,997 additions and 7 deletions.
1 change: 1 addition & 0 deletions Aspects.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Pod::Spec.new do |s|
s.license = { :type => 'MIT', :file => 'LICENSE' }
s.author = { "Peter Steinberger" => "steipete@gmail.com" }
s.ios.deployment_target = '6.0'
s.osx.deployment_target = '10.7'
s.source = { :git => "https://github.com/steipete/Aspects.git", :tag => "#{s.version}" }
s.source_files = 'Aspects.{h,m}'
s.requires_arc = true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,34 +5,34 @@
<key>IDESourceControlProjectFavoriteDictionaryKey</key>
<false/>
<key>IDESourceControlProjectIdentifier</key>
<string>33B6B49F-B571-4C65-A8FC-F7A3F1E994FA</string>
<string>218D9387-D3F0-4707-8ED5-81A06FD7EB38</string>
<key>IDESourceControlProjectName</key>
<string>AspectsDemo</string>
<key>IDESourceControlProjectOriginsDictionary</key>
<dict>
<key>56A661B5-E679-46DC-8557-125607A4D4BD</key>
<string>https://github.com/steipete/Aspects.git</string>
<key>ED3275D8-17BB-4236-BC16-031C413C4922</key>
<string>ssh://github.com/AshFurrow/Aspects.git</string>
</dict>
<key>IDESourceControlProjectPath</key>
<string>AspectsDemo/AspectsDemo.xcodeproj/project.xcworkspace</string>
<key>IDESourceControlProjectRelativeInstallPathDictionary</key>
<dict>
<key>56A661B5-E679-46DC-8557-125607A4D4BD</key>
<key>ED3275D8-17BB-4236-BC16-031C413C4922</key>
<string>../../..</string>
</dict>
<key>IDESourceControlProjectURL</key>
<string>https://github.com/steipete/Aspects.git</string>
<string>ssh://github.com/AshFurrow/Aspects.git</string>
<key>IDESourceControlProjectVersion</key>
<integer>110</integer>
<key>IDESourceControlProjectWCCIdentifier</key>
<string>56A661B5-E679-46DC-8557-125607A4D4BD</string>
<string>ED3275D8-17BB-4236-BC16-031C413C4922</string>
<key>IDESourceControlProjectWCConfigurations</key>
<array>
<dict>
<key>IDESourceControlRepositoryExtensionIdentifierKey</key>
<string>public.vcs.git</string>
<key>IDESourceControlWCCIdentifierKey</key>
<string>56A661B5-E679-46DC-8557-125607A4D4BD</string>
<string>ED3275D8-17BB-4236-BC16-031C413C4922</string>
<key>IDESourceControlWCCName</key>
<string>Aspects</string>
</dict>
Expand Down
488 changes: 488 additions & 0 deletions AspectsDemoOSX/AspectsDemoOSX.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
<?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>IDESourceControlProjectFavoriteDictionaryKey</key>
<false/>
<key>IDESourceControlProjectIdentifier</key>
<string>FBE87C6D-A92D-436F-AA1E-D8CC2A639EBF</string>
<key>IDESourceControlProjectName</key>
<string>AspectsDemoOSX</string>
<key>IDESourceControlProjectOriginsDictionary</key>
<dict>
<key>ED3275D8-17BB-4236-BC16-031C413C4922</key>
<string>ssh://github.com/AshFurrow/Aspects.git</string>
</dict>
<key>IDESourceControlProjectPath</key>
<string>AspectsDemoOSX/AspectsDemoOSX.xcodeproj/project.xcworkspace</string>
<key>IDESourceControlProjectRelativeInstallPathDictionary</key>
<dict>
<key>ED3275D8-17BB-4236-BC16-031C413C4922</key>
<string>../../..</string>
</dict>
<key>IDESourceControlProjectURL</key>
<string>ssh://github.com/AshFurrow/Aspects.git</string>
<key>IDESourceControlProjectVersion</key>
<integer>110</integer>
<key>IDESourceControlProjectWCCIdentifier</key>
<string>ED3275D8-17BB-4236-BC16-031C413C4922</string>
<key>IDESourceControlProjectWCConfigurations</key>
<array>
<dict>
<key>IDESourceControlRepositoryExtensionIdentifierKey</key>
<string>public.vcs.git</string>
<key>IDESourceControlWCCIdentifierKey</key>
<string>ED3275D8-17BB-4236-BC16-031C413C4922</string>
<key>IDESourceControlWCCName</key>
<string>Aspects</string>
</dict>
</array>
</dict>
</plist>
15 changes: 15 additions & 0 deletions AspectsDemoOSX/AspectsDemoOSX/AspectsAppDelegate.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
//
// AspectsAppDelegate.h
// AspectsDemoOSX
//
// Created by Ash Furrow on 2014-05-05.
// Copyright (c) 2014 PSPDFKit GmbH. All rights reserved.
//

#import <Cocoa/Cocoa.h>

@interface AspectsAppDelegate : NSObject <NSApplicationDelegate>

@property (assign) IBOutlet NSWindow *window;

@end
24 changes: 24 additions & 0 deletions AspectsDemoOSX/AspectsDemoOSX/AspectsAppDelegate.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
//
// AspectsAppDelegate.m
// AspectsDemoOSX
//
// Created by Ash Furrow on 2014-05-05.
// Copyright (c) 2014 PSPDFKit GmbH. All rights reserved.
//

#import "AspectsAppDelegate.h"
#import "Aspects.h"

@implementation AspectsAppDelegate

- (void)applicationDidFinishLaunching:(NSNotification *)aNotification
{
// Ignore hooks when we are testing.
if (!NSClassFromString(@"XCTestCase")) {
[self.window aspect_hookSelector:@selector(displayIfNeeded) withOptions:0 usingBlock:^(id instance, NSArray *arguments) {
NSLog(@"Window is displayed!");
} error:NULL];
}
}

@end
34 changes: 34 additions & 0 deletions AspectsDemoOSX/AspectsDemoOSX/AspectsDemoOSX-Info.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<?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>en</string>
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
<key>CFBundleIconFile</key>
<string></string>
<key>CFBundleIdentifier</key>
<string>com.pspdfkit.aspects.${PRODUCT_NAME:rfc1034identifier}</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>${PRODUCT_NAME}</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>LSMinimumSystemVersion</key>
<string>${MACOSX_DEPLOYMENT_TARGET}</string>
<key>NSHumanReadableCopyright</key>
<string>Copyright © 2014 PSPDFKit GmbH. All rights reserved.</string>
<key>NSMainNibFile</key>
<string>MainMenu</string>
<key>NSPrincipalClass</key>
<string>NSApplication</string>
</dict>
</plist>
9 changes: 9 additions & 0 deletions AspectsDemoOSX/AspectsDemoOSX/AspectsDemoOSX-Prefix.pch
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
//
// Prefix header
//
// The contents of this file are implicitly included at the beginning of every source file.
//

#ifdef __OBJC__
#import <Cocoa/Cocoa.h>
#endif
Loading

0 comments on commit 29d7822

Please sign in to comment.