Skip to content

Commit

Permalink
Additional Kingfisher 5 update cleanups
Browse files Browse the repository at this point in the history
  • Loading branch information
freak4pc committed Mar 1, 2019
1 parent 831a5e3 commit daf4c98
Show file tree
Hide file tree
Showing 406 changed files with 50 additions and 87,724 deletions.
1 change: 1 addition & 0 deletions Example/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Pods
91 changes: 14 additions & 77 deletions Example/Example.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,41 +12,42 @@
78B8883F209E0BCB0023F90B /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 78B8883D209E0BCB0023F90B /* Main.storyboard */; };
78B88841209E0BCC0023F90B /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 78B88840209E0BCC0023F90B /* Assets.xcassets */; };
78B88844209E0BCC0023F90B /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 78B88842209E0BCC0023F90B /* LaunchScreen.storyboard */; };
A017736EBAFEF358F492ABC1 /* Pods_Example.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FE7CDE24E944EB5EB51F50C3 /* Pods_Example.framework */; };
/* End PBXBuildFile section */

/* Begin PBXFileReference section */
0898CF7E4EEC944EF0AE0ED9 /* Pods-Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Example.debug.xcconfig"; path = "Pods/Target Support Files/Pods-Example/Pods-Example.debug.xcconfig"; sourceTree = "<group>"; };
78B88836209E0BCB0023F90B /* Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Example.app; sourceTree = BUILT_PRODUCTS_DIR; };
78B88839209E0BCB0023F90B /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
78B8883B209E0BCB0023F90B /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = "<group>"; };
78B8883E209E0BCB0023F90B /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
78B88840209E0BCC0023F90B /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
78B88843209E0BCC0023F90B /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
78B88845209E0BCC0023F90B /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
94AA147D474514106FF6DC0D /* Pods-Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Example.release.xcconfig"; path = "Pods/Target Support Files/Pods-Example/Pods-Example.release.xcconfig"; sourceTree = "<group>"; };
FE7CDE24E944EB5EB51F50C3 /* Pods_Example.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Example.framework; sourceTree = BUILT_PRODUCTS_DIR; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
78B88833209E0BCB0023F90B /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
A017736EBAFEF358F492ABC1 /* Pods_Example.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */

/* Begin PBXGroup section */
305E9882AE591C27EB021201 /* Pods */ = {
isa = PBXGroup;
children = (
);
path = Pods;
sourceTree = "<group>";
};
78B8882D209E0BCB0023F90B = {
isa = PBXGroup;
children = (
78B88838209E0BCB0023F90B /* Example */,
78B88837209E0BCB0023F90B /* Products */,
F69C9260EEA22CD43C05C93F /* Pods */,
DBAB75F08C826C126E95CA5F /* Frameworks */,
305E9882AE591C27EB021201 /* Pods */,
);
sourceTree = "<group>";
};
Expand All @@ -71,35 +72,16 @@
path = Example;
sourceTree = "<group>";
};
DBAB75F08C826C126E95CA5F /* Frameworks */ = {
isa = PBXGroup;
children = (
FE7CDE24E944EB5EB51F50C3 /* Pods_Example.framework */,
);
name = Frameworks;
sourceTree = "<group>";
};
F69C9260EEA22CD43C05C93F /* Pods */ = {
isa = PBXGroup;
children = (
0898CF7E4EEC944EF0AE0ED9 /* Pods-Example.debug.xcconfig */,
94AA147D474514106FF6DC0D /* Pods-Example.release.xcconfig */,
);
name = Pods;
sourceTree = "<group>";
};
/* End PBXGroup section */

/* Begin PBXNativeTarget section */
78B88835209E0BCB0023F90B /* Example */ = {
isa = PBXNativeTarget;
buildConfigurationList = 78B88848209E0BCC0023F90B /* Build configuration list for PBXNativeTarget "Example" */;
buildPhases = (
08FF7D3C97EDF93A12F68E2E /* [CP] Check Pods Manifest.lock */,
78B88832209E0BCB0023F90B /* Sources */,
78B88833209E0BCB0023F90B /* Frameworks */,
78B88834209E0BCB0023F90B /* Resources */,
46AF518B95913B5000B5888E /* [CP] Embed Pods Frameworks */,
);
buildRules = (
);
Expand Down Expand Up @@ -156,53 +138,6 @@
};
/* End PBXResourcesBuildPhase section */

/* Begin PBXShellScriptBuildPhase section */
08FF7D3C97EDF93A12F68E2E /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
"${PODS_ROOT}/Manifest.lock",
);
name = "[CP] Check Pods Manifest.lock";
outputPaths = (
"$(DERIVED_FILE_DIR)/Pods-Example-checkManifestLockResult.txt",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
showEnvVarsInLog = 0;
};
46AF518B95913B5000B5888E /* [CP] Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Example/Pods-Example-frameworks.sh",
"${BUILT_PRODUCTS_DIR}/Fakery/Fakery.framework",
"${BUILT_PRODUCTS_DIR}/Kingfisher/Kingfisher.framework",
"${BUILT_PRODUCTS_DIR}/RxCocoa/RxCocoa.framework",
"${BUILT_PRODUCTS_DIR}/RxKingfisher/RxKingfisher.framework",
"${BUILT_PRODUCTS_DIR}/RxSwift/RxSwift.framework",
);
name = "[CP] Embed Pods Frameworks";
outputPaths = (
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Fakery.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Kingfisher.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RxCocoa.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RxKingfisher.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RxSwift.framework",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Example/Pods-Example-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
/* End PBXShellScriptBuildPhase section */

/* Begin PBXSourcesBuildPhase section */
78B88832209E0BCB0023F90B /* Sources */ = {
isa = PBXSourcesBuildPhase;
Expand Down Expand Up @@ -292,6 +227,7 @@
SDKROOT = iphoneos;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 4.2;
};
name = Debug;
};
Expand Down Expand Up @@ -345,42 +281,43 @@
SDKROOT = iphoneos;
SWIFT_COMPILATION_MODE = wholemodule;
SWIFT_OPTIMIZATION_LEVEL = "-O";
SWIFT_VERSION = 4.2;
VALIDATE_PRODUCT = YES;
};
name = Release;
};
78B88849209E0BCC0023F90B /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 0898CF7E4EEC944EF0AE0ED9 /* Pods-Example.debug.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_STYLE = Automatic;
INFOPLIST_FILE = Example/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 12.1;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = com.freak4pc.Example;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 4.2;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Debug;
};
78B8884A209E0BCC0023F90B /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 94AA147D474514106FF6DC0D /* Pods-Example.release.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_STYLE = Automatic;
INFOPLIST_FILE = Example/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 12.1;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = com.freak4pc.Example;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 4.2;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Release;
Expand Down
10 changes: 0 additions & 10 deletions Example/Example.xcworkspace/contents.xcworkspacedata

This file was deleted.

This file was deleted.

14 changes: 7 additions & 7 deletions Example/Example/ViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ class ViewController: UIViewController {

private var options: [String] {
let faker = Faker()

let names = (0...45)
.map { _ in faker.name.firstName().capitalized }

Expand All @@ -47,6 +46,11 @@ class ViewController: UIViewController {
}

private func setupRx() {
let imageSize = image.bounds.size
let imageURL: (String) -> URL = { text in
return URL(string: "https://fakeimg.pl/\(Int(imageSize.width))x\(Int(imageSize.height))/?text=\(text.addingPercentEncoding(withAllowedCharacters: .urlHostAllowed)!)&font=museo")!
}

Observable.just(options)
.bind(to: picker.rx.itemTitles) { $1 }
.disposed(by: disposeBag)
Expand All @@ -65,7 +69,7 @@ class ViewController: UIViewController {
selectedOption
.startWith("Select Option")
.map { $0 == "-- Select an Option" ? "Select Option" : $0 }
.map { self.imgURL(withText: $0, andSize: self.image.bounds.size) }
.map(imageURL)
.bind(to: image.kf.rx.image(options: [.transition(.fade(0.2)),
.keepCurrentImageWhileLoading,
.forceTransition]))
Expand All @@ -79,7 +83,7 @@ class ViewController: UIViewController {
self?.loader.isHidden = false
})
.withLatestFrom(selectedOption)
.map { self.imgURL(withText: $0, andSize: UIScreen.main.bounds.size) }
.map(imageURL)
.flatMapLatest { KingfisherManager.shared.rx.retrieveImage(with: $0) }
.observeOn(MainScheduler.instance)
.subscribe(onNext: { [weak self] image in
Expand All @@ -92,8 +96,4 @@ class ViewController: UIViewController {
})
.disposed(by: disposeBag)
}

private func imgURL(withText text: String, andSize size: CGSize) -> URL {
return URL(string: "https://fakeimg.pl/\(Int(size.width))x\(Int(size.height))/?text=\(text.addingPercentEncoding(withAllowedCharacters: .urlHostAllowed)!)&font=museo")!
}
}
1 change: 1 addition & 0 deletions Example/Podfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
target 'Example' do
use_frameworks!
platform :ios, '12.0'
inhibit_all_warnings!

pod 'RxKingfisher', :path => '../'
Expand Down
37 changes: 0 additions & 37 deletions Example/Podfile.lock

This file was deleted.

22 changes: 0 additions & 22 deletions Example/Pods/Fakery/LICENSE.md

This file was deleted.

Loading

0 comments on commit daf4c98

Please sign in to comment.