Skip to content

feat: Remove ParseFacebookUtils and ParseTwitterUtils #1779

New issue

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

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

Already on GitHub? # to your account

Merged
merged 9 commits into from
Apr 8, 2024
Merged
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ jobs:
script:
- test:ios
- test:macos
- test:facebook_utils:ios
- test:twitter_utils:ios
- test:parseui:all
- test:parse_live_query:all
- build:starters
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ docs/

## AppCode
.idea/
ParseFacebookUtils/Vendor
ParseUI/Vendor

# VSC
Expand Down
4 changes: 1 addition & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,8 @@
For analyzing bugs, creating bug fixes and features we recommend to clone this repository locally and add it as a local package to your Xcode project. This way you can edit and inspect the Parse SDK while running your app. You can find step-by-step instructions for how do that in the [Xcode docs](https://developer.apple.com/documentation/xcode/editing-a-package-dependency-as-a-local-package).

1. Fork the repository and create a new branch.
2. Add unit tests for any new code you add.
2. Add unit tests for any new code you add:
- Core Module - [/Parse/Tests/Unit/](/Parse/Tests/Unit/)
- Facebook Utils - [/ParseFacebookUtils/Tests/Unit/](/ParseFacebookUtils/Tests/Unit/)
- Twitter Utils - [/ParseTwitterUtils/Tests/Unit/](/ParseTwitterUtils/Tests/Unit/)
3. If you've changed APIs, update the documentation and the [iOS Guide](https://github.com/parse-community/docs/tree/gh-pages/_includes/ios).
4. Ensure the test suite passes.
You can run the tests in the command line with rake.
Expand Down
9 changes: 0 additions & 9 deletions Package.resolved
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,6 @@
"version": "1.5.0"
}
},
{
"package": "Facebook",
"repositoryURL": "https://github.com/facebook/facebook-ios-sdk",
"state": {
"branch": null,
"revision": "7fd8a930a5b2c940a22efafe0e214ed0df671312",
"version": "15.1.0"
}
},
{
"package": "OCMock",
"repositoryURL": "https://github.com/erikdoe/ocmock.git",
Expand Down
54 changes: 1 addition & 53 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,13 @@ let package = Package(
],
products: [
.library(name: "ParseObjC", targets: ["ParseCore"]),
.library(name: "ParseFacebookUtils", targets: ["ParseFacebookUtils"]),
.library(name: "ParseFacebookUtilsiOS", targets: ["ParseFacebookUtilsiOS"]),
.library(name: "ParseFacebookUtilsTvOS", targets: ["ParseFacebookUtilsTvOS"]),
.library(name: "ParseTwitterUtils", targets: ["ParseTwitterUtils"]),
.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.6"),
.package(url: "https://github.com/facebook/facebook-ios-sdk.git", from: "15.1.0"),
.package(name: "OCMock", url: "https://github.com/erikdoe/ocmock.git", .revision("67bb9602f0a7541f24dc2d6d0d7389ca3e4c2c89"))
],
targets: [
Expand All @@ -37,57 +32,10 @@ let package = Package(
publicHeadersPath: "Source",
cSettings: [.headerSearchPath("Internal/**")]
),
.target(
name: "ParseFacebookUtils",
dependencies: [
"ParseCore",
.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]))],
path: "ParseFacebookUtils/ParseFacebookUtils",
exclude: ["Resources/Info-tvOS.plist", "Resources/Info-iOS.plist"],
resources: [.process("Resources")],
publicHeadersPath: "Source"
),
.target(
name: "ParseFacebookUtilsiOS",
dependencies: [
"ParseFacebookUtils"
],
path: "ParseFacebookUtilsiOS/ParseFacebookUtilsiOS",
exclude: ["Resources/Info-iOS.plist"],
resources: [.process("Resources")],
publicHeadersPath: "Source",
cSettings: [.headerSearchPath("Internal/**")]
),
.target(
name: "ParseFacebookUtilsTvOS",
dependencies: [
"ParseFacebookUtils",
.product(name: "FacebookTV", package: "facebook-ios-sdk", condition: .when(platforms: [.tvOS]))
],
path: "ParseFacebookUtilsTvOS/ParseFacebookUtilsTvOS",
exclude: ["Resources/Info-tvOS.plist"],
resources: [.process("Resources")],
publicHeadersPath: "Source",
cSettings: [.headerSearchPath("Internal/**")]
),
.target(
name: "ParseTwitterUtils",
dependencies: [
"ParseCore"
],
path: "ParseTwitterUtils/ParseTwitterUtils",
exclude: ["Resources/Info-iOS.plist"],
resources: [.process("Resources")],
publicHeadersPath: "Source",
cSettings: [.headerSearchPath("Internal/**")]
),
.target(
name: "ParseUI",
dependencies: [
"ParseFacebookUtilsiOS",
"ParseTwitterUtils"
"ParseCore"
],
path: "ParseUI/ParseUI",
exclude: ["Resources/Info-iOS.plist"],
Expand Down
12 changes: 0 additions & 12 deletions Parse.xcworkspace/contents.xcworkspacedata

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

9 changes: 0 additions & 9 deletions Parse.xcworkspace/xcshareddata/swiftpm/Package.resolved
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,6 @@
"version": "1.5.0"
}
},
{
"package": "Facebook",
"repositoryURL": "https://github.com/facebook/facebook-ios-sdk.git",
"state": {
"branch": null,
"revision": "7fd8a930a5b2c940a22efafe0e214ed0df671312",
"version": "15.1.0"
}
},
{
"package": "OCMock",
"repositoryURL": "https://github.com/erikdoe/ocmock.git",
Expand Down
4 changes: 2 additions & 2 deletions Parse/Parse/Source/PFAnonymousUtils.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ NS_ASSUME_NONNULL_BEGIN
Data associated with the anonymous user is retained.
- logIn switches users without converting the anonymous user.
Data associated with the anonymous user will be lost.
- Service logIn (e.g. Facebook, Twitter) will attempt to convert
- Authentication service logIn will attempt to convert
the anonymous user into a standard user by linking it to the service.
If a user already exists that is linked to the service, it will instead switch to the existing user.
- Service linking (e.g. Facebook, Twitter) will convert the anonymous user
- Authentication service linking will convert the anonymous user
into a standard user by linking it to the service.
*/
@interface PFAnonymousUtils : NSObject
Expand Down
12 changes: 0 additions & 12 deletions Parse/Parse/Source/PFConstants.h
Original file line number Diff line number Diff line change
Expand Up @@ -320,10 +320,6 @@ typedef NS_ENUM(NSInteger, PFErrorCode) {
Users can only be created through #.
*/
kPFErrorUserCanOnlyBeCreatedThrough# = 207,
/**
An existing Facebook account already linked to another user.
*/
kPFErrorFacebookAccountAlreadyLinked = 208,
/**
An existing account already linked to another user.
*/
Expand All @@ -333,18 +329,10 @@ typedef NS_ENUM(NSInteger, PFErrorCode) {
*/
kPFErrorInvalidSessionToken = 209,
kPFErrorUserIdMismatch = 209,
/**
Facebook id missing from request.
*/
kPFErrorFacebookIdMissing = 250,
/**
Linked id missing from request.
*/
kPFErrorLinkedIdMissing = 250,
/**
Invalid Facebook session.
*/
kPFErrorFacebookInvalidSession = 251,
/**
Invalid linked session.
*/
Expand Down
5 changes: 0 additions & 5 deletions Parse/Parse/Source/PFUser.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,6 @@ typedef void(^PFUserLogoutResultBlock)(NSError *_Nullable error);
The `PFUser` class is a local representation of a user persisted to the Parse Data.
This class is a subclass of a `PFObject`, and retains the same functionality of a `PFObject`,
but also extends it with various user specific methods, like authentication, signing up, and validation uniqueness.

Many APIs responsible for linking a `PFUser` with Facebook or Twitter have been deprecated in favor of dedicated
utilities for each social network. See `PFFacebookUtils`, `PFTwitterUtils` and `PFAnonymousUtils` for more information.
*/

@interface PFUser : PFObject <PFSubclassing>
Expand Down Expand Up @@ -65,8 +62,6 @@ typedef void(^PFUserLogoutResultBlock)(NSError *_Nullable error);

/**
Whether the `PFUser` was just created from a request.

This is only set after a Facebook or Twitter login.
*/
@property (nonatomic, assign, readonly) BOOL isNew;

Expand Down
18 changes: 8 additions & 10 deletions Parse/Parse/Source/PFUser.m
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ - (nullable PFRESTCommand *)_current#CommandForChanges:(PFOperationSet *)ch
#pragma mark - Service Login
///--------------------------------------

// Constructs the command for user_#_or_login. This is used for Facebook, Twitter, and other linking services.
// Constructs the command for user_#_or_login. This is used for authentication services.
- (PFRESTCommand *)_currentServiceLoginCommandForChanges:(PFOperationSet *)changes error:(NSError **)error {
@synchronized([self lock]) {
NSDictionary *parameters = [self _convertToDictionaryForSaving:changes
Expand Down Expand Up @@ -342,15 +342,13 @@ - (PFObject *)mergeFromObject:(PFUser *)other {
/*
Merges custom fields from JSON associated with a PFUser:
{
"session_token": string,
"is_new": boolean,
"auth_data": {
"facebook": {
"id": string,
"access_token": string,
"expiration_date": string (represents date)
}
}
"session_token": string,
"is_new": boolean,
"auth_data": {
"<auth_service_name>": {
...
}
}
}
*/
- (void)_mergeFromServerWithResult:(NSDictionary *)result decoder:(PFDecoder *)decoder completeData:(BOOL)completeData {
Expand Down
2 changes: 0 additions & 2 deletions Parse/Tests/Resources/ParseUnitTests-OSX-Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@
</array>
<key>CFBundleVersion</key>
<string>1.0</string>
<key>FacebookAppID</key>
<string>fake_id</string>
<key>LSApplicationCategoryType</key>
<string></string>
<key>LSRequiresIPhoneOS</key>
Expand Down
2 changes: 0 additions & 2 deletions Parse/Tests/Resources/ParseUnitTests-iOS-Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@
</array>
<key>CFBundleVersion</key>
<string>1.0</string>
<key>FacebookAppID</key>
<string>fake_id</string>
<key>LSApplicationCategoryType</key>
<string></string>
<key>LSRequiresIPhoneOS</key>
Expand Down
1 change: 0 additions & 1 deletion ParseFacebookUtils/.gitignore

This file was deleted.

51 changes: 0 additions & 51 deletions ParseFacebookUtils/CHANGELOG.md

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

1 change: 0 additions & 1 deletion ParseFacebookUtils/Configurations/Shared

This file was deleted.

Loading
Loading