Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: AndroidX, Autolink, Cocoapods #613

Merged
merged 2 commits into from
Jul 4, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions RNSentry.podspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
require 'json'
version = JSON.parse(File.read('package.json'))["version"]

Pod::Spec.new do |s|
s.name = 'RNSentry'
s.version = version
s.license = 'MIT'
s.summary = 'Official Sentry SDK for react-native'
s.author = 'Sentry'
s.homepage = "https://github.com/getsentry/sentry-react-native"
s.source = { :git => 'https://github.com/getsentry/sentry-react-native.git', :tag => "#{s.version}"}

s.ios.deployment_target = "8.0"
s.tvos.deployment_target = "9.0"

s.preserve_paths = '*.js'

s.dependency 'React'
s.dependency 'Sentry', '~> 4.4.0'

s.source_files = 'ios/RNSentry.{h,m}'
s.public_header_files = 'ios/RNSentry.h'
end
25 changes: 0 additions & 25 deletions SentryReactNative.podspec

This file was deleted.

2 changes: 0 additions & 2 deletions android/src/main/java/io/sentry/RNSentryModule.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import android.content.Context;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.support.annotation.NonNull;

import com.facebook.react.bridge.Arguments;
import com.facebook.react.bridge.Promise;
Expand Down Expand Up @@ -249,7 +248,6 @@ public void sendEvent(ReadableMap event, Promise promise) {
promise.resolve(true);
}

@NonNull
private UserBuilder getUserBuilder(ReadableMap user) {
UserBuilder userBuilder = new UserBuilder();
if (user.hasKey("email")) {
Expand Down
2 changes: 1 addition & 1 deletion ios/Sentry
16 changes: 8 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,14 @@
"@sentry/utils": "^5.4.2",
"@sentry/wizard": "^1.0.0"
},
"devDependencies": {
"@sentry/typescript": "5.*",
"@types/react-native": "^0.57.57",
"prettier": "^1.17.0",
"replace-in-file": "^4.0.0",
"rimraf": "^2.6.3",
"typescript": "^3.4.5"
},
"rnpm": {
"commands": {
"postlink": "node node_modules/@sentry/wizard/dist/bin.js -i reactNative -p ios android",
Expand All @@ -50,13 +58,5 @@
"libz"
]
}
},
"devDependencies": {
"@sentry/typescript": "5.*",
"@types/react-native": "^0.57.57",
"prettier": "^1.17.0",
"replace-in-file": "^4.0.0",
"rimraf": "^2.6.3",
"typescript": "^3.4.5"
}
}
18 changes: 18 additions & 0 deletions react-native.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
module.exports = {
dependency: {
platforms: {
ios: {
sharedLibraries: ["libz"]
},
android: {
packageInstance: "new RNSentryPackage()"
}
},
hooks: {
postlink:
"node node_modules/@sentry/wizard/dist/bin.js -i reactNative -p ios android",
postunlink:
"node node_modules/@sentry/wizard/dist/bin.js -i reactNative -p ios android --uninstall"
}
}
};
1 change: 1 addition & 0 deletions src/js/backend.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ export class ReactNativeBackend extends BaseBackend<BrowserOptions> {
private _isNativeTransportAvailable(): boolean {
return (
this._options.enableNative &&
RNSentry &&
RNSentry.nativeClientAvailable &&
RNSentry.nativeTransport
);
Expand Down
3 changes: 2 additions & 1 deletion src/js/sdk.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ export function init(
i => !IGNORED_DEFAULT_INTEGRATIONS.includes(i.name)
),
new Integrations.Breadcrumbs({
fetch: false
fetch: false,
console: false // If this in enabled it causes problems to native calls on >= RN 0.60
}),
new RewriteFrames({
iteratee: (frame: StackFrame) => {
Expand Down