If .DS_Store was never added to your git repository, simply add it to your .gitignore file.
.gitignore
In your the root directory of your app and simply write
// | |
// Inspired by wrjpgcom of libjpeg | |
// https://github.com/libjpeg-turbo/libjpeg-turbo/blob/master/wrjpgcom.c | |
// | |
// https://stackoverflow.com/a/46045524/5536516 | |
// | |
// Note: To add an EXIF UserComment go here: | |
// https://gist.github.com/nyg/c90f36abbd30f72c8b6681ef23db886b | |
import Foundation |
import Foundation | |
let size = MemoryLayout<Int16>.stride | |
let data = Data(bytes: [1, 0, 2, 0, 3, 0]) // little endian for 16-bit values | |
let int16s = data.withUnsafeBytes { (bytes: UnsafePointer<Int16>) in | |
Array(UnsafeBufferPointer(start: bytes, count: data.count / size)) | |
} | |
let length = data.count * MemoryLayout<Int16>.stride |
// | |
// Keychain.swift | |
// SecKeychain | |
// | |
// Created by Paul Wagener on 01-11-17. | |
// Copyright © 2017 Paul Wagener. All rights reserved. | |
// | |
import Foundation |
public protocol ReusableView: class { } | |
extension ReusableView where Self: UIView { | |
public static var reuseIdentifier: String { | |
return String(describing: self) | |
} | |
} | |
extension UITableViewCell: ReusableView { } | |
extension UITableViewHeaderFooterView: ReusableView { } |
extension StringProtocol where Index == String.Index { | |
func ranges<T: StringProtocol>(of substring: T, options: String.CompareOptions = [], locale: Locale? = nil) -> [Range<Index>] { | |
var ranges: [Range<Index>] = [] | |
while let result = range(of: substring, options: options, range: (ranges.last?.upperBound ?? startIndex)..<endIndex, locale: locale) { | |
ranges.append(result) | |
} | |
return ranges | |
} | |
} |
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>Label</key> | |
<string>com.jenkins.ci</string> | |
<key>UserName</key> | |
<string>jenkins</string> | |
<key>SessionCreate</key> | |
<true/> |
// | |
// main.swift | |
// MJPEGreader | |
// | |
// Created by michal on 17/11/2017. | |
// Copyright © 2018 michal. All rights reserved. | |
// | |
import Foundation |
############################### | |
# get latest release git branch | |
############################### | |
desc "get latest release git branch" | |
private_lane :git_latest_release_branch do | |
pattern = "release\/(.+)" | |
branches = git_find_branches(pattern: pattern) | |
reg = Regexp.new(pattern) | |
branches = branches.sort { |a, b| |
#!/bin/sh | |
# https://gist.github.com/MarioIannotta/e27ac3ec067dc5b6f00c392d7527b10a | |
build_path="Builds/$(date '+%d-%m-%Y-%H-%M')" | |
target="YourFramework" | |
configuration="Your configuration eg: Release" | |
# clean up the build folder if already exists | |
rm -rf build_path |