- 博客(43)
- 资源 (1)
- 收藏
- 关注
原创 invalid mode ‘kCFRunLoopCommonModes‘ provided to CFRunLoopRunSpecific
出来开关是开的,我按了一下关,就打印出了invalid。。。也不影响运行,我就没管它
2020-12-30 17:06:09
26
原创 android(mac)查看秘钥文件的有效期(信息)
1.打开终端,进入本机java虚拟机的bin目录cd /Library/Java/JavaVirtualMachines/jdk1.8.0_144.jdk/Contents/Home/bin2.执行下面的命令keytool -list -v -keystore 秘钥文件地址 -storepass 秘钥库密码keytool -list -v -keystore /Users/macvivi/Desktop/锁/上架/smartLock1.keystory -storepass 1234563
2020-12-29 12:57:12
57
原创 android对应用进行签名(生成签名文件秘钥key)
文章目录1.缘起:传apk到google play,说是apk没有签名2.根据google官网上的指导出了问题:JKS秘钥库使用专用格式。建议使用。。。3.解决方法1.缘起:传apk到google play,说是apk没有签名2.根据google官网上的指导出了问题:JKS秘钥库使用专用格式。建议使用。。。对应用进行签名(google play)要翻墙3.解决方法参考下面的博客:JKS 密钥库使用专用格式。建议使用 "keytool -importkeystore生成的秘钥问题如下图:
2020-12-28 20:53:47
74
原创 cordova(ios android)蓝牙权限 手机蓝牙开关开启 跳到设置界面
用到的cordova插件:app权限相关:cordova-diagnostic-plugin (github)弹框插件:cordova-plugin-dialogs(github)本人代码://处理蓝牙不可用,function dealBluetoothIsNotOn(){ console.log("getBluetoothState") cordova.plugins.diagnostic.getBluetoothState(function(state){ c
2020-12-25 18:43:07
57
原创 cordova(ios android)位置权限 gps位置开关开启 跳到设置界面
文章目录1.cordova插件代码2.iOS请求用户授权的系统位置弹框也是可以用代码调出来的1.cordova插件代码插件:cordova-diagnostic-plugin (github)代码://授权都是ok的才会给回调,否则不会有回调,去找用户要授权去了function locationAvailable(callBack) { //位置是否授权 cordova.plugins.diagnostic.isLocationAuthorized(function (a
2020-12-25 12:23:56
163
原创 cordova cordova-plugin-dialogs插件的navigator.notification.confirm方法和alert的方法同时调用,在iOS上app会死掉
2020-12-23 14:12:08.580079+0800 XXX[22388:4404947] [Presentation] Attempt to present <UIAlertController: 0x1018d1a00> on <MainViewController: 0x100b08c30> (from <MainViewController: 0x100b08c30>) which is already presenting <UIAlertCon
2020-12-23 14:25:45
38
原创 cordova app权限管理 跳到设置界面
android插件:cordova-plugin-android-permissions (github)ios插件:cordova-plugin-permissionScope (github)
2020-12-23 13:03:47
138
原创 cordova 蓝牙 因为android10位置权限,而导致蓝牙无法扫描的问题
文章目录1.问题描述1.1 扫描无法开始BLEPlugin: Stopping Scan, BluetoothAdapter: stopLeScan(), BluetoothAdapter: isLeEnabled(): ON,主要是在安卓的手机上发生,后面发现是要给存储权限,还有位置权限设为始终允许app获取位置,总之是权限问题导致的1.2 在android 9的华为手机上,可能是因为保护连续扫描几次,会过几秒扫描不了。用我同事android 10的vivo手机,弹出的框只有使用期间允许使用位置的选项,但
2020-12-23 11:49:44
227
原创 js(cordova) 百度地图 问题总结
文章目录1.v3.0版本白宫无法添加标注,国内可以,v2.0白宫也可以1.v3.0版本白宫无法添加标注,国内可以,v2.0白宫也可以
2020-12-18 16:27:32
70
2
原创 api:1 Failed to load resource: net::ERR_CLEARTEXT_NOT_PERMITTED
android应用内跳转WebView出现如标题的报错信息,原因是从Android 6.0开始引入了对Https的推荐支持,与以往不同,Android P的系统上面默认所有Http的请求都被阻止了。解决方法如下:在清单文件里加入android:usesCleartextTraffic="true"这句即可参考博客:网页无法打开…因为:net:ERR_CLEARTEXT_NOT_PERMITTED错误解决办法...
2020-12-18 11:00:13
54
原创 javascript 百度地图 undefined is not an object (evaluating ‘c.x‘)
是网络的问题导致js文件没有加载完全,我也不是很清楚,有时候我什么都不做,它又自己好了
2020-12-17 20:50:28
100
原创 原码 反码 补码
以一个byte为例正数:原码 反码 补码三合一1原码 反码 补码: 0000 0001负数:-1原码: 1000 0001反码:符号未不变,其他位取反:1111 1110补码:反码+1:1111 1111计算机都是用补码来存数据的负数在计算机中怎样存储原码/反码/补码计算器...
2020-12-15 13:59:02
26
原创 ios 广播里的kCBAdvDataLocalName字段和蓝牙名不一致的问题
文章目录1.用cordova-plugin-ble-central插件搜索到同一蓝牙设备,在android和iOS设备下打印出的data如下2.标题说的情况,只在iOS设备(iPhone)上偶尔会出现,android手机上是一致的且与iOS设备上的kCBAdvDataLocalName字段一致,当出现不同时蓝牙调试app搜索的时候显示的是广播里的kCBAdvDataLocalName,但iphone设置里的蓝牙显示的时候蓝牙名,如下图3.解决方法:判断一下平台,android平台用peripheral.na
2020-12-14 20:08:35
65
原创 cordova本地存储(存取): 读取项目里的本地文件
文章目录1.用到下面的插件2.代码3.打印截图4.下面的博客记录了我解决问题的过程1.用到下面的插件cordova-plugin-file github2.代码 window.resolveLocalFileSystemURL(cordova.file.applicationDirectory, function (dirEntry) { console.log('file system open: ' + dirEntry.name); consol
2020-12-12 20:52:05
160
原创 “Uncaught ReferenceError: cordova is not defined“
应该是index.html中,下面一句引用被注释掉或是被删除了 <script type="text/javascript" src="cordova.js"></script>
2020-12-11 13:41:50
93
原创 js 右移8位后会四舍五入
var num = [0,168,767 >> 8] console.log(num) // [0,168,2] var num = [0,168,768 >> 8] console.log(num) // [0,168,3]参考博客:js左移右移规律
2020-12-11 10:21:06
18
原创 javascript(js) Uint8Array转普通数组(int数组)数组拼接concat Uint8Array没有concat()方法
function uint8ArrToInt(uint8Arr) { var arr = [] for(var i = 0; i < uint8Arr.length; i++) { arr.push(uint8Arr[i]) } return arr}var uint8Num = new Uint8Array([4,5])var intNum = [1,2,3]var new8 = uint8ArrToInt(uint8Num)consol
2020-12-10 21:12:44
653
3
原创 android studio(as)找不到手机
原因可能是abd被其他的应用程序占用了,比如你用chrome浏览器调试了手机,再用android studio调试,在android studio上就可能找不到手机解决方法把占用adb的应用程序关了,或是在任务管理器中杀死adb。如果还不行,终极解决方案:重启电脑...
2020-12-10 16:18:29
59
原创 js 创建类,对象
function Person() {}Person.prototype.name = "lisi";Person.prototype.age = 21;Person.prototype.family = ["lida","lier","wangwu"];Person.prototype.say = function(){ alert(this.name);};console.log(Person.prototype); //Object{name: 'lisi', age: 2
2020-12-10 11:35:20
21
原创 API MISUSE: <CBPeripheralManager: 0x282c00070> can only accept this command while in the powered on
API MISUSE: <CBPeripheralManager: 0x282c00070> can only accept this command while in the powered on stateXPC connection invalid//这里如果不用self.manager而是用let manager的话,会不弹出蓝牙授权框//得在这个方法调用,peripheral: CBPeripheralManager状态为poweredOn的时候再添加service。 得用这个
2020-12-08 17:48:35
171
原创 ios 去掉tableView没有cell部分的线
加一个footerView就可以了相关博客:iOS storyboard中设置tableView的headerview(头视图) 和 footerview(尾视图)
2020-12-07 11:36:46
29
原创 ios swift 纯代码添加UIBarButtonItem
let item = UIBarButtonItem(title: "Save", style: .plain, target: self, action: #selector(rightBarBtnItemClick)); self.navigationItem.rightBarButtonItem=item
2020-12-05 11:14:42
72
原创 ios storyboard 获取storyboard中的viewController
import UIKitclass CBhelpManager: NSObject { let shared = CBhelpManager() func getViewController(storyboard: String, viewController: String) -> UIViewController { let storyboard = UIStoryboard.init(name: storyboard, bundle: nil)
2020-12-04 16:51:25
51
原创 ios UILabel 切圆角 cornerRadius无效
文章目录我之前忘了写第二句代码,所以无效,加了第二句代码后就可以了但在storyboard中用runtime给label切圆角centralManager:(CBCentralManager *)central didDiscoverPeripheral:(CBPeripheral *)peripheral advertisementData:(NSDictionary&
2020-12-03 19:54:11
103
原创 ios NSMutableArray removeObject
文章目录removeObject方法可能调用一次就删除3个元素removeObject方法可能调用一次就删除3个元素
2020-12-03 18:31:44
42
原创 ios swift 弹出原生的提示框(弹框) UIAlertController
let alertController = UIAlertController(title: "需要定位权限", message: "用于提高精确的定位及导航服务", preferredStyle: .alert) let cancelAction = UIAlertAction(title: "暂不设置", style: .cancel, handler: nil) let okAction = UIAlertAction(title: "去...
2020-12-02 21:24:10
119
原创 ios 查看用户是否授予了定位权限,未授予则跳到设置界面
if CLAuthorizationStatus.denied == CLLocationManager.authorizationStatus() { }
2020-12-02 21:12:19
118
原创 ios tabbar和布局
如下图,你在布局的时候tabbar下面的地方是不包括在内的,不是tabbar遮挡了下面的视图,而是tabbar下面根本没有视图参考博客:ios(swift)显示和隐藏(收起)tabBar
2020-12-02 14:47:46
25
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人 TA的粉丝