@@ -20,8 +20,8 @@ PF_ASSUME_NONNULL_BEGIN
typedef void(^PFUserSessionUpgradeResultBlock)(NSError *PF_NULLABLE_S error);
typedef void(^PFUserLogoutResultBlock)(NSError *PF_NULLABLE_S error);


@class PFQuery;
@protocol PFUserAuthenticationDelegate;

/*!
The `PFUser` class is a local representation of a user persisted to the Parse Data.
@@ -32,7 +32,7 @@ typedef void(^PFUserLogoutResultBlock)(NSError *PF_NULLABLE_S error);
utilities for each social network. See <PFFacebookUtils>, <PFTwitterUtils> and <PFAnonymousUtils> for more information.
*/

@interface PFUser : PFObject<PFSubclassing>
@interface PFUser : PFObject <PFSubclassing>

///--------------------------------------
/// @name Accessing the Current User
@@ -78,7 +78,7 @@ typedef void(^PFUserLogoutResultBlock)(NSError *PF_NULLABLE_S error);
@returns Returns a new `PFUser` object.
*/
+ (PFUser *)user;
+ (instancetype)user;

/*!
@abstract Enables automatic creation of anonymous users.
@@ -119,7 +119,7 @@ typedef void(^PFUserLogoutResultBlock)(NSError *PF_NULLABLE_S error);
@returns Returns `YES` if the sign up was successful, otherwise `NO`.
*/
- (BOOL)signUp;
- (BOOL)signUp PF_SWIFT_UNAVAILABLE;

/*!
@abstract Signs up the user *synchronously*.
@@ -143,7 +143,7 @@ typedef void(^PFUserLogoutResultBlock)(NSError *PF_NULLABLE_S error);
@returns The task, that encapsulates the work being done.
*/
- (BFTask *)signUpInBackground;
- (BFTask PF_GENERIC(NSNumber *)*)signUpInBackground;

/*!
@abstract Signs up the user *asynchronously*.
@@ -189,7 +189,7 @@ typedef void(^PFUserLogoutResultBlock)(NSError *PF_NULLABLE_S error);
If login failed for either wrong password or wrong username, returns `nil`.
*/
+ (PF_NULLABLE instancetype)logInWithUsername:(NSString *)username
password:(NSString *)password;
password:(NSString *)password PF_SWIFT_UNAVAILABLE;

/*!
@abstract Makes a *synchronous* request to login a user with specified credentials.
@@ -219,8 +219,8 @@ typedef void(^PFUserLogoutResultBlock)(NSError *PF_NULLABLE_S error);
@returns The task, that encapsulates the work being done.
*/
+ (BFTask *)logInWithUsernameInBackground:(NSString *)username
password:(NSString *)password;
+ (BFTask PF_GENERIC(__kindof PFUser *)*)logInWithUsernameInBackground:(NSString *)username
password:(NSString *)password;

/*!
@abstract Makes an *asynchronous* request to login a user with specified credentials.
@@ -269,7 +269,7 @@ typedef void(^PFUserLogoutResultBlock)(NSError *PF_NULLABLE_S error);
@returns Returns an instance of the `PFUser` on success.
If becoming a user fails due to incorrect token, it returns `nil`.
*/
+ (PF_NULLABLE instancetype)become:(NSString *)sessionToken;
+ (PF_NULLABLE instancetype)become:(NSString *)sessionToken PF_SWIFT_UNAVAILABLE;

/*!
@abstract Makes a *synchronous* request to become a user with the given session token.
@@ -295,7 +295,7 @@ typedef void(^PFUserLogoutResultBlock)(NSError *PF_NULLABLE_S error);
@returns The task, that encapsulates the work being done.
*/
+ (BFTask *)becomeInBackground:(NSString *)sessionToken;
+ (BFTask PF_GENERIC(__kindof PFUser *)*)becomeInBackground:(NSString *)sessionToken;

/*!
@abstract Makes an *asynchronous* request to become a user with the given session token.
@@ -338,7 +338,7 @@ typedef void(^PFUserLogoutResultBlock)(NSError *PF_NULLABLE_S error);
@returns An instance of `BFTask` that is completed when
revocable sessions are enabled and currentUser token is migrated.
*/
+ (BFTask *)enableRevocableSessionInBackground;
+ (BFTask PF_GENERIC(NSNull *)*)enableRevocableSessionInBackground;

/*!
@abstract Enables revocable sessions and upgrades the currentUser session token to use revocable session if needed.
@@ -369,7 +369,7 @@ typedef void(^PFUserLogoutResultBlock)(NSError *PF_NULLABLE_S error);
@returns An instance of `BFTask`, that is resolved with `nil` result when logging out completes.
*/
+ (BFTask *)logOutInBackground;
+ (BFTask PF_GENERIC(NSNull *)*)logOutInBackground;

/*!
@abstract *Asynchronously* logs out the currently logged in user.
@@ -396,7 +396,7 @@ typedef void(^PFUserLogoutResultBlock)(NSError *PF_NULLABLE_S error);
@returns Returns `YES` if the reset email request is successful. `NO` - if no account was found for the email address.
*/
+ (BOOL)requestPasswordResetForEmail:(NSString *)email;
+ (BOOL)requestPasswordResetForEmail:(NSString *)email PF_SWIFT_UNAVAILABLE;

/*!
@abstract *Synchronously* send a password reset request for a specified email and sets an error object.
@@ -408,8 +408,7 @@ typedef void(^PFUserLogoutResultBlock)(NSError *PF_NULLABLE_S error);
@param error Error object to set on error.
@returns Returns `YES` if the reset email request is successful. `NO` - if no account was found for the email address.
*/
+ (BOOL)requestPasswordResetForEmail:(NSString *)email
error:(NSError **)error;
+ (BOOL)requestPasswordResetForEmail:(NSString *)email error:(NSError **)error;

/*!
@abstract Send a password reset request asynchronously for a specified email and sets an
@@ -418,7 +417,7 @@ typedef void(^PFUserLogoutResultBlock)(NSError *PF_NULLABLE_S error);
@param email Email of the account to send a reset password request.
@returns The task, that encapsulates the work being done.
*/
+ (BFTask *)requestPasswordResetForEmailInBackground:(NSString *)email;
+ (BFTask PF_GENERIC(NSNumber *)*)requestPasswordResetForEmailInBackground:(NSString *)email;

/*!
@abstract Send a password reset request *asynchronously* for a specified email.
@@ -450,6 +449,71 @@ typedef void(^PFUserLogoutResultBlock)(NSError *PF_NULLABLE_S error);
target:(PF_NULLABLE_S id)target
selector:(PF_NULLABLE_S SEL)selector;

///--------------------------------------
/// @name Third-party Authentication
///--------------------------------------

/*!
@abstract Registers a third party authentication delegate.
@note This method shouldn't be invoked directly unless developing a third party authentication library.
@see PFUserAuthenticationDelegate
@param delegate The third party authenticaiton delegate to be registered.
@param authType The name of the type of third party authentication source.
*/
+ (void)registerAuthenticationDelegate:(id<PFUserAuthenticationDelegate>)delegate forAuthType:(NSString *)authType;

/*!
@abstract Logs in a user with third party authentication credentials.
@note This method shouldn't be invoked directly unless developing a third party authentication library.
@see PFUserAuthenticationDelegate
@param authType The name of the type of third party authentication source.
@param authData The user credentials of the third party authentication source.
@returns A `BFTask` that is resolved to `PFUser` when logging in completes.
*/
+ (BFTask PF_GENERIC(PFUser *) *)logInWithAuthTypeInBackground:(NSString *)authType authData:(NSDictionary *)authData;

/*!
@abstract Links this user to a third party authentication library.
@note This method shouldn't be invoked directly unless developing a third party authentication library.
@see PFUserAuthenticationDelegate
@param authType The name of the type of third party authentication source.
@param authData The user credentials of the third party authentication source.
@returns A `BFTask` that is resolved to `@YES` if linking succeeds.
*/
- (BFTask PF_GENERIC(NSNumber *) *)linkWithAuthTypeInBackground:(NSString *)authType authData:(NSDictionary *)authData;

/*!
@abstract Unlinks this user from a third party authentication library.
@note This method shouldn't be invoked directly unless developing a third party authentication library.
@see PFUserAuthenticationDelegate
@param authType The name of the type of third party authentication source.
@returns A `BFTask` that is resolved to `@YES` if unlinking succeeds.
*/
- (BFTask PF_GENERIC(NSNumber *) *)unlinkWithAuthTypeInBackground:(NSString *)authType;

/*!
@abstract Indicates whether this user is linked with a third party authentication library of a specific type.
@note This method shouldn't be invoked directly unless developing a third party authentication library.
@see PFUserAuthenticationDelegate
@param authType The name of the type of third party authentication source.
@returns `YES` if the user is linked with a provider, otherwise `NO`.
*/
- (BOOL)isLinkedWithAuthType:(NSString *)authType;

@end

PF_ASSUME_NONNULL_END
File renamed without changes.
@@ -25,6 +25,7 @@
#import <Parse/PFSession.h>
#import <Parse/PFSubclassing.h>
#import <Parse/PFUser.h>
#import <Parse/PFUserAuthenticationDelegate.h>
#import <Parse/PFInstallation.h>
#import <Parse/PFNullability.h>
#import <Parse/PFPush.h>
Binary file not shown.
Binary file not shown.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -8,10 +8,15 @@

/* Begin PBXBuildFile section */
530CB11A1BAABCC70004200C /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 814C3AC61B69877600E307BB /* Main.storyboard */; };
53200CA51BBCCF6400F11D07 /* FBSDKCoreKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 53200CA21BBCCF6400F11D07 /* FBSDKCoreKit.framework */; settings = {ASSET_TAGS = (); }; };
53200CA61BBCCF6400F11D07 /* FBSDKLoginKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 53200CA31BBCCF6400F11D07 /* FBSDKLoginKit.framework */; settings = {ASSET_TAGS = (); }; };
532932171BBB2A62005D6DF6 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 532932161BBB2A62005D6DF6 /* LaunchScreen.storyboard */; };
5330B4271BB4DA2100404AB3 /* DTIActivityIndicator.framework in Copy Frameworks */ = {isa = PBXBuildFile; fileRef = 5330B4221BB4D9F900404AB3 /* DTIActivityIndicator.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
5338FBFE1B93E8CD00326E38 /* DK Liquid Embrace.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 5338FBFD1B93E8CD00326E38 /* DK Liquid Embrace.ttf */; };
534946271BA528B400D64F29 /* LogInViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 534946261BA528B400D64F29 /* LogInViewController.swift */; };
536DB35C1BBCD6D800C95878 /* Bolts.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 536DB3591BBCD6D800C95878 /* Bolts.framework */; settings = {ASSET_TAGS = (); }; };
536DB35D1BBCD6D800C95878 /* Parse.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 536DB35A1BBCD6D800C95878 /* Parse.framework */; settings = {ASSET_TAGS = (); ATTRIBUTES = (Required, ); }; };
536DB35E1BBCD6D800C95878 /* ParseFacebookUtilsV4.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 536DB35B1BBCD6D800C95878 /* ParseFacebookUtilsV4.framework */; settings = {ASSET_TAGS = (); }; };
53774F281BACD0BC00A9CA34 /* video2.mp4 in Resources */ = {isa = PBXBuildFile; fileRef = 53774F271BACD0BC00A9CA34 /* video2.mp4 */; };
537755721BB3F2680084C87F /* EmailLogInViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 537755711BB3F2680084C87F /* EmailLogInViewController.swift */; };
537861131BA4D8BF00D2A535 /* SignUpViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 537861121BA4D8BF00D2A535 /* SignUpViewController.swift */; };
@@ -24,8 +29,6 @@
814C3ACB1B69877600E307BB /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 814C3AC81B69877600E307BB /* Images.xcassets */; };
81BA814B1A49DA1800E65899 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81BA814A1A49DA1800E65899 /* AppDelegate.swift */; };
81BA814D1A49DA1800E65899 /* HomeViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81BA814C1A49DA1800E65899 /* HomeViewController.swift */; };
81BA81701A49DB6800E65899 /* Bolts.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 81BA816B1A49DB6800E65899 /* Bolts.framework */; };
81BA81711A49DB6800E65899 /* Parse.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 81BA816C1A49DB6800E65899 /* Parse.framework */; };
81BA81771A49E0D500E65899 /* libsqlite3.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 81BA81761A49E0D500E65899 /* libsqlite3.dylib */; };
81BA81791A49E0DB00E65899 /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 81BA81781A49E0DB00E65899 /* AudioToolbox.framework */; };
81BA817B1A49E0E500E65899 /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 81BA817A1A49E0E500E65899 /* SystemConfiguration.framework */; };
@@ -71,10 +74,15 @@
/* End PBXCopyFilesBuildPhase section */

/* Begin PBXFileReference section */
53200CA21BBCCF6400F11D07 /* FBSDKCoreKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = FBSDKCoreKit.framework; path = "../../../Downloads/FacebookSDKs-iOS-20150910/FBSDKCoreKit.framework"; sourceTree = "<group>"; };
53200CA31BBCCF6400F11D07 /* FBSDKLoginKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = FBSDKLoginKit.framework; path = "../../../Downloads/FacebookSDKs-iOS-20150910/FBSDKLoginKit.framework"; sourceTree = "<group>"; };
532932161BBB2A62005D6DF6 /* LaunchScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = LaunchScreen.storyboard; sourceTree = "<group>"; };
5330B41C1BB4D9F900404AB3 /* DTIActivityIndicator.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = DTIActivityIndicator.xcodeproj; path = "../../../Downloads/DTIActivityIndicatorView-Swift-master/DTIActivityIndicator.xcodeproj"; sourceTree = "<group>"; };
5338FBFD1B93E8CD00326E38 /* DK Liquid Embrace.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "DK Liquid Embrace.ttf"; sourceTree = "<group>"; };
534946261BA528B400D64F29 /* LogInViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LogInViewController.swift; sourceTree = "<group>"; };
536DB3591BBCD6D800C95878 /* Bolts.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = Bolts.framework; sourceTree = "<group>"; };
536DB35A1BBCD6D800C95878 /* Parse.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = Parse.framework; sourceTree = "<group>"; };
536DB35B1BBCD6D800C95878 /* ParseFacebookUtilsV4.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = ParseFacebookUtilsV4.framework; sourceTree = "<group>"; };
53774F271BACD0BC00A9CA34 /* video2.mp4 */ = {isa = PBXFileReference; lastKnownFileType = file; path = video2.mp4; sourceTree = "<group>"; };
537755711BB3F2680084C87F /* EmailLogInViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = EmailLogInViewController.swift; sourceTree = "<group>"; };
537861121BA4D8BF00D2A535 /* SignUpViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SignUpViewController.swift; sourceTree = "<group>"; };
@@ -90,31 +98,29 @@
81BA81451A49DA1800E65899 /* ParseStarterProject-Swift.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "ParseStarterProject-Swift.app"; sourceTree = BUILT_PRODUCTS_DIR; };
81BA814A1A49DA1800E65899 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
81BA814C1A49DA1800E65899 /* HomeViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomeViewController.swift; sourceTree = "<group>"; };
81BA816B1A49DB6800E65899 /* Bolts.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = Bolts.framework; sourceTree = "<group>"; };
81BA816C1A49DB6800E65899 /* Parse.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = Parse.framework; sourceTree = "<group>"; };
81BA816D1A49DB6800E65899 /* ParseCrashReporting.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = ParseCrashReporting.framework; sourceTree = "<group>"; };
81BA816E1A49DB6800E65899 /* ParseFacebookUtils.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = ParseFacebookUtils.framework; sourceTree = "<group>"; };
81BA81761A49E0D500E65899 /* libsqlite3.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libsqlite3.dylib; path = usr/lib/libsqlite3.dylib; sourceTree = SDKROOT; };
81BA81781A49E0DB00E65899 /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; };
81BA817A1A49E0E500E65899 /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = System/Library/Frameworks/SystemConfiguration.framework; sourceTree = SDKROOT; };
81BA817E1A49E0F000E65899 /* libstdc++.6.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = "libstdc++.6.dylib"; path = "usr/lib/libstdc++.6.dylib"; sourceTree = SDKROOT; };
81BA81801A49E10C00E65899 /* ParseUI.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = ParseUI.framework; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
81BA81421A49DA1800E65899 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
53200CA61BBCCF6400F11D07 /* FBSDKLoginKit.framework in Frameworks */,
53DACA1B1BA692ED0012D4A1 /* Fabric.framework in Frameworks */,
536DB35E1BBCD6D800C95878 /* ParseFacebookUtilsV4.framework in Frameworks */,
53200CA51BBCCF6400F11D07 /* FBSDKCoreKit.framework in Frameworks */,
81BA817F1A49E0F000E65899 /* libstdc++.6.dylib in Frameworks */,
81BA817B1A49E0E500E65899 /* SystemConfiguration.framework in Frameworks */,
536DB35C1BBCD6D800C95878 /* Bolts.framework in Frameworks */,
536DB35D1BBCD6D800C95878 /* Parse.framework in Frameworks */,
53DACA1C1BA692ED0012D4A1 /* TwitterKit.framework in Frameworks */,
53DACA1E1BA692ED0012D4A1 /* TwitterCore.framework in Frameworks */,
81BA81791A49E0DB00E65899 /* AudioToolbox.framework in Frameworks */,
81BA81771A49E0D500E65899 /* libsqlite3.dylib in Frameworks */,
81BA81711A49DB6800E65899 /* Parse.framework in Frameworks */,
81BA81701A49DB6800E65899 /* Bolts.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -179,15 +185,15 @@
81BA816A1A49DB5600E65899 /* Frameworks */ = {
isa = PBXGroup;
children = (
536DB3591BBCD6D800C95878 /* Bolts.framework */,
536DB35A1BBCD6D800C95878 /* Parse.framework */,
536DB35B1BBCD6D800C95878 /* ParseFacebookUtilsV4.framework */,
53200CA21BBCCF6400F11D07 /* FBSDKCoreKit.framework */,
53200CA31BBCCF6400F11D07 /* FBSDKLoginKit.framework */,
53DACA171BA692ED0012D4A1 /* Fabric.framework */,
53DACA181BA692ED0012D4A1 /* TwitterKit.framework */,
53DACA191BA692ED0012D4A1 /* TwitterKitResources.bundle */,
53DACA1A1BA692ED0012D4A1 /* TwitterCore.framework */,
81BA816B1A49DB6800E65899 /* Bolts.framework */,
81BA816C1A49DB6800E65899 /* Parse.framework */,
81BA816D1A49DB6800E65899 /* ParseCrashReporting.framework */,
81BA816E1A49DB6800E65899 /* ParseFacebookUtils.framework */,
81BA81801A49E10C00E65899 /* ParseUI.framework */,
81BA81751A49E0C500E65899 /* System Frameworks */,
);
name = Frameworks;
@@ -453,13 +459,18 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
CODE_SIGN_IDENTITY = "iPhone Developer";
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)",
);
INFOPLIST_FILE = Resources/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
"$(SDKROOT)/usr/lib/system",
);
PRODUCT_BUNDLE_IDENTIFIER = "com.parse.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "ParseStarterProject-Swift";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
@@ -471,13 +482,18 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
CODE_SIGN_IDENTITY = "iPhone Developer";
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)",
);
INFOPLIST_FILE = Resources/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
"$(SDKROOT)/usr/lib/system",
);
PRODUCT_BUNDLE_IDENTIFIER = "com.parse.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "ParseStarterProject-Swift";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
@@ -10,11 +10,11 @@
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "ParseStarterProject/SignUpViewController.swift"
timestampString = "463953395.648241"
timestampString = "465361548.518837"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "11"
endingLineNumber = "11"
startingLineNumber = "12"
endingLineNumber = "12"
landmarkName = "SignUpViewController"
landmarkType = "3">
</BreakpointContent>
@@ -26,11 +26,11 @@
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "ParseStarterProject/SignUpViewController.swift"
timestampString = "464479877.537756"
timestampString = "465361548.518837"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "38"
endingLineNumber = "38"
startingLineNumber = "39"
endingLineNumber = "39"
landmarkName = "viewWillAppear(_:)"
landmarkType = "5">
</BreakpointContent>
@@ -42,11 +42,11 @@
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "ParseStarterProject/SignUpViewController.swift"
timestampString = "464296038.875719"
timestampString = "465361548.518837"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "25"
endingLineNumber = "25"
startingLineNumber = "26"
endingLineNumber = "26"
landmarkName = "viewDidLoad()"
landmarkType = "5">
</BreakpointContent>
@@ -58,11 +58,11 @@
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "ParseStarterProject/SignUpViewController.swift"
timestampString = "464175396.926638"
timestampString = "465361548.518837"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "12"
endingLineNumber = "12"
startingLineNumber = "13"
endingLineNumber = "13"
landmarkName = "SignUpViewController"
landmarkType = "3">
</BreakpointContent>
@@ -74,11 +74,11 @@
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "ParseStarterProject/SignUpViewController.swift"
timestampString = "464178079.81972"
timestampString = "465361548.518837"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "14"
endingLineNumber = "14"
startingLineNumber = "15"
endingLineNumber = "15"
landmarkName = "SignUpViewController"
landmarkType = "3">
<Locations>
@@ -10,7 +10,8 @@
import UIKit
import Fabric
import TwitterKit

import FBSDKCoreKit
import ParseFacebookUtilsV4
import Parse

// If you want to use any of the UI components, uncomment this line
@@ -52,15 +53,10 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
Parse.setApplicationId("0WIFgvDjclrIRUZJTD5MjW02iNfv74GkUD78ipC6",
clientKey: "mbJQmq5YAE21XLruBib7HDPV5VAsfOlQY1EV3tHk")



//
// If you are using Facebook, uncomment and add your FacebookAppID to your bundle's plist as
// described here: https://developers.facebook.com/docs/getting-started/facebook-sdk-for-ios/
// Uncomment the line inside ParseStartProject-Bridging-Header and the following line here:
// PFFacebookUtils.initializeFacebook()

PFFacebookUtils.initializeFacebookWithApplicationLaunchOptions(launchOptions)
// ****************************************************************************
PFUser.enableAutomaticUser()

let defaultACL = PFACL();
@@ -98,8 +94,9 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
// application.registerForRemoteNotificationTypes(types)
// }

return true


return FBSDKApplicationDelegate.sharedInstance().application(application,didFinishLaunchingWithOptions : launchOptions)
}

//--------------------------------------
@@ -147,11 +144,21 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
//--------------------------------------
// MARK: Facebook SDK Integration
//--------------------------------------
func application(application: UIApplication,
openURL url: NSURL,
sourceApplication: String?,
annotation: AnyObject?) -> Bool {
return FBSDKApplicationDelegate.sharedInstance().application(application,
openURL: url,
sourceApplication: sourceApplication,
annotation: annotation)
}


//Make sure it isn't already declared in the app delegate (possible redefinition of func error)
func applicationDidBecomeActive(application: UIApplication) {
FBSDKAppEvents.activateApp()
}

///////////////////////////////////////////////////////////
// Uncomment this method if you are using Facebook
///////////////////////////////////////////////////////////
// func application(application: UIApplication, openURL url: NSURL, sourceApplication: String?, annotation: AnyObject?) -> Bool {
// return FBAppCall.handleOpenURL(url, sourceApplication:sourceApplication, session:PFFacebookUtils.session())
// }
}

}
@@ -7,6 +7,7 @@
//
import UIKit
import ParseFacebookUtilsV4
import TwitterKit

class SignUpViewController: UIViewController {
@@ -48,4 +49,27 @@ class SignUpViewController: UIViewController {
button.layer.cornerRadius = 7
}

}
@IBAction func facebookSignUpTapped(sender: AnyObject) {

let permissions = ["public_profile","email"]
PFFacebookUtils.logInInBackgroundWithReadPermissions(permissions) {
(user: PFUser?, error: NSError?) -> Void in
if let user = user {
if user.isNew {
let signUpSuccess = UIAlertController(title: "Success", message: "User Signed Up and Logged In Facebook!", preferredStyle: UIAlertControllerStyle.Alert)
signUpSuccess.addAction(UIAlertAction(title: "OK", style: .Default, handler: nil))
self.presentViewController(signUpSuccess, animated: true, completion: nil);
} else {
let userExists = UIAlertController(title: "Duplicate Error", message: "User Already Exists. Please Log In instead of Sign Up!", preferredStyle: UIAlertControllerStyle.Alert)
userExists.addAction(UIAlertAction(title: "OK", style: .Default, handler: nil))
self.presentViewController(userExists, animated: true, completion: nil);
}
} else {
let logInCancel = UIAlertController(title: "Failed", message: "Uh oh. The user cancelled the Facebook login!", preferredStyle: UIAlertControllerStyle.Alert)
logInCancel.addAction(UIAlertAction(title: "OK", style: .Default, handler: nil))
self.presentViewController(logInCancel, animated: true, completion: nil);
}
}

}
}

Large diffs are not rendered by default.

@@ -2,6 +2,10 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>LSApplicationQueriesSchemes</key>
<array>
<string>fbauth2</string>
</array>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
@@ -15,11 +19,20 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.8.2</string>
<string>1.8.5</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleURLSchemes</key>
<array>
<string>fb529062360604048</string>
</array>
</dict>
</array>
<key>CFBundleVersion</key>
<string>1.8.2</string>
<string>1.8.5</string>
<key>Fabric</key>
<dict>
<key>APIKey</key>
@@ -39,8 +52,39 @@
</dict>
</array>
</dict>
<key>FacebookAppID</key>
<string>529062360604048</string>
<key>FacebookDisplayName</key>
<string>Acquere</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>NSAppTransportSecurity</key>
<dict>
<key>NSExceptionDomains</key>
<dict>
<key>akamaihd.net</key>
<dict>
<key>NSExceptionRequiresForwardSecrecy</key>
<false/>
<key>NSIncludesSubdomains</key>
<true/>
</dict>
<key>facebook.com</key>
<dict>
<key>NSExceptionRequiresForwardSecrecy</key>
<false/>
<key>NSIncludesSubdomains</key>
<true/>
</dict>
<key>fbcdn.net</key>
<dict>
<key>NSExceptionRequiresForwardSecrecy</key>
<false/>
<key>NSIncludesSubdomains</key>
<true/>
</dict>
</dict>
</dict>
<key>UIAppFonts</key>
<array>
<string>DK Liquid Embrace.ttf</string>