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
private extension Bundle { | |
/// The path to Siren's localization `Bundle`. | |
/// | |
/// - Returns: The bundle's path or `nil`. | |
final class func sirenBundlePath() -> String? { | |
#if SWIFT_PACKAGE | |
return Bundle.module.path(forResource: "\(Siren.self)", ofType: "bundle") | |
#else | |
return Bundle(for: Siren.self).path(forResource: "\(Siren.self)", ofType: "bundle") | |
#endif |
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
// Source: https://developer.apple.com/forums/thread/650158?answerId=614513022#614513022 | |
import Foundation | |
extension Bundle { | |
static let module = Bundle(path: "\(Bundle.main.bundlePath)/path/to/this/targets/resource/bundle") | |
} |
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
// Destroy UIWebView | |
- (void)destroyWebView | |
{ | |
[self.webView loadHTMLString:@"" baseURL:nil]; | |
[self.webView stopLoading]; | |
[self.webView setDelegate:nil]; | |
[self.webView removeFromSuperview]; | |
[self setWebView:nil]; | |
[[NSURLCache sharedURLCache] removeAllCachedResponses]; |
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
defaults write com.apple.dt.Xcode ShowBuildOperationDuration -bool YES |
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
PAYLOAD="{\"username\": \"Xcode Bot\", | |
\"text\": \"${XCS_BOT_NAME} Status: ${XCS_INTEGRATION_RESULT}.\nErrors: ${XCS_ERROR_COUNT}\nWarnings: ${XCS_WARNING_COUNT}\nFailed Tests: ${XCS_TEST_FAILURE_COUNT}\nAnalyzer Issues: ${XCS_ANALYZER_WARNING_COUNT}\",\"icon_emoji\": \":robot_face:\"}" | |
echo $PAYLOAD | |
curl -X POST --data-urlencode "payload=${PAYLOAD}" https://hooks.slack.com/services/<slack_room_id> |
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
#!/usr/bin/env bash | |
BR=$( git describe --contains --all HEAD ) | |
echo Branch: $BR | |
if [ $BR = master ] | |
then | |
git add Path/To/Supporting\ Files/Info.plist | |
git commit --allow-empty -m "[skip ci] finished build: $BUDDYBUILD_BUILD_NUMBER" | |
git push |
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
alias ga='git add . && git status' | |
alias gb='git branch' | |
alias gbd='git branch -D' | |
alias gch='git checkout' | |
alias gcam='git commit -am' | |
alias gp='git push' | |
alias gpo='git push origin' | |
alias gs='git status' | |
alias gu='git pull --all && git fetch -p && git branch --merged | grep -v '^*' | grep -v master | grep -v develop | xargs -n 1 git branch -d && git branch -a' | |
alias gclean='git clean -fd && git reset && git checkout -f && git status' |
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
alias up='rvm get stable && rvm rubygems latest && gem update && brew update && brew upgrade && brew doctor && brew cleanup' |
NewerOlder