Use AdobeMobileLibrary (for iOS) with cocoapods?

后端 未结 2 812
春和景丽
春和景丽 2021-02-09 16:31

We are going to use Omniture-Tracking for iOS, which is part of AdobeMobileLibrary. AdobeAdobeMobileLibrary is not available via cocoapods-repo (only an older version of Omnitur

2条回答
  •  说谎
    说谎 (楼主)
    2021-02-09 17:11

    To be more generic for @fransen's solution, I used prepare_command and preserve_paths:

    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.preserve_paths = 'AdobeMobileLibrary/libAdobeMobileLibrary.a'
      s.ios.vendored_library = 'AdobeMobileLibrary/AdobeMobileLibrary.a'
      s.prepare_command  = <<-CMD
                 if [ -f $PWD/AdobeMobileLibrary/libAdobeMobileLibrary.a ]
                 then
                     rm -rf $PWD/AdobeMobileLibrary/libAdobeMobileLibrary.a
                 fi
                 ln -s $PWD/AdobeMobileLibrary/AdobeMobileLibrary.a $PWD/AdobeMobileLibrary/libAdobeMobileLibrary.a
                              CMD
      s.libraries      = 'sqlite3.0'
      s.xcconfig       = { 'LIBRARY_SEARCH_PATHS' => '"$(PODS_ROOT)/AdobeMobileLibrary"' }
    end
    

提交回复
热议问题