Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Just finished my app version, the api key is placed in a Keys.plist included in the gitignore #15

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
94 changes: 94 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
# Xcode
#
# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore

## User settings
xcuserdata/

## API keys
/Clima/Keys.plist


## compatibility with Xcode 8 and earlier (ignoring not required starting Xcode 9)
*.xcscmblueprint
*.xccheckout

## compatibility with Xcode 3 and earlier (ignoring not required starting Xcode 4)
build/
DerivedData/
*.moved-aside
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3

## Obj-C/Swift specific
*.hmap

## App packaging
*.ipa
*.dSYM.zip
*.dSYM

## Playgrounds
timeline.xctimeline
playground.xcworkspace

# Swift Package Manager
#
# Add this line if you want to avoid checking in source code from Swift Package Manager dependencies.
# Packages/
# Package.pins
# Package.resolved
# *.xcodeproj
#
# Xcode automatically generates this directory with a .xcworkspacedata file and xcuserdata
# hence it is not needed unless you have added a package configuration file to your project
# .swiftpm

.build/

# CocoaPods
#
# We recommend against adding the Pods directory to your .gitignore. However
# you should judge for yourself, the pros and cons are mentioned at:
# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
#
# Pods/
#
# Add this line if you want to avoid checking in source code from the Xcode workspace
# *.xcworkspace

# Carthage
#
# Add this line if you want to avoid checking in source code from Carthage dependencies.
# Carthage/Checkouts

Carthage/Build/

# Accio dependency management
Dependencies/
.accio/

# fastlane
#
# It is recommended to not store the screenshots in the git repo.
# Instead, use fastlane to re-generate the screenshots whenever they are needed.
# For more information about the recommended setup visit:
# https://docs.fastlane.tools/best-practices/source-control/#source-control

fastlane/report.xml
fastlane/Preview.html
fastlane/screenshots/**/*.png
fastlane/test_output

# Code Injection
#
# After new code Injection tools there's a generated folder /iOSInjectionProject
# https://github.com/johnno1962/injectionforxcode

iOSInjectionProject/
69 changes: 49 additions & 20 deletions Clima.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,29 @@
archiveVersion = 1;
classes = {
};
objectVersion = 50;
objectVersion = 53;
objects = {

/* Begin PBXBuildFile section */
1260ECE829E18F9F002569CF /* WeatherManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1260ECE729E18F9F002569CF /* WeatherManager.swift */; };
126AAEC929E889E900173620 /* WeatherData.swift in Sources */ = {isa = PBXBuildFile; fileRef = 126AAEC829E889E900173620 /* WeatherData.swift */; };
126AAECB29E9D38400173620 /* WeatherModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 126AAECA29E9D38400173620 /* WeatherModel.swift */; };
12BE3F1C2A4F3D7D0078E526 /* Keys.plist in Resources */ = {isa = PBXBuildFile; fileRef = 12BE3F1B2A4F3D7D0078E526 /* Keys.plist */; };
ADAA27B1231BBFAF00365194 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = ADAA27B0231BBFAF00365194 /* AppDelegate.swift */; };
ADAA27B3231BBFAF00365194 /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = ADAA27B2231BBFAF00365194 /* SceneDelegate.swift */; };
ADAA27B5231BBFAF00365194 /* WeatherViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = ADAA27B4231BBFAF00365194 /* WeatherViewController.swift */; };
ADAA27B8231BBFAF00365194 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = ADAA27B6231BBFAF00365194 /* Main.storyboard */; };
ADAA27BA231BBFB300365194 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = ADAA27B9231BBFB300365194 /* Assets.xcassets */; };
ADAA27BD231BBFB300365194 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = ADAA27BB231BBFB300365194 /* LaunchScreen.storyboard */; };
ADAA27C6231BC02C00365194 /* light_background.pdf in Resources */ = {isa = PBXBuildFile; fileRef = ADAA27C4231BC02B00365194 /* light_background.pdf */; };
ADAA27C7231BC02C00365194 /* dark_background.pdf in Resources */ = {isa = PBXBuildFile; fileRef = ADAA27C5231BC02B00365194 /* dark_background.pdf */; };
ADAA27CE231BC87F00365194 /* README.md in Resources */ = {isa = PBXBuildFile; fileRef = ADAA27CD231BC87F00365194 /* README.md */; };
/* End PBXBuildFile section */

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

Expand All @@ -43,6 +48,16 @@
/* End PBXFrameworksBuildPhase section */

/* Begin PBXGroup section */
126AAEC729E18FF900173620 /* Model */ = {
isa = PBXGroup;
children = (
1260ECE729E18F9F002569CF /* WeatherManager.swift */,
126AAEC829E889E900173620 /* WeatherData.swift */,
126AAECA29E9D38400173620 /* WeatherModel.swift */,
);
path = Model;
sourceTree = "<group>";
};
ADAA27A4231BBFAF00365194 = {
isa = PBXGroup;
children = (
Expand All @@ -63,16 +78,16 @@
ADAA27AF231BBFAF00365194 /* Clima */ = {
isa = PBXGroup;
children = (
12BB5E152A213A810093C6C1 /* Clima.entitlements */,
ADAA27B0231BBFAF00365194 /* AppDelegate.swift */,
ADAA27B2231BBFAF00365194 /* SceneDelegate.swift */,
ADAA27CA231BC3FA00365194 /* Model */,
126AAEC729E18FF900173620 /* Model */,
ADAA27C9231BC3F200365194 /* View */,
ADAA27C8231BC3E500365194 /* Controller */,
ADAA27B9231BBFB300365194 /* Assets.xcassets */,
ADAA27BB231BBFB300365194 /* LaunchScreen.storyboard */,
ADAA27BE231BBFB300365194 /* Info.plist */,
ADAA27C5231BC02B00365194 /* dark_background.pdf */,
ADAA27C4231BC02B00365194 /* light_background.pdf */,
12BE3F1B2A4F3D7D0078E526 /* Keys.plist */,
);
path = Clima;
sourceTree = "<group>";
Expand All @@ -93,13 +108,6 @@
path = View;
sourceTree = "<group>";
};
ADAA27CA231BC3FA00365194 /* Model */ = {
isa = PBXGroup;
children = (
);
path = Model;
sourceTree = "<group>";
};
/* End PBXGroup section */

/* Begin PBXNativeTarget section */
Expand All @@ -126,8 +134,9 @@
ADAA27A5231BBFAF00365194 /* Project object */ = {
isa = PBXProject;
attributes = {
BuildIndependentTargetsInParallel = YES;
LastSwiftUpdateCheck = 1100;
LastUpgradeCheck = 1100;
LastUpgradeCheck = 1430;
ORGANIZATIONNAME = "App Brewery";
TargetAttributes = {
ADAA27AC231BBFAF00365194 = {
Expand Down Expand Up @@ -159,11 +168,10 @@
buildActionMask = 2147483647;
files = (
ADAA27CE231BC87F00365194 /* README.md in Resources */,
ADAA27C7231BC02C00365194 /* dark_background.pdf in Resources */,
ADAA27BD231BBFB300365194 /* LaunchScreen.storyboard in Resources */,
ADAA27BA231BBFB300365194 /* Assets.xcassets in Resources */,
ADAA27B8231BBFAF00365194 /* Main.storyboard in Resources */,
ADAA27C6231BC02C00365194 /* light_background.pdf in Resources */,
12BE3F1C2A4F3D7D0078E526 /* Keys.plist in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand All @@ -175,7 +183,10 @@
buildActionMask = 2147483647;
files = (
ADAA27B5231BBFAF00365194 /* WeatherViewController.swift in Sources */,
126AAEC929E889E900173620 /* WeatherData.swift in Sources */,
ADAA27B1231BBFAF00365194 /* AppDelegate.swift in Sources */,
1260ECE829E18F9F002569CF /* WeatherManager.swift in Sources */,
126AAECB29E9D38400173620 /* WeatherModel.swift in Sources */,
ADAA27B3231BBFAF00365194 /* SceneDelegate.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
Expand Down Expand Up @@ -228,6 +239,7 @@
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
Expand Down Expand Up @@ -288,6 +300,7 @@
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
Expand Down Expand Up @@ -320,14 +333,22 @@
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_ENTITLEMENTS = Clima/Clima.entitlements;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_TEAM = 5422CL2MVH;
INFOPLIST_FILE = Clima/Info.plist;
INFOPLIST_KEY_CFBundleDisplayName = Clima;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = co.appbrewery.Clima;
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = seoanemartin.ramon.Clima;
PRODUCT_NAME = "$(TARGET_NAME)";
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
SUPPORTS_MACCATALYST = YES;
SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = YES;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
Expand All @@ -337,14 +358,22 @@
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_ENTITLEMENTS = Clima/Clima.entitlements;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_TEAM = 5422CL2MVH;
INFOPLIST_FILE = Clima/Info.plist;
INFOPLIST_KEY_CFBundleDisplayName = Clima;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = co.appbrewery.Clima;
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = seoanemartin.ramon.Clima;
PRODUCT_NAME = "$(TARGET_NAME)";
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
SUPPORTS_MACCATALYST = YES;
SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = YES;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
Expand Down
10 changes: 7 additions & 3 deletions Clima/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,15 @@ import UIKit
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {


var keys: NSDictionary?

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

return true
}

// MARK: UISceneSession Lifecycle
Expand Down
6 changes: 3 additions & 3 deletions Clima/Assets.xcassets/Contents.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"info" : {
"version" : 1,
"author" : "xcode"
"author" : "xcode",
"version" : 1
}
}
}
34 changes: 24 additions & 10 deletions Clima/Assets.xcassets/background.imageset/Contents.json
Original file line number Diff line number Diff line change
@@ -1,21 +1,35 @@
{
"images" : [
{
"idiom" : "universal",
"filename" : "background.png",
"scale" : "1x"
"filename" : "light_background.pdf",
"idiom" : "universal"
},
{
"idiom" : "universal",
"scale" : "2x"
"appearances" : [
{
"appearance" : "luminosity",
"value" : "light"
}
],
"filename" : "light_background 1.pdf",
"idiom" : "universal"
},
{
"idiom" : "universal",
"scale" : "3x"
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"filename" : "dark_background.pdf",
"idiom" : "universal"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
"author" : "xcode",
"version" : 1
},
"properties" : {
"preserves-vector-representation" : true
}
}
}
Binary file not shown.
File renamed without changes.
Binary file not shown.
Loading