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
# xcode-version-bump.sh | |
# @desc Auto-increment the version number (only) when a project is archived for export. | |
# @usage | |
# 1. Select: your Target in Xcode | |
# 2. Select: Build Phases Tab | |
# 3. Select: Add Build Phase -> Add Run Script | |
# 4. Paste code below in to new "Run Script" section | |
# 5. Check the checkbox "Run script only when installing" | |
# 6. Drag the "Run Script" below "Link Binaries With Libraries" |
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
/** | |
* Copyright (c) 2017 Razeware LLC | |
* | |
* Permission is hereby granted, free of charge, to any person obtaining a copy | |
* of this software and associated documentation files (the "Software"), to deal | |
* in the Software without restriction, including without limitation the rights | |
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
* copies of the Software, and to permit persons to whom the Software is | |
* furnished to do so, subject to the following conditions: | |
* |
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
protocol CustomFontsProtocol { | |
func size(size: CGFloat) -> UIFont? | |
} | |
extension CustomFontsProtocol where Self: RawRepresentable, Self.RawValue == String { | |
func size(size: CGFloat) -> UIFont? { | |
return UIFont(name: rawValue, size: size) | |
} | |
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
public extension Array where Element: Hashable { | |
func removeDuplicates() -> [Element] { | |
var items = Set<Element> | |
return self.filter { items.insert($0).inserted } | |
} | |
} | |
// [1,2,5,5,2,4,3].removeDuplicates() |
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
sudo {path/FirebaseCrashlytics/upload-symbols} -gsp {{path/GoogleService-Info.plist}} -p ios {dsym'sPath} |
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
void main() { | |
var myAge = 35; | |
print(myAge); // 35 | |
// This is a comment. | |
print(myAge); // This is also a comment. | |
/* | |
And so is this. | |
*/ | |
int yourAge = 27; |
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
import SwiftUI | |
struct ContentView: View { | |
var body: some View { | |
VStack { | |
EventHeader() | |
ImagePlaceholder().layoutPriority(-1) // added | |
.frame( minHeight: 100) | |
Text(makeDescription()) | |
//Text(makeDescription()).layoutPriority(1) // removed |
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
// Documentation | |
https://developer.apple.com/documentation/os/logging | |
https://www.avanderlee.com/debugging/oslog-unified-logging/ | |
// Don't forget the open console actions for info and debug | |
// Filter with subsystem and category | |
// subsystem: BundleId | |
// Category: static | |
// Handy extension |
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
Notes about agvtool | |
1) Enable agvtool. | |
2) Set up your version and build numbers. | |
## sampleUsage: | |
agvtool new-marketing-version <your_specific_version> | |
xcrun agvtool new-marketing-version 2.0 | |
—--Build--— |