Skip to content
This repository has been archived by the owner on Jan 6, 2024. It is now read-only.

Upgrade Facebook SDK to 12.1.0 #61

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
161 changes: 50 additions & 111 deletions Example/GBHFacebookImagePicker.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

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

This file was deleted.

This file was deleted.

This file was deleted.

Binary file not shown.

This file was deleted.

5 changes: 0 additions & 5 deletions Example/GBHFacebookImagePicker/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,6 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
// Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
}

func applicationDidBecomeActive(_ application: UIApplication) {
// Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
AppEvents.activateApp()
}

func applicationWillTerminate(_ application: UIApplication) {
// Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
LoginManager().logOut()
Expand Down
6 changes: 4 additions & 2 deletions Example/GBHFacebookImagePicker/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,16 @@
<string>Editor</string>
<key>CFBundleURLSchemes</key>
<array>
<string>fb351545812058212</string>
<string></string>
</array>
</dict>
</array>
<key>CFBundleVersion</key>
<string>1</string>
<key>FacebookAppID</key>
<string>351545812058212</string>
<string></string>
<key>FacebookClientToken</key>
<string></string>
<key>FacebookDisplayName</key>
<string>ImagePicker</string>
<key>LSRequiresIPhoneOS</key>
Expand Down
11 changes: 0 additions & 11 deletions Example/Podfile

This file was deleted.

35 changes: 0 additions & 35 deletions Example/Podfile.lock

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

20 changes: 0 additions & 20 deletions GBHFacebookImagePicker.podspec

This file was deleted.

4 changes: 0 additions & 4 deletions Gemfile

This file was deleted.

27 changes: 27 additions & 0 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
// swift-tools-version: 5.4
// The swift-tools-version declares the minimum version of Swift required to build this package.

import PackageDescription

let package = Package(
name: "GBHFacebookImagePicker",
platforms: [.iOS(.v12)],
products: [
.library(name: "GBHFacebookImagePicker", targets: ["GBHFacebookImagePicker"]),
],

dependencies: [
.package(url: "https://github.com/facebook/facebook-ios-sdk",
from: "16.0.0")
],
targets: [
.target(name: "GBHFacebookImagePicker",
dependencies: [
.product(name: "FacebookCore", package: "facebook-ios-sdk"),
.product(name: "FacebookLogin", package: "facebook-ios-sdk")
],
resources: [.process("Resources")],
publicHeadersPath: "."
),
]
)
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
// Created by Florian Gabach on 17/11/2018.
//

import UIKit

final class FacebookAlbumListController: UITableViewController {

// MARK: - Var
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
//

import Foundation
import UIKit

final class AlertController {
class func showPermissionAlert(fromController controller: UIViewController,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
// Created by Florian Gabach on 02/10/2016.
// Copyright (c) 2016 Florian Gabach <[email protected]>

import Foundation
import UIKit

final class AssetsController {

/// Get image from bundle
Expand All @@ -13,10 +16,10 @@ final class AssetsController {
///
/// - returns: return the retrieved image
public static func getImage(name: String) -> UIImage? {
var bundle = Bundle(for: AssetsController.self)
var bundle = Bundle.module
if let bundlePath = bundle.resourcePath?.appending("/GBHFacebookImagePicker.bundle"),
let ressourceBundle = Bundle(path: bundlePath) {
bundle = ressourceBundle
let resourceBundle = Bundle(path: bundlePath) {
bundle = resourceBundle
}

if let imageFromBundle = UIImage(named: name, in: bundle, compatibleWith: nil) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ final class FacebookController {
let param = ["fields": "picture.width(600).height(600)"]
let graphRequest = GraphRequest(graphPath: "me",
parameters: param)
_ = graphRequest.start(completionHandler: { (_, result, error) -> Void in
_ = graphRequest.start(completion: { (_, result, error) -> Void in
if let error = error {
// KO
completion(.failure(error))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
//

import Foundation
import UIKit

final class ImageCacheController {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import Foundation

protocol FacebookAlbumDetailPickerDelegate: class {
protocol FacebookAlbumDetailPickerDelegate: AnyObject {
func didSelectImages(images: [FacebookImage])
func didPressFinishSelection(images: [FacebookImage])
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import UIKit

public protocol FacebookImagePickerDelegate: class {
public protocol FacebookImagePickerDelegate: AnyObject {

/// Called when one or more images are picked
///
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
// Created by Florian Gabach on 29/09/2016.
// Copyright (c) 2016 Florian Gabach <[email protected]>

import Foundation

class FacebookAlbum {

// MARK: - Var
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
// Created by Florian Gabach on 29/09/2016.
// Copyright (c) 2016 Florian Gabach <[email protected]>

import Foundation
import UIKit

public enum ImageSize {
case normal
case full
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
// Created by Florian Gabach on 07/10/2016.
// Copyright (c) 2016 Florian Gabach <[email protected]>

import Foundation
import UIKit

struct Styles {
// White color : http://www.color-hex.com/color/ffffff
static let whiteCustom = UIColor(red: 246/255.0, green: 246/255.0, blue: 246/255.0, alpha: 1.0)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
//

import Foundation
import UIKit

extension UIView {
func bounce() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
//

import Foundation
import UIKit

extension UIViewController {
func add(_ child: UIViewController) {
Expand Down
1 change: 0 additions & 1 deletion _Pods.xcodeproj

This file was deleted.