... | ... | @@ -75,7 +75,7 @@ $ code-push register |
|
|
|
|
|
注册AppCenter需要微软账号或者也可以通过GitHub,facebook,google账号进行注册。因为主要跟开发有关,跟微软的产品关系不大,我用的GitHub账号进行注册。
|
|
|
注册时大概是这样的:
|
|
|
![b663c7b1ccfbf6ce36f89d010b91cc0a.png](evernotecid://E6AE1A02-BE54-4FBD-B4AF-539AC01FBF12/appyinxiangcom/18720831/ENResource/p12141)
|
|
|
![9145376A-FC2A-4738-BD21-CBA6361FCFA0](/uploads/d36087cfad7ce72850be9f505aad5656/9145376A-FC2A-4738-BD21-CBA6361FCFA0.png)
|
|
|
|
|
|
如果已经注册过,需要在其它机器上进行登录操作,可以用下面命令进行操作,同样会打开网页进行登录
|
|
|
```bash
|
... | ... | @@ -97,7 +97,7 @@ $ code-push app add CodePush-iOS ios cordova |
|
|
$ code-push deployment list CodePush-iOS -k
|
|
|
```
|
|
|
|
|
|
![1b9f50b00c01f910bbf48767919c2184.png](evernotecid://E6AE1A02-BE54-4FBD-B4AF-539AC01FBF12/appyinxiangcom/18720831/ENResource/p12144)
|
|
|
![B93F15E1-A1ED-4BD5-AF7B-C72D82FBCFF1](/uploads/ac83969137a18abcfdb2d6011e7435b4/B93F15E1-A1ED-4BD5-AF7B-C72D82FBCFF1.png)
|
|
|
|
|
|
这个key需要填入到前面的`config.xml`中。
|
|
|
|
... | ... | @@ -109,7 +109,7 @@ iOS: |
|
|
```
|
|
|
|
|
|
在AppCenter上也会看到创建的App
|
|
|
![f9ded211b543413783e974a5a560a52e.png](evernotecid://E6AE1A02-BE54-4FBD-B4AF-539AC01FBF12/appyinxiangcom/18720831/ENResource/p12142)
|
|
|
![09BD6F3A-2CBE-4A73-AD3A-A8267784A878](/uploads/39b808652e0f8c5f7803837a345a6d6f/09BD6F3A-2CBE-4A73-AD3A-A8267784A878.png)
|
|
|
|
|
|
---
|
|
|
用命令列出AppCenter上注册的App
|
... | ... | @@ -117,8 +117,7 @@ iOS: |
|
|
$ code-push app ls
|
|
|
```
|
|
|
|
|
|
![22d06b0ae7ec94111f0671a3583e6e4f.png](evernotecid://E6AE1A02-BE54-4FBD-B4AF-539AC01FBF12/appyinxiangcom/18720831/ENResource/p12143)
|
|
|
|
|
|
![7779E9D4-878F-482B-B7D2-C00B1814CEB8](/uploads/b07e2ba4af709fbadc693143162cfaa5/7779E9D4-878F-482B-B7D2-C00B1814CEB8.png)
|
|
|
---
|
|
|
|
|
|
在web的js代码中添加`codePush.sync()`触发热更新。我在`index.js`的`deviceready`事件中添加。
|
... | ... | @@ -223,7 +222,7 @@ $ cd ConnectDemo |
|
|
```bash
|
|
|
$ code-push app add ConnectDemo android cordova
|
|
|
```
|
|
|
![d45ecf504eb095ae3463b3bcee1d28f1.png](evernotecid://E6AE1A02-BE54-4FBD-B4AF-539AC01FBF12/appyinxiangcom/18720831/ENResource/p12146)
|
|
|
![279CE433-6D20-4C0C-ADAD-BA67BA11D0A8](/uploads/0b7c67d3f4e5f9809493df0500713111/279CE433-6D20-4C0C-ADAD-BA67BA11D0A8.png)
|
|
|
|
|
|
|
|
|
---
|
... | ... | @@ -366,7 +365,7 @@ run |
|
|
$ code-push deployment history ConnectDemo Staging
|
|
|
```
|
|
|
输出:
|
|
|
![83bea552936464348fb6533bab565883.png](evernotecid://E6AE1A02-BE54-4FBD-B4AF-539AC01FBF12/appyinxiangcom/18720831/ENResource/p12145)
|
|
|
![9431ABAC-54D3-40A1-A972-F1D7371B5275](/uploads/120030b8b325162f2930d143ebb6a84e/9431ABAC-54D3-40A1-A972-F1D7371B5275.png)
|
|
|
|
|
|
---
|
|
|
需要看看App到底装的哪个版本
|
... | ... | @@ -487,7 +486,7 @@ $ cordova emulate ios --target iPhone-XR --debug |
|
|
缺失并不妨碍项目的正常运行。
|
|
|
|
|
|
Safari调试中没有打印CodePush的信息是因为console中点选了Errors选项,只显示App的错误信息,CodePush事实上在正常运作。
|
|
|
![b78c89442ae179480ff49bd60c9c1eaa.png](evernotecid://E6AE1A02-BE54-4FBD-B4AF-539AC01FBF12/appyinxiangcom/18720831/ENResource/p12147)
|
|
|
![47E5FD97-74BC-40B2-A53C-00F88D52BB8F](/uploads/d7eb6d0f9b049e8a3cde07b9b17f8345/47E5FD97-74BC-40B2-A53C-00F88D52BB8F.png)
|
|
|
取消选项后console正常显示。
|
|
|
|
|
|
---
|
... | ... | @@ -502,7 +501,7 @@ $ code-push release-cordova MyApp ios --targetBinaryVersion "~0.0.0" |
|
|
|
|
|
---
|
|
|
这份关于版本控制的信息比较重要
|
|
|
![60463226e8facf85b18f39a7f9c0a688.png](evernotecid://E6AE1A02-BE54-4FBD-B4AF-539AC01FBF12/appyinxiangcom/18720831/ENResource/p12148)
|
|
|
![4FC46FD0-6912-46BF-AAE9-6A901CB729F5](/uploads/be1b158164764a126d8a553d0fe654f9/4FC46FD0-6912-46BF-AAE9-6A901CB729F5.png)
|
|
|
|
|
|
---
|
|
|
经过研究,一般情况下,用"<="的版本号进行更新控制是比较方便的。
|
... | ... | |