Skip to content

Commit 6d160cf

Browse files
authored
Merge pull request #215 from wyne/sentry
Sentry
2 parents ea70011 + ef86e74 commit 6d160cf

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+4922
-467
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
node_modules/
2+
.env
23
.expo/
34
npm-debug.*
45
*.jks

App.js

+7
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,13 @@ import { store, persistor } from './redux/store';
88
import GameScreen from "./src/screens/GameScreen";
99
import SettingsScreen from "./src/screens/SettingsScreen";
1010
import RoundTitle from './src/components/RoundTitle';
11+
import * as Sentry from 'sentry-expo';
12+
13+
Sentry.init({
14+
dsn: 'https://[email protected]/4504710808076288',
15+
enableInExpoDevelopment: true,
16+
debug: false, // If `true`, Sentry will try to print out useful debugging information if something goes wrong with sending the event. Set it to `false` in production
17+
});
1118

1219
const navigator = createStackNavigator(
1320
{

Readme.md

+8
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,11 @@ Beta Workflow
3535
2. Commit and merge to `beta` branch.
3636
3. Github action will publish to `beta` channel.
3737
4. Clients built with `beta` channel will receive the udpate.
38+
39+
### Build
40+
41+
Prerequisite: `SENTRY_AUTH_TOKEN` in `.env`
42+
43+
```
44+
npx expo run:ios
45+
```

app.json

+18-4
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"expo": {
33
"name": "ScorePad with Rounds",
44
"slug": "scorepad",
5-
"version": "1.1.5",
5+
"version": "1.1.8",
66
"orientation": "default",
77
"icon": "./assets/icon.png",
88
"updates": {
@@ -14,7 +14,7 @@
1414
"backgroundColor": "#000000",
1515
"ios": {
1616
"bundleIdentifier": "com.wyne.scorepad",
17-
"buildNumber": "24",
17+
"buildNumber": "27",
1818
"supportsTablet": true,
1919
"requireFullScreen": false
2020
},
@@ -25,7 +25,7 @@
2525
"backgroundImage": "./assets/adaptive-icon-bg.png"
2626
},
2727
"package": "com.wyne.scorepad",
28-
"versionCode": 24,
28+
"versionCode": 27,
2929
"permissions": []
3030
},
3131
"userInterfaceStyle": "dark",
@@ -39,6 +39,20 @@
3939
"projectId": "fc8859ea-b320-41cd-a091-36b3ec7f9b1f"
4040
}
4141
},
42-
"owner": "wyne"
42+
"owner": "wyne",
43+
"plugins": [
44+
"sentry-expo"
45+
],
46+
"hooks": {
47+
"postPublish": [
48+
{
49+
"file": "sentry-expo/upload-sourcemaps",
50+
"config": {
51+
"organization": "justin-wyne",
52+
"project": "scorepad"
53+
}
54+
}
55+
]
56+
}
4357
}
4458
}

index.js

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import { registerRootComponent } from 'expo';
2+
3+
import App from './App';
4+
5+
// registerRootComponent calls AppRegistry.registerComponent('main', () => App);
6+
// It also ensures that whether you load the app in Expo Go or in a native build,
7+
// the environment is set up appropriately
8+
registerRootComponent(App);

ios/.gitignore

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# OSX
2+
#
3+
.DS_Store
4+
5+
# Xcode
6+
#
7+
build/
8+
*.pbxuser
9+
!default.pbxuser
10+
*.mode1v3
11+
!default.mode1v3
12+
*.mode2v3
13+
!default.mode2v3
14+
*.perspectivev3
15+
!default.perspectivev3
16+
xcuserdata
17+
*.xccheckout
18+
*.moved-aside
19+
DerivedData
20+
*.hmap
21+
*.ipa
22+
*.xcuserstate
23+
project.xcworkspace
24+
.xcode.env.local
25+
26+
# Bundle artifacts
27+
*.jsbundle
28+
29+
# CocoaPods
30+
/Pods/

ios/.xcode.env

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# This `.xcode.env` file is versioned and is used to source the environment
2+
# used when running script phases inside Xcode.
3+
# To customize your local environment, you can create an `.xcode.env.local`
4+
# file that is not versioned.
5+
6+
# NODE_BINARY variable contains the PATH to the node executable.
7+
#
8+
# Customize the NODE_BINARY variable here.
9+
# For example, to use nvm with brew, add the following line
10+
# . "$(brew --prefix nvm)/nvm.sh" --no-use
11+
export NODE_BINARY=$(command -v node)

ios/Podfile

+61
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
require File.join(File.dirname(`node --print "require.resolve('expo/package.json')"`), "scripts/autolinking")
2+
require File.join(File.dirname(`node --print "require.resolve('react-native/package.json')"`), "scripts/react_native_pods")
3+
require File.join(File.dirname(`node --print "require.resolve('@react-native-community/cli-platform-ios/package.json')"`), "native_modules")
4+
5+
require 'json'
6+
podfile_properties = JSON.parse(File.read(File.join(__dir__, 'Podfile.properties.json'))) rescue {}
7+
8+
platform :ios, podfile_properties['ios.deploymentTarget'] || '13.0'
9+
install! 'cocoapods',
10+
:deterministic_uuids => false
11+
12+
target 'ScorePadwithRounds' do
13+
use_expo_modules!
14+
config = use_native_modules!
15+
16+
use_frameworks! :linkage => podfile_properties['ios.useFrameworks'].to_sym if podfile_properties['ios.useFrameworks']
17+
18+
# Flags change depending on the env values.
19+
flags = get_default_flags()
20+
21+
use_react_native!(
22+
:path => config[:reactNativePath],
23+
:hermes_enabled => podfile_properties['expo.jsEngine'] == 'hermes',
24+
:fabric_enabled => flags[:fabric_enabled],
25+
# An absolute path to your application root.
26+
:app_path => "#{Pod::Config.instance.installation_root}/..",
27+
#
28+
# Uncomment to opt-in to using Flipper
29+
# Note that if you have use_frameworks! enabled, Flipper will not work
30+
# :flipper_configuration => !ENV['CI'] ? FlipperConfiguration.enabled : FlipperConfiguration.disabled,
31+
)
32+
33+
post_install do |installer|
34+
react_native_post_install(
35+
installer,
36+
# Set `mac_catalyst_enabled` to `true` in order to apply patches
37+
# necessary for Mac Catalyst builds
38+
:mac_catalyst_enabled => false
39+
)
40+
__apply_Xcode_12_5_M1_post_install_workaround(installer)
41+
42+
# This is necessary for Xcode 14, because it signs resource bundles by default
43+
# when building for devices.
44+
installer.target_installation_results.pod_target_installation_results
45+
.each do |pod_name, target_installation_result|
46+
target_installation_result.resource_bundle_targets.each do |resource_bundle_target|
47+
resource_bundle_target.build_configurations.each do |config|
48+
config.build_settings['CODE_SIGNING_ALLOWED'] = 'NO'
49+
end
50+
end
51+
end
52+
end
53+
54+
post_integrate do |installer|
55+
begin
56+
expo_patch_react_imports!(installer)
57+
rescue => e
58+
Pod::UI.warn e
59+
end
60+
end
61+
end

0 commit comments

Comments
 (0)