Skip to content

Commit 057336b

Browse files
author
Thomas De Backer
committed
Fix podspec file so we dont need to do manual library linking anymore
1 parent 367ba47 commit 057336b

File tree

1 file changed

+17
-92
lines changed

1 file changed

+17
-92
lines changed

react-native-agora.podspec

Lines changed: 17 additions & 92 deletions
Original file line numberDiff line numberDiff line change
@@ -1,99 +1,24 @@
1-
#
2-
# Be sure to run `pod spec lint react-native-agora.podspec' to ensure this is a
3-
# valid spec and to remove all comments including this before submitting the spec.
4-
#
5-
# To learn more about Podspec attributes see http://docs.cocoapods.org/specification.html
6-
# To see working Podspecs in the CocoaPods repo see https://github.com/CocoaPods/Specs/
7-
#
81
require 'json'
92

10-
package = JSON.parse File.read File.join __dir__, "package.json"
11-
Pod::Spec.new do |s|
12-
s.name = package["name"]
13-
s.version = package["version"]
14-
s.summary = package["summary"]
15-
s.description = package["description"]
16-
17-
s.homepage = package["homepage"]
18-
s.license = package["license"]
19-
s.authors = package["authors"]
20-
21-
# ――― Platform Specifics ――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
22-
#
23-
# If this Pod runs only on iOS or OS X, then specify the platform and
24-
# the deployment target. You can optionally include the target after the platform.
25-
#
26-
27-
s.platform = :ios
28-
s.platform = :ios, "5.0"
29-
30-
# When using multiple platforms
31-
# s.ios.deployment_target = "5.0"
32-
# s.osx.deployment_target = "10.7"
33-
# s.watchos.deployment_target = "2.0"
34-
# s.tvos.deployment_target = "9.0"
35-
36-
37-
# ――― Source Location ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
38-
#
39-
# Specify the location from where the source should be retrieved.
40-
# Supports git, hg, bzr, svn and HTTP.
41-
#
42-
43-
#s.source = { :http => "file:///./ios" }
44-
s.source = { :git => package["repository"]["url"], :tag => "#{s.version}" }
45-
#s.source = { :git => package["repository"]["url"] , :tag => "#{s.version}" }
46-
47-
s.source_files = "RCTAgora", "RCTAgora/**/*.{h,m}"
48-
# s.public_header_files = "Classes/**/*.h"
49-
50-
51-
# ――― Resources ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
52-
#
53-
# A list of resources included with the Pod. These are copied into the
54-
# target bundle with a build phase script. Anything else will be cleaned.
55-
# You can preserve files from being cleaned, please don't preserve
56-
# non-essential files like tests, examples and documentation.
57-
#
58-
59-
# s.resource = "icon.png"
60-
# s.resources = "Resources/*.png"
61-
62-
# s.preserve_paths = "FilesToSave", "MoreFilesToSave"
63-
64-
65-
# ――― Project Linking ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
66-
#
67-
# Link your library with frameworks, or libraries. Libraries do not include
68-
# the lib prefix of their name.
69-
#
70-
71-
# s.framework = "SomeFramework"
72-
# s.frameworks = "SomeFramework", "AnotherFramework"
73-
74-
# s.library = "iconv"
75-
# s.libraries = "iconv", "xml2"
3+
package = JSON.parse(File.read(File.join(__dir__, 'package.json')))
764

5+
Pod::Spec.new do |s|
6+
s.name = "react-native-agora"
7+
s.version = package["version"]
8+
s.summary = package["description"]
9+
s.homepage = package['homepage']
10+
s.license = package['license']
11+
s.authors = package["authors"]
12+
s.platform = :ios, "7.0"
7713

78-
# ――― Project Settings ――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
79-
#
80-
# If your library depends on compiler flags you can set them in the xcconfig hash
81-
# where they will only apply to your library. If you depend on other Podspecs
82-
# you can include multiple dependencies to ensure it works.
14+
s.source = { :git => package["repository"]["url"] }
15+
s.source_files = 'ios/RCTAgora/*.{h,m}'
8316

84-
# s.requires_arc = true
8517
s.subspec 'AgoraRtcCryptoLoader' do |sp|
86-
sp.source_files = './ios/RCTAgora/libs/AgoraRtcCryptoLoader.framework/**/*.{c,h,m,mm,S,cpp}'
87-
sp.vendored_libraries = 'libcrypto.a'
88-
end
89-
90-
s.xcconfig = {
91-
"HEADER_SEARCH_PATHS" => [
92-
"$(SDKROOT)../../node_modules/react-native/React",
93-
"$(SDKROOT)../../ios/Pods"
94-
]
95-
}
96-
s.dependency "AgoraRtcEngine_iOS", "2.4.1"
18+
sp.source_files = './ios/RCTAgora/libs/AgoraRtcCryptoLoader.framework/**/*.{c,h,m,mm,S,cpp}'
19+
sp.vendored_libraries = 'libcrypto.a'
20+
end
21+
9722
s.dependency 'React'
98-
99-
end
23+
s.dependency "AgoraRtcEngine_iOS", "2.4.0.1"
24+
end

0 commit comments

Comments
 (0)