如何让Xcode将Info.plist视为iPhone / iPad Info.plist?(How do I get Xcode to treat an Info.plist as an iPhone/iPad Info.plist?)
我在一个Xcode项目中有两个可可触摸应用程序。 Xcode为我提供了第一个Info.plist中键的iPhone / iPad相关选项,例如“Launch Image(iPad)”。 但是,Xcode为我提供了第二个键的Mac OS X选项,例如“Java classpaths”和“Quick Look preview height”。
以下是项目的构建方式:
我使用Xcode创建了一个基于通用窗口的应用程序的新项目,它带有一个默认的Info.plist,它将
UIPrerenderedIcon
等原始plist键转换为更多人类可读的值,如“Icon已包含光泽效果”。 都好。在同一个Xcode项目中,我添加了第二个目标,也是一个Cocoa-Touch应用程序,并从头开始构建它,包括Info.plist文件。
我已经打开了两个应用程序的“Active Target”项目设置,并且只有一个“在此级别定义的设置”: 产品名称 。 在较高的“项目设置”级别,未定义任何产品名称 ,并且Info.plist文件定义为
${EXECUTABLE_NAME}/${EXECUTABLE_NAME}-Info.plist
。 (其他设置,如前缀标题 ,类似地使用变量替换定义。)这两个应用程序都适当地构建,运行和使用它们各自的Info.plist文件,但在编辑第二个应用程序的Info.plist时,Xcode仍然试图给我Mac OS X Info.plist值。
如何告诉Xcode plist应该是iPad / iPhone Info.plist,而不是Mac OS X Info.plist?
I have two cocoa-touch apps in one Xcode project. Xcode gives me iPhone/iPad related options for keys in the first's Info.plist, such as "Launch Image (iPad)". But, Xcode gives me Mac OS X options for keys for the second, such as "Java classpaths" and "Quick Look preview height."
Here's how the project was built:
I created the new project as a Universal Window-based Application using Xcode, which came with a default Info.plist that translates raw plist keys like
UIPrerenderedIcon
to more human readable values like "Icon already includes gloss effects." All good.In the same Xcode Project, I added a second target, also a Cocoa-Touch application, and built it from scratch, including the Info.plist file.
I've opened up the "Active Target" project settings for both apps and have exactly one "Setting Defined at This Level": Product Name. At the higher "Project Settings" level, no Product Name is defined and the Info.plist File is defined as
${EXECUTABLE_NAME}/${EXECUTABLE_NAME}-Info.plist
. (Other settings, like Prefix Header, are similarly defined with variable substitution.)Both apps build, run and use their respective Info.plist files appropriately, but Xcode still tries to give me Mac OS X Info.plist values when editing the second app's Info.plist.
How can I tell Xcode that the plist should be an iPad/iPhone Info.plist, not a Mac OS X Info.plist?
原文:https://stackoverflow.com/questions/3737695
最满意答案
我不知道你的代码是如何负责重定向的,但是
/views/main/index*.xhtml
绝对看起来不对。 那边的星号是什么? 相应地修复代码,不再在视图ID中发出此星号。
I solved the problem: It was just a config issue with web.xml.
I declared webapp version as 2.0 in web.xml instead of 3.0 for Tomcat 7.
相关问答
更多-
下列中不属于面向对象的编程语言的是?[2022-05-30]
a -
更新后的android studio的资源错误:找不到资源(resource error in android studio after update: No Resource Found)[2023-07-23]
将build.gradle文件中的appcompat版本更改回22.2.1(或之前使用的任何内容)。 Change the appcompat version in your build.gradle file back to 22.2.1 (or whatever you were using before). -
与faces-redirect=true , includeViewParams=true仅适用于导航结果,而不适用于传递给ExternalContext#redirect() “普通”URL。 使用NavigationHandler#handleNavigation() 。 FacesContext context = FacesContext.getCurrentInstance(); String outcome = viewId + "?includeViewParams=true"; contex ...
-
Tomcat错误:在ExternalContext中找不到资源(Tomcat error: Not Found in ExternalContext as a Resource)[2023-01-24]
我不知道你的代码是如何负责重定向的,但是 /views/main/index*.xhtml 绝对看起来不对。 那边的星号是什么? 相应地修复代码,不再在视图ID中发出此星号。 I solved the problem: It was just a config issue with web.xml. I declared webapp version as 2.0 in web.xml instead of 3.0 for Tomcat 7. -
如何修复破坏xls文件下载的ExternalContext调用?(How to fix ExternalContext call that corrupts xls file to download?)[2023-03-19]
您知道您无法将excel的内容写入响应吗? 因此,响应实际上是空的,因此会导致各种奇怪的行为。 你甚至自己写这个: 没有任何字节 而你在图像中有... 您可能会遇到与PDF,图像甚至纯文本文件相同的问题(虽然这不会给出错误但只是为空) 你甚至会遇到普通servlet的同样问题。 因此,所有标签(excel,jsf,jsf-2,xls)都与问题无关。 把事情缩小了。 从上下文获取输出流并将工作簿写入该流应修复它。 OutputStream saida = externalContext.getResponse ... -
解 请按照以下文件夹结构,如下图所示。 Solution Please follow this below folder structure as shown in below figure.
-
并在tomcat的server.xml中进行了必要的更改。 如果从Netbeans运行您的Web应用程序,请检查“ Service面板中显示的Tomcat服务器的server.xml ,因为Netbeans会安装Tomcat并配置与“catalina home”不同的“catalina base”。 所以你可能已经改变了“catalina home” server.xml但没有改变Netbeans实际使用的“catalina base” server.xml 。 and made the necessary ...
-
SpringBootServletInitializer 您的代码示例仅显示main方法。 部署为WAR时,不执行main。 您需要扩展SpringBootServletInitializer : @SpringBootApplication public class Application extends SpringBootServletInitializer { @Override protected SpringApplicationBuilder configure(Spring ...
-
404 /index.xhtml在ExternalContext中找不到作为资源(404 /index.xhtml Not Found in ExternalContext as a Resource)[2021-11-11]
错误的Maven项目结构,由JimHawkins在评论中回答 Faulty Maven project structure, answered by JimHawkins in the comments -
好的,这对其他人来说可能会派上用场。 深入了解WebSphere Application Server的自定义Web容器属性,我遇到了这个问题: 使查询字符串可用于欢迎文件[Fix Pack 25或更高版本] 通常,当请求最初发送到应用程序的上下文根时,请求将转发到欢迎文件。 如果查询字符串包含在初始请求中,则如果在欢迎文件中包含request.getQueryString()属性,则欢迎文件不可用。 但是,如果在欢迎文件中包含javax.servlet.forward.query_string属性,则查询 ...