Skip to content
This repository has been archived by the owner on Nov 2, 2019. It is now read-only.

Commit

Permalink
Fixed documentation and unified casts to Any instead of AnyObject (
Browse files Browse the repository at this point in the history
…#69)

* Use Any instead of AnyObject

* Fix comments GraphAPIVersion.Default > GraphAPIVersion.defaultVersion

* Former FBSDKAppEvents.setPushNotificationsDeviceToken

Added as AppEventsLogger.setPushNotifications(deviceToken: Data!)

* remove push from PR
  • Loading branch information
arsonik authored and nlutsenko committed Oct 5, 2016
1 parent 785b6d6 commit bb58af1
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Samples/Catalog/Sources/GraphAPIReadViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ struct FBProfileRequest: GraphRequestProtocol {
typealias Response = GraphResponse

var graphPath = "/me"
var parameters: [String : Any]? = ["fields": "id, name" as AnyObject]
var parameters: [String : Any]? = ["fields": "id, name"]
var accessToken = AccessToken.current
var httpMethod: GraphRequestHTTPMethod = .GET
var apiVersion: GraphAPIVersion = 2.7
Expand Down
2 changes: 1 addition & 1 deletion Sources/Core/GraphRequest/GraphRequest.swift
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public struct GraphRequest: GraphRequestProtocol {
/// The `HTTPMethod` to use for the request, e.g. `.GET`/`.POST`/`.DELETE`.
public let httpMethod: GraphRequestHTTPMethod

/// Graph API Version to use, e.g. `"2.7"`. Default: `GraphRequestDefaultAPIVersion`.
/// Graph API Version to use, e.g. `"2.7"`. Default: `GraphAPIVersion.defaultVersion`.
public let apiVersion: GraphAPIVersion

/**
Expand Down
2 changes: 1 addition & 1 deletion Sources/Core/GraphRequest/GraphRequestProtocol.swift
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public protocol GraphRequestProtocol {
/// The `HTTPMethod` to use for the request, e.g. `.GET`/`.POST`/`.DELETE`.
var httpMethod: GraphRequestHTTPMethod { get }

/// Graph API Version to use. Default: `GraphAPIVersion.Default`.
/// Graph API Version to use. Default: `GraphAPIVersion.defaultVersion`.
var apiVersion: GraphAPIVersion { get }
}

Expand Down
2 changes: 1 addition & 1 deletion Sources/Core/GraphRequest/GraphResponse.swift
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public struct GraphResponse: GraphResponseProtocol {
}

/**
Converts and returns a response in a form of `Array<AnyObject>`
Converts and returns a response in a form of `Array<Any>`
If the conversion fails or there is was response - returns `nil`.
*/
public var arrayValue: [Any]? {
Expand Down
2 changes: 1 addition & 1 deletion Sources/Core/UserProfile/UserProfile.swift
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ extension UserProfile {
*/
public static func fetch(userId: String, completion: @escaping Completion) {
let request = GraphRequest(graphPath: userId,
parameters: ["fields" : "first_name,middle_name,last_name,name,link" as AnyObject],
parameters: ["fields" : "first_name,middle_name,last_name,name,link"],
httpMethod: .GET)
request.start { (httpResponse, result) in
switch result {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ internal struct OpenGraphPropertyValueConverter {
switch value {
case let value as String: return value
case let value as NSNumber: return value
case let value as NSArray: return value.flatMap { valueFrom(openGraphObjectValue: $0 as AnyObject) }
case let value as NSArray: return value.flatMap { valueFrom(openGraphObjectValue: $0 as Any) }
case let value as URL: return value
case let value as FBSDKSharePhoto: return Photo(sdkPhoto: value)
case let value as FBSDKShareOpenGraphObject: return OpenGraphObject(sdkGraphObject: value)
Expand Down

0 comments on commit bb58af1

Please sign in to comment.