Skip to content

Commit

Permalink
Add macOS target
Browse files Browse the repository at this point in the history
  • Loading branch information
alasdairlaw committed Jan 18, 2017
1 parent 1b9441c commit 1229115
Show file tree
Hide file tree
Showing 8 changed files with 418 additions and 16 deletions.
336 changes: 320 additions & 16 deletions NetworkOperation.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,34 @@
<key>orderHint</key>
<integer>0</integer>
</dict>
<key>NetworkOperationMacOS.xcscheme</key>
<dict>
<key>orderHint</key>
<integer>2</integer>
</dict>
<key>NetworkOperationMacOSTests.xcscheme</key>
<dict>
<key>orderHint</key>
<integer>3</integer>
</dict>
<key>NetworkOperationTests.xcscheme</key>
<dict>
<key>orderHint</key>
<integer>1</integer>
</dict>
</dict>
<key>SuppressBuildableAutocreation</key>
<dict>
<key>81739F231E3025970044DB83</key>
<dict>
<key>primary</key>
<true/>
</dict>
<key>81739F2B1E3025970044DB83</key>
<dict>
<key>primary</key>
<true/>
</dict>
<key>818A20541E05EECF00B835F6</key>
<dict>
<key>primary</key>
Expand Down
2 changes: 2 additions & 0 deletions NetworkOperation/JSONResponse.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
// Copyright © 2016 Alasdair Law. All rights reserved.
//

import Foundation

public struct JSONResponse: NetworkResponse {
public typealias T = Any

Expand Down
2 changes: 2 additions & 0 deletions NetworkOperation/NetworkOperation.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
// Copyright © 2016 Alasdair Law. All rights reserved.
//

import Foundation

/**
NSOperation subclass which performs a network request.
*/
Expand Down
2 changes: 2 additions & 0 deletions NetworkOperation/NetworkResponse.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
// Copyright © 2016 Alasdair Law. All rights reserved.
//

import Foundation

public protocol NetworkResponse {
associatedtype T

Expand Down
26 changes: 26 additions & 0 deletions NetworkOperationMacOS/Info.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?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>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>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string>
<key>NSHumanReadableCopyright</key>
<string>Copyright © 2017 Alasdair Law. All rights reserved.</string>
<key>NSPrincipalClass</key>
<string></string>
</dict>
</plist>
19 changes: 19 additions & 0 deletions NetworkOperationMacOS/NetworkOperationMacOS.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
//
// NetworkOperationMacOS.h
// NetworkOperationMacOS
//
// Created by Alasdair Law on 18/01/2017.
// Copyright © 2017 Alasdair Law. All rights reserved.
//

#import <Cocoa/Cocoa.h>

//! Project version number for NetworkOperationMacOS.
FOUNDATION_EXPORT double NetworkOperationMacOSVersionNumber;

//! Project version string for NetworkOperationMacOS.
FOUNDATION_EXPORT const unsigned char NetworkOperationMacOSVersionString[];

// In this header, you should import all the public headers of your framework using statements like #import <NetworkOperationMacOS/PublicHeader.h>


22 changes: 22 additions & 0 deletions NetworkOperationMacOSTests/Info.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?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>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>BNDL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleVersion</key>
<string>1</string>
</dict>
</plist>

0 comments on commit 1229115

Please sign in to comment.