我正在使用Omniture App Measurement库在iOS iPad应用程序(iOS 6.1及更高版本)中构建应用程序使用情况跟踪。
由于设备和模拟器有单独的库,我使用的是模拟器:libOmnitureAppMeasurement-iPhoneSimulator.a
我已经将库和标题下载并解压缩到文件夹中 我的项目中的iPhoneAppMeasurement(此文件夹包含文件 libOmnitureAppMeasurement-iPhoneSimulator.a和OMAppMeasurement.h 已正确添加到项目中)
我确保在我的库中正确指向库 构建设置下的搜索路径。
我在代码中添加了Omniture SDK设置和一些测试调用。
当我构建时,我得到“Pointer-to-literal-objc-class-name”类型的未定义符号错误......
Undefined symbols for architecture i386:
".objc_class_name_NSArray", referenced from:
pointer-to-literal-objc-class-name in libOmnitureAppMeasurement-iPhoneSimulator.a(OMAppMeasurement.o)
".objc_class_name_NSBundle", referenced from:
pointer-to-literal-objc-class-name in libOmnitureAppMeasurement-iPhoneSimulator.a(OMAppMeasurement.o)
".objc_class_name_NSDate", referenced from:
pointer-to-literal-objc-class-name in libOmnitureAppMeasurement-iPhoneSimulator.a(OMAppMeasurement.o)
... etc ...
".objc_class_name_UIScreen", referenced from:
pointer-to-literal-objc-class-name in libOmnitureAppMeasurement-iPhoneSimulator.a(OMAppMeasurement.o)
"_OBJC_CLASS_$_OMAppMeasurement", referenced from:
objc-class-ref in OmnitureEvent.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
我同时为iPad 6.1和iPad 7.0模拟器提供了这些功能。我该如何解决这个问题?
更新: 根据反馈和其他文章,我采取了以下步骤......
- I added libstdc++ under Apple LLVM 5.0 -Language C++ settings
- I changed Other Linker flags under Build Settings->Linking to use -libstdc++
(instead of lstdc++)
- I ensured libstdc++.dylib was included under Build Phases
Now I get "Apple Mach-O Linker Error" ld: library not found for -libstdc++
有没有办法可以通过命令行查找libstdc ++。dylib的存在,然后在我的项目中设置/包含它?这可能不是一个理想的方法,但我需要解决这个问题!
答案 0 :(得分:0)
我发现Adobe Analytics API已经过大修,新API是AdobeMobileLibrary-4.0.2-iOS.zip
下: https://developer.omniture.com/en_US/gallery/app-measurement-for-ios
用法是一种不同的风格,并遵循它构建和运行的文档很好。 似乎libOmnitureAppMeasurement ....已被弃用。