Realm.podspec 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. Pod::Spec.new do |s|
  2. s.name = 'Realm'
  3. version = `sh build.sh get-version`
  4. s.version = version
  5. s.summary = 'Realm is a modern data framework & database for iOS, macOS, tvOS & watchOS.'
  6. s.description = <<-DESC
  7. The Realm Mobile Database, for Objective-C. (If you want to use Realm from Swift, see the “RealmSwift” pod.)
  8. The Realm Mobile Database is a fast, easy-to-use replacement for Core Data & SQLite. Use it with the Realm Mobile Platform for realtime, automatic data sync. Works on iOS, macOS, tvOS & watchOS. Learn more and get help at https://realm.io.
  9. DESC
  10. s.homepage = "https://realm.io"
  11. s.source = { :git => 'https://github.com/realm/realm-cocoa.git', :tag => "v#{s.version}", :submodules => true }
  12. s.author = { 'Realm' => 'help@realm.io' }
  13. s.library = 'c++', 'z'
  14. s.requires_arc = true
  15. s.social_media_url = 'https://twitter.com/realm'
  16. has_versioned_docs = !(version =~ /alpha|beta|rc/)
  17. s.documentation_url = "https://realm.io/docs/objc/#{has_versioned_docs ? s.version : 'latest'}"
  18. s.license = { :type => 'Apache 2.0', :file => 'LICENSE' }
  19. public_header_files = 'include/**/RLMArray.h',
  20. 'include/**/RLMCollection.h',
  21. 'include/**/RLMConstants.h',
  22. 'include/**/RLMListBase.h',
  23. 'include/**/RLMMigration.h',
  24. 'include/**/RLMObject.h',
  25. 'include/**/RLMObjectBase.h',
  26. 'include/**/RLMObjectSchema.h',
  27. 'include/**/RLMOptionalBase.h',
  28. 'include/**/RLMPlatform.h',
  29. 'include/**/RLMProperty.h',
  30. 'include/**/RLMRealm.h',
  31. 'include/**/RLMRealm+Sync.h',
  32. 'include/**/RLMRealmConfiguration+Sync.h',
  33. 'include/**/RLMRealmConfiguration.h',
  34. 'include/**/RLMResults.h',
  35. 'include/**/RLMSchema.h',
  36. 'include/**/RLMSyncConfiguration.h',
  37. 'include/**/RLMSyncCredentials.h',
  38. 'include/**/RLMSyncManager.h',
  39. 'include/**/RLMSyncPermission.h',
  40. 'include/**/RLMSyncSession.h',
  41. 'include/**/RLMSyncSubscription.h',
  42. 'include/**/RLMSyncUser.h',
  43. 'include/**/RLMSyncUtil.h',
  44. 'include/**/RLMThreadSafeReference.h',
  45. 'include/**/NSError+RLMSync.h',
  46. 'include/**/Realm.h',
  47. # Realm.Dynamic module
  48. 'include/**/RLMRealm_Dynamic.h',
  49. 'include/**/RLMObjectBase_Dynamic.h'
  50. # Realm.Private module
  51. private_header_files = 'include/**/RLMAccessor.h',
  52. 'include/**/RLMArray_Private.h',
  53. 'include/**/RLMCollection_Private.h',
  54. 'include/**/RLMListBase.h',
  55. 'include/**/RLMObjectBase_Private.h',
  56. 'include/**/RLMObjectSchema_Private.h',
  57. 'include/**/RLMObjectStore.h',
  58. 'include/**/RLMObject_Private.h',
  59. 'include/**/RLMOptionalBase.h',
  60. 'include/**/RLMProperty_Private.h',
  61. 'include/**/RLMRealmConfiguration_Private.h',
  62. 'include/**/RLMRealm_Private.h',
  63. 'include/**/RLMResults_Private.h',
  64. 'include/**/RLMSchema_Private.h',
  65. 'include/**/RLMSyncConfiguration_Private.h',
  66. 'include/**/RLMSyncUtil_Private.h'
  67. source_files = 'Realm/*.{m,mm}',
  68. 'Realm/ObjectStore/src/*.cpp',
  69. 'Realm/ObjectStore/src/sync/*.cpp',
  70. 'Realm/ObjectStore/src/sync/impl/*.cpp',
  71. 'Realm/ObjectStore/src/sync/impl/apple/*.cpp',
  72. 'Realm/ObjectStore/src/impl/*.cpp',
  73. 'Realm/ObjectStore/src/impl/apple/*.cpp',
  74. 'Realm/ObjectStore/src/util/*.cpp',
  75. 'Realm/ObjectStore/src/util/apple/*.cpp'
  76. s.frameworks = 'Security'
  77. s.module_map = 'Realm/Realm.modulemap'
  78. s.compiler_flags = "-DREALM_HAVE_CONFIG -DREALM_COCOA_VERSION='@\"#{s.version}\"' -D__ASSERTMACROS__ -DREALM_ENABLE_SYNC"
  79. s.prepare_command = 'sh build.sh cocoapods-setup'
  80. s.source_files = source_files + private_header_files
  81. s.private_header_files = private_header_files
  82. s.header_mappings_dir = 'include'
  83. s.pod_target_xcconfig = { 'APPLICATION_EXTENSION_API_ONLY' => 'YES',
  84. 'CLANG_CXX_LANGUAGE_STANDARD' => 'c++14',
  85. 'CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF' => 'NO',
  86. 'OTHER_CPLUSPLUSFLAGS' => '-isystem "${PODS_ROOT}/Realm/include/core" -fvisibility-inlines-hidden',
  87. 'USER_HEADER_SEARCH_PATHS' => '"${PODS_ROOT}/Realm/include" "${PODS_ROOT}/Realm/include/Realm"',
  88. }
  89. s.preserve_paths = %w(build.sh include)
  90. s.ios.deployment_target = '8.0'
  91. s.ios.vendored_library = 'core/librealmcore-ios.a'
  92. s.osx.deployment_target = '10.9'
  93. s.osx.vendored_library = 'core/librealmcore-macosx.a'
  94. s.watchos.deployment_target = '2.0'
  95. s.watchos.vendored_library = 'core/librealmcore-watchos.a'
  96. s.tvos.deployment_target = '9.0'
  97. s.tvos.vendored_library = 'core/librealmcore-tvos.a'
  98. s.subspec 'Headers' do |s|
  99. s.source_files = public_header_files
  100. s.public_header_files = public_header_files
  101. end
  102. end