求 魔人 魔人euphoriaa 1-6,午休,带字幕版,百度云或者磁链都可以

beego是一个Golang实现的开源Go应用开发框架,他可以用来快速开发 API、Web 及后端服务等各种应用,是一个 RESTful的框架,主要设计灵感来源于tornado、sinatra和flask这三个框架,但是结合了Go本身的一些特性(interface、struct 嵌入等)而设计的一个框架。
Beego Framework:
一个使用 Go 的思维来帮助您构建并开发 Go 应用程序的开源框架
beego安装, bee命令
#go /astaxie/beego
安装bee工具,bee工具是一个为了协助快速开发beego项目而创建的项目,可以通过bee快速创建项目、实现热编译、开发测试以及开发完之后打包发布的一整套从创建、开发到部署的方案。
#go /beego/bee
bee命令默认安装在$GOPATH/bin下,把这个路径添加到PATH中。
实践中主要用到bee的三个子命令:api,run,pack。
api命令用来创建api应用,生成默认beego api应用框架。
# bee api snmpcheck
# tree snmpcheck/
snmpcheck/
├── conf
└── app.conf
├── controllers
├── object.go
└── user.go
├── docs
└── doc.go
├── main.go
├── models
├── object.go
└── user.go
├── routers
└── router.go
└── tests
└── default_test.go
其中,routers/router.go是路由的相关配置,controllers目录下存放各个api路由下相关的控制器。
run命令用来编译运行beego工程,并通过监控源码的改动,实现热编译,开发过程中就可以实时的看到项目修改之后的效果。
beego :1.6.1
:go version go1.5.1 linux/amd64
[INFO] Uses 'snmpcheck' as 'appname'
[INFO] Initializing watcher...
[TRAC] Directory(/home/lab/src/snmpcheck/controllers)
[TRAC] Directory(/home/lab/src/snmpcheck)
[TRAC] Directory(/home/lab/src/snmpcheck/models)
[TRAC] Directory(/home/lab/src/snmpcheck/routers)
[TRAC] Directory(/home/lab/src/snmpcheck/tests)
[INFO] Start building...
[SUCC] Build was successful
[INFO] Restarting snmpcheck ...
[INFO] ./snmpcheck is running...
[parser.go:61][I] /home/lab/src/snmpcheck/controllers no changed
[parser.go:61][I] /home/lab/src/snmpcheck/controllers no changed
[asm_amd64.s:1696][I] http server Running on :7070
pack命令用来发布应用的时候打包。
# bee pack
app path: /home/lab/src/snmpcheck
build snmpcheck
GOOS linux GOARCH amd64
build success
exclude relpath prefix: .
exclude relpath suffix: .go:.DS_Store:.tmp
file write to `/home/lab/src/snmpcheck/snmpcheck.tar.gz`
打包完的tar包中有应用的可执行文件和配置文件,部署时直接上传这个tar包即可。
# tar -tf snmpcheck.tar.gz
conf/app.conf
restful路由
beego的路由设置比较灵活,包括固定路由,正则匹配路由,以及通过go反射机制实现的自动路由(可能会导致性能损耗,不推荐使用这种路由设置方式)和注解路由。
实践中使用比较方便的注解路由方式。注解路由的使用:
首先在router中用namespace方式注册控制器。这里在/v1/user下,导入UserController控制器。
ns := beego.NewNamespace(&/v1&,
beego.NSNamespace(&/user&,
beego.NSInclude(
&controllers.UserController{},
beego.AddNamespace(ns)
在控制器中对应方法上用注解方式注册路由。
// @Title logout
// @Description Logs out current logged in user session
// @Success 200 {string} logout success
// @router /logout [get]
func (u *UserController) Logout() {
u.Data[&json&] = &logout success&
u.ServeJSON()
/logout [get]&注册了&Get /v1/user/logout -& UserController.Logout()&这样的路由。
如果beego运行在dev模式(可以在conf中配置),routers目录下会生成路由经过解析后的结果commentsRouter.go,调试时可以作为参考。
进程内监控
beego提供了应用信息的监控和展示,可以查看实时信息比如qps,健康状况,程序性能相关(goroutine,gc,cpu等),可以查看静态信息比如路由配置,conf配置信息,过滤器信息,还可以查看和触发任务。
进程监控默认是关闭的,可以通过简单的配置中打开,很方便:
EnableAdmin = true
AdminHttpAddr = 0.0.0.0 #默认监听地址是localhost
AdminHttpPort = 8088
这样,应用启动后,会在8088端口提供监控展示服务。
自动化文档
beego通过swagger和内部的注释解析能够实现自动文档的效果,使用方法:
routers/router.go中路由只能使用namespace+Include的写法,而且只支持二级解析,一级版本号,二级分别表示应用模块。
routers/router.go文件中设置全局的应用信息。注意,必须写在文件顶部。
注释的格式(每个字段的含义可以参照):
// @Title login
// @Description Logs user into the system
&The username for login&
&The password for login&
// @Success 200 {string} login success
// @Failure 403 user not exist
// @router /login [get]
func (u *UserController) Login() {
username := u.GetString(&username&)
password := u.GetString(&password&)
if models.Login(username, password) {
u.Data[&json&] = &login success&
u.Data[&json&] = &user not exist&
u.ServeJSON()
在配置文件中打开自动文档配置:
EnableDocs = true
启动时添加自动文档参数:
bee run -gendoc=true
满足以上配置,beego会自动解析控制器中的注释,启动swagger服务,并在/docs接口上提供已生成好的json字串。
访问swagger服务并在swagger中访问/docs接口,即可看到接口的文档,同时也可以对接口进行测试。
阅读(...) 评论()Go语言(11)
beego环境搭建和bee工具安装使用,以Windows环境为例。
1、下载并安装好GO
2、配置好GOROOT和GOPATH环境变量。
并在Path环境变量中加入%GOPATH%/bin和%GOROOT%bin。
注意,这里我的Go安装在C:\Go
我的GOPATH 设置在D:\go
3、下载并安装好git
这里是git的安装包下载官网
4、在GOPATH路径下的src文件夹下右键点击空白处,点击Git Bash Here
打开后输入go /astaxie/beego按下回车
稍等片刻即可在GOPATH的src目录下看到有//astaxie/beego目录。
5、等待出现如下界面后
再输入go /beego/bee按下回车
稍等片刻即可在GOPATH的src目录下看到有//beego/bee目录,同时有很多依赖包被下载添加到/目录下。
6、等待出现如下界面后(会等很长一段时间,因为在下载bee)
输入bee按下回车来验证bee是否被安装成功,会显示如下:
7、使用bee工具生成beego框架工程代码。
在GOPATH路径下的src文件夹下右键点击空白处,点击Git Bash Here
输入bee new lalala按下回车
可看到如下界面:
此时在GOPATH路径下的src文件夹下就出现了刚刚创建的lalala文件夹,里面就是刚刚beego框架所创建的!
其他的开发的话,你去百度去吧!
@author:李慧迪 @Email:
&&相关文章推荐
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
访问:3755次
排名:千里之外
原创:24篇
(5)(17)(2)(1)> 博客详情
摘要: beego1.3版本已经在上个星期发布了,但是还是有很多人不了解如何来进行开发,也是在一步一步的测试中开发,期间QQ群里面很多人都问我如何开发,我的业余时间实在是排的太满了,实在是没办法一一回复大家,在这里和大家说声对不起,这两天我又不断的改进,写了一个应用示例展示如何使用beego开发API已经自动化文档和测试,这里就和大家详细的解说一下。
beego API开发以及自动化文档
beego1.3版本已经在上个星期发布了,但是还是有很多人不了解如何来进行开发,也是在一步一步的测试中开发,期间QQ群里面很多人都问我如何开发,我的业余时间实在是排的太满了,实在是没办法一一回复大家,在这里和大家说声对不起,这两天我又不断的改进,写了一个应用示例展示如何使用beego开发API已经自动化文档和测试,这里就和大家详细的解说一下。
自动化文档开发的初衷
我们需要开发一个API应用,然后需要和手机组的开发人员一起合作,当然我们首先想到的是文档先行,我们也根据之前的经验写了我们需要的API原型文档,我们还是根据github的文档格式写了一些漂亮的文档,但是我们开始担心这个文档如果两边不同步怎么办?因为毕竟是原型文档,变动是必不可少的。手机组有一个同事之前在雅虎工作过,他推荐我看一个swagger的应用,看了swagger的标准和文档化的要求,感觉太棒了,这个简直就是神器啊,通过swagger可以方便的查看API的文档,同时使用API的用户可以直接通过swagger进行请求和获取结果。所以我就开始学习swagger的标准,同时开始进行Go源码的研究,通过Go里面的AST进行源码分析,针对comments解析,然后生成swagger标准的json格式,这样最后就可以和swagger完美结合了。
这样做的好处有三个:
注释标准化
有了注释之后,以后API代码维护相当方便
根据注释自动化生成文档,方便调用的用户查看和测试
beego API应用入门
请大家更新到最新的bee和beego
go&get&-u&/beego/bee
go&get&-u&/astaxie/beego
然后进入到你的GOPATH/src目录,执行命令bee api bapi,进入目录cd bapi,执行命令bee run -downdoc=true -docgen=true.请看下面我执行的效果图:
执行完成之后就打开浏览器,输入URL:
记住这里必须要用127.0.0.1,不能使用localhost,存在CORS问题,Ajax跨域
我们的效果和应用都出来了,很酷很炫吧,那这后面到底采用了怎么样的一些技术呢?让我们一步一步来讲解这些细节:
我们首先来了解一下bee api创建的应用的目录结构:
|&&&`--&app.conf
|--&controllers
|&&&|--&object.go
|&&&`--&user.go
|&&&|--&doc.go
|&&&`--&docs.go
|--&lastupdate.tmp
|--&main.go
|--&models
|&&&|--&object.go
|&&&`--&user.go
|--&routers
|&&&|--&commentsRouter.go
|&&&`--&router.go
|--&swagger
&&&&`--&default_test.go
main.go 是程序的统一入口文件
bapi 是生成的二进制文件
conf 配置文件目录,app.conf
controllers 控制器目录,主要是逻辑的处理
models 是数据处理层的目录
docs 是自动化生成文档的目录
lastupdate.tmp 是一个注解路由的缓存文件
routers是路由目录,主要涉及一些路由规则
swagger 是一个html静态资源目录,是通过bee自动下载的,主要就是展示我们看到的界面及测试
test 目录是针对应用的测试用例,beego相比其他revel框架的好处之一就是无需启动应用就可以执行test case。
入口文件main
我们第一步先来看一下入口是怎么写的?
package&main
&&&&_&"bapi/docs"
&&&&_&"bapi/routers"
&&&&"/astaxie/beego"
func&main()&{
&&&&if&beego.RunMode&==&"dev"&{
&&&&&&&&beego.DirectoryIndex&=&true
&&&&&&&&beego.StaticDir["/swagger"]&=&"swagger"
&&&&beego.Run()
入口文件就是一个普通的beego应用的标准代码,只是这里多了几行代码,把swagger加入了static,因为我们需要把文档服务器集成到beego的API应用中来。然后增加了docs的初始化引入,和router的效果一样。接下里我们先来看看自动化API的路由是怎么设计的
namespace路由
自动化路由才有了namespace来进行设计,而且注意两点,第一目前只支持namespace的路由支持自动化文档,第二只支持NSNamespace和NSInclude解析,而且是只能两个层级,先看我们的路由设置:
func&init()&{
&&&&ns&:=&beego.NewNamespace("/v1",
&&&&&&&&beego.NSNamespace("/object",
&&&&&&&&&&&&beego.NSInclude(
&&&&&&&&&&&&&&&&&controllers.ObjectController{},
&&&&&&&&&&&&),
&&&&&&&&),
&&&&&&&&beego.NSNamespace("/user",
&&&&&&&&&&&&beego.NSInclude(
&&&&&&&&&&&&&&&&&controllers.UserController{},
&&&&&&&&&&&&),
&&&&&&&&),
&&&&beego.AddNamespace(ns)
我们先来看一下这个代码,首先是使用beego.NewNamespace创建一个ns的变量,这个变量里面其实就是存储了一棵路由树,我们可以把这棵树加到其他任意已经存在的树中去,这也就是namespace的好处,可以在任意的模块中设计自己的namespace,然后把这个namespace加到其他的应用中去,可以增加任意的前缀等。
这里我们分析一下NewNamespace这个函数,这个函数的定义是这样的NewNamespace(prefix string, params ...innnerNamespace) *Namespace,他的第一个参数就是前缀,第二个参数是innnerNamespace多参数,那么我们来看看innnerNamespace的定义是什么:
type&innnerNamespace&func(*Namespace)
它是一个函数,也就是只要是符合参数是*Namespace的函数都可以。那么在beego里面定义了如下的方法支持返回这个函数类型:
NSCond(cond namespaceCond) innnerNamespace
NSBefore(filiterList ...FilterFunc) innnerNamespace
NSAfter(filiterList ...FilterFunc) innnerNamespace
NSInclude(cList …ControllerInterface) innnerNamespace
NSRouter(rootpath string, c ControllerInterface, mappingMethods …string) innnerNamespace
NSGet(rootpath string, f FilterFunc) innnerNamespace
NSPost(rootpath string, f FilterFunc) innnerNamespace
NSDelete(rootpath string, f FilterFunc) innnerNamespace
NSPut(rootpath string, f FilterFunc) innnerNamespace
NSHead(rootpath string, f FilterFunc) innnerNamespace
NSOptions(rootpath string, f FilterFunc) innnerNamespace
NSPatch(rootpath string, f FilterFunc) innnerNamespace
NSAny(rootpath string, f FilterFunc) innnerNamespace
NSHandler(rootpath string, h http.Handler) innnerNamespace
NSAutoRouter(c ControllerInterface) innnerNamespace
NSAutoPrefix(prefix string, c ControllerInterface) innnerNamespace
NSNamespace(prefix string, params …innnerNamespace) innnerNamespace
因此我们可以在NewNamespace这个函数的第二个参数列表中使用上面的任意函数作为参数调用。
我们看一下路由代码,这是一个层级嵌套的函数,第一个参数是/v1,即为/v1开头的路由树,第二个参数是beego.NSNamespace,第三个参数也是beego.NSNamespace,也就是路由树嵌套了路由树,而我们的beego.NSNamespace里面也是和NewNamespace一样的参数,第一个参数是路由前缀,第二个参数是slice参数。这里我们调用了beego.NSInclude来进行注解路由的引入,这个函数是专门为注解路由设计的,我们可以看到这个设计里面我们没有任何的路由信息,只是设置了前缀,那么这个的路由是在哪里设置的呢?我们接下来分析什么是注解路由。
可能有些同学不了解什么是注解路由,也就是在Controller类上添加一个注释让框架给自动添加Route,那么我们来看一下ObjectController和UserController中怎么写路由注解的:
//&Operations&about&object
type&ObjectController&struct&{
&&&&beego.Controller
//&@Title&create
//&@Description&create&object
//&@Param&&&body&&&&&&&&body&&&&models.Object&&&true&&&&&&&&"The&object&content"
//&@Success&200&{string}&models.Object.Id
//&@Failure&403&body&is&empty
//&@router&/&[post]
func&(this&*ObjectController)&Post()&{
&&&&var&ob&models.Object
&&&&json.Unmarshal(this.Ctx.Input.RequestBody,&&ob)
&&&&objectid&:=&models.AddOne(ob)
&&&&this.Data["json"]&=&map[string]string{"ObjectId":&objectid}
&&&&this.ServeJson()
我们看到我们的每一个函数上面有大段的注释,注解路由其实主要关注最后一行//
/ [post],这一行的注释就是表示这个函数是注册到路由/,支持方法是post。
和我们平常的时候使用beego.Router("/", &ObjectController{},"post:Post")的效果是一模一样的,只是这一次框架帮你自动注册了这样的路由,框架是如何来自动注册的呢?在应用启动的时候,会判断是否有调用NSInclude,在调用的时候,判断RunMode是否是dev模式,是的话就会判断是否之前有分析过,并且分析对象目录有更新,就使用Go的AST进行源码分析(当然只分析NSInclude调用的controller),然后生成文件routers/commentsRouter.go,在该文件中会自动注册我们需要的路由信息。这样就完成了整个的注解路由注册。
注解路由是使用//
开头来申明的,而且必须放在你要注册的函数的上方,和其他注释@Title @Description的顺序无关,你可以放在第一行,也可以最后一行。有两个参数,第一个是需要注册的路由,第二个是支持的方法。
路由可以支持beego支持的任意规则,例如/object/:key这样的参数路由,也可以固定路由/object,也可以是正则路由/cms_:id([0-9]+).html
支持的HTTP方法必须使用[]中间是支持的方法列表,多个使用,分割,例如[post,get]。但是目前自动化文档只支持一个方法,也就是你多个的方法的时候无法做到RESTFul到同一个函数,也不鼓励你这样设计的API。如果你API设计的时候支持了多个方法,那么文档生成的时候默认是取第一个作为支持的方法。
上面我们看到我们的方法上面有很多注释,那么接下来就进入我们今天的重点:自动化文档
自动化文档
所谓的自动化文档,说白了就是根据我们的注释自动的生成我们可以看得懂的漂亮文档。我们上面也说了写注释不仅仅是方便我们的代码维护,逻辑阐述,同时如果能够自动生成文档,那么对于使用API的用户来说也是很大的帮助。那么如何进行自动化文档生成呢?
我当初看了swagger的展示效果之后,首先研究了他的,发现是一些json数据,只要我们的API能够生成swagger认识的json就可以了,因此我的思路就来了,根据注释生成swagger的JSON标准数据输出。swagger提供了一个例子代码:&我就是根据这个例子的格式一步一步实现了现在的自动化文档。
首先第一步就是API的描述:
我们看到在router.go里面头部有一大段的注释,这些注释就是描述整个项目的一些信息:
//&@APIVersion&1.0.0
//&@Title&beego&Test&API
//&@Description&beego&has&a&very&cool&tools&to&autogenerate&documents&for&your&API
//&@Contact&
//&@TermsOfServiceUrl&http://beego.me/
//&@License&Apache&2.0
//&@LicenseUrl&http://www.apache.org/licenses/LICENSE-2.0.html
这里面主要是几个标志:
@APIVersion
@Description
@TermsOfServiceUrl
@LicenseUrl
这里每一个都不是必须的,你可以写也可以不写,后面就是一个字符串,你可以使用任意喜欢的字符进行描述。我们来看一下生成的:
&&"apiVersion":&"1.0.0",
&&"swaggerVersion":&"1.2",
&&"apis":&[
&&&&&&"path":&"/object",
&&&&&&"description":&"Operations&about&object\n"
&&&&&&"path":&"/user",
&&&&&&"description":&"Operations&about&Users\n"
&&"info":&{
&&&&"title":&"beego&Test&API",
&&&&"description":&"beego&has&a&very&cool&tools&to&autogenerate&documents&for&your&API",
&&&&"contact":&"",
&&&&"termsOfServiceUrl":&"http://beego.me/",
&&&&"license":&"Url&http://www.apache.org/licenses/LICENSE-2.0.html"
这是首次请求的一些信息,那么apis是怎么来的呢?这个就是根据你的namespace进行源码AST分析获取的,所以目前只支持两层的namespace嵌套,而且必须是两层,第一层是baseurl,第二层就是嵌套的namespace的prefix。也就是上面的path信息,那么里面的description那里获取的呢?请看控制器的注释,
控制器注释文档
针对每一个控制我们可以增加注释,用来描述该控制器的作用:
//&Operations&about&object
type&ObjectController&struct&{
&&&&beego.Controller
这个注释就是用来表示我们的每一个控制器API的作用,而控制器的函数里面的注释就是用来表示调用的路由、参数、作用以及返回的信息。
//&@Title&Get
//&@Description&find&object&by&objectid
//&@Param&&&objectId&&&&&&&&path&&&&string&&true&&&&&&&&"the&objectid&you&want&to&get"
//&@Success&200&{object}&models.Object
//&@Failure&403&:objectId&is&empty
//&@router&/:objectId&[get]
func&(this&*ObjectController)&Get()&{
从上面的注释我们可以把我们的注释分为以下类别:
@Title接口的标题,用来标示唯一性,唯一,可选格式:之后跟一个描述字符串
@Description接口的作用,用来描述接口的用途,唯一,可选格式:之后跟一个描述字符串
请求的参数,用来描述接受的参数,多个,可选格式:变量名 传输类型 类型 是否必须 描述传输类型:类型:变量名和描述是一个字符串是否必须:true 或者false
对象,这个地方大家写的时候需要注意,需要是相对于当前项目的路径.对象,例如models.Object表示models目录下的Object对象,这样bee在生成文档的时候会去扫描改对象并显示给用户改对象。
query 表示带在url串里面?aa=bb&cc=dd
form 表示使用表单递交数据
path 表示URL串中得字符,例如/user/{uid} 那么uid就是一个path类型的参数
body 表示使用raw body进行数据的传输
header 表示通过header进行数据的传输
成功返回的code和对象或者信息格式:code 对象类型 信息或者对象路径code:表示HTTP的标准status code,200 201等对象类型:{object}表示对象,其他默认都认为是字符类型,会显示第三个参数给用户,如果是{object}类型,那么就会去扫描改对象,并显示给用户对象路径和上面Param中得对象类型一样,使用路径.对象的方式来描述
错误返回的信息,格式: code 信息code:同上Success错误信息:字符串描述信息
上面已经描述过支持两个参数,第一个是路由,第二个表示支持的HTTP方法
那么我们通过上面的注释会生成怎么样的JSON信息呢?
&&"path":&"/object/{objectId}",
&&"description":&"",
&&"operations":&[
&&&&&&"httpMethod":&"GET",
&&&&&&"nickname":&"Get",
&&&&&&"type":&"",
&&&&&&"summary":&"find&object&by&objectid",
&&&&&&"parameters":&[
&&&&&&&&&&"paramType":&"path",
&&&&&&&&&&"name":&"objectId",
&&&&&&&&&&"description":&"\"the&objectid&you&want&to&get\"",
&&&&&&&&&&"dataType":&"string",
&&&&&&&&&&"type":&"",
&&&&&&&&&&"format":&"",
&&&&&&&&&&"allowMultiple":&false,
&&&&&&&&&&"required":&true,
&&&&&&&&&&"minimum":&0,
&&&&&&&&&&"maximum":&0
&&&&&&"responseMessages":&[
&&&&&&&&&&"code":&200,
&&&&&&&&&&"message":&"models.Object",
&&&&&&&&&&"responseModel":&"Object"
&&&&&&&&},
&&&&&&&&&&"code":&403,
&&&&&&&&&&"message":&":objectId&is&empty",
&&&&&&&&&&"responseModel":&""
上面阐述的这些描述都是可以使用一个或者多个&'\t', '\n', '\v', '\f', '\r', ' ', U+0085 (NEL), U+00A0 (NBSP)进行分割
对象自定义注释
我们的对象定义如下:
type&Object&struct&{
&&&&ObjectId&&&string
&&&&Score&&&&&&int64
&&&&PlayerName&string
通过扫描生成的代码如下:
ObjectId&(string,&optional):&,
PlayerName&(string,&optional):&,
Score&(int64,&optional):
我们发现字段都是optional的,而且没有任何针对字段的描述,其实我们可以在对象定义里面增加如下的tag:
type&Object&struct&{
&&&&ObjectId&&&string&&&`required:"true"&description:"object&id"`
&&&&Score&&&&&&int64&&&&&&&&`required:"true"&description:"players's&scores"`
&&&&PlayerName&string&&&`required:"true"&description:"plaers&name,&used&in&system"`
而且如果你的对象tag里面如果存在json或者thrift描述,那么就会使用改描述作为字段名,即如下的代码:
type&Object&struct&{
&&&&ObjectId&&&string&&&`json:"object_id"`
&&&&Score&&&&&&int64&&&&&&&&`json:"player_score"`
&&&&PlayerName&string&&&`json:"player_name"`
就会输出如下的文档信息:
object_id&(string,&optional):&,
player_score&(string,&optional):&,
player_name&(int64,&optional):
常见错误及问题
Q:bee没有上面执行的命令?A:请更新bee到最新版本,目前bee的版本是1.1.2,beego的版本是1.3.1
Q:bee更新的时候出错了?A:第一可能是GFW的问题,第二可能是你修改过了源码,删除重新下载,第三可能你升级了Go版本,你需要删除GOPATH/pkg下的所有文件
Q:下载swagger很慢?A:想办法让他变快,因为我现在放在了github上面
Q:文档生成了,但是我没办法测试请求?A:你看看你访问的地址是不是和请求的URL是同一个地址,因为swagger是使用Ajax请求数据的,所以跨域的问题,解决CORS的办法就是保持域一致,包括URL和端口。
Q:运行的时候发生了未知的错误?A:那就来提issue或者给我留言吧,我会尽力帮助你解决你遇到的问题
人打赏支持
领取时间:
是开源中国针对行业特定技术问题发起的专家问答。
领取条件:受邀参与高手问答的技术专家可以领取
开源项目作者
领取时间:
作为一个开源项目作者,是时候站出来拯救世界了!
领取条件:开源项目被开源中国收录的开发者可领取
码字总数 16244
支付宝支付
微信扫码支付
打赏金额: ¥
已支付成功
打赏金额: ¥(beego)搭建GO语言 WEB框架 BEEGO 的WINDOWS环境过程
(beego)搭建GO语言 WEB框架 BEEGO 的WINDOWS环境过程
编辑:www.fx114.net
本篇文章主要介绍了"(beego)搭建GO语言 WEB框架 BEEGO 的WINDOWS环境过程",主要涉及到(beego)搭建GO语言 WEB框架 BEEGO 的WINDOWS环境过程方面的内容,对于(beego)搭建GO语言 WEB框架 BEEGO 的WINDOWS环境过程感兴趣的同学可以参考一下。
Introduction(简介)
We're pleased that you want to invest your talents and time to develop applications for iOS. It has been a rewarding experience - both professionally and financially - for hundreds of thousands of developers and we want to help you join this successful group.
We have published our App Store Review Guidelines in the hope that they will help you steer clear of issues as you develop your App and speed you through the approval process when you submit it.(非常高兴您能付出宝贵的时间和精力来开发iOS应用。成千上万的开发者的经历表明,无论从专业技术还是经济收入上,开发iOS应用都是个有意义的事情,我们将帮助你更快成功,成为其中的一员。这篇App
Store Review Guidlines主要是为了协助你弄清楚开发过程中会遇到的一些疑惑,加快你提交应用后的审核过程。)
We view Apps different than books or songs, which we do not curate. If you want to criticize a religion, write a book. If you want to describe sex, write a book or a song, or create a medical App. It can get complicated, but we have decided to not allow certain
kinds of content in the App Store. It may help to keep some of our broader themes in mind:(我们认为应用不同于书籍和歌曲,我们不支持这些。如果你要讨论宗教信仰,那么应该去写书。如果你要谈论性,那么写书,或者去写歌,或者去做一个生理卫生的应用。看起来可能有点麻烦,但我们仍然决定App Store不接受上述内容。记住下边这些大致的原则,会对你有所帮助:)
We have lots of kids downloading lots of Apps, and parental controls don't work unless the parents set them up (many don't). So know that we're keeping an eye out for the kids.(有很多小孩子会来商店下载应用,而且除非父母们设置了家长管理(事实很多人不设置),否则孩子们是不受任何限制的。所以我们要关注孩子们。)
We have over 700,000 Apps in the App Store. If your App doesn't do something useful, unique or provide some form of lasting entertainment, it may not be accepted.(现在商店里有超过700,000个应用。我们不需要一个款差劲的应用。一款不能提供一些有用的功能,或者只是哗众取宠的恶作剧的应用,肯定通不过审核。)
If your App looks like it was cobbled together in a few days, or you're trying to get your first practice App into the store to impress your friends, please brace yourself for rejection. We have lots of serious developers who don't want their quality Apps to
be surrounded by amateur hour.(如果你的应用一看就是一个三两天拼凑出来的东西,或者你只是想把一个练手应用上传到商店里,跟朋友秀一把,那在被拒以后一定要hold住。我们有大批严肃的开发者,不希望他们高质量的应用被这些业余作品包围。)
We will reject Apps for any content or behavior that we believe is over the line. What line, you ask? Well, as a Supreme Court Justice once said, &I'll know it when I see it&. And we think that you will also know it when you cross it.(我们会拒掉那些,有越线内容或行为的应用。那么红线是什么呢?恩,有个高级法院的法官曾经说过:“等真见到的时候,我才知道”。还有,我们相信你越线的时候,你也会知道的。)
If your App is rejected, we have a Review Board that you can appeal to. If you run to the press and trash us, it never helps.(我们有一个审核委员会,如果你的应用被拒了,你可以在那上诉。不过你威胁我们,或者乱喷,肯定是于事无补的。)
If you attempt to cheat the system (for example, by trying to trick the review process, steal data from users, copy another developer's work, or manipulate the ratings) your Apps will be removed from the store and you will be expelled from the developer program.(如果你试图蒙骗系统(比如:在审核过程中做手脚,盗取用户数据,剽窃其他开发者作品,或者刷评级),你的应用会被下线,你的开发者许可也会被取消。)
This is a living document, and new Apps presenting new questions may result in new rules at any time. Perhaps your App will trigger this.(这是一篇动态文档,新应用随时都会带来新的问题,我们也将制定新的规则。你的应用可能就带来下一条规则。)
Lastly, we love this stuff too, and honor what you do. We're really trying our best to create the best platform in the world for you to express your talents and make a living too. If it sounds like we're control freaks, well, maybe it's because we're so committed
to our users and making sure they have a quality experience with our products. Just like almost all of you are too.(最重要的是,我们非常珍视这个平台,并且尊重您的作品。我们真心要尽我们最大努力创造一个全球最好的平台,在这里你们可以大展才华,并且可以赚钱养家。看起来我们限制了太多的东西,恩,其实是因为,我们对于我们的用户有郑重承诺,保证他们在apple的设备上享有最佳体验。就像你们也希望的那样。)
Table of Contents(目录)
Terms and conditions(条款与条件)Functionality(功能)Metadata, ratings and rankings(描述数据,评级与排名)Location(位置)Push notifications(提醒推送)Game Center(游戏中心)Advertising(广告)Trademarks and trade dress(商标权与商品外观)Media content(媒体内容)User interface(用户接口)Purchasing and currencies(购买与货币)Scraping and aggregation(废弃与聚合)Damage to device(损坏设备)Personal attacks(个人攻击)Violence(暴力)Objectionable content(负面内容)Privacy(隐私)Pornography(色情)Religion, culture, and ethnicity(宗教,文化和种族)Contests, sweepstakes, lotteries, and raffles(竞猜,赌博,彩券和抽奖)Charities and contributions(慈善与捐助)Legal requirements(法律条件)
1. Terms and conditions(法律与条款)
1.1?&As a developer of applications for the App Store you are bound by the terms of the Program License Agreement (PLA), Human Interface Guidelines (HIG), and any other licenses or contracts between you and Apple. The following rules and examples
are intended to assist you in gaining acceptance for your App in the App Store, not to amend or remove provisions from any other agreement.(作为App Store的应用开发者,你必须接受如下条款:Program License Agreement (PLA),Human Interface Guidelines (HIG),以及任何你与apple签订的许可和合同。以下规则和示例是为了协助你的应用更快通过审核上架,而不是修正或取代之前的条款。)
2. Functionality(功能)
2.1?&Apps that crash will be rejected(存在Crash(崩溃,死机)的应用会被拒。)
2.2?&Apps that exhibit bugs will be rejected(存在明显bug的应用会被拒。)
2.3?&Apps that do not perform as advertised by the developer will be rejected(不符合开发者描述的应用会被拒。)
2.4?&Apps that include undocumented or hidden features inconsistent with the description of the App will be rejected(有未说明或隐藏特性或有悖描述的应用会被拒。)
2.5?&Apps that use non-public APIs will be rejected(使用非公开API的应用会被拒。)
2.6?&Apps that read or write data outside its designated container area will be rejected(试图读写非允许范围内的数据的应用会被拒。)
2.7?&Apps that download code in any way or form will be rejected(试图以任何方式方法下载代码的应用会被拒。)
2.8?&Apps that install or launch other executable code will be rejected(安装或运行其他可执行代码的应用会被拒。)
2.9?&Apps that are &beta&, &demo&, &trial&, or &test& versions will be rejected(任何“beta”,“演示(demo)”,“试用(trial)”或“测试(test)”版本的应用会被拒。)
2.10?&iPhone Apps must also run on iPad without modification, at iPhone resolution, and at 2X iPhone 3GS resolution(iPhone应用必须可以无条件运行在iPad上,支持普通iPhone分辨率和2倍iPhone 3GS分辨率。)
2.11?&Apps that duplicate Apps already in the App Store may be rejected, particularly if there are many of them, such as fart, burp, flashlight, and Kama Sutra Apps.(任何与App Store中上架应用重复的应用会被拒,尤其是已经有了很多的:如放屁,打嗝,手电照明和爱经。)
2.12?&Apps that are not very useful, unique, are simply web sites bundled as Apps, or do not provide any lasting entertainment value may be rejected(没有用处的应用,web页面简单组合的应用,或任何哗众取宠,不能提供娱乐价值的应用会被拒。)
2.13?&Apps that are primarily marketing materials or advertisements will be rejected(纯粹用于市场推广或广告的应用会被拒。)
2.14?&Apps that are intended to provide trick or fake functionality that are not clearly marked as such will be rejected(有意提供隐蔽或虚假功能,却又不能明显标示的应用会被拒。)
2.15?&Apps larger than 50MB in size will not download over cellular networks (this is automatically prohibited by the App Store)(大于20MB的应用无法通过蜂窝网络下载安装(App Store自动处理)。)
2.16?&Multitasking Apps may only use background services for their intended purposes: VoIP, audio playback, location, task completion, local notifications, etc.(多任务应用只允许在后台运行如下相应的服务:VoIP,音频播放,地理位置,任务记录,本地提醒等。)
2.17?&Apps that browse the web must use the iOS WebKit framework and WebKit Javascript(应用只允许通过iOS WebKit框架和WebKit Javascript访问web页面。)
2.18?&Apps that encourage excessive consumption of alcohol or illegal substances, or encourage minors to consume alcohol or smoke cigarettes, will be rejected(鼓励酗酒,使用违法药物,或诱导未成年人饮酒,吸烟的应用会被拒。)
2.19?&Apps that provide incorrect diagnostic or other inaccurate device data will be rejected(提供错误的系统信息或设备数据的应用会被拒。)
2.20?&Developers &spamming& the App Store with many versions of similar Apps will be removed from the iOS Developer Program(通过许多版本的类似应用对App Store造成干扰的开发者会被取消IDP身份。)
2.21?&Apps that are simply a song or movie should be submitted to the iTunes store. Apps that are simply a book should be submitted to the iBookstore.(歌曲和电影应该提交到iTunes store。书籍应该提交到iBookstore。)
2.22?&Apps that arbitrarily restrict which users may use the App, such as by location or carrier, may be rejected(随意通过位置或运营商来限制用户使用的应用会被拒。)
2.23?&Apps must follow the iOS Data Storage Guidelines or they will be rejected(加入iCloud支持后,应用必须遵守iOS数据存储指南(&iOS Data Storage Guidelines)否则将被拒。)
2.24?&Apps that are offered in Newsstand must comply with schedules 1, 2 and 3 of the Developer Program License Agreement or they will be rejected(在Newsstand里提交的应用必须遵守Developer Program License Agreement的第1,2和3条,否则将被拒。)
2.25?&Apps that display Apps other than your own for purchase or promotion in a manner similar to or confusing with the App Store will be rejected(与App&Store类似的推荐或为其他应用做广告的应用将无法通过App&Store审核。)
3. Metadata (name, descriptions, ratings, rankings, etc)(描述数据(名称,描述,评级,分类等))
3.1?&Apps or metadata that mentions the name of any other mobile platform will be rejected(应用或者元数据中提到其他任意移动平台会被拒。)
3.2?&Apps with placeholder text will be rejected(描述数据有未填写项,存留占位符文本会被拒。)
3.3?&Apps with descriptions not relevant to the application content and functionality will be rejected(描述中提到与应用内容和功能无关信息会被拒。)
3.4?&App names in iTunes Connect and as displayed on a device should be similar, so as not to cause confusion(应用在iTunes Connect与设备上显示的名称应该类似,否则会造成混淆。)
3.5?&Small and large App icons should be similar, so as to not to cause confusion(不同尺寸的icon要一致,否则会造成混淆。)
3.6?&Apps with App icons and screenshots that do not adhere to the 4+ age rating will be rejected(图标与截屏不符合4+年龄评级的应用会被拒。)
3.7?&Apps with Category and Genre selections that are not appropriate for the App content will be rejected(应用的内容与所选分类和风格不符会被拒。)
3.8?&Developers are responsible for assigning appropriate ratings to their Apps. Inappropriate ratings may be changed/deleted by Apple(开发者有责任把应用放到恰当的分级(Rating)。不恰当的评级可能会被Apple修改,甚至删除。)
3.9?&Developers are responsible for assigning appropriate keywords for their Apps. Inappropriate keywords may be changed/deleted by Apple(开发者有责任给应用撰写恰当的关键词。不恰当的关键词可能会被Apple修改,甚至删除。)
3.10?&Developers who attempt to manipulate or cheat the user reviews or chart ranking in the App Store with fake or paid reviews, or any other inappropriate methods will be removed from the iOS Developer Program(通过伪造,付费评价或其他非正规手段,获取App Store中较好的评价与星级的开发者会被取消IDP身份。)
3.11?&Apps which recommend that users restart their iOS device prior to installation or launch may be rejected(任何提示需要用户重启iOS设备来安装或运行的应用会被拒。)
3.12?&Apps should have all included URLs fully functional when you submit it for review, such as support and privacy policy URLs(应用在提交审核过程中,所有涉及到的URL都要处于正常运行状态,例如保密协议,相关支持页面等。)
4. Location(位置)
4.1?&Apps that do not notify and obtain user consent before collecting, transmitting, or using location data will be rejected(未提示用户且获得用户允许之前收集,传输或使用位置数据的应用会被拒。)
4.2?&Apps that use location-based APIs for automatic or autonomous control of vehicles, aircraft, or other devices will be rejected(使用location-based API来自动控制车辆,飞行器或其他设备的应用会被拒。)
4.3?&Apps that use location-based APIs for dispatch, fleet management, or emergency services will be rejected(使用location-based API进行调度,队伍管理或应急服务的而应用会被拒。)
4.4?&Location data can only be used when directly relevant to the features and services provided by the App to the user or to support approved advertising uses(位置数据只能用于应用提供的直接相关功能或服务,或者有授权的广告。)
5. Push notifications(提醒推送)
&&&&&&&5.1?&Apps that provide Push Notifications without using the Apple Push Notification (APN) API will be rejected(不使用Apple Push Notification(APN) API提供消息推送的应用会被拒。)
5.2?&Apps that use the APN service without obtaining a Push Application ID from Apple will be rejected(使用APN服务却没从Apple获取一个Push Application ID的应用会被拒。)
5.3?&Apps that send Push Notifications without first obtaining user consent will be rejected(在首次推送消息之前未取得的用户允许的应用会被拒。)
5.4?&Apps that send sensitive personal or confidential information using Push Notifications will be rejected(使用提醒推送服务推送敏感的个人或机密信息的应用会被拒。)
5.5?&Apps that use Push Notifications to send unsolicited messages, or for the purpose of phishing or spamming will be rejected(使用提醒推送发送主动消息,欺骗或干扰信息的应用会被拒。)
5.6?&Apps cannot use Push Notifications to send advertising, promotions, or direct marketing of any kind(应用不可以使用提醒推送发送广告,活动或任何形式的直接推广信息。)
5.7?&Apps cannot charge users for use of Push Notifications(应用不可以提供收费的提醒推送服务。)
5.8?&Apps that excessively use the network capacity or bandwidth of the APN service or unduly burden a device with Push Notifications will be rejected(使用APN服务过度占用网络带宽或容量或通过提醒推送大量占用系统资源的应用会被拒。)
5.9?&Apps that transmit viruses, files, computer code, or programs that may harm or disrupt the normal operation of the APN service will be rejected(传输病毒,文件,代码或程序,导致破坏或扰乱正常的APN服务操作的应用会被拒。)
6. Game Center(游戏中心)
6.1?&Apps that display any Player ID to end users or any third party will be rejected(向终端用户或第三方展示Player ID的应用会被拒。)
6.2?&Apps that use Player IDs for any use other than as approved by the Game Center terms will be rejected(Player ID被用于Game Center条款款意外的用途的应用会被拒。)
6.3?&Developers that attempt to reverse lookup, trace, relate, associate, mine, harvest, or otherwise exploit Player IDs, alias, or other information obtained through the Game Center will be removed from the iOS Developer Program(试图通过Game Center反查,跟踪,描述,关联,发掘,收割,或利用Player
ID,别名或其他信息的开发者会被取消IDP身份。)
6.4?&Game Center information, such as Leaderboard scores, may only be used in Apps approved for use with the Game Center(Game Center信息,例如Leaderboard得分,只能通过Game Center用于应用中。)
6.5?&Apps that use Game Center service to send unsolicited messages, or for the purpose of phishing or spamming will be rejected(使用Game Center发送主动消息,欺骗或干扰信息的应用会被拒。)
6.6?&Apps that excessively use the network capacity or bandwidth of the Game Center will be rejected(使用Game Center过度占用网络带宽或容量的应用会被拒。)
6.7?&Apps that transmit viruses, files, computer code, or programs that may harm or disrupt the normal operation of the Game Center service will be rejected(传输病毒,文件,代码或程序,导致破坏或扰乱正常的Game Center操作的应用会被拒。)
7. Advertising(广告)
7.1?&Apps that artificially increase the number of impressions or click-throughs of ads will be rejected(人工刷广告浏览或点击率的应用会被拒。)
7.2?&Apps that contain empty iAd banners will be rejected(带有空iAd banner广告的应用会被拒。)
7.3?&Apps that are designed predominantly for the display of ads will be rejected(设计主要用来展示广告的应用会被拒。)
8. Trademarks and trade dress(商标权与商标外观)
8.1?&Apps must comply with all terms and conditions explained in the Guidelines for Using Apple Trademarks and Copyrights and the Apple Trademark List(应用必须遵守Guidelines for Using Apple Trademarks and Copyrights 和Apple Trademark List中描述的所有条款和条件。)
8.2?&Apps that suggest or infer that Apple is a source or supplier of the App, or that Apple endorses any particular representation regarding quality or functionality will be rejected(任何误导或暗示Apple为该应用来源或提供商,或Apple以任何形式认可其质量或功能的应用会被拒。)
8.3?&Apps which appear confusingly similar to an existing Apple product or advertising theme will be rejected(外观与现有Apple产品或广告主题类似或混淆的应用会被拒)
8.4?&Apps that misspell Apple product names in their App name (i.e., GPS for Iphone, iTunz) will be rejected(应用名称中出现错误的Apple产品拼写(如,GPS for IPhone, iTunz)的应用会被拒。)
8.5?&Apps may not use protected third party material such as trademarks, copyrights, patents or violate 3rd party terms of use. Authorization to use such material must be provided upon request.(使用受保护的第三方资源(商标,版权,商业机密,以及其他私有内容),如果要求请提供一份文本形式的使用授权。)
9. Media content(媒体内容)
9.1?&Apps that do not use the MediaPlayer framework to access media in the Music Library will be rejected(使用MediaPlayer框架以外的方法访问Music Library中媒体数据的应用会被拒。)
9.2?&App user interfaces that mimic any iPod interface will be rejected(用户界面模仿任何iPod界面的应用会被拒。)
9.3?&Audio streaming content over a cellular network may not use more than 5MB over 5 minutes(通过蜂窝网络传输的流媒体音频内容不得超过5MB或多余5分钟。)
9.4?&Video streaming content over a cellular network longer than 10 minutes must use HTTP Live Streaming and include a baseline 64 kbps audio-only HTTP Live stream(通过蜂窝网络传输超过10分钟流媒体视频内容,必须使用HTTP Live Streaming,并包含一条基线64kbps的音频HTTP Live流。)
10. User interface(用户界面)
10.1?&Apps must comply with all terms and conditions explained in the Apple iOS Human Interface Guidelines(应用必须遵守Apple iOS Human Interface Guidelines中的所有条款和条件。)
10.2?&Apps that look similar to Apps bundled on the iPhone, including the App Store, iTunes Store, and iBookstore, will be rejected(&外观与iPhone自带应用(如:App Store,iTunes Store和iBookstore)相似的应用会被拒。)
10.3?&Apps that do not use system provided items, such as buttons and icons, correctly and as described in the Apple iOS Human Interface Guidelines may be rejected(不按照Apple iOS Human Interface Guidelines中的描述正确使用系统控件比如按钮,图标等的应用会被拒。)
10.4?&Apps that create alternate desktop/home screen environments or simulate multi-App widget experiences will be rejected(试图创建多桌面/主屏环境或模拟多Widget应用工具的应用会被拒。)
10.5?&Apps that alter the functions of standard switches, such as the Volume Up/Down and Ring/Silent switches, will be rejected(&修改标准开关标准功能例如:音量增加/减少,响铃/震动的应用会被拒。)
10.6?&Apple and our customers place a high value on simple, refined, creative, well thought through interfaces. They take more work but are worth it. Apple sets a high bar. If your user interface is complex or less than very good, it may be
rejected(Apple和我们的用户都界面报以很高期望,希望他设计的超级简洁,精致,充满创造力,深思熟虑。做到这些确实会消耗很多精力,但是值得。Apple在这方面要求非常高。如果你的用户界面过于复杂,甚至仅仅是不够好,都可能被拒。)
11. Purchasing and currencies(购买与流通货币)
11.1?&Apps that unlock or enable additional features or functionality with mechanisms other than the App Store will be rejected(通过App Store以外的渠道解锁或开启附加属性或功能的应用会被拒。)
11.2?&Apps utilizing a system other than the In-App Purchase API (IAP) to purchase content, functionality, or services in an App will be rejected(&使用In App Purchase API (IAP)以外的系统提供购买内容,功能或服务的应用会被拒。)
11.3?&Apps using IAP to purchase physical goods or goods and services used outside of the application will be rejected(使用IAP为与应用无关的实体商品或商品服务收费的应用会被拒。)
11.4?&Apps that use IAP to purchase credits or other currencies must consume those credits within the application(应用使用IAP购买积分(Credit)或其他货币,必须在应用中消费。)
11.5?&Apps that use IAP to purchase credits or other currencies that expire will be rejected(使用IAP购买的积分(Credit)或货币会过期的应用会被拒)
11.6?&Content subscriptions using IAP must last a minimum of 7 days and be available to the user from all of their iOS devices(&使用IAP收费订阅的内容至少要在7天内有效,而且允许在所有iOS设备间共享。)
11.7?&Apps that use IAP to purchase items must assign the correct Purchasability type(用到IAP收费项目的应用必须分派到正确的收费类目中。)
11.8?&Apps that use IAP to purchase access to built-in capabilities provided by iOS, such as the camera or the gyroscope, will be rejected(&使用IAP向用户收费以获取iOS内建功能(如摄像头,陀螺仪)的应用会被拒。)
11.9?&Apps containing &rental& content or services that expire after a limited time will be rejected(&包含“出租”内容或服务的应用,在一段时间实效的会被拒。)
11.10?&Insurance applications must be free, in legal-compliance in the regions distributed, and cannot use IAP(保险类应用必须免费,遵守发布地区的法律,并且不允许使用IAP。)
11.11?&In general, the more expensive your App, the more thoroughly we will review it(一般来说,越贵的应用审核就越仔细彻底。)
11.12?&Apps offering subscriptions must do so using IAP, Apple will share the same 70/30 revenue split with developers for these purchases, as set forth in the Developer Program License Agreement.(提供收费订阅的应用必须使用IAP,Apple将会按照Developer Program
License Agreement中约定的70/30的比例与开发者分账。)
11.13?&Apps that link to external mechanisms for purchases or subscriptions to be used in the App, such as a “buy” button that goes to a web site to purchase a digital book, will be rejected(应用中如果提供了IAP以外的收费或订阅机制,如:“buy”按钮,跳转到一个购买电子书的web页面,会被拒。)
11.14?&Apps can read or play approved content (specifically magazines, newspapers, books, audio, music, and video) that is subscribed to or purchased outside of the App, as long as there is no button or external link in the App to purchase
the approved content. Apple will not receive any portion of the revenues for approved content that is subscribed to or purchased outside of the App(&应用可以阅读或播放任何在应用以外取得授权的内容(包括指定的杂志,报纸,书籍,音频,音乐和视频),只要在应用中不允许出现获取授权的收费链接或按钮。Apple不会对在应用外订阅或购买授权项目收取任何费用。)
11.15?&Apps may only use auto renewing subscriptions for periodicals (newspapers, magazines), business Apps (enterprise, productivity, professional creative, cloud storage) and media Apps (video, audio, voice), or the App will be rejected.(应用只能自动更新订阅的期刊(报纸、杂志),自动更新商业应用(企业、生产力、专业创意、云存储)和媒体应用(视频、音频,声音)将被拒绝。)
12. Scraping and aggregation(抓去与整合)
12.1?&Applications that scrape any information from Apple sites (for example , iTunes Store, App Store, iTunes Connect, Apple Developer Programs, etc) or create rankings using content from Apple sites and services will be rejected(从Apple的页面(如:,
iTunes Store, App Store, iTunes Connect, Apple Developer Programs, 等)抓取内容,或利用Apple页面和服务中的内容进行排名的应用会被拒。)
12.2?&Applications may use approved Apple RSS feeds such as the iTunes Store RSS feed(&应用可以使用授权的Apple RSS,例如iTunes Store RSS。)
12.3?&Apps that are simply web clippings, content aggregators, or a collection of links, may be rejected(简单的web页面裁剪,内容整合或链接收集应用会被拒。)
13. Damage to device(损害设备)
13.1?&Apps that encourage users to use an Apple Device in a way that may cause damage to the device will be rejected(任何怂恿用户做出可能损坏Apple设备的行为的应用会被拒。)
13.2?&Apps that rapidly drain the device's battery or generate excessive heat will be rejected(快速耗光设备电量或产生大量热量的应用会被拒。)
14. Personal attacks(人身攻击)
14.1?&Any App that is defamatory, offensive, mean-spirited, or likely to place the targeted individual or group in harms way will be rejected(&任何涉嫌诽谤,侮辱,狭隘内容或打击个人或团体的应用会被拒。)
14.2?&Professional political satirists and humorists are exempt from the ban on offensive or mean-spirited commentary(职业政治讽刺家和幽默作家不受该诽谤和狭隘条款约束。)
15. Violence(暴力)
&&&&&& 15.1?&Apps portraying realistic images of people or animals being killed or maimed, shot, stabbed, tortured or injured will be rejected(展示人或动物被杀戮,致残,枪击,针刺或其他伤害的真实图片的应用会被拒)
&&&&&& 15.2?&Apps that depict violence or abuse of children will be rejected(描述暴力或虐待儿童的应用会被拒。)
&&&&&& 15.3?&&Enemies& within the context of a game cannot solely target a specific race, culture, a real government or corporation, or any other real entity(游戏中的“敌人”不能单独的设定为某特定比赛,文化,真实的政府或组织,或者任何现实事物。)
&&&&&& 15.4?&Apps involving realistic depictions of weapons in such a way as to encourage illegal or reckless use of such weapons will be rejected(含有以鼓励非法或鲁莽使用的方式描述真实武器的应用会被拒。)
&&&&&& 15.5?&Apps that include games of Russian roulette will be rejected(&带有俄罗斯轮盘游戏的应用会被拒。)
16. Objectionable content(负面内容)
16.1?&Apps that present excessively objectionable or crude content will be rejected(介绍过度三俗和粗鲁内容的应用会被拒。)
16.2?&Apps that are primarily designed to upset or disgust users will be rejected(设计来惹怒或恶心用户的应用会被拒。)
17. Privacy(隐私)
17.1?&Apps cannot transmit data about a user without obtaining the user's prior permission and providing the user with access to information about how and where the data will be used(在未获得用户事先允许,或未告知用户信息将被如何,在哪里使用的情况下,应用不可以传输用户数据。)
17.2?&Apps that require users to share personal information, such as email address and date of birth, in order to function will be rejected(要求用户提供个人信息,如邮箱地址,生日等,才能使用其功能的应用会被拒。)
17.3?&Apps that target minors for data collection will be rejected(专门收集未成年人数据的应用会被拒。)
18. Pornography(色情)
18.1?&Apps containing pornographic material, defined by Webster's Dictionary as &explicit descriptions or displays of sexual organs or activities intended to stimulate erotic rather than aesthetic or emotional feelings&, will be rejected(含有韦氏词典中定义的色情素材(explicit
descriptions or displays of sexual organs or activities intended to stimulate erotic rather than aesthetic or emotional feelings)的应用会被拒。)
18.2?&Apps that contain user generated content that is frequently pornographic (ex &Chat Roulette& Apps) will be rejected(经常有用户提供色情内容(例如:Chat Roulette http://en.wikipedia.org/wiki/Chatroulette )的应用会被拒。)
19. Religion, culture, and ethnicity(信仰,文化和种族)
19.1?&Apps containing references or commentary about a religious, cultural or ethnic group that are defamatory, offensive, mean-spirited or likely to expose the targeted group to harm or violence will be rejected(带有对一种信仰,文化或种族进行诽谤,侮辱,狭隘,或以他们为目标的暴力或伤害内容的应用会被拒。)
19.2?&Apps may contain or quote religious text provided the quotes or translations are accurate and not misleading. Commentary should be educational or informative rather than inflammatory(&应用若带有或应用对一种信仰的文字描述,那么这个引用或翻译必须是精确,无歧义的。注释内容可以具有教育性,信息性,但不可以为煽动性。)
20. Contests, sweepstakes, lotteries, and raffles(竞赛,赌博,彩票和抽奖)
20.1?&Sweepstakes and contests must be sponsored by the developer/company of the App(赌博和竞赛必须是由应用开发者或所有公司发起资助的。)
20.2?&Official rules for sweepstakes and contests, must be presented in the App and make it clear that Apple is not a sponsor or involved in the activity in any manner(&应用中必须展示赌博和竞赛的官方条款,并声明Apple不是资助者,并且在任何情况下与此事无关。)
20.3?&It must be permissible by law for the developer to run a lottery App, and a lottery App must have all of the following characteristics: consideration, chance, and a prize(开发者必须经过法律允许才能上线一款抽奖应用,而且抽奖应用必须具备以下要素:报酬,机会,和奖金。)
20.4?&Apps that allow a user to directly purchase a lottery or raffle ticket in the App will be rejected(直接允许用户在应用中购买彩票或抽奖的应用会被拒。)
21. Charities and contributions(慈善与捐助)
21.1?&Apps that include the ability to make donations to recognized charitable organizations must be free(含有向已认证的慈善机构捐助功能的应用必须是免费的。)
21.2?&The collection of donations must be done via a web site in Safari or an SMS(慈善募捐必须通过短信息或通过Safari访问web页面完成。)
22. Legal requirements(法律要求)
22.1?&Apps must comply with all legal requirements in any location where they are made available to users. It is the developer's obligation to understand and conform to all local laws(应用必须遵守所有发布地区当地法律。开发者有义务了解和遵守各地的法律。)
22.2?&Apps that contain false, fraudulent or misleading representations or use names or icons similar to other Apps will be rejected(&任何带有虚假,欺诈和带有歧义的内容的应用会被拒。)
22.3?&Apps that solicit, promote, or encourage criminal or clearly reckless behavior will be rejected(&任何召集,推销和股东犯罪和鲁莽行为的应用会被拒。)
22.4?&Apps that enable illegal file sharing will be rejected(非法文件共享应用会被拒。)
22.5?&Apps that are designed for use as illegal gambling aids, including card counters, will be rejected(任何设计用来非法赌博工具,包括算牌的应用会被拒。)
22.6?&Apps that enable anonymous or prank phone calls or SMS/MMS messaging will be rejected(&提供匿名拨打电话或匿名发送短消息/彩信功能的应用会被拒。)
22.7?&Developers who create Apps that surreptitiously attempt to discover user passwords or other private user data will be removed from the iOS Developer Program(任何开发暗中获取用户密码和私有数据的开发者会被取消IDP身份。)
22.8?&Apps which contain DUI checkpoints that are not published by law enforcement agencies, or encourage and enable drunk driving, will be rejected(任何非法律执行部门发布的带有DUI检查点信息,或鼓励且协助酒后驾车的应用会被拒。)
Living document(动态文件)
This document represents our best efforts to share how we review Apps submitted to the App Store, and we hope it is a helpful guide as you develop and submit your Apps. It is a living document that will evolve as we are presented with new Apps and situations,
and we'll update it periodically to reflect these changes.(撰写这篇文档,表示我们尽全力与您分享我们是如何审核提交到App Store的应用的,而且我们希望这个指南能够对您开发和提交应用有所帮助。这是一份动态文档,我们将根据新近应用和情况定期更新这篇文档。)
Thank you for developing for iOS. Even though this document is a formidable list of what not to do, please also keep in mind the much shorter list of what you must do. Above all else, join us in trying to surprise and delight users. Show them their world in
innovative ways, and let them interact with it like never before. In our experience, users really respond to polish, both in functionality and user interface. Go the extra mile. Give them more than they expect. And take them places where they have never been
before. We are ready to help.(感谢您为iOS开发应用。尽管这是一份“禁止”列表,但请谨记那份更短的“必做”列表。最重要的是,加入我们就是要给用户带来惊喜和愉悦。把世界用最具创意的方式展示给他们,让他们以前所未有的方式交互。根据我们的经验,用户真的会对功能和界面上的改进有所反应。进一步改进你的作品。带给用户超出期望的体验。带给用户前所未有的体验。我们将协助您完成这一切。
一、不得利用本站危害国家安全、泄露国家秘密,不得侵犯国家社会集体的和公民的合法权益,不得利用本站制作、复制和传播不法有害信息!
二、互相尊重,对自己的言论和行为负责。
本文标题:
本页链接:

我要回帖

更多关于 魔人euphoria字幕全集 的文章

 

随机推荐