Skip to content
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

feat: Add LiveQuery module to SDK #1712

Merged
merged 17 commits into from
Jun 8, 2023
Merged
Show file tree
Hide file tree
Changes from 14 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ jobs:
- test:facebook_utils:ios
- test:twitter_utils:ios
- test:parseui:all
- test:parse_live_query:all
- package:release
fail-fast: false
runs-on: ${{ (matrix.script == 'package:release' && 'macos-11') || 'macos-12' }}
Expand Down
2 changes: 2 additions & 0 deletions Cartfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
github "BoltsFramework/Bolts-ObjC" ~> 1.9.1
github "BoltsFramework/Bolts-Swift" >= 1.5.0
github "facebook/facebook-ios-sdk" == 15.1.0
github "daltoniam/Starscream" >= 4.0.4

2 changes: 2 additions & 0 deletions Cartfile.resolved
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
github "BoltsFramework/Bolts-ObjC" "1.9.1"
github "BoltsFramework/Bolts-Swift" "1.5.0"
mtrezza marked this conversation as resolved.
Show resolved Hide resolved
github "daltoniam/Starscream" "4.0.4"
github "facebook/facebook-ios-sdk" "v15.1.0"
24 changes: 21 additions & 3 deletions Package.resolved
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,29 @@
"pins": [
{
"package": "Bolts",
"repositoryURL": "https://github.com/rocxteady/Bolts-ObjC",
"repositoryURL": "https://github.com/parse-community/Bolts-ObjC.git",
"state": {
"branch": null,
"revision": "0419586ce3df0a004fbf94533198132de9c9aa0a",
"version": null
"revision": "1eee96ad3bcfc8964c0a5815ce94f491eb6ac8c2",
"version": "1.10.0"
}
},
{
"package": "Bolts",
"repositoryURL": "https://github.com/BoltsFramework/Bolts-Swift.gitSwift",
"state": {
"branch": null,
"revision": "1eee96ad3bcfc8964c0a5815ce94f491eb6ac8c2",
"version": "1.5.0"
}
},
{
"package": "Starscream",
"repositoryURL": "https://github.com/daltoniam/Starscream.git",
"state": {
"branch": null,
"revision": "1eee96ad3bcfc8964c0a5815ce94f491eb6ac8c2",
"version": "4.0.4"
}
},
{
Expand Down
22 changes: 17 additions & 5 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,22 @@ let package = Package(
.tvOS(.v12),
.watchOS(.v2)],
products: [
.library(name: "ParseObjC", targets: ["ParseCore"]),
.library(name: "ParseObjC", targets: ["Parse"]),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why this change and is this a breaking change?

It seems a bit odd to name the core module Parse, as the term "Parse" is arguably referring to the whole SDK. To me is makes more sense to name the core module ParseCore to indicate that it's the basis that is always needed, while others are optional.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, yes it is an important change because in SDK target has the name "Parse". When we set "ParseCore" it causes an error downloading.

Copy link
Member

@mtrezza mtrezza Apr 24, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure I understand. Why can't we keep the name ParseCore? I mean this is only an issue for the LiveQuery module, right? Otherwise we make a breaking change because developers changed their imports from Parse to ParseCore with the introduction of SPM, and now we are changing it back to Parse.

Copy link
Member

@dplewis dplewis May 9, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mtrezza This is my first time using SPM and I didn't know you had to do import ParseCore;. I can try to revert it back and fix the downloading error. @vazarkevych Thoughts?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vazarkevych Could you take a look at this so we can close this PR? It seems to be the last remaining issue here.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mtrezza Can you commit 1 example of tedious work? I'll finish the rest. I don't quite understand what needs to be changed

Copy link
Member

@mtrezza mtrezza May 27, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See #1712 (comment). The module name ParseCore shouldn't change, just because we're adding the LiveQuery module in this PR. Otherwise this PR becomes a breaking change, but it's just a feature addition.

So I'd simply remove the renaming and then go into the LiveQuery module and make sure it uses the ParseCore reference. It seems the issue is that the LiveQuery module is looking for the Parse module by using its old Parse reference instead of the ParseCore reference in this repository. To me this looks like a simple find/replace task and some manual correction.

This comment was marked as off-topic.

This comment was marked as off-topic.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dplewis Do you want to take a look at this, we could add an additional bounty.

.library(name: "ParseFacebookUtilsiOS", targets: ["ParseFacebookUtilsiOS"]),
.library(name: "ParseFacebookUtilsTvOS", targets: ["ParseFacebookUtilsTvOS"]),
.library(name: "ParseTwitterUtils", targets: ["ParseTwitterUtils"]),
.library(name: "ParseUI", targets: ["ParseUI"])
.library(name: "ParseUI", targets: ["ParseUI"]),
.library(name: "ParseLiveQuery", targets: ["ParseLiveQuery"])
],
dependencies: [
.package(url: "https://github.com/parse-community/Bolts-ObjC.git", from: "1.10.0"),
.package(url: "https://github.com/BoltsFramework/Bolts-Swift.git", from: "1.5.0"),
.package(url: "https://github.com/daltoniam/Starscream.git", from: "4.0.4"),
.package(url: "https://github.com/facebook/facebook-ios-sdk.git", from: "15.1.0")
],
targets: [
.target(
name: "ParseCore",
name: "Parse",
dependencies: [.product(name: "Bolts", package: "Bolts-ObjC")],
path: "Parse/Parse",
exclude: ["Resources/Parse-tvOS.Info.plist", "Resources/Parse-iOS.Info.plist", "Resources/Parse-OSX.Info.plist", "Resources/Parse-watchOS.Info.plist"],
Expand All @@ -32,7 +35,7 @@ let package = Package(
.target(
name: "ParseFacebookUtils",
dependencies: [
"ParseCore",
"Parse",
.product(name: "Bolts", package: "Bolts-ObjC"),
.product(name: "FacebookCore", package: "facebook-ios-sdk", condition: .when(platforms: [.iOS, .tvOS])),
.product(name: "FacebookLogin", package: "facebook-ios-sdk", condition: .when(platforms: [.iOS, .tvOS]))],
Expand Down Expand Up @@ -61,7 +64,7 @@ let package = Package(
cSettings: [.headerSearchPath("Internal/**")]),
.target(name: "ParseTwitterUtils",
dependencies: [
"ParseCore"
"Parse"
],
path: "ParseTwitterUtils/ParseTwitterUtils",
exclude: ["Resources/Info-iOS.plist"],
Expand All @@ -78,5 +81,14 @@ let package = Package(
resources: [.process("Resources")],
publicHeadersPath: "Source",
cSettings: [.headerSearchPath("Internal/**")]),
.target(name: "ParseLiveQuery",
dependencies: [
.product(name: "BoltsSwift", package: "Bolts-Swift"),
"Starscream",
"Parse"
],
path: "ParseLiveQuery/ParseLiveQuery",
exclude: ["Resources/Info.plist"],
resources: [.process("Resources")])
]
)
3 changes: 3 additions & 0 deletions Parse.xcworkspace/contents.xcworkspacedata

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

177 changes: 169 additions & 8 deletions Parse/Parse.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -2962,6 +2962,69 @@
remoteGlobalIDString = 81C3821B19CCA89E0066284A;
remoteInfo = "Parse-iOS";
};
9575FF1E299136C60057B4CE /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 9575FF10299136C60057B4CE /* Starscream.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 33CCF0921F5DDC030099B092;
remoteInfo = Starscream;
};
9575FF20299136C60057B4CE /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 9575FF10299136C60057B4CE /* Starscream.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 335FA2021F5DF71D00F6D2EC;
remoteInfo = "Starscream Tests";
};
95AEEB192991373F00165C0D /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 95AEEB0F2991373F00165C0D /* BoltsSwift.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 87FEF3661A9085FA00C60678;
remoteInfo = "BoltsSwift-iOS";
};
95AEEB1B2991373F00165C0D /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 95AEEB0F2991373F00165C0D /* BoltsSwift.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 87FEF3711A9085FA00C60678;
remoteInfo = "BoltsSwiftTests-iOS";
};
95AEEB1D2991373F00165C0D /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 95AEEB0F2991373F00165C0D /* BoltsSwift.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 81CC14EC1A9BE0A100B28F86;
remoteInfo = "BoltsSwift-macOS";
};
95AEEB1F2991373F00165C0D /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 95AEEB0F2991373F00165C0D /* BoltsSwift.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 81CC14F61A9BE0A100B28F86;
remoteInfo = "BoltsSwiftTests-macOS";
};
95AEEB212991373F00165C0D /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 95AEEB0F2991373F00165C0D /* BoltsSwift.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 065894FF1C9A93B7000FDDA6;
remoteInfo = "BoltsSwift-tvOS";
};
95AEEB232991373F00165C0D /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 95AEEB0F2991373F00165C0D /* BoltsSwift.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 0658951B1C9A947B000FDDA6;
remoteInfo = "BoltsSwiftTests-tvOS";
};
95AEEB252991373F00165C0D /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 95AEEB0F2991373F00165C0D /* BoltsSwift.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 065894E71C9A933B000FDDA6;
remoteInfo = "BoltsSwift-watchOS";
};
BC105FC424C5D0C900295EF7 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = BC105FBA24C5D0C900295EF7 /* OCMock.xcodeproj */;
Expand Down Expand Up @@ -3575,6 +3638,8 @@
91DF24941A09BAF100CFC7D4 /* PFPinningEventuallyQueue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PFPinningEventuallyQueue.h; sourceTree = "<group>"; };
91DF24951A09BAF100CFC7D4 /* PFPinningEventuallyQueue.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PFPinningEventuallyQueue.m; sourceTree = "<group>"; };
91DF24981A0B0FF200CFC7D4 /* PFEventuallyQueue_Private.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PFEventuallyQueue_Private.h; sourceTree = "<group>"; };
9575FF10299136C60057B4CE /* Starscream.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Starscream.xcodeproj; path = ../Carthage/Checkouts/Starscream/Starscream.xcodeproj; sourceTree = "<group>"; };
95AEEB0F2991373F00165C0D /* BoltsSwift.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = BoltsSwift.xcodeproj; path = "../Carthage/Checkouts/Bolts-Swift/BoltsSwift.xcodeproj"; sourceTree = "<group>"; };
97010FAC1630B18F00AB761E /* Parse.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Parse.framework; sourceTree = BUILT_PRODUCTS_DIR; };
97AA93B816780B7600445C2D /* Parse-OSX.Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "Parse-OSX.Info.plist"; sourceTree = "<group>"; };
97E18AE41623835600B17A67 /* PFLocationManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PFLocationManager.h; sourceTree = "<group>"; };
Expand Down Expand Up @@ -3872,6 +3937,8 @@
7CE6ABDD292074C70054D9D2 /* AudioToolbox.framework */,
7CE6ABD2292074C10054D9D2 /* libsqlite3.tbd */,
BC105FBA24C5D0C900295EF7 /* OCMock.xcodeproj */,
9575FF10299136C60057B4CE /* Starscream.xcodeproj */,
95AEEB0F2991373F00165C0D /* BoltsSwift.xcodeproj */,
4A1351082027FCFB000F5FD5 /* Bolts.xcodeproj */,
);
name = Frameworks;
Expand Down Expand Up @@ -5148,6 +5215,29 @@
path = CurrentUserController;
sourceTree = "<group>";
};
9575FF11299136C60057B4CE /* Products */ = {
isa = PBXGroup;
children = (
9575FF1F299136C60057B4CE /* Starscream.framework */,
9575FF21299136C60057B4CE /* Starscream Tests.xctest */,
);
name = Products;
sourceTree = "<group>";
};
95AEEB102991373F00165C0D /* Products */ = {
isa = PBXGroup;
children = (
95AEEB1A2991373F00165C0D /* BoltsSwift.framework */,
95AEEB1C2991373F00165C0D /* BoltsSwiftTests.xctest */,
95AEEB1E2991373F00165C0D /* BoltsSwift.framework */,
95AEEB202991373F00165C0D /* BoltsSwiftTests.xctest */,
95AEEB222991373F00165C0D /* BoltsSwift.framework */,
95AEEB242991373F00165C0D /* BoltsSwiftTests.xctest */,
95AEEB262991373F00165C0D /* BoltsSwift.framework */,
);
name = Products;
sourceTree = "<group>";
};
BC105FBB24C5D0C900295EF7 /* Products */ = {
isa = PBXGroup;
children = (
Expand Down Expand Up @@ -7076,10 +7166,18 @@
ProductGroup = 4A13517620281768000F5FD5 /* Products */;
ProjectRef = 4A1351082027FCFB000F5FD5 /* Bolts.xcodeproj */;
},
{
ProductGroup = 95AEEB102991373F00165C0D /* Products */;
ProjectRef = 95AEEB0F2991373F00165C0D /* BoltsSwift.xcodeproj */;
},
{
ProductGroup = BC105FBB24C5D0C900295EF7 /* Products */;
ProjectRef = BC105FBA24C5D0C900295EF7 /* OCMock.xcodeproj */;
},
{
ProductGroup = 9575FF11299136C60057B4CE /* Products */;
ProjectRef = 9575FF10299136C60057B4CE /* Starscream.xcodeproj */;
},
);
projectRoot = "";
targets = (
Expand Down Expand Up @@ -7175,6 +7273,69 @@
remoteRef = 4A13519720281768000F5FD5 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
9575FF1F299136C60057B4CE /* Starscream.framework */ = {
isa = PBXReferenceProxy;
fileType = wrapper.framework;
path = Starscream.framework;
remoteRef = 9575FF1E299136C60057B4CE /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
9575FF21299136C60057B4CE /* Starscream Tests.xctest */ = {
isa = PBXReferenceProxy;
fileType = wrapper.cfbundle;
path = "Starscream Tests.xctest";
remoteRef = 9575FF20299136C60057B4CE /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
95AEEB1A2991373F00165C0D /* BoltsSwift.framework */ = {
isa = PBXReferenceProxy;
fileType = wrapper.framework;
path = BoltsSwift.framework;
remoteRef = 95AEEB192991373F00165C0D /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
95AEEB1C2991373F00165C0D /* BoltsSwiftTests.xctest */ = {
isa = PBXReferenceProxy;
fileType = wrapper.cfbundle;
path = BoltsSwiftTests.xctest;
remoteRef = 95AEEB1B2991373F00165C0D /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
95AEEB1E2991373F00165C0D /* BoltsSwift.framework */ = {
isa = PBXReferenceProxy;
fileType = wrapper.framework;
path = BoltsSwift.framework;
remoteRef = 95AEEB1D2991373F00165C0D /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
95AEEB202991373F00165C0D /* BoltsSwiftTests.xctest */ = {
isa = PBXReferenceProxy;
fileType = wrapper.cfbundle;
path = BoltsSwiftTests.xctest;
remoteRef = 95AEEB1F2991373F00165C0D /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
95AEEB222991373F00165C0D /* BoltsSwift.framework */ = {
isa = PBXReferenceProxy;
fileType = wrapper.framework;
path = BoltsSwift.framework;
remoteRef = 95AEEB212991373F00165C0D /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
95AEEB242991373F00165C0D /* BoltsSwiftTests.xctest */ = {
isa = PBXReferenceProxy;
fileType = wrapper.cfbundle;
path = BoltsSwiftTests.xctest;
remoteRef = 95AEEB232991373F00165C0D /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
95AEEB262991373F00165C0D /* BoltsSwift.framework */ = {
isa = PBXReferenceProxy;
fileType = wrapper.framework;
path = BoltsSwift.framework;
remoteRef = 95AEEB252991373F00165C0D /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
BC105FC524C5D0C900295EF7 /* OCMock.framework */ = {
isa = PBXReferenceProxy;
fileType = wrapper.framework;
Expand Down Expand Up @@ -8868,7 +9029,7 @@
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
MACOSX_DEPLOYMENT_TARGET = 10.9;
MACOSX_DEPLOYMENT_TARGET = 10.15;
};
name = Debug;
};
Expand All @@ -8885,7 +9046,7 @@
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
MACOSX_DEPLOYMENT_TARGET = 10.9;
MACOSX_DEPLOYMENT_TARGET = 10.15;
SWIFT_COMPILATION_MODE = wholemodule;
};
name = Release;
Expand Down Expand Up @@ -9070,7 +9231,7 @@
isa = XCBuildConfiguration;
baseConfigurationReference = F55ABB5A1B4F39DA00A0ECD5 /* ParseUnitTests-macOS.xcconfig */;
buildSettings = {
MACOSX_DEPLOYMENT_TARGET = 10.12;
MACOSX_DEPLOYMENT_TARGET = 10.15;
SWIFT_VERSION = 5.0;
};
name = Debug;
Expand All @@ -9079,7 +9240,7 @@
isa = XCBuildConfiguration;
baseConfigurationReference = F55ABB5A1B4F39DA00A0ECD5 /* ParseUnitTests-macOS.xcconfig */;
buildSettings = {
MACOSX_DEPLOYMENT_TARGET = 10.12;
MACOSX_DEPLOYMENT_TARGET = 10.15;
SWIFT_VERSION = 5.0;
};
name = Release;
Expand All @@ -9098,7 +9259,7 @@
);
SUPPORTS_MACCATALYST = YES;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 5.0;
SWIFT_VERSION = 5.7;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Debug;
Expand All @@ -9116,7 +9277,7 @@
"@loader_path/Frameworks",
);
SUPPORTS_MACCATALYST = YES;
SWIFT_VERSION = 5.0;
SWIFT_VERSION = 5.7;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Release;
Expand Down Expand Up @@ -9188,7 +9349,7 @@
baseConfigurationReference = F55ABB541B4F39DA00A0ECD5 /* Parse-macOS.xcconfig */;
buildSettings = {
FRAMEWORK_SEARCH_PATHS = "$(inherited)";
MACOSX_DEPLOYMENT_TARGET = 10.12;
MACOSX_DEPLOYMENT_TARGET = 10.15;
};
name = Debug;
};
Expand All @@ -9197,7 +9358,7 @@
baseConfigurationReference = F55ABB541B4F39DA00A0ECD5 /* Parse-macOS.xcconfig */;
buildSettings = {
FRAMEWORK_SEARCH_PATHS = "$(inherited)";
MACOSX_DEPLOYMENT_TARGET = 10.12;
MACOSX_DEPLOYMENT_TARGET = 10.15;
};
name = Release;
};
Expand Down
Loading