Apple的iMessage模板或向现有应用程序添加扩展有什么区别? [英] What is the difference between Apple's iMessage template or adding an extension to an existing app?

查看:107
本文介绍了Apple的iMessage模板或向现有应用程序添加扩展有什么区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

关于iOS 10的消息应用程序的创建,我注意到了不同之处.

I have noticed this different regarding the creation of messages apps for iOS 10.

如果使用新项目模板上的iMessage Application选项创建新项目,则Xcode将创建两个目标,一个应用程序和一个扩展.

If you create a new project using iMessage Application choice on the new project's template, Xcode will create two targets, an app and an extension.

但是该项目无法运行.

(从第二张图片中可以看到,目标选择器底部只有一个选择,而目标是扩展名.)

(see by this second picture that there is only one choice on the target selector at the bottom and that target is the extension).

创建普通应用程序(如单视图应用程序),然后添加目标(即iMessage类型的应用程序扩展名)时,您将在其中拥有两个目标,即应用程序和扩展名.

When you create a normal app, like a single view app and then add a target that is an app extension of the type iMessage, you will have two targets there, the app and the extension.

我的问题是:

Xcode iMessage的模板实际上只是在创建扩展,对吗?不是应用程序,没有扩展程序,对吗?

Xcode iMessage's template is in fact creating just an extension, right? Not an app plus an an extension, correct?

如果这是真的,为什么Xcode会创建应用程序目标呢?如果应用程序目标实际上不是应用程序并且永远不会运行,那么其目的是编译并出现在产品部分中并带有扩展名.app的目的是什么?

If this is true, why in heavens name is Xcode creating the app target? What is the purpose of having an app target that compiles and appears on the products section with the extension .app if that is not in fact an app and will never run?

实际上,扩展名是否像运行该应用程序上的代码的远程控制"一样?这很容易混淆,因为我错误地将很多内容拖到了项目中,并标记了两个目标使它们和最终对象的大小都增加了一倍,因为资产被复制到了两个目标.

Or is in fact the extension just like a "remote control" running the code that is on the app? This is confuse, because by mistake I dragged a lot of content to the project and marked both targets to have them and the final thing doubled size, because the assets were copied to both targets.

最后一个问题是:什么将提交给Apple,只是扩展名还是两者?

The final question is: what will be submitted to Apple, just the extension or both?

推荐答案

我的猜测是使整个过程保持一致.我的意思是,当您执行其他扩展程序(键盘,小部件等)时,它必须与应用程序一起提供.这里的情况要复杂一些,我们可以创建一个可以独立运行的iMessage应用程序,也可以作为现有应用程序的扩展...因此,当他们开发SDK时,必须保持双向运行,但这只是一个猜测:) 另外,我非常确定,将iMessage应用提交到商店时,主要目标将随其一起使用,就像所有其他实际扩展一样.

My guess is to make the whole thing consistent. I mean when you do an other extension (keyboard, widget etc) this has to come with an app. Here the situation is a bit more complex, we can do an iMessage app that will run by itself, or as an extension of an existing app... So when they developed the SDK they had to keep both way, but that's just a guess :) Also I'm pretty sure that when submitting the iMessage app to the store, the main target will go with it, as it is the case with all other actual extensions.

这篇关于Apple的iMessage模板或向现有应用程序添加扩展有什么区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆