This file contains 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
disabled_rules: # rule identifiers to exclude from running | |
- variable_name | |
- nesting | |
- function_parameter_count | |
opt_in_rules: # some rules are only opt-in | |
- control_statement | |
- empty_count | |
- trailing_newline | |
- colon | |
- comma |
This file contains 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
fastlane_version "2.84.0" | |
xcversion(version: "9.2") | |
default_platform :ios | |
lane :certificates do | |
match( | |
app_identifier: ["com.jimdo.boost"], | |
type: "appstore", | |
readonly: true) |
This file contains 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
default_platform(:android) | |
platform :android do | |
desc "Submit a new QA Build to Crashlytics Beta" | |
lane :qa do | |
crashlytics( | |
api_token: 'CRASHLYTICS_API_TOKEN', | |
build_secret: 'CRASHLYTICS_BUILD_SECRET', | |
notes_path: 'qa-change.log', |
This file contains 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
#!/bin/bash | |
#Path to swiftlint | |
SWIFT_LINT=/usr/local/bin/swiftlint | |
#if $SWIFT_LINT >/dev/null 2>&1; then | |
if [[ -e "${SWIFT_LINT}" ]]; then | |
count=0 | |
for file_path in $(git ls-files -m --exclude-from=.gitignore | grep ".swift$"); do | |
export SCRIPT_INPUT_FILE_$count=$file_path |
This file contains 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
# PR is a work in progress and shouldn't be merged yet | |
warn "PR is classed as Work in Progress" if github.pr_title.include? "[WIP]" | |
# Warn when there is a big PR | |
warn "Big PR, consider splitting into smaller" if git.lines_of_code > 500 | |
# Ensure a clean commits history | |
if git.commits.any? { |c| c.message =~ /^Merge branch '#{github.branch_for_base}'/ } | |
fail "Please rebase to get rid of the merge commits in this PR" | |
end |
This file contains 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
// Adding a view controller to another | |
let childViewController = UIViewController() | |
let parentViewController = UIViewController() | |
parentViewController.addChild(childViewController) | |
parentViewController.view.addSubview(childViewController.view) | |
// setup auto-layout constraints for childViewController.view | |
childViewController.didMove(toParent: parentViewController) | |
// Removing the child view controller from parent | |
childViewController.willMove(toParent: nil) |
This file contains 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
class FileOpener { | |
func open(identifier: String) { | |
guard let url = URL(string: "iosappscheme://open?id=\(identifier)") else { | |
debugPrint("Failed to convert URL") | |
return | |
} | |
if UIApplication.shared.canOpenURL(url) { | |
UIApplication.shared.open(url, options: [:], completionHandler: nil) | |
} else { | |
debugPrint("Failed to open URL") |
This file contains 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
class FileOpener { | |
let application: UIApplication | |
init(application: UIApplication = UIApplication.shared) { | |
self.application = application | |
} | |
func open(identifier: String) { | |
guard let url = URL(string: "iosappscheme://open?id=\(identifier)") else { | |
debugPrint("Failed to load URL") | |
return |
This file contains 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
protocol URLOpening { | |
func canOpenURL(_ url: URL) -> Bool | |
func open(_ url: URL, | |
options: [UIApplication.OpenExternalURLOptionsKey : Any], | |
completionHandler completion: ((Bool) -> Void)?) | |
} | |
extension UIApplication: URLOpening {} |
This file contains 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
class FileOpener { | |
let urlOpener: URLOpening | |
init(urlOpener: URLOpening = UIApplication.shared) { | |
self.urlOpener = urlOpener | |
} | |
func open(identifier: String) { | |
guard let url = URL(string: "iosappscheme://open?id=\(identifier)") else { | |
debugPrint("Failed to load URL") | |
return |
NewerOlder