简体   繁体   English

如何在iOS中将常规应用添加到现有扩展中?

[英]How to add a normal app to an existing extension in iOS?

I created an iMessage app extension with the predefined Xcode template. 我使用预定义的Xcode模板创建了iMessage应用扩展。 I now want to add a 'normal' app to that extension. 我现在想向该扩展程序添加一个“普通”应用程序。 How should I proceed? 我应该如何进行? I just tried to add a storyboard and a new scheme but it fails with following error: 我只是尝试添加一个情节提要和新方案,但失败并出现以下错误:

The request was denied by service delegate (SBMainWorkspace) for reason: NotFound ("Application "mybundleid" is unknown to FrontBoard").

Add a new target of type Single View Application to your project: 将单视图应用程序类型的新目标添加到您的项目中:

在此处输入图片说明

Then select all source files (.swift, .storyboard) you want to use within your new app and tick the new target in "Target Membership": 然后选择要在新应用程序中使用的所有源文件(.swift,.storyboard),并在“目标成员身份”中选中新目标:

在此处输入图片说明


Update: 更新:

After further discussion in the comments, I understand you want to: 经过评论中的进一步讨论后,我了解您希望:

  • The user installs an iMessage extension from the iMessage extention App Store within iMessages 用户从iMessages中的iMessage扩展应用商店安装iMessage扩展
  • A depending app is installed (and shown to the user on home screen) automatically in the same installation process. 在相同的安装过程中,将自动安装依赖的应用程序(并在主屏幕上显示给用户)。

This is not possible. 这是不可能的。 The App shown in the project is actually installed but is hidden/not visible to the user. 项目中显示的App已实际安装,但对用户隐藏/不可见。

The only way to install App and extension at the same time is to install an actual app. 同时安装App和扩展程序的唯一方法是安装实际的App。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM