mirror of
https://github.com/fxm90/GradientLoadingBar.git
synced 2026-06-16 12:24:31 +00:00
⬆️ :: Update CocoaPods and dependencies
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
PODS:
|
||||
- GradientLoadingBar (2.0.3):
|
||||
- LightweightObservable (~> 2.1)
|
||||
- LightweightObservable (2.1.0)
|
||||
- LightweightObservable (2.1.1)
|
||||
- SnapshotTesting (1.7.2)
|
||||
- SwiftFormat/CLI (0.44.4)
|
||||
- SwiftLint (0.39.1)
|
||||
- SwiftFormat/CLI (0.44.7)
|
||||
- SwiftLint (0.39.2)
|
||||
|
||||
DEPENDENCIES:
|
||||
- GradientLoadingBar (from `../`)
|
||||
@@ -25,11 +25,11 @@ EXTERNAL SOURCES:
|
||||
|
||||
SPEC CHECKSUMS:
|
||||
GradientLoadingBar: 47e099d0c0b0ed00b358d07dafc399fad50506b7
|
||||
LightweightObservable: 6cd1c52bf48ba8d34d3f7a61034206adcb349760
|
||||
LightweightObservable: 52abe2a01c8273921b1f66cd66526eb3328ca35a
|
||||
SnapshotTesting: 8caa6661fea7c8019d5b46de77c16bab99c36c5c
|
||||
SwiftFormat: 8b3c6b69454305a61c221355095f62dacc0811bf
|
||||
SwiftLint: 55e96a4a4d537d4a3156859fc1c54bd24851a046
|
||||
SwiftFormat: fd97e27b8de5a46c9d1988bf1db1dc92e79f86a3
|
||||
SwiftLint: 22ccbbe3b8008684be5955693bab135e0ed6a447
|
||||
|
||||
PODFILE CHECKSUM: f56a08d884831d712155be32578b7364270d0af0
|
||||
|
||||
COCOAPODS: 1.8.4
|
||||
COCOAPODS: 1.9.1
|
||||
|
||||
+3
-3
@@ -8,10 +8,10 @@
|
||||
|
||||
import Foundation
|
||||
|
||||
/// Helper to allow storing multiple disposables (and matching name from RxSwift).
|
||||
/// Helper to allow storing multiple disposables and matching name from [RxSwift](https://github.com/ReactiveX/RxSwift).
|
||||
public typealias DisposeBag = [Disposable]
|
||||
|
||||
/// Executes a given closure on deallocation.
|
||||
/// Executes a given closure on it's deallocation.
|
||||
public final class Disposable {
|
||||
// MARK: - Types
|
||||
|
||||
@@ -39,7 +39,7 @@ public final class Disposable {
|
||||
|
||||
// MARK: - Public methods
|
||||
|
||||
/// Adds the current disposable to an array of disposables.
|
||||
/// Adds the current instance to the given array of disposables.
|
||||
public func disposed(by bag: inout DisposeBag) {
|
||||
bag.append(self)
|
||||
}
|
||||
|
||||
+29
-7
@@ -13,26 +13,48 @@ public extension Observable where T: Equatable {
|
||||
// MARK: - Types
|
||||
|
||||
/// The type for the filter closure.
|
||||
typealias Filter = (Value, OldValue) -> Bool
|
||||
///
|
||||
/// - Parameters:
|
||||
/// - value: The current (new) value.
|
||||
/// - oldValue: The previous (old) value.
|
||||
///
|
||||
/// - Returns: `true` if the filter matches, otherwise `false`.
|
||||
typealias Filter = (_ value: Value, _ oldValue: OldValue) -> Bool
|
||||
|
||||
// MARK: - Public methods
|
||||
|
||||
/// Informs the given observer on changes to our `value`, only if the given filter matches.
|
||||
///
|
||||
/// - Parameters:
|
||||
/// - filter: The filer-closure, that must return `true` in order for the observer to be notified.
|
||||
/// - observer: The observer-closure that is notified on changes.
|
||||
/// - filter: The closure, that must return `true` in order for the observer to be notified.
|
||||
/// - observer: The closure that is notified on changes if the filter succeeds.
|
||||
///
|
||||
/// - Note:
|
||||
/// The `oldValue` of the observer always contains the previous value that passed the filter! E.g. if you filter for even numbers:
|
||||
/// ```
|
||||
/// | Emitted values: | 0 | 1 | 2 | 3 | 4 | 5 |
|
||||
/// | -------------------------- | -------- | -------- | -------- | -------- | -------- | -------- |
|
||||
/// | filter(value, oldValue): | (0, nil) | (1, 0) | (2, 1) | (3, 2) | (4, 3) | (5, 4) |
|
||||
/// | result: | true | false | true | false | true | false |
|
||||
/// | observer(value, oldValue): | (0, nil) | | (2, 0) | | (4, 2) | |
|
||||
/// ```
|
||||
func subscribe(filter: @escaping Filter, observer: @escaping Observer) -> Disposable {
|
||||
subscribe { newValue, oldValue in
|
||||
guard filter(newValue, oldValue) else { return }
|
||||
// As we're only calling the observer after the given `filter` succeeds, we need to save the last `newValue` that passed the filter.
|
||||
// Then we can pass this value as the correct `oldValue` on the next call to the given `observer`.
|
||||
var filteredOldValue: OldValue = nil
|
||||
|
||||
observer(newValue, oldValue)
|
||||
return subscribe { newValue, oldValue in
|
||||
// For having a correct working filter we need to pass in the current `oldValue`.
|
||||
if filter(newValue, oldValue) {
|
||||
observer(newValue, filteredOldValue)
|
||||
filteredOldValue = newValue
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// Informs the given observer on **distinct** changes to our `value`.
|
||||
///
|
||||
/// - Parameter observer: The observer-closure that is notified on changes.
|
||||
/// - Parameter observer: The closure that is notified on changes.
|
||||
func subscribeDistinct(_ observer: @escaping Observer) -> Disposable {
|
||||
subscribe(filter: { $0 != $1 },
|
||||
observer: observer)
|
||||
|
||||
+20
-16
@@ -8,12 +8,12 @@
|
||||
|
||||
import Foundation
|
||||
|
||||
/// An observable sequence that you can subscribe to.
|
||||
/// A lightweight implementation of an observable sequence that you can subscribe to.
|
||||
///
|
||||
/// - Note: Implementation is partly based on [roberthein/Observable](https://github.com/roberthein/Observable).
|
||||
/// - Note: Partly based on [roberthein/Observable](https://github.com/roberthein/Observable).
|
||||
///
|
||||
/// - Remark: I'd prefer having a protocol definition here, but casting an instance with a generic (e.g. `Variable<Int>(0)`) to a
|
||||
/// protocol with an associated type (`Observable<Int>`) does not work. Therefore we use an "abstract" class as a workaround.
|
||||
/// - Remark: I'd prefer having a protocol definition here, but casting an instance with a generic (e.g. `Variable<Int>(0)`) to a protocol
|
||||
/// with an associated type (`Observable<Int>`) doesn't work yet. Therefore we use an "abstract" class as a workaround.
|
||||
public class Observable<T> {
|
||||
// MARK: - Types
|
||||
|
||||
@@ -24,7 +24,11 @@ public class Observable<T> {
|
||||
public typealias OldValue = T?
|
||||
|
||||
/// The type for the closure to executed on change of the observable.
|
||||
public typealias Observer = (Value, OldValue) -> Void
|
||||
///
|
||||
/// - Parameters:
|
||||
/// - value: The current (new) value.
|
||||
/// - oldValue: The previous (old) value.
|
||||
public typealias Observer = (_ value: Value, _ oldValue: OldValue) -> Void
|
||||
|
||||
/// We store all observers within a dictionary, for which this is the type of the key.
|
||||
private typealias Index = UInt
|
||||
@@ -37,7 +41,7 @@ public class Observable<T> {
|
||||
///
|
||||
/// - Attention: It's always better to subscribe to a given observable! This **shortcut** should only be used during **testing**.
|
||||
public var value: Value? {
|
||||
fatalError("⚠️ – Subclasses need to overwrite and implement this computed property.")
|
||||
fatalError("⚠️ – Trying to access an abstract property! Subclasses need to overwrite and implement this computed property.")
|
||||
}
|
||||
|
||||
// MARK: - Private properties
|
||||
@@ -45,29 +49,29 @@ public class Observable<T> {
|
||||
/// The index of the last inserted observer.
|
||||
private var lastIndex: Index = 0
|
||||
|
||||
/// Map with all active observers.
|
||||
/// Map with all **active** observers.
|
||||
private var observers = [Index: Observer]()
|
||||
|
||||
// MARK: - Initalizer
|
||||
|
||||
/// Initializes a new observable.
|
||||
///
|
||||
/// - Note: Declared `fileprivate` in order to prevent directly initializing an observable, which can not be updated.
|
||||
/// - Note: Declared `fileprivate` in order to prevent directly initializing an observable, that can't emit values.
|
||||
fileprivate init() {}
|
||||
|
||||
// MARK: - Public methods
|
||||
|
||||
/// Informs the given observer on changes to our property `value`.
|
||||
/// Informs the given observer on changes to our underlying property `value`.
|
||||
///
|
||||
/// - Parameter observer: The observer-closure that is notified on changes.
|
||||
/// - Parameter observer: The closure that is notified on changes.
|
||||
public func subscribe(_ observer: @escaping Observer) -> Disposable {
|
||||
let currentIndex = lastIndex + 1
|
||||
observers[currentIndex] = observer
|
||||
lastIndex = currentIndex
|
||||
let indexForNewObserver = lastIndex + 1
|
||||
observers[indexForNewObserver] = observer
|
||||
lastIndex = indexForNewObserver
|
||||
|
||||
// Return a disposable, that removes the entry for this observer on it's deallocation.
|
||||
return Disposable { [weak self] in
|
||||
self?.observers[currentIndex] = nil
|
||||
self?.observers[indexForNewObserver] = nil
|
||||
}
|
||||
}
|
||||
|
||||
@@ -112,8 +116,8 @@ public final class PublishSubject<T>: Observable<T> {
|
||||
let oldValue = _value
|
||||
_value = value
|
||||
|
||||
// We inform the observer here instead of using `didSet` on `_value` to prevent unwrapping an optional (`_value` is nullable, as we're starting empty!).
|
||||
// Unwrapping lead to issues on having an underlying optional type.
|
||||
// We inform the observer here instead of using `didSet` on `_value` to prevent unwrapping an optional (`_value` is nullable, as we're starting empty).
|
||||
// Unwrapping lead to issues / crashes on having an underlying optional type, e.g. `PublishSubject<Int?>`.
|
||||
notifyObserver(with: value, from: oldValue)
|
||||
}
|
||||
}
|
||||
|
||||
Generated
+7
-7
@@ -1,10 +1,10 @@
|
||||
PODS:
|
||||
- GradientLoadingBar (2.0.3):
|
||||
- LightweightObservable (~> 2.1)
|
||||
- LightweightObservable (2.1.0)
|
||||
- LightweightObservable (2.1.1)
|
||||
- SnapshotTesting (1.7.2)
|
||||
- SwiftFormat/CLI (0.44.4)
|
||||
- SwiftLint (0.39.1)
|
||||
- SwiftFormat/CLI (0.44.7)
|
||||
- SwiftLint (0.39.2)
|
||||
|
||||
DEPENDENCIES:
|
||||
- GradientLoadingBar (from `../`)
|
||||
@@ -25,11 +25,11 @@ EXTERNAL SOURCES:
|
||||
|
||||
SPEC CHECKSUMS:
|
||||
GradientLoadingBar: 47e099d0c0b0ed00b358d07dafc399fad50506b7
|
||||
LightweightObservable: 6cd1c52bf48ba8d34d3f7a61034206adcb349760
|
||||
LightweightObservable: 52abe2a01c8273921b1f66cd66526eb3328ca35a
|
||||
SnapshotTesting: 8caa6661fea7c8019d5b46de77c16bab99c36c5c
|
||||
SwiftFormat: 8b3c6b69454305a61c221355095f62dacc0811bf
|
||||
SwiftLint: 55e96a4a4d537d4a3156859fc1c54bd24851a046
|
||||
SwiftFormat: fd97e27b8de5a46c9d1988bf1db1dc92e79f86a3
|
||||
SwiftLint: 22ccbbe3b8008684be5955693bab135e0ed6a447
|
||||
|
||||
PODFILE CHECKSUM: f56a08d884831d712155be32578b7364270d0af0
|
||||
|
||||
COCOAPODS: 1.8.4
|
||||
COCOAPODS: 1.9.1
|
||||
|
||||
+452
-442
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Generated
+14
-8
@@ -224,12 +224,14 @@ import PackageDescription
|
||||
|
||||
let package = Package(
|
||||
name: "BuildTools",
|
||||
platforms: [.macOS(.v10_11)],
|
||||
platforms: [.macOS(.v10_11)],
|
||||
dependencies: [
|
||||
.package(url: "https://github.com/nicklockwood/SwiftFormat", from: "0.41.2"),
|
||||
]
|
||||
],
|
||||
targets: [.target(name: "BuildTools", path: "")]
|
||||
)
|
||||
```
|
||||
3. If you are running Xcode 11.4 or later, in the `BuildTools` folder create a file called `Empty.swift` with nothing in it. This is to satisfy a change in Swift Package Manager.
|
||||
|
||||
#### 2) Add a Build phases to your app target
|
||||
|
||||
@@ -238,12 +240,14 @@ let package = Package(
|
||||
3. Drag the new `Run Script` phase **above** the `Compile Sources` phase, expand it and paste the following script:
|
||||
```bash
|
||||
cd BuildTools
|
||||
SDKROOT=macosx
|
||||
#swift package update #Uncomment this line temporarily to update the version used to the latest matching your BuildTools/Package.swift file
|
||||
swift run -c release swiftformat "$SRCROOT"
|
||||
```
|
||||
|
||||
**NOTE:** You may wish to check BuildTools/Package.swift into your source control so that the version used by your run-script phase is kept in version control. It is recommended to add the following to your .gitignore file: `BuildTools/.build` and `BuildTools/.swiftpm`.
|
||||
You can also use `swift run -c release --package-path BuildTools swiftformat "$SRCROOT"` if you need a more complex script and `cd BuildTools` breaks stuff.
|
||||
|
||||
**NOTE:** You may wish to check BuildTools/Package.swift into your source control so that the version used by your run-script phase is kept in version control. It is recommended to add the following to your .gitignore file: `BuildTools/.build` and `BuildTools/.swiftpm`.
|
||||
|
||||
### Using Cocoapods
|
||||
|
||||
@@ -308,13 +312,13 @@ Git pre-commit hook
|
||||
|
||||
1. Follow the instructions for installing the SwiftFormat command-line tool.
|
||||
|
||||
2. Edit or create a `.git/hooks/pre-commit` file in your project folder. The .git folder is hidden but should already exist if you are using Git with your project, so open in with the terminal, or the Finder's `Go > Go to Folder...` menu.
|
||||
2. Edit or create a `.git/hooks/pre-commit` file in your project folder. The .git folder is hidden but should already exist if you are using Git with your project, so open it with the terminal, or the Finder's `Go > Go to Folder...` menu.
|
||||
|
||||
3. Add the following line in the pre-commit file (unlike the Xcode build phase approach, this uses your locally installed version of SwiftFormat, not a separate copy in your project repository)
|
||||
|
||||
```bash
|
||||
#!/bin/bash
|
||||
git diff --diff-filter=d --staged --name-only | grep -e '\(.*\).swift$' | while read line; do
|
||||
git diff --diff-filter=d --staged --name-only | grep -e '\.swift$' | while read line; do
|
||||
swiftformat "${line}";
|
||||
git add "$line";
|
||||
done
|
||||
@@ -453,7 +457,7 @@ A SwiftFormat configuration file consists of one or more command-line options, s
|
||||
|
||||
```
|
||||
--allman true
|
||||
--indent tabs
|
||||
--indent tab
|
||||
--disable elseOnSameLine,semicolons
|
||||
```
|
||||
|
||||
@@ -474,7 +478,7 @@ The config file format is designed to be edited by hand. You may include blank l
|
||||
```
|
||||
# format options
|
||||
--allman true
|
||||
--indent tabs # tabs FTW!
|
||||
--indent tab # tabs FTW!
|
||||
|
||||
# file options
|
||||
--exclude Pods
|
||||
@@ -721,8 +725,10 @@ Credits
|
||||
* [Ali Akhtarzada](https://github.com/aliak00) - Several path-related CLI enhancements
|
||||
* [Yonas Kolb](https://github.com/yonaskolb) - Swift Package Manager integration
|
||||
* [Wolfgang Lutz](https://github.com/Lutzifer) - AppleScript integration instructions
|
||||
* [Balázs Kilvády](https://github.com/balitm) - Xcode lint warning integration
|
||||
* [Balázs Kilvády](https://github.com/balitm) - Xcode lint warning integration
|
||||
* [Anthony Miller](https://github.com/AnthonyMDev) - Improvements to wrap/indent logic
|
||||
* [Shingo Takagi](https://github.com/zizi4n5) - Several brace-related bug fixes
|
||||
* [Juri Pakaste](https://github.com/juri) - Filelist feature
|
||||
* [Nick Lockwood](https://github.com/nicklockwood) - Everything else
|
||||
|
||||
([Full list of contributors](https://github.com/nicklockwood/SwiftFormat/graphs/contributors))
|
||||
|
||||
Generated
BIN
Binary file not shown.
+11
@@ -0,0 +1,11 @@
|
||||
CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/GradientLoadingBar
|
||||
FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/LightweightObservable"
|
||||
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
|
||||
OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS
|
||||
PODS_BUILD_DIR = ${BUILD_DIR}
|
||||
PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
|
||||
PODS_ROOT = ${SRCROOT}
|
||||
PODS_TARGET_SRCROOT = ${PODS_ROOT}/../..
|
||||
PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier}
|
||||
SKIP_INSTALL = YES
|
||||
USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/GradientLoadingBar
|
||||
FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/LightweightObservable"
|
||||
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
|
||||
OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS
|
||||
PODS_BUILD_DIR = ${BUILD_DIR}
|
||||
PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
|
||||
PODS_ROOT = ${SRCROOT}
|
||||
PODS_TARGET_SRCROOT = ${PODS_ROOT}/../..
|
||||
PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier}
|
||||
SKIP_INSTALL = YES
|
||||
USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES
|
||||
+1
-1
@@ -15,7 +15,7 @@
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>FMWK</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>2.1.0</string>
|
||||
<string>2.1.1</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
|
||||
Generated
+10
@@ -0,0 +1,10 @@
|
||||
CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/LightweightObservable
|
||||
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
|
||||
OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS
|
||||
PODS_BUILD_DIR = ${BUILD_DIR}
|
||||
PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
|
||||
PODS_ROOT = ${SRCROOT}
|
||||
PODS_TARGET_SRCROOT = ${PODS_ROOT}/LightweightObservable
|
||||
PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier}
|
||||
SKIP_INSTALL = YES
|
||||
USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES
|
||||
Generated
+10
@@ -0,0 +1,10 @@
|
||||
CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/LightweightObservable
|
||||
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
|
||||
OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS
|
||||
PODS_BUILD_DIR = ${BUILD_DIR}
|
||||
PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
|
||||
PODS_ROOT = ${SRCROOT}
|
||||
PODS_TARGET_SRCROOT = ${PODS_ROOT}/LightweightObservable
|
||||
PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier}
|
||||
SKIP_INSTALL = YES
|
||||
USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES
|
||||
+46
-10
@@ -46,8 +46,8 @@ install_framework()
|
||||
fi
|
||||
|
||||
# Use filter instead of exclude so missing patterns don't throw errors.
|
||||
echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\""
|
||||
rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}"
|
||||
echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --links --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\""
|
||||
rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --links --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}"
|
||||
|
||||
local basename
|
||||
basename="$(basename -s .framework "$1")"
|
||||
@@ -84,27 +84,29 @@ install_framework()
|
||||
# Copies and strips a vendored dSYM
|
||||
install_dsym() {
|
||||
local source="$1"
|
||||
warn_missing_arch=${2:-true}
|
||||
if [ -r "$source" ]; then
|
||||
# Copy the dSYM into a the targets temp dir.
|
||||
# Copy the dSYM into the targets temp dir.
|
||||
echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${DERIVED_FILES_DIR}\""
|
||||
rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${DERIVED_FILES_DIR}"
|
||||
|
||||
local basename
|
||||
basename="$(basename -s .framework.dSYM "$source")"
|
||||
binary="${DERIVED_FILES_DIR}/${basename}.framework.dSYM/Contents/Resources/DWARF/${basename}"
|
||||
basename="$(basename -s .dSYM "$source")"
|
||||
binary_name="$(ls "$source/Contents/Resources/DWARF")"
|
||||
binary="${DERIVED_FILES_DIR}/${basename}.dSYM/Contents/Resources/DWARF/${binary_name}"
|
||||
|
||||
# Strip invalid architectures so "fat" simulator / device frameworks work on device
|
||||
if [[ "$(file "$binary")" == *"Mach-O "*"dSYM companion"* ]]; then
|
||||
strip_invalid_archs "$binary"
|
||||
strip_invalid_archs "$binary" "$warn_missing_arch"
|
||||
fi
|
||||
|
||||
if [[ $STRIP_BINARY_RETVAL == 1 ]]; then
|
||||
# Move the stripped file into its final destination.
|
||||
echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${DERIVED_FILES_DIR}/${basename}.framework.dSYM\" \"${DWARF_DSYM_FOLDER_PATH}\""
|
||||
rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${DERIVED_FILES_DIR}/${basename}.framework.dSYM" "${DWARF_DSYM_FOLDER_PATH}"
|
||||
echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --links --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${DERIVED_FILES_DIR}/${basename}.framework.dSYM\" \"${DWARF_DSYM_FOLDER_PATH}\""
|
||||
rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --links --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${DERIVED_FILES_DIR}/${basename}.dSYM" "${DWARF_DSYM_FOLDER_PATH}"
|
||||
else
|
||||
# The dSYM was not stripped at all, in this case touch a fake folder so the input/output paths from Xcode do not reexecute this script because the file is missing.
|
||||
touch "${DWARF_DSYM_FOLDER_PATH}/${basename}.framework.dSYM"
|
||||
touch "${DWARF_DSYM_FOLDER_PATH}/${basename}.dSYM"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
@@ -135,13 +137,16 @@ code_sign_if_enabled() {
|
||||
# Strip invalid architectures
|
||||
strip_invalid_archs() {
|
||||
binary="$1"
|
||||
warn_missing_arch=${2:-true}
|
||||
# Get architectures for current target binary
|
||||
binary_archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | awk '{$1=$1;print}' | rev)"
|
||||
# Intersect them with the architectures we are building for
|
||||
intersected_archs="$(echo ${ARCHS[@]} ${binary_archs[@]} | tr ' ' '\n' | sort | uniq -d)"
|
||||
# If there are no archs supported by this binary then warn the user
|
||||
if [[ -z "$intersected_archs" ]]; then
|
||||
echo "warning: [CP] Vendored binary '$binary' contains architectures ($binary_archs) none of which match the current build architectures ($ARCHS)."
|
||||
if [[ "$warn_missing_arch" == "true" ]]; then
|
||||
echo "warning: [CP] Vendored binary '$binary' contains architectures ($binary_archs) none of which match the current build architectures ($ARCHS)."
|
||||
fi
|
||||
STRIP_BINARY_RETVAL=0
|
||||
return
|
||||
fi
|
||||
@@ -159,6 +164,37 @@ strip_invalid_archs() {
|
||||
STRIP_BINARY_RETVAL=1
|
||||
}
|
||||
|
||||
install_artifact() {
|
||||
artifact="$1"
|
||||
base="$(basename "$artifact")"
|
||||
case $base in
|
||||
*.framework)
|
||||
install_framework "$artifact"
|
||||
;;
|
||||
*.dSYM)
|
||||
# Suppress arch warnings since XCFrameworks will include many dSYM files
|
||||
install_dsym "$artifact" "false"
|
||||
;;
|
||||
*.bcsymbolmap)
|
||||
install_bcsymbolmap "$artifact"
|
||||
;;
|
||||
*)
|
||||
echo "error: Unrecognized artifact "$artifact""
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
copy_artifacts() {
|
||||
file_list="$1"
|
||||
while read artifact; do
|
||||
install_artifact "$artifact"
|
||||
done <$file_list
|
||||
}
|
||||
|
||||
ARTIFACT_LIST_FILE="${BUILT_PRODUCTS_DIR}/cocoapods-artifacts-${CONFIGURATION}.txt"
|
||||
if [ -r "${ARTIFACT_LIST_FILE}" ]; then
|
||||
copy_artifacts "${ARTIFACT_LIST_FILE}"
|
||||
fi
|
||||
|
||||
if [[ "$CONFIGURATION" == "Debug" ]]; then
|
||||
install_framework "${BUILT_PRODUCTS_DIR}/GradientLoadingBar/GradientLoadingBar.framework"
|
||||
|
||||
+46
-10
@@ -46,8 +46,8 @@ install_framework()
|
||||
fi
|
||||
|
||||
# Use filter instead of exclude so missing patterns don't throw errors.
|
||||
echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\""
|
||||
rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}"
|
||||
echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --links --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\""
|
||||
rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --links --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}"
|
||||
|
||||
local basename
|
||||
basename="$(basename -s .framework "$1")"
|
||||
@@ -84,27 +84,29 @@ install_framework()
|
||||
# Copies and strips a vendored dSYM
|
||||
install_dsym() {
|
||||
local source="$1"
|
||||
warn_missing_arch=${2:-true}
|
||||
if [ -r "$source" ]; then
|
||||
# Copy the dSYM into a the targets temp dir.
|
||||
# Copy the dSYM into the targets temp dir.
|
||||
echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${DERIVED_FILES_DIR}\""
|
||||
rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${DERIVED_FILES_DIR}"
|
||||
|
||||
local basename
|
||||
basename="$(basename -s .framework.dSYM "$source")"
|
||||
binary="${DERIVED_FILES_DIR}/${basename}.framework.dSYM/Contents/Resources/DWARF/${basename}"
|
||||
basename="$(basename -s .dSYM "$source")"
|
||||
binary_name="$(ls "$source/Contents/Resources/DWARF")"
|
||||
binary="${DERIVED_FILES_DIR}/${basename}.dSYM/Contents/Resources/DWARF/${binary_name}"
|
||||
|
||||
# Strip invalid architectures so "fat" simulator / device frameworks work on device
|
||||
if [[ "$(file "$binary")" == *"Mach-O "*"dSYM companion"* ]]; then
|
||||
strip_invalid_archs "$binary"
|
||||
strip_invalid_archs "$binary" "$warn_missing_arch"
|
||||
fi
|
||||
|
||||
if [[ $STRIP_BINARY_RETVAL == 1 ]]; then
|
||||
# Move the stripped file into its final destination.
|
||||
echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${DERIVED_FILES_DIR}/${basename}.framework.dSYM\" \"${DWARF_DSYM_FOLDER_PATH}\""
|
||||
rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${DERIVED_FILES_DIR}/${basename}.framework.dSYM" "${DWARF_DSYM_FOLDER_PATH}"
|
||||
echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --links --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${DERIVED_FILES_DIR}/${basename}.framework.dSYM\" \"${DWARF_DSYM_FOLDER_PATH}\""
|
||||
rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --links --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${DERIVED_FILES_DIR}/${basename}.dSYM" "${DWARF_DSYM_FOLDER_PATH}"
|
||||
else
|
||||
# The dSYM was not stripped at all, in this case touch a fake folder so the input/output paths from Xcode do not reexecute this script because the file is missing.
|
||||
touch "${DWARF_DSYM_FOLDER_PATH}/${basename}.framework.dSYM"
|
||||
touch "${DWARF_DSYM_FOLDER_PATH}/${basename}.dSYM"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
@@ -135,13 +137,16 @@ code_sign_if_enabled() {
|
||||
# Strip invalid architectures
|
||||
strip_invalid_archs() {
|
||||
binary="$1"
|
||||
warn_missing_arch=${2:-true}
|
||||
# Get architectures for current target binary
|
||||
binary_archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | awk '{$1=$1;print}' | rev)"
|
||||
# Intersect them with the architectures we are building for
|
||||
intersected_archs="$(echo ${ARCHS[@]} ${binary_archs[@]} | tr ' ' '\n' | sort | uniq -d)"
|
||||
# If there are no archs supported by this binary then warn the user
|
||||
if [[ -z "$intersected_archs" ]]; then
|
||||
echo "warning: [CP] Vendored binary '$binary' contains architectures ($binary_archs) none of which match the current build architectures ($ARCHS)."
|
||||
if [[ "$warn_missing_arch" == "true" ]]; then
|
||||
echo "warning: [CP] Vendored binary '$binary' contains architectures ($binary_archs) none of which match the current build architectures ($ARCHS)."
|
||||
fi
|
||||
STRIP_BINARY_RETVAL=0
|
||||
return
|
||||
fi
|
||||
@@ -159,6 +164,37 @@ strip_invalid_archs() {
|
||||
STRIP_BINARY_RETVAL=1
|
||||
}
|
||||
|
||||
install_artifact() {
|
||||
artifact="$1"
|
||||
base="$(basename "$artifact")"
|
||||
case $base in
|
||||
*.framework)
|
||||
install_framework "$artifact"
|
||||
;;
|
||||
*.dSYM)
|
||||
# Suppress arch warnings since XCFrameworks will include many dSYM files
|
||||
install_dsym "$artifact" "false"
|
||||
;;
|
||||
*.bcsymbolmap)
|
||||
install_bcsymbolmap "$artifact"
|
||||
;;
|
||||
*)
|
||||
echo "error: Unrecognized artifact "$artifact""
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
copy_artifacts() {
|
||||
file_list="$1"
|
||||
while read artifact; do
|
||||
install_artifact "$artifact"
|
||||
done <$file_list
|
||||
}
|
||||
|
||||
ARTIFACT_LIST_FILE="${BUILT_PRODUCTS_DIR}/cocoapods-artifacts-${CONFIGURATION}.txt"
|
||||
if [ -r "${ARTIFACT_LIST_FILE}" ]; then
|
||||
copy_artifacts "${ARTIFACT_LIST_FILE}"
|
||||
fi
|
||||
|
||||
if [[ "$CONFIGURATION" == "Debug" ]]; then
|
||||
install_framework "${BUILT_PRODUCTS_DIR}/SnapshotTesting/SnapshotTesting.framework"
|
||||
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/SnapshotTesting
|
||||
ENABLE_BITCODE = NO
|
||||
FRAMEWORK_SEARCH_PATHS = $(inherited) "$(PLATFORM_DIR)/Developer/Library/Frameworks"
|
||||
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
|
||||
LIBRARY_SEARCH_PATHS = $(inherited) "$(PLATFORM_DIR)/Developer/usr/lib"
|
||||
OTHER_LDFLAGS = $(inherited) -framework "XCTest"
|
||||
OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS
|
||||
PODS_BUILD_DIR = ${BUILD_DIR}
|
||||
PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
|
||||
PODS_ROOT = ${SRCROOT}
|
||||
PODS_TARGET_SRCROOT = ${PODS_ROOT}/SnapshotTesting
|
||||
PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier}
|
||||
SKIP_INSTALL = YES
|
||||
SWIFT_INCLUDE_PATHS = $(inherited) "$(PLATFORM_DIR)/Developer/usr/lib"
|
||||
SYSTEM_FRAMEWORK_SEARCH_PATHS = $(inherited) "$(PLATFORM_DIR)/Developer/Library/Frameworks"
|
||||
USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/SnapshotTesting
|
||||
ENABLE_BITCODE = NO
|
||||
FRAMEWORK_SEARCH_PATHS = $(inherited) "$(PLATFORM_DIR)/Developer/Library/Frameworks"
|
||||
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
|
||||
LIBRARY_SEARCH_PATHS = $(inherited) "$(PLATFORM_DIR)/Developer/usr/lib"
|
||||
OTHER_LDFLAGS = $(inherited) -framework "XCTest"
|
||||
OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS
|
||||
PODS_BUILD_DIR = ${BUILD_DIR}
|
||||
PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
|
||||
PODS_ROOT = ${SRCROOT}
|
||||
PODS_TARGET_SRCROOT = ${PODS_ROOT}/SnapshotTesting
|
||||
PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier}
|
||||
SKIP_INSTALL = YES
|
||||
SWIFT_INCLUDE_PATHS = $(inherited) "$(PLATFORM_DIR)/Developer/usr/lib"
|
||||
SYSTEM_FRAMEWORK_SEARCH_PATHS = $(inherited) "$(PLATFORM_DIR)/Developer/Library/Frameworks"
|
||||
USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES
|
||||
@@ -0,0 +1,9 @@
|
||||
CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/SwiftFormat
|
||||
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
|
||||
PODS_BUILD_DIR = ${BUILD_DIR}
|
||||
PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
|
||||
PODS_ROOT = ${SRCROOT}
|
||||
PODS_TARGET_SRCROOT = ${PODS_ROOT}/SwiftFormat
|
||||
PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier}
|
||||
SKIP_INSTALL = YES
|
||||
USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES
|
||||
@@ -0,0 +1,9 @@
|
||||
CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/SwiftFormat
|
||||
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
|
||||
PODS_BUILD_DIR = ${BUILD_DIR}
|
||||
PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
|
||||
PODS_ROOT = ${SRCROOT}
|
||||
PODS_TARGET_SRCROOT = ${PODS_ROOT}/SwiftFormat
|
||||
PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier}
|
||||
SKIP_INSTALL = YES
|
||||
USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES
|
||||
@@ -0,0 +1,9 @@
|
||||
CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/SwiftLint
|
||||
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
|
||||
PODS_BUILD_DIR = ${BUILD_DIR}
|
||||
PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
|
||||
PODS_ROOT = ${SRCROOT}
|
||||
PODS_TARGET_SRCROOT = ${PODS_ROOT}/SwiftLint
|
||||
PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier}
|
||||
SKIP_INSTALL = YES
|
||||
USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES
|
||||
@@ -0,0 +1,9 @@
|
||||
CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/SwiftLint
|
||||
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
|
||||
PODS_BUILD_DIR = ${BUILD_DIR}
|
||||
PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
|
||||
PODS_ROOT = ${SRCROOT}
|
||||
PODS_TARGET_SRCROOT = ${PODS_ROOT}/SwiftLint
|
||||
PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier}
|
||||
SKIP_INSTALL = YES
|
||||
USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES
|
||||
Reference in New Issue
Block a user