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

평점 유도 기능 추가 #56

Merged
merged 2 commits into from
Aug 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions Multimer/Multimer.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
objects = {

/* Begin PBXBuildFile section */
1E1869B32A8603D8000AFDC6 /* SKStoreReviewController+requestReviewInCurrentScene.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1E1869B22A8603D8000AFDC6 /* SKStoreReviewController+requestReviewInCurrentScene.swift */; };
1E1C42E22A765844003CC427 /* RingtoneSelectViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1E1C42E12A765844003CC427 /* RingtoneSelectViewController.swift */; };
1E1C43662A7681FA003CC427 /* radar.aiff in Resources */ = {isa = PBXBuildFile; fileRef = 1E1C43522A7681F8003CC427 /* radar.aiff */; };
1E1C43672A7681FA003CC427 /* alarm.aiff in Resources */ = {isa = PBXBuildFile; fileRef = 1E1C43532A7681F9003CC427 /* alarm.aiff */; };
Expand Down Expand Up @@ -155,6 +156,7 @@
/* Begin PBXFileReference section */
02A9A991A8E30450D4458665 /* Pods_MultimerTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_MultimerTests.framework; sourceTree = BUILT_PRODUCTS_DIR; };
09D9588E5DAECA7EB7A30024 /* Pods_Multimer_MultimerUITests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Multimer_MultimerUITests.framework; sourceTree = BUILT_PRODUCTS_DIR; };
1E1869B22A8603D8000AFDC6 /* SKStoreReviewController+requestReviewInCurrentScene.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "SKStoreReviewController+requestReviewInCurrentScene.swift"; sourceTree = "<group>"; };
1E1C42DF2A760939003CC427 /* ru */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ru; path = ru.lproj/InfoPlist.strings; sourceTree = "<group>"; };
1E1C42E02A760939003CC427 /* ru */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ru; path = ru.lproj/Localizable.strings; sourceTree = "<group>"; };
1E1C42E12A765844003CC427 /* RingtoneSelectViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RingtoneSelectViewController.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -673,6 +675,7 @@
1E23D56A299A1110008FD287 /* UIView+shouldFadeIn.swift */,
1E744B97296C488A00CD824D /* UIStackView+addArrangedSubviews.swift */,
1E23D5362994BCF8008FD287 /* NotificationName+CustomName.swift */,
1E1869B22A8603D8000AFDC6 /* SKStoreReviewController+requestReviewInCurrentScene.swift */,
);
path = Extension;
sourceTree = "<group>";
Expand Down Expand Up @@ -1148,6 +1151,7 @@
1E744BB2296C488A00CD824D /* TimerFilteringCondition.swift in Sources */,
1E4CB4DF2966BE9000FC918E /* TimeMO+CoreDataClass.swift in Sources */,
1E744BB4296C488A00CD824D /* TimeType.swift in Sources */,
1E1869B32A8603D8000AFDC6 /* SKStoreReviewController+requestReviewInCurrentScene.swift in Sources */,
1E744BB8296C488A00CD824D /* SymbolImageButton.swift in Sources */,
1E8C28F42A73C0C100935C5E /* CoordinatorType.swift in Sources */,
1E23D56B299A1110008FD287 /* UIView+shouldFadeIn.swift in Sources */,
Expand Down
3 changes: 3 additions & 0 deletions Multimer/Multimer/Application/SceneDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
//

import UIKit
import StoreKit

class SceneDelegate: UIResponder, UIWindowSceneDelegate {

Expand All @@ -24,6 +25,8 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate {

window?.rootViewController = rootNavigationController
window?.makeKeyAndVisible()

SKStoreReviewController.requestReviewInCurrentScene()
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
//
// SKStoreReviewController+requestReviewInCurrentScene.swift
// Multimer
//
// Created by 김상혁 on 2023/08/11.
//

import Foundation
import StoreKit

extension SKStoreReviewController {
static func requestReviewInCurrentScene() {
if let scene = UIApplication.shared.connectedScenes.first(where: {
$0.activationState == .foregroundActive
}) as? UIWindowScene {
requestReview(in: scene)
}
}
}