Skip to content

SPM Support #1616

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 10 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,5 @@ docs/
.idea/
ParseFacebookUtils/Vendor
ParseUI/Vendor
.swiftpm
.build
38 changes: 38 additions & 0 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
// swift-tools-version:5.3
// The swift-tools-version declares the minimum version of Swift required to build this package.

import PackageDescription

let package = Package(
name: "Parse",
defaultLocalization: "en",
products: [
// Products define the executables and libraries a package produces, and make them visible to other packages.
.library(
name: "Parse",
targets: ["Parse"]),
// .library(
// name: "ParseFacebookUtils",
// targets: ["ParseFacebookUtils"]),
// .library(
// name: "ParseTwitterUtils",
// targets: ["ParseTwitterUtils"]),

],
dependencies: [
.package(name: "Bolts", url: "https://github.com/drdaz/Bolts-ObjC", .branch("master"))
// .package(name: "Bolts",
// url: "https://github.com/drdaz/Bolts-ObjC",
// .revision("df0c47add16f6cb7e81fd28aa59518c607a9dd4e"))
// .package(name: "Bolts", path: "/Users/drdaz/Documents/Development/Others/Bolts-ObjC")
],
targets: [
.target(
name: "Parse",
dependencies: [.product(name: "Bolts", package: "Bolts")],
path: "Parse/Source",
exclude: ["Info.plist"],
publicHeadersPath: "Public"
)
]
)
184 changes: 105 additions & 79 deletions Parse/Parse.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,9 @@

#import <Foundation/Foundation.h>

#import <Parse/PFConstants.h>
#import "PFConstants.h"

#import "PFCoreDataProvider.h"
#import "../../PFCoreDataProvider.h"

@class BFTask<__covariant BFGenericType>;
@class PFACL;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,15 @@

#import "PFDefaultACLController.h"

#if SWIFT_PACKAGE
@import Bolts;
#else
#import <Bolts/BFTask.h>
#endif

#import "PFACLPrivate.h"
#import "PFAsyncTaskQueue.h"
#import "PFCurrentUserController.h"
#import "../PFACLPrivate.h"
#import "../../PFAsyncTaskQueue.h"
#import "../../User/CurrentUserController/PFCurrentUserController.h"

@implementation PFDefaultACLController {
PFAsyncTaskQueue *_taskQueue;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

#import <Foundation/Foundation.h>

#import <Parse/PFACL.h>
#import "PFACL.h"

@class PFUser;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* of patent rights can be found in the PATENTS file in the same directory.
*/

#import "PFBaseState.h"
#import "../../PFBaseState.h"

NS_ASSUME_NONNULL_BEGIN

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

#import "PFACLState.h"

#import "PFMacros.h"
#import "../../PFMacros.h"

/**
Returns NSString representation of a property on PFACLState
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@

#import <Foundation/Foundation.h>

#import <Parse/PFConstants.h>
#import "PFConstants.h"

#import "PFDataProvider.h"
#import "PFMacros.h"
#import "../../PFDataProvider.h"
#import "../../PFMacros.h"

@class BFTask<__covariant BFGenericType>;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@

#import "PFAnalyticsController.h"

#import "BFTask+Private.h"
#import "PFAnalyticsUtilities.h"
#import "PFAssert.h"
#import "PFEventuallyQueue.h"
#import "PFRESTAnalyticsCommand.h"
#import "../../BFTask+Private.h"
#import "../Utilities/PFAnalyticsUtilities.h"
#import "../../PFAssert.h"
#import "../../PFEventuallyQueue.h"
#import "../../Commands/PFRESTAnalyticsCommand.h"

@interface PFAnalyticsController ()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* of patent rights can be found in the PATENTS file in the same directory.
*/

#import <Parse/PFAnalytics.h>
#import "PFAnalytics.h"

/**
Predefined events - AppOpened, CrashReport
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

#import "PFAnalyticsUtilities.h"

#import "PFHash.h"
#import "../../PFHash.h"

@implementation PFAnalyticsUtilities

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,12 @@

#import <Foundation/Foundation.h>

#if SWIFT_PACKAGE
@import Bolts;
#else
#import <Bolts/BFExecutor.h>
#import <Bolts/BFTask.h>
#endif

#import "PFInternalUtils.h"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,12 @@

#import "BFTask+Private.h"

#if SWIFT_PACKAGE
@import Bolts;
#else
#import <Bolts/BFExecutor.h>
#import <Bolts/BFTaskCompletionSource.h>
#endif

#import "PFLogging.h"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@

#import <Foundation/Foundation.h>

#import <Parse/PFConstants.h>
#import "PFDataProvider.h"
#import "PFConstants.h"
#import "../PFDataProvider.h"

@class BFTask<__covariant BFGenericType>;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@

#import "PFCloudCodeController.h"

#import "BFTask+Private.h"
#import "PFAssert.h"
#import "PFCommandResult.h"
#import "PFCommandRunning.h"
#import "../BFTask+Private.h"
#import "../PFAssert.h"
#import "../PFCommandResult.h"
#import "../Commands/CommandRunner/PFCommandRunning.h"
#import "PFDecoder.h"
#import "PFEncoder.h"
#import "PFInternalUtils.h"
#import "PFRESTCloudCommand.h"
#import "../PFInternalUtils.h"
#import "../Commands/PFRESTCloudCommand.h"

@implementation PFCloudCodeController

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@

#import <Foundation/Foundation.h>

#import <Parse/PFConstants.h>
#import "PFConstants.h"

#import "PFDataProvider.h"
#import "../../PFDataProvider.h"

@class BFCancellationToken;
@class BFTask<__covariant BFGenericType>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@

#import <Foundation/Foundation.h>

#import <Parse/PFConstants.h>
#import "PFConstants.h"

#import "PFDataProvider.h"
#import "../../../PFDataProvider.h"

@class BFTask<__covariant BFGenericType>;
@class PFRESTCommand;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,17 @@

#import "PFCommandURLRequestConstructor.h"

#import "BFTask+Private.h"
#import "PFAssert.h"
#import "PFCommandRunningConstants.h"
#import "PFDevice.h"
#import "PFHTTPRequest.h"
#import "PFHTTPURLRequestConstructor.h"
#import "PFInstallationIdentifierStore.h"
#import "PFInternalUtils.h"
#import "PFRESTCommand.h"
#import "PFURLConstructor.h"
#import "Parse_Private.h"
#import "../../../BFTask+Private.h"
#import "../../../PFAssert.h"
#import "../PFCommandRunningConstants.h"
#import "../../../PFDevice.h"
#import "../../../HTTPRequest/PFHTTPRequest.h"
#import "../../../HTTPRequest/PFHTTPURLRequestConstructor.h"
#import "../../../Installation/InstallationIdentifierStore/PFInstallationIdentifierStore.h"
#import "../../../PFInternalUtils.h"
#import "../../PFRESTCommand.h"
#import "../../../HTTPRequest/PFURLConstructor.h"
#import "../../../Parse_Private.h"

@implementation PFCommandURLRequestConstructor

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

#import <Foundation/Foundation.h>

#import "PFCommandRunning.h"
#import "../PFCommandRunning.h"

NS_ASSUME_NONNULL_BEGIN

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,26 +10,30 @@
#import "PFURLSessionCommandRunner.h"
#import "PFURLSessionCommandRunner_Private.h"

#if SWIFT_PACKAGE
@import Bolts;
#else
#import <Bolts/BFTaskCompletionSource.h>
#endif

#import "BFTask+Private.h"
#import "PFAssert.h"
#import "PFCommandResult.h"
#import "PFCommandRunningConstants.h"
#import "PFCommandURLRequestConstructor.h"
#import "../../../BFTask+Private.h"
#import "../../../PFAssert.h"
#import "../../../PFCommandResult.h"
#import "../PFCommandRunningConstants.h"
#import "../URLRequestConstructor/PFCommandURLRequestConstructor.h"
#import "PFConstants.h"
#import "PFDevice.h"
#import "../../../PFDevice.h"
#import "PFEncoder.h"
#import "PFHTTPRequest.h"
#import "PFHTTPURLRequestConstructor.h"
#import "PFInstallationIdentifierStore.h"
#import "PFInternalUtils.h"
#import "PFLogging.h"
#import "PFMacros.h"
#import "PFRESTCommand.h"
#import "PFURLConstructor.h"
#import "PFURLSession.h"
#import "Parse_Private.h"
#import "../../../HTTPRequest/PFHTTPRequest.h"
#import "../../../HTTPRequest/PFHTTPURLRequestConstructor.h"
#import "../../../Installation/InstallationIdentifierStore/PFInstallationIdentifierStore.h"
#import "../../../PFInternalUtils.h"
#import "../../../PFLogging.h"
#import "../../../PFMacros.h"
#import "../../PFRESTCommand.h"
#import "../../../HTTPRequest/PFURLConstructor.h"
#import "Session/PFURLSession.h"
#import "../../../Parse_Private.h"

@interface PFURLSessionCommandRunner () <PFURLSessionDelegate>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

#import <Foundation/Foundation.h>

#import <Parse/PFConstants.h>
#import "PFConstants.h"

@class BFCancellationToken;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,19 @@
#import "PFURLSession.h"
#import "PFURLSession_Private.h"

#if SWIFT_PACKAGE
@import Bolts;
#else
#import <Bolts/BFTaskCompletionSource.h>

#import "BFTask+Private.h"
#import "PFCommandResult.h"
#import "PFMacros.h"
#import "PFAssert.h"
#import "PFURLSessionJSONDataTaskDelegate.h"
#import "PFURLSessionUploadTaskDelegate.h"
#import "PFURLSessionFileDownloadTaskDelegate.h"
#endif

#import "../../../../BFTask+Private.h"
#import "../../../../PFCommandResult.h"
#import "../../../../PFMacros.h"
#import "../../../../PFAssert.h"
#import "TaskDelegate/PFURLSessionJSONDataTaskDelegate.h"
#import "TaskDelegate/PFURLSessionUploadTaskDelegate.h"
#import "TaskDelegate/PFURLSessionFileDownloadTaskDelegate.h"

typedef void (^PFURLSessionTaskCompletionHandler)(NSData *data, NSURLResponse *response, NSError *error);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

#import <Foundation/Foundation.h>

#import <Parse/PFConstants.h>
#import "PFConstants.h"

@class BFCancellationToken;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,15 @@
#import "PFURLSessionDataTaskDelegate.h"
#import "PFURLSessionDataTaskDelegate_Private.h"

#if SWIFT_PACKAGE
@import Bolts;
#else
#import <Bolts/BFTaskCompletionSource.h>
#import <Bolts/BFCancellationToken.h>
#endif

#import "PFAssert.h"
#import "PFMacros.h"
#import "../../../../../PFAssert.h"
#import "../../../../../PFMacros.h"

@interface PFURLSessionDataTaskDelegate () {
BFTaskCompletionSource *_taskCompletionSource;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

#import "PFURLSessionDataTaskDelegate.h"

#import <Parse/PFConstants.h>
#import "PFConstants.h"

NS_ASSUME_NONNULL_BEGIN

Expand Down
Loading