Last active
December 16, 2015 17:00
-
-
Save steipete/5467684 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Pod::Spec.new do |s| | |
s.name = 'PSPDFKit' | |
s.version = '3.0.8' | |
s.license = 'Commercial' | |
s.summary = 'PSPDFKit - The definitive framework for displaying and annotating PDFs in your iOS apps.' | |
s.homepage = 'http://PSPDFKit.com' | |
s.author = { 'PSPDFKit GmbH' => '[email protected]' } | |
s.platform = :ios, '5.0' | |
s.source = { :git => 'https://github.com/PSPDFKit/PSPDFKit.git' } | |
s.preserve_path = 'README.md' | |
s.resource = 'PSPDFKit/PSPDFKit.bundle' | |
s.source_files = 'PSPDFKit/**/*.{h,c,m}' | |
s.exclude_files = 'PSPDFKit/Categories/UIViewController+PSPDFKitAdditions.{h,m}', 'PSPDFKit/Helper/PSPDFPatches.{h,m}', 'PSPDFKit/Helper/PSPDFDebugHelper.{h,m}', 'PSPDFKit/Vendor/PSTCollectionView' | |
s.requires_arc = true | |
s.library = 'z', 'sqlite3', 'xml2' | |
s.xcconfig = { 'HEADER_SEARCH_PATHS' => '$(SDKROOT)/usr/include/libxml2' } | |
s.frameworks = 'QuartzCore', 'CoreText', 'CoreMedia', 'MediaPlayer', 'AVFoundation', 'ImageIO', 'MessageUI', | |
'CoreGraphics', 'Foundation', 'CFNetwork', 'MobileCoreServices', 'SystemConfiguration', | |
'AssetsLibrary', 'Security', 'UIKit', 'AudioToolbox', 'QuickLook', 'CoreData' | |
s.dependency 'PSTCollectionView', '>= 1.1.0' | |
s.subspec 'no-arc' do |sp| | |
sp.source_files = 'PSPDFKit/Categories/UIViewController+PSPDFKitAdditions.{h,m}', 'PSPDFKit/Helper/PSPDFPatches.{h,m}', 'PSPDFKit/Helper/PSPDFDebugHelper.{h,m}' | |
sp.requires_arc = false | |
end | |
s.prepare_command = "echo '#define GIT_VERSION @\"#{s.version}\"\n#define GIT_COMMIT_COUNT 0' > PSPDFKit/InfoPlist.h" | |
end | |
# Thanks to Eloy Durán (@alloy) both for creating CocoaPods and helping out with creating this podspec. |
I think you want line 17 to be
s.libraries = 'z', 'sqlite3'
Is there an update to this for newer version of cocoapods? I'm getting:
- WARN | [iOS] The post install hook of the specification DSL has been deprecated, use the
resource_bundles
or theprepare_command
attributes.
Thanks!
Just updated the podspec so it works with the latest v3 beta.
I actually had to change the podspec as follows, in order to prevent ARC-related errors:
Pod::Spec.new do |s|
s.name = 'PSPDFKit'
s.version = '3.0.3'
s.license = 'Commercial'
s.summary = 'PSPDFKit - The definitive framework for displaying and annotating PDFs in your iOS apps.'
s.homepage = 'http://PSPDFKit.com'
s.author = { 'PSPDFKit GmbH' => '[email protected]' }
s.platform = :ios, '5.0'
s.source = { :git => 'https://github.com/PSPDFKit/PSPDFKit.git' }
s.preserve_path = 'README'
s.resource = 'PSPDFKit/PSPDFKit.bundle'
s.source_files = 'PSPDFKit/**/*.{h,c,m}'
s.exclude_files = 'PSPDFKit/Categories/UIViewController+PSPDFKitAdditions.{h,m}', 'PSPDFKit/Helper/PSPDFPatches.{h,m}', 'PSPDFKit/Helper/PSPDFDebugHelper.{h,m}', 'PSPDFKit/Vendor/PSTCollectionView'
s.requires_arc = true
s.library = 'z', 'sqlite3', 'xml2'
s.xcconfig = { 'HEADER_SEARCH_PATHS' => '$(SDKROOT)/usr/include/libxml2' }
s.frameworks = 'QuartzCore', 'CoreText', 'CoreMedia', 'MediaPlayer', 'AVFoundation', 'ImageIO', 'MessageUI',
'CoreGraphics', 'Foundation', 'CFNetwork', 'MobileCoreServices', 'SystemConfiguration',
'AssetsLibrary', 'Security', 'UIKit', 'AudioToolbox', 'QuickLook', 'CoreData'
s.dependency 'PSTCollectionView', '>= 1.1.0'
s.subspec 'no-arc' do |sp|
sp.source_files = 'PSPDFKit/Categories/UIViewController+PSPDFKitAdditions.{h,m}', 'PSPDFKit/Helper/PSPDFPatches.{h,m}', 'PSPDFKit/Helper/PSPDFDebugHelper.{h,m}'
sp.requires_arc = false
end
s.prepare_command = "echo '#define GIT_VERSION @\"#{s.version}\"\n#define GIT_COMMIT_COUNT 0' >PSPDFKit/InfoPlist.h"
end
# Thanks to Eloy Durán (@alloy) both for creating CocoaPods and helping out with creating this pods
Note the addition of PSPDFDebugHelper.{h,m}
to the exclude_files array and UIViewController+PSPDFKitAdditions.{h,m}
to the list of files to be compiled without ARC
This is now on Cocoapods, starting with 3.1.4: https://github.com/CocoaPods/Specs/tree/master/PSPDFKit
To use the unicode61 tokenizer with PSPDFLibrary we should remove sqlite3 and add the sqlite3 library shipped with the dmg file. Should that library link to our project or to the Pods project? Or it doesn't matter?
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is a podspec for PSPDFKit.
It assumes that you're PSPDFKit Enterprise customer. If you have your own repository with the PSPDFKit source, change the GitHub path accordingly. It doesn't yet work for binary variants, working on that.