Fix Bug with category retrieval and is now posting only information

not posting images yet
This commit is contained in:
Okechi Onyeje 2016-08-24 21:26:42 -04:00
parent f16ac86e05
commit 0b3dce737e
149 changed files with 4091 additions and 3908 deletions

BIN
.DS_Store vendored

Binary file not shown.

View File

@ -1,5 +1,5 @@
PODS:
- AeroGearHttp (0.5.1)
- AeroGearHttp (0.6.0)
- AeroGearOAuth2 (0.5.1):
- AeroGearHttp
- AFNetworking (2.6.3):
@ -27,47 +27,48 @@ PODS:
- Alamofire-SwiftyJSON (0.1.1):
- Alamofire (~> 3.4)
- SwiftyJSON (~> 2.3)
- Bolts (1.7.0):
- Bolts/AppLinks (= 1.7.0)
- Bolts/Tasks (= 1.7.0)
- Bolts/AppLinks (1.7.0):
- Bolts (1.8.4):
- Bolts/AppLinks (= 1.8.4)
- Bolts/Tasks (= 1.8.4)
- Bolts/AppLinks (1.8.4):
- Bolts/Tasks
- Bolts/Tasks (1.7.0)
- Bolts/Tasks (1.8.4)
- BSGridCollectionViewLayout (1.1.1)
- BSImagePicker (2.3.0):
- BSGridCollectionViewLayout (~> 1.1)
- UIImageViewModeScaleAspect (~> 1.3)
- FBSDKCoreKit (4.13.1):
- FBSDKCoreKit (4.14.0):
- Bolts (~> 1.7)
- FBSDKLoginKit (4.13.1):
- FBSDKLoginKit (4.14.0):
- FBSDKCoreKit
- FBSDKShareKit (4.13.1):
- FBSDKShareKit (4.14.0):
- FBSDKCoreKit
- Firebase (3.2.1):
- Firebase/Core (= 3.2.1)
- Firebase/Analytics (3.2.1):
- FirebaseAnalytics (= 3.2.0)
- Firebase/Core (3.2.1):
- Firebase/Analytics (= 3.2.1)
- Firebase/Database (3.2.1):
- Firebase/Analytics (= 3.2.1)
- FirebaseDatabase (= 3.0.1)
- Firebase/Storage (3.2.1):
- Firebase/Analytics (= 3.2.1)
- FirebaseStorage (= 1.0.1)
- FirebaseAnalytics (3.2.0):
- Firebase (3.4.0):
- Firebase/Core (= 3.4.0)
- Firebase/Analytics (3.4.0):
- FirebaseAnalytics (~> 3.3)
- Firebase/Core (3.4.0):
- Firebase/Analytics
- Firebase/Database (3.4.0):
- Firebase/Analytics
- FirebaseDatabase (= 3.0.2)
- Firebase/Storage (3.4.0):
- Firebase/Analytics
- FirebaseStorage (= 1.0.2)
- FirebaseAnalytics (3.3.0):
- FirebaseInstanceID (~> 1.0)
- GoogleInterchangeUtilities (~> 1.2)
- GoogleSymbolUtilities (~> 1.1)
- GoogleUtilities (~> 1.3)
- FirebaseAuth (3.0.2):
- GoogleUtilities (~> 1.2)
- FirebaseAuth (3.0.4):
- FirebaseAnalytics (~> 3.2)
- GoogleNetworkingUtilities (~> 1.2)
- GoogleUtilities (~> 1.3)
- FirebaseDatabase (3.0.1):
- GoogleParsingUtilities (~> 1.1)
- GoogleUtilities (~> 1.2)
- FirebaseDatabase (3.0.2):
- FirebaseAnalytics (~> 3.2)
- FirebaseInstanceID (1.0.6)
- FirebaseStorage (1.0.1):
- FirebaseInstanceID (1.0.8)
- FirebaseStorage (1.0.2):
- FirebaseAnalytics (~> 3.2)
- GoogleNetworkingUtilities (~> 1.2)
- GDataXML-HTML (1.3.0)
@ -75,6 +76,9 @@ PODS:
- GoogleSymbolUtilities (~> 1.0)
- GoogleNetworkingUtilities (1.2.1):
- GoogleSymbolUtilities (~> 1.0)
- GoogleParsingUtilities (1.1.1):
- GoogleNetworkingUtilities (~> 1.0)
- GoogleSymbolUtilities (~> 1.0)
- GoogleSymbolUtilities (1.1.1)
- GoogleUtilities (1.3.1):
- GoogleSymbolUtilities (~> 1.0)
@ -93,11 +97,11 @@ PODS:
- AFNetworking (~> 2.6.0)
- PicoKit/Soap
- PicoKit/XMLWriter (0.7.2)
- SOAPEngine (1.27)
- SOAPEngine (1.28)
- SwiftyJSON (2.3.2)
- SWRevealViewController (2.3.0)
- TYMActivityIndicatorView (0.3.3)
- UIImageViewModeScaleAspect (1.3)
- UIImageViewModeScaleAspect (1.5)
DEPENDENCIES:
- AeroGearOAuth2
@ -118,36 +122,37 @@ DEPENDENCIES:
- TYMActivityIndicatorView
SPEC CHECKSUMS:
AeroGearHttp: 9eb405b694aa9ac5daff842f68648f4a9fe0fa66
AeroGearHttp: e958f301cc2d1c7fbfd4b61af187ea3490040a48
AeroGearOAuth2: 6f29d3fac8b78a0ff6d51b04c4ba1a02baed2e52
AFNetworking: cb8d14a848e831097108418f5d49217339d4eb60
Alamofire: 01a82e2f6c0f860ade35534c8dd88be61bdef40c
Alamofire-SwiftyJSON: 5812bb37accc36897cc2f2dabb070d8ebcd7ac98
Bolts: a0058fa3b331c5a1e4402d534f2dae36dbff31e4
Bolts: 8a7995239dbe724f9cba2248b766d48b7ebdd322
BSGridCollectionViewLayout: d7304dcb35c6b3b4420c527e9f9b77ff322250f3
BSImagePicker: 591b28ce4994c44cbc4ac896717c1db9f9fadd18
FBSDKCoreKit: 2807fe0da2ddb49a1469da6d6ff597f99912980f
FBSDKLoginKit: 6d350cb6a22d6956e9d078885de6ee8a0ebc51b4
FBSDKShareKit: c9438df7573b33780ac8c3451201c5ebb260ffca
Firebase: 6c80ac28d59d06bfd9152a7b6ea17625ca93183d
FirebaseAnalytics: 6f75b04e6bfb8e0b6e9ef298e04c24eea3b13863
FirebaseAuth: 94b851fc345ce98036dfedfdc2eddeaef8fa3b4c
FirebaseDatabase: 34301d11621a83546f39f670d256477ba6f7fcea
FirebaseInstanceID: d014d574053a2fe84478f12f7bae96979e7051bb
FirebaseStorage: e9c32a8d246c07eeefd78180c22736aa1b81e81b
FBSDKCoreKit: 6e020b5db0b5bd1e01f5fb0902131befd129a502
FBSDKLoginKit: da563567a108050ef83739c8c8c001ee9e25fa13
FBSDKShareKit: e8e5d4ccef69b41132fe33acda26db1e33143e33
Firebase: 754562547af419cc2f4b15247fee419081924bc2
FirebaseAnalytics: 228be2991cb28efb96cdafc4d62f64680e615c69
FirebaseAuth: 26fd291c3b552fc9658420b867520d5ae080421c
FirebaseDatabase: 59bea2e7dfd81b3b8b2f8e396caf1a52c2ced6f7
FirebaseInstanceID: ba1e640935235e5fac39dfa816fe7660e72e1a8a
FirebaseStorage: fa2a87dee81f682f553af6839daa37a750e65f6a
GDataXML-HTML: 7adc03668cab35c288f1dbb8929a179f0fece898
GoogleInterchangeUtilities: def8415a862effc67d549d5b5b0b9c7a2f97d4de
GoogleNetworkingUtilities: 3e83269048cfb498dc7ec83ab36813360965c74f
GoogleParsingUtilities: 30b3896f9ee167dc78747f013d3de157ced1cadf
GoogleSymbolUtilities: 33117db1b5f290c6fbf259585e4885b4c84b98d7
GoogleUtilities: 56c5ac05b7aa5dc417a1bb85221a9516e04d7032
Locksmith: a8ed41ac4c06506ea8cb199d8ec8a8d3d108eb2a
OAuthSwift: 1ef042d4362e755e24a78f158d817245641a5d24
PicoKit: 9079bce659a8d5408c8af1c45254b971df614de3
SOAPEngine: e4b13175e3972eef93223eb9f397b8c86e1e6892
SOAPEngine: 75ca70e899b8ab7349ee9f4d69d11f081db1afba
SwiftyJSON: 04ccea08915aa0109039157c7974cf0298da292a
SWRevealViewController: 6d3fd97f70112fd7cef9de14df4260eacce4c63a
TYMActivityIndicatorView: ad816387ebd5952c376af129218722733044148b
UIImageViewModeScaleAspect: ec78901acfc20d3782154111a21d34390f8f71ad
UIImageViewModeScaleAspect: 11a790a0b9d248a13dc63e3a78991f1463b6d84e
PODFILE CHECKSUM: 2638bdfbb954251e8a36f6a6065ffea34297238d

BIN
Pods/.DS_Store generated vendored

Binary file not shown.

View File

@ -132,13 +132,16 @@ public class Http {
var request: NSURLRequest
var task: NSURLSessionTask?
var delegate: TaskDataDelegate
// Merge headers
let headers = merge(self.requestSerializer.headers, self.authzModule?.authorizationFields())
// care for multipart request is multipart data are set
if (self.hasMultiPartData(parameters)) {
request = self.requestSerializer.multipartRequest(finalURL, method: method, parameters: parameters, headers: self.authzModule?.authorizationFields())
request = self.requestSerializer.multipartRequest(finalURL, method: method, parameters: parameters, headers: headers)
task = self.session.uploadTaskWithStreamedRequest(request)
delegate = TaskUploadDelegate()
} else {
request = self.requestSerializer.request(finalURL, method: method, parameters: parameters, headers: self.authzModule?.authorizationFields())
request = self.requestSerializer.request(finalURL, method: method, parameters: parameters, headers: headers)
task = self.session.dataTaskWithRequest(request);
delegate = TaskDataDelegate()
}
@ -188,11 +191,14 @@ public class Http {
return
}
var request: NSURLRequest
// Merge headers
let headers = merge(self.requestSerializer.headers, self.authzModule?.authorizationFields())
// care for multipart request is multipart data are set
if (self.hasMultiPartData(parameters)) {
request = self.requestSerializer.multipartRequest(finalURL, method: method, parameters: parameters, headers: self.authzModule?.authorizationFields())
request = self.requestSerializer.multipartRequest(finalURL, method: method, parameters: parameters, headers: headers)
} else {
request = self.requestSerializer.request(finalURL, method: method, parameters: parameters, headers: self.authzModule?.authorizationFields())
request = self.requestSerializer.request(finalURL, method: method, parameters: parameters, headers: headers)
}
var task: NSURLSessionTask?

View File

@ -31,3 +31,19 @@ extension String {
return encodedURL as String
}
}
public func merge(one: [String: String]?, _ two: [String:String]?) -> [String: String]? {
var dict: [String: String]?
if let one = one {
dict = one
if let two = two {
for (key, value) in two {
dict![key] = value
}
}
} else {
dict = two
}
return dict
}

View File

@ -0,0 +1,32 @@
/*
* Copyright (c) 2016, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*/
#pragma once
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
/**
Returns whether all instances of `BFTask` should automatically @try/@catch exceptions in continuation blocks. Default: `YES`.
@return Boolean value indicating whether exceptions are being caught.
*/
extern BOOL BFTaskCatchesExceptions(void)
__attribute__((deprecated("This is temporary API and will be removed in a future release.")));
/**
Set whether all instances of `BFTask` should automatically @try/@catch exceptions in continuation blocks. Default: `YES`.
@param catchExceptions Boolean value indicating whether exceptions shoudl be caught.
*/
extern void BFTaskSetCatchesExceptions(BOOL catchExceptions)
__attribute__((deprecated("This is a temporary API and will be removed in a future release.")));
NS_ASSUME_NONNULL_END

View File

@ -0,0 +1,24 @@
/*
* Copyright (c) 2016, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*/
#import "BFTask+Exceptions.h"
NS_ASSUME_NONNULL_BEGIN
static BOOL taskCatchExceptions = YES;
BOOL BFTaskCatchesExceptions(void) {
return taskCatchExceptions;
}
void BFTaskSetCatchesExceptions(BOOL catchExceptions) {
taskCatchExceptions = catchExceptions;
}
NS_ASSUME_NONNULL_END

View File

@ -26,8 +26,11 @@ extern NSInteger const kBFMultipleErrorsError;
/*!
An exception that is thrown if there was multiple exceptions on <BFTask taskForCompletionOfAllTasks:>.
@deprecated `BFTask` exception handling is deprecated and will be removed in a future release.
*/
extern NSString *const BFTaskMultipleExceptionsException;
extern NSString *const BFTaskMultipleExceptionsException
__attribute__((deprecated("`BFTask` exception handling is deprecated and will be removed in a future release.")));
/*!
An error userInfo key used if there were multiple errors on <BFTask taskForCompletionOfAllTasks:>.
@ -38,8 +41,11 @@ extern NSString *const BFTaskMultipleErrorsUserInfoKey;
/*!
An error userInfo key used if there were multiple exceptions on <BFTask taskForCompletionOfAllTasks:>.
Value type is `NSArray<NSException *> *`.
@deprecated `BFTask` exception handling is deprecated and will be removed in a future release.
*/
extern NSString *const BFTaskMultipleExceptionsUserInfoKey;
extern NSString *const BFTaskMultipleExceptionsUserInfoKey
__attribute__((deprecated("`BFTask` exception handling is deprecated and will be removed in a future release.")));
@class BFExecutor;
@class BFTask;
@ -54,7 +60,7 @@ extern NSString *const BFTaskMultipleExceptionsUserInfoKey;
/*!
A block that can act as a continuation for a task.
*/
typedef __nullable id(^BFContinuationBlock)(BFTask<ResultType> *task);
typedef __nullable id(^BFContinuationBlock)(BFTask<ResultType> *t);
/*!
Creates a task that is already completed with the given result.
@ -71,8 +77,11 @@ typedef __nullable id(^BFContinuationBlock)(BFTask<ResultType> *task);
/*!
Creates a task that is already completed with the given exception.
@param exception The exception for the task.
@deprecated `BFTask` exception handling is deprecated and will be removed in a future release.
*/
+ (instancetype)taskWithException:(NSException *)exception;
+ (instancetype)taskWithException:(NSException *)exception
__attribute__((deprecated("`BFTask` exception handling is deprecated and will be removed in a future release.")));
/*!
Creates a task that is already cancelled.
@ -143,8 +152,11 @@ typedef __nullable id(^BFContinuationBlock)(BFTask<ResultType> *task);
/*!
The exception of a failed task.
@deprecated `BFTask` exception handling is deprecated and will be removed in a future release.
*/
@property (nullable, nonatomic, strong, readonly) NSException *exception;
@property (nullable, nonatomic, strong, readonly) NSException *exception
__attribute__((deprecated("`BFTask` exception handling is deprecated and will be removed in a future release.")));
/*!
Whether this task has been cancelled.

View File

@ -13,6 +13,7 @@
#import <libkern/OSAtomic.h>
#import "Bolts.h"
#import "BFTask+Exceptions.h"
NS_ASSUME_NONNULL_BEGIN
@ -126,30 +127,35 @@ NSString *const BFTaskMultipleExceptionsUserInfoKey = @"exceptions";
BFTaskCompletionSource *tcs = [BFTaskCompletionSource taskCompletionSource];
for (BFTask *task in tasks) {
[task continueWithBlock:^id(BFTask *task) {
if (task.exception) {
[task continueWithBlock:^id(BFTask *t) {
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
if (t.exception) {
@synchronized (lock) {
[exceptions addObject:task.exception];
[exceptions addObject:t.exception];
#pragma clang diagnostic pop
}
} else if (task.error) {
} else if (t.error) {
@synchronized (lock) {
[errors addObject:task.error];
[errors addObject:t.error];
}
} else if (task.cancelled) {
} else if (t.cancelled) {
OSAtomicIncrement32Barrier(&cancelled);
}
if (OSAtomicDecrement32Barrier(&total) == 0) {
if (exceptions.count > 0) {
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
if (exceptions.count == 1) {
tcs.exception = [exceptions firstObject];
} else {
NSException *exception =
[NSException exceptionWithName:BFTaskMultipleExceptionsException
NSException *exception = [NSException exceptionWithName:BFTaskMultipleExceptionsException
reason:@"There were multiple exceptions."
userInfo:@{ BFTaskMultipleExceptionsUserInfoKey: exceptions }];
tcs.exception = exception;
}
#pragma clang diagnostic pop
} else if (errors.count > 0) {
if (errors.count == 1) {
tcs.error = [errors firstObject];
@ -193,20 +199,23 @@ NSString *const BFTaskMultipleExceptionsUserInfoKey = @"exceptions";
BFTaskCompletionSource *source = [BFTaskCompletionSource taskCompletionSource];
for (BFTask *task in tasks) {
[task continueWithBlock:^id(BFTask *task) {
if (task.exception != nil) {
[task continueWithBlock:^id(BFTask *t) {
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
if (t.exception != nil) {
@synchronized(lock) {
[exceptions addObject:task.exception];
[exceptions addObject:t.exception];
#pragma clang diagnostic pop
}
} else if (task.error != nil) {
} else if (t.error != nil) {
@synchronized(lock) {
[errors addObject:task.error];
[errors addObject:t.error];
}
} else if (task.cancelled) {
} else if (t.cancelled) {
OSAtomicIncrement32Barrier(&cancelled);
} else {
if(OSAtomicCompareAndSwap32Barrier(0, 1, &completed)) {
[source setResult:task.result];
[source setResult:t.result];
}
}
@ -215,14 +224,16 @@ NSString *const BFTaskMultipleExceptionsUserInfoKey = @"exceptions";
if (cancelled > 0) {
[source cancel];
} else if (exceptions.count > 0) {
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
if (exceptions.count == 1) {
source.exception = exceptions.firstObject;
} else {
NSException *exception =
[NSException exceptionWithName:BFTaskMultipleExceptionsException
NSException *exception = [NSException exceptionWithName:BFTaskMultipleExceptionsException
reason:@"There were multiple exceptions."
userInfo:@{ @"exceptions": exceptions }];
userInfo:@{ BFTaskMultipleExceptionsUserInfoKey: exceptions }];
source.exception = exception;
#pragma clang diagnostic pop
}
} else if (errors.count > 0) {
if (errors.count == 1) {
@ -394,20 +405,33 @@ NSString *const BFTaskMultipleExceptionsUserInfoKey = @"exceptions";
}
id result = nil;
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
if (BFTaskCatchesExceptions()) {
@try {
result = block(self);
} @catch (NSException *exception) {
NSLog(@"[Bolts] Warning: `BFTask` caught an exception in the continuation block."
@" This behavior is discouraged and will be removed in a future release."
@" Caught Exception: %@", exception);
tcs.exception = exception;
return;
}
} else {
result = block(self);
}
#pragma clang diagnostic pop
if ([result isKindOfClass:[BFTask class]]) {
id (^setupWithTask) (BFTask *) = ^id(BFTask *task) {
if (cancellationToken.cancellationRequested || task.cancelled) {
[tcs cancel];
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
} else if (task.exception) {
tcs.exception = task.exception;
#pragma clang diagnostic pop
} else if (task.error) {
tcs.error = task.error;
} else {
@ -499,7 +523,11 @@ NSString *const BFTaskMultipleExceptionsUserInfoKey = @"exceptions";
}
[self.condition lock];
}
// TODO: (nlutsenko) Restructure this to use Bolts-Swift thread access synchronization architecture
// In the meantime, it's absolutely safe to get `_completed` aka an ivar, as long as it's a `BOOL` aka less than word size.
while (!_completed) {
[self.condition wait];
}
[self.condition unlock];
}

View File

@ -49,8 +49,11 @@ NS_ASSUME_NONNULL_BEGIN
Completes the task by setting an exception.
Attempting to set this for a completed task will raise an exception.
@param exception The exception for the task.
@deprecated `BFTask` exception handling is deprecated and will be removed in a future release.
*/
- (void)setException:(NSException *)exception;
- (void)setException:(NSException *)exception
__attribute__((deprecated("`BFTask` exception handling is deprecated and will be removed in a future release.")));
/*!
Completes the task by marking it as cancelled.
@ -75,8 +78,11 @@ NS_ASSUME_NONNULL_BEGIN
Sets the exception of the task if it wasn't already completed.
@param exception The exception for the task.
@returns whether the new value was set.
@deprecated `BFTask` exception handling is deprecated and will be removed in a future release.
*/
- (BOOL)trySetException:(NSException *)exception;
- (BOOL)trySetException:(NSException *)exception
__attribute__((deprecated("`BFTask` exception handling is deprecated and will be removed in a future release.")));
/*!
Sets the cancellation state of the task if it wasn't already completed.

View File

@ -13,6 +13,7 @@
#import <Bolts/BFCancellationTokenSource.h>
#import <Bolts/BFExecutor.h>
#import <Bolts/BFTask.h>
#import <Bolts/BFTask+Exceptions.h>
#import <Bolts/BFTaskCompletionSource.h>
#if __has_include(<Bolts/BFAppLink.h>) && TARGET_OS_IPHONE && !TARGET_OS_WATCH && !TARGET_OS_TV

View File

@ -12,6 +12,6 @@
NS_ASSUME_NONNULL_BEGIN
NSString *const BoltsFrameworkVersionString = @"1.7.0";
NSString *const BoltsFrameworkVersionString = @"1.8.4";
NS_ASSUME_NONNULL_END

View File

@ -57,6 +57,12 @@ typedef NS_ENUM(NSInteger, BFAppLinkNavigationType) {
extras:(NSDictionary *)extras
appLinkData:(NSDictionary *)appLinkData;
/*!
Creates an NSDictionary with the correct format for iOS callback URLs,
to be used as 'appLinkData' argument in the call to navigationWithAppLink:extras:appLinkData:
*/
+ (NSDictionary *)callbackAppLinkDataForAppWithName:(NSString *)appName url:(NSString *)url;
/*! Performs the navigation */
- (BFAppLinkNavigationType)navigate:(NSError **)error;
@ -69,6 +75,20 @@ typedef NS_ENUM(NSInteger, BFAppLinkNavigationType) {
/*! Navigates to a BFAppLink and returns whether it opened in-app or in-browser */
+ (BFAppLinkNavigationType)navigateToAppLink:(BFAppLink *)link error:(NSError **)error;
/*!
Returns a BFAppLinkNavigationType based on a BFAppLink.
It's essentially a no-side-effect version of navigateToAppLink:error:,
allowing apps to determine flow based on the link type (e.g. open an
internal web view instead of going straight to the browser for regular links.)
*/
+ (BFAppLinkNavigationType)navigationTypeForLink:(BFAppLink *)link;
/*!
Return navigation type for current instance.
No-side-effect version of navigate:
*/
- (BFAppLinkNavigationType)navigationType;
/*! Navigates to a URL (an asynchronous action) and returns a BFNavigationType */
+ (BFTask *)navigateToURLInBackground:(NSURL *)destination;

View File

@ -8,7 +8,7 @@
*
*/
#import <UIKit/UIKit.h>
#import "BFAppLinkNavigation.h"
#import <Bolts/Bolts.h>
@ -20,6 +20,9 @@ FOUNDATION_EXPORT NSString *const BFAppLinkTargetKeyName;
FOUNDATION_EXPORT NSString *const BFAppLinkUserAgentKeyName;
FOUNDATION_EXPORT NSString *const BFAppLinkExtrasKeyName;
FOUNDATION_EXPORT NSString *const BFAppLinkVersionKeyName;
FOUNDATION_EXPORT NSString *const BFAppLinkRefererAppLink;
FOUNDATION_EXPORT NSString *const BFAppLinkRefererAppName;
FOUNDATION_EXPORT NSString *const BFAppLinkRefererUrl;
static id<BFAppLinkResolving> defaultResolver;
@ -43,6 +46,10 @@ static id<BFAppLinkResolving> defaultResolver;
return navigation;
}
+ (NSDictionary *)callbackAppLinkDataForAppWithName:(NSString *)appName url:(NSString *)url {
return @{BFAppLinkRefererAppLink: @{BFAppLinkRefererAppName: appName, BFAppLinkRefererUrl: url}};
}
- (NSString *)stringByEscapingQueryString:(NSString *)string {
#if __IPHONE_OS_VERSION_MIN_REQUIRED >= __IPHONE_7_0 || __MAC_OS_X_VERSION_MIN_REQUIRED >= __MAC_10_9
return [string stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]];
@ -229,6 +236,40 @@ static id<BFAppLinkResolving> defaultResolver;
appLinkData:nil] navigate:error];
}
+ (BFAppLinkNavigationType)navigationTypeForLink:(BFAppLink *)link {
return [[self navigationWithAppLink:link extras:nil appLinkData:nil] navigationType];
}
- (BFAppLinkNavigationType)navigationType {
BFAppLinkTarget *eligibleTarget = nil;
for (BFAppLinkTarget *target in self.appLink.targets) {
if ([[UIApplication sharedApplication] canOpenURL:target.URL]) {
eligibleTarget = target;
break;
}
}
if (eligibleTarget != nil) {
NSURL *appLinkURL = [self appLinkURLWithTargetURL:eligibleTarget.URL error:nil];
if (appLinkURL != nil) {
return BFAppLinkNavigationTypeApp;
} else {
return BFAppLinkNavigationTypeFailure;
}
}
if (self.appLink.webURL != nil) {
NSURL *appLinkURL = [self appLinkURLWithTargetURL:eligibleTarget.URL error:nil];
if (appLinkURL != nil) {
return BFAppLinkNavigationTypeBrowser;
} else {
return BFAppLinkNavigationTypeFailure;
}
}
return BFAppLinkNavigationTypeFailure;
}
+ (id<BFAppLinkResolving>)defaultResolver {
if (defaultResolver) {
return defaultResolver;

View File

@ -55,11 +55,11 @@
NSString *refererAppName = refererAppLink[BFAppLinkRefererAppName];
if (refererURLString && refererAppName) {
BFAppLinkTarget *target = [BFAppLinkTarget appLinkTargetWithURL:[NSURL URLWithString:refererURLString]
BFAppLinkTarget *appLinkTarget = [BFAppLinkTarget appLinkTargetWithURL:[NSURL URLWithString:refererURLString]
appStoreId:nil
appName:refererAppName];
_appLinkReferer = [BFAppLink appLinkWithSourceURL:[NSURL URLWithString:refererURLString]
targets:@[ target ]
targets:@[ appLinkTarget ]
webURL:nil
isBackToReferrer:YES];
}

View File

@ -44,5 +44,5 @@
#import <FBSDKCoreKit/FBSDKDeviceViewControllerBase.h>
#endif
#define FBSDK_VERSION_STRING @"4.13.1"
#define FBSDK_TARGET_PLATFORM_VERSION @"v2.6"
#define FBSDK_VERSION_STRING @"4.14.0"
#define FBSDK_TARGET_PLATFORM_VERSION @"v2.7"

View File

@ -38,7 +38,9 @@
- (void)dealloc
{
if (_alertView) {
_alertView.delegate = nil;
}
}
- (BOOL)processError:(NSError *)error request:(FBSDKGraphRequest *)request delegate:(id<FBSDKGraphErrorRecoveryProcessorDelegate>) delegate
@ -69,18 +71,7 @@
NSString *recoverySuggestion = error.userInfo[NSLocalizedRecoverySuggestionErrorKey];
_error = error;
dispatch_async(dispatch_get_main_queue(), ^{
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
_alertView = [[UIAlertView alloc] initWithTitle:nil
message:recoverySuggestion
delegate:self
cancelButtonTitle:nil
otherButtonTitles:nil];
#pragma clang diagnostic pop
for (NSString *option in recoveryOptionsTitles) {
[_alertView addButtonWithTitle:option];
}
[_alertView show];
[self displayAlertWithRecoverySuggestion:recoverySuggestion recoveryOptionsTitles:recoveryOptionsTitles];
});
return YES;
}
@ -120,6 +111,77 @@
NSLocalizedStringWithDefaultValue(@"ErrorRecovery.Alert.OK", @"FacebookSDK", [FBSDKInternalUtility bundleForStrings],
@"OK",
@"The title of the label to dismiss the alert when presenting user facing error messages");
[self displayAlertWithTitle:title message:message cancelButtonTitle:localizedOK];
});
}
}
return NO;
}
return NO;
}
#pragma mark - UIAlertView and UIAlertController support
- (void)displayAlertWithRecoverySuggestion:(NSString *)recoverySuggestion recoveryOptionsTitles:(NSArray<NSString *> *)recoveryOptionsTitles
{
if ([UIAlertController class]) {
UIAlertController *alertController = [UIAlertController alertControllerWithTitle:nil
message:recoverySuggestion
preferredStyle:UIAlertControllerStyleAlert];
for (NSUInteger i = 0; i < recoveryOptionsTitles.count; i++) {
NSString *title = recoveryOptionsTitles[i];
UIAlertAction *option = [UIAlertAction actionWithTitle:title
style:UIAlertActionStyleDefault
handler:^(UIAlertAction * _Nonnull action) {
[_recoveryAttempter attemptRecoveryFromError:_error
optionIndex:i
delegate:self
didRecoverSelector:@selector(didPresentErrorWithRecovery:contextInfo:)
contextInfo:nil];
}];
[alertController addAction:option];
}
UIViewController *topMostViewController = [FBSDKInternalUtility topMostViewController];
[topMostViewController presentViewController:alertController
animated:YES
completion:nil];
} else {
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
_alertView = [[UIAlertView alloc] initWithTitle:nil
message:recoverySuggestion
delegate:self
cancelButtonTitle:nil
otherButtonTitles:nil];
#pragma clang diagnostic pop
for (NSString *option in recoveryOptionsTitles) {
[_alertView addButtonWithTitle:option];
}
[_alertView show];
}
}
- (void)displayAlertWithTitle:(NSString *)title message:(NSString *)message cancelButtonTitle:(NSString *)localizedOK
{
if ([UIAlertController class]) {
UIAlertController *alertController = [UIAlertController alertControllerWithTitle:nil
message:message
preferredStyle:UIAlertControllerStyleAlert];
UIAlertAction *OKAction = [UIAlertAction actionWithTitle:localizedOK
style:UIAlertActionStyleCancel
handler:^(UIAlertAction * _Nonnull action) {
[_recoveryAttempter attemptRecoveryFromError:_error
optionIndex:0
delegate:self
didRecoverSelector:@selector(didPresentErrorWithRecovery:contextInfo:)
contextInfo:nil];
}];
[alertController addAction:OKAction];
UIViewController *topMostViewController = [FBSDKInternalUtility topMostViewController];
[topMostViewController presentViewController:alertController
animated:YES
completion:nil];
} else {
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
[[[UIAlertView alloc] initWithTitle:title
@ -128,12 +190,7 @@
cancelButtonTitle:localizedOK
otherButtonTitles:nil] show];
#pragma clang diagnostic pop
});
}
}
return NO;
}
return NO;
}
#pragma mark - UIAlertViewDelegate
@ -143,8 +200,10 @@
- (void)alertView:(UIAlertView *)alertView didDismissWithButtonIndex:(NSInteger)buttonIndex
{
[_recoveryAttempter attemptRecoveryFromError:_error optionIndex:buttonIndex delegate:self didRecoverSelector:@selector(didPresentErrorWithRecovery:contextInfo:) contextInfo:nil];
if (_alertView) {
_alertView.delegate = nil;
_alertView = nil;
}
}
#pragma clang diagnostic pop

View File

@ -151,7 +151,7 @@ totalBytesExpectedToWrite:(NSInteger)totalBytesExpectedToWrite;
@abstract
The delegate object that receives updates.
*/
@property (nonatomic, assign) id<FBSDKGraphRequestConnectionDelegate> delegate;
@property (nonatomic, weak) id<FBSDKGraphRequestConnectionDelegate> delegate;
/*!
@abstract Gets or sets the timeout interval to wait for a response before giving up.

View File

@ -361,8 +361,14 @@
return;
}
UIImage *image = [[UIImage alloc] initWithData:data scale:state.scale];
if (image) {
_imageView.image = image;
_hasProfileImage = YES;
} else {
_hasProfileImage = NO;
_placeholderImageIsValid = NO;
[self setNeedsImageUpdate];
}
}
@end

View File

@ -16,8 +16,6 @@
// IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#import <sqlite3.h>
#import <AudioToolbox/AudioToolbox.h>
#import <Foundation/Foundation.h>
#import <QuartzCore/QuartzCore.h>
@ -155,24 +153,6 @@ FBSDK_EXTERN OSStatus fbsdkdfl_SecItemAdd(CFDictionaryRef attributes, CFTypeRef
FBSDK_EXTERN OSStatus fbsdkdfl_SecItemCopyMatching(CFDictionaryRef query, CFTypeRef *result);
FBSDK_EXTERN OSStatus fbsdkdfl_SecItemDelete(CFDictionaryRef query);
#pragma mark - sqlite3 APIs
// These are local wrappers around the corresponding sqlite3 method from /usr/include/sqlite3.h
FBSDK_EXTERN SQLITE_API const char *fbsdkdfl_sqlite3_errmsg(sqlite3 *db);
FBSDK_EXTERN SQLITE_API int fbsdkdfl_sqlite3_prepare_v2(sqlite3 *db, const char *zSql, int nByte, sqlite3_stmt **ppStmt, const char **pzTail);
FBSDK_EXTERN SQLITE_API int fbsdkdfl_sqlite3_reset(sqlite3_stmt *pStmt);
FBSDK_EXTERN SQLITE_API int fbsdkdfl_sqlite3_finalize(sqlite3_stmt *pStmt);
FBSDK_EXTERN SQLITE_API int fbsdkdfl_sqlite3_open_v2(const char *filename, sqlite3 **ppDb, int flags, const char *zVfs);
FBSDK_EXTERN SQLITE_API int fbsdkdfl_sqlite3_exec(sqlite3 *db, const char *sql, int (*callback)(void *, int, char **, char **), void *arg, char **errmsg);
FBSDK_EXTERN SQLITE_API int fbsdkdfl_sqlite3_close(sqlite3 *db);
FBSDK_EXTERN SQLITE_API int fbsdkdfl_sqlite3_bind_double(sqlite3_stmt *stmt, int index, double value);
FBSDK_EXTERN SQLITE_API int fbsdkdfl_sqlite3_bind_int(sqlite3_stmt *stmt, int index, int value);
FBSDK_EXTERN SQLITE_API int fbsdkdfl_sqlite3_bind_text(sqlite3_stmt *stmt, int index, const char *value, int n, void(*callback)(void *));
FBSDK_EXTERN SQLITE_API int fbsdkdfl_sqlite3_step(sqlite3_stmt *stmt);
FBSDK_EXTERN SQLITE_API double fbsdkdfl_sqlite3_column_double(sqlite3_stmt *stmt, int iCol);
FBSDK_EXTERN SQLITE_API int fbsdkdfl_sqlite3_column_int(sqlite3_stmt *stmt, int iCol);
FBSDK_EXTERN SQLITE_API const unsigned char *fbsdkdfl_sqlite3_column_text(sqlite3_stmt *stmt, int iCol);
#pragma mark - Social Constants
FBSDK_EXTERN NSString *fbsdkdfl_SLServiceTypeFacebook(void);

View File

@ -42,7 +42,7 @@ typedef void (^FBSDKURLConnectionHandler)(FBSDKURLConnection *connection,
completionHandler:(FBSDKURLConnectionHandler)handler
NS_DESIGNATED_INITIALIZER;
@property (nonatomic, assign) id<FBSDKURLConnectionDelegate> delegate;
@property (nonatomic, weak) id<FBSDKURLConnectionDelegate> delegate;
- (void)cancel;
- (void)start;

View File

@ -27,7 +27,7 @@
delegate:(id<FBSDKWebDialogDelegate>)delegate;
@property (nonatomic, assign) BOOL deferVisibility;
@property (nonatomic, assign) id<FBSDKWebDialogDelegate> delegate;
@property (nonatomic, weak) id<FBSDKWebDialogDelegate> delegate;
@property (nonatomic, copy) NSString *name;
@property (nonatomic, copy) NSDictionary *parameters;

View File

@ -22,7 +22,7 @@
@interface FBSDKWebDialogView : UIView
@property (nonatomic, assign) id<FBSDKWebDialogViewDelegate> delegate;
@property (nonatomic, weak) id<FBSDKWebDialogViewDelegate> delegate;
- (void)loadURL:(NSURL *)URL;
- (void)stopLoading;

View File

@ -27,7 +27,6 @@
#import "FBSDKSettings.h"
static NSString *const g_frameworkPathTemplate = @"/System/Library/Frameworks/%@.framework/%@";
static NSString *const g_sqlitePath = @"/usr/lib/libsqlite3.dylib";
#pragma mark - Library and Symbol Loading
@ -234,117 +233,6 @@ OSStatus fbsdkdfl_SecItemDelete(CFDictionaryRef query)
return f(query);
}
#pragma mark - sqlite3 APIs
// sqlite3 is a dynamic library (not a framework) so its path is constructed differently
// than the way employed by the framework macros.
static void fbsdkdfl_load_sqlite3_once(void *context)
{
*(void **)context = fbsdkdfl_load_library_once([g_sqlitePath fileSystemRepresentation]);
}
_fbsdkdfl_handle_get_impl_(sqlite3)
#define _fbsdkdfl_sqlite3_get_f(SYMBOL) _fbsdkdfl_symbol_get_f(sqlite3, SYMBOL)
typedef SQLITE_API const char *(*sqlite3_errmsg_type)(sqlite3 *);
typedef SQLITE_API int (*sqlite3_prepare_v2_type)(sqlite3 *, const char *, int, sqlite3_stmt **, const char **);
typedef SQLITE_API int (*sqlite3_reset_type)(sqlite3_stmt *);
typedef SQLITE_API int (*sqlite3_finalize_type)(sqlite3_stmt *);
typedef SQLITE_API int (*sqlite3_open_v2_type)(const char *, sqlite3 **, int, const char *);
typedef SQLITE_API int (*sqlite3_exec_type)(sqlite3 *, const char *, int (*)(void *, int, char **, char **), void *, char **);
typedef SQLITE_API int (*sqlite3_close_type)(sqlite3 *);
typedef SQLITE_API int (*sqlite3_bind_double_type)(sqlite3_stmt *, int, double);
typedef SQLITE_API int (*sqlite3_bind_int_type)(sqlite3_stmt *, int, int);
typedef SQLITE_API int (*sqlite3_bind_text_type)(sqlite3_stmt *, int, const char *, int, void(*)(void *));
typedef SQLITE_API int (*sqlite3_step_type)(sqlite3_stmt *);
typedef SQLITE_API double (*sqlite3_column_double_type)(sqlite3_stmt *, int);
typedef SQLITE_API int (*sqlite3_column_int_type)(sqlite3_stmt *, int);
typedef SQLITE_API const unsigned char *(*sqlite3_column_text_type)(sqlite3_stmt *, int);
SQLITE_API const char *fbsdkdfl_sqlite3_errmsg(sqlite3 *db)
{
_fbsdkdfl_sqlite3_get_f(sqlite3_errmsg);
return f(db);
}
SQLITE_API int fbsdkdfl_sqlite3_prepare_v2(sqlite3 *db, const char *zSql, int nByte, sqlite3_stmt **ppStmt, const char **pzTail)
{
_fbsdkdfl_sqlite3_get_f(sqlite3_prepare_v2);
return f(db, zSql, nByte, ppStmt, pzTail);
}
SQLITE_API int fbsdkdfl_sqlite3_reset(sqlite3_stmt *pStmt)
{
_fbsdkdfl_sqlite3_get_f(sqlite3_reset);
return f(pStmt);
}
SQLITE_API int fbsdkdfl_sqlite3_finalize(sqlite3_stmt *pStmt)
{
_fbsdkdfl_sqlite3_get_f(sqlite3_finalize);
return f(pStmt);
}
SQLITE_API int fbsdkdfl_sqlite3_open_v2(const char *filename, sqlite3 **ppDb, int flags, const char *zVfs)
{
_fbsdkdfl_sqlite3_get_f(sqlite3_open_v2);
return f(filename, ppDb, flags, zVfs);
}
SQLITE_API int fbsdkdfl_sqlite3_exec(sqlite3 *db, const char *sql, int (*callback)(void *, int, char **, char **), void *arg, char **errmsg)
{
_fbsdkdfl_sqlite3_get_f(sqlite3_exec);
return f(db, sql, callback, arg, errmsg);
}
SQLITE_API int fbsdkdfl_sqlite3_close(sqlite3 *db)
{
_fbsdkdfl_sqlite3_get_f(sqlite3_close);
return f(db);
}
SQLITE_API int fbsdkdfl_sqlite3_bind_double(sqlite3_stmt *stmt, int index , double value)
{
_fbsdkdfl_sqlite3_get_f(sqlite3_bind_double);
return f(stmt, index, value);
}
SQLITE_API int fbsdkdfl_sqlite3_bind_int(sqlite3_stmt *stmt, int index, int value)
{
_fbsdkdfl_sqlite3_get_f(sqlite3_bind_int);
return f(stmt, index, value);
}
SQLITE_API int fbsdkdfl_sqlite3_bind_text(sqlite3_stmt *stmt, int index, const char *value, int n, void(*callback)(void *))
{
_fbsdkdfl_sqlite3_get_f(sqlite3_bind_text);
return f(stmt, index, value, n, callback);
}
SQLITE_API int fbsdkdfl_sqlite3_step(sqlite3_stmt *stmt)
{
_fbsdkdfl_sqlite3_get_f(sqlite3_step);
return f(stmt);
}
SQLITE_API double fbsdkdfl_sqlite3_column_double(sqlite3_stmt *stmt, int iCol)
{
_fbsdkdfl_sqlite3_get_f(sqlite3_column_double);
return f(stmt, iCol);
}
SQLITE_API int fbsdkdfl_sqlite3_column_int(sqlite3_stmt *stmt, int iCol)
{
_fbsdkdfl_sqlite3_get_f(sqlite3_column_int);
return f(stmt, iCol);
}
SQLITE_API const unsigned char *fbsdkdfl_sqlite3_column_text(sqlite3_stmt *stmt, int iCol)
{
_fbsdkdfl_sqlite3_get_f(sqlite3_column_text);
return f(stmt, iCol);
}
#pragma mark - Social Constants
_fbsdkdfl_load_framework_once_impl_(Social)

View File

@ -110,8 +110,7 @@
- (void)actionSheet:(UIActionSheet *)actionSheet didDismissWithButtonIndex:(NSInteger)buttonIndex
{
if (buttonIndex == 0) {
FBSDKLoginManager *login = [[FBSDKLoginManager alloc] init];
[login logOut];
[_loginManager logOut];
[self.delegate loginButtonDidLogOut:self];
}
}
@ -198,6 +197,26 @@
NSLocalizedStringWithDefaultValue(@"LoginButton.ConfirmLogOut", @"FacebookSDK", [FBSDKInternalUtility bundleForStrings],
@"Log Out",
@"The label for the FBSDKLoginButton action sheet to confirm logging out");
if ([UIAlertController class]) {
UIAlertController *alertController = [UIAlertController alertControllerWithTitle:title
message:nil
preferredStyle:UIAlertControllerStyleActionSheet];
UIAlertAction *cancel = [UIAlertAction actionWithTitle:cancelTitle
style:UIAlertActionStyleCancel
handler:nil];
UIAlertAction *logout = [UIAlertAction actionWithTitle:logOutTitle
style:UIAlertActionStyleDestructive
handler:^(UIAlertAction * _Nonnull action) {
[_loginManager logOut];
[self.delegate loginButtonDidLogOut:self];
}];
[alertController addAction:cancel];
[alertController addAction:logout];
UIViewController *topMostViewController = [FBSDKInternalUtility topMostViewController];
[topMostViewController presentViewController:alertController
animated:YES
completion:nil];
} else {
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
UIActionSheet *sheet = [[UIActionSheet alloc] initWithTitle:title
@ -207,6 +226,7 @@
otherButtonTitles:nil];
[sheet showInView:self];
#pragma clang diagnostic pop
}
} else {
if ([self.delegate respondsToSelector:@selector(loginButtonWillLogin:)]) {
if (![self.delegate loginButtonWillLogin:self]) {

View File

@ -40,7 +40,7 @@
@interface FBSDKLoginTooltipView : FBSDKTooltipView
/*! @abstract the delegate */
@property (nonatomic, assign) id<FBSDKLoginTooltipViewDelegate> delegate;
@property (nonatomic, weak) id<FBSDKLoginTooltipViewDelegate> delegate;
/*! @abstract if set to YES, the view will always be displayed and the delegate's
`loginTooltipView:shouldAppear:` will NOT be called. */

View File

@ -20,6 +20,18 @@
#import <FBSDKCoreKit/FBSDKCopying.h>
/*!
@typedef NS_ENUM(NSUInteger, FBSDKAppInviteDestination)
@abstract Specifies the privacy of a group.
*/
typedef NS_ENUM(NSUInteger, FBSDKAppInviteDestination)
{
/*! Deliver to Facebook. */
FBSDKAppInviteDestinationFacebook = 0,
/*! Deliver to Messenger. */
FBSDKAppInviteDestinationMessenger,
};
/*!
@abstract A model for app invite.
*/
@ -60,6 +72,13 @@
*/
@property (nonatomic, copy) NSString *promotionText;
/*!
@abstract Destination for the app invite.
@discussion This is optional and for declaring destination of the invite.
*/
@property FBSDKAppInviteDestination destination;
/*!
@abstract Compares the receiver to another app invite content.
@param content The other content

View File

@ -24,6 +24,7 @@
#define FBSDK_APP_INVITE_CONTENT_PREVIEW_IMAGE_KEY @"previewImage"
#define FBSDK_APP_INVITE_CONTENT_PROMO_CODE_KEY @"promoCode"
#define FBSDK_APP_INVITE_CONTENT_PROMO_TEXT_KEY @"promoText"
#define FBSDK_APP_INVITE_CONTENT_DESTINATION_KEY @"destination"
@implementation FBSDKAppInviteContent
@ -68,7 +69,8 @@
[FBSDKInternalUtility object:_appLinkURL isEqualToObject:content.appLinkURL] &&
[FBSDKInternalUtility object:_appInvitePreviewImageURL isEqualToObject:content.appInvitePreviewImageURL] &&
[FBSDKInternalUtility object:_promotionText isEqualToObject:content.promotionText] &&
[FBSDKInternalUtility object:_promotionCode isEqualToObject:content.promotionText]
[FBSDKInternalUtility object:_promotionCode isEqualToObject:content.promotionText] &&
_destination == content.destination
);
}
@ -88,6 +90,8 @@
FBSDK_APP_INVITE_CONTENT_PROMO_CODE_KEY];
_promotionText = [decoder decodeObjectOfClass:[NSString class] forKey:
FBSDK_APP_INVITE_CONTENT_PROMO_TEXT_KEY];
_destination = [decoder decodeIntegerForKey:
FBSDK_APP_INVITE_CONTENT_DESTINATION_KEY];
}
return self;
@ -99,7 +103,7 @@
[encoder encodeObject:_appInvitePreviewImageURL forKey:FBSDK_APP_INVITE_CONTENT_PREVIEW_IMAGE_KEY];
[encoder encodeObject:_promotionCode forKey:FBSDK_APP_INVITE_CONTENT_PROMO_CODE_KEY];
[encoder encodeObject:_promotionText forKey:FBSDK_APP_INVITE_CONTENT_PROMO_TEXT_KEY];
[encoder encodeInt:_destination forKey:FBSDK_APP_INVITE_CONTENT_DESTINATION_KEY];
}
#pragma mark - NSCopying
@ -111,6 +115,7 @@
copy->_appInvitePreviewImageURL = [_appInvitePreviewImageURL copy];
copy->_promotionText = [_promotionText copy];
copy->_promotionCode = [_promotionCode copy];
copy->_destination = _destination;
return copy;
}

View File

@ -83,6 +83,23 @@
[FBSDKInternalUtility dictionary:parameters setObject:self.content.appLinkURL forKey:@"app_link_url"];
[FBSDKInternalUtility dictionary:parameters setObject:self.content.appInvitePreviewImageURL forKey:@"preview_image_url"];
NSString *destination;
switch (self.content.destination) {
case FBSDKAppInviteDestinationMessenger:
destination = @"messenger";
break;
case FBSDKAppInviteDestinationFacebook:
destination = @"facebook";
break;
default:
destination = @"facebook";
break;
}
[FBSDKInternalUtility dictionary:parameters setObject:destination forKey:@"destination"];
if (self.content.promotionText) {
NSString *promotionCode = self.content.promotionCode ?: @"";
NSDictionary *deeplinkContext = @{@"promo_code" : promotionCode, @"promo_text" : self.content.promotionText};

View File

@ -413,6 +413,7 @@ static NSMutableArray *g_pendingFBSDKShareAPI;
videoSize:(unsigned long)[_fileHandle seekToEndOfFile]
parameters:parameters
delegate:self];
videoUploader.graphNode = self.graphNode;
[videoUploader start];
return YES;
} else if (videoURL) {
@ -429,6 +430,7 @@ static NSMutableArray *g_pendingFBSDKShareAPI;
videoSize:size
parameters:parameters
delegate:self];
videoUploader.graphNode = self.graphNode;
[videoUploader start];
} failureBlock:^(NSError *error) {
[_delegate sharer:self didFailWithError:error];

5
Pods/Firebase/.cocoapods.yml generated Executable file
View File

@ -0,0 +1,5 @@
try:
install:
pre:
- git clone https://github.com/firebase/quickstart-ios

View File

29
Pods/Firebase/CHANGELOG.md generated Executable file
View File

@ -0,0 +1,29 @@
# 3.4.0
* Updates for Firebase/AdMob, Firebase/Analytics, Firebase/AppIndexing, Firebase/Auth, Firebase/Crash, Firebase/DynamicLinks, Firebase/Invites, Firebase/Messaging, Firebase/RemoteConfig.
# 3.3.0
* Bugfixes for Firebase/Analytics, Firebase/Auth, Firebase/Database, Firebase/DynamicLinks, Firebase/Invites, Firebase/Storage.
# 3.2.1
* Bugfixes for Firebase/Crash.
# 3.2.0
* First public release of Firebase 3.x
# 3.0.0
* Firebase is a platform for mobile developers. It provides the tools and
infrastructure you need to develop, grow, and earn money from your app.
* In this release, Firebase expands to include several new products:
Firebase Analytics, Firebase Storage, Firebase Remote Config, Firebase Crash
Reporting, Firebase Dynamic Links, Firebase Auth, and Firebase Notifications.
* Several Existing Google products are now a part of Firebase: Google Cloud
Messaging, App Invites, and App Indexing.
* Firebase is now integrated with AdMob and Google AdWords.
* Launched a new website at https://firebase.google.com/, including a new
console, improved documentation, and updated product information.
* You can use Firebase Database via the 'Database' subspec on the Firebase pod.
Go to https://firebase.google.com/support/guides/firebase-ios for more
information about migrating.
You can find information about prior changes to the Firebase pod and Firebase
Database [here](https://www.firebase.com/docs/ios/changelog.html).

211
Pods/Firebase/NOTICES generated Executable file
View File

@ -0,0 +1,211 @@
Google LevelDB
Copyright (c) 2011 The LevelDB Authors. All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation andor other materials provided with the distribution.
Neither the name of Google Inc. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
--
Square Socket Rocket
Copyright 2012 Square Inc.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
--
APLevelDB
Created by Adam Preble on 12312.
Copyright (c) 2012 Adam Preble. All rights reserved.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, andor sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
--
sqlite3
2001 September 15
The author disclaims copyright to this source code. In place of
a legal notice, here is a blessing:
May you do good and not evil.
May you find forgiveness for yourself and forgive others.
May you share freely, never taking more than you give.
This header file defines the interface that the SQLite library
presents to client programs. If a C-function, structure, datatype,
or constant definition does not appear in this file, then it is
not a published API of SQLite, is subject to change without
notice, and should not be referenced by programs that use SQLite.
Some of the definitions that are in this file are marked as
"experimental". Experimental interfaces are normally new
features recently added to SQLite. We do not anticipate changes
to experimental interfaces but reserve the right to make minor changes
if experience from use "in the wild" suggest such changes are prudent.
The official C-language API documentation for SQLite is derived
from comments in this file. This file is the authoritative source
on how SQLite interfaces are suppose to operate.
The name of this file under configuration management is "sqlite.h.in".
The makefile makes some minor changes to this file (such as inserting
the version number) and changes its name to "sqlite3.h" as
part of the build process.
--
sysutsname.h
Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
This file contains Original Code andor Modifications of Original Code
as defined in and that are subject to the Apple Public Source License
Version 2.0 (the 'License'). You may not use this file except in
compliance with the License. The rights granted to you under the License
may not be used to create, or enable the creation or redistribution of,
unlawful or unlicensed copies of an Apple operating system, or to
circumvent, violate, or enable the circumvention or violation of, any
terms of an Apple operating system software license agreement.
Please obtain a copy of the License at
http://www.opensource.apple.com/apsl and read it before using this file.
The Original Code and all software distributed under the License are
distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
Please see the License for the specific language governing rights and
limitations under the License.
Copyright 1993,1995 NeXT Computer Inc. All Rights Reserved
Copyright (c) 1994 The Regents of the University of California. All rights reserved.
This code is derived from software contributed to Berkeley by
Chuck Karish of Mindcraft, Inc.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation andor other materials provided with the distribution.
3. All advertising materials mentioning features or use of this software
must display the following acknowledgement:
* This product includes software developed by the University of
* California, Berkeley and its contributors.
4. Neither the name of the University nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
--
GTMNSData+zlib.h
Copyright 2007-2008 Google Inc.
Licensed under the Apache License, Version 2.0 (the "License"); you may not
use this file except in compliance with the License. You may obtain a copy
of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
License for the specific language governing permissions and limitations under
the License.
--
GTMDefines.h
Copyright 2008 Google Inc.
Licensed under the Apache License, Version 2.0 (the "License"); you may not
use this file except in compliance with the License. You may obtain a copy
of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
License for the specific language governing permissions and limitations under
the License.
--
ProtocolBuffer
Copyright 2008 Cyrus Najmabadi
Copyright 2011 Google Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
--
GTMDefines.h
Copyright 2008 Google Inc.
Licensed under the Apache License, Version 2.0 (the "License"); you may not
use this file except in compliance with the License. You may obtain a copy
of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
License for the specific language governing permissions and limitations under
the License.
--

0
Pods/Firebase/README.md generated Normal file → Executable file
View File

View File

@ -5,7 +5,7 @@
#import "FIRUserPropertyNames.h"
/// The top level Firebase Analytics singleton that provides methods for logging events and setting
/// user properties. See <a href="http://goo.gl/C2PPSP">the developer guides</a> for general
/// user properties. See <a href="http://goo.gl/gz8SLz">the developer guides</a> for general
/// information on using Firebase Analytics in your apps.
@interface FIRAnalytics : NSObject
@ -44,7 +44,8 @@
+ (void)logEventWithName:(nonnull NSString *)name
parameters:(nullable NSDictionary<NSString *, NSObject *> *)parameters;
/// Sets a user property to a given value. Up to 25 user property names are supported.
/// Sets a user property to a given value. Up to 25 user property names are supported. Once set,
/// user property values persist throughout the app lifecycle and across sessions.
///
/// The following user property names are reserved and cannot be used:
/// <ul>

View File

@ -74,4 +74,14 @@
storageBucket:(NSString *)storageBucket
deepLinkURLScheme:(NSString *)deepLinkURLScheme;
/**
* Initializes a customized instance of FIROptions from the file at the given plist file path.
* For example,
* NSString *filePath =
* [[NSBundle mainBundle] pathForResource:@"GoogleService-Info" ofType:@"plist"];
* FIROptions *options = [[FIROptions alloc] initWithContentsOfFile:filePath];
* Returns nil if the plist file does not exist or is invalid.
*/
- (instancetype)initWithContentsOfFile:(NSString *)plistPath;
@end

14
Pods/FirebaseAuth/CHANGELOG.md generated Executable file
View File

@ -0,0 +1,14 @@
# 2016-07-18 -- v3.0.4
- Fixes a race condition bug that could crash the app with an exception from
NSURLSession on iOS 9.
# 2016-06-20 -- v3.0.3
- Adds documentation for all possible errors returned by each method.
- Improves error handling and messages for a variety of error conditions.
- Whether or not an user is considered anonymous is now consistent with other
platforms.
- A saved signed in user is now siloed between different Firebase projects
within the same app.
# 2016-05-18 -- v3.0.2
- Initial public release.

View File

@ -1,159 +0,0 @@
/** @file FIRAuthErrors.h
@brief Firebase Auth SDK
@copyright Copyright 2015 Google Inc.
@remarks Use of this SDK is subject to the Google APIs Terms of Service:
https://developers.google.com/terms/
*/
#import <Foundation/Foundation.h>
/** @var FIRAuthErrorDomain
@brief The Firebase Auth error domain.
*/
extern NSString *const FIRAuthErrorDomain;
/** @var FIRAuthErrorNameKey
@brief The name of the key for the "error_name" string in the NSError userinfo dictionary.
*/
extern NSString *const FIRAuthErrorNameKey;
/** @var FIRAuthErrorCode
@brief Error codes used by Firebase Auth.
*/
typedef NS_ENUM(NSInteger, FIRAuthErrorCode) {
/** @var FIRAuthErrorCodeInvalidCustomToken
@brief Indicates a validation error with the custom token.
*/
FIRAuthErrorCodeInvalidCustomToken = 17000,
/** @var FIRAuthErrorCodeCustomTokenMismatch
@brief Indicates the service account and the API key belong to different projects.
*/
FIRAuthErrorCodeCustomTokenMismatch = 17002,
/** @var FIRAuthErrorCodeInvalidCredential
@brief Indicates the IDP token or requestUri is invalid.
*/
FIRAuthErrorCodeInvalidCredential = 17004,
/** @var FIRAuthErrorCodeUserDisabled
@brief Indicates the user's account is disabled on the server side.
*/
FIRAuthErrorCodeUserDisabled = 17005,
/** @var FIRAuthErrorCodeOperationNotAllowed
@brief Indicates the administrator disabled sign in with the specified identity provider.
*/
FIRAuthErrorCodeOperationNotAllowed = 17006,
/** @var FIRAuthErrorCodeEmailAlreadyInUse
@brief Indicates the email used to attempt a sign up already exists.
*/
FIRAuthErrorCodeEmailAlreadyInUse = 17007,
/** @var FIRAuthErrorCodeInvalidEmail
@brief Indicates the email is invalid.
*/
FIRAuthErrorCodeInvalidEmail = 17008,
/** @var FIRAuthErrorCodeWrongPassword
@brief Indicates the user attempted sign in with a wrong password.
*/
FIRAuthErrorCodeWrongPassword = 17009,
/** @var FIRAuthErrorCodeTooManyRequests
@brief Indicates that too many requests were made to a serve method.
*/
FIRAuthErrorCodeTooManyRequests = 17010,
/** @var FIRAuthErrorCodeUserNotFound
@brief Indicates the user account was been found.
*/
FIRAuthErrorCodeUserNotFound = 17011,
/** @var FIRAuthErrrorCodeAccountExistsWithDifferentCredential
@brief Indicates account linking is needed.
*/
FIRAuthErrrorCodeAccountExistsWithDifferentCredential = 17012,
/** @var FIRAuthErrorCodeRequiresRecentLogin
@brief Indicates the user has attemped to change email or password more than 5 minutes after
signing in.
*/
FIRAuthErrorCodeRequiresRecentLogin = 17014,
/** @var FIRAuthErrorCodeProviderAlreadyLinked
@brief Indicates an attempt to link a provider to which we are already linked.
*/
FIRAuthErrorCodeProviderAlreadyLinked = 17015,
/** @var FIRAuthErrorCodeNoSuchProvider
@brief Indicates an attempt to unlink a provider that is not linked.
*/
FIRAuthErrorCodeNoSuchProvider = 17016,
/** @var FIRAuthErrorCodeInvalidUserToken
@brief Indicates user's saved auth credential is invalid, the user needs to sign in again.
*/
FIRAuthErrorCodeInvalidUserToken = 17017,
/** @var FIRAuthErrorCodeNetworkError
@brief Indicates a network error occurred (such as a timeout, interrupted connection, or
unreachable host.)
@remarks These types of errors are often recoverable with a retry.
The @c NSUnderlyingError field in the @c NSError.userInfo dictionary will contain the
error encountered.
*/
FIRAuthErrorCodeNetworkError = 17020,
/** @var FIRAuthErrorCodeUserTokenExpired
@brief Indicates the saved token has expired, for example, the user may have changed account
password on another device. The user needs to sign in again on this device.
*/
FIRAuthErrorCodeUserTokenExpired = 17021,
/** @var FIRAuthErrorCodeInvalidAPIKey
@brief Indicates an invalid API key was supplied in the request.
*/
FIRAuthErrorCodeInvalidAPIKey = 17023,
/** @var FIRAuthErrorCodeUserMismatch
@brief Indicates that user attempted to reauthenticate with a user other than the current
user.
*/
FIRAuthErrorCodeUserMismatch = 17024,
/** @var FIRAuthErrorCodeCredentialAlreadyInUse
@brief Indicates an attempt to link with a credential that has already been linked with a
different Firebase account.
*/
FIRAuthErrorCodeCredentialAlreadyInUse = 17025,
/** @var FIRAuthErrorCodeWeakPassword
@brief Indicates an attempt to set a password that is considered too weak.
@remarks The @c NSLocalizedFailureReasonErrorKey field in the @c NSError.userInfo dictionary
will contain more detailed explanation that can be shown to the user.
*/
FIRAuthErrorCodeWeakPassword = 17026,
/** @var FIRAuthErrorCodeAppNotAuthorized
@brief Indicates the App is not authorized to use Firebase Authentication with the
provided API Key.
*/
FIRAuthErrorCodeAppNotAuthorized = 17028,
/** @var FIRAuthErrorCodeKeychainError
@brief Indicated an error occurred for accessing the keychain.
@remarks The @c NSLocalizedFailureReasonErrorKey field in the @c NSError.userInfo dictionary
will contain more information about the error encountered.
*/
FIRAuthErrorCodeKeychainError = 17995,
/** @var FIRAuthErrorCodeInternalError
@brief Indicates an internal error occurred.
@remarks The @c NSUnderlyingError field in the @c NSError.userInfo dictionary will contain the
error encountered.
*/
FIRAuthErrorCodeInternalError = 17999,
};

View File

@ -103,6 +103,9 @@ typedef void (^FIRSendPasswordResetCallback)(NSError *_Nullable error);
@param completion Optionally; a block which is invoked when the list of providers for the
specified email address is ready or an error was encountered. Invoked asynchronously on the
main thread in the future.
@remarks Possible error codes:
- @c FIRAuthErrorCodeInvalidEmail - Indicates the email address is malformed.
- See @c FIRAuthErrors for a list of error codes that are common to all API methods.
*/
- (void)fetchProvidersForEmail:(NSString *)email
completion:(nullable FIRProviderQueryCallback)completion;
@ -113,6 +116,13 @@ typedef void (^FIRSendPasswordResetCallback)(NSError *_Nullable error);
@param password The user's password.
@param completion Optionally; a block which is invoked when the sign in flow finishes, or is
canceled. Invoked asynchronously on the main thread in the future.
@remarks Possible error codes:
- @c FIRAuthErrorCodeOperationNotAllowed Indicates that email and password accounts are not
enabled. Enable them in the Auth section of the Firebase console.
- @c FIRAuthErrorCodeUserDisabled Indicates the user's account is disabled.
- @c FIRAuthErrorCodeWrongPassword Indicates the user attempted sign in with an incorrect
password.
- See @c FIRAuthErrors for a list of error codes that are common to all API methods.
*/
- (void)signInWithEmail:(NSString *)email
password:(NSString *)password
@ -122,8 +132,25 @@ typedef void (^FIRSendPasswordResetCallback)(NSError *_Nullable error);
@brief Asynchronously signs in to Firebase with the given 3rd-party credentials (e.g. a Facebook
login Access Token, a Google ID Token/Access Token pair, etc.)
@param credential The credential supplied by the IdP.
@param completion Optionally; a block which is invoked when the sign in finishes, or is
@param completion Optionally; a block which is invoked when the sign in flow finishes, or is
canceled. Invoked asynchronously on the main thread in the future.
@remarks Possible error codes:
- @c FIRAuthErrorCodeInvalidCredential Indicates the supplied credential is invalid. This
could happen if it has expired or it is malformed.
- @c FIRAuthErrorCodeOperationNotAllowed Indicates that accounts with the identity provider
represented by the credential are not enabled. Enable them in the Auth section of the
Firebase console.
- @c FIRAuthErrorCodeEmailAlreadyInUse Indicates the email asserted by the credential
(e.g. the email in a Facebook access token) is already in use by an existing account,
that cannot be authenticated with this sign-in method. Call fetchProvidersForEmail for
this users email and then prompt them to sign in with any of the sign-in providers
returned. This error will only be thrown if the One account per email address
setting is enabled in the Firebase console, under Auth settings. - Please note that the
error code raised in this specific situation may not be the same on Web and Android.
- @c FIRAuthErrorCodeUserDisabled Indicates the user's account is disabled.
- @c FIRAuthErrorCodeWrongPassword Indicates the user attempted sign in with a incorrect
password, if credential is of the type EmailPasswordAuthCredential.
- See @c FIRAuthErrors for a list of error codes that are common to all API methods.
*/
- (void)signInWithCredential:(FIRAuthCredential *)credential
completion:(nullable FIRAuthResultCallback)completion;
@ -134,6 +161,10 @@ typedef void (^FIRSendPasswordResetCallback)(NSError *_Nullable error);
canceled. Invoked asynchronously on the main thread in the future.
@remarks If there is already an anonymous user signed in, that user will be returned instead.
If there is any other existing user signed in, that user will be signed out.
@remarks Possible error codes:
- @c FIRAuthErrorCodeOperationNotAllowed Indicates that anonymous accounts are not enabled.
Enable them in the Auth section of the Firebase console.
- See @c FIRAuthErrors for a list of error codes that are common to all API methods.
*/
- (void)signInAnonymouslyWithCompletion:(nullable FIRAuthResultCallback)completion;
@ -142,6 +173,11 @@ typedef void (^FIRSendPasswordResetCallback)(NSError *_Nullable error);
@param token A self-signed custom auth token.
@param completion Optionally; a block which is invoked when the sign in finishes, or is
canceled. Invoked asynchronously on the main thread in the future.
@remarks Possible error codes:
- @c FIRAuthErrorCodeInvalidCustomToken Indicates a validation error with the custom token.
- @c FIRAuthErrorCodeCustomTokenMismatch Indicates the service account and the API key
belong to different projects.
- See @c FIRAuthErrors for a list of error codes that are common to all API methods.
*/
- (void)signInWithCustomToken:(NSString *)token
completion:(nullable FIRAuthResultCallback)completion;
@ -150,8 +186,19 @@ typedef void (^FIRSendPasswordResetCallback)(NSError *_Nullable error);
@brief Creates and, on success, signs in a user with the given email address and password.
@param email The user's email address.
@param password The user's desired password.
@param completion Optionally; a block which is invoked when the sign up finishes, or is
@param completion Optionally; a block which is invoked when the sign up flow finishes, or is
canceled. Invoked asynchronously on the main thread in the future.
@remarks Possible error codes:
- @c FIRAuthErrorCodeInvalidEmail - Indicates the email address is malformed.
- @c FIRAuthErrorCodeEmailAlreadyInUse Indicates the email used to attempt sign up
already exists. Call fetchProvidersForEmail to check which sign-in mechanisms the user
used, and prompt the user to sign in with one of those.
- @c FIRAuthErrorCodeOperationNotAllowed Indicates that email and password accounts are not
enabled. Enable them in the Auth section of the Firebase console.
- @c FIRAuthErrorCodeWeakPassword Indicates an attempt to set a password that is considered
too weak. The NSLocalizedFailureReasonErrorKey field in the NSError.userInfo dictionary
object will contain more detailed explanation that can be shown to the user.
- See @c FIRAuthErrors for a list of error codes that are common to all API methods.
*/
- (void)createUserWithEmail:(NSString *)email
password:(NSString *)password
@ -162,6 +209,8 @@ typedef void (^FIRSendPasswordResetCallback)(NSError *_Nullable error);
@param email The email address of the user.
@param completion Optionally; a block which is invoked when the request finishes. Invoked
asynchronously on the main thread in the future.
@remarks Possible error codes:
- See @c FIRAuthErrors for a list of error codes that are common to all API methods.
*/
- (void)sendPasswordResetWithEmail:(NSString *)email
completion:(nullable FIRSendPasswordResetCallback)completion;
@ -171,6 +220,10 @@ typedef void (^FIRSendPasswordResetCallback)(NSError *_Nullable error);
@param error Optionally; if an error occurs, upon return contains an NSError object that
describes the problem; is nil otherwise.
@return @YES when the sign out request was successful. @NO otherwise.
@remarks Possible error codes:
- @c FIRAuthErrorCodeKeychainError Indicates an error occurred when accessing the keychain.
The @c NSLocalizedFailureReasonErrorKey field in the @c NSError.userInfo dictionary
will contain more information about the error encountered.
*/
- (BOOL)signOut:(NSError *_Nullable *_Nullable)error;

View File

@ -0,0 +1,166 @@
/** @file FIRAuthErrors.h
@brief Firebase Auth SDK
@copyright Copyright 2015 Google Inc.
@remarks Use of this SDK is subject to the Google APIs Terms of Service:
https://developers.google.com/terms/
*/
#import <Foundation/Foundation.h>
/** @class FIRAuthErrors
@remarks Error Codes common to all API Methods:
- FIRAuthErrorCodeNetworkError - Indicates a network error occurred during the operation.
- FIRAuthErrorCodeUserNotFound - Indicates the user account was not found. This could happen
if the user account has been deleted.
- FIRAuthErrorCodeUserTokenExpired - Indicates the current users token has expired, for
example, the user may have changed account password on another device. You must prompt
the user to sign in again on this device.
- FIRAuthErrorCodeTooManyRequests - Indicates that the request has been blocked after an
abnormal number of requests have been made from the caller device to the Firebase Auth
servers. Retry again after some time.
- FIRAuthErrorCodeInvalidAPIKey - Indicates the application has been configured with an
invalid API key.
- FIRAuthErrorCodeAppNotAuthorized - Indicates the App is not authorized to use Firebase
Authentication with the provided API Key. Go to the Google API Console and check under
the credentials tab that the API key you are using has your applications bundle ID
whitelisted.
- FIRAuthErrorCodeKeychainError - Indicates an error occurred while accessing the keychain.
The NSLocalizedFailureReasonErrorKey and NSUnderlyingErrorKey fields in the
NSError.userInfo dictionary will contain more information about the error encountered.
- FIRAuthErrorCodeInternalError - Indicates an internal error occurred. Please report the
error back to us with the entire NSError object.
@remarks Common error codes for FIRUser operations:
- FIRAuthErrorCodeInvalidUserToken - Indicates that the signed-in user's refresh token,
that holds session information, is invalid. You must prompt the user to sign in again
on this device.
- FIRAuthErrorCodeUserDisabled - Indicates the user's account is disabled and can no longer
be used until enabled again from within the Users panel in the Firebase console.
*/
@interface FIRAuthErrors
/** @var FIRAuthErrorDomain
@brief The Firebase Auth error domain.
*/
extern NSString *const FIRAuthErrorDomain;
/** @var FIRAuthErrorNameKey
@brief The name of the key for the "error_name" string in the NSError userinfo dictionary.
*/
extern NSString *const FIRAuthErrorNameKey;
/** @enum FIRAuthErrorCode
@brief Error codes used by Firebase Auth.
*/
typedef NS_ENUM(NSInteger, FIRAuthErrorCode) {
/** Indicates a validation error with the custom token.
*/
FIRAuthErrorCodeInvalidCustomToken = 17000,
/** Indicates the service account and the API key belong to different projects.
*/
FIRAuthErrorCodeCustomTokenMismatch = 17002,
/** Indicates the IDP token or requestUri is invalid.
*/
FIRAuthErrorCodeInvalidCredential = 17004,
/** Indicates the user's account is disabled on the server.
*/
FIRAuthErrorCodeUserDisabled = 17005,
/** Indicates the administrator disabled sign in with the specified identity provider.
*/
FIRAuthErrorCodeOperationNotAllowed = 17006,
/** Indicates the email used to attempt a sign up is already in use.
*/
FIRAuthErrorCodeEmailAlreadyInUse = 17007,
/** Indicates the email is invalid.
*/
FIRAuthErrorCodeInvalidEmail = 17008,
/** Indicates the user attempted sign in with a wrong password.
*/
FIRAuthErrorCodeWrongPassword = 17009,
/** Indicates that too many requests were made to a server method.
*/
FIRAuthErrorCodeTooManyRequests = 17010,
/** Indicates the user account was not found.
*/
FIRAuthErrorCodeUserNotFound = 17011,
/** Indicates account linking is required.
*/
FIRAuthErrorCodeAccountExistsWithDifferentCredential = 17012,
/** Same enum as @c FIRAuthErrorCodeAccountExistsWithDifferentCredential ,
but with incorrect spelling. Only exists for backwards compatiblity.
*/
FIRAuthErrrorCodeAccountExistsWithDifferentCredential = 17012,
/** Indicates the user has attemped to change email or password more than 5 minutes after
signing in.
*/
FIRAuthErrorCodeRequiresRecentLogin = 17014,
/** Indicates an attempt to link a provider to which the account is already linked.
*/
FIRAuthErrorCodeProviderAlreadyLinked = 17015,
/** Indicates an attempt to unlink a provider that is not linked.
*/
FIRAuthErrorCodeNoSuchProvider = 17016,
/** Indicates user's saved auth credential is invalid, the user needs to sign in again.
*/
FIRAuthErrorCodeInvalidUserToken = 17017,
/** Indicates a network error occurred (such as a timeout, interrupted connection, or
unreachable host). These types of errors are often recoverable with a retry. The @c
NSUnderlyingError field in the @c NSError.userInfo dictionary will contain the error
encountered.
*/
FIRAuthErrorCodeNetworkError = 17020,
/** Indicates the saved token has expired, for example, the user may have changed account
password on another device. The user needs to sign in again on the device that made this
request.
*/
FIRAuthErrorCodeUserTokenExpired = 17021,
/** Indicates an invalid API key was supplied in the request.
*/
FIRAuthErrorCodeInvalidAPIKey = 17023,
/** Indicates that an attempt was made to reauthenticate with a user which is not the current
user.
*/
FIRAuthErrorCodeUserMismatch = 17024,
/** Indicates an attempt to link with a credential that has already been linked with a
different Firebase account
*/
FIRAuthErrorCodeCredentialAlreadyInUse = 17025,
/** Indicates an attempt to set a password that is considered too weak.
*/
FIRAuthErrorCodeWeakPassword = 17026,
/** Indicates the App is not authorized to use Firebase Authentication with the
provided API Key.
*/
FIRAuthErrorCodeAppNotAuthorized = 17028,
/** Indicates an error occurred while attempting to access the keychain.
*/
FIRAuthErrorCodeKeychainError = 17995,
/** Indicates an internal error occurred.
*/
FIRAuthErrorCodeInternalError = 17999,
};
@end

View File

@ -79,9 +79,15 @@ typedef void (^FIRSendEmailVerificationCallback)(NSError *_Nullable error);
@param email The email address for the user.
@param completion Optionally; the block invoked when the user profile change has finished.
Invoked asynchronously on the main thread in the future.
@remarks May fail with a @c FIRAuthErrorCodeCredentialTooOld error code. In this case you should
call @c FIRUser.reauthenticateWithCredential:completion: before re-invoking
@c FIRUser.updateEmail:completion:.
@remarks Possible error codes:
- @c FIRAuthErrorCodeEmailAlreadyInUse - Indicates the email is already in use by another
account.
- @c FIRAuthErrorCodeInvalidEmail - Indicates the email address is malformed.
- @c FIRAuthErrorCodeRequiresRecentLogin - Updating a users email is a security sensitive
operation that requires a recent login from the user. This error indicates the user has
not signed in recently enough. To resolve, reauthenticate the user by invoking
reauthenticateWithCredential:completion: on FIRUser.
- See @c FIRAuthErrors for a list of error codes that are common to all FIRUser operations.
*/
- (void)updateEmail:(NSString *)email completion:(nullable FIRUserProfileChangeCallback)completion;
@ -90,9 +96,17 @@ typedef void (^FIRSendEmailVerificationCallback)(NSError *_Nullable error);
@param password The new password for the user.
@param completion Optionally; the block invoked when the user profile change has finished.
Invoked asynchronously on the main thread in the future.
@remarks May fail with a @c FIRAuthErrorCodeCredentialTooOld error code. In this case you should
call @c FIRUser.reauthenticateWithCredential:completion: before re-invoking
@c FIRUser.updateEmail:completion:.
@remarks Possible error codes:
- @c FIRAuthErrorCodeOperationNotAllowed - Indicates the administrator disabled sign in with
the specified identity provider.
- @c FIRAuthErrorCodeRequiresRecentLogin - Updating a users password is a security
sensitive operation that requires a recent login from the user. This error indicates the
user has not signed in recently enough. To resolve, reauthenticate the user by invoking
reauthenticateWithCredential:completion: on FIRUser.
- @c FIRAuthErrorCodeWeakPassword - Indicates an attempt to set a password that is
considered too weak. The NSLocalizedFailureReasonErrorKey field in the NSError.userInfo
dictionary object will contain more detailed explanation that can be shown to the user.
- See @c FIRAuthErrors for a list of error codes that are common to all FIRUser operations.
*/
- (void)updatePassword:(NSString *)password
completion:(nullable FIRUserProfileChangeCallback)completion;
@ -112,6 +126,8 @@ typedef void (^FIRSendEmailVerificationCallback)(NSError *_Nullable error);
@remarks May fail with a @c FIRAuthErrorCodeCredentialTooOld error code. In this case you should
call @c FIRUser.reauthenticateWithCredential:completion: before re-invoking
@c FIRUser.updateEmail:completion:.
@remarks Possible error codes:
- See @c FIRAuthErrors for a list of error codes that are common to all API methods.
*/
- (void)reloadWithCompletion:(nullable FIRUserProfileChangeCallback)completion;
@ -125,6 +141,25 @@ typedef void (^FIRSendEmailVerificationCallback)(NSError *_Nullable error);
@remarks If the user associated with the supplied credential is different from the current user,
or if the validation of the supplied credentials fails; an error is returned and the current
user remains signed in.
@remarks Possible error codes:
- @c FIRAuthErrorCodeInvalidCredential Indicates the supplied credential is invalid. This
could happen if it has expired or it is malformed.
- @c FIRAuthErrorCodeOperationNotAllowed Indicates that accounts with the identity provider
represented by the credential are not enabled. Enable them in the Auth section of the
Firebase console.
- @c FIRAuthErrorCodeEmailAlreadyInUse Indicates the email asserted by the credential
(e.g. the email in a Facebook access token) is already in use by an existing account,
that cannot be authenticated with this method. Call fetchProvidersForEmail for
this users email and then prompt them to sign in with any of the sign-in providers
returned. This error will only be thrown if the One account per email address
setting is enabled in the Firebase console, under Auth settings. - Please note that the
error code raised in this specific situation may not be the same on Web and Android.
- @c FIRAuthErrorCodeUserDisabled Indicates the user's account is disabled.
- @c FIRAuthErrorCodeWrongPassword Indicates the user attempted reauthentication with an
incorrect password, if credential is of the type EmailPasswordAuthCredential.
- @c FIRAuthErrorCodeUserMismatch Indicates that an attempt was made to reauthenticate with
a user which is not the current user.
- See @c FIRAuthErrors for a list of error codes that are common to all API methods.
*/
- (void)reauthenticateWithCredential:(FIRAuthCredential *)credential
completion:(nullable FIRUserProfileChangeCallback)completion;
@ -133,6 +168,8 @@ typedef void (^FIRSendEmailVerificationCallback)(NSError *_Nullable error);
@brief Retrieves the Firebase authentication token, possibly refreshing it if it has expired.
@param completion Optionally; the block invoked when the token is available. Invoked
asynchronously on the main thread in the future.
@remarks Possible error codes:
- See @c FIRAuthErrors for a list of error codes that are common to all API methods.
*/
- (void)getTokenWithCompletion:(nullable FIRAuthTokenCallback)completion;
@ -144,6 +181,8 @@ typedef void (^FIRSendEmailVerificationCallback)(NSError *_Nullable error);
asynchronously on the main thread in the future.
@remarks The authentication token will be refreshed (by making a network request) if it has
expired, or if @c forceRefresh is YES.
@remarks Possible error codes:
- See @c FIRAuthErrors for a list of error codes that are common to all API methods.
*/
- (void)getTokenForcingRefresh:(BOOL)forceRefresh
completion:(nullable FIRAuthTokenCallback)completion;
@ -153,6 +192,17 @@ typedef void (^FIRSendEmailVerificationCallback)(NSError *_Nullable error);
@param credential The credential for the identity provider.
@param completion Optionally; the block invoked when the unlinking is complete, or fails.
Invoked asynchronously on the main thread in the future.
@remarks Possible error codes:
- @c FIRAuthErrorCodeProviderAlreadyLinked - Indicates an attempt to link a provider of a
type already linked to this account.
- @c FIRAuthErrorCodeCredentialAlreadyInUse - Indicates an attempt to link with a credential
that has already been linked with a different Firebase account.
- @c FIRAuthErrorCodeOperationNotAllowed - Indicates that accounts with the identity
provider represented by the credential are not enabled. Enable them in the Auth section
of the Firebase console.
- This method may also return error codes associated with updateEmail:completion: and
updatePassword:completion: on FIRUser.
- See @c FIRAuthErrors for a list of error codes that are common to all FIRUser operations.
*/
- (void)linkWithCredential:(FIRAuthCredential *)credential
completion:(nullable FIRAuthResultCallback)completion;
@ -162,6 +212,14 @@ typedef void (^FIRSendEmailVerificationCallback)(NSError *_Nullable error);
@param provider The provider ID of the provider to unlink.
@param completion Optionally; the block invoked when the unlinking is complete, or fails.
Invoked asynchronously on the main thread in the future.
@remarks Possible error codes:
- @c FIRAuthErrorCodeNoSuchProvider - Indicates an attempt to unlink a provider that is not
linked to the account.
- @c FIRAuthErrorCodeRequiresRecentLogin - Updating email is a security sensitive operation
that requires a recent login from the user. This error indicates the user has not signed
in recently enough. To resolve, reauthenticate the user by invoking
reauthenticateWithCredential:completion: on FIRUser.
- See @c FIRAuthErrors for a list of error codes that are common to all FIRUser operations.
*/
- (void)unlinkFromProvider:(NSString *)provider
completion:(nullable FIRAuthResultCallback)completion;
@ -170,6 +228,9 @@ typedef void (^FIRSendEmailVerificationCallback)(NSError *_Nullable error);
@brief Initiates email verification for the user.
@param completion Optionally; the block invoked when the request to send an email verification
is complete, or fails. Invoked asynchronously on the main thread in the future.
@remarks Possible error codes:
- @c FIRAuthErrorCodeUserNotFound - Indicates the user account was not found.
- See @c FIRAuthErrors for a list of error codes that are common to all FIRUser operations.
*/
- (void)sendEmailVerificationWithCompletion:(nullable FIRSendEmailVerificationCallback)completion;
@ -177,6 +238,12 @@ typedef void (^FIRSendEmailVerificationCallback)(NSError *_Nullable error);
@brief Deletes the user account (also signs out the user, if this was the current user).
@param completion Optionally; the block invoked when the request to delete the account is
complete, or fails. Invoked asynchronously on the main thread in the future.
@remarks Possible error codes:
- @c FIRAuthErrorCodeRequiresRecentLogin - Updating email is a security sensitive operation
that requires a recent login from the user. This error indicates the user has not signed
in recently enough. To resolve, reauthenticate the user by invoking
reauthenticateWithCredential:completion: on FIRUser.
- See @c FIRAuthErrors for a list of error codes that are common to all FIRUser operations.
*/
- (void)deleteWithCompletion:(nullable FIRUserProfileChangeCallback)completion;

View File

@ -2,7 +2,6 @@ framework module FirebaseAuth {
umbrella header "FirebaseAuth.h"
export *
module * {export * }
header "FIRAuth.h"
header "FIRAuthCredential.h"

0
Pods/FirebaseAuth/README.md generated Normal file → Executable file
View File

View File

@ -47,7 +47,7 @@ NS_ASSUME_NONNULL_BEGIN
/** @name Navigating and inspecting a snapshot */
/**
* Get a FIRDataSnapshot for the location at the specified relative path.
* Gets a FIRDataSnapshot for the location at the specified relative path.
* The relative path can either be a simple child key (e.g. 'fred')
* or a deeper slash-separated path (e.g. 'fred/name/first'). If the child
* location has no data, an empty FIRDataSnapshot is returned.
@ -62,7 +62,7 @@ NS_ASSUME_NONNULL_BEGIN
* Return YES if the specified child exists.
*
* @param childPathString A relative path to the location of a potential child.
* @return YES if data exists at the specified childPathString, else false.
* @return YES if data exists at the specified childPathString, else NO.
*/
- (BOOL) hasChild:(NSString *)childPathString;
@ -78,7 +78,7 @@ NS_ASSUME_NONNULL_BEGIN
/**
* Return YES if the DataSnapshot contains a non-null value.
*
* @return YES if this snapshot contains a non-null value, otherwise NO.
* @return YES if this snapshot contains a non-null value, else NO.
*/
- (BOOL) exists;
@ -111,7 +111,7 @@ NS_ASSUME_NONNULL_BEGIN
/**
* Get the number of children for this DataSnapshot.
* Gets the number of children for this DataSnapshot.
*
* @return An integer indicating the number of children.
*/
@ -119,7 +119,7 @@ NS_ASSUME_NONNULL_BEGIN
/**
* Get a FIRDatabaseReference for the location that this data came from
* Gets a FIRDatabaseReference for the location that this data came from
*
* @return A FIRDatabaseReference instance for the location of this data
*/

View File

@ -44,7 +44,7 @@ typedef NSUInteger FIRDatabaseHandle;
@interface FIRDatabaseQuery : NSObject
/** @name Attaching observers to read data */
/** @name Attach observers to read data */
/**
* observeEventType:withBlock: is used to listen for data changes at a particular location.
@ -307,7 +307,7 @@ typedef NSUInteger FIRDatabaseHandle;
/**
* Get a FIRDatabaseReference for the location of this query.
* Gets a FIRDatabaseReference for the location of this query.
*
* @return A FIRDatabaseReference for the location of this query.
*/

View File

@ -54,7 +54,7 @@ NS_ASSUME_NONNULL_BEGIN
/** @name Getting references to children locations */
/**
* Get a FIRDatabaseReference for the location at the specified relative path.
* Gets a FIRDatabaseReference for the location at the specified relative path.
* The relative path can either be a simple child key (e.g. 'fred') or a
* deeper slash-separated path (e.g. 'fred/name/first').
*
@ -83,7 +83,7 @@ NS_ASSUME_NONNULL_BEGIN
/** @name Writing data */
/*! Write data to this Firebase Database location.
/** Write data to this Firebase Database location.
This will overwrite any data at this location and all child locations.
@ -161,7 +161,7 @@ is meant to be preserved, you should use setValue:andPriority: instead.
- (void) removeValueWithCompletionBlock:(void (^)(NSError *__nullable error, FIRDatabaseReference * ref))block;
/**
* Set a priority for the data at this Firebase Database location.
* Sets a priority for the data at this Firebase Database location.
* Priorities can be used to provide a custom ordering for the children at a location
* (if no priorities are specified, the children are ordered by key).
*
@ -187,7 +187,7 @@ is meant to be preserved, you should use setValue:andPriority: instead.
/**
* The same as setPriority: with a block block that is called once the priority has
* The same as setPriority: with a block that is called once the priority has
* been committed to the Firebase Database servers.
*
* @param priority The priority to set at the specified location.
@ -196,7 +196,7 @@ is meant to be preserved, you should use setValue:andPriority: instead.
- (void) setPriority:(nullable id)priority withCompletionBlock:(void (^)(NSError *__nullable error, FIRDatabaseReference * ref))block;
/**
* Update changes the values at the specified paths in the dictionary without overwriting other
* Updates the values at the specified paths in the dictionary without overwriting other
* keys at this location.
*
* @param values A dictionary of the keys to change and their new values
@ -204,7 +204,7 @@ is meant to be preserved, you should use setValue:andPriority: instead.
- (void) updateChildValues:(NSDictionary *)values;
/**
* The same as update: with a block block that is called once the update has been committed to the
* The same as update: with a block that is called once the update has been committed to the
* Firebase Database servers
*
* @param values A dictionary of the keys to change and their new values
@ -343,7 +343,7 @@ is meant to be preserved, you should use setValue:andPriority: instead.
/**
* Calling removeAllObservers does not remove any observers at child references.
* Removes all observers at the current reference, but does not remove any observers at child references.
* removeAllObservers must be called again for each child reference where a listener was established to remove the observers.
*/
- (void) removeAllObservers;
@ -632,7 +632,7 @@ is meant to be preserved, you should use setValue:andPriority: instead.
* If, when the operation reaches the server, it turns out that this client had stale data, your block will be run
* again with the latest data from the server.
*
* When your block is run, you may decide to abort the transaction by return [FIRTransactionResult abort].
* When your block is run, you may decide to abort the transaction by returning [FIRTransactionResult abort].
*
* @param block This block receives the current data at this location and must return an instance of FIRTransactionResult
*/
@ -647,7 +647,7 @@ is meant to be preserved, you should use setValue:andPriority: instead.
* If, when the operation reaches the server, it turns out that this client had stale data, your block will be run
* again with the latest data from the server.
*
* When your block is run, you may decide to abort the transaction by return [FIRTransactionResult abort].
* When your block is run, you may decide to abort the transaction by returning [FIRTransactionResult abort].
*
* @param block This block receives the current data at this location and must return an instance of FIRTransactionResult
* @param completionBlock This block will be triggered once the transaction is complete, whether it was successful or not. It will indicate if there was an error, whether or not the data was committed, and what the current value of the data at this location is.
@ -687,7 +687,7 @@ is meant to be preserved, you should use setValue:andPriority: instead.
/** @name Properties */
/**
* Get a FIRDatabaseReference for the parent location.
* Gets a FIRDatabaseReference for the parent location.
* If this instance refers to the root of your Firebase Database, it has no parent,
* and therefore parent( ) will return null.
*
@ -697,7 +697,7 @@ is meant to be preserved, you should use setValue:andPriority: instead.
/**
* Get a FIRDatabaseReference for the root location
* Gets a FIRDatabaseReference for the root location
*
* @return A new FIRDatabaseReference to root location.
*/
@ -705,7 +705,7 @@ is meant to be preserved, you should use setValue:andPriority: instead.
/**
* Gets last token in a Firebase Database location (e.g. 'fred' in https://SampleChat.firebaseIO-demo.com/users/fred)
* Gets the last token in a Firebase Database location (e.g. 'fred' in https://SampleChat.firebaseIO-demo.com/users/fred)
*
* @return The key of the location this reference points to.
*/

View File

@ -82,7 +82,7 @@ NS_ASSUME_NONNULL_BEGIN
/**
* To modify the data contained by this instance of FIRMutableData, set this to any of the native types support by Firebase Database:
* To modify the data contained by this instance of FIRMutableData, set this to any of the native types supported by Firebase Database:
*
* * NSNumber (includes BOOL)
* * NSDictionary
@ -90,7 +90,7 @@ NS_ASSUME_NONNULL_BEGIN
* * NSString
* * nil / NSNull to remove the data
*
* Note that setting the value will override the priority at this location.
* Note that setting this value will override the priority at this location.
*
* @return The current data at this location as a native object
*/

View File

@ -3,4 +3,11 @@ framework module FirebaseDatabase {
export *
module * { export * }
link framework "CFNetwork"
link framework "Security"
link framework "SystemConfiguration"
link "c++"
link "icucore"
}

View File

@ -1,21 +0,0 @@
# 2016-05-16 -- v1.0.6
- Fix CocoaPod linter issues for InstanceID pod.
# 2016-05-13 -- v1.0.5
- Fix Authorization errors for InstanceID tokens.
# 2016-05-11 -- v1.0.4
- Reduce wait for InstanceID token during parallel requests.
# 2016-04-18 -- v1.0.3
- Change flag to disable swizzling to *FirebaseAppDelegateProxyEnabled*.
- Fix incessant Keychain errors while accessing InstanceID.
- Fix max retries for fetching IID token.
# 2016-04-18 -- v1.0.2
- Register for remote notifications on iOS8+ in the SDK itself.

View File

@ -1,10 +0,0 @@
# InstanceID SDK for iOS
Instance ID provides a unique ID per instance of your apps and also provides a
mechanism to authenticate and authorize actions, like sending messages via
Google Cloud Messaging (GCM).
Please visit [our developer
site](https://developers.google.com/instance-id/) for integration instructions,
documentation, support information, and terms of service.

View File

@ -9,6 +9,8 @@
#import <Foundation/Foundation.h>
#import "FIRStorageConstants.h"
NS_ASSUME_NONNULL_BEGIN
@class FIRStorageMetadata;
@ -47,6 +49,11 @@ NS_ASSUME_NONNULL_BEGIN
*/
@property(readonly, copy, nonatomic, nullable) NSError *error;
/**
* Status of the task.
*/
@property(readonly, nonatomic) FIRStorageTaskStatus status;
@end
NS_ASSUME_NONNULL_END

View File

@ -1 +1 @@
../../../Firebase/Headers/Firebase.h
../../../Firebase/Analytics/Sources/Firebase.h

View File

@ -1 +1 @@
../../../FirebaseInstanceID/Headers/Public/FIRInstanceID.h
../../../FirebaseInstanceID/Sources/FIRInstanceID.h

View File

@ -1 +1 @@
../../../Firebase/Headers/Firebase.h
../../../Firebase/Analytics/Sources/Firebase.h

View File

@ -1 +1 @@
../../../FirebaseInstanceID/Headers/Public/FIRInstanceID.h
../../../FirebaseInstanceID/Sources/FIRInstanceID.h

View File

@ -1,25 +0,0 @@
{
"name": "SwiftyJSON",
"version": "2.3.2",
"summary": "SwiftyJSON makes it easy to deal with JSON data in Swift",
"homepage": "https://github.com/SwiftyJSON/SwiftyJSON",
"license": {
"type": "MIT"
},
"authors": {
"lingoer": "lingoerer@gmail.com",
"tangplin": "tangplin@gmail.com"
},
"requires_arc": true,
"platforms": {
"osx": "10.9",
"ios": "8.0",
"watchos": "2.0",
"tvos": "9.0"
},
"source": {
"git": "https://github.com/SwiftyJSON/SwiftyJSON.git",
"tag": "2.3.2"
},
"source_files": "Source/*.swift"
}

BIN
Pods/Locksmith/.DS_Store generated vendored

Binary file not shown.

BIN
Pods/Locksmith/Source/.DS_Store generated vendored

Binary file not shown.

91
Pods/Manifest.lock generated
View File

@ -1,5 +1,5 @@
PODS:
- AeroGearHttp (0.5.1)
- AeroGearHttp (0.6.0)
- AeroGearOAuth2 (0.5.1):
- AeroGearHttp
- AFNetworking (2.6.3):
@ -27,47 +27,48 @@ PODS:
- Alamofire-SwiftyJSON (0.1.1):
- Alamofire (~> 3.4)
- SwiftyJSON (~> 2.3)
- Bolts (1.7.0):
- Bolts/AppLinks (= 1.7.0)
- Bolts/Tasks (= 1.7.0)
- Bolts/AppLinks (1.7.0):
- Bolts (1.8.4):
- Bolts/AppLinks (= 1.8.4)
- Bolts/Tasks (= 1.8.4)
- Bolts/AppLinks (1.8.4):
- Bolts/Tasks
- Bolts/Tasks (1.7.0)
- Bolts/Tasks (1.8.4)
- BSGridCollectionViewLayout (1.1.1)
- BSImagePicker (2.3.0):
- BSGridCollectionViewLayout (~> 1.1)
- UIImageViewModeScaleAspect (~> 1.3)
- FBSDKCoreKit (4.13.1):
- FBSDKCoreKit (4.14.0):
- Bolts (~> 1.7)
- FBSDKLoginKit (4.13.1):
- FBSDKLoginKit (4.14.0):
- FBSDKCoreKit
- FBSDKShareKit (4.13.1):
- FBSDKShareKit (4.14.0):
- FBSDKCoreKit
- Firebase (3.2.1):
- Firebase/Core (= 3.2.1)
- Firebase/Analytics (3.2.1):
- FirebaseAnalytics (= 3.2.0)
- Firebase/Core (3.2.1):
- Firebase/Analytics (= 3.2.1)
- Firebase/Database (3.2.1):
- Firebase/Analytics (= 3.2.1)
- FirebaseDatabase (= 3.0.1)
- Firebase/Storage (3.2.1):
- Firebase/Analytics (= 3.2.1)
- FirebaseStorage (= 1.0.1)
- FirebaseAnalytics (3.2.0):
- Firebase (3.4.0):
- Firebase/Core (= 3.4.0)
- Firebase/Analytics (3.4.0):
- FirebaseAnalytics (~> 3.3)
- Firebase/Core (3.4.0):
- Firebase/Analytics
- Firebase/Database (3.4.0):
- Firebase/Analytics
- FirebaseDatabase (= 3.0.2)
- Firebase/Storage (3.4.0):
- Firebase/Analytics
- FirebaseStorage (= 1.0.2)
- FirebaseAnalytics (3.3.0):
- FirebaseInstanceID (~> 1.0)
- GoogleInterchangeUtilities (~> 1.2)
- GoogleSymbolUtilities (~> 1.1)
- GoogleUtilities (~> 1.3)
- FirebaseAuth (3.0.2):
- GoogleUtilities (~> 1.2)
- FirebaseAuth (3.0.4):
- FirebaseAnalytics (~> 3.2)
- GoogleNetworkingUtilities (~> 1.2)
- GoogleUtilities (~> 1.3)
- FirebaseDatabase (3.0.1):
- GoogleParsingUtilities (~> 1.1)
- GoogleUtilities (~> 1.2)
- FirebaseDatabase (3.0.2):
- FirebaseAnalytics (~> 3.2)
- FirebaseInstanceID (1.0.6)
- FirebaseStorage (1.0.1):
- FirebaseInstanceID (1.0.8)
- FirebaseStorage (1.0.2):
- FirebaseAnalytics (~> 3.2)
- GoogleNetworkingUtilities (~> 1.2)
- GDataXML-HTML (1.3.0)
@ -75,6 +76,9 @@ PODS:
- GoogleSymbolUtilities (~> 1.0)
- GoogleNetworkingUtilities (1.2.1):
- GoogleSymbolUtilities (~> 1.0)
- GoogleParsingUtilities (1.1.1):
- GoogleNetworkingUtilities (~> 1.0)
- GoogleSymbolUtilities (~> 1.0)
- GoogleSymbolUtilities (1.1.1)
- GoogleUtilities (1.3.1):
- GoogleSymbolUtilities (~> 1.0)
@ -93,11 +97,11 @@ PODS:
- AFNetworking (~> 2.6.0)
- PicoKit/Soap
- PicoKit/XMLWriter (0.7.2)
- SOAPEngine (1.27)
- SOAPEngine (1.28)
- SwiftyJSON (2.3.2)
- SWRevealViewController (2.3.0)
- TYMActivityIndicatorView (0.3.3)
- UIImageViewModeScaleAspect (1.3)
- UIImageViewModeScaleAspect (1.5)
DEPENDENCIES:
- AeroGearOAuth2
@ -118,36 +122,37 @@ DEPENDENCIES:
- TYMActivityIndicatorView
SPEC CHECKSUMS:
AeroGearHttp: 9eb405b694aa9ac5daff842f68648f4a9fe0fa66
AeroGearHttp: e958f301cc2d1c7fbfd4b61af187ea3490040a48
AeroGearOAuth2: 6f29d3fac8b78a0ff6d51b04c4ba1a02baed2e52
AFNetworking: cb8d14a848e831097108418f5d49217339d4eb60
Alamofire: 01a82e2f6c0f860ade35534c8dd88be61bdef40c
Alamofire-SwiftyJSON: 5812bb37accc36897cc2f2dabb070d8ebcd7ac98
Bolts: a0058fa3b331c5a1e4402d534f2dae36dbff31e4
Bolts: 8a7995239dbe724f9cba2248b766d48b7ebdd322
BSGridCollectionViewLayout: d7304dcb35c6b3b4420c527e9f9b77ff322250f3
BSImagePicker: 591b28ce4994c44cbc4ac896717c1db9f9fadd18
FBSDKCoreKit: 2807fe0da2ddb49a1469da6d6ff597f99912980f
FBSDKLoginKit: 6d350cb6a22d6956e9d078885de6ee8a0ebc51b4
FBSDKShareKit: c9438df7573b33780ac8c3451201c5ebb260ffca
Firebase: 6c80ac28d59d06bfd9152a7b6ea17625ca93183d
FirebaseAnalytics: 6f75b04e6bfb8e0b6e9ef298e04c24eea3b13863
FirebaseAuth: 94b851fc345ce98036dfedfdc2eddeaef8fa3b4c
FirebaseDatabase: 34301d11621a83546f39f670d256477ba6f7fcea
FirebaseInstanceID: d014d574053a2fe84478f12f7bae96979e7051bb
FirebaseStorage: e9c32a8d246c07eeefd78180c22736aa1b81e81b
FBSDKCoreKit: 6e020b5db0b5bd1e01f5fb0902131befd129a502
FBSDKLoginKit: da563567a108050ef83739c8c8c001ee9e25fa13
FBSDKShareKit: e8e5d4ccef69b41132fe33acda26db1e33143e33
Firebase: 754562547af419cc2f4b15247fee419081924bc2
FirebaseAnalytics: 228be2991cb28efb96cdafc4d62f64680e615c69
FirebaseAuth: 26fd291c3b552fc9658420b867520d5ae080421c
FirebaseDatabase: 59bea2e7dfd81b3b8b2f8e396caf1a52c2ced6f7
FirebaseInstanceID: ba1e640935235e5fac39dfa816fe7660e72e1a8a
FirebaseStorage: fa2a87dee81f682f553af6839daa37a750e65f6a
GDataXML-HTML: 7adc03668cab35c288f1dbb8929a179f0fece898
GoogleInterchangeUtilities: def8415a862effc67d549d5b5b0b9c7a2f97d4de
GoogleNetworkingUtilities: 3e83269048cfb498dc7ec83ab36813360965c74f
GoogleParsingUtilities: 30b3896f9ee167dc78747f013d3de157ced1cadf
GoogleSymbolUtilities: 33117db1b5f290c6fbf259585e4885b4c84b98d7
GoogleUtilities: 56c5ac05b7aa5dc417a1bb85221a9516e04d7032
Locksmith: a8ed41ac4c06506ea8cb199d8ec8a8d3d108eb2a
OAuthSwift: 1ef042d4362e755e24a78f158d817245641a5d24
PicoKit: 9079bce659a8d5408c8af1c45254b971df614de3
SOAPEngine: e4b13175e3972eef93223eb9f397b8c86e1e6892
SOAPEngine: 75ca70e899b8ab7349ee9f4d69d11f081db1afba
SwiftyJSON: 04ccea08915aa0109039157c7974cf0298da292a
SWRevealViewController: 6d3fd97f70112fd7cef9de14df4260eacce4c63a
TYMActivityIndicatorView: ad816387ebd5952c376af129218722733044148b
UIImageViewModeScaleAspect: ec78901acfc20d3782154111a21d34390f8f71ad
UIImageViewModeScaleAspect: 11a790a0b9d248a13dc63e3a78991f1463b6d84e
PODFILE CHECKSUM: 2638bdfbb954251e8a36f6a6065ffea34297238d

File diff suppressed because it is too large Load Diff

View File

@ -14,7 +14,7 @@
buildForArchiving = "YES">
<BuildableReference
BuildableIdentifier = 'primary'
BlueprintIdentifier = '52D82BFDD1E808D9CB257431922C1EE4'
BlueprintIdentifier = '9D0F2E5EA1B46A5D72FFD42B0B39DBBC'
BlueprintName = 'Bolts'
ReferencedContainer = 'container:Pods.xcodeproj'
BuildableName = 'Bolts.framework'>

View File

@ -167,11 +167,6 @@
<key>primary</key>
<true/>
</dict>
<key>52D82BFDD1E808D9CB257431922C1EE4</key>
<dict>
<key>primary</key>
<true/>
</dict>
<key>6E31B4FD268BEE6936B4477E4EDCD609</key>
<dict>
<key>primary</key>
@ -212,6 +207,11 @@
<key>primary</key>
<true/>
</dict>
<key>9D0F2E5EA1B46A5D72FFD42B0B39DBBC</key>
<dict>
<key>primary</key>
<true/>
</dict>
<key>B6184234CE5B97D6DADDB68315E67B58</key>
<dict>
<key>primary</key>

View File

@ -193,10 +193,12 @@ with [**Notifications**](https://developer.apple.com/library/mac/documentation/C
[**Swift**](http://www.wikipedia.org/wiki/Swift_programming_language) language :
``` swift
var soap = SOAPEngine()
import SOAPEngine64
let soap = SOAPEngine()
soap.userAgent = "SOAPEngine"
soap.actionNamespaceSlash = true
soap.version = VERSION_1_1
soap.version = SOAPVersion.VERSION_1_1
soap.responseHeader = true // use only for non standard MS-SOAP service
soap.setValue("param-value", forKey: "param-name")
@ -205,7 +207,7 @@ with [**Notifications**](https://developer.apple.com/library/mac/documentation/C
completeWithDictionary: { (statusCode : Int,
dict : [NSObject : AnyObject]!) -> Void in
var result:Dictionary = dict as Dictionary
let result:Dictionary = dict as Dictionary
NSLog("%@", result)
}) { (error : NSError!) -> Void in
@ -471,7 +473,8 @@ completeWithDictionary:^(NSInteger statusCode, NSDictionary *dict)
## Optimizations
---
When using the method named requestWSDL three steps are performed :
First of all, if you note a slowdown in the response of the request, try to change the value of the property named `actionNamespaceSlash`.
After, when using the method named `requestWSDL` three steps are performed :
1. retrieve the WSDL with an http request.
2. processing to identify the soapAction.
@ -480,33 +483,18 @@ When using the method named requestWSDL three steps are performed :
this is not optimized, very slow, instead you can use the optimization below :
1. retrieving manually the SOAPAction directly from WSDL (once with your favorite browser).
2. use the method named requestURL instead of requestWSDL.
2. use the method named requestURL instead of requestWSDL without WSDL extension.
## Install in your apps
---
1. add `-lxml2` in Build Settings --> Other Linker Flags.
![Other Linker Flags](https://github.com/priore/SOAPEngine/raw/master/screen/otherlinkerflags.png)
###With Cocoapods###
2. add `/usr/include/libxml2` in Build Settings --> Header Search Paths.
![Header Search Paths](https://github.com/priore/SOAPEngine/raw/master/screen/headersearchpaths.png)
Read the ["Getting Started" guide](https://github.com/priore/SOAPEngine/wiki/Getting-Started-with-SOAPEngine)
3. add SOAPEngine Framework
* SOAPEngine64.framework for iOS.
* SOAPEngineOSX.framework for Mac OS X.
* SOAPEngineTV.framework for AppleTV.
4. add Security.framework.
###Standard installation###
5. add Accounts.framework (not for AppleTv).
6. add AppKit.framework (only for Mac OS X).
![Frameworks](https://github.com/priore/SOAPEngine/raw/master/screen/frameworks.png)
7. import in your class.
![import](https://github.com/priore/SOAPEngine/raw/master/screen/codeimport.png)
<SOAPEngine64/SOAPEngine.h>
8. set the property named `licenseKey` with your license code (*only for test on your devices or publishing the app, not needed for run the app in simulator mode*).
Read the ["Standard Installation" guide](https://github.com/priore/SOAPEngine/wiki/Standard-Installation)
## Licenses
---

View File

@ -139,8 +139,8 @@ typedef NS_ENUM(NSInteger, SOAPEnryption)
// sets the type of permission you want to use (none, wss, basic or custom).
@property (nonatomic, assign) SOAPAuthorization authorizationMethod;
// sets a custom content for the custom authorization method (xml format).
@property (nonatomic, strong) NSString *header;
// sets a custom content for the custom authorization method (xml string or dictionary).
@property (nonatomic, strong) id header;
// enables retrieval of the contents of the SOAP header in the server response.
@property (nonatomic, assign) BOOL responseHeader;
@ -203,7 +203,7 @@ typedef NS_ENUM(NSInteger, SOAPEnryption)
@property (nonatomic, strong) NSString *licenseKey;
// sets the receiver of the delegates
@property (nonatomic, assign) id<SOAPEngineDelegate> delegate;
@property (nonatomic, weak) id<SOAPEngineDelegate> delegate;
+ (SOAPEngine *)sharedInstance;
+ (SOAPEngine *)manager;

Binary file not shown.

Binary file not shown.

Some files were not shown because too many files have changed in this diff Show More