๋ฐ์ํ ๐ฑMobile21 [Swift] SwiftUI Push Notifications(FCM) APN(APNS) ํธ์ฌ์๋ฆผ ์์ Firebase Cloud Messaging/Google Cloud Messaging(FMC/GCM) Google Cloud Messaging(GCM)์ด Firebase Cloud Messaging(FCM)์ผ๋ก ๋ณ๊ฒฝ๋์๋ค. 2021๋ ๋ถํฐ ๋ฌด๋ฃ๋ก ์ฌ์ฉํ ์ ์๋ Android, iOS ๋ฐ ์น ์ ํ๋ฆฌ์ผ์ด์ ์ฉ ๋ฉ์์ง ๋ฐ ์๋ฆผ์ ์ํ ํฌ๋ก์ค ํ๋ซํผ ํด๋ผ์ฐ๋ ์๋ฃจ์ APN/APNS(Apple Push Notification/Apple Push Notification Service) ํ์ฌ ์์ฉ ํ๋ก๊ทธ๋จ ๊ฐ๋ฐ์๊ฐ Apple ์ฅ์น์ ์ค์น๋ ์์ฉ ํ๋ก๊ทธ๋จ์ผ๋ก ์๋ฆผ ๋ฐ์ดํฐ๋ฅผ ๋ณด๋ผ ์ ์๋๋ก Apple ์์ ๋ง๋ ํ๋ซํผ ์๋ฆผ์๋น์ค APNs์์ ๋๋ฐ์ด์ค๋ก ๋ณด๋ด๊ธฐ ์ํ๋ ๋ฉ์์ง๋ฅผ ๋ฐ๊ณ , ์ด๊ณณ์์ ๋ฉ์์ง์ ์ ๋ขฐ๋๋ฅผ ๊ฒ์ฌํด์ d.. 2023. 7. 9. [Flutter] ํ๋ฌํฐ http GET, POST ์ฌ์ฉํ๊ธฐ, ์์ฒญ(Request), ์๋ต(Response) project/pubspec.yaml http: 0.12.2 ์ถ๊ฐํ๋ค. dependencies: flutter: sdk: flutter # The following adds the Cupertino Icons font to your application. # Use with the CupertinoIcons class for iOS style icons. cupertino_icons: ^0.1.3 http: 0.12.2//add dev_dependencies: flutter_test: sdk: flutter Session ์ ์ด๋ฅผ ์ํด ํด๋์ค๋ฅผ ๋ง๋ค๊ณ ๊ทธ ์์์ ํค๋ ์ฟ ํค ๋ฑ ์ ํ , ๋ฆฌ์คํฐ์ค์ ์๋ต์ ๊ฐ ์ํ์ฝ๋์ ๋ฐ๋ผ์ ์ผ๋ฟ์ ๋์ฐ๋ ๋ฑ์ ์์ ๋ถ๊ธฐ๋ฅผ ์ถ๊ฐํ๋ค. Session ํด๋์ค๋ฅผ ์์ฑํ๋ค. impor.. 2023. 7. 4. [Swift] SwiftUI Infinite ScrollView ๋ฌดํ์คํฌ๋กค๋ทฐ ๋ฐ์ดํฐ ์ถ๊ฐ๋ก๋ trainingApp.swift import SwiftUI @main struct trainingApp: App { var body: some Scene { WindowGroup { ContentView() } } } ContentView.swift import SwiftUI struct ContentView: View { @State var current: Int = 0 @State var maxCnt: Int = 0 @State var itemList: [ItemModel] = [] @State var hasMorePages:Bool = true var body: some View { GeometryReader { geometry in let columns: [GridItem] = [GridItem(.. 2021. 11. 1. [Swift] SwiftUI TabView(bottom navigation bar) + SideMenubar ์์ trainingApp.swift import SwiftUI @main struct trainingApp: App { var body: some Scene { WindowGroup { ContentView() } } } ContentView.swift import SwiftUI struct ContentView: View { @State var showMenu = false var body: some View { ZStack{ GeometryReader { geometry in let width = geometry.size.width let height = geometry.size.height if self.showMenu { MenuView() .frame(width: width / 1.5) .trans.. 2021. 11. 1. [Swift] SwiftUI KeyChain Service ์์ KeyChain Services ํค์ฒด์ธ ์๋น์ค๋? ์ฌ์ฉ์๋ฅผ ๋์ ํ์ฌ ์๋์ ๋ฐ์ดํฐ๋ฅผ ์์ ํ๊ฒ ์ ์ฅํ ์ ์์ต๋๋ค. ๋๋ถ๋ถ์ ์ฌ๋๋ค์ ์๋ง์ ์จ๋ผ์ธ ๊ณ์ ์ ๊ด๋ฆฌํ๊ณ , ์ผ๋ฐ์ ์ผ๋ก ์ฌ๋ฌ ๊ณ์ ์ ๊ฑธ์ณ ๊ฐ๋จํ ์ํธ๋ฅผ ์ฌํ์ฉํ๊ธฐ์ ์์ ํ์ง ์์ต๋๋ค. ์ด์ ๋์ํ์ฌ ํค์ฒด์ธ ์๋น์ค API๋ ์ฑ์ ํค์ฒด์ธ์ด๋ผ๋ ์ํธํ๋ ๋ฐ์ดํฐ๋ฒ ์ด์ค์ ์ฌ์ฉ์ ๋ฐ์ดํฐ์ ์์ ๋นํธ๋ฅผ ์ ์ฅํ๋ ๋ฉ์ปค๋์ฆ์ ์ ๊ณตํ์ฌ ์ด ๋ฌธ์ ๋ฅผ ํด๊ฒฐํ๋๋ฐ ๋์์ด ๋ฉ๋๋ค. ๋น๋ฐ๋ฒํธ๊ฐ ์์ ํ๊ฒ ๊ธฐ์ต๋๋ฉด ์ฌ์ฉ์๊ฐ ๋ณต์กํ ๋น๋ฐ๋ฒํธ๋ฅผ ์์ ๋กญ๊ฒ ์ ํํ ์ ์์ต๋๋ค. ๋น๋ฐ๋ฒํธ์ ๊ตญํ๋์ง ์๊ณ ์ธ์ฆ์, ํค ๋ฐ ์ ๋ขฐ ์๋น์ค๋ก ๊ด๋ฆฌํ๋ ์ํธํ ํค ๋ฐ ์ธ์ฆ์๋ ๋ณด๊ด์ด ๊ฐ๋ฅํ๋ฉฐ ์ด๊ฒ๋ค๋ฅผ ํตํด ์ฌ์ฉ์๋ ๋ณด์ ํต์ ์ ์ฐธ์ฌํ๊ณ ๋ค๋ฅธ ์ฌ์ฉ์ ๋ฐ ์ฅ์น์ ์ ๋ขฐ๋ฅผ ๊ตฌ์ถํ ์ ์์ต๋๋ค. API Com.. 2021. 10. 30. [Swift] SwiftUI WebView, WebView + javascript message handler ์์ ์ฑ์ ์ข ๋ฅ์ ๋ฐ๋ผ์ ํ์์ ์น ๋ทฐ๋ฅผ ๊ตฌํํ๋ ์ฑ๋ค์ด ์๋ค. ๋จ์ํ ๋ณด์ฌ์ฃผ๋ ์ฉ๋๋ ๊ฐ๋ฅํ๋ ํ์ด๋ธ๋ฆฌ๋ ์ฑ์ ์น๊ณผ ์ฑ์ด ์๋ก ์ํธ์์ฉํ๋๋ก ๊ตฌํ์ ๋ง์ดํ๋๋ฐ ์ผ๋ฐ ์ฌ์ฉ์๋ ์นํ๋ฉด์ ๋ณด๊ณ ์๋์ง ๋ชจ๋ฅด๋ ๊ฒ์ฒ๋ผ ๋๋ ์ ์๋ค. ๋จ์ํ ๋ณด์ฌ์ฃผ๊ธฐ๋ง ํ ์๋ ์์ง๋ง ์๋ก ์ํธ์์ฉ ํ ์๋ ํ ์ ์๋ค. 1. WebView WebView.swift import SwiftUI import WebKit struct WebView: UIViewRepresentable { var url: String func makeUIView(context: Context) -> WKWebView { guard let url = URL(string: self.url) else { return WKWebView() } let webView .. 2021. 9. 28. [Swift] SwiftUI SHA256์ ์ด์ฉํ ๊ฐ๋จํ ๋ก๊ทธ์ธ ๊ตฌํ ์์ SHA256์ ์ฌ์ฉํ์ฌ password๋ผ๋ ๋ฌธ์์ด์ ํด์ฌ๊ฐ์ ๋ง๋ ๋ค. ํ์๊ฐ์ ์ ์ฐจ๋ ์์์ผ๋ก id๋ "kim" ๊ณ ์ ์ด๊ณ password๋ "password" ์ผ๋ก ๊ณ ์ ContentView.swift import SwiftUI import CryptoKit struct FieldStyle: ViewModifier { let lightGreyColor = Color(red: 240.0/255.0, green: 240.0/255.0, blue: 240.0/255.0, opacity: 1.0) func body(content: Content) -> some View { return content .padding() .background(lightGreyColor) .cornerRadius(5.0) .padd.. 2021. 9. 28. [Swift] SwiftUI/StoryBoard LaunchScreen + Sleep ์์ ๋ฐ์น ํ๋ฉด / ์คํ๋์ ํ๋ฉด์ ์ฌ์ฉ์๊ฐ ์ ์ผ ์ฒ์ ๋ง์ฃผํ๋ ํ๋ฉด์ด๋ค. ์ฌ์ฉ์๊ฐ ๋ฉ์ธํ๋ฉด์ ๋ณด๊ธฐ์ ์ ํ์ ๋น ํ๋ฉด์ ๋ง์ฃผํ๊ฒ๋๋ค๋ฉด ํ์ฌ ์ฌ์ฉํ๋ ์ฑ์ด ๋ฐ์์ฑ์ด ์ข์ง์๋ค๋ ์ธ์์ ํด์ค ์ ์๋ค. ์ด๋ฌํ ์ด์ ๋๋ฌธ์ ๋ฐ์น ํ๋ฉด์ ๋ง๋ค์ด์ ์ฑ์ด ์คํ๋์ ๋ง์ ๋ง์ฃผํ ์ ์๋ ํ๋ฉด์ ๋ง๋ค์ด์ผํ๋ค. ๋ฐ์น ํ๋ฉด์์๋ ๋ณดํต ํด๋ผ์ด์ธํธ์์ ์ด๊ธฐ์ ์ฒ๋ฆฌํด์ผ๋ ์์ ์ด ์๊ฑฐ๋, ์๋ฒ๋ก๋ถํฐ ๋ฐ์ดํฐ๋ฅผ ๋ถ๋ฌ์ค๋ ์์ , ๋ถ๋ฌ์ค๊ณ ์ฒ๋ฆฌํ๋ ๊ณผ์ ๋ค์ด ์์ ์ ์๋๋ฐ ์ด๋ฌํ ์์ ์ ํ๋ ๋์์ ์ ์ ์ ๋ฐ์ดํฐ๊ฐ ์๋ ์ํ์์ ๋ฉ์ธํ๋ฉด์ผ๋ก ๋์ด๊ฐ์ง ์๋๋ก ํ ์ ์๋ค. ๊ณ ์ ํ๋ฉด๋ง ๋ณด์ฌ์ค ์ ์๋๋ฐ, ์ํ๋ฅผ ๋ณํํ์ฌ ํ์ํด์ฃผ๋ ๋ฐฉ๋ฒ์ ์ฐพ์ง ๋ชปํ์๋ค. ์๋ค๋ ์๊ธฐ๋ ์๋๊ฒ ๊ฐ์๋ฐ ํ์ค์น๋ ์๋ค. LaunchScreen๊ณผ Splash ๋ ๊ฐ์ง๊ฐ .. 2021. 9. 27. [Flutter] ๊ฐ๋จํ ์ฑ ๋ง๋ค๊ธฐ (provider pattern, translator(google ๋ฒ์ญ), ChuckNorris(19joke json api), jsontoclass) ChuckNorris ๋ผ๋ 19์ธ ๋๋ด์ ๋์ ธ์ฃผ๋ json api๊ฐ ์์ต๋๋ค. ๊ทธ rest api๋ฅผ ์ฌ์ฉํด์ ํ๋ฉด์ ๋ฟ๋ ค์ง๋ ๊ฐ๋จํ ์ดํ์ ๋ง๋ค์ด๋ณด๋๋ก ํ๊ฒ ์ต๋๋ค. ์ฐ์ JSON To Dart Class (JsonToDartClass)๋ฅผ ์ค์นํ์ฌ์ค๋๋ค. ์ด๋ฐ๊ฒ ํ๋ฌ๊ทธ์ธ์ผ๋ก ์๋์ง ๋ชฐ๋๋๋ฐ.. ๋งค์ฐ ์ข์ต๋๋ค!!! ์งฑ์งฑ json ํ์์ dart class ๋ก ๋ฐ๊พธ์ด์ง๋๋ค. ์ํ๋๋๋ก ๋ฐ๊พธ์ด์ง์ง ์์ ์ ์์ง๋ง ๋ช๊ฐ๋ง ์ถ๊ฐํ๋ฉด๋์ ๋ฌด์กฐ๊ฑด ์ด ๋ฐฉ์์ด ์ข์ต๋๋ค. ๋จผ์ provider, http, translator ์ด๋ ๊ฒ 3๊ฐ์ง๋ฅผ ์ถ๊ฐํด์ค๋๋ค. provider ํจํด์ ์ด์ฉํ ๊ฒ์ด๊ณ http๋ก json response๋ฅผ ๋ฐ์๊ฒ์ด๊ณ translator๋ก ์์ด๋ก๋๊ฒ์ ํ๊ธ๋ก ๋ฒ์ญํ ๊ฒ์ ๋๋ค. ํ์ผํธ๋ฆฌ์ ๋๋ค. ์ ๋ ์ฐ์ต์ฅ .. 2021. 1. 8. flutter ํ๋ก๊ทธ๋ ์ค๋ฐ progress bar circle progress bar example flutter ๊ธฐ๋ณธ ProgressBar๋ ๊ตฌ๊ธ๋งํ๋ฉด ์ฝ๊ฒ ์ฐพ์ ์ ์๋ค. ์ ๋๊ฐ์ ๊ฒฝ์ฐ ๋งค์ฐ ๊ฐ๋จํ๋ฐ ์ฌ์ฉํ ๋ Stack์ ๋ฃ์ด์ ๋งจ ์๋จ์ ์์์ฃผ๋ฉด ๋๋ค. ๊ทธ๋ฆฌ๊ณ ๋ผ์ด๋ธ๋ฌ๋ฆฌ๋ฅผ ๊ฐ์ ธ์์ ์ฌ์ฉํ๋ ๊ฒ๋ค์ด ์๋ค. flutter_spinkit ์ ์ฌ์ฉํด๋ณด๋๋ก ํ์. ๋งค์ฐ ์ฝ๊ณ ๋น ๋ฅด๊ฒ ์ ์ฉ ๊ฐ๋ฅํ๋ค. ๋จ์ ํ๋ก๊ทธ๋ ์ค ์ ๋๋ฉ์ด์ ์ธ๋ฐ LIKES๊ฐ ์ด๋ ๊ฒ ๋์ ์ค์ ๋ชฐ๋๋ค. ๋จผ์ pubspec.yaml์ ์ถ๊ฐํด์ฃผ์. dependencies: flutter: sdk: flutter # The following adds the Cupertino Icons font to your application. # Use with the CupertinoIcons class for iOS style icons. cupertin.. 2021. 1. 8. flutter secure storage, ์๋๋ก๊ทธ์ธ, android KeyStore example flutter secure storage๋ฅผ ์ฌ์ฉํ ์๋๋ก๊ทธ์ธ์ ํด๋ณด๋๋ก ํ๊ฒ ๋ค. ๊ณ์ ์ ํ๋๋ง ์ฌ์ฉํ์ง์๊ณ ์ฌ๋ฌ๊ณ์ ์ ์ฌ์ฉํ๋๋ก ํ๊ฒ ๋ค. ๋๋ฒ๊น ์ ๋ง์ด ํด๋ณด์ง ์์๋ค. ๋์ถฉ ์ด๋ฐ ์์ด๋ค ๋ผ๊ณ ๋ง, ์ด๋ ๊ฒ ์ฌ์ฉํ๋ ์์ด๋ผ๋๊ฒ๋ง ๋์ถฉ ๋ณด๊ณ ๋์ด๊ฐ๋ฉด ๋ ๊บผ๊ฐ๋ค. flutter secure storage flutter์์ ๊ฐ ํ๋ซํผ(android, ios)์ ๋ด๋ถ์ ์ฅ์(keychain or keystore)๋ฅผ ์ฌ์ฉํ ์ ์๊ฒ ํด์ฃผ๋ ๋ผ์ด๋ธ๋ฌ๋ฆฌ๋ค! iOS์์๋ ์ฌ์ฉํด๋ณด์ง ์์์ง๋ง Keychain์ด๋ผ๋ ๊ฒ์ ์ฌ์ฉํ๊ณ ์๋๊ฒ ๊ฐ๋ค. android keystore๋ ์ฌ์ฉํด๋ณธ์ ์ด ์๋ค. ์๋๋ก์ด๋๋ ๋ฃจํ ํ๊ธฐ ์ฌ์ด ์ด์์ฒด์ ์ฌ์ Shared Preference ๊ฐ์ ์ฝ๊ฒ ์ฌ์ฉํ ์ ์๋ ๋ด๋ถ ์ ์ฅ์๋ค์ ๊ฐ๋จํ ๋ฃจํ ๊ณผ์ ๋ง ๊ฑฐ์ณ๋.. 2021. 1. 7. [Flutter] provider + [Change Notifier] ๋ฅผ ์ฌ์ฉํ Provider Pattern example ์ด๋๊น์ง ๋ค์ํ BLOC ํจํด์ผ๋ก ์ฝ๋๋ฅผ ์์ฑํด๋ณด์๋ค. ํ์ง๋ง BLOC์ ๋ก์ง ๋ถํ ์ ์ํ ๋ค์์ ํด๋์ค ์์ฑ์ผ๋ก ์ธํด ๋ณต์ก์ฑ ๋ฌธ์ ๊ฐ ์๊ธฐ ๋๋ฌธ์ 2019๋ Google์์ ์ ๊ทน ์ถ์ฒํ Provider Pattern์ ์ฌ์ฉํด๋ณด๋๋ก ํ๊ฒ ๋ค. ๊ตฌ๊ธ์์ ๋ง๋ ๊ฒ์ ์๋๊ณ ์ปค๋ฎค๋ํฐ์์ ์ฌ๋ผ์จ๊ฒ์ด๋ผ๋๋ฐ ๊ตฌ๊ธ์์ ์ ๊ทน ์ถ์ฒ์ ํ ๊ฒ์ด๋ผ๊ณ ํ๋ค. ๋ํ BLOC๊ฐ ๋ค์์ ํด๋์ค๋ก ๋ณต์กํ๊ธฐ ๋๋ฌธ์ ์์ ์ฐ์ง ์๋๊ฒ์ ์๋๋ค. ์ด๋์ ๋ ๊ท๋ชจ๊ฐ ์๋ ํ๋ก์ ํธ๋ BLOCํจํด์ ์ฌ์ฉํ์ฌ ์ ํํ ๋ก์ง๋ถ๋ฆฌ๋ฅผ ํ๋๊ฒ์ด ๋ถ๋ช ํ ๋ ์ข์๊ฒ์ผ๋ก ๋ณด์ธ๋ค. ์๊ท๋ชจ์ Provider, ์ค๊ท๋ชจ์ Provider, Bloc, ๋๊ท๋ชจ์ Bloc ๊ฐ ๋ง์ง ์์๊น ์ถ๋ค. ํธ๋ฆฌ์ด๋ค. main.dart import 'package:flutter/founda.. 2021. 1. 6. [Flutter] ๊ธฐ์ด๊ฐ ๋๋ StreamBuilder BLOC ํจํด, StreamSubscription, yield example ์ ๋ฒ์๋ Cubit๋ฅผ ์ฌ์ฉํ์ฌ BLOC ํจํด์ ์ ์ํด๋ณด์๋ค. ํคํ๊ฒ ๋์ ์ ๋ณด์ด๋ Cubit๋ก ํ์ ๋์๋ง ๊น๋ํ๊ฒ ์ต์ ๋น ํ์ง๋ง ์ญ์๋ BLOC๋ ๋ณต์กํ๋ค. ์ด๋ฒ์ ์์ฑํ๋ StreamBuilder๋ฅผ ์ฌ์ฉํ BLOC ํจํด ๋ํ ๋ณต์กํ๋ค. ๊ฒฐ๊ตญ ํ๋์ ๊ธฐ๋ฅ์ ๋ง๋ค๋ ค๋ฉด ํด๋์ค๋ฅผ ์ต์ 3, 4๊ฐ๋ฅผ ๋ง๋ค์ด์ผํ๋ ๋ฌธ์ ์ด๋ค. ํ์ผํธ๋ฆฌ์ด๋ค. ๋ก์ง์ ๋๋๊ณ , ์ด๋ฒคํธ์ ์ํ๋ฅผ ๊ด๋ฆฌํ๋ค. main.dart import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:flutter_bloc_with_stream/ticke.. 2021. 1. 6. [Flutter] Cubit๋ฅผ ์ฌ์ฉํ BLOC ํจํด, Bloc.observer example CUBIT๋ฅผ ์ฌ์ฉํ BLOC ํจํด Bloc.observer๋ฅผ BlocObserver๋ฅผ ์์ํ class๋ก ์ด๊ธฐํํด์ onChange๋ฅผ overrideํด์ ์ํ๊ฐ ๋ณํ ๋๋ง๋ค print ํ ๊ฒ์ด๊ณ navigation push ๋ ํด๋ณผ ๊ฒ ์ ๋๋ค. pubspec.yaml dependencies: flutter: sdk: flutter # The following adds the Cupertino Icons font to your application. # Use with the CupertinoIcons class for iOS style icons. cupertino_icons: ^1.0.0 bloc: ^6.1.0 //์ถ๊ฐ flutter_bloc: ^6.1.0 //์ถ๊ฐ counter_observer.dart .. 2021. 1. 4. [Flutter] fluro package (navigation ์ด๋, route, transition) sample code fluro ๋ฅผ ์ฌ์ฉํ์ฌ route๋ฅผ ๊ด๋ฆฌํ ์ ์๋ค. arguments ์ ํ๋๊ฒ๋ ๊ฐ๋ฅํ๊ณ transitionType์ ํตํด ์ํ๋ ์ ๋๋ฉ์ด์ ์ ๋ณด์ด๊ฒ, ์๋ณด์ด๊ฒ ํ ์๋ ์๋ค. pub.dev/packages/fluro fluro | Flutter Package Fluro is a Flutter routing library that adds flexible routing options like wildcards, named parameters and clear route definitions. pub.dev code sample ์ด๋ค. import 'package:flutter/material.dart'; import 'package:fluro/fluro.dart'; Handler _TestNativeH.. 2020. 12. 22. [Swift] Optional ๊ฐ๋ ์ ๋ฆฌ (๋ณ์๋ค์ !์ ?) optional ์์ Optional ๊ฐ๋ ์ ๋ฆฌ ์ ํ์ ์ธ ์ด๋ผ๋ ๋ป์๊ฐ์ง optional ์ swift์์ ๋ฌด์์ผ๊น์? ๋ง์ฝ ์นํจ์ ๋ฐฐ๋ฌ์ํค๋ ์ํฉ์ ์๊ฐํด๋ณผ๊น์? ์ผ๋จ ์ฝ์ด๋ณผ๊ฒ์! ๋ฐฐ๋ฌ์ดํ์์ XCODE๋ผ๋ ์นํจ ๊ฐ๊ฒ๋ฅผ ํด๋ฆญํ๊ณ ์นํจ ๋ฉ๋ด๋ฅผ ์ ํํฉ๋๋ค. [์ฝ๋์์ฑ์ค] ์์ง์ ๋ง ์ต์ ์ ๊ณ ๋ฅด์ง ์์ ์ํ์ฌ์ ๋ง์ ์ต์ 1๊ฐ๋ฅผ ๊ณจ๋ผ์ฃผ์ธ์! ๋ผ๋ ๊ฒฝ๊ณ ๋ฌธ๊ตฌ๊ฐ ๋ณด์ ๋๋ค! [nil ๊ฒฝ๊ณ ] ํ์ง๋ง ๋ง ์ต์ ์ ๊ณ ๋ฅด์ง ์์๋ ์ฃผ๋ฌธ์ ๊ฐ๋ฅํ๊ฒ ๋์ด์์ต๋๋ค. ๋ง์ฝ ๋ง์ต์ ์ ๊ณ ๋ฅด์ง ์์ผ๋ฉด ๊ฐ๊ฒ์์๋ ์ด๋ค ๋ง์ผ๋ก ์ค๊น? ํธ๊ธฐ์ฌ์ ์๋ฌด๋ง๋ ๊ณ ๋ฅด์ง ์๊ณ ์ฃผ๋ฌธ์ ํ๊ฒ ๋ฉ๋๋ค. [nil ๊ฒฝ๊ณ ๋ฅผ ๋ณด์์ง๋ง ์คํ] ์ฃผ๋ฌธ์๊ฐ ๊ฐ๊ฒ๋ก ์ ๋ฌ๋ฉ๋๋ค. [์ปดํ์ผ] ๊ฐ๊ฒ๋ ์ฃผ๋ฌธ์ ๋ฐ์๊ณ ์ฃผ๋ฌธ์๋ฅผ ์ฝ๊ณ ์์๋๋ก ์กฐ๋ฆฌ๋ฅผ ํฉ๋๋ค. [Application ์คํ๋จ] ์์๋๋ก ์กฐ๋ฆฌํ.. 2020. 12. 16. [Flutter] flutter intro(splash) -> login page timer sample code flutter_example/widgets ํจํค์ง๋ฅผ ํ๋ ๋ง๋ญ๋๋ค. main.dart import 'dart:async'; import 'package:flutter/material.dart'; import 'package:flutter_example/widgets/introPage.dart'; import 'package:flutter_example/widgets/loginPage.dart'; void main() { runApp(MyApp()); } class MyApp extends StatelessWidget { @override Widget build(BuildContext context) { return MaterialApp( debugShowCheckedModeBanner: false, ti.. 2020. 10. 26. [Flutter] Flutter ํ๋ซํผ ์ฑ๋์ ์ด์ฉํด์ Android ์ฝ๋ ํธ์ถํ๊ธฐ (MethodChannel) ์์ฑ์ Paltform channel language ์ฒดํฌ ๋ชจ๋ ํด์ ํ๊ธฐ * ํ๋ซํผ ์ฑ๋์ ์ฌ์ฉํ๋๋ฐ ์์ด์ ์ค์ํ๊ฒ์ Platform channel language๋ฅผ ์ด๋ค๊ฒ์ ์ฌ์ฉํ ๊ฒ์ธ์ง์ด๋ค. Include Swift support for iOS code ๋ฅผ ์ ํํ ์ ์ด ์๋๋ฐ Swift ์ฝ๋๋ฅผ ์์ฑํ ์ฌ๋์ด ์์ด์ ๋ญํจ๋ฅผ ๋ณธ ์ ์ด ์๋ค. ํ๋ซํผ ์ฑ๋์ ์ฌ์ฉํ๋ ค๋ฉด java, kotlin, Objective-c, swift ๋ชจ๋ ์์งํด ๋์ด์ผ ํ๋ค. project/lib/main.dart import 'dart:async'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; class PlatformChannel.. 2020. 10. 25. [Flutter] Flutter ์๋ช ์ฃผ๊ธฐ Sample Code main.dart import 'package:flutter/material.dart'; void main() => runApp(TestApp()); class TestApp extends StatelessWidget { TestApp() { print('TestApp TestApp() start'); print('TestApp TestApp() done'); } @override Widget build(BuildContext context) { print('TestApp build() start'); print('TestApp build() done'); return MaterialApp( title: 'StatefulWidget LifecycleApp', home: _FirstStatefulWidge.. 2020. 10. 25. [Android] altbeacon ์๋๋ก์ด๋ ๋น์ฝ ์ฐ๋ํ๊ธฐ ์๋๋ก์ด๋ ๋น์ฝ(์ํธ๋น์ฝ) ๊ฐ๋จํ๊ฒ ์ฌ์ฉํด๋ณด๊ธฐ ์๋ฎฌ๋ ์ดํฐ๋ก๋ ์๋ํ์ง ์์ผ๋ ๊ผญ ์๋๋ก์ด๋ ๊ธฐ๊ธฐ๋ฅผ ์ฌ์ฉ ์๋๋ก์ด๋ ์คํ๋์ค ์ ์ผ ์ข์๋จ์ ํจํค์ง์ต์คํ๋ก๋ฌ๋ฅผ Project๋ก ๋ณ๊ฒฝ {๋์ project}/app/src/main/AndroidMainfest.xmlํผ๋ฏธ์ ์์ฑ ์ฑ ์ด์ฉ์ ์ด์ฉ์์๊ฒ ACCESS-FINE_LOCATION ๊ถํ ํ๋ฝ์์ด์ผํจ android-beacon-library-2.16.2.arr ํ์ผ ๋ค์ด๋ก๋altbeacon arr ํ์ผ https://altbeacon.github.io/android-beacon-library/download.htmlAndroid Beacon Libraryaltbeacon.github.io {๋์ project}/app/libs < android-beacon-l.. 2020. 6. 14. [Android] SQLite, SQL (SQLiteOpenHelper) SQLiteOpenHelper ์ ์ด์ฉํ์ฌ ๋ง์์ง๋ ๋ฐ์ดํฐ๋ค์ ์ ์ฅํ๋ค. ๋ฐ์ดํฐ๋ฅผ ์ ์ฅํ์ฌ ์ ์งํ๊ธฐ๋๋ฌธ์ ์ฑ์ ๊บผ๋ ๋ฐ์ดํฐ๊ฐ ์ง์์ง์ง์๋๋ค. (์ฑ ์ญ์ ์๋ ์ง์์ง๋ค.) package kr.co.hanbit.myapplication2; import android.content.Context; import android.database.Cursor; import android.database.sqlite.SQLiteDatabase; import android.database.sqlite.SQLiteOpenHelper; import androidx.annotation.Nullable; import java.util.ArrayList; public class SQLiteHelper { private static.. 2020. 1. 4. ์ด์ 1 ๋ค์ ๋ฐ์ํ