Skip to content

Commit a396a2b

Browse files
committed
Merge branch 'master' of github.com:bmoliveira/Moya-ObjectMapper
2 parents 7bd13d4 + 5997ddf commit a396a2b

52 files changed

Lines changed: 1724 additions & 2148 deletions

Some content is hidden

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

.DS_Store

-6 KB
Binary file not shown.

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ DerivedData
1717
*.ipa
1818
*.xcuserstate
1919

20+
**.DS_Store
21+
22+
**/xcshareddata/*
23+
2024
# CocoaPods
2125
#
2226
# We recommend against adding the Pods directory to your .gitignore. However

.swift-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
4.0
1+
4.1

Moya-ObjectMapper.podspec

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,23 +7,23 @@ Pod::Spec.new do |s|
77
[Moya](https://github.com/Moya/Moya) for easier JSON serialization.
88
Includes [RxSwift](https://github.com/ReactiveX/RxSwift/) bindings as well.
99
Instructions on how to use it are in
10-
[the README](https://github.com/ivanbruel/Moya-ObjectMapper).
10+
[the README](https://github.com/bmoliveira/Moya-ObjectMapper).
1111
EOS
12-
s.homepage = "https://github.com/ivanbruel/Moya-ObjectMapper"
12+
s.homepage = "https://github.com/bmoliveira/Moya-ObjectMapper"
1313
s.license = { :type => "MIT", :file => "LICENSE" }
1414
s.author = { "Ivan Bruel" => "ivan.bruel@gmail.com" }
1515
s.social_media_url = "http://twitter.com/ivanbruel"
1616
s.ios.deployment_target = '8.0'
1717
s.osx.deployment_target = '10.10'
1818
s.watchos.deployment_target = '2.0'
1919
s.tvos.deployment_target = '9.0'
20-
s.source = { :git => "https://github.com/ivanbruel/Moya-ObjectMapper.git", :tag => s.version }
20+
s.source = { :git => "https://github.com/bmoliveira/Moya-ObjectMapper.git", :tag => s.version }
2121
s.default_subspec = "Core"
2222

2323
s.subspec "Core" do |ss|
2424
ss.source_files = "Source/*.swift"
25-
ss.dependency "Moya", '~> 11.0.0'
26-
ss.dependency "ObjectMapper", '~> 3.1.0'
25+
ss.dependency "Moya", '~> 11'
26+
ss.dependency "ObjectMapper", '~> 3.2'
2727
ss.framework = "Foundation"
2828
end
2929

@@ -35,9 +35,9 @@ Pod::Spec.new do |s|
3535

3636
s.subspec "ReactiveSwift" do |ss|
3737
ss.source_files = "Source/ReactiveSwift/*.swift"
38-
ss.dependency "Moya/ReactiveSwift"
39-
ss.dependency "Moya-ObjectMapper/Core"
40-
ss.dependency "ReactiveSwift"
38+
ss.dependency "Moya-ObjectMapper/Core"
39+
ss.dependency "Moya/ReactiveSwift", '11'
40+
ss.dependency "ReactiveSwift", "~> 3"
4141
end
4242

4343
end

Sample/Demo.xcodeproj/project.pbxproj

100755100644
Lines changed: 31 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77
objects = {
88

99
/* Begin PBXBuildFile section */
10+
2C03A4FA225ABD30A52319DF /* Pods_Demo.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0DEACC1B170325A1B3229E7D /* Pods_Demo.framework */; };
1011
306F6BF71D22BCEB00F727A6 /* Repository.swift in Sources */ = {isa = PBXBuildFile; fileRef = 306F6BF61D22BCEB00F727A6 /* Repository.swift */; };
1112
306F6BF91D22BCF400F727A6 /* Owner.swift in Sources */ = {isa = PBXBuildFile; fileRef = 306F6BF81D22BCF400F727A6 /* Owner.swift */; };
12-
521DB71E4521C30937D31002 /* Pods_Demo.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7F085545331D285A743E7F1A /* Pods_Demo.framework */; };
1313
5EC197E61A1BB16D00F4DFD4 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5EC197E51A1BB16D00F4DFD4 /* AppDelegate.swift */; };
1414
5EC197E81A1BB16D00F4DFD4 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5EC197E71A1BB16D00F4DFD4 /* ViewController.swift */; };
1515
5EC197ED1A1BB16D00F4DFD4 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 5EC197EB1A1BB16D00F4DFD4 /* Main.storyboard */; };
@@ -19,7 +19,7 @@
1919
/* End PBXBuildFile section */
2020

2121
/* Begin PBXFileReference section */
22-
1A8B0F00D6903A046FE40BCE /* Pods-Demo.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Demo.debug.xcconfig"; path = "Pods/Target Support Files/Pods-Demo/Pods-Demo.debug.xcconfig"; sourceTree = "<group>"; };
22+
0DEACC1B170325A1B3229E7D /* Pods_Demo.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Demo.framework; sourceTree = BUILT_PRODUCTS_DIR; };
2323
306F6BF61D22BCEB00F727A6 /* Repository.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Repository.swift; sourceTree = "<group>"; };
2424
306F6BF81D22BCF400F727A6 /* Owner.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Owner.swift; sourceTree = "<group>"; };
2525
5EC197E01A1BB16D00F4DFD4 /* Demo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Demo.app; sourceTree = BUILT_PRODUCTS_DIR; };
@@ -31,16 +31,16 @@
3131
5EC197F11A1BB16D00F4DFD4 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = "<group>"; };
3232
5EC198071A1BB24600F4DFD4 /* GitHubAPI.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GitHubAPI.swift; sourceTree = "<group>"; };
3333
635CFFB539B0C7F414CAD726 /* Pods.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods.framework; sourceTree = BUILT_PRODUCTS_DIR; };
34-
7F085545331D285A743E7F1A /* Pods_Demo.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Demo.framework; sourceTree = BUILT_PRODUCTS_DIR; };
35-
DA16C882BAE6DD181ECC3404 /* Pods-Demo.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Demo.release.xcconfig"; path = "Pods/Target Support Files/Pods-Demo/Pods-Demo.release.xcconfig"; sourceTree = "<group>"; };
34+
CD20544C24FF3FCFF2972156 /* Pods-Demo.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Demo.release.xcconfig"; path = "Pods/Target Support Files/Pods-Demo/Pods-Demo.release.xcconfig"; sourceTree = "<group>"; };
35+
F5109BA8CDB327EBFFB2B886 /* Pods-Demo.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Demo.debug.xcconfig"; path = "Pods/Target Support Files/Pods-Demo/Pods-Demo.debug.xcconfig"; sourceTree = "<group>"; };
3636
/* End PBXFileReference section */
3737

3838
/* Begin PBXFrameworksBuildPhase section */
3939
5EC197DD1A1BB16D00F4DFD4 /* Frameworks */ = {
4040
isa = PBXFrameworksBuildPhase;
4141
buildActionMask = 2147483647;
4242
files = (
43-
521DB71E4521C30937D31002 /* Pods_Demo.framework in Frameworks */,
43+
2C03A4FA225ABD30A52319DF /* Pods_Demo.framework in Frameworks */,
4444
);
4545
runOnlyForDeploymentPostprocessing = 0;
4646
};
@@ -51,7 +51,7 @@
5151
isa = PBXGroup;
5252
children = (
5353
635CFFB539B0C7F414CAD726 /* Pods.framework */,
54-
7F085545331D285A743E7F1A /* Pods_Demo.framework */,
54+
0DEACC1B170325A1B3229E7D /* Pods_Demo.framework */,
5555
);
5656
name = Frameworks;
5757
sourceTree = "<group>";
@@ -62,7 +62,7 @@
6262
5EC197E21A1BB16D00F4DFD4 /* Demo */,
6363
5EC197E11A1BB16D00F4DFD4 /* Products */,
6464
4EA28E847926FEF1338D42F3 /* Frameworks */,
65-
DCF4853FDA33398F3D169700 /* Pods */,
65+
CC6049526CF48DF0AF49CA41 /* Pods */,
6666
);
6767
sourceTree = "<group>";
6868
};
@@ -98,11 +98,11 @@
9898
name = "Supporting Files";
9999
sourceTree = "<group>";
100100
};
101-
DCF4853FDA33398F3D169700 /* Pods */ = {
101+
CC6049526CF48DF0AF49CA41 /* Pods */ = {
102102
isa = PBXGroup;
103103
children = (
104-
1A8B0F00D6903A046FE40BCE /* Pods-Demo.debug.xcconfig */,
105-
DA16C882BAE6DD181ECC3404 /* Pods-Demo.release.xcconfig */,
104+
F5109BA8CDB327EBFFB2B886 /* Pods-Demo.debug.xcconfig */,
105+
CD20544C24FF3FCFF2972156 /* Pods-Demo.release.xcconfig */,
106106
);
107107
name = Pods;
108108
sourceTree = "<group>";
@@ -114,12 +114,11 @@
114114
isa = PBXNativeTarget;
115115
buildConfigurationList = 5EC198011A1BB16D00F4DFD4 /* Build configuration list for PBXNativeTarget "Demo" */;
116116
buildPhases = (
117-
9B2248C62406490041BDC8AD /* [CP] Check Pods Manifest.lock */,
117+
DDC41A97AF7DDDBD9D2576BB /* [CP] Check Pods Manifest.lock */,
118118
5EC197DC1A1BB16D00F4DFD4 /* Sources */,
119119
5EC197DD1A1BB16D00F4DFD4 /* Frameworks */,
120120
5EC197DE1A1BB16D00F4DFD4 /* Resources */,
121-
9C291DA5D8E32DC7E23D2181 /* [CP] Embed Pods Frameworks */,
122-
F04DFE5CA20273999AD3505F /* [CP] Copy Pods Resources */,
121+
0070D1CEB2B95F5B0BD22589 /* [CP] Embed Pods Frameworks */,
123122
);
124123
buildRules = (
125124
);
@@ -138,13 +137,13 @@
138137
attributes = {
139138
LastSwiftMigration = 0700;
140139
LastSwiftUpdateCheck = 0710;
141-
LastUpgradeCheck = 0900;
140+
LastUpgradeCheck = 0940;
142141
ORGANIZATIONNAME = "Ash Furrow";
143142
TargetAttributes = {
144143
5EC197DF1A1BB16D00F4DFD4 = {
145144
CreatedOnToolsVersion = 6.1.1;
146145
DevelopmentTeam = 552H65R858;
147-
LastSwiftMigration = 0800;
146+
LastSwiftMigration = 0940;
148147
};
149148
};
150149
};
@@ -180,25 +179,7 @@
180179
/* End PBXResourcesBuildPhase section */
181180

182181
/* Begin PBXShellScriptBuildPhase section */
183-
9B2248C62406490041BDC8AD /* [CP] Check Pods Manifest.lock */ = {
184-
isa = PBXShellScriptBuildPhase;
185-
buildActionMask = 2147483647;
186-
files = (
187-
);
188-
inputPaths = (
189-
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
190-
"${PODS_ROOT}/Manifest.lock",
191-
);
192-
name = "[CP] Check Pods Manifest.lock";
193-
outputPaths = (
194-
"$(DERIVED_FILE_DIR)/Pods-Demo-checkManifestLockResult.txt",
195-
);
196-
runOnlyForDeploymentPostprocessing = 0;
197-
shellPath = /bin/sh;
198-
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";
199-
showEnvVarsInLog = 0;
200-
};
201-
9C291DA5D8E32DC7E23D2181 /* [CP] Embed Pods Frameworks */ = {
182+
0070D1CEB2B95F5B0BD22589 /* [CP] Embed Pods Frameworks */ = {
202183
isa = PBXShellScriptBuildPhase;
203184
buildActionMask = 2147483647;
204185
files = (
@@ -226,19 +207,22 @@
226207
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-Demo/Pods-Demo-frameworks.sh\"\n";
227208
showEnvVarsInLog = 0;
228209
};
229-
F04DFE5CA20273999AD3505F /* [CP] Copy Pods Resources */ = {
210+
DDC41A97AF7DDDBD9D2576BB /* [CP] Check Pods Manifest.lock */ = {
230211
isa = PBXShellScriptBuildPhase;
231212
buildActionMask = 2147483647;
232213
files = (
233214
);
234215
inputPaths = (
216+
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
217+
"${PODS_ROOT}/Manifest.lock",
235218
);
236-
name = "[CP] Copy Pods Resources";
219+
name = "[CP] Check Pods Manifest.lock";
237220
outputPaths = (
221+
"$(DERIVED_FILE_DIR)/Pods-Demo-checkManifestLockResult.txt",
238222
);
239223
runOnlyForDeploymentPostprocessing = 0;
240224
shellPath = /bin/sh;
241-
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-Demo/Pods-Demo-resources.sh\"\n";
225+
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";
242226
showEnvVarsInLog = 0;
243227
};
244228
/* End PBXShellScriptBuildPhase section */
@@ -290,12 +274,14 @@
290274
CLANG_WARN_BOOL_CONVERSION = YES;
291275
CLANG_WARN_COMMA = YES;
292276
CLANG_WARN_CONSTANT_CONVERSION = YES;
277+
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
293278
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
294279
CLANG_WARN_EMPTY_BODY = YES;
295280
CLANG_WARN_ENUM_CONVERSION = YES;
296281
CLANG_WARN_INFINITE_RECURSION = YES;
297282
CLANG_WARN_INT_CONVERSION = YES;
298283
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
284+
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
299285
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
300286
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
301287
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
@@ -342,12 +328,14 @@
342328
CLANG_WARN_BOOL_CONVERSION = YES;
343329
CLANG_WARN_COMMA = YES;
344330
CLANG_WARN_CONSTANT_CONVERSION = YES;
331+
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
345332
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
346333
CLANG_WARN_EMPTY_BODY = YES;
347334
CLANG_WARN_ENUM_CONVERSION = YES;
348335
CLANG_WARN_INFINITE_RECURSION = YES;
349336
CLANG_WARN_INT_CONVERSION = YES;
350337
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
338+
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
351339
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
352340
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
353341
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
@@ -377,7 +365,7 @@
377365
};
378366
5EC198021A1BB16D00F4DFD4 /* Debug */ = {
379367
isa = XCBuildConfiguration;
380-
baseConfigurationReference = 1A8B0F00D6903A046FE40BCE /* Pods-Demo.debug.xcconfig */;
368+
baseConfigurationReference = F5109BA8CDB327EBFFB2B886 /* Pods-Demo.debug.xcconfig */;
381369
buildSettings = {
382370
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
383371
DEVELOPMENT_TEAM = 552H65R858;
@@ -386,13 +374,14 @@
386374
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
387375
PRODUCT_BUNDLE_IDENTIFIER = "com.ashfurrow.$(PRODUCT_NAME:rfc1034identifier)";
388376
PRODUCT_NAME = "$(TARGET_NAME)";
389-
SWIFT_VERSION = 3.0;
377+
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
378+
SWIFT_VERSION = 4.0;
390379
};
391380
name = Debug;
392381
};
393382
5EC198031A1BB16D00F4DFD4 /* Release */ = {
394383
isa = XCBuildConfiguration;
395-
baseConfigurationReference = DA16C882BAE6DD181ECC3404 /* Pods-Demo.release.xcconfig */;
384+
baseConfigurationReference = CD20544C24FF3FCFF2972156 /* Pods-Demo.release.xcconfig */;
396385
buildSettings = {
397386
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
398387
DEVELOPMENT_TEAM = 552H65R858;
@@ -401,7 +390,8 @@
401390
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
402391
PRODUCT_BUNDLE_IDENTIFIER = "com.ashfurrow.$(PRODUCT_NAME:rfc1034identifier)";
403392
PRODUCT_NAME = "$(TARGET_NAME)";
404-
SWIFT_VERSION = 3.0;
393+
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
394+
SWIFT_VERSION = 4.0;
405395
};
406396
name = Release;
407397
};

Sample/Demo/ViewController.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,10 @@ class ViewController: UITableViewController {
3333
}
3434
self.tableView.reloadData()
3535
case let .failure(error):
36-
guard let error = error as? CustomStringConvertible else {
36+
guard let description = error.errorDescription else {
3737
break
3838
}
39-
message = error.description
39+
message = description
4040
success = false
4141
}
4242

@@ -101,7 +101,7 @@ class ViewController: UITableViewController {
101101
let cell = tableView.dequeueReusableCell(withIdentifier: "Cell", for: indexPath) as UITableViewCell
102102

103103
let repo = repos[(indexPath as NSIndexPath).row]
104-
(cell.textLabel as UILabel!).text = repo.name
104+
cell.textLabel?.text = repo.name
105105
return cell
106106
}
107107
}

Sample/Podfile

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,20 @@ use_frameworks!
55
# Our Libraries
66
def libraries
77
pod 'Moya-ObjectMapper', :path => "../"
8-
#pod 'Moya-ObjectMapper/ReactiveCocoa', :path => "../"
8+
end
9+
10+
def libraries_rx_swift
911
pod 'Moya-ObjectMapper/RxSwift', :path => "../"
10-
pod 'ObjectMapper', :git => 'https://github.com/Hearst-DD/ObjectMapper'
12+
end
13+
14+
def libraries_reactive_cocoa
15+
pod 'Moya-ObjectMapper/ReactiveCocoa', :path => "../"
16+
pod 'ReactiveSwift', :git => 'https://github.com/ReactiveCocoa/ReactiveSwift'
17+
end
18+
19+
def required_pods
20+
pod 'ObjectMapper' #, :git => 'https://github.com/Hearst-DD/ObjectMapper'
1121
pod 'Moya' #, :git => 'https://github.com/Moya/Moya'
12-
#pod 'ReactiveSwift', :git => 'https://github.com/ReactiveCocoa/ReactiveSwift'
1322
pod 'RxSwift' #, :git => 'https://github.com/ReactiveX/RxSwift'
1423
end
1524

@@ -22,5 +31,7 @@ end
2231

2332
target 'Demo' do
2433
platform :ios, '9.0'
34+
required_pods
2535
libraries
36+
libraries_rx_swift
2637
end

0 commit comments

Comments
 (0)