公司打算作App,但其实咱们前端组都没有相关App经验,只能摸着石头过河了,跌跌撞撞到如今,总算是ios提交审核了,由于ios审核目前已被拒两次,目前还在审核中,想把整个过程整理出来,记录遇到的问题和解决办法html
下载时按照文档中的国内下载连接指示一步步操做,在init项目的时候出现问题react
$ pod repo remove master
$ pod repo add master https://mirrors.tuna.tsinghua.edu.cn/git/CocoaPods/Specs.git
$ pod repo update
$ cd ~/.cocoapods/repos
$ pod repo remove master
$ git clone https://mirrors.tuna.tsinghua.edu.cn/git/CocoaPods/Specs.git master
source 'https://mirrors.tuna.tsinghua.edu.cn/git/CocoaPods/Specs.git'
复制代码
cd AwesomeProject
react-native run-ios
复制代码
下载后一直报错,最终解决办法是: 关掉全部终端,打开只打开一个终端,打开到咱们对应的项目,执行npm start 而后在点击项目下的 ios/test.xcodeproj in Xcodeios
咱们的项目用到了webview,由于在启动时有warnning,找到文章以下git
依次执行下面两行代码再次从新启动
$ yarn add react-native-webview
$ react-native link react-native-webview
复制代码
import React, { Component } from 'react';
import { StyleSheet, Text, View } from 'react-native';
import { WebView } from 'react-native-webview';
// ...
class MyWebComponent extends Component {
render() {
return (
<WebView source={{ uri: 'https://facebook.github.io/react-native/' }} />
);
}
}
复制代码
先检查如下两项:github