This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// To set the light icon | |
UIApplication.shared.setAlternateIconName("light") { | |
guard let error = $0 else { return } | |
os_log("Error setting alternative icon: %@", error.localizedDescription) | |
} | |
// To set the light icon | |
UIApplication.shared.setAlternateIconName("dark") { | |
guard let error = $0 else { return } | |
os_log("Error setting alternative icon: %@", error.localizedDescription) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<key>CFBundleIcons~ipad</key> | |
<dict> | |
<key>CFBundlePrimaryIcon</key> | |
<dict> | |
<key>CFBundleIconFiles</key> | |
<array> | |
<string>default</string> | |
</array> | |
<key>UIPrerenderedIcon</key> | |
<false/> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<key>CFBundleIcons</key> | |
<dict> | |
<key>CFBundlePrimaryIcon</key> | |
<dict> | |
<key>CFBundleIconFiles</key> | |
<array> | |
<string>default</string> | |
</array> | |
<key>UIPrerenderedIcon</key> | |
<false/> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
struct Acknowledgments: Decodable { | |
let specs: [Framework] | |
} | |
struct Framework: Decodable { | |
let name: String | |
let homepage: String | |
let version: String | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
lazy var constrictor = Constrictor(object: self)() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// ViewController.swift | |
// Example | |
// | |
// Created by Pedro Carrasco on 21/05/2018. | |
// Copyright © 2018 Pedro Carrasco. All rights reserved. | |
// | |
import UIKit | |
import Constrictor |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// ViewController.swift | |
// Example | |
// | |
// Created by Pedro Carrasco on 21/05/2018. | |
// Copyright © 2018 Pedro Carrasco. All rights reserved. | |
// | |
import UIKit | |
import Constrictor |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private enum Constant { | |
static let scenarioAFile = "screenScenarioA" | |
static let scenarioBFile = "screenScenarioB" | |
} | |
func testScenarioA() { | |
// Arrange & Act | |
updateStructureWithJSON(named: Constant.scenarioAFile) | |
let result = screenStructureManager.current | |
let expectedResult: [Component] = [.header, .products] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private enum Constant { | |
static let scenarioAFile = "screenScenarioA" | |
static let scenarioBFile = "screenScenarioB" | |
} | |
func testScenarioA() { | |
// Arrange | |
guard let filePath = Bundle(for: type(of: self)).path(forResource: Constant.scenarioAFile, ofType: FileType.json), | |
let data = try? Data(contentsOf: URL(fileURLWithPath: filePath)), | |
let jsonObject = try? JSONSerialization.jsonObject(with: data, options: .allowFragments), |
NewerOlder