无法更改 Xcode 4.5 中的目标成员身份可见性

Can#39;t change target membership visibility in Xcode 4.5(无法更改 Xcode 4.5 中的目标成员身份可见性)
本文介绍了无法更改 Xcode 4.5 中的目标成员身份可见性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前尝试在我的应用程序中排除我的应用程序内购买逻辑,以使其可在我的其他应用程序中重复使用,甚至将其放在公共 git 存储库中供其他人使用.为此,我遵循了在 XCode 中创建框架的本指南.

I currently try to exclude my In-App Purchase logic in an App of mine to make it reusable in other Apps of mine or even put it on a public git repository for others to use. For this purpose I follow this guide of creating a framework in XCode.

但在 第 2 步我必须将我的 .h 文件的 Target Membership 设置为 public.问题是,在我的 Xcode (v 4.5) 中,单击 .h 文件时看不到任何可见性(当我单击 .m 等其他文件时也看不到任何可见性).看起来是这样的:

But in step 2 I have to set the Target Membership of my .h file to public. The problem is, that in my Xcode (v 4.5) I can't see any visibility when the .h file is clicked (and also not when I click other files like .m ones). It looks like that:

我做错了什么?

推荐答案

我遇到了同样的问题,并在发布一个小时后发现了您的问题,但这是我发现的.在 Xcode 4.4 中,更改头文件的目标成员资格和可见性的功能已被删除,因此本教程将无法按所写的那样工作.

I came across this same problem and found your question an hour after it was posted but here is what I have found. In Xcode 4.4 the ability to change the target membership, and visibility, for header files was removed so this tutorial will not work as written.

您可以将复制标题"构建阶段添加到您在第 1 步中创建的目标(示例中为 Serenity),而不是更改目标成员的可见性.这将有公共、私有和项目标题的 3 个部分.只需单击底部的加号和要在此步骤中公开的标题.默认情况下,它们被放置在 Project 部分,但您可以单击并将它们拖动到 Public 部分.

Instead of changing the target membership visibility you can add a "Copy Headers" build phase to the target you made in step 1 (Serenity in the example). This will have 3 sections for Public, Private, and Project headers. Just click the plus at the bottom and the headers you want to be public to this step. By default they are put in the Project section but you can click and drag them to the Public section.

本教程的其余部分应该可以正常工作.

The rest of the tutorial should work fine from there.

刚刚注意到在我自己的项目中,在添加复制头文件构建步骤之后,可以为头文件选择目标成员身份,因此教程按编写的方式工作.虽然我的框架标题似乎有点奇怪.在任何情况下,在构建阶段更改可见性都会反映在目标成员资格下,反之亦然

Just noticed that in my own project, after adding the copy headers build step, that the target membership can be selected for header files so the tutorial works as written. Though it seems to act a little strange with my framework header. In any case, changing the visibility in the build phase is reflected under target membership and vice versa

这篇关于无法更改 Xcode 4.5 中的目标成员身份可见性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!

本站部分内容来源互联网,如果有图片或者内容侵犯您的权益请联系我们删除!

相关文档推荐

How to target newer versions in .gitlab-ci.yml using auto devops (java 11 instead of 8 and Android 31 instead of 29)(如何在.gitlab-ci.yml中使用自动开发工具(Java 11而不是8,Android 31而不是29)瞄准较新的版本)
java.lang.IllegalStateException: SimpleTypeImpl should not be created for error type(异常:不应为错误类型创建SimpleTypeImpl)
Android IllegalArgumentException: The tag for fragment_XXX is invalid. Received: layout-sw600dp/fragment_XXX_0(Android IlLegalArgumentException:Fragment_XXX的标签无效。收到:Layout-sw600dp/Fragment_XXX_0)
HTTPS request using volley(使用 volley 的 HTTPS 请求)
Error: Name not maching for self signed SSL certificates on Android(错误:Android 上自签名 SSL 证书的名称不匹配)
Android 7.0 : #39;javax.net.ssl.SSLHandshakeException: Connection closed by peer(Android 7.0:javax.net.ssl.SSLHandshakeException:连接被对等方关闭)