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("์๋ฆผ๋ฉ์์ง!!!") ์ด๋ ๊ฒ ์ฌ์ฉ..