ios

    [iOS] Firebase Cloud Messaging - APN

    ๊ธฐ๋ก์šฉ 1. firebase project ๋งŒ๋“ค๊ธฐ https://console.firebase.google.com/u/3/?hl=ko 2. iOS ์•ฑ ์ถ”๊ฐ€ํ•˜๊ธฐ iOS๋ฅผ ๋ˆŒ๋Ÿฌ ์•ฑ์„ ์ถ”๊ฐ€ํ•ฉ๋‹ˆ๋‹ค ๊ทธ๋Ÿฌ๋ฉด ์•ฑ ๋“ฑ๋ก ํ™”๋ฉด์ด ๋‚˜์˜ค๋Š”๋ฐ ์ด๋•Œ Apple ๋ฒˆ๋“ค ID๋ฅผ ์ž…๋ ฅํ•ด์•ผ ํ•จ ์š”๊ฑด ์–ด๋Š ๊ฒƒ์ด๋ƒ๋ฉด ์˜ค๋ฅธ์ชฝ ์—‘์Šค์ฝ”๋“œ ์ฐฝ์—์„œ!! Signing & Capabilities ์•ˆ์— ์žˆ๋Š” Bundle Identifier ์ž…๋‹ˆ๋‹ค ๋‚˜๋จธ์ง€ ์•ฑ ๋‹‰๋„ค์ž„, App Store ID๋Š” ์„ ํƒ์‚ฌํ•ญ์ด๋‹ˆ ํŒจ์Šคํ• ๊ฒŒ์š” ๊ทธ๋Ÿฌ๋ฉด 2๋ฒˆ ๋‹จ๊ณ„ ๊ตฌ์„ฑ ํŒŒ์ผ ๋‹ค์šด๋กœ๋“œ๊ฐ€ ๋‚˜์˜ค๊ณ , GoogleService-Info.plist ๋‹ค์šด๋กœ๋“œ ๋ฐ›์•„์„œ Xcode ํ”„๋กœ์ ํŠธ ์•ˆ์— ์ถ”๊ฐ€ํ•ด ์ฃผ์„ธ์š” ์ €๋Š” ์œ„ ์‚ฌ์ง„์ฒ˜๋Ÿผ Plists๋ผ๋Š” ํด๋”๋ฅผ ๋”ฐ๋กœ ๋งŒ๋“ค์–ด ์—ฌ๊ธฐ์— Info.plist์™€ ํ•จ๊ป˜ ๋„ฃ์–ด ๋‘..

    [iOS15 ๋Œ€์‘] NavigationBar/Tabbar background color Transparent ์ด์Šˆ ํ•ด๊ฒฐ

    iOS15๋กœ ๋„˜์–ด์˜ค๋ฉด์„œ.,,, ๋„ค๋น„๊ฒŒ์ด์…˜๋ฐ”๋‚˜ ํƒญ๋ฐ”๊ฐ€ ์žˆ๋Š” ๋ทฐ์—์„œ ํ™”๋ฉด ์ „ํ™˜์„ ๋•Œ๋ฆฌ๋ฉด ๋ฐฐ๊ฒฝ์ด ํˆฌ๋ช…ํ•ด์ง€๊ณ  border line์ด ์‚ฌ๋ผ์ง€๋„๋ก ๋ณ€๊ฒฝ๋˜์—ˆ๋‹ค. ์‚ฌ์‹ค ์ด์Šˆ๋Š” ์•„๋‹Œใ„ทใ…”;; ๋‚ด ์ƒ๊ฐ๋Œ€๋กœ ์•ˆ ๋˜๋ฉด ์ด์Šˆ์ž„. ใ…‡ใ…‡ ๊ด€๋ จ ํฌ๋Ÿผ: https://developer.apple.com/forums/thread/682420 barTintColor not working in iOS 15 | Apple Developer Forums In iOS 15, UIKit has extended the usage of the scrollEdgeAppearance, which by default produces a transparent background, to all navigation bars. The background is co..

    [UIKit] UIButton Custom Design ์ ์šฉ

    ๋ถ€์ œ: ์˜ˆ์œ ๋ฒ„ํŠผ ๋งŒ๋“ค๊ธฐ phoneNumDoneBtn.backgroundColor = .gray phoneNumDoneBtn.layer.cornerRadius = 4 phoneNumDoneBtn.setTitleColor(.white, for: .normal) ์ ์šฉํ•˜๋ฉด ์ด๋Ÿฐ ๋„ˆ๋‚Œ!

    [Swift] ๋‚ ์งœ๋ฅผ ๋ฌธ์ž๋กœ! Date to String

    func dateToString(_ today: Date) -> String{ let year = Calendar.current.component(.year, from: today) let month = Calendar.current.component(.month, from: today) let day = Calendar.current.component(.day, from: today) let weekdayInt = Calendar.current.component(.weekday, from: today) var weekday: String = "" switch weekdayInt { case 1: weekday = "SUN" case 2: weekday = "MON" case 3: weekday = "T..

    [๋„คํŠธ์›Œํ‚น] iOS Swift Alamofire ์š”์ฒญ/์‘๋‹ตํ•˜๊ธฐ(form-dataํ˜•์‹)

    ์šฐ๋ฆฌ ์„œ๋ฒ„์— json ํ˜•์‹์œผ๋กœ ํฐ๋ฒˆํ˜ธ ๋„˜๊ฒผ๋”๋‹ˆ ์ž๊พธ ๋ณ€์ˆ˜ ๋ถ€์กฑ ์—๋Ÿฌ ์ฝ”๋“œ ๋œธ -> ์„œ๋ฒ„ํŒ€์— ๋ฌผ์–ด๋ด„ -> ์„œ๋ฒ„์— ๋ฐ์ดํ„ฐ ๋ณด๋‚ผ ๋•Œ json ๋ง๊ณ  form-data ํ˜•์‹์œผ๋กœ ๋ณด๋‚ด ๋‹ฌ๋ผ๊ณ  ํ•จ -> ๊ทธ๋Ÿฐ๋ฐ Alamofire์— form-data ํ˜•์‹์œผ๋กœ ์—…๋กœ๋“œํ•  ์ˆ˜ ์žˆ๋Š” ๋ฉ”์†Œ๋“œ๊ฐ€ ์žˆ์—ˆ๋‹ค!!!! ํ‰์†Œ ํ•˜๋˜ ๊ฒƒ์ฒ˜๋Ÿผ(line 8์— ์ฃผ์„ ์ฒ˜๋ฆฌํ•œ ๋ถ€๋ถ„) request๋ฅผ ๋ณด๋‚ด๋Š” ๋ฉ”์†Œ๋“œ๊ฐ€ ์•„๋‹ˆ๋ผ, ์„œ๋ฒ„์— ์—…๋กœ๋“œํ•˜๋Š” ๊ฐœ๋…์ธ ๋“ฏ. ์•„๋ฌดํŠผ multipartFormData ํ™œ์šฉํ•ด์„œ ํœด๋Œ€ํฐ ๋ฒˆํ˜ธ ๋„ฃ์—ˆ๋”๋‹ˆ ์ œ๋Œ€๋กœ ์š”์ฒญ์ด ์ „์†ก๋๋‹ค. ๐Ÿฅบ //MARK: SMS request // API ํ˜ธ์ถœ let paramForSMS:Parameters = ["userphonenum": phoneField.text] let url = "์—ฌ๊ธฐ์— url ์ฃผ์†Œ ..

    [UIKit] ๊ฐ„๋‹จํ•œ toast message, ํ™•์ธ ๋ฒ„ํŠผ๋งŒ ์žˆ๋Š” alert ์˜ˆ์ œ

    extension UIViewController { func alert(_ message: String, completion: (()->Void)? = nil) { DispatchQueue.main.async { let alert = UIAlertController(title: nil, message: message, preferredStyle: .alert) let okAction = UIAlertAction(title: "ํ™•์ธ", style: .cancel) { (_) in completion?() } alert.addAction(okAction) self.present(alert, animated: false) } } } ์‚ฌ์šฉํ•  ๋•Œ์—๋Š” ์•„๋ฌด๋ฐ์„œ๋‚˜ self.alert("์•Œ๋ฆผ๋ฉ”์‹œ์ง€!!!") ์ด๋ ‡๊ฒŒ ์‚ฌ์šฉ..