Skip to content

Commit 2ddd1c9

Browse files
committed
Añadidos cambios a la app para sacar la API key del proyecto en un plist de claves
1 parent 2c2ba36 commit 2ddd1c9

File tree

17 files changed

+569
-66
lines changed

17 files changed

+569
-66
lines changed

.gitignore

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
# Xcode
2+
#
3+
# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore
4+
5+
## User settings
6+
xcuserdata/
7+
8+
## API keys
9+
/Clima/Keys.plist
10+
11+
12+
## compatibility with Xcode 8 and earlier (ignoring not required starting Xcode 9)
13+
*.xcscmblueprint
14+
*.xccheckout
15+
16+
## compatibility with Xcode 3 and earlier (ignoring not required starting Xcode 4)
17+
build/
18+
DerivedData/
19+
*.moved-aside
20+
*.pbxuser
21+
!default.pbxuser
22+
*.mode1v3
23+
!default.mode1v3
24+
*.mode2v3
25+
!default.mode2v3
26+
*.perspectivev3
27+
!default.perspectivev3
28+
29+
## Obj-C/Swift specific
30+
*.hmap
31+
32+
## App packaging
33+
*.ipa
34+
*.dSYM.zip
35+
*.dSYM
36+
37+
## Playgrounds
38+
timeline.xctimeline
39+
playground.xcworkspace
40+
41+
# Swift Package Manager
42+
#
43+
# Add this line if you want to avoid checking in source code from Swift Package Manager dependencies.
44+
# Packages/
45+
# Package.pins
46+
# Package.resolved
47+
# *.xcodeproj
48+
#
49+
# Xcode automatically generates this directory with a .xcworkspacedata file and xcuserdata
50+
# hence it is not needed unless you have added a package configuration file to your project
51+
# .swiftpm
52+
53+
.build/
54+
55+
# CocoaPods
56+
#
57+
# We recommend against adding the Pods directory to your .gitignore. However
58+
# you should judge for yourself, the pros and cons are mentioned at:
59+
# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
60+
#
61+
# Pods/
62+
#
63+
# Add this line if you want to avoid checking in source code from the Xcode workspace
64+
# *.xcworkspace
65+
66+
# Carthage
67+
#
68+
# Add this line if you want to avoid checking in source code from Carthage dependencies.
69+
# Carthage/Checkouts
70+
71+
Carthage/Build/
72+
73+
# Accio dependency management
74+
Dependencies/
75+
.accio/
76+
77+
# fastlane
78+
#
79+
# It is recommended to not store the screenshots in the git repo.
80+
# Instead, use fastlane to re-generate the screenshots whenever they are needed.
81+
# For more information about the recommended setup visit:
82+
# https://docs.fastlane.tools/best-practices/source-control/#source-control
83+
84+
fastlane/report.xml
85+
fastlane/Preview.html
86+
fastlane/screenshots/**/*.png
87+
fastlane/test_output
88+
89+
# Code Injection
90+
#
91+
# After new code Injection tools there's a generated folder /iOSInjectionProject
92+
# https://github.com/johnno1962/injectionforxcode
93+
94+
iOSInjectionProject/

Clima.xcodeproj/project.pbxproj

Lines changed: 49 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,29 @@
33
archiveVersion = 1;
44
classes = {
55
};
6-
objectVersion = 50;
6+
objectVersion = 53;
77
objects = {
88

99
/* Begin PBXBuildFile section */
10+
1260ECE829E18F9F002569CF /* WeatherManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1260ECE729E18F9F002569CF /* WeatherManager.swift */; };
11+
126AAEC929E889E900173620 /* WeatherData.swift in Sources */ = {isa = PBXBuildFile; fileRef = 126AAEC829E889E900173620 /* WeatherData.swift */; };
12+
126AAECB29E9D38400173620 /* WeatherModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 126AAECA29E9D38400173620 /* WeatherModel.swift */; };
13+
12BE3F1C2A4F3D7D0078E526 /* Keys.plist in Resources */ = {isa = PBXBuildFile; fileRef = 12BE3F1B2A4F3D7D0078E526 /* Keys.plist */; };
1014
ADAA27B1231BBFAF00365194 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = ADAA27B0231BBFAF00365194 /* AppDelegate.swift */; };
1115
ADAA27B3231BBFAF00365194 /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = ADAA27B2231BBFAF00365194 /* SceneDelegate.swift */; };
1216
ADAA27B5231BBFAF00365194 /* WeatherViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = ADAA27B4231BBFAF00365194 /* WeatherViewController.swift */; };
1317
ADAA27B8231BBFAF00365194 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = ADAA27B6231BBFAF00365194 /* Main.storyboard */; };
1418
ADAA27BA231BBFB300365194 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = ADAA27B9231BBFB300365194 /* Assets.xcassets */; };
1519
ADAA27BD231BBFB300365194 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = ADAA27BB231BBFB300365194 /* LaunchScreen.storyboard */; };
16-
ADAA27C6231BC02C00365194 /* light_background.pdf in Resources */ = {isa = PBXBuildFile; fileRef = ADAA27C4231BC02B00365194 /* light_background.pdf */; };
17-
ADAA27C7231BC02C00365194 /* dark_background.pdf in Resources */ = {isa = PBXBuildFile; fileRef = ADAA27C5231BC02B00365194 /* dark_background.pdf */; };
1820
ADAA27CE231BC87F00365194 /* README.md in Resources */ = {isa = PBXBuildFile; fileRef = ADAA27CD231BC87F00365194 /* README.md */; };
1921
/* End PBXBuildFile section */
2022

2123
/* Begin PBXFileReference section */
24+
1260ECE729E18F9F002569CF /* WeatherManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = WeatherManager.swift; path = Clima/Model/WeatherManager.swift; sourceTree = SOURCE_ROOT; };
25+
126AAEC829E889E900173620 /* WeatherData.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WeatherData.swift; sourceTree = "<group>"; };
26+
126AAECA29E9D38400173620 /* WeatherModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WeatherModel.swift; sourceTree = "<group>"; };
27+
12BB5E152A213A810093C6C1 /* Clima.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = Clima.entitlements; sourceTree = "<group>"; };
28+
12BE3F1B2A4F3D7D0078E526 /* Keys.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Keys.plist; sourceTree = "<group>"; };
2229
ADAA27AD231BBFAF00365194 /* Clima.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Clima.app; sourceTree = BUILT_PRODUCTS_DIR; };
2330
ADAA27B0231BBFAF00365194 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
2431
ADAA27B2231BBFAF00365194 /* SceneDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SceneDelegate.swift; sourceTree = "<group>"; };
@@ -27,8 +34,6 @@
2734
ADAA27B9231BBFB300365194 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
2835
ADAA27BC231BBFB300365194 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
2936
ADAA27BE231BBFB300365194 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
30-
ADAA27C4231BC02B00365194 /* light_background.pdf */ = {isa = PBXFileReference; lastKnownFileType = image.pdf; path = light_background.pdf; sourceTree = "<group>"; };
31-
ADAA27C5231BC02B00365194 /* dark_background.pdf */ = {isa = PBXFileReference; lastKnownFileType = image.pdf; path = dark_background.pdf; sourceTree = "<group>"; };
3237
ADAA27CD231BC87F00365194 /* README.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = "<group>"; };
3338
/* End PBXFileReference section */
3439

@@ -43,6 +48,16 @@
4348
/* End PBXFrameworksBuildPhase section */
4449

4550
/* Begin PBXGroup section */
51+
126AAEC729E18FF900173620 /* Model */ = {
52+
isa = PBXGroup;
53+
children = (
54+
1260ECE729E18F9F002569CF /* WeatherManager.swift */,
55+
126AAEC829E889E900173620 /* WeatherData.swift */,
56+
126AAECA29E9D38400173620 /* WeatherModel.swift */,
57+
);
58+
path = Model;
59+
sourceTree = "<group>";
60+
};
4661
ADAA27A4231BBFAF00365194 = {
4762
isa = PBXGroup;
4863
children = (
@@ -63,16 +78,16 @@
6378
ADAA27AF231BBFAF00365194 /* Clima */ = {
6479
isa = PBXGroup;
6580
children = (
81+
12BB5E152A213A810093C6C1 /* Clima.entitlements */,
6682
ADAA27B0231BBFAF00365194 /* AppDelegate.swift */,
6783
ADAA27B2231BBFAF00365194 /* SceneDelegate.swift */,
68-
ADAA27CA231BC3FA00365194 /* Model */,
84+
126AAEC729E18FF900173620 /* Model */,
6985
ADAA27C9231BC3F200365194 /* View */,
7086
ADAA27C8231BC3E500365194 /* Controller */,
7187
ADAA27B9231BBFB300365194 /* Assets.xcassets */,
7288
ADAA27BB231BBFB300365194 /* LaunchScreen.storyboard */,
7389
ADAA27BE231BBFB300365194 /* Info.plist */,
74-
ADAA27C5231BC02B00365194 /* dark_background.pdf */,
75-
ADAA27C4231BC02B00365194 /* light_background.pdf */,
90+
12BE3F1B2A4F3D7D0078E526 /* Keys.plist */,
7691
);
7792
path = Clima;
7893
sourceTree = "<group>";
@@ -93,13 +108,6 @@
93108
path = View;
94109
sourceTree = "<group>";
95110
};
96-
ADAA27CA231BC3FA00365194 /* Model */ = {
97-
isa = PBXGroup;
98-
children = (
99-
);
100-
path = Model;
101-
sourceTree = "<group>";
102-
};
103111
/* End PBXGroup section */
104112

105113
/* Begin PBXNativeTarget section */
@@ -126,8 +134,9 @@
126134
ADAA27A5231BBFAF00365194 /* Project object */ = {
127135
isa = PBXProject;
128136
attributes = {
137+
BuildIndependentTargetsInParallel = YES;
129138
LastSwiftUpdateCheck = 1100;
130-
LastUpgradeCheck = 1100;
139+
LastUpgradeCheck = 1430;
131140
ORGANIZATIONNAME = "App Brewery";
132141
TargetAttributes = {
133142
ADAA27AC231BBFAF00365194 = {
@@ -159,11 +168,10 @@
159168
buildActionMask = 2147483647;
160169
files = (
161170
ADAA27CE231BC87F00365194 /* README.md in Resources */,
162-
ADAA27C7231BC02C00365194 /* dark_background.pdf in Resources */,
163171
ADAA27BD231BBFB300365194 /* LaunchScreen.storyboard in Resources */,
164172
ADAA27BA231BBFB300365194 /* Assets.xcassets in Resources */,
165173
ADAA27B8231BBFAF00365194 /* Main.storyboard in Resources */,
166-
ADAA27C6231BC02C00365194 /* light_background.pdf in Resources */,
174+
12BE3F1C2A4F3D7D0078E526 /* Keys.plist in Resources */,
167175
);
168176
runOnlyForDeploymentPostprocessing = 0;
169177
};
@@ -175,7 +183,10 @@
175183
buildActionMask = 2147483647;
176184
files = (
177185
ADAA27B5231BBFAF00365194 /* WeatherViewController.swift in Sources */,
186+
126AAEC929E889E900173620 /* WeatherData.swift in Sources */,
178187
ADAA27B1231BBFAF00365194 /* AppDelegate.swift in Sources */,
188+
1260ECE829E18F9F002569CF /* WeatherManager.swift in Sources */,
189+
126AAECB29E9D38400173620 /* WeatherModel.swift in Sources */,
179190
ADAA27B3231BBFAF00365194 /* SceneDelegate.swift in Sources */,
180191
);
181192
runOnlyForDeploymentPostprocessing = 0;
@@ -228,6 +239,7 @@
228239
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
229240
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
230241
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
242+
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
231243
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
232244
CLANG_WARN_STRICT_PROTOTYPES = YES;
233245
CLANG_WARN_SUSPICIOUS_MOVE = YES;
@@ -288,6 +300,7 @@
288300
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
289301
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
290302
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
303+
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
291304
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
292305
CLANG_WARN_STRICT_PROTOTYPES = YES;
293306
CLANG_WARN_SUSPICIOUS_MOVE = YES;
@@ -320,14 +333,22 @@
320333
isa = XCBuildConfiguration;
321334
buildSettings = {
322335
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
336+
CODE_SIGN_ENTITLEMENTS = Clima/Clima.entitlements;
323337
CODE_SIGN_STYLE = Automatic;
338+
CURRENT_PROJECT_VERSION = 1;
339+
DEVELOPMENT_TEAM = 5422CL2MVH;
324340
INFOPLIST_FILE = Clima/Info.plist;
341+
INFOPLIST_KEY_CFBundleDisplayName = Clima;
325342
LD_RUNPATH_SEARCH_PATHS = (
326343
"$(inherited)",
327344
"@executable_path/Frameworks",
328345
);
329-
PRODUCT_BUNDLE_IDENTIFIER = co.appbrewery.Clima;
346+
MARKETING_VERSION = 1.0;
347+
PRODUCT_BUNDLE_IDENTIFIER = seoanemartin.ramon.Clima;
330348
PRODUCT_NAME = "$(TARGET_NAME)";
349+
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
350+
SUPPORTS_MACCATALYST = YES;
351+
SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = YES;
331352
SWIFT_VERSION = 5.0;
332353
TARGETED_DEVICE_FAMILY = "1,2";
333354
};
@@ -337,14 +358,22 @@
337358
isa = XCBuildConfiguration;
338359
buildSettings = {
339360
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
361+
CODE_SIGN_ENTITLEMENTS = Clima/Clima.entitlements;
340362
CODE_SIGN_STYLE = Automatic;
363+
CURRENT_PROJECT_VERSION = 1;
364+
DEVELOPMENT_TEAM = 5422CL2MVH;
341365
INFOPLIST_FILE = Clima/Info.plist;
366+
INFOPLIST_KEY_CFBundleDisplayName = Clima;
342367
LD_RUNPATH_SEARCH_PATHS = (
343368
"$(inherited)",
344369
"@executable_path/Frameworks",
345370
);
346-
PRODUCT_BUNDLE_IDENTIFIER = co.appbrewery.Clima;
371+
MARKETING_VERSION = 1.0;
372+
PRODUCT_BUNDLE_IDENTIFIER = seoanemartin.ramon.Clima;
347373
PRODUCT_NAME = "$(TARGET_NAME)";
374+
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
375+
SUPPORTS_MACCATALYST = YES;
376+
SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = YES;
348377
SWIFT_VERSION = 5.0;
349378
TARGETED_DEVICE_FAMILY = "1,2";
350379
};

Clima/AppDelegate.swift

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,15 @@ import UIKit
1111
@UIApplicationMain
1212
class AppDelegate: UIResponder, UIApplicationDelegate {
1313

14-
14+
var keys: NSDictionary?
1515

1616
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
17-
// Override point for customization after application launch.
18-
return true
17+
// Override point for customization after application launch.
18+
if let path = Bundle.main.path(forResource: "Keys", ofType: "plist") {
19+
keys = NSDictionary(contentsOfFile: path)
20+
}
21+
22+
return true
1923
}
2024

2125
// MARK: UISceneSession Lifecycle
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"info" : {
3-
"version" : 1,
4-
"author" : "xcode"
3+
"author" : "xcode",
4+
"version" : 1
55
}
6-
}
6+
}
Lines changed: 24 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,35 @@
11
{
22
"images" : [
33
{
4-
"idiom" : "universal",
5-
"filename" : "background.png",
6-
"scale" : "1x"
4+
"filename" : "light_background.pdf",
5+
"idiom" : "universal"
76
},
87
{
9-
"idiom" : "universal",
10-
"scale" : "2x"
8+
"appearances" : [
9+
{
10+
"appearance" : "luminosity",
11+
"value" : "light"
12+
}
13+
],
14+
"filename" : "light_background 1.pdf",
15+
"idiom" : "universal"
1116
},
1217
{
13-
"idiom" : "universal",
14-
"scale" : "3x"
18+
"appearances" : [
19+
{
20+
"appearance" : "luminosity",
21+
"value" : "dark"
22+
}
23+
],
24+
"filename" : "dark_background.pdf",
25+
"idiom" : "universal"
1526
}
1627
],
1728
"info" : {
18-
"version" : 1,
19-
"author" : "xcode"
29+
"author" : "xcode",
30+
"version" : 1
31+
},
32+
"properties" : {
33+
"preserves-vector-representation" : true
2034
}
21-
}
35+
}
-99.9 KB
Binary file not shown.
10.8 KB
Binary file not shown.

0 commit comments

Comments
 (0)