-
Notifications
You must be signed in to change notification settings - Fork 71
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'Raaxcat/feature/OSX-Support' into devel…
…opment # Conflicts: # Classes/DevedUpKit/FKDUStreamUtil.h # Classes/DevedUpKit/FKDUStreamUtil.m # Classes/FlickrKit.h # Classes/FlickrKit/FlickrKit.m # Classes/Network/FKImageUploadNetworkOperation.h # Classes/Network/FKImageUploadNetworkOperation.m # DemoProject/FlickrKitDemo/FlickrKitDemo.xcodeproj/project.pbxproj # DemoProject/FlickrKitDemo/FlickrKitDemo/FKAppDelegate.m # FlickrKit.xcodeproj/project.pbxproj
- Loading branch information
Showing
23 changed files
with
2,895 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
// | ||
// AppDelegate.h | ||
// FlickrKitDemo-OSX | ||
// | ||
// Created by raxcat on 2015/10/4. | ||
// Copyright © 2015年 DevedUp Ltd. All rights reserved. | ||
// | ||
|
||
#import <Cocoa/Cocoa.h> | ||
|
||
@interface AppDelegate : NSObject <NSApplicationDelegate> | ||
|
||
|
||
@end | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
// | ||
// AppDelegate.m | ||
// FlickrKitDemo-OSX | ||
// | ||
// Created by raxcat on 2015/10/4. | ||
// Copyright © 2015年 DevedUp Ltd. All rights reserved. | ||
// | ||
|
||
#import "AppDelegate.h" | ||
@import FlickrKit; | ||
@interface AppDelegate () | ||
{ | ||
NSWindowController * _mainWindowController; | ||
} | ||
@end | ||
|
||
@implementation AppDelegate | ||
|
||
- (void)applicationDidFinishLaunching:(NSNotification *)aNotification { | ||
// Insert code here to initialize your application | ||
NSString *apiKey = @"348ea26ca45d5f9d3da7fff4822a7fd1"; | ||
NSString *secret = @"471cc96b04e60f27"; | ||
if (!apiKey) { | ||
NSLog(@"\n----------------------------------\nYou need to enter your own 'apiKey' and 'secret' in FKAppDelegate for the demo to run. \n\nYou can get these from your Flickr account settings.\n----------------------------------\n"); | ||
exit(0); | ||
} | ||
[[FlickrKit sharedFlickrKit] initializeWithAPIKey:apiKey sharedSecret:secret]; | ||
|
||
[[NSAppleEventManager sharedAppleEventManager] setEventHandler:self andSelector:@selector(handleIncomingURL:withReplyEvent:) forEventClass:kInternetEventClass andEventID:kAEGetURL]; | ||
|
||
_mainWindowController = [[NSStoryboard storyboardWithName:@"Main" bundle:nil] instantiateControllerWithIdentifier:@"mainWindowController"]; | ||
[_mainWindowController showWindow:nil]; | ||
|
||
|
||
} | ||
|
||
- (void)handleIncomingURL:(NSAppleEventDescriptor *)event withReplyEvent:(NSAppleEventDescriptor *)replyEvent | ||
{ | ||
|
||
NSURL *callbackURL = [NSURL URLWithString:[[event paramDescriptorForKeyword:keyDirectObject] stringValue]]; | ||
NSLog(@"Callback URL: %@", [callbackURL absoluteString]); | ||
|
||
[[NSNotificationCenter defaultCenter] postNotificationName:@"kCallbackURLNotification" object:self userInfo:@{@"callbackURL": callbackURL}]; | ||
|
||
} | ||
|
||
- (void)applicationWillTerminate:(NSNotification *)aNotification { | ||
// Insert code here to tear down your application | ||
} | ||
|
||
@end |
58 changes: 58 additions & 0 deletions
58
DemoProject/FlickrKitDemo/FlickrKitDemo-OSX/Assets.xcassets/AppIcon.appiconset/Contents.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
{ | ||
"images" : [ | ||
{ | ||
"idiom" : "mac", | ||
"size" : "16x16", | ||
"scale" : "1x" | ||
}, | ||
{ | ||
"idiom" : "mac", | ||
"size" : "16x16", | ||
"scale" : "2x" | ||
}, | ||
{ | ||
"idiom" : "mac", | ||
"size" : "32x32", | ||
"scale" : "1x" | ||
}, | ||
{ | ||
"idiom" : "mac", | ||
"size" : "32x32", | ||
"scale" : "2x" | ||
}, | ||
{ | ||
"idiom" : "mac", | ||
"size" : "128x128", | ||
"scale" : "1x" | ||
}, | ||
{ | ||
"idiom" : "mac", | ||
"size" : "128x128", | ||
"scale" : "2x" | ||
}, | ||
{ | ||
"idiom" : "mac", | ||
"size" : "256x256", | ||
"scale" : "1x" | ||
}, | ||
{ | ||
"idiom" : "mac", | ||
"size" : "256x256", | ||
"scale" : "2x" | ||
}, | ||
{ | ||
"idiom" : "mac", | ||
"size" : "512x512", | ||
"scale" : "1x" | ||
}, | ||
{ | ||
"idiom" : "mac", | ||
"size" : "512x512", | ||
"scale" : "2x" | ||
} | ||
], | ||
"info" : { | ||
"version" : 1, | ||
"author" : "xcode" | ||
} | ||
} |
13 changes: 13 additions & 0 deletions
13
DemoProject/FlickrKitDemo/FlickrKitDemo-OSX/AuthViewController.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
// | ||
// AuthViewController.h | ||
// FlickrKitDemo | ||
// | ||
// Created by raxcat on 2015/10/4. | ||
// Copyright © 2015年 DevedUp Ltd. All rights reserved. | ||
// | ||
|
||
#import <Cocoa/Cocoa.h> | ||
|
||
@interface AuthViewController : NSViewController | ||
|
||
@end |
25 changes: 25 additions & 0 deletions
25
DemoProject/FlickrKitDemo/FlickrKitDemo-OSX/AuthViewController.m
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
// | ||
// AuthViewController.m | ||
// FlickrKitDemo | ||
// | ||
// Created by raxcat on 2015/10/4. | ||
// Copyright © 2015年 DevedUp Ltd. All rights reserved. | ||
// | ||
|
||
#import "AuthViewController.h" | ||
|
||
@interface AuthViewController () | ||
|
||
@end | ||
|
||
@implementation AuthViewController | ||
|
||
- (void)viewDidLoad { | ||
[super viewDidLoad]; | ||
// Do view setup here. | ||
} | ||
- (IBAction)exit:(id)sender { | ||
[self.view.window close]; | ||
} | ||
|
||
@end |
Oops, something went wrong.