Skip to content

Commit 4f72b3e

Browse files
authored
feat: CodePush 통합 (#1)
* chore: react-native-version 실행 * fix: iOS 릴리즈 빌드에서 뒤로가기 버튼 누르면 뻗는 문제 해결. * chore: appcenter-analytics 통합 * chore: 코드푸시 통합 * chore(style): 누락된 lint 적용
1 parent b5836fb commit 4f72b3e

18 files changed

Lines changed: 1039 additions & 52 deletions

File tree

.idea/inspectionProfiles/Project_Default.xml

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

android/app/build.gradle

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ project.ext.react = [
2525
]
2626

2727
apply from: "../../node_modules/react-native/react.gradle"
28-
apply from: "../../node_modules/react-native-vector-icons/fonts.gradle" // 이거 추가하래요! -_-
28+
apply from: "../../node_modules/react-native-vector-icons/fonts.gradle" // 폰트
29+
apply from: "../../node_modules/react-native-code-push/android/codepush.gradle" // 코드푸시
2930

3031
/**
3132
* Set this to true to create two separate APKs instead of one:
@@ -78,7 +79,7 @@ android {
7879
applicationId "com.inu.cafeteria"
7980
minSdkVersion rootProject.ext.minSdkVersion
8081
targetSdkVersion rootProject.ext.targetSdkVersion
81-
versionCode 6
82+
versionCode 7
8283
versionName "4.3.0-beta.0"
8384
}
8485

@@ -165,4 +166,5 @@ task copyDownloadableDepsToLibs(type: Copy) {
165166
}
166167

167168
apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle")
169+
168170
applyNativeModulesAppBuildGradle(project)
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"app_secret": "b7e4b922-48af-4b62-b8dc-ee733d196794"
3+
}

android/app/src/main/java/com/inu/cafeteria/MainActivity.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,14 @@
33
import android.os.Bundle;
44

55
import com.facebook.react.ReactActivity;
6+
7+
// 스플래시
68
import com.zoontek.rnbootsplash.RNBootSplash;
79

810
public class MainActivity extends ReactActivity {
911
@Override
1012
protected void onCreate(Bundle savedInstanceState) {
13+
// 스플래시 띄웁니다.
1114
RNBootSplash.init(R.drawable.splash_background, MainActivity.this);
1215

1316
super.onCreate(savedInstanceState);

android/app/src/main/java/com/inu/cafeteria/MainApplication.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@
1414
import java.lang.reflect.Method;
1515
import java.util.List;
1616

17+
// 코드푸시
18+
import com.microsoft.codepush.react.CodePush;
19+
1720
public class MainApplication extends Application implements ReactApplication {
1821

1922
private final ReactNativeHost mReactNativeHost = new ReactNativeHost(this) {
@@ -31,6 +34,11 @@ protected List<ReactPackage> getPackages() {
3134
protected String getJSMainModuleName() {
3235
return "index";
3336
}
37+
38+
@Override
39+
protected String getJSBundleFile() {
40+
return CodePush.getJSBundleFile(); // 코드푸시
41+
}
3442
};
3543

3644
@Override
Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
<resources>
1+
<resources xmlns:tools="http://schemas.android.com/tools">
22
<string name="app_name">cafeteria</string>
3-
<string name="description_splashscreen">This is a splash logo</string>
3+
4+
<string name="appCenterCrashes_whenToSendCrashes" moduleConfig="true" translatable="false">DO_NOT_ASK_JAVASCRIPT</string>
5+
<string name="appCenterAnalytics_whenToEnableAnalytics" moduleConfig="true" translatable="false">ALWAYS_SEND</string>
6+
<string name="CodePushDeploymentKey" moduleConfig="true" tools:ignore="Typos">sBtl9UhH5-wUQn0_5gSXX-7CovzQMszgaiqbE</string>
47
</resources>

android/settings.gradle

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
11
rootProject.name = 'cafeteria'
2-
apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings)
2+
3+
apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle")
4+
applyNativeModulesSettingsGradle(settings)
5+
36
include ':app'
7+
8+
// 코드푸시
9+
include ':react-native-code-push'
10+
project(':react-native-code-push').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-code-push/android/app')
11+

index.js

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,15 @@
1818
*/
1919

2020
import 'reflect-metadata'; // 이 녀석 위치가 참 중요합니다. 제일 처음에 있어야 해요!
21+
import 'react-native-gesture-handler'; // iOS 릴리즈 빌드에서 뒤로가기 버튼 뻗는 문제 해결하려면 얘가 필요해요!
2122

2223
import App from './src/presentation/App';
24+
import {name} from './app.json';
2325
import setupAxios from './src/common/utils/setupAxios';
24-
import {name as appName} from './app.json';
25-
import {AppRegistry, LogBox} from 'react-native';
26+
import {AppRegistry} from 'react-native';
27+
import ignoreWarnings from './src/common/utils/ignoreWarnings';
2628

2729
setupAxios();
30+
ignoreWarnings();
2831

29-
LogBox.ignoreLogs(['ReactNativeFiberHostComponent', 'Reanimated 2']);
30-
31-
AppRegistry.registerComponent(appName, () => App);
32+
AppRegistry.registerComponent(name, () => App);

ios/Podfile.lock

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,31 @@
11
PODS:
2+
- appcenter-analytics (4.1.0):
3+
- AppCenter/Analytics (~> 4.0)
4+
- AppCenterReactNativeShared (~> 4.0)
5+
- React-Core
6+
- appcenter-core (4.1.0):
7+
- AppCenterReactNativeShared (~> 4.0)
8+
- React-Core
9+
- appcenter-crashes (4.1.0):
10+
- AppCenter/Crashes (~> 4.0)
11+
- AppCenterReactNativeShared (~> 4.0)
12+
- React-Core
13+
- AppCenter/Analytics (4.1.1):
14+
- AppCenter/Core
15+
- AppCenter/Core (4.1.1)
16+
- AppCenter/Crashes (4.1.1):
17+
- AppCenter/Core
18+
- AppCenterReactNativeShared (4.1.0):
19+
- AppCenter/Core (= 4.1.1)
20+
- Base64 (1.1.2)
221
- boost-for-react-native (1.63.0)
322
- BVLinearGradient (2.5.6):
423
- React
24+
- CodePush (7.0.1):
25+
- Base64 (~> 1.1)
26+
- JWT (~> 3.0.0-beta.12)
27+
- React-Core
28+
- SSZipArchive (~> 2.2.2)
529
- DoubleConversion (1.1.6)
630
- FBLazyVector (0.64.0)
731
- FBReactNativeSpec (0.64.0):
@@ -12,6 +36,8 @@ PODS:
1236
- React-jsi (= 0.64.0)
1337
- ReactCommon/turbomodule/core (= 0.64.0)
1438
- glog (0.3.5)
39+
- JWT (3.0.0-beta.12):
40+
- Base64 (~> 1.1.2)
1541
- RCT-Folly (2020.01.13.00):
1642
- boost-for-react-native
1743
- DoubleConversion
@@ -320,10 +346,15 @@ PODS:
320346
- React-Core
321347
- RNVectorIcons (8.1.0):
322348
- React-Core
349+
- SSZipArchive (2.2.3)
323350
- Yoga (1.14.0)
324351

325352
DEPENDENCIES:
353+
- appcenter-analytics (from `../node_modules/appcenter-analytics/ios`)
354+
- appcenter-core (from `../node_modules/appcenter/ios`)
355+
- appcenter-crashes (from `../node_modules/appcenter-crashes/ios`)
326356
- BVLinearGradient (from `../node_modules/react-native-linear-gradient`)
357+
- CodePush (from `../node_modules/react-native-code-push`)
327358
- DoubleConversion (from `../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`)
328359
- FBLazyVector (from `../node_modules/react-native/Libraries/FBLazyVector`)
329360
- FBReactNativeSpec (from `../node_modules/react-native/React/FBReactNativeSpec`)
@@ -369,11 +400,24 @@ DEPENDENCIES:
369400

370401
SPEC REPOS:
371402
trunk:
403+
- AppCenter
404+
- AppCenterReactNativeShared
405+
- Base64
372406
- boost-for-react-native
407+
- JWT
408+
- SSZipArchive
373409

374410
EXTERNAL SOURCES:
411+
appcenter-analytics:
412+
:path: "../node_modules/appcenter-analytics/ios"
413+
appcenter-core:
414+
:path: "../node_modules/appcenter/ios"
415+
appcenter-crashes:
416+
:path: "../node_modules/appcenter-crashes/ios"
375417
BVLinearGradient:
376418
:path: "../node_modules/react-native-linear-gradient"
419+
CodePush:
420+
:path: "../node_modules/react-native-code-push"
377421
DoubleConversion:
378422
:podspec: "../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec"
379423
FBLazyVector:
@@ -456,12 +500,20 @@ EXTERNAL SOURCES:
456500
:path: "../node_modules/react-native/ReactCommon/yoga"
457501

458502
SPEC CHECKSUMS:
503+
AppCenter: cd53e3ed3563cc720bcb806c9731a12389b40d44
504+
appcenter-analytics: aa074250b2cb182d6f7d67d9c236dd4606673ab5
505+
appcenter-core: c97920e79eba2321a262d3733cb2a6f1097db539
506+
appcenter-crashes: 804ae51c5d1742ce20fdb6a68b3d06208a404ad5
507+
AppCenterReactNativeShared: 2d5a53b6cbd2fe7f63f0033e9f0a40757a4eacf5
508+
Base64: cecfb41a004124895a7bcee567a89bae5a89d49b
459509
boost-for-react-native: 39c7adb57c4e60d6c5479dd8623128eb5b3f0f2c
460510
BVLinearGradient: e3aad03778a456d77928f594a649e96995f1c872
511+
CodePush: 019289464f0ea035a461334f5d64ae88c16b1e74
461512
DoubleConversion: cf9b38bf0b2d048436d9a82ad2abe1404f11e7de
462513
FBLazyVector: 49cbe4b43e445b06bf29199b6ad2057649e4c8f5
463514
FBReactNativeSpec: b11a84d6cfbc7bf432641cd3572ad737528fb3e4
464515
glog: 73c2498ac6884b13ede40eda8228cb1eee9d9d62
516+
JWT: 9b5c05abbcc1a0e69c3c91e1655b3387fc7e581d
465517
RCT-Folly: ec7a233ccc97cc556cf7237f0db1ff65b986f27c
466518
RCTRequired: 2f8cb5b7533219bf4218a045f92768129cf7050a
467519
RCTTypeSafety: 512728b73549e72ad7330b92f3d42936f2a4de5b
@@ -497,6 +549,7 @@ SPEC CHECKSUMS:
497549
RNReanimated: b8c8004b43446e3c2709fe64b2b41072f87428ad
498550
RNScreens: c277bfc4b5bb7c2fe977d19635df6f974f95dfd6
499551
RNVectorIcons: 31cebfcf94e8cf8686eb5303ae0357da64d7a5a4
552+
SSZipArchive: 62d4947b08730e4cda640473b0066d209ff033c9
500553
Yoga: 8c8436d4171c87504c648ae23b1d81242bdf3bbf
501554

502555
PODFILE CHECKSUM: f1ef3c3816fc1e81e4740a9ab3f4adeb2526476f

ios/cafeteria.xcodeproj/project.pbxproj

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
13B07FBC1A68108700A75B9A /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB01A68108700A75B9A /* AppDelegate.m */; };
1212
13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; };
1313
13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; };
14+
2AB8AA562660E0D2000ADA61 /* AppCenter-Config.plist in Resources */ = {isa = PBXBuildFile; fileRef = 2AB8AA552660E0D2000ADA61 /* AppCenter-Config.plist */; };
1415
2ABEE90C265A7A42001D501D /* SplashScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 2ABEE90B265A7A42001D501D /* SplashScreen.storyboard */; };
1516
DCADDE0FBF346C287C261EB9 /* libPods-cafeteria-cafeteriaTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 2F8A7E043F1438196D247609 /* libPods-cafeteria-cafeteriaTests.a */; };
1617
ED6F35E606A93D4F84213F59 /* libPods-cafeteria.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 8BBA7CC4EB632E902D13C693 /* libPods-cafeteria.a */; };
@@ -37,6 +38,7 @@
3738
13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = cafeteria/Info.plist; sourceTree = "<group>"; };
3839
13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = cafeteria/main.m; sourceTree = "<group>"; };
3940
1706D53F23CD48028F7683F6 /* Roboto.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = Roboto.ttf; path = "../node_modules/native-base/Fonts/Roboto.ttf"; sourceTree = "<group>"; };
41+
2AB8AA552660E0D2000ADA61 /* AppCenter-Config.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = "AppCenter-Config.plist"; path = "cafeteria/AppCenter-Config.plist"; sourceTree = "<group>"; };
4042
2ABEE90B265A7A42001D501D /* SplashScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = SplashScreen.storyboard; path = cafeteria/SplashScreen.storyboard; sourceTree = "<group>"; };
4143
2F8A7E043F1438196D247609 /* libPods-cafeteria-cafeteriaTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-cafeteria-cafeteriaTests.a"; sourceTree = BUILT_PRODUCTS_DIR; };
4244
34C44268151FDD0A2D03DCFB /* Pods-cafeteria.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-cafeteria.release.xcconfig"; path = "Target Support Files/Pods-cafeteria/Pods-cafeteria.release.xcconfig"; sourceTree = "<group>"; };
@@ -111,6 +113,7 @@
111113
13B07FB51A68108700A75B9A /* Images.xcassets */,
112114
13B07FB61A68108700A75B9A /* Info.plist */,
113115
13B07FB71A68108700A75B9A /* main.m */,
116+
2AB8AA552660E0D2000ADA61 /* AppCenter-Config.plist */,
114117
);
115118
name = cafeteria;
116119
sourceTree = "<group>";
@@ -288,6 +291,7 @@
288291
files = (
289292
13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */,
290293
2ABEE90C265A7A42001D501D /* SplashScreen.storyboard in Resources */,
294+
2AB8AA562660E0D2000ADA61 /* AppCenter-Config.plist in Resources */,
291295
);
292296
runOnlyForDeploymentPostprocessing = 0;
293297
};
@@ -494,14 +498,15 @@
494498
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
495499
CLANG_ENABLE_MODULES = YES;
496500
CODE_SIGN_STYLE = Manual;
497-
CURRENT_PROJECT_VERSION = 6;
501+
CURRENT_PROJECT_VERSION = 8;
498502
DEVELOPMENT_TEAM = AANGG4Q668;
499503
ENABLE_BITCODE = NO;
500504
INFOPLIST_FILE = cafeteria/Info.plist;
501505
LD_RUNPATH_SEARCH_PATHS = (
502506
"$(inherited)",
503507
"@executable_path/Frameworks",
504508
);
509+
MARKETING_VERSION = 4.3.0;
505510
OTHER_LDFLAGS = (
506511
"$(inherited)",
507512
"-ObjC",
@@ -523,13 +528,14 @@
523528
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
524529
CLANG_ENABLE_MODULES = YES;
525530
CODE_SIGN_STYLE = Manual;
526-
CURRENT_PROJECT_VERSION = 6;
531+
CURRENT_PROJECT_VERSION = 8;
527532
DEVELOPMENT_TEAM = AANGG4Q668;
528533
INFOPLIST_FILE = cafeteria/Info.plist;
529534
LD_RUNPATH_SEARCH_PATHS = (
530535
"$(inherited)",
531536
"@executable_path/Frameworks",
532537
);
538+
MARKETING_VERSION = 4.3.0;
533539
OTHER_LDFLAGS = (
534540
"$(inherited)",
535541
"-ObjC",

0 commit comments

Comments
 (0)