Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

[CA-1916] Support de Swift Package Manager #1

Merged
merged 7 commits into from
Jul 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 0 additions & 61 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,34 +14,11 @@ jobs:
- run:
name: Install CocoaPods
command: gem install cocoapods --user-install
- run:
name: Check IdentitySdkCore
command: |
cd IdentitySdkCore
pod install
cd ../
pod lib lint IdentitySdkCore.podspec
- run:
name: Check IdentitySdkFacebook
command: |
cd IdentitySdkFacebook
pod install
cd ../
pod lib lint IdentitySdkFacebook.podspec
- run:
name: Check IdentitySdkGoogle
command: |
cd IdentitySdkGoogle
pod install
cd ../
pod lib lint IdentitySdkGoogle.podspec
- run:
name: Check IdentitySdkWeChat
command: |
cd IdentitySdkWeChat
pod install
cd ../
pod lib lint IdentitySdkWeChat.podspec
build-for-release:
macos:
xcode: "15.3.0"
Expand All @@ -50,34 +27,11 @@ jobs:
- run:
name: Install CocoaPods
command: gem install cocoapods --user-install
- run:
name: Check IdentitySdkCore
command: |
cd IdentitySdkCore
pod install
cd ../
pod spec lint IdentitySdkCore.podspec
- run:
name: Check IdentitySdkFacebook
command: |
cd IdentitySdkFacebook
pod install
cd ../
pod spec lint IdentitySdkFacebook.podspec
- run:
name: Check IdentitySdkGoogle
command: |
cd IdentitySdkGoogle
pod install
cd ../
pod spec lint IdentitySdkGoogle.podspec
- run:
name: Check IdentitySdkWeChat
command: |
cd IdentitySdkWeChat
pod install
cd ../
pod spec lint IdentitySdkWeChat.podspec
publish:
macos:
Expand All @@ -87,22 +41,7 @@ jobs:
- run:
name: Install CocoaPods
command: gem install cocoapods --user-install
- run: pod trunk push IdentitySdkCore.podspec
- run: pod trunk push IdentitySdkFacebook.podspec
- run: pod trunk push IdentitySdkGoogle.podspec
- run: pod trunk push IdentitySdkWeChat.podspec
build-sandbox:
macos:
xcode: "15.3.0"
working_directory: ~/repo/Sandbox
steps:
- checkout:
path: ~/repo
- run:
name: Install CocoaPods
command: gem install cocoapods --user-install
- run: pod install
- run: fastlane scan

default_workflows_filters: &default_workflows_filters
filters:
Expand Down
10 changes: 5 additions & 5 deletions IdentitySdkFacebook.podspec
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require_relative './version'
require_relative 'version'

Pod::Spec.new do |spec|
spec.name = "IdentitySdkFacebook"
Expand All @@ -7,17 +7,17 @@ Pod::Spec.new do |spec|
spec.description = <<-DESC
ReachFive Identity Sdk Facebook
DESC
spec.homepage = "https://github.com/ReachFive/identity-ios-sdk"
spec.homepage = "https://github.com/ReachFive/reachfive-ios-facebook"
spec.license = { :type => "MIT", :file => "LICENSE" }
spec.author = "ReachFive"
spec.authors = { "François" => "francois.devemy@reach5.co", "Pierre" => "pierre.bar@reach5.co" }
spec.swift_versions = ["5"]
spec.source = { :git => "https://github.com/ReachFive/identity-ios-sdk.git", :tag => "#{spec.version}" }
spec.source_files = "IdentitySdkFacebook/IdentitySdkFacebook/Classes/**/*.*"
spec.source = { :git => "https://github.com/ReachFive/reachfive-ios-facebook.git", :tag => "#{spec.version}" }
spec.source_files = "IdentitySdkFacebook/Classes/**/*.*"
spec.platform = :ios
spec.ios.deployment_target = $IOS_DEPLOYMENT_TARGET

spec.dependency 'IdentitySdkCore', '~> 6'
spec.dependency 'IdentitySdkCore'
spec.dependency 'FBSDKCoreKit', '~> 17.0.0'
spec.dependency 'FBSDKLoginKit', '~> 17.0.0'
end
29 changes: 28 additions & 1 deletion IdentitySdkFacebook.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@
archiveVersion = 1;
classes = {
};
objectVersion = 50;
objectVersion = 54;
objects = {

/* Begin PBXBuildFile section */
14F33E0EA96F2CA5351DC8D2 /* Pods_IdentitySdkFacebook.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 57949F2A0ADABEC4B80C53C8 /* Pods_IdentitySdkFacebook.framework */; };
2AB329372C3F404A0058D464 /* Reach5 in Frameworks */ = {isa = PBXBuildFile; productRef = 2AB329362C3F404A0058D464 /* Reach5 */; };
3417321A229D9FE000681CFD /* Classes in Resources */ = {isa = PBXBuildFile; fileRef = 34173219229D9FE000681CFD /* Classes */; };
34DD7DC6229C222D007311FE /* IdentitySdkFacebook.h in Headers */ = {isa = PBXBuildFile; fileRef = 34DD7DC4229C222D007311FE /* IdentitySdkFacebook.h */; settings = {ATTRIBUTES = (Public, ); }; };
/* End PBXBuildFile section */
Expand All @@ -28,6 +29,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
2AB329372C3F404A0058D464 /* Reach5 in Frameworks */,
14F33E0EA96F2CA5351DC8D2 /* Pods_IdentitySdkFacebook.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
Expand Down Expand Up @@ -110,6 +112,9 @@
dependencies = (
);
name = IdentitySdkFacebook;
packageProductDependencies = (
2AB329362C3F404A0058D464 /* Reach5 */,
);
productName = IdentitySdkFacebook;
productReference = 34DD7DC1229C222D007311FE /* IdentitySdkFacebook.framework */;
productType = "com.apple.product-type.framework";
Expand Down Expand Up @@ -138,6 +143,9 @@
Base,
);
mainGroup = 34DD7DB7229C222D007311FE;
packageReferences = (
2AB329352C3F404A0058D464 /* XCRemoteSwiftPackageReference "reachfive-ios" */,
);
productRefGroup = 34DD7DC2229C222D007311FE /* Products */;
projectDirPath = "";
projectRoot = "";
Expand Down Expand Up @@ -399,6 +407,25 @@
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */

/* Begin XCRemoteSwiftPackageReference section */
2AB329352C3F404A0058D464 /* XCRemoteSwiftPackageReference "reachfive-ios" */ = {
isa = XCRemoteSwiftPackageReference;
repositoryURL = "https://github.com/ReachFive/reachfive-ios.git";
requirement = {
branch = "feature/CA-1916_swift_package_manager";
kind = branch;
};
};
/* End XCRemoteSwiftPackageReference section */

/* Begin XCSwiftPackageProductDependency section */
2AB329362C3F404A0058D464 /* Reach5 */ = {
isa = XCSwiftPackageProductDependency;
package = 2AB329352C3F404A0058D464 /* XCRemoteSwiftPackageReference "reachfive-ios" */;
productName = Reach5;
};
/* End XCSwiftPackageProductDependency section */
};
rootObject = 34DD7DB8229C222D007311FE /* Project object */;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
{
"originHash" : "7469e518fde3c43de02b3be48eb187ef2483c67b05cd081b325bd9bf2020ce6c",
"pins" : [
{
"identity" : "alamofire",
"kind" : "remoteSourceControl",
"location" : "https://github.com/Alamofire/Alamofire.git",
"state" : {
"revision" : "f455c2975872ccd2d9c81594c658af65716e9b9a",
"version" : "5.9.1"
}
},
{
"identity" : "brightfutures",
"kind" : "remoteSourceControl",
"location" : "https://github.com/Thomvis/BrightFutures.git",
"state" : {
"revision" : "fa66fa183dce7196d431244d0215748cd14c5758",
"version" : "8.2.0"
}
},
{
"identity" : "cryptoswift",
"kind" : "remoteSourceControl",
"location" : "https://github.com/krzyzanowskim/CryptoSwift.git",
"state" : {
"revision" : "c9c3df6ab812de32bae61fc0cd1bf6d45170ebf0",
"version" : "1.8.2"
}
},
{
"identity" : "devicekit",
"kind" : "remoteSourceControl",
"location" : "https://github.com/devicekit/DeviceKit.git",
"state" : {
"revision" : "5757447e9f92c476ee2ca41ead7eb6db07936430",
"version" : "5.4.0"
}
},
{
"identity" : "reachfive-ios",
"kind" : "remoteSourceControl",
"location" : "https://github.com/ReachFive/reachfive-ios.git",
"state" : {
"branch" : "feature/CA-1916_swift_package_manager",
"revision" : "f37618a2d28e1a50544769fddcda5329a3d6ecb8"
}
}
],
"version" : 3
}
4 changes: 4 additions & 0 deletions IdentitySdkFacebook/Classes/FacebookProvider.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
import Foundation
import UIKit
#if canImport(Reach5)
import Reach5
#else
import IdentitySdkCore
#endif
import BrightFutures
import FBSDKLoginKit

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

import PackageDescription

let package = Package(
name: "Reach5Facebook",
products: [
.library(name: "Reach5Facebook", targets: ["Reach5Facebook"]),
],
dependencies: [
.package(url: "https://github.com/facebook/facebook-ios-sdk.git", .upToNextMajor(from: "17.0.0")),
],
targets: [
.target(
name: "Reach5Facebook",
dependencies: [
.product(name: "FacebookCore", package: "facebook-ios-sdk"),
.product(name: "FacebookLogin", package: "facebook-ios-sdk"),
],
path: "IdentitySdkFacebook"),
]
)
4 changes: 2 additions & 2 deletions Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ use_frameworks!
platform :ios, '13.0'

target 'IdentitySdkFacebook' do
pod 'IdentitySdkCore', :path => '../'
pod 'IdentitySdkFacebook', :path => '../'
pod 'IdentitySdkCore'
pod 'IdentitySdkFacebook', :path => 'IdentitySdkFacebook.podspec'
end
17 changes: 8 additions & 9 deletions Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@ PODS:
- BrightFutures (~> 8.2.0)
- CryptoSwift (~> 1.8)
- DeviceKit (~> 5.1)
- IdentitySdkFacebook (6.3.0):
- IdentitySdkFacebook (6.4.0):
- FBSDKCoreKit (~> 17.0.0)
- FBSDKLoginKit (~> 17.0.0)
- IdentitySdkCore (~> 6)
- IdentitySdkCore

DEPENDENCIES:
- IdentitySdkCore (from `../`)
- IdentitySdkFacebook (from `../`)
- IdentitySdkCore
- IdentitySdkFacebook (from `IdentitySdkFacebook.podspec`)

SPEC REPOS:
trunk:
Expand All @@ -35,12 +35,11 @@ SPEC REPOS:
- FBSDKCoreKit
- FBSDKCoreKit_Basics
- FBSDKLoginKit
- IdentitySdkCore

EXTERNAL SOURCES:
IdentitySdkCore:
:path: "../"
IdentitySdkFacebook:
:path: "../"
:path: IdentitySdkFacebook.podspec

SPEC CHECKSUMS:
Alamofire: f36a35757af4587d8e4f4bfa223ad10be2422b8c
Expand All @@ -52,8 +51,8 @@ SPEC CHECKSUMS:
FBSDKCoreKit_Basics: d35c775aaf243a2d731dfae7be3a74b1987285ab
FBSDKLoginKit: f8ca5f7ab7c4e5b93e729d94975b0db7fcc511ed
IdentitySdkCore: e74e8f81ce688fac4365183376e3b26f62f06b5f
IdentitySdkFacebook: d23f478e93658175c9f7c0f82d2501f0caf77756
IdentitySdkFacebook: 4aa478b9e155a42aeca9dcf5ae1de3a0c605498d

PODFILE CHECKSUM: ea3abfa27d2faccd30f035d9775acb6ed83dfe68
PODFILE CHECKSUM: 9f63c0a241969d98b6f688a508fd68766a56fe58

COCOAPODS: 1.15.2
Loading