1.provisioning profile证书的描述文件路径
路径:~/Library/MobileDevice/Provisioning Profiles
2.安装软件报错
ERROR: While executing gem ... (Errno::EPERM)
Operation not permitted - /usr/bin/generate-api
示例修改方式:`sudo gem install fastlane -n /usr/local/bin` 添加-n /usr/local/bin
3.mac电脑终端生成公钥与私钥
生成公钥私钥
ssh-keygen -t rsa -C “ylx@ixijia.com”
查看以经生成公钥的位置
cd ~/.ssh
4.Oracle的常用SQL语句
UPDATE 表名称 别名 SET 别名.列名称 = 新值 , 别名.列名称 = 新值 WHERE 别名.列名称 = 某值
update COMM_CONFIG a set a.ITEM_VALUE = '新颜,算话' WHERE a.ITEM_TEXT = '运营商认证' and a.PARENT_VALUE = '191'
SELECT * FROM COMM_CONFIG a WHERE a.PARENT_VALUE = '193'
/// 个人信息表
SELECT * from APP_USER_INFO WHERE MOBILE = ’182000’ --个人信息表
查客户表
select t.rowid ,t.* from Customer t where t.ID_CARD='433’ —查客户表
// 根据借款id查借款
select t.rowid ,t.* from application t where customer_id='{8C2F6A0B-EBC9-4C43-B8F0-B304488C391E}' order by updated_time desc
修改T+1 一般减1天
UPDATE application t set t.created_time = to_date('2017-06-01 15:04:03','yyyy-mm-dd hh24:mi:ss') where t.customer_id='{80E789EF-FA25-48CB-BDEB-BEAB1D4658BB}'
// 删除借款
delete from application t where customer_id='{80E789EF-FA25-48CB-BDEB-BEAB1D4658BB}'
// 放款后,要删除债权信息表
delete from Credit_Info t where customer_id='{80E789EF-FA25-48CB-BDEB-BEAB1D4658BB}' ---债权信息表
select t.rowid ,t.* from Credit_Info t where customer_id='{}' ---债权信息表
// 修改T+1 确认放款
select t.rowid ,t.* from Loan_Provide t where customer_id='{}' --确认放款提前 修改T+1 确认放款created_time
// 接口调用日志表
select t.rowid ,t.* from api_call_record t where created_time>to_date('2017-5-8', 'YYYY-MM-DD') order by created_time desc --接口调用日志表
select t.rowid ,t.* from App_Bank t where user_code='P07551493711058106381' --银行卡信息
delete from App_Bank t where user_code='P07551493711058106381' --银行卡信息
--运营商认证
select * from customer c where c.Id_Card='433'
select tsi.*,tsi.rowid from Telecom_Summary_Info tsi where tsi.account_id='1880*****72'order by created_time desc;--运营商概要信息表
DELETE TELECOM_SUMMARY_INFO t where t.ACCOUNT_ID = ’182000’
select tui.*,tui.rowid from Telecom_User_Info tui where tui.report_id='201706171515250136002162';--运营商身份信息表
DELETE TELECOM_USER_INFO t where t.REPORT_ID = '201706171515250136002162'
select cr.*,cr.rowid from Contacts_Regions cr where cr.report_id='201706171515250136002162';--联系人所在地区表
DELETE CONTACTS_REGIONS t where t.REPORT_ID = '201706171515250136002162'
select pd.*,pd.rowid from Provider_Datas pd where pd.report_id='201706171515250136002162';--运营商移动数据
select ci.*,ci.rowid from Calling_Info ci where ci.report_id='201706171515250136002162' --通话记录
DELETE CALLING_INFO t WHERE t.report_id = '201706171515250136002162'
select cd.*,cd.rowid from Call_Details cd where cd.report_id='201706171515250136002162';--运营商通话详单
DELETE CALL_DETAILS t WHERE t.REPORT_ID = '201706171515250136002162'
select ta.*,ta.rowid from Trip_Analysises ta where ta.report_id='201706171515250136002162';--运营商出行分析
select ba.*,ba.rowid from Behavior_Analysis ba where ba.report_id='201706171515250136002162';--运营商行为分析
---支付宝认证SELECT rowid,t.* from alipay_info t where IDCARD='433' --支付宝基本信息
DELETE ALIPAY_INFO t where IDCARD = '433'
SELECT rowid,t.* FROM ALIPAY_TRADE_INFO t WHERE ORDER_NO = '201704281251050082001945' ORDER BY ID DESC;--支付宝交易记录--201704281440250081002458
DELETE ALIPAY_TRADE_INFO t WHERE ORDER_NO = '201704281251050082001945'
SELECT rowid,t.* FROM ALIPAY_WEALTH t WHERE ORDER_NO = '201704281251050082001945' ORDER BY ID DESC; --支付宝余额
DELETE ALIPAY_WEALTH t where t.ORDER_NO = '201704281251050082001945'
--公积金相关表select r.rowid,r.* from fund_accounts r where r.customer_id=(select guid from customer c where c.Id_Card='433');; --账户信息表
select r.rowid,r.* from fund_flows r where r.account_id='121266'; --流水记录表
delete fund_flows r where r.account_id='97854';
select r.rowid,r.* from fund_loans where r.user_code='P07551476931632197536';--贷款信息表
--电商数据
select a.*,a.rowid from Ecommerce_Accounts a where a.customer_id=(select guid from customer c where c.Id_Card='433'); --电商账户信息表
DELETE ECOMMERCE_ACCOUNTS a WHERE a.CUSTOMER_ID =(SELECT guid FROM CUSTOMER c WHERE c.id_card = '433')
SELECT a.*,a.rowid FROM ECOMMERCE_FLOWS a WHERE a.ACCOUNT_ID = '28128428692'
DELETE ECOMMERCE_FLOWS a WHERE a.ACCOUNT_ID = '28128428692'
select * from Ecommerce_Address ea where ea.account_id='28128428692'; --电商地址信息表
DELETE Ecommerce_Address a WHERE a.ACCOUNT_ID = '28128428692'
5.DNS相关
刷新DNS
sudo killall -HUP mDNSResponder
查看走的哪个DNS解析
nslookup wwww.baidu.com
6.Charles 青花瓷代理设置
1、手机连接电脑代理后,键入charlesproxy.com/getssl,然后下载证书即可。
7.终端检测IPV6是否正常
dig +nocmd +nostats example.com https://pre.xxxx.com
8.制作私库常用的后缀
--use-libraries // 利用静态库
--allow-warnings //忽略警告
--use-libraries --allow-warnings
9.react-native打安卓包
打jsBundle包:
react-native bundle --entry-file index.js --platform android --dev false --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res/
打apk包:
gradle assembleDebug
安装apk到手机上:
adb install /Users/xyj/Desktop/youan-rn/android/app/build/outputs/apk/app-debug.apk
10.iOS的指令集
* armv6
* iPhone
* iPhone2
* iPhone3G
* 第一代和第二代iPod Touch
* armv7
* iPhone4
* iPhone4s
* armv7s
* iPhone5
* iPhone5c
* arm64
* iPhone5s
11.MJRefresh刷新,当内容不多时,隐藏上拉刷新控件
self.tableView.mj_footer.hidden = !(self.tableView.mj_footer.frame.origin.y>(screenH-navigationHeight));
12.cocoapods引用不同swift版本框架
# 指定这四个框架还用swift3的语言
swift4Targets = ['RxSwift','RxCocoa', 'Moya','RxDataSources']
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
if swift4Targets.include? target.name
config.build_settings['SWIFT_VERSION'] = '3.2'
else
config.build_settings['SWIFT_VERSION'] = '4'
end
end
end
13.脚本修改文件中代码
示例为jenkins中打ReactNative项目ios包:
sed -i "" 's|jsCodeLocation = \[\[RCTBundleURLProvider sharedSettings\] jsBundleURLForBundleRoot:@"index" fallbackResource:nil\];|jsCodeLocation = [NSURL URLWithString:[[NSBundle mainBundle] pathForResource:@"index.ios.jsbundle" ofType:nil]];|g' ./Baima/AppDelegate.m
xcodebuild archive -scheme Baima -configuration Debug -archivePath ./baima.xcarchive -project Baima.xcodeproj PROVISIONING_PROFILE=9f29fad2-2111-43b1-bce5-2323233 CODE_SIGN_IDENTITY="iPhone Developer: ddd pp (2VdddddddE9)"
14.终端删除目录或文件
删除文件:
rm 文件地址
删除目录:
rm -r -f 目录
15.待机软件
InsomniaX
16.判断一个控制器是否在当前页面
self.isViewLoaded && (self.view.window != nil) && 应用程是激活状态
17.在shell脚本中,执行rvm切换ruby的版本等,无效处理
shell中如下写:
rvm use system //使用系统的ruby,因为xcodebuild需要用它才能导出ipa包
rvm 2.5.1 --default // 切回自己安装的版本。fastlane打包,需要用到自己安装的,系统的会报没权限等问题
于是,我们在shell打包的脚本中,可以添加上面两句,如果想让它们有效,外面执行shell时,用:
source ./pack.sh // 要用source去执行才有效
18.LaunchImage.storyboard中,图片在一些手机上不显示
把图片格式转换成jpg放在拖进项目目录中,不要放在Assets.xcassets中。
19.shell脚本自动打包示例
#!/bin/bash
# 要想rvm切换环境命令有用,必须用source ./pack.sh Debug/Release执行
# xcodebuild archive -scheme **-iOS -configuration Debug -archivePath ./**-iOS.xcarchive
# 以下三个是com.****.**.test的profile文件
# develop:04353207-b0dd-4505-8da1-04d2ffb2c173 development
# adhoc: 189c29e2-c712-4a04-abe3-2ecf14599c7f ad-hoc
# distribution:ba5110b0-603e-42d4-90f3-b1a18a0aff22 app-store
#
#altool
configuration=''
scheme=***-iOS
workspace=***-iOS.xcworkspace
archivePath="./${scheme}.xcarchive"
if test $1 = 'Debug'
then
configuration='Debug'
elif test $1 = 'Pre'
then
configuration='Pre'
elif test $1 = 'Release'
then
configuration='Release'
else
echo "命令无效"
exit 2
fi
echo "hello, ${configuration} 开始打包"
echo $archivePath
xcodebuild archive -workspace ${workspace} -scheme ${scheme} -configuration $configuration -archivePath $archivePath
if test $1 = 'Release'
then
sed -i "" 's/development/app-store/' ./debug.plist #sed -i 's/旧字符串/替换旧的新符串'
sed -i "" 's/04353207-b0dd-4505-8da1-04d2ffb2c173/189c29e2-c712-4a04-abe3-2ecf14599c7f/' ./debug.plist #sed -i 's/旧字符串/替换旧的新符串'
else
echo ''
fi
#导出命令,要用系统的ruby才可以,所以,先执行:rvm use system 要想这命令有用,必须用source ./pack.sh Debug/Release执行
rvm use system
echo '已成功切换为系统的ruby环境,接下来开始执行导出ipa包命令'
xcodebuild -exportArchive -archivePath $archivePath -exportPath ./Pack -exportOptionsPlist debug.plist
#导出成功后,执行:rvm 2.5.1 --default 切回自己安装的ruby环境(fastlane要用自己安装的)
rvm 2.5.1 --default
echo '已成功切换自己安装的ruby环境'
if test $1 = 'Release'
then
#上传到appstore
echo "hello, ${configuration} Ok"
#验证ipa
/Applications/Xcode.app/Contents/Applications/Application\ Loader.app/Contents/Frameworks/ITunesSoftwareService.framework/Versions/A/Support/altool --validate-app -f ./Pack/***-iOS.ipa -u ***@**.com -p *****
#上传ipa
/Applications/Xcode.app/Contents/Applications/Application\ Loader.app/Contents/Frameworks/ITunesSoftwareService.framework/Versions/A/Support/altool --upload-app -f ./Pack/***-iOS.ipa -u ***@**.com -p *****
echo "正式包成功上传到appstore"
else
#上传到蔳公英
curl -F "file=@./Pack/***-iOS.ipa" \
-F "uKey=**4c2e45***e8788*3" \
-F "_api_key=***4c608c**20d48**a" \
https://www.pgyer.com/apiv1/app/upload
echo "上传到蔳公英成功,请到:https://www.pgyer.com/***-test 下载,密码:无"
fi
#复制一份打包文件到桌面上
cp -R ./Pack/***-iOS.ipa ~/Desktop
echo "已拷贝ipa包到桌面"
#其它操作,如发布成功后,删除打包文件,恢复修改的文件
rm -rf $archivePath ./Pack
sed -i "" 's/app-store/development/' ./debug.plist
sed -i "" 's/189c29e2-c712-4a04-abe3-2ecf14599c7f/04353207-b0dd-4505-8da1-04d2ffb2c173/' ./debug.plist
echo "hello, all ${configuration} pack Ok"
20.xcode真机设备支持包
下载地址:https://pan.baidu.com/s/1zXEFlt94bz3O1e3GdtG92w 密码:rc4k // 网友的,会实时更新最新
解压存放目录:Xcode.app//Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport
21.真机静态库a文件与模拟器静态库a文件合并命令
* 真机.a与模拟器.a合并方法: lipo 新包.a全路径 旧包.a全路径 -create -output 新合并包.a全路径
* 示例: lipo /Users/ddd/Desktop/plugins/XMEncryPlugin/src/ios/libxMenEncryTool-iphone.a /Users/ddd/Desktop/plugins/XMEncryPlugin/src/ios/libxMenEncryTool.a -create -output XmenAES128Encry.a
22.百度网盘全高速下载
方法一:在终端执行
git clone https://github.com/CodeTips/BaiduNetdiskPlugin-macOS.git && ./BaiduNetdiskPlugin-macOS/Other/Install.sh
方法二:修改下载地址,
之前:
https://pan.baidu.com/s/irejgoerogneof
之后:
https://pan.baiduwp.com/s/irejgoerogneof
23.Swift学习,包括很多实例以及RxSwift从0-高阶
学习地址
RxSwift在第6页-11页
24、oc生成c++代码
xcrun -sdk iphoneos clang -arch arm64 -rewrite-objc main.m -o main.cpp
25、栅栏函数注意事项dispatch_barrier_async
// 栅栏函数一定要添加到自己创建的并发队列中,不然dispatch_barrier_async等同于dispatch_async
self.queue = dispatch_queue_create("rw_queue", DISPATCH_QUEUE_CONCURRENT);
// 全局队列这样处理,dispatch_barrier_async等同于dispatch_async
// self.queue = dispatch_get_global_queue(0, 0);
26、判断模拟器,区分编译
swift
#if (arch(i386) || arch(x86_64))
return true
#else
return (JSTPayLib.sharedInstance()?.handleOpen(url))!
#endif
oc
#if TARGET_IPHONE_SIMULATOR
NSLog(@"模拟器");
#else
NSLog(@"真机");
#endif