|
| 1 | +require 'json' |
| 2 | + |
| 3 | +# Returns the version number for a package.json file |
| 4 | +pkg_version = lambda do |dir_from_root = '', version = 'version'| |
| 5 | + path = File.join(__dir__, dir_from_root, 'package.json') |
| 6 | + JSON.parse(File.read(path))[version] |
| 7 | +end |
| 8 | + |
| 9 | +# Let the main package.json decide the version number for the pod |
| 10 | +package_version = pkg_version.call |
| 11 | +# Use the same RN version that the JS tools use |
| 12 | +react_native_version = pkg_version.call('../react-native') |
1 | 13 |
|
2 | 14 | Pod::Spec.new do |s|
|
3 | 15 | s.name = "ReactNativeExceptionHandler"
|
| 16 | + s.version = package_version |
4 | 17 | s.summary = "A react native module that lets you to register a global error handler that can capture fatal/non fatal uncaught exceptions"
|
5 |
| - s.version = "2.3.0" |
6 | 18 | s.description = <<-DESC
|
7 | 19 | A react native module that lets you to register a global error handler that can capture fatal/non fatal uncaught exceptions.
|
8 | 20 | The module helps prevent abrupt crashing of RN Apps without a graceful message to the user.
|
9 | 21 | DESC
|
10 | 22 | s.homepage = "https://github.com/master-atul/react-native-exception-handler"
|
11 | 23 | s.license = "MIT"
|
12 | 24 | s.author = { "Atul R" => "atulanand94@gmail.com" }
|
13 |
| - s.platform = :ios, "7.0" |
14 |
| - s.source = { :git => "https://github.com/master-atul/react-native-exception-handler.git", :tag => "master" } |
15 |
| - s.source_files = "*.{h,m}" |
16 |
| - s.requires_arc = true |
| 25 | + s.platform = :ios, "9.0" |
| 26 | + s.source = { :git => "https://github.com/master-atul/react-native-exception-handler.git", :tag => s.version.to_s } |
| 27 | + s.source_files = "ios/*.{h,m}" |
17 | 28 |
|
18 |
| - s.dependency "React" |
| 29 | + s.dependency "React", react_native_version |
19 | 30 |
|
20 | 31 | end
|
0 commit comments