/
dsl.rb
1220 lines (1124 loc) · 37.2 KB
/
dsl.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
require 'cocoapods-core/specification/dsl/attribute_support'
require 'cocoapods-core/specification/dsl/attribute'
require 'cocoapods-core/specification/dsl/platform_proxy'
require 'cocoapods-core/specification/dsl/deprecations'
module Pod
class Specification
#- NOTE ------------------------------------------------------------------#
# The of the methods defined in this file and the order of the methods is
# relevant for the documentation generated on the
# CocoaPods/cocoapods.github.com repository.
#-------------------------------------------------------------------------#
# A specification describes a version of Pod library. It includes details
# about where the source should be fetched from, what files to use, the
# build settings to apply, and other general metadata such as its name,
# version, and description.
#
# ---
#
# A stub specification file can be generated by the [pod spec
# create](commands.html#tab_spec-create) command.
#
# ---
#
# The specification DSL provides great flexibility and dynamism. Moreover,
# the DSL adopts the
# [convention over configuration](http://en.wikipedia.org/wiki/Convention_over_configuration)
# and thus it can be very simple:
#
# Pod::Spec.new do |s|
# s.name = 'Reachability'
# s.version = '3.1.0'
# s.license = { :type => 'BSD' }
# s.homepage = 'https://github.com/tonymillion/Reachability'
# s.authors = { 'Tony Million' => 'tonymillion@gmail.com' }
# s.summary = 'ARC and GCD Compatible Reachability Class for iOS and OS X. Drop in replacement for Apple Reachability.'
# s.source = { :git => 'https://github.com/tonymillion/Reachability.git', :tag => 'v3.1.0' }
# s.source_files = 'Reachability.{h,m}'
# s.framework = 'SystemConfiguration'
# s.requires_arc = true
# end
#
module DSL
extend Pod::Specification::DSL::AttributeSupport
#-----------------------------------------------------------------------#
# @!group Root specification
#
# A ‘root’ specification stores the information about the specific
# version of a library.
#
# The attributes in this group can only be written to on the ‘root’
# specification, **not** on the ‘sub-specifications’.
#
# ---
#
# The attributes listed in this group are the only one which are
# required by a podspec.
#
# The attributes of the other groups are offered to refine the podspec
# and follow a convention over configuration approach. A root
# specification can describe these attributes either directly of
# through ‘[sub-specifications](#subspec)’.
#-----------------------------------------------------------------------#
# @!method name=(name)
#
# The name of the Pod.
#
# @example
#
# spec.name = 'AFNetworking'
#
# @param [String] name
# the name of the pod.
#
root_attribute :name, {
:required => true,
}
#------------------#
# @!method version=(version)
#
# The version of the Pod. CocoaPods follows
# [semantic versioning](http://semver.org).
#
# @example
#
# spec.version = '0.0.1'
#
# @param [String] version
# the version of the Pod.
#
root_attribute :version, {
:required => true,
}
#------------------#
# @!method authors=(authors)
#
# The name and email address of each of the library’s the authors.
#
# @example
#
# spec.author = 'Darth Vader'
#
# @example
#
# spec.authors = 'Darth Vader', 'Wookiee'
#
# @example
#
# spec.authors = { 'Darth Vader' => 'darthvader@darkside.com',
# 'Wookiee' => 'wookiee@aggrrttaaggrrt.com' }
#
# @param [String, Hash{String=>String}] authors
# the list of the authors of the library and their emails.
#
root_attribute :authors, {
:types => [String, Array, Hash],
:container => Hash,
:required => true,
:singularize => true,
}
#------------------#
# @!method social_media_url=(social_media_url)
#
# The URL for the social media contact of the library. CocoaPods web
# services can use it, for example the Twitter notifications will
# include the twitter handle (shortening the description) if the URL is
# relative to Twitter.
#
# @example
#
# spec.social_media_url = 'https://twitter.com/cocoapods'
#
# @param [String] social_media_url
# the social media URL.
#
root_attribute :social_media_url
#------------------#
# The keys accepted by the license attribute.
#
LICENSE_KEYS = [:type, :file, :text].freeze
# @!method license=(license)
#
# The license of the Pod.
#
# ---
#
# Unless the source contains a file named `LICENSE.*` or `LICENCE.*`,
# the path of the license file **or** the integral text of the notice
# commonly used for the license type must be specified.
#
# This information is used by CocoaPods to generate acknowledgement
# files (markdown and plist) which can be used in the acknowledgements
# section of the final application.
#
# @example
#
# spec.license = 'MIT'
#
# @example
#
# spec.license = { :type => 'MIT', :file => 'MIT-LICENSE.txt' }
#
# @example
#
# spec.license = { :type => 'MIT', :text => <<-LICENSE
# Copyright 2012
# Permission is granted to...
# LICENSE
# }
#
# @param [String, Hash{Symbol=>String}] license
# The type of the license and the text of the grant that
# allows to use the library (or the relative path to the file
# that contains it).
#
root_attribute :license, {
:container => Hash,
:keys => LICENSE_KEYS,
:required => true,
}
#------------------#
# @!method homepage=(homepage)
#
# The URL of the homepage of the Pod.
#
# @example
#
# spec.homepage = 'www.example.com'
#
# @param [String] homepage
# the URL of the homepage of the Pod.
#
root_attribute :homepage, {
:required => true,
}
#------------------#
# The keys accepted by the hash of the source attribute.
#
SOURCE_KEYS = {
:git => [:tag, :branch, :commit, :submodules],
:svn => [:folder, :tag, :revision],
:hg => [:revision],
:http => nil,
:path => nil
}.freeze
# @!method source=(source)
#
# The location from where the library should be retrieved.
#
# @example Specifying a Git source with a tag.
#
# spec.source = { :git => 'https://github.com/AFNetworking/AFNetworking.git',
# :tag => 'v0.0.1' }
#
# @example Using the version of the Pod to identify the Git tag.
#
# spec.source = { :git => 'https://github.com/AFNetworking/AFNetworking.git',
# :tag => "v#{spec.version}" }
#
# @param [Hash{Symbol=>String}] source
# The location from where the library should be retrieved.
#
root_attribute :source, {
:container => Hash,
:keys => SOURCE_KEYS,
:required => true,
}
#------------------#
# @!method summary=(summary)
#
# A short (maximum 140 characters) description of the Pod.
#
# ---
#
# The description should be short, yet informative. It represents the
# tag line of the Pod and there is no need to specify that a Pod is a
# library (they always are).
#
# The summary is expected to be properly capitalized and containing the
# correct punctuation.
#
# @example
#
# spec.summary = 'Computes the meaning of life.'
#
# @param [String] summary
# A short description of the Pod.
#
root_attribute :summary, {
:required => true,
}
#------------------#
# @!method description=(description)
#
# A description of the Pod more detailed than the summary.
#
# @example
#
# spec.description = <<-DESC
# Computes the meaning of life.
# Features:
# 1. Is self aware
# ...
# 42. Likes candies.
# DESC
#
# @param [String] description
# A longer description of the Pod.
#
root_attribute :description
#------------------#
# @!method screenshots=(screenshots)
#
# A list of URLs to images showcasing the Pod. Intended for UI oriented
# libraries.
#
# @example
#
# spec.screenshot = "http://dl.dropbox.com/u/378729/MBProgressHUD/1.png"
#
# @example
#
# spec.screenshots = [ "http://dl.dropbox.com/u/378729/MBProgressHUD/1.png",
# "http://dl.dropbox.com/u/378729/MBProgressHUD/2.png" ]
#
# @param [String] screenshots
# An URL for the screenshot of the Pod.
#
root_attribute :screenshots, {
:singularize => true,
:container => Array,
}
#------------------#
# @!method documentation_url=(documentation_url)
#
# An URL for the documentation of the Pod which will be honored by
# CocoaPods web properties.
#
# @example
#
# spec.documentation_url = 'www.example.com/docs.html'
#
# @param [String] documentation_url
# The link of the web documentation of the Pod.
#
root_attribute :documentation_url
#------------------#
# @!method prepare_command=(command)
#
# A bash script that will be executed after the Pod is downloaded. This
# command can be used to create, delete and modify any file downloaded
# and will be ran before any paths for other file attributes of the
# specification are collected.
#
# This command is executed before the Pod is cleaned and before the
# Pods project is created. The working directory is the root of the
# Pod.
#
# If the pod is installed with the `:path` option this command will not
# be executed.
#
# @example
#
# spec.prepare_command = 'ruby build_files.rb'
#
# @example
#
# spec.prepare_command = <<-CMD
# sed -i 's/MyNameSpacedHeader/Header/g' ./**/*.h
# sed -i 's/MyNameOtherSpacedHeader/OtherHeader/g' ./**/*.h
# CMD
#
# @param [String] command
# the prepare command of the pod.
#
root_attribute :prepare_command
#-----------------------------------------------------------------------#
# @!group Platform
#
# A specification should indicate the platforms and the correspondent
# deployment targets on which the library is supported.
#
# If not defined in a subspec the attributes of this group inherit the
# value of the parent.
#-----------------------------------------------------------------------#
# The names of the platforms supported by the specification class.
#
PLATFORMS = [:osx, :ios].freeze
# @todo This currently is not used in the Ruby DSL.
#
attribute :platforms, {
:container => Hash,
:keys => PLATFORMS,
:multi_platform => false,
:inherited => true,
}
# The platform on which this Pod is supported. Leaving this blank
# means the Pod is supported on all platforms.
#
# @example
#
# spec.platform = :osx, "10.8"
#
# @example
#
# spec.platform = :ios
#
# @example
#
# spec.platform = :osx
#
# @param [Array<Symbol, String>] args
# A tuple where the first value is the name of the platform,
# (either `:ios` or `:osx`) and the second is the deployment
# target.
#
def platform=(args)
name, deployment_target = args
if name
attributes_hash["platforms"] = { name.to_s => deployment_target }
else
attributes_hash["platforms"] = {}
end
end
#------------------#
# The minimum deployment targets of the supported platforms.
#
# ---
#
# The following behavior is regarding the use of GCD and the
# `OS_OBJECT_USE_OBJC` flag. When set to `0`, it will allow code to use
# `dispatch_release()` on >= iOS 6.0 and OS X >= 10.8.
#
# * New libraries that do *not* require ARC don’t need to care about this
# issue at all.
#
# * New libraries that *do* require ARC _and_ have a deployment target of
# >= iOS 6.0 or OS X >= 10.8:
#
# These *no longer* use `dispatch_release()` and should have the
# `OS_OBJECT_USE_OBJC` flag set to `1`.
#
# **Note:** this means that these libraries *have* to specify the
# deployment target in their specifications in order to have
# CocoaPods set the flag to `1` and ensure proper behavior.
#
# * New libraries that *do* require ARC, but have a deployment target of
# < iOS 6.0 or OS X < 10.8:
#
# These contain `dispatch_release()` calls and as such need the
# `OS_OBJECT_USE_OBJC` flag set to `0`.
#
# **Note:** libraries that do *not* specify a platform version are
# assumed to have a deployment target of < iOS 6.0 or OS X < 10.8.
#
# For more information, see: http://opensource.apple.com/source/libdispatch/libdispatch-228.18/os/object.h
#
#
# @example
#
# spec.ios.deployment_target = "6.0"
#
# @example
#
# spec.osx.deployment_target = "10.8"
#
# @param [String] args
# The deployment target of the platform.
#
def deployment_target=(*args)
raise Informative, "The deployment target can be declared only per " \
"platform."
end
#-----------------------------------------------------------------------#
# @!group Build settings
#
# In this group are listed the attributes related to the configuration
# of the build environment that should be used to build the library.
#
# If not defined in a subspec the attributes of this group inherit the
# value of the parent.
#-----------------------------------------------------------------------#
# @todo This currently is not used in the Ruby DSL.
#
attribute :dependencies, {
:container => Hash,
:inherited => true,
}
# Any dependency on other Pods or to a ‘sub-specification’.
#
# ---
#
# Dependencies can specify versions requirements. The use of the approximate
# version indicator `~>` is recommended because it provides good
# control over the version without being too restrictive. For example,
# `~> 1.0.1` is equivalent to `>= 1.0.1` combined with `< 1.1`. Similarly,
# `~> 1.0` will match `1.0`, `1.0.1`, `1.1`, but will not upgrade to `2.0`.
#
# Pods with overly restrictive dependencies limit their compatibility with
# other Pods.
#
# @example
# spec.dependency 'AFNetworking', '~> 1.0'
#
# @example
# spec.dependency 'RestKit/CoreData', '~> 0.20.0'
#
# @example
# spec.ios.dependency 'MBProgressHUD', '~> 0.5'
#
def dependency(*args)
name, *version_requirements = args
if name == self.name
raise Informative, "A specification can't require itself as a " \
"subspec"
end
if @parent
composed_name = ""
@parent.name.split("/").each do |component|
composed_name << component
if name == composed_name
raise Informative, "A subspec can't require one of its " \
"parents specifications"
else
composed_name << "/"
end
end
end
unless version_requirements.all? { |req| req.is_a?(String) }
raise Informative, "Unsupported version requirements"
end
attributes_hash["dependencies"] ||= {}
attributes_hash["dependencies"][name] = version_requirements
end
#------------------#
# @!method requires_arc=(flag)
#
# Wether the library requires ARC to be compiled. If true the
# `-fobjc-arc` flag will be added to the compiler flags.
#
# ---
#
# The default value of this attribute is __transitioning__ from `false`
# to `true`, and in the meanwhile this attribute is always required.
#
# @example
#
# spec.requires_arc = true
#
# @param [Bool] flag
# whether the source files require ARC.
#
attribute :requires_arc, {
:types => [TrueClass, FalseClass],
:default_value => false,
:inherited => true,
}
#------------------#
# @!method frameworks=(*frameworks)
#
# A list of system frameworks that the user’s target needs to link
# against.
#
# @example
#
# spec.ios.framework = 'CFNetwork'
#
# @example
#
# spec.frameworks = 'QuartzCore', 'CoreData'
#
# @param [String, Array<String>] frameworks
# A list of framework names.
#
attribute :frameworks, {
:container => Array,
:singularize => true,
:inherited => true,
}
#------------------#
# @!method weak_frameworks=(*frameworks)
#
# A list of frameworks that the user’s target needs to **weakly** link
# against.
#
# @example
#
# spec.weak_framework = 'Twitter'
#
# @param [String, Array<String>] weak_frameworks
# A list of frameworks names.
#
attribute :weak_frameworks, {
:container => Array,
:singularize => true,
:inherited => true,
}
#------------------#
# @!method libraries=(*libraries)
#
# A list of libraries that the user’s target (application) needs to
# link against.
#
# @example
#
# spec.ios.library = 'xml2'
#
# @example
#
# spec.libraries = 'xml2', 'z'
#
# @param [String, Array<String>] libraries
# A list of library names.
#
attribute :libraries, {
:container => Array,
:singularize => true,
:inherited => true,
}
#------------------#
# @!method compiler_flags=(flags)
#
# A list of flags which should be passed to the compiler.
#
# @example
#
# spec.compiler_flags = '-DOS_OBJECT_USE_OBJC=0', '-Wno-format'
#
# @param [String, Array<String>] flags
# A list of flags.
#
attribute :compiler_flags, {
:container => Array,
:singularize => true,
:inherited => true,
}
#------------------#
# @!method xcconfig=(value)
#
# Any flag to add to the final xcconfig file.
#
# @example
#
# spec.xcconfig = { 'OTHER_LDFLAGS' => '-lObjC' }
#
# @param [Hash{String => String}] value
# A representing an xcconfig.
#
attribute :xcconfig, {
:container => Hash,
:inherited => true,
}
#------------------#
# @!method prefix_header_contents=(content)
#
# Any content to inject in the prefix header of the pod project.
#
# ---
#
# This attribute is __not recommended__ as Pods should not pollute the
# prefix header of other libraries or of the user project.
#
# @example
#
# spec.prefix_header_contents = '#import <UIKit/UIKit.h>'
#
# @example
#
# spec.prefix_header_contents = '#import <UIKit/UIKit.h>', '#import <Foundation/Foundation.h>'
#
# @param [String] content
# The contents of the prefix header.
#
attribute :prefix_header_contents, {
:types => [Array, String],
:inherited => true,
}
#------------------#
# @!method prefix_header_file=(path)
#
# A path to a prefix header file to inject in the prefix header of the
# pod project.
#
# ---
#
# This attribute is __not recommended__ as Pods should not pollute the
# prefix header of other libraries or of the user project.
#
# @example
#
# spec.prefix_header_file = 'iphone/include/prefix.pch'
#
# @param [String] path
# The path to the prefix header file.
#
attribute :prefix_header_file, {
:inherited => true
}
#------------------#
# @!method header_dir=(dir)
#
# The directory where to store the headers files so they don't break
# includes.
#
# @example
#
# spec.header_dir = 'Three20Core'
#
# @param [String] dir
# the headers directory.
#
attribute :header_dir, {
:inherited => true
}
#------------------#
# @!method header_mappings_dir=(dir)
#
# A directory from where to preserve the folder structure for the
# headers files. If not provided the headers files are flattened.
#
# @example
#
# spec.header_mappings_dir = 'src/include'
#
# @param [String] dir
# the directory from where to preserve the headers namespacing.
#
attribute :header_mappings_dir, {
:inherited => true
}
#-----------------------------------------------------------------------#
# @!group File patterns
#
# Podspecs should be located at the **root** of the repository, and paths
# to files should be specified **relative** to the root of the repository
# as well. File patterns do not support traversing the parent directory ( `..` ).
# File patterns may contain the following wildcard patterns:
#
# ---
#
# ### Pattern: *
#
# Matches any file. Can be restricted by other values in the glob.
#
# * `*` will match all files
# * `c*` will match all files beginning with `c`
# * `*c` will match all files ending with `c`
# * `*c*` will match all files that have `c` in them (including at the
# beginning or end)
#
# Equivalent to `/.*/x` in regexp.
#
# **Note** this will not match Unix-like hidden files (dotfiles). In
# order to include those in the match results, you must use something
# like `{*,.*}`.
#
# ---
#
# ### Pattern: **
#
# Matches directories recursively.
#
# ---
#
# ### Pattern: ?
#
# Matches any one character. Equivalent to `/.{1}/` in regexp.
#
# ---
#
# ### Pattern: [set]
#
# Matches any one character in set.
#
# Behaves exactly like character sets in Regexp, including set negation
# (`[^a-z]`).
#
# ---
#
# ### Pattern: {p,q}
#
# Matches either literal `p` or literal `q`.
#
# Matching literals may be more than one character in length. More than
# two literals may be specified.
#
# Equivalent to pattern alternation in regexp.
#
# ---
#
# ### Pattern: \
#
# Escapes the next meta-character.
#
# ---
#
# ### Examples
#
# Consider these to be evaluated in the source root of
# [JSONKit](https://github.com/johnezang/JSONKit).
#
# "JSONKit.?" #=> ["JSONKit.h", "JSONKit.m"]
# "*.[a-z][a-z]" #=> ["CHANGELOG.md", "README.md"]
# "*.[^m]*" #=> ["JSONKit.h"]
# "*.{h,m}" #=> ["JSONKit.h", "JSONKit.m"]
# "*" #=> ["CHANGELOG.md", "JSONKit.h", "JSONKit.m", "README.md"]
#-----------------------------------------------------------------------#
# @!method source_files=(source_files)
#
# The source files of the Pod.
#
# @example
#
# spec.source_files = "Classes/**/*.{h,m}"
#
# @example
#
# spec.source_files = "Classes/**/*.{h,m}", "More_Classes/**/*.{h,m}"
#
# @param [String, Array<String>] source_files
# the source files of the Pod.
#
attribute :source_files, {
:container => Array,
:file_patterns => true,
}
#------------------#
# @!method public_header_files=(public_header_files)
#
# A list of file patterns that should be used as public headers.
#
# ---
#
# These are the headers that will be exposed to the user’s project and
# from which documentation will be generated. If no public headers are
# specified then **all** the headers are considered public.
#
# @example
#
# spec.public_header_files = "Headers/Public/*.h"
#
# @param [String, Array<String>] public_header_files
# the public headers of the Pod.
#
attribute :public_header_files, {
:container => Array,
:file_patterns => true,
}
#------------------#
# @!method private_header_files=(private_header_files)
#
# A list of file patterns that should be used to mark private headers.
#
# ---
#
# These patterns are matched against the public headers (or all the
# headers if no public headers have been specified) to exclude those
# headers which should not be exposed to the user project and which
# should not be used to generate the documentation.
#
# @example
#
# spec.private_header_files = "Headers/Private/*.h"
#
# @param [String, Array<String>] private_header_files
# the private headers of the Pod.
#
attribute :private_header_files, {
:container => Array,
:file_patterns => true,
}
#------------------#
# @!method vendored_frameworks=(*frameworks)
#
# The paths of the framework bundles that come shipped with the Pod.
#
# @example
#
# spec.ios.vendored_frameworks = 'Frameworks/MyFramework.framework'
#
# @example
#
# spec.vendored_frameworks = 'MyFramework.framework', 'TheirFramework.framework'
#
# @param [String, Array<String>] vendored_frameworks
# A list of framework bundles paths.
#
attribute :vendored_frameworks, {
:container => Array,
:file_patterns => true,
:singularize => true,
}
#------------------#
# @!method vendored_libraries=(*frameworks)
#
# The paths of the libraries that come shipped with the Pod.
#
# @example
#
# spec.ios.vendored_library = 'Libraries/libProj4.a'
#
# @example
#
# spec.vendored_libraries = 'libProj4.a', 'libJavaScriptCore.a'
#
# @param [String, Array<String>] vendored_libraries
# A list of library paths.
#
attribute :vendored_libraries, {
:container => Array,
:file_patterns => true,
:singularize => true,
}
#------------------#
# @!method resource_bundles=(*frameworks)
#
# This attribute allows to define the name and the file of the resource
# bundles which should be built for the Pod. They are specified as a
# hash where the keys represent the name of the bundles and the values
# the file patterns that they should include.
#
# We strongly **recommend** library developers to adopt resource
# bundles as there can be name collisions using the resources
# attribute.
#
# The names of the bundles should at least include the name of the Pod
# to minimize the change of name collisions.
#
# To provide different resources per platform namespaced bundles *must*
# be used.
#
# @example
#
# spec.ios.resource_bundle = { 'MapBox' => 'MapView/Map/Resources/*.png' }
#
# @example
#
# spec.resource_bundles = { 'MapBox' => ['MapView/Map/Resources/*.png'], 'OtherResources' => ['MapView/Map/OtherResources/*.png'] }
#
# @param [Hash{String=>String}] resource_bundles
# A hash where the keys are the names of the resource bundles
# and the values are their relative file patterns.
#
attribute :resource_bundles, {
:types => [String, Array],
:container => Hash,
:file_patterns => true,
:singularize => true,
}
#------------------#
# @!method resources=(resources)
#
# A list of resources that should be copied into the target bundle.
#
# We strongly **recommend** library developers to adopt [resource
# bundles](http://docs.cocoapods.org/specification.html#resources) as
# there can be name collisions using the resources attribute. Moreover
# resources specified with this attribute are copied directly to the
# client target and therefore they are not optimized by Xcode.
#