Skip to content

Commit 19d3594

Browse files
authored
Merge pull request #95 from Vyazovoy/ios_integration_fixes
iOS Integration Fixes
2 parents 663febf + 93f72ec commit 19d3594

File tree

2 files changed

+18
-7
lines changed

2 files changed

+18
-7
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ or
8383

8484
##### Using Cocoapods
8585

86-
1. add `pod 'ReactNativeExceptionHandler', :podspec => '../node_modules/react-native-exception-handler/ios/ReactNativeExceptionHandler.podspec'` to your Podfile
86+
1. add `pod 'ReactNativeExceptionHandler', :podspec => '../node_modules/react-native-exception-handler/ReactNativeExceptionHandler.podspec'` to your Podfile
8787
2. run `pod install`
8888

8989
#### Android
Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,31 @@
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')
113

214
Pod::Spec.new do |s|
315
s.name = "ReactNativeExceptionHandler"
16+
s.version = package_version
417
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"
618
s.description = <<-DESC
719
A react native module that lets you to register a global error handler that can capture fatal/non fatal uncaught exceptions.
820
The module helps prevent abrupt crashing of RN Apps without a graceful message to the user.
921
DESC
1022
s.homepage = "https://github.com/master-atul/react-native-exception-handler"
1123
s.license = "MIT"
1224
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}"
1728

18-
s.dependency "React"
29+
s.dependency "React", react_native_version
1930

2031
end

0 commit comments

Comments
 (0)