Skip to content

Commit

Permalink
Swift 4 Release
Browse files Browse the repository at this point in the history
  • Loading branch information
Daltron committed Oct 3, 2017
1 parent b0b813d commit f494a0e
Show file tree
Hide file tree
Showing 92 changed files with 1,956 additions and 1,513 deletions.
4 changes: 2 additions & 2 deletions AlamoRecord.podspec
@@ -1,7 +1,7 @@

Pod::Spec.new do |s|
s.name = 'AlamoRecord'
s.version = '1.0.4'
s.version = '1.1.0'
s.summary = 'An elegant Alamofire wrapper inspired by ActiveRecord.'
s.description = <<-DESC
AlamoRecord is a powerful yet simple framework that eliminates the often complex networking layer that exists between your networking framework and your application. AlamoRecord uses the power of AlamoFire, AlamofireObjectMapper and the concepts behind the ActiveRecord pattern to create a networking layer that makes interacting with your API easier than ever.
Expand All @@ -18,5 +18,5 @@ AlamoRecord is a powerful yet simple framework that eliminates the often complex
s.watchos.deployment_target = '2.0'

s.source_files = 'AlamoRecord/Classes/**/*'
s.dependency 'AlamofireObjectMapper', '~> 4.1'
s.dependency 'AlamofireObjectMapper', '~> 5.0'
end
47 changes: 41 additions & 6 deletions Example/AlamoRecord.xcodeproj/project.pbxproj
Expand Up @@ -344,6 +344,7 @@
CreatedOnToolsVersion = 8.3.2;
LastSwiftMigration = 0830;
ProvisioningStyle = Automatic;
TestTargetID = 607FACCF1AFB9204008FA782;
};
607FACCF1AFB9204008FA782 = {
CreatedOnToolsVersion = 6.3.1;
Expand Down Expand Up @@ -396,9 +397,26 @@
files = (
);
inputPaths = (
"${SRCROOT}/Pods/Target Support Files/Pods-AlamoRecord_Example/Pods-AlamoRecord_Example-frameworks.sh",
"${BUILT_PRODUCTS_DIR}/AlamoRecord/AlamoRecord.framework",
"${BUILT_PRODUCTS_DIR}/Alamofire/Alamofire.framework",
"${BUILT_PRODUCTS_DIR}/AlamofireObjectMapper/AlamofireObjectMapper.framework",
"${BUILT_PRODUCTS_DIR}/KeyboardSpy/KeyboardSpy.framework",
"${BUILT_PRODUCTS_DIR}/MarqueeLabel/MarqueeLabel.framework",
"${BUILT_PRODUCTS_DIR}/NotificationBannerSwift/NotificationBannerSwift.framework",
"${BUILT_PRODUCTS_DIR}/ObjectMapper/ObjectMapper.framework",
"${BUILT_PRODUCTS_DIR}/SnapKit/SnapKit.framework",
);
name = "[CP] Embed Pods Frameworks";
outputPaths = (
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/AlamoRecord.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Alamofire.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/AlamofireObjectMapper.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/KeyboardSpy.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MarqueeLabel.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/NotificationBannerSwift.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/ObjectMapper.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SnapKit.framework",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
Expand All @@ -411,13 +429,16 @@
files = (
);
inputPaths = (
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
"${PODS_ROOT}/Manifest.lock",
);
name = "[CP] Check Pods Manifest.lock";
outputPaths = (
"$(DERIVED_FILE_DIR)/Pods-AlamoRecord_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";
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;
};
704553F43CA6F79D9961802D /* [CP] Copy Pods Resources */ = {
Expand All @@ -441,13 +462,16 @@
files = (
);
inputPaths = (
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
"${PODS_ROOT}/Manifest.lock",
);
name = "[CP] Check Pods Manifest.lock";
outputPaths = (
"$(DERIVED_FILE_DIR)/Pods-Tests-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";
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;
};
A4988286A4270C32B90B0EA3 /* [CP] Copy Pods Resources */ = {
Expand All @@ -471,9 +495,18 @@
files = (
);
inputPaths = (
"${SRCROOT}/Pods/Target Support Files/Pods-Tests/Pods-Tests-frameworks.sh",
"${BUILT_PRODUCTS_DIR}/AlamoRecord/AlamoRecord.framework",
"${BUILT_PRODUCTS_DIR}/Alamofire/Alamofire.framework",
"${BUILT_PRODUCTS_DIR}/AlamofireObjectMapper/AlamofireObjectMapper.framework",
"${BUILT_PRODUCTS_DIR}/ObjectMapper/ObjectMapper.framework",
);
name = "[CP] Embed Pods Frameworks";
outputPaths = (
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/AlamoRecord.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Alamofire.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/AlamofireObjectMapper.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/ObjectMapper.framework",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
Expand Down Expand Up @@ -578,7 +611,8 @@
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 3.0;
SWIFT_VERSION = 4.0;
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/AlamoRecord_Example.app/AlamoRecord_Example";
};
name = Debug;
};
Expand All @@ -595,7 +629,8 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.daltron.Tests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 3.0;
SWIFT_VERSION = 4.0;
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/AlamoRecord_Example.app/AlamoRecord_Example";
};
name = Release;
};
Expand Down Expand Up @@ -697,7 +732,7 @@
MODULE_NAME = ExampleApp;
PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 3.0;
SWIFT_VERSION = 4.0;
};
name = Debug;
};
Expand All @@ -712,7 +747,7 @@
MODULE_NAME = ExampleApp;
PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 3.0;
SWIFT_VERSION = 4.0;
};
name = Release;
};
Expand Down
9 changes: 8 additions & 1 deletion Example/AlamoRecord/BaseTableViewCell.swift
Expand Up @@ -15,7 +15,14 @@ class BaseTableViewCell: UITableViewCell {
}

internal var tableView: UITableView {
return superview?.superview as! UITableView
var view = superview
while view != nil {
if let tableView = view as? UITableView {
return tableView
}
view = view?.superview
}
fatalError("tableView was not found for instance of BaseTableViewCell")
}

internal var indexPath: IndexPath {
Expand Down
4 changes: 0 additions & 4 deletions Example/AlamoRecord/Comment.swift
Expand Up @@ -28,10 +28,6 @@ class Comment: AlamoRecordObject<ApplicationURL, ApplicationError> {
super.init(map: map)
}

required public init?(coder aDecoder: NSCoder) {
super.init(coder: aDecoder)
}

override func mapping(map: Map) {
super.mapping(map: map)
postId <- map["postId"]
Expand Down
2 changes: 1 addition & 1 deletion Example/AlamoRecord/CreatePostViewController.swift
Expand Up @@ -45,7 +45,7 @@ class CreatePostViewController: UIViewController {
fatalError("init(coder:) has not been implemented")
}

private dynamic func onSaveButtonPressed() {
@objc private dynamic func onSaveButtonPressed() {

let title: String = createView.titleTextField.text ?? ""
let body: String = createView.bodyTextView.text ?? ""
Expand Down
4 changes: 2 additions & 2 deletions Example/AlamoRecord/PostCell.swift
Expand Up @@ -118,11 +118,11 @@ class PostCell: BaseTableViewCell {
bodyLabel.text = post.body
}

private dynamic func commentsButtonPressed() {
@objc private dynamic func commentsButtonPressed() {
delegate?.commentsButtonPressed(at: indexPath.row)
}

private dynamic func destroyButtonPressed() {
@objc private dynamic func destroyButtonPressed() {
delegate?.destroyButtonPressed(at: indexPath.row)
}
}
2 changes: 1 addition & 1 deletion Example/AlamoRecord/PostsViewController.swift
Expand Up @@ -35,7 +35,7 @@ class PostsViewController: UIViewController {
fatalError("init(coder:) has not been implemented")
}

private dynamic func onCreatePostButtonPressed() {
@objc private dynamic func onCreatePostButtonPressed() {
let createController = CreatePostViewController(delegate: self)
navigationController?.pushViewController(createController, animated: true)
}
Expand Down
2 changes: 1 addition & 1 deletion Example/Podfile
Expand Up @@ -4,7 +4,7 @@ platform :ios, '9.0'
target 'AlamoRecord_Example' do
pod 'AlamoRecord', :path => '../'
pod 'SnapKit'
pod 'NotificationBannerSwift', :git => 'https://github.com/Daltron/NotificationBanner', :branch => 'master'
pod 'NotificationBannerSwift'
pod 'KeyboardSpy'
end

Expand Down
54 changes: 23 additions & 31 deletions Example/Podfile.lock
@@ -1,46 +1,38 @@
PODS:
- Alamofire (4.4.0)
- AlamofireObjectMapper (4.1.0):
- Alamofire (4.5.1)
- AlamofireObjectMapper (5.0.0):
- Alamofire (~> 4.1)
- ObjectMapper (~> 2.0)
- AlamoRecord (1.0.0):
- AlamofireObjectMapper (~> 4.1)
- KeyboardSpy (1.0)
- MarqueeLabel/Swift (3.1.0)
- NotificationBannerSwift (1.4.0):
- ObjectMapper (~> 3.0)
- AlamoRecord (1.0.4):
- AlamofireObjectMapper (~> 5.0)
- KeyboardSpy (1.1)
- MarqueeLabel/Swift (3.1.3)
- NotificationBannerSwift (1.5.1):
- MarqueeLabel/Swift
- SnapKit (~> 3.2)
- ObjectMapper (2.2.5)
- SnapKit (3.2.0)
- SnapKit (~> 4.0)
- ObjectMapper (3.0.0)
- SnapKit (4.0.0)

DEPENDENCIES:
- AlamoRecord (from `../`)
- KeyboardSpy
- NotificationBannerSwift (from `https://github.com/Daltron/NotificationBanner`, branch `master`)
- NotificationBannerSwift
- SnapKit

EXTERNAL SOURCES:
AlamoRecord:
:path: "../"
NotificationBannerSwift:
:branch: master
:git: https://github.com/Daltron/NotificationBanner

CHECKOUT OPTIONS:
NotificationBannerSwift:
:commit: 5049c7454a61048846b754c9d11884d427d5965d
:git: https://github.com/Daltron/NotificationBanner
:path: ../

SPEC CHECKSUMS:
Alamofire: dc44b1600b800eb63da6a19039a0083d62a6a62d
AlamofireObjectMapper: 435adc82f5b367679bd9e71c4974a54efd0b2521
AlamoRecord: 446894ecda4ab00b76d241f7ea75c6dfaaf3638f
KeyboardSpy: edb2ab362c69d4b98b41b5a46b773e65209c2b87
MarqueeLabel: 061d04687ee5485ac035b45c8e292274a87afe01
NotificationBannerSwift: 24070736129e9ccc6614c0a91d09c04e7080ddd1
ObjectMapper: fb30f71e08470d1e5a20b199fafe1246281db898
SnapKit: 1ca44df72cfa543218d177cb8aab029d10d86ea7
Alamofire: 2d95912bf4c34f164fdfc335872e8c312acaea4a
AlamofireObjectMapper: 5fafc816351cbbc0d486611aaeba7461c0cbad49
AlamoRecord: 3b9bd697dea11d12b33b19da3d55165201c7e290
KeyboardSpy: 4552ddd413d3b856b3b396422fccb8e1b3008524
MarqueeLabel: baa5753dcbd36dca080e1f5c589a665aa5c906f1
NotificationBannerSwift: 666e6c392238561c17a52db4c50e6f00d9942e0d
ObjectMapper: 92230db59bf8f341a5c3a3cf0b9fbdde3cf0d87f
SnapKit: a42d492c16e80209130a3379f73596c3454b7694

PODFILE CHECKSUM: f1d345afa4d2a4f473d0da7d393116df11e67c67
PODFILE CHECKSUM: 3f63a2fa4d48882e49f031da151d69b53b92a842

COCOAPODS: 1.2.1
COCOAPODS: 1.3.1
2 changes: 1 addition & 1 deletion Example/Pods/Alamofire/LICENSE

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

0 comments on commit f494a0e

Please sign in to comment.