我希望在运行时创建.plist文件。我不想使用任何第三方图书馆。只想使用java代码。
下面是示例文件:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>items</key>
<array>
<dict>
<key>assets</key>
<array>
<dict>
<key>kind</key>
<string>software-package</string>
<key>url</key>
<string>IPA PATH</string>
</dict>
</array>
<key>metadata</key>
<dict>
<key>bundle-identifier</key>
<string>com.xx.xx</string>
<key>kind</key>
<string>software</string>
<key>title</key>
<string>V7</string>
</dict>
</dict>
</array>发布于 2022-09-15 23:42:27
由于您包含了JSP标记,下面是一个JSP。一切都在同一条线上。我复制了您的文件(添加了缺失的结束标记),并将其粘贴到一个名为"My.xml“的文件中。我把这个文件放到我的网页应用程序的根目录中。
<%@ page import="java.nio.file.Files,java.nio.file.Paths"%><%response.setContentType("text/xml");Files.copy(Paths.get(application.getRealPath("/My.xml")),response.getOutputStream());%>或者,您可以使用setContentType(“application/x-plist”)并将文件命名为"My.plist“并使用
<%@ page import="java.nio.file.Files,java.nio.file.Paths"%><%response.setContentType("application/x-plist");Files.copy(Paths.get(application.getRealPath("/My.plist")),response.getOutputStream());%>发布于 2022-09-16 11:32:08
我自己解决了这个问题,所以结束了这个问题。
https://stackoverflow.com/questions/73734216
复制相似问题