开发调试工具、问题记录

179 阅读2分钟

开发调试工具

工欲善其事,必先利其器

Charles

抓包工具

  • 抓包
    • https需要安装证书

      image.png

  • 代理
    • map from urlA to urlB,网址代理

      image.png image.png

chrome://inspect

好像只能通過手機線

遠程調試Android設備網頁

image.png

image.png

eruda

一个网页上调试小工具,直接手机上调试方便

image.png

github看代码技巧

github1s

One second to read GitHub code with VS Code.

Usage

Just add 1s after github and press Enter in the browser address bar for any repository you want to read.

其他

局域網文件傳輸 Dukto.app

VIM的使用

Vim快捷键速查表

a24bb6c4xd373285d22f7.png

在Codepen中使用vim

设置 codepen.io/settings/ed…

I’ve been using Vim for about 2 years now, mostly because I can’t figure out how to exit it.

image.png

发现页面中的Esc有冲突:

是因为浏览器装了Vimium qiita.com/M-ISO/items…

解决方法:

添加规则将codepen页面剔除:

image.png

问题

Google Play上架后,测试无法下载到最新版

  • 原因是versionCode 比之前小,所以beta版无法显示最新的

通过内部测试apk分享的时候发现: image.png

image.png

image.png

  • 没有认识到是通过versionCode来防止update的,以为是通过versionName(1.0 - 2.0)

iOS Missing Push Notification Entitlement 邮件Warning

问题:每次提交 都收到Warning

image.png

为了不用每次upload版本的时候,都收到warning的email提醒,所以做了动作:添加Push Notification Entitlement

问答

stackoverflow.com/questions/3…

The app validator checks for an implementation of the UIApplicationDelegate method application:didRegisterForRemoteNotificationsWithDeviceToken: in the app. You’ll get the warning you described if your app delegate implements that method and there is no aps-environment entitlement.

It's possible that a third-party library you're using has implemented that method even though your app doesn't do anything with push notifications. In that case you can just ignore the warning. It's there to let developers who do use push notifications know if they might have signed their app incorrectly."

image.png

开启Notification

image.png

image.png

image.png

image.png 上面这一步所用到的证书,下面介绍如何生成

help.apple.com/developer-a…

image.png

image.png

结果是会多一个文件,权限文件:

image.png

内容:

<dict>
	<key>aps-environment</key>
	<string>development</string>
</dict>

上傳的時候可以看到有aps-environment

image.png

疑问:不知道不加证书是否可以解决问题

Hybrid更新流程

流程(这段文字是自己理解,也可参考下图):

  1. 将zip包发布到server端
  2. app每次打开的时候都去对比版本号检查是否有更新
  3. 如果有更新就下载最新的zip包

image.png

graph TD
server --> app1
server --> app2
server --> ...
server --> appn

image.png