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 [#95] 이용 시간 초과시 앱 잠금 기능 #115

Merged
merged 27 commits into from
Jan 19, 2024

Conversation

Zoe0929
Copy link
Member

@Zoe0929 Zoe0929 commented Jan 19, 2024

👾 작업 내용

일정 시간 후에 앱 차단 로직을 구현했습니다.

🚀 PR Point

  1. threshold에 도달하면 DeviceMonitor 안의 eventDidReachThreshold(event: )함수가 실행됩니다. 현재는 이용 시간이 종료 되었다는 알림이 울리고, 화면이 잠기게 됩니다.
  //새 이벤트 생성
        let event = DeviceActivityEvent(
            applications: selectedApps.applicationTokens,
            categories: selectedApps.categoryTokens,
            webDomains: selectedApps.webDomainTokens,
            //threshold - 이 시간이 되면 특정한 event가 발생 deviceactivitymonitor에 eventdidreachthreshold
            threshold: DateComponents(second: interval) // 입력값 
            )
  1. 앱 외부의 extension에 접근하기 위해 AppGroup을 적용했습니다.
@AppStorage("selectedApps", store: UserDefaults(suiteName: "group.65NSM7Z327.com.HMH.group"))
    var shieldedApps = FamilyActivitySelection()

📸 스크린샷

구현 내용 스크린샷
앱 차단 로직 RPReplay_Final1705649673

✅ Issue

Resolved #95

@Zoe0929 Zoe0929 added 🐰지희 지희의 issue 🌈 feat 기능 구현 labels Jan 19, 2024
@Zoe0929 Zoe0929 added this to the 🚀1차 스프린트🚀 milestone Jan 19, 2024
@Zoe0929 Zoe0929 self-assigned this Jan 19, 2024
@Zoe0929 Zoe0929 linked an issue Jan 19, 2024 that may be closed by this pull request
Copy link
Member

@kim-seonwoo kim-seonwoo left a comment

Choose a reason for hiding this comment

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

수고하셨습니다~~!!! LGTM

Copy link
Contributor

@boyeon0119 boyeon0119 left a comment

Choose a reason for hiding this comment

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

NICE ZOE

@boyeon0119 boyeon0119 merged commit c408ebc into develop Jan 19, 2024
@Zoe0929 Zoe0929 deleted the feat/#95/appMonitoring branch January 19, 2024 14:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🌈 feat 기능 구현 🐰지희 지희의 issue
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

[Feat] 앱 차단 로직 및 앱 추가 삭제 API
3 participants