Skip to content

Commit f3d8f84

Browse files
Add Source Code
1 parent d917e54 commit f3d8f84

File tree

246 files changed

+32347
-2
lines changed

Some content is hidden

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

246 files changed

+32347
-2
lines changed

DnDRealm.zip

1.19 MB
Binary file not shown.

README.md

+30-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,31 @@
1-
# DnDRealm
1+
# Alamofire Advanced Techniques
22

3-
![Screen Shot 2020-06-13 at 10.22.42 PM](/Users/admin/Documents/Amr/Raywenderlich/Tryout/Article/Resources/additional/Screen Shot 2020-06-13 at 10.22.42 PM.png)
3+
4+
5+
![Feature_Image](https://raw.githubusercontent.com/amr-abdelfattah/DnDRealm/master/feature_image.png)
6+
7+
8+
9+
**Alamofire** is an essential networking tool for any iOS developer to have under their belt. The framework is elegantly written entirely in Swift.
10+
11+
In this app, you’ll explore the following topics using Alamofire:
12+
13+
- Building a scalable pattern for organizing your networking stack.
14+
- Handling different error responses.
15+
- Dealing with authentication APIs.
16+
- Setting a retry policy for request failures.
17+
- Dealing with different request types.
18+
- Tracking internet reachability status.
19+
20+
21+
22+
**DnDRealm** app lets you search for Dungeons and Dragons equipment and monsters using [DnD API](https://www.dnd5eapi.co/docs/#intro). Also, the app will feature fetching monster images using [Imgur API](https://apidocs.imgur.com/?version=latest#intro). And, you’ll implement images upload.
23+
24+
Ready to explore the Dungeons and Dragons realm? Time to check the **[tutorial]()**!
25+
26+
27+
28+
### Environment Setup
29+
30+
- Xcode 11
31+
- iOS 13

final/DnDRealm.xcodeproj/project.pbxproj

+633
Large diffs are not rendered by default.

final/DnDRealm.xcodeproj/project.xcworkspace/contents.xcworkspacedata

+7
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>IDEDidComputeMac32BitWarning</key>
6+
<true/>
7+
</dict>
8+
</plist>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>FILEHEADER</key>
6+
<string>/ Copyright (c) ___YEAR___ Razeware LLC
7+
///
8+
/// Permission is hereby granted, free of charge, to any person obtaining a copy
9+
/// of this software and associated documentation files (the "Software"), to deal
10+
/// in the Software without restriction, including without limitation the rights
11+
/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12+
/// copies of the Software, and to permit persons to whom the Software is
13+
/// furnished to do so, subject to the following conditions:
14+
///
15+
/// The above copyright notice and this permission notice shall be included in
16+
/// all copies or substantial portions of the Software.
17+
///
18+
/// Notwithstanding the foregoing, you may not use, copy, modify, merge, publish,
19+
/// distribute, sublicense, create a derivative work, and/or sell copies of the
20+
/// Software in any work that is designed, intended, or marketed for pedagogical or
21+
/// instructional purposes related to programming, coding, application development,
22+
/// or information technology. Permission for such use, copying, modification,
23+
/// merger, publication, distribution, sublicensing, creation of derivative works,
24+
/// or sale is expressly withheld.
25+
///
26+
/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
27+
/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
28+
/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
29+
/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
30+
/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
31+
/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
32+
/// THE SOFTWARE.</string>
33+
</dict>
34+
</plist>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<Scheme
3+
LastUpgradeVersion = "1100"
4+
version = "1.3">
5+
<BuildAction
6+
parallelizeBuildables = "YES"
7+
buildImplicitDependencies = "YES">
8+
<BuildActionEntries>
9+
<BuildActionEntry
10+
buildForTesting = "YES"
11+
buildForRunning = "YES"
12+
buildForProfiling = "YES"
13+
buildForArchiving = "YES"
14+
buildForAnalyzing = "YES">
15+
<BuildableReference
16+
BuildableIdentifier = "primary"
17+
BlueprintIdentifier = "D2A5F1FF1F4A9144005CD714"
18+
BuildableName = "DnDRealm.app"
19+
BlueprintName = "DnDRealm"
20+
ReferencedContainer = "container:DnDRealm.xcodeproj">
21+
</BuildableReference>
22+
</BuildActionEntry>
23+
</BuildActionEntries>
24+
</BuildAction>
25+
<TestAction
26+
buildConfiguration = "Debug"
27+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
28+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
29+
shouldUseLaunchSchemeArgsEnv = "YES">
30+
<Testables>
31+
</Testables>
32+
</TestAction>
33+
<LaunchAction
34+
buildConfiguration = "Debug"
35+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
36+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
37+
launchStyle = "0"
38+
useCustomWorkingDirectory = "NO"
39+
ignoresPersistentStateOnLaunch = "NO"
40+
debugDocumentVersioning = "YES"
41+
debugServiceExtension = "internal"
42+
allowLocationSimulation = "YES">
43+
<BuildableProductRunnable
44+
runnableDebuggingMode = "0">
45+
<BuildableReference
46+
BuildableIdentifier = "primary"
47+
BlueprintIdentifier = "D2A5F1FF1F4A9144005CD714"
48+
BuildableName = "DnDRealm.app"
49+
BlueprintName = "DnDRealm"
50+
ReferencedContainer = "container:DnDRealm.xcodeproj">
51+
</BuildableReference>
52+
</BuildableProductRunnable>
53+
</LaunchAction>
54+
<ProfileAction
55+
buildConfiguration = "Release"
56+
shouldUseLaunchSchemeArgsEnv = "YES"
57+
savedToolIdentifier = ""
58+
useCustomWorkingDirectory = "NO"
59+
debugDocumentVersioning = "YES">
60+
<BuildableProductRunnable
61+
runnableDebuggingMode = "0">
62+
<BuildableReference
63+
BuildableIdentifier = "primary"
64+
BlueprintIdentifier = "D2A5F1FF1F4A9144005CD714"
65+
BuildableName = "DnDRealm.app"
66+
BlueprintName = "DnDRealm"
67+
ReferencedContainer = "container:DnDRealm.xcodeproj">
68+
</BuildableReference>
69+
</BuildableProductRunnable>
70+
</ProfileAction>
71+
<AnalyzeAction
72+
buildConfiguration = "Debug">
73+
</AnalyzeAction>
74+
<ArchiveAction
75+
buildConfiguration = "Release"
76+
revealArchiveInOrganizer = "YES">
77+
</ArchiveAction>
78+
</Scheme>

final/DnDRealm.xcworkspace/contents.xcworkspacedata

+10
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>IDEDidComputeMac32BitWarning</key>
6+
<true/>
7+
</dict>
8+
</plist>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<Bucket
3+
uuid = "3F7C4D71-5D9B-4602-B61E-A59B42992CFA"
4+
type = "0"
5+
version = "2.0">
6+
</Bucket>

final/DnDRealm/AppDelegate.swift

+45
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
/// Copyright (c) 2019 Amr Elsayed
2+
///
3+
/// Permission is hereby granted, free of charge, to any person obtaining a copy
4+
/// of this software and associated documentation files (the "Software"), to deal
5+
/// in the Software without restriction, including without limitation the rights
6+
/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7+
/// copies of the Software, and to permit persons to whom the Software is
8+
/// furnished to do so, subject to the following conditions:
9+
///
10+
/// The above copyright notice and this permission notice shall be included in
11+
/// all copies or substantial portions of the Software.
12+
///
13+
/// Notwithstanding the foregoing, you may not use, copy, modify, merge, publish,
14+
/// distribute, sublicense, create a derivative work, and/or sell copies of the
15+
/// Software in any work that is designed, intended, or marketed for pedagogical or
16+
/// instructional purposes related to programming, coding, application development,
17+
/// or information technology. Permission for such use, copying, modification,
18+
/// merger, publication, distribution, sublicensing, creation of derivative works,
19+
/// or sale is expressly withheld.
20+
///
21+
/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
22+
/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
23+
/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
24+
/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
25+
/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
26+
/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
27+
/// THE SOFTWARE.
28+
29+
import UIKit
30+
31+
@UIApplicationMain
32+
class AppDelegate: UIResponder, UIApplicationDelegate {
33+
var window: UIWindow?
34+
}
35+
36+
// MARK: - TokenHandler
37+
extension AppDelegate: TokenHandler {
38+
func application(_ app: UIApplication,
39+
open url: URL,
40+
options: [UIApplication.OpenURLOptionsKey : Any] = [:])
41+
-> Bool {
42+
handleTokens(from: url)
43+
return true
44+
}
45+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
1+
{
2+
"images" : [
3+
{
4+
"size" : "20x20",
5+
"idiom" : "iphone",
6+
"filename" : "icon-app-20@2x.png",
7+
"scale" : "2x"
8+
},
9+
{
10+
"size" : "20x20",
11+
"idiom" : "iphone",
12+
"filename" : "icon-app-20@3x.png",
13+
"scale" : "3x"
14+
},
15+
{
16+
"size" : "29x29",
17+
"idiom" : "iphone",
18+
"filename" : "icon-app-29@2x.png",
19+
"scale" : "2x"
20+
},
21+
{
22+
"size" : "29x29",
23+
"idiom" : "iphone",
24+
"filename" : "icon-app-29@3x copy.png",
25+
"scale" : "3x"
26+
},
27+
{
28+
"size" : "40x40",
29+
"idiom" : "iphone",
30+
"filename" : "icon-app-40@2x.png",
31+
"scale" : "2x"
32+
},
33+
{
34+
"size" : "40x40",
35+
"idiom" : "iphone",
36+
"filename" : "icon-app-40@3x.png",
37+
"scale" : "3x"
38+
},
39+
{
40+
"size" : "60x60",
41+
"idiom" : "iphone",
42+
"filename" : "icon-app-60@2x.png",
43+
"scale" : "2x"
44+
},
45+
{
46+
"size" : "60x60",
47+
"idiom" : "iphone",
48+
"filename" : "icon-app-60@3x.png",
49+
"scale" : "3x"
50+
},
51+
{
52+
"size" : "20x20",
53+
"idiom" : "ipad",
54+
"filename" : "Icon20.png",
55+
"scale" : "1x"
56+
},
57+
{
58+
"size" : "20x20",
59+
"idiom" : "ipad",
60+
"filename" : "Icon20@2x.png",
61+
"scale" : "2x"
62+
},
63+
{
64+
"size" : "29x29",
65+
"idiom" : "ipad",
66+
"filename" : "Icon29.png",
67+
"scale" : "1x"
68+
},
69+
{
70+
"size" : "29x29",
71+
"idiom" : "ipad",
72+
"filename" : "Icon29@2x.png",
73+
"scale" : "2x"
74+
},
75+
{
76+
"size" : "40x40",
77+
"idiom" : "ipad",
78+
"filename" : "Icon40.png",
79+
"scale" : "1x"
80+
},
81+
{
82+
"size" : "40x40",
83+
"idiom" : "ipad",
84+
"filename" : "Icon40@2x.png",
85+
"scale" : "2x"
86+
},
87+
{
88+
"size" : "76x76",
89+
"idiom" : "ipad",
90+
"filename" : "Icon76.png",
91+
"scale" : "1x"
92+
},
93+
{
94+
"size" : "76x76",
95+
"idiom" : "ipad",
96+
"filename" : "Icon76@2x.png",
97+
"scale" : "2x"
98+
},
99+
{
100+
"size" : "83.5x83.5",
101+
"idiom" : "ipad",
102+
"filename" : "Icon83.5@2x.png",
103+
"scale" : "2x"
104+
},
105+
{
106+
"size" : "1024x1024",
107+
"idiom" : "ios-marketing",
108+
"filename" : "Icon1024.png",
109+
"scale" : "1x"
110+
}
111+
],
112+
"info" : {
113+
"version" : 1,
114+
"author" : "xcode"
115+
}
116+
}
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"info" : {
3+
"version" : 1,
4+
"author" : "xcode"
5+
}
6+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"info" : {
3+
"version" : 1,
4+
"author" : "xcode"
5+
}
6+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"info" : {
3+
"version" : 1,
4+
"author" : "xcode"
5+
},
6+
"colors" : [
7+
{
8+
"idiom" : "universal",
9+
"color" : {
10+
"color-space" : "srgb",
11+
"components" : {
12+
"red" : "0x33",
13+
"alpha" : "1.000",
14+
"blue" : "0x33",
15+
"green" : "0x33"
16+
}
17+
}
18+
}
19+
]
20+
}

0 commit comments

Comments
 (0)