我需要在iOS应用程序中将自定义XMP文件嵌入到PNG文件中。目前,我能够做的是编译Adobe XMP工具包,生成一个Xcode项目,然后正确编译该项目。
从那时起,我不知道如何在我的Xcode项目中使用该库以及如何使用它。我在互联网上找到的信息很少。
有没有人做过相同的事情愿意提供帮助?
https://forums.adobe.com/thread/1360320
XmpWriter.h 的实现:
#import <Foundation/Foundation.h>
@interface XmpWriter : NSObject
+(BOOL) writeXmp:(const char *) imageUrl Param1:(const char *) Param1 Param2:(float) param2 Param3:(float) Param3;
+(BOOL) readXmp:(const char *) imageUrl;
@end
createXMPFromRDF()
方法,使其可以接受我的参数,例如:SXMPMeta createXMPFromRDF(const char *Param1, float Param2, float Param3)
MacBook-Pro-de-Michele:ios mike$ lipo -info libXMPCoreStatic.a fat 文件 libXMPCoreStatic.a 中的架构为:armv7 i386 x86_64 arm64 MacBook-Pro-de-Michele:ios mike$ lipo -info libXMPFilesStatic.a fat 文件 libXMPFilesStatic.a 中的架构为:armv7 i386 x86_64 arm64
。在库搜索路径中,我只有 $inherith 和 $(PROJECT_DIR)。 - Aleph72Undefined symbols for architecture x86_64: "std::string::_S_empty_rep()", referenced from: char* std::string::_S_construct<__gnu_cxx::__normal_iterator<char const*, std::string> >(__gnu_cxx::__normal_iterator<char const*, std::string>, __gnu_cxx::__normal_iterator<char const*, std::string>, std::allocator<char> const&, std::forward_iterator_tag) in libXMPFilesStatic.a(TimeConversionUtils.o)
。有什么想法吗? - Aleph72ReadingXMP
的演示程序,它应该是特定于平台的(对您在Xcode中很有帮助)。文档指出,这个演示将:
你需要在命令行中编译和构建它们,从/samples/source开始,并将它们写入到/samples/target/中。我认为指定的演示了使用XMPFiles和XMPCore组件的基本用法,从文件中获取只读XMP并通过XMP对象检查它。
filename
将是SDK生成的Xcode项目,但正如你注意到的,那里并没有太多的文档说明。我曾遇到类似的问题,需要读取/写入XMP数据,最终选择创建Objective-C封装来替代Adobe XMP Toolkit作为更自然的API。
我希望这对某些人有用,你可以在Github和CocoaPods上找到它: https://github.com/IHEARTCOOKIES/XMPFramework