AdobeAdobeMobilelibrary不能通过 cocoapods-repo(只有Omniture的旧版本)提供,但作为静态库,您可以从Adobe网站下载.
我想知道是否有可能用cocoapods维护这个静态库?
我创建了一个podspec文件:
Pod::Spec.new do |s| s.name = 'AdobeMobilelibrary' s.version = '4.0.2' s.license = 'Commercial' s.summary = 'Adobe Omniture SiteCatalyst analytics library for iOS.' s.homepage = 'https://developer.omniture.com/en_US/content_page/mobile/c-measuring-mobile-applications' s.author = { 'Adobe Omniture SiteCatalyst' => 'http://www.adobe.com/solutions/digital-marketing.HTML' } s.source_files = 'AdobeMobilelibrary/*.{Json,h}' s.ios.vendored_library = 'AdobeMobilelibrary/AdobeMobilelibrary.a' s.library = 'AdobeMobilelibrary' s.xcconfig = { 'liBRARY_SEARCH_PATHS' => '"$(PODS_ROOT)/AdobeMobilelibrary"' }end
在我的podfile中,我像这样引用podspec文件:
pod 'AdobeMobilelibrary',:path => 'AdobeMobilelibrary.podspec'
在Pods项目中,我可以看到所有文件(AdobeMobilelibrary.a,ADBMobile.h,ADBMobileConfig.Json)
看到
http://i.stack.imgur.com/rnmp1.png
但是我无法构建项目并收到此错误消息:
ld: library not found for -lAdobeMobilelibrary
有谁有线索,这里的问题是什么?
使用带有cocoapods的AdobeMobilelibrary有不同的解决方案吗?
解决方法 问题是由于cocoapods期望库具有lib前缀,即在这种情况下为libAdobeMobilelibrary.a.解决此问题的最简单方法是创建指向库的符号链接:ln -s AdobeMobilelibrary.a libAdobeMobilelibrary.a
值得注意的是,使用Adobe Mobile SDK时,.Json文件应作为资源而不是源包含在内.此外,您还需要添加对SystemConfiguration框架和libsqlite3.0.dylib的引用.这是您的pod规范相应修改:
Pod::Spec.new do |s| s.name = 'AdobeMobilelibrary' s.version = '4.0.2' s.license = 'Commercial' s.summary = 'Adobe Omniture SiteCatalyst analytics library for iOS.' s.homepage = 'https://developer.omniture.com/en_US/content_page/mobile/c-measuring- mobile-applications' s.author = { 'Adobe Omniture SiteCatalyst' => 'http://www.adobe.com/solutions/digital-marketing.HTML' } s.source_files = 'AdobeMobilelibrary/*.h' s.resource = 'AdobeMobilelibrary/ADBMobileConfig.Json' s.framework = 'SystemConfiguration' s.ios.vendored_library = 'AdobeMobilelibrary/AdobeMobilelibrary.a' s.librarIEs = 'sqlite3.0','AdobeMobilelibrary' s.xcconfig = { 'liBRARY_SEARCH_PATHS' => '"$(PODS_ROOT)/AdobeMobilelibrary"' }end总结
以上是内存溢出为你收集整理的使用带有cocoapods的AdobeMobileLibrary(适用于iOS)?全部内容,希望文章能够帮你解决使用带有cocoapods的AdobeMobileLibrary(适用于iOS)?所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)