Skip to content

Commit 293442f

Browse files
authored
Merge pull request #3 from gw-lim/feat/api
feat: api 기초 구현 & 환경변수 및 스플래시 화면 설정
2 parents 428e8a1 + 38539d1 commit 293442f

25 files changed

+418
-29
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ buck-out/
5757
*.jsbundle
5858

5959
# Environment Variable
60+
env
6061
.env
6162
.env*.local
6263

android/app/build.gradle

+12
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ apply plugin: "com.android.application"
22
apply plugin: "org.jetbrains.kotlin.android"
33
apply plugin: "com.facebook.react"
44

5+
56
/**
67
* This is the configuration block to customize your React Native Android app.
78
* By default you don't need to apply any configuration, just uncomment the lines you need.
@@ -72,6 +73,15 @@ def enableProguardInReleaseBuilds = false
7273
*/
7374
def jscFlavor = 'org.webkit:android-jsc:+'
7475

76+
project.ext.envConfigFiles = [
77+
debug: "env/.env.development",
78+
release: "env/.env.production",
79+
anothercustombuild: ".env",
80+
]
81+
82+
apply from: project(':react-native-config').projectDir.getPath() + "/dotenv.gradle"
83+
84+
7585
android {
7686
ndkVersion rootProject.ext.ndkVersion
7787
buildToolsVersion rootProject.ext.buildToolsVersion
@@ -110,6 +120,8 @@ android {
110120
dependencies {
111121
// The version of react-native is set by the React Native Gradle Plugin
112122
implementation("com.facebook.react:react-android")
123+
implementation project(':react-native-config')
124+
implementation project(':react-native-splash-screen')
113125

114126
if (hermesEnabled.toBoolean()) {
115127
implementation("com.facebook.react:hermes-android")

android/app/src/main/java/com/matchoom/MainActivity.kt

+9
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
11
package com.matchoom
22

3+
import android.os.Bundle;
4+
35
import com.facebook.react.ReactActivity
46
import com.facebook.react.ReactActivityDelegate
57
import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.fabricEnabled
68
import com.facebook.react.defaults.DefaultReactActivityDelegate
79

10+
import org.devio.rn.splashscreen.SplashScreen;
11+
812
class MainActivity : ReactActivity() {
913

1014
/**
@@ -19,4 +23,9 @@ class MainActivity : ReactActivity() {
1923
*/
2024
override fun createReactActivityDelegate(): ReactActivityDelegate =
2125
DefaultReactActivityDelegate(this, mainComponentName, fabricEnabled)
26+
27+
override fun onCreate(savedInstanceState: Bundle?) {
28+
SplashScreen.show(this)
29+
super.onCreate(null)
30+
}
2231
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
package com.matchoom;
2+
3+
import android.content.Intent;
4+
import android.os.Bundle;
5+
import androidx.appcompat.app.AppCompatActivity;
6+
7+
class SplashActivity : AppCompatActivity() {
8+
9+
override fun onCreate(savedInstanceState: Bundle?) {
10+
super.onCreate(savedInstanceState);
11+
val intent = Intent(this, MainActivity::class.java);
12+
startActivity(intent)
13+
finish()
14+
}
15+
}
Loading
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
3+
android:orientation="vertical"
4+
android:layout_width="match_parent"
5+
android:layout_height="match_parent"
6+
android:background="#121212">
7+
<ImageView
8+
android:layout_width="300dp"
9+
android:layout_height="300dp"
10+
android:src="@drawable/launch_screen"
11+
android:scaleType="fitCenter"
12+
android:tileMode="disabled"
13+
android:layout_centerInParent="true" />
14+
</RelativeLayout>

android/gradle.properties

+1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ org.gradle.jvmargs=-Xmx2048m -XX:MaxMetaspaceSize=512m
2121
# Android operating system, and which are packaged with your app's APK
2222
# https://developer.android.com/topic/libraries/support-library/androidx-rn
2323
android.useAndroidX=true
24+
android.enableJetifier=true
2425

2526
# Use this property to specify which architecture you want to build.
2627
# You can also override it from the CLI using

android/settings.gradle

+4
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,7 @@ extensions.configure(com.facebook.react.ReactSettingsExtension){ ex -> ex.autoli
44
rootProject.name = 'matchoom'
55
include ':app'
66
includeBuild('../node_modules/@react-native/gradle-plugin')
7+
include ':react-native-config'
8+
project(':react-native-config').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-config/android')
9+
include ':react-native-splash-screen'
10+
project(':react-native-splash-screen').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-splash-screen/android')

ios/Config.xcconfig

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
//
2+
// Config.xcconfig
3+
// matchoom
4+
//
5+
// Created by Geon Lim on 9/30/24.
6+
//
7+
8+
// Configuration settings file format documentation can be found at:
9+
// https://help.apple.com/xcode/#/dev745c5c974
10+
#include? "tmp.xcconfig"

ios/Podfile.lock

+14
Original file line numberDiff line numberDiff line change
@@ -1237,8 +1237,14 @@ PODS:
12371237
- ReactCommon/turbomodule/bridging
12381238
- ReactCommon/turbomodule/core
12391239
- Yoga
1240+
- react-native-config (1.5.3):
1241+
- react-native-config/App (= 1.5.3)
1242+
- react-native-config/App (1.5.3):
1243+
- React-Core
12401244
- react-native-safe-area-context (4.11.0):
12411245
- React-Core
1246+
- react-native-splash-screen (3.3.0):
1247+
- React-Core
12421248
- React-nativeconfig (0.75.3)
12431249
- React-NativeModulesApple (0.75.3):
12441250
- glog
@@ -1564,7 +1570,9 @@ DEPENDENCIES:
15641570
- React-logger (from `../node_modules/react-native/ReactCommon/logger`)
15651571
- React-Mapbuffer (from `../node_modules/react-native/ReactCommon`)
15661572
- React-microtasksnativemodule (from `../node_modules/react-native/ReactCommon/react/nativemodule/microtasks`)
1573+
- react-native-config (from `../node_modules/react-native-config`)
15671574
- react-native-safe-area-context (from `../node_modules/react-native-safe-area-context`)
1575+
- react-native-splash-screen (from `../node_modules/react-native-splash-screen`)
15681576
- React-nativeconfig (from `../node_modules/react-native/ReactCommon`)
15691577
- React-NativeModulesApple (from `../node_modules/react-native/ReactCommon/react/nativemodule/core/platform/ios`)
15701578
- React-perflogger (from `../node_modules/react-native/ReactCommon/reactperflogger`)
@@ -1671,8 +1679,12 @@ EXTERNAL SOURCES:
16711679
:path: "../node_modules/react-native/ReactCommon"
16721680
React-microtasksnativemodule:
16731681
:path: "../node_modules/react-native/ReactCommon/react/nativemodule/microtasks"
1682+
react-native-config:
1683+
:path: "../node_modules/react-native-config"
16741684
react-native-safe-area-context:
16751685
:path: "../node_modules/react-native-safe-area-context"
1686+
react-native-splash-screen:
1687+
:path: "../node_modules/react-native-splash-screen"
16761688
React-nativeconfig:
16771689
:path: "../node_modules/react-native/ReactCommon"
16781690
React-NativeModulesApple:
@@ -1768,7 +1780,9 @@ SPEC CHECKSUMS:
17681780
React-logger: 4072f39df335ca443932e0ccece41fbeb5ca8404
17691781
React-Mapbuffer: 714f2fae68edcabfc332b754e9fbaa8cfc68fdd4
17701782
React-microtasksnativemodule: 4943ad8f99be8ccf5a63329fa7d269816609df9e
1783+
react-native-config: 8f7283449bbb048902f4e764affbbf24504454af
17711784
react-native-safe-area-context: 851c62c48dce80ccaa5637b6aa5991a1bc36eca9
1785+
react-native-splash-screen: 4312f786b13a81b5169ef346d76d33bc0c6dc457
17721786
React-nativeconfig: 4a9543185905fe41014c06776bf126083795aed9
17731787
React-NativeModulesApple: 0506da59fc40d2e1e6e12a233db5e81c46face27
17741788
React-perflogger: 3bbb82f18e9ac29a1a6931568e99d6305ef4403b

ios/matchoom.xcodeproj/project.pbxproj

+5-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@
4040
13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = matchoom/main.m; sourceTree = "<group>"; };
4141
13B07FB81A68108700A75B9A /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = PrivacyInfo.xcprivacy; path = matchoom/PrivacyInfo.xcprivacy; sourceTree = "<group>"; };
4242
2740C55DD91DB3F41B0A0C04 /* Pods-matchoom.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-matchoom.release.xcconfig"; path = "Target Support Files/Pods-matchoom/Pods-matchoom.release.xcconfig"; sourceTree = "<group>"; };
43-
448E90205ADC8F04617FABFA /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; includeInIndex = 1; name = PrivacyInfo.xcprivacy; path = matchoom/PrivacyInfo.xcprivacy; sourceTree = "<group>"; };
43+
3854CDBA2CAA670400B6F6E1 /* Config.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Config.xcconfig; sourceTree = "<group>"; };
44+
448E90205ADC8F04617FABFA /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xml; name = PrivacyInfo.xcprivacy; path = matchoom/PrivacyInfo.xcprivacy; sourceTree = "<group>"; };
4445
6205E24B6370851EDC808607 /* libPods-matchoom-matchoomTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-matchoom-matchoomTests.a"; sourceTree = BUILT_PRODUCTS_DIR; };
4546
81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = LaunchScreen.storyboard; path = matchoom/LaunchScreen.storyboard; sourceTree = "<group>"; };
4647
A6DC348D2D2CBF569726AD48 /* Pods-matchoom.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-matchoom.debug.xcconfig"; path = "Target Support Files/Pods-matchoom/Pods-matchoom.debug.xcconfig"; sourceTree = "<group>"; };
@@ -123,6 +124,7 @@
123124
83CBB9F61A601CBA00E9B192 = {
124125
isa = PBXGroup;
125126
children = (
127+
3854CDBA2CAA670400B6F6E1 /* Config.xcconfig */,
126128
13B07FAE1A68108700A75B9A /* matchoom */,
127129
832341AE1AAA6A7D00B99B32 /* Libraries */,
128130
00E356EF1AD99517003FC87E /* matchoomTests */,
@@ -532,6 +534,7 @@
532534
};
533535
83CBBA201A601CBA00E9B192 /* Debug */ = {
534536
isa = XCBuildConfiguration;
537+
baseConfigurationReference = 3854CDBA2CAA670400B6F6E1 /* Config.xcconfig */;
535538
buildSettings = {
536539
ALWAYS_SEARCH_USER_PATHS = NO;
537540
CC = "";
@@ -616,6 +619,7 @@
616619
};
617620
83CBBA211A601CBA00E9B192 /* Release */ = {
618621
isa = XCBuildConfiguration;
622+
baseConfigurationReference = 3854CDBA2CAA670400B6F6E1 /* Config.xcconfig */;
619623
buildSettings = {
620624
ALWAYS_SEARCH_USER_PATHS = NO;
621625
CC = "";
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<Scheme
3+
LastUpgradeVersion = "1530"
4+
version = "1.7">
5+
<BuildAction
6+
parallelizeBuildables = "YES"
7+
buildImplicitDependencies = "YES"
8+
buildArchitectures = "Automatic">
9+
<PreActions>
10+
<ExecutionAction
11+
ActionType = "Xcode.IDEStandardExecutionActionsCore.ExecutionActionType.ShellScriptAction">
12+
<ActionContent
13+
title = "Run Script"
14+
scriptText = "# Type a script or drag a script file from your workspace to insert its path.&#10;cp &quot;${PROJECT_DIR}/../env/.env.development&quot; &quot;${PROJECT_DIR}/../.env&quot;&#10;&#10;&quot;${SRCROOT}/../node_modules/react-native-config/ios/ReactNativeConfig/BuildXCConfig.rb&quot; &quot;${SRCROOT}/..&quot; &quot;${SRCROOT}/tmp.xcconfig&quot;&#10;&quot;${SRCROOT}/../node_modules/react-native-config/ios/ReactNativeConfig/BuildXCConfig.rb&quot; &quot;${SRCROOT}/..&quot; &quot;${SRCROOT}/tmp.xcconfig&quot;&#10;">
15+
<EnvironmentBuildable>
16+
<BuildableReference
17+
BuildableIdentifier = "primary"
18+
BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
19+
BuildableName = "matchoom.app"
20+
BlueprintName = "matchoom"
21+
ReferencedContainer = "container:matchoom.xcodeproj">
22+
</BuildableReference>
23+
</EnvironmentBuildable>
24+
</ActionContent>
25+
</ExecutionAction>
26+
</PreActions>
27+
<BuildActionEntries>
28+
<BuildActionEntry
29+
buildForTesting = "YES"
30+
buildForRunning = "YES"
31+
buildForProfiling = "YES"
32+
buildForArchiving = "YES"
33+
buildForAnalyzing = "YES">
34+
<BuildableReference
35+
BuildableIdentifier = "primary"
36+
BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
37+
BuildableName = "matchoom.app"
38+
BlueprintName = "matchoom"
39+
ReferencedContainer = "container:matchoom.xcodeproj">
40+
</BuildableReference>
41+
</BuildActionEntry>
42+
</BuildActionEntries>
43+
</BuildAction>
44+
<TestAction
45+
buildConfiguration = "Debug"
46+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
47+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
48+
shouldUseLaunchSchemeArgsEnv = "YES"
49+
shouldAutocreateTestPlan = "YES">
50+
</TestAction>
51+
<LaunchAction
52+
buildConfiguration = "Debug"
53+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
54+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
55+
launchStyle = "0"
56+
useCustomWorkingDirectory = "NO"
57+
ignoresPersistentStateOnLaunch = "NO"
58+
debugDocumentVersioning = "YES"
59+
debugServiceExtension = "internal"
60+
allowLocationSimulation = "YES">
61+
<BuildableProductRunnable
62+
runnableDebuggingMode = "0">
63+
<BuildableReference
64+
BuildableIdentifier = "primary"
65+
BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
66+
BuildableName = "matchoom.app"
67+
BlueprintName = "matchoom"
68+
ReferencedContainer = "container:matchoom.xcodeproj">
69+
</BuildableReference>
70+
</BuildableProductRunnable>
71+
</LaunchAction>
72+
<ProfileAction
73+
buildConfiguration = "Release"
74+
shouldUseLaunchSchemeArgsEnv = "YES"
75+
savedToolIdentifier = ""
76+
useCustomWorkingDirectory = "NO"
77+
debugDocumentVersioning = "YES">
78+
<BuildableProductRunnable
79+
runnableDebuggingMode = "0">
80+
<BuildableReference
81+
BuildableIdentifier = "primary"
82+
BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
83+
BuildableName = "matchoom.app"
84+
BlueprintName = "matchoom"
85+
ReferencedContainer = "container:matchoom.xcodeproj">
86+
</BuildableReference>
87+
</BuildableProductRunnable>
88+
</ProfileAction>
89+
<AnalyzeAction
90+
buildConfiguration = "Debug">
91+
</AnalyzeAction>
92+
<ArchiveAction
93+
buildConfiguration = "Release"
94+
revealArchiveInOrganizer = "YES">
95+
</ArchiveAction>
96+
</Scheme>

0 commit comments

Comments
 (0)