Skip to content

Instantly share code, notes, and snippets.

View jkyin's full-sized avatar
💭
I may be slow to respond.

Jack Yin jkyin

💭
I may be slow to respond.
View GitHub Profile
class Xcodegen < Formula
desc "Generate your Xcode project from a spec file and your folder structure"
homepage "https://github.com/yonaskolb/XcodeGen"
url "https://github.com/yonaskolb/XcodeGen/archive/refs/tags/2.43.0.tar.gz"
sha256 "d79a89ea056ccc3cf84b736ee52c7b5184a560e54808e51f418f34d292869d66"
license "MIT"
head "https://github.com/yonaskolb/XcodeGen.git", branch: "master"
bottle do
sha256 cellar: :any_skip_relocation, arm64_sequoia: "1d08e16ea70ce5f323dd53197ed1204c6a78be04e629bb8e8cd11329b5d13c5d"
#!name=Skip Proxy Lists
#!desc=跳过部分应用的代理检测
[General]
skip-proxy = %APPEND% www.baidu.com,yunbusiness.ccb.com,wxh.wo.cn,gate.lagou.com,www.abchina.com.cn,gmcc.net, 10086.cn
## www.baidu.com:网上国网、多看阅读、顺丰金融、广东农信、丰云行、中国银行缤纷生活、通信行程卡app
## yunbusiness.ccb.com:建行生活
## wxh.wo.cn:沃小号
May 2 14:28:59 yinxiaoyude-iPhone-X kernel(Sandbox)[0] <Error>: Sandbox: Facebook(17321) deny(1) file-map-executable /Library/MobileSubstrate/DynamicLibraries/RHRevealLoader.dylib
May 2 14:28:59 yinxiaoyude-iPhone-X kernel(AppleMobileFileIntegrity)[0] <Notice>: AMFI: '/Library/MobileSubstrate/DynamicLibraries/RevealServer': unsuitable CT policy 0x20 for this platform/device, rejecting signature.
May 2 14:28:59 yinxiaoyude-iPhone-X kernel(AppleMobileFileIntegrity)[0] <Notice>: AMFI: '/Library/MobileSubstrate/DynamicLibraries/RevealServer': unsuitable CT policy 0x20 for this platform/device, rejecting signature.
May 2 14:28:59 yinxiaoyude-iPhone-X Facebook(RHRevealLoader.dylib)[17321] <Notice>: Failed, error: dlopen(/Library/Frameworks/RevealServer.framework/RevealServer, 2): no suitable image found. Did find:
/Library/Frameworks/RevealServer.framework/RevealServer: code signature invalid for '/Library/Frameworks/RevealServer.framework/RevealServer'
/Library/Frameworks/RevealServer.framework/RevealServ
@jkyin
jkyin / crash.swift
Last active February 28, 2018 02:26
crash code
class ViewController: UIViewController, UITableViewDelegate, UITableViewDataSource {
private lazy var hotStockTableView: UITableView = {
let tableView = UITableView()
print("hotStockTableView ======> \(tableView) \n")
tableView.delegate = self
tableView.dataSource = self
// Here cause crash.
tableView.tableFooterView = UIView() // if comment this line, everthing is ok.
tableView.register(UITableViewCell.self, forCellReuseIdentifier: "cell")
@jkyin
jkyin / PSPDFModernizer.c
Created June 21, 2016 07:26 — forked from steipete/PSPDFModernizer.c
Retrofitting containsString: on iOS 7
#import <Foundation/Foundation.h>
#if __IPHONE_OS_VERSION_MIN_REQUIRED < 80000
@interface NSString (PSPDFModernizer)
// Added in iOS 8, retrofitted for iOS 7
- (BOOL)containsString:(NSString *)aString;
@end
@jkyin
jkyin / xcode_ramdisk.sh
Created March 11, 2016 15:56 — forked from derjohng/xcode_ramdisk.sh
Create a RAM disk for using with XCode, with Umount disks method
#!/bin/sh
# Create a RAM disk with same perms as mountpoint
# Script based on http://itux.idev.pro/2012/04/iservice-speed-up-your-xcode-%D0%BD%D0%B5%D0%BA%D0%BE%D1%82%D0%BE%D1%80%D1%8B%D0%B5-%D1%81%D0%BF%D0%BE%D1%81%D0%BE%D0%B1%D1%8B/ with some additions
# Usage: sudo ./xcode_ramdisk.sh start
USERNAME=$(logname)
TMP_DIR="/private/tmp"
RUN_DIR="/var/run"
@jkyin
jkyin / AFURLRequestSerialization.m
Created October 10, 2015 10:01
AFNetworking POST 大量中文字符崩溃
/**
Returns a percent-escaped string following RFC 3986 for a query string key or value.
RFC 3986 states that the following characters are "reserved" characters.
- General Delimiters: ":", "#", "[", "]", "@", "?", "/"
- Sub-Delimiters: "!", "$", "&", "'", "(", ")", "*", "+", ",", ";", "="
In RFC 3986 - Section 3.4, it states that the "?" and "/" characters should not be escaped to allow
query strings to include a URL. Therefore, all "reserved" characters with the exception of "?" and "/"
should be percent-escaped in the query string.
- parameter string: The string to be percent-escaped.
@jkyin
jkyin / archive_ipa.sh
Last active August 27, 2015 03:30 — forked from fabb/archive_ipa.sh
Script to archive an ipa from commandline - depends on xctool
#!/bin/bash
set -x
cd ${0%/*}/..
# codesigning and choosing of provisioning profile is configured via project settings and is dependent of build config
: ${BUILD_NUMBER:?"Need to set BUILD_NUMBER"}
WORKSPACE=<yourworkspace>.xcworkspace

SecItemCopyMatching

返回一个或多个匹配查询搜索的 keychain 项目,或者拷贝指定 keychain 项目的属性。

声明:OSStatus SecItemCopyMatching ( CFDictionaryRef query, CFTypeRef *result );

此函数有两个参数:

从 Xcode 6 开始,Apple 开始在标准架构中弃用 armv7s 架构,具体差异请看下图。

Xcode 5.1.1:

Xcode 6.1:

armv7s 架构指的是用于 iPhone 5 和 5C 等这些设备上的 A6 处理器。