如何将 libxslt 包含在我的 iPhone 应用程序中?
我听说包含 libxslt.dylib 是您的应用程序被拒绝的理由。我不知道这有多准确。
尽管如此,我想包含最新版本的 libxslt。我想对 libxml2 以及将来的其他库做同样的事情。
在我的应用程序中包含这样的代码库的正确方法是什么?
I've heard that including libxslt.dylib is grounds for getting your app rejected. I don't know how accurate that is.
Nevertheless, I would like to include the latest version of libxslt. I'd like to do the same thing with libxml2, as well as other libraries in the future.
What is the correct way to include a code library like this in my app?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
我的应用程序被拒绝,并显示来自 Apple 的以下消息。
XYZ 应用程序无法发布到 App Store,因为它使用私有或未记录的 API:
私有符号引用
xslt应用样式表
xsltCleanupGlobals
xslt免费样式表
xslt初始化
xsltParseStylesheetFile
xsltSaveResultToString
如您所知,正如 iPhone 开发者计划许可协议第 3.3.1 节中所述,不允许使用非公共 API。在应用程序审核团队审核您的应用程序之前,请解决此问题并将新的二进制文件上传到 iTunes Connect。
据我了解,libxslt 和 libxml2 库实际上存在于设备上,并且可以通过 Xcode 中的下拉菜单使用。我动态链接这两个库,我的应用程序在设备上运行得很好。因此,库必须位于设备上。为什么我需要从头开始构建这些库作为静态库并增加我的应用程序的大小?
除了不使用 xml 和 xslt 之外,我找不到任何明确的方法来解决此问题。这根本没有意义!
Hilton,您是否成功向 iTunes 提交了使用 xslt 的应用程序?
My app was rejected with the following message from Apple.
XYZ app cannot be posted to the App Store because it is using private or undocumented APIs:
Private Symbol References
xsltApplyStylesheet
xsltCleanupGlobals
xsltFreeStylesheet
xsltInit
xsltParseStylesheetFile
xsltSaveResultToString
As you know, as outlined in the iPhone Developer Program License Agreement section 3.3.1, the use of non-public APIs is not permitted. Before your application can be reviewed by the App Review Team, please resolve this issue and upload a new binary to iTunes Connect.
It was my understanding that the libxslt and libxml2 libraries were in fact present on the device and are available via the pull down menu in Xcode. I dynamically link link with these two libraries and my app works beautifully on the device. Hence, the libraries must be on the device. Why would I need to build these libraries from scratch as static libraries and increase the size of my app?
I can't find any clear way to work around this, aside from not using xml and xslt. That makes no sense at all!
Hilton, have you succeeded in submitting an app to iTunes that uses xslt?
我终于在 Xcode 中构建了 libxslt,链接到我的应用程序,并逃避应用程序商店拒绝机器人。
基本上,您必须静态构建 libxslt 并更改符号名称,以便它们与 Apple 寻找的符号名称不匹配。所有符号
xsltFoo()
必须更改为zsltFoo()
。此外,库本身的名称必须从libxslt.a
更改为libzslt.a
。以下是如何通过 10 个简单步骤完成此操作:)
libxslt
子目录并将libxslt-1.1.26.tar.gz
放入其中。libxslt
并在libxslt/dist
中构建并安装,libxslt/dist/lib/libzslt.a
libxslt/dist/include
#include
添加到您的代码中,通常需要zsltFoo 而不是
xsltFoo
以下是步骤 #3 中引用的
libxslt
构建脚本:I finally got libxslt to build in Xcode, link to my app, and evade the app store rejectionbot.
Basically you have to build libxslt statically and change the symbol names so they don't match the ones that Apple looks for. All symbols
xsltFoo()
must be changed tozsltFoo()
. Also the name of the library itself must be changed fromlibxslt.a
tolibzslt.a
.Here's a how to do it in 10 easy steps :)
libxslt
subdirectory and putlibxslt-1.1.26.tar.gz
into it.libxslt
to be configured and built and installed inlibxslt/dist
libxslt/dist/lib/libzslt.a
libxslt/dist/include
#include <libxslt/whatever.h>
to your code as needed normallyzsltFoo
instead ofxsltFoo
everywhere in your codeHere is the
libxslt
build script referenced in step #3:嘿 Hilton,您是否可以让我们知道您如何设法将 LIBXSLT 库静态链接到您的应用程序中?
我和其他一些人遇到了完全相同的问题,但至少目前,我不知道如何将动态库变成静态库。
谢谢。
编辑:查看这个 iPhone 中的 XSLT 版本
我的应用程序被拒绝因为使用 LibXSLT 所以我手动添加源代码并这样做。我的应用程序几天前获得批准。
Hey Hilton, any chance you could let us know how you managed to statically link the LIBXSLT library into your app please?
I'm having exactly the same issue as quite a few others but at the moment at least, I have no idea how to go about turning the dynamic library into a static one.
Thanks.
EDIT: Check out this Version of XSLT in iPhone
My app was rejected for using LibXSLT so instead I manually added the source code and did it that way. My app was approved a few days ago.
您只能动态链接到设备上已存在的库。
如果您想链接到设备上不存在的外部库,您必须自己将其编译为静态库并链接它。
You can only dynamically link to libraries that are already present on the device.
If you want to link to an external library that is not present on the device, you will have to compile it yourself to a static library and link that instead.
根据Archie的回答,这个脚本(使用XCode 5命令行工具)生成一个适合包含在项目中的多架构libzslt,与iOS 6和iOS 7项目兼容(尽管我没有包含iOS 7 64位)。
此解决方案假设 libxslt-1.1.28 已解压并位于与脚本相同的目录中。
该脚本创建一个目录依赖项,其中包含头文件和 lib 文件。您可以通过调整标头和链接器搜索路径将它们包含在 Xcode 项目中。
Based on Archie's answer, this script (with XCode 5 command line tools) generates a multi-architecture libzslt suitable for inclusion in a project, compatible with iOS 6 and iOS 7 projects (though I haven't included iOS 7 64 bit).
This solution assumes libxslt-1.1.28 is unpacked and in the same directory as the script.
The script creates a directory dependencies which contains the header and lib files. You can include them in an Xcode project by adjusting the header and linker search paths.