Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
C
CodePush-iOS
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 0
    • Merge Requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Incidents
    • Environments
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Demo
  • CodePush-iOS
  • Wiki
  • Home

Home · Changes

Page history
修正部分内容 authored Oct 30, 2019 by John Huang's avatar John Huang
Hide whitespace changes
Inline Side-by-side
Showing with 0 additions and 33 deletions
+0 -33
  • home.md home.md +0 -33
  • No files found.
home.md
View page @ ab7673b0
......@@ -39,28 +39,6 @@ code-push register
cordova create CodePush-iOS com.easternphoenix.CodePush CodePush-iOS
```
进入项目根目录,创建`build.json`
```shell
cd CodePush-iOS
touch ./build.json
open -a xcode ./build.json
```
向文件添加下面内容:
```json
{
"ios": {
"debug": {
"codeSignIdentity": "iPhone Developer",
"automaticProvisioning": true,
"developmentTeam": "2WT78RG4ZP",
"packageType": "development"
}
}
}
```
通过配置`build.json`文件可以控制cordova如何生成iOS项目。
添加iOS平台
```shell
cordova platform add ios
......@@ -111,17 +89,6 @@ open -a xcode ./config.xml
open -a xcode ./www/index.html
```
把文件中的含有「`http-equiv="Content-Security-Policy"`」配置的`<meta>`元素替代成下面这样
```html
<html>
<head>
<meta http-equiv="Content-Security-Policy" content="default-src https://codepush.appcenter.ms 'self' data: gap: https://ssl.gstatic.com 'unsafe-eval'; style-src 'self' 'unsafe-inline'; media-src *;">
...
</head>
...
</html>
```
---
在`index.js`添加热更新代码
```shell
......
Clone repository
  • code push概念及常用命令
  • codepush研究记录
  • Home