Skip to content

Commit 62d2c3c

Browse files
authored
Merge pull request #422 from BranchMetrics/segment-fix
Segment fix
2 parents 616ba41 + c94e58c commit 62d2c3c

File tree

2 files changed

+30
-0
lines changed

2 files changed

+30
-0
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
"docs",
1010
"ios",
1111
"react-native-branch.podspec",
12+
"react-native-branch-segment.podspec",
1213
"scripts",
1314
"src"
1415
],
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
require 'json'
2+
3+
# Podspec specifically for use in hybrid apps with the Branch Segment integration.
4+
# Not for use in pure RN apps.
5+
6+
# expect package.json in current dir
7+
package_json_filename = File.expand_path("./package.json", __dir__)
8+
9+
# load the spec from package.json
10+
spec = JSON.load(File.read(package_json_filename))
11+
12+
Pod::Spec.new do |s|
13+
s.name = "#{spec['name']}-segment"
14+
s.version = spec['version']
15+
s.summary = spec['description']
16+
s.requires_arc = true
17+
s.authors = {
18+
'rt2zz' => 'zack@root-two.com',
19+
'Jimmy Dee' => 'jgvdthree@gmail.com'
20+
}
21+
s.license = spec['license']
22+
s.homepage = spec['homepage']
23+
s.platform = :ios, "7.0"
24+
s.source = { spec['repository']['type'].to_sym => spec['repository']['url'].sub(/^[a-z]+\+/, '') }
25+
s.source_files = [ "ios/*.h", "ios/*.m"]
26+
s.header_dir = "react-native-branch"
27+
s.dependency 'Branch'
28+
s.dependency 'React' # to ensure the correct build order
29+
end

0 commit comments

Comments
 (0)