Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weโ€™ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feat] local notification #202

Merged
merged 2 commits into from
Jul 17, 2024
Merged

[feat] local notification #202

merged 2 commits into from
Jul 17, 2024

Conversation

hooni0918
Copy link
Member

๐Ÿ”— ์—ฐ๊ฒฐ๋œ ์ด์Šˆ

๐Ÿ“„ ์ž‘์—… ๋‚ด์šฉ

  • ๋กœ์ปฌ์•Œ๋žŒ manager ๊ตฌํ˜„

๐Ÿ‘€ ๊ธฐํƒ€ ๋” ์ด์•ผ๊ธฐํ•ด๋ณผ ์ 

์ˆ˜์—ฐ, ์œ ์ง„ ๊ธฐ๋Šฅ๋ฐ ๋ทฐ๋ชจ๋ธ ์ˆ˜์ •์ดํ›„ ๋‹ค์‹œ ํ•ด๋‹น๊ธฐ๋Šฅ ์—ฐ๊ฒฐ์˜ˆ์ •

@hooni0918 hooni0918 added โœจ feat ๊ธฐ๋Šฅ ๊ตฌํ˜„์‹œ ์‚ฌ์šฉ ๐Ÿงกย JiHoon ์Œˆ๋ฝ•ํ•œ ํ”Œ๋ŸฌํŒ… ๊ฟ€ํŒ์„ ๋“ฃ๊ณ  ์‹ถ๋‹ค๋ฉด labels Jul 17, 2024
@hooni0918 hooni0918 self-assigned this Jul 17, 2024
@JinUng41 JinUng41 changed the title Feat/#198 local notification [feat] local notification Jul 17, 2024
Copy link
Contributor

@JinUng41 JinUng41 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

๊ณ ์ƒํ•˜์…จ์Šต๋‹ˆ๋‹ค~

Comment on lines +21 to +37
func scheduleNotification(title: String, body: String, triggerDate: Date) {
let content = UNMutableNotificationContent()
content.title = title
content.body = body
content.sound = .default

let components = Calendar.current.dateComponents([.year, .month, .day, .hour, .minute], from: triggerDate)
let trigger = UNCalendarNotificationTrigger(dateMatching: components, repeats: false)

let request = UNNotificationRequest(identifier: UUID().uuidString, content: content, trigger: trigger)

notificationCenter.add(request) { error in
if let error = error {
print("Error scheduling notification: \(error)")
}
}
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

์‹œ๊ฐ„ ๊ณ„์‚ฐ ๋กœ์ง์€ ์ง€ํ›ˆ๋‹˜์ด ๊ตฌํ˜„ํ•˜์‹œ๊ธฐ๋กœ ๊ฒฐ์ •๋œ๊ฑด๊ฐ€์š”?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ํ˜น์‹œ๋ชฐ๋ผ์„œ ์ผ๋‹จ ๊ธฐ์กด์— ์ž‘์„ฑํ•œ ๋กœ์ง์„ ํ†ต์ฑ„๋กœ ๋„ฃ์–ด๋‘”๊ฑฐ๊ธด
์ €์žฅ๋œ ์‹œ๊ฐ„๊ณผ ๊ณ„์‚ฐ๋œ ๋กœ์ง์„ ๋ฐ›์•„์˜ค๊ธฐ๋งŒ ํ•˜๋ฉด ๋ ๊ฒƒ๊ฐ™์•„ ์ˆ˜์—ฐ์œ ์ง„ ๋‘๋ถ„ ์ฝ”๋“œ ํ™•์ธํ›„ ์ถ”ํ›„ ์‚ญ์ œ ๊ฐ€๋Šฅ์„ฑ ์žˆ์Šต๋‹ˆ๋‹ค

Copy link
Member

@youz2me youz2me left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


๊ณ ์ƒํ•˜์…จ์Šต๋‹ˆ๋‹ค!!

Copy link
Member

@mmaybei mmaybei left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

๋ฉ‹์žˆ์–ด์š” ์งฑ์ด์—์š”

@hooni0918 hooni0918 merged commit be42734 into suyeon Jul 17, 2024
@hooni0918 hooni0918 deleted the feat/#198-LocalNotification branch July 17, 2024 12:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
โœจ feat ๊ธฐ๋Šฅ ๊ตฌํ˜„์‹œ ์‚ฌ์šฉ ๐Ÿงกย JiHoon ์Œˆ๋ฝ•ํ•œ ํ”Œ๋ŸฌํŒ… ๊ฟ€ํŒ์„ ๋“ฃ๊ณ  ์‹ถ๋‹ค๋ฉด
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants