Skip to content

Commit

Permalink
chore: xcode 싱크맞추기
Browse files Browse the repository at this point in the history
  • Loading branch information
raymondanythings committed Sep 7, 2024
1 parent c566939 commit f20e93e
Show file tree
Hide file tree
Showing 68 changed files with 333 additions and 498 deletions.
Binary file added .DS_Store
Binary file not shown.
Empty file removed .turbo/cookies/1.cookie
Empty file.
Empty file removed .turbo/cookies/10.cookie
Empty file.
Empty file removed .turbo/cookies/11.cookie
Empty file.
Empty file removed .turbo/cookies/12.cookie
Empty file.
Empty file removed .turbo/cookies/13.cookie
Empty file.
Empty file removed .turbo/cookies/14.cookie
Empty file.
Empty file removed .turbo/cookies/15.cookie
Empty file.
Empty file removed .turbo/cookies/2.cookie
Empty file.
Empty file removed .turbo/cookies/3.cookie
Empty file.
Empty file removed .turbo/cookies/4.cookie
Empty file.
Empty file removed .turbo/cookies/5.cookie
Empty file.
Empty file removed .turbo/cookies/6.cookie
Empty file.
Empty file removed .turbo/cookies/7.cookie
Empty file.
Empty file removed .turbo/cookies/8.cookie
Empty file.
Empty file removed .turbo/cookies/9.cookie
Empty file.
93 changes: 0 additions & 93 deletions .turbo/daemon/c3ff5c1f3504f7b4-turbo.log.2024-09-06

This file was deleted.

Binary file added apps/.DS_Store
Binary file not shown.
4 changes: 4 additions & 0 deletions apps/app/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// https://docs.expo.dev/guides/using-eslint/
module.exports = {
extends: 'expo',
};
3 changes: 3 additions & 0 deletions apps/app/.npmrccc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
shamefully-hoist=true
node-linker=hoisted
strict-peer-dependencies=false
27 changes: 0 additions & 27 deletions apps/app/App.tsx

This file was deleted.

9 changes: 1 addition & 8 deletions apps/app/app.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,5 @@ export default ({ config }: ConfigContext): ConfigContext["config"] => ({
usesNonExemptEncryption: false,
},
},
plugins: [
[
"expo-font",
{
fonts: ["@/assets/fonts/Helvetica.ttf"],
},
],
],
plugins: [],
});
7 changes: 3 additions & 4 deletions apps/app/_layout.tsx → apps/app/app/_layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,20 @@ import {
DefaultTheme,
ThemeProvider,
} from "@react-navigation/native";
import { Stack } from "expo-router";

import "react-native-reanimated";

import { useColorScheme } from "@/hooks/useColorScheme";
import { SplashScreen } from "@/components/splash";
import { useFonts } from "expo-font";
import { Stack } from "expo-router";

export default function RootLayout() {
export default function App() {
const colorScheme = useColorScheme();

return (
<ThemeProvider value={colorScheme === "dark" ? DarkTheme : DefaultTheme}>
<SplashScreen isLoaded={true}>
<Stack screenOptions={{ headerShown: false }}>
<Stack screenOptions={{ headerShown: false }} initialRouteName="index">
<Stack.Screen name="index" />
</Stack>
</SplashScreen>
Expand Down
29 changes: 18 additions & 11 deletions apps/app/app/screens/login/index.tsx → apps/app/app/index.tsx
Original file line number Diff line number Diff line change
@@ -1,19 +1,17 @@
import {
SafeAreaView,
useSafeAreaInsets,
} from "react-native-safe-area-context";
import { SafeAreaView } from "react-native-safe-area-context";
import { createWebView, postMessageSchema } from "@webview-bridge/react-native";
import { useEffect } from "react";
import { PermissionsAndroid, Platform } from "react-native";
import { useEffect, useState } from "react";
import { PermissionsAndroid, Platform, Text, View } from "react-native";
import { PERMISSIONS } from "react-native-permissions";
import { z } from "zod";
import { appBridge } from "@layer/shared";
import { getKeyHashAndroid } from "@react-native-kakao/core";

const schema = postMessageSchema({
getBackgroundColor: z.string(),
});

const { WebView, postMessage } = createWebView({
const { WebView, linkWebMethod } = createWebView({
bridge: appBridge,
debug: true,
postMessageSchema: schema,
Expand All @@ -22,6 +20,7 @@ const { WebView, postMessage } = createWebView({
export interface BridgeEvent {
body: Body;
type: string;
data?: string;
}

export interface Body {
Expand All @@ -30,8 +29,9 @@ export interface Body {
method: string;
}

export function LoginPage() {
const insets = useSafeAreaInsets();
export default function LoginPage() {
const [color, setColor] = useState("white");
const [text, setText] = useState<string[]>(["FIRST"]);

const customUserAgent = "customUserAgent";
useEffect(() => {
Expand All @@ -58,8 +58,9 @@ export function LoginPage() {
}
}
};

return (
<SafeAreaView style={{ flex: 1, backgroundColor: "white" }}>
<SafeAreaView style={{ flex: 1, backgroundColor: color }}>
<WebView
userAgent={customUserAgent}
originWhitelist={["*"]}
Expand All @@ -69,6 +70,8 @@ export function LoginPage() {
contentInsetAdjustmentBehavior="never"
scrollEnabled
allowsInlineMediaPlayback
javaScriptEnabled
domStorageEnabled
mediaCapturePermissionGrantType="grantIfSameHostElsePrompt"
bounces={false}
source={{
Expand All @@ -77,8 +80,12 @@ export function LoginPage() {
onMessage={(event) => {
const data = event.nativeEvent.data;
if (data) {
setText((prev) => [...prev, data]);
const param = JSON.parse(data) as BridgeEvent;
console.log(param, "<<<data");

if (param?.data) {
setColor(param?.data);
}
}
}}
/>
Expand Down
17 changes: 0 additions & 17 deletions apps/app/app/stack/stack.tsx

This file was deleted.

8 changes: 0 additions & 8 deletions apps/app/index.js

This file was deleted.

Loading

0 comments on commit f20e93e

Please sign in to comment.