Skip to content

Commit f494a0e

Browse files
committed
Swift 4 Release
1 parent b0b813d commit f494a0e

File tree

92 files changed

+1956
-1513
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

92 files changed

+1956
-1513
lines changed

AlamoRecord.podspec

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
Pod::Spec.new do |s|
33
s.name = 'AlamoRecord'
4-
s.version = '1.0.4'
4+
s.version = '1.1.0'
55
s.summary = 'An elegant Alamofire wrapper inspired by ActiveRecord.'
66
s.description = <<-DESC
77
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.
@@ -18,5 +18,5 @@ AlamoRecord is a powerful yet simple framework that eliminates the often complex
1818
s.watchos.deployment_target = '2.0'
1919

2020
s.source_files = 'AlamoRecord/Classes/**/*'
21-
s.dependency 'AlamofireObjectMapper', '~> 4.1'
21+
s.dependency 'AlamofireObjectMapper', '~> 5.0'
2222
end

Example/AlamoRecord.xcodeproj/project.pbxproj

Lines changed: 41 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -344,6 +344,7 @@
344344
CreatedOnToolsVersion = 8.3.2;
345345
LastSwiftMigration = 0830;
346346
ProvisioningStyle = Automatic;
347+
TestTargetID = 607FACCF1AFB9204008FA782;
347348
};
348349
607FACCF1AFB9204008FA782 = {
349350
CreatedOnToolsVersion = 6.3.1;
@@ -396,9 +397,26 @@
396397
files = (
397398
);
398399
inputPaths = (
400+
"${SRCROOT}/Pods/Target Support Files/Pods-AlamoRecord_Example/Pods-AlamoRecord_Example-frameworks.sh",
401+
"${BUILT_PRODUCTS_DIR}/AlamoRecord/AlamoRecord.framework",
402+
"${BUILT_PRODUCTS_DIR}/Alamofire/Alamofire.framework",
403+
"${BUILT_PRODUCTS_DIR}/AlamofireObjectMapper/AlamofireObjectMapper.framework",
404+
"${BUILT_PRODUCTS_DIR}/KeyboardSpy/KeyboardSpy.framework",
405+
"${BUILT_PRODUCTS_DIR}/MarqueeLabel/MarqueeLabel.framework",
406+
"${BUILT_PRODUCTS_DIR}/NotificationBannerSwift/NotificationBannerSwift.framework",
407+
"${BUILT_PRODUCTS_DIR}/ObjectMapper/ObjectMapper.framework",
408+
"${BUILT_PRODUCTS_DIR}/SnapKit/SnapKit.framework",
399409
);
400410
name = "[CP] Embed Pods Frameworks";
401411
outputPaths = (
412+
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/AlamoRecord.framework",
413+
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Alamofire.framework",
414+
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/AlamofireObjectMapper.framework",
415+
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/KeyboardSpy.framework",
416+
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MarqueeLabel.framework",
417+
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/NotificationBannerSwift.framework",
418+
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/ObjectMapper.framework",
419+
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SnapKit.framework",
402420
);
403421
runOnlyForDeploymentPostprocessing = 0;
404422
shellPath = /bin/sh;
@@ -411,13 +429,16 @@
411429
files = (
412430
);
413431
inputPaths = (
432+
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
433+
"${PODS_ROOT}/Manifest.lock",
414434
);
415435
name = "[CP] Check Pods Manifest.lock";
416436
outputPaths = (
437+
"$(DERIVED_FILE_DIR)/Pods-AlamoRecord_Example-checkManifestLockResult.txt",
417438
);
418439
runOnlyForDeploymentPostprocessing = 0;
419440
shellPath = /bin/sh;
420-
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";
441+
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";
421442
showEnvVarsInLog = 0;
422443
};
423444
704553F43CA6F79D9961802D /* [CP] Copy Pods Resources */ = {
@@ -441,13 +462,16 @@
441462
files = (
442463
);
443464
inputPaths = (
465+
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
466+
"${PODS_ROOT}/Manifest.lock",
444467
);
445468
name = "[CP] Check Pods Manifest.lock";
446469
outputPaths = (
470+
"$(DERIVED_FILE_DIR)/Pods-Tests-checkManifestLockResult.txt",
447471
);
448472
runOnlyForDeploymentPostprocessing = 0;
449473
shellPath = /bin/sh;
450-
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";
474+
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";
451475
showEnvVarsInLog = 0;
452476
};
453477
A4988286A4270C32B90B0EA3 /* [CP] Copy Pods Resources */ = {
@@ -471,9 +495,18 @@
471495
files = (
472496
);
473497
inputPaths = (
498+
"${SRCROOT}/Pods/Target Support Files/Pods-Tests/Pods-Tests-frameworks.sh",
499+
"${BUILT_PRODUCTS_DIR}/AlamoRecord/AlamoRecord.framework",
500+
"${BUILT_PRODUCTS_DIR}/Alamofire/Alamofire.framework",
501+
"${BUILT_PRODUCTS_DIR}/AlamofireObjectMapper/AlamofireObjectMapper.framework",
502+
"${BUILT_PRODUCTS_DIR}/ObjectMapper/ObjectMapper.framework",
474503
);
475504
name = "[CP] Embed Pods Frameworks";
476505
outputPaths = (
506+
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/AlamoRecord.framework",
507+
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Alamofire.framework",
508+
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/AlamofireObjectMapper.framework",
509+
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/ObjectMapper.framework",
477510
);
478511
runOnlyForDeploymentPostprocessing = 0;
479512
shellPath = /bin/sh;
@@ -578,7 +611,8 @@
578611
PRODUCT_NAME = "$(TARGET_NAME)";
579612
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
580613
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
581-
SWIFT_VERSION = 3.0;
614+
SWIFT_VERSION = 4.0;
615+
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/AlamoRecord_Example.app/AlamoRecord_Example";
582616
};
583617
name = Debug;
584618
};
@@ -595,7 +629,8 @@
595629
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
596630
PRODUCT_BUNDLE_IDENTIFIER = com.daltron.Tests;
597631
PRODUCT_NAME = "$(TARGET_NAME)";
598-
SWIFT_VERSION = 3.0;
632+
SWIFT_VERSION = 4.0;
633+
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/AlamoRecord_Example.app/AlamoRecord_Example";
599634
};
600635
name = Release;
601636
};
@@ -697,7 +732,7 @@
697732
MODULE_NAME = ExampleApp;
698733
PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.$(PRODUCT_NAME:rfc1034identifier)";
699734
PRODUCT_NAME = "$(TARGET_NAME)";
700-
SWIFT_VERSION = 3.0;
735+
SWIFT_VERSION = 4.0;
701736
};
702737
name = Debug;
703738
};
@@ -712,7 +747,7 @@
712747
MODULE_NAME = ExampleApp;
713748
PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.$(PRODUCT_NAME:rfc1034identifier)";
714749
PRODUCT_NAME = "$(TARGET_NAME)";
715-
SWIFT_VERSION = 3.0;
750+
SWIFT_VERSION = 4.0;
716751
};
717752
name = Release;
718753
};

Example/AlamoRecord/BaseTableViewCell.swift

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,14 @@ class BaseTableViewCell: UITableViewCell {
1515
}
1616

1717
internal var tableView: UITableView {
18-
return superview?.superview as! UITableView
18+
var view = superview
19+
while view != nil {
20+
if let tableView = view as? UITableView {
21+
return tableView
22+
}
23+
view = view?.superview
24+
}
25+
fatalError("tableView was not found for instance of BaseTableViewCell")
1926
}
2027

2128
internal var indexPath: IndexPath {

Example/AlamoRecord/Comment.swift

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,6 @@ class Comment: AlamoRecordObject<ApplicationURL, ApplicationError> {
2828
super.init(map: map)
2929
}
3030

31-
required public init?(coder aDecoder: NSCoder) {
32-
super.init(coder: aDecoder)
33-
}
34-
3531
override func mapping(map: Map) {
3632
super.mapping(map: map)
3733
postId <- map["postId"]

Example/AlamoRecord/CreatePostViewController.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ class CreatePostViewController: UIViewController {
4545
fatalError("init(coder:) has not been implemented")
4646
}
4747

48-
private dynamic func onSaveButtonPressed() {
48+
@objc private dynamic func onSaveButtonPressed() {
4949

5050
let title: String = createView.titleTextField.text ?? ""
5151
let body: String = createView.bodyTextView.text ?? ""

Example/AlamoRecord/PostCell.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,11 +118,11 @@ class PostCell: BaseTableViewCell {
118118
bodyLabel.text = post.body
119119
}
120120

121-
private dynamic func commentsButtonPressed() {
121+
@objc private dynamic func commentsButtonPressed() {
122122
delegate?.commentsButtonPressed(at: indexPath.row)
123123
}
124124

125-
private dynamic func destroyButtonPressed() {
125+
@objc private dynamic func destroyButtonPressed() {
126126
delegate?.destroyButtonPressed(at: indexPath.row)
127127
}
128128
}

Example/AlamoRecord/PostsViewController.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ class PostsViewController: UIViewController {
3535
fatalError("init(coder:) has not been implemented")
3636
}
3737

38-
private dynamic func onCreatePostButtonPressed() {
38+
@objc private dynamic func onCreatePostButtonPressed() {
3939
let createController = CreatePostViewController(delegate: self)
4040
navigationController?.pushViewController(createController, animated: true)
4141
}

Example/Podfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ platform :ios, '9.0'
44
target 'AlamoRecord_Example' do
55
pod 'AlamoRecord', :path => '../'
66
pod 'SnapKit'
7-
pod 'NotificationBannerSwift', :git => 'https://github.com/Daltron/NotificationBanner', :branch => 'master'
7+
pod 'NotificationBannerSwift'
88
pod 'KeyboardSpy'
99
end
1010

Example/Podfile.lock

Lines changed: 23 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,38 @@
11
PODS:
2-
- Alamofire (4.4.0)
3-
- AlamofireObjectMapper (4.1.0):
2+
- Alamofire (4.5.1)
3+
- AlamofireObjectMapper (5.0.0):
44
- Alamofire (~> 4.1)
5-
- ObjectMapper (~> 2.0)
6-
- AlamoRecord (1.0.0):
7-
- AlamofireObjectMapper (~> 4.1)
8-
- KeyboardSpy (1.0)
9-
- MarqueeLabel/Swift (3.1.0)
10-
- NotificationBannerSwift (1.4.0):
5+
- ObjectMapper (~> 3.0)
6+
- AlamoRecord (1.0.4):
7+
- AlamofireObjectMapper (~> 5.0)
8+
- KeyboardSpy (1.1)
9+
- MarqueeLabel/Swift (3.1.3)
10+
- NotificationBannerSwift (1.5.1):
1111
- MarqueeLabel/Swift
12-
- SnapKit (~> 3.2)
13-
- ObjectMapper (2.2.5)
14-
- SnapKit (3.2.0)
12+
- SnapKit (~> 4.0)
13+
- ObjectMapper (3.0.0)
14+
- SnapKit (4.0.0)
1515

1616
DEPENDENCIES:
1717
- AlamoRecord (from `../`)
1818
- KeyboardSpy
19-
- NotificationBannerSwift (from `https://github.com/Daltron/NotificationBanner`, branch `master`)
19+
- NotificationBannerSwift
2020
- SnapKit
2121

2222
EXTERNAL SOURCES:
2323
AlamoRecord:
24-
:path: "../"
25-
NotificationBannerSwift:
26-
:branch: master
27-
:git: https://github.com/Daltron/NotificationBanner
28-
29-
CHECKOUT OPTIONS:
30-
NotificationBannerSwift:
31-
:commit: 5049c7454a61048846b754c9d11884d427d5965d
32-
:git: https://github.com/Daltron/NotificationBanner
24+
:path: ../
3325

3426
SPEC CHECKSUMS:
35-
Alamofire: dc44b1600b800eb63da6a19039a0083d62a6a62d
36-
AlamofireObjectMapper: 435adc82f5b367679bd9e71c4974a54efd0b2521
37-
AlamoRecord: 446894ecda4ab00b76d241f7ea75c6dfaaf3638f
38-
KeyboardSpy: edb2ab362c69d4b98b41b5a46b773e65209c2b87
39-
MarqueeLabel: 061d04687ee5485ac035b45c8e292274a87afe01
40-
NotificationBannerSwift: 24070736129e9ccc6614c0a91d09c04e7080ddd1
41-
ObjectMapper: fb30f71e08470d1e5a20b199fafe1246281db898
42-
SnapKit: 1ca44df72cfa543218d177cb8aab029d10d86ea7
27+
Alamofire: 2d95912bf4c34f164fdfc335872e8c312acaea4a
28+
AlamofireObjectMapper: 5fafc816351cbbc0d486611aaeba7461c0cbad49
29+
AlamoRecord: 3b9bd697dea11d12b33b19da3d55165201c7e290
30+
KeyboardSpy: 4552ddd413d3b856b3b396422fccb8e1b3008524
31+
MarqueeLabel: baa5753dcbd36dca080e1f5c589a665aa5c906f1
32+
NotificationBannerSwift: 666e6c392238561c17a52db4c50e6f00d9942e0d
33+
ObjectMapper: 92230db59bf8f341a5c3a3cf0b9fbdde3cf0d87f
34+
SnapKit: a42d492c16e80209130a3379f73596c3454b7694
4335

44-
PODFILE CHECKSUM: f1d345afa4d2a4f473d0da7d393116df11e67c67
36+
PODFILE CHECKSUM: 3f63a2fa4d48882e49f031da151d69b53b92a842
4537

46-
COCOAPODS: 1.2.1
38+
COCOAPODS: 1.3.1

Example/Pods/Alamofire/LICENSE

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)