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
スクリーンショットの撮り方 | |
https://support.google.com/nexus/answer/9075928?hl=ja | |
スクリーンショットをMacに転送する | |
https://www.android.com/filetransfer/ | |
ショートカットを変更 | |
* Control+Dでdelete |
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
// MARK: - check dealloc | |
private extension UIViewController { | |
// Add below to _swizzled_viewDidDisappear(_:) | |
func _checkDeallocation(afterDelay delay: TimeInterval = 1.5) { | |
if isMovingFromParent || rootParent.isBeingDismissed { | |
let disappearance = isMovingFromParent ? "removed from its parent" : "dismissed" | |
DispatchQueue.main.asyncAfter(deadline: .now() + delay) { [weak self] in | |
guard let self = self else { return } | |
let message = "\(String(describing: type(of: self))) not deallocated after being \(disappearance)" |
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
/// 文字数制御 | |
/// refs: https://akaimo.hatenablog.jp/entry/2015/09/13/150241 | |
func textView(_ textView: UITextView, shouldChangeTextIn range: NSRange, replacementText text: String) -> Bool { | |
self.previousText = textView.text | |
self.lastReplaceRange = range | |
self.lastReplacementString = text | |
return true | |
} | |
func textViewDidChange(_ textView: UITextView) { |
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
// テストターゲット=`SampleAppTest` | |
// ホストアプリ=`SampleApp` | |
import Foundation | |
import Alamofire | |
struct APIStub { | |
let statusCode: Int | |
let result: Result<Data>? |
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
$ brew install nodebrew | |
==> Downloading https://github.com/hokaccha/nodebrew/archive/v0.9.7.tar.gz | |
==> Downloading from https://codeload.github.com/hokaccha/nodebrew/tar.gz/v0.9.7 | |
######################################################################## 100.0% | |
==> Caveats | |
You need to manually run setup_dirs to create directories required by nodebrew: | |
/usr/local/opt/nodebrew/bin/nodebrew setup_dirs | |
Add path: | |
export PATH=$HOME/.nodebrew/current/bin:$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
Simulator起動時に `Lost connection to the debugger` と表示されてディタッチされてしまう&Simulator上でアプリが起動しない | |
# https://developer.apple.com/forums/thread/681037 | |
``` | |
settings set plugin.process.gdb-remote.packet-timeout 300 | |
``` |
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
module Fastlane | |
module Actions | |
module SharedValues | |
UPDATE_BUNDLE_VERSION = :UPDATE_BUNDLE_VERSION | |
end | |
class UpdateBundleVersionAction < Action | |
def self.run(params) | |
begin | |
path = File.expand_path(params[: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
初期設定 | |
## Safari | |
* deleteキーで戻るように | |
``` | |
defaults write com.apple.Safari com.apple.Safari.ContentPageGroupIdentifier.WebKit2BackspaceKeyNavigationEnabled -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
INFO_PLIST="Info.plist" | |
FRAMEWORK_NAME=${PROJECT_NAME} | |
FRAMEWORK_VERSION_NUMBER=$(/usr/libexec/PlistBuddy -c "Print CFBundleShortVersionString" ${SRCROOT}/${PROJECT_NAME}/${INFO_PLIST}) | |
FRAMEWORK_VERSION=A | |
FRAMEWORK_BUILD_PATH="${SRCROOT}/build/${CONFIGURATION}-framework" | |
FRAMEWORK_DIR="${FRAMEWORK_BUILD_PATH}/${FRAMEWORK_NAME}.framework" | |
FRAMEWORK_PACKAGE="${FRAMEWORK_NAME}-${FRAMEWORK_VERSION_NUMBER}" | |
FRAMEWORK_PACKAGE_NAME="${FRAMEWORK_PACKAGE}.zip" | |
[ -d "${FRAMEWORK_BUILD_PATH}" ] && rm -rf "${FRAMEWORK_BUILD_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
import UserNotifications | |
import MuddlerKit | |
// MARK: - APNs utilities | |
extension AppDelegate { | |
func applicationWillRegisterForRemoteNotifications_compatible(_ application: UIApplication) { | |
if #available(iOS 10.0, *) { | |
applicationWillRegisterForRemoteNotifications(application) | |
} else { |