Skip to content

Commit

Permalink
Merge pull request #22 from 0si43/develop
Browse files Browse the repository at this point in the history
 added app store review request and organize some folder
  • Loading branch information
0si43 authored Oct 16, 2020
2 parents 422bf5f + 2457aec commit ab607dc
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 17 deletions.
22 changes: 7 additions & 15 deletions LikePaper.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@
A6675A37251D89BA00343151 /* Like Paper.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = "Like Paper.entitlements"; sourceTree = "<group>"; };
A66E7512253531440026B9A8 /* README.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = "<group>"; };
A66E7513253538E00026B9A8 /* LICENSE.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = LICENSE.md; sourceTree = "<group>"; };
A66E7516253547510026B9A8 /* Download_on_the_App_Store_Badge.svg */ = {isa = PBXFileReference; lastKnownFileType = text; path = Download_on_the_App_Store_Badge.svg; sourceTree = "<group>"; };
A66E81FF252C0D5F007A24D9 /* Autosave.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Autosave.swift; sourceTree = "<group>"; };
A66E825C252D8453007A24D9 /* LikePaperTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = LikePaperTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
A66E825E252D8453007A24D9 /* LikePaperTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LikePaperTests.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -94,14 +93,6 @@
/* End PBXFrameworksBuildPhase section */

/* Begin PBXGroup section */
A66E7515253547440026B9A8 /* Documents */ = {
isa = PBXGroup;
children = (
A66E7516253547510026B9A8 /* Download_on_the_App_Store_Badge.svg */,
);
path = Documents;
sourceTree = "<group>";
};
A66E825D252D8453007A24D9 /* LikePaperTests */ = {
isa = PBXGroup;
children = (
Expand All @@ -127,7 +118,6 @@
A66E825D252D8453007A24D9 /* LikePaperTests */,
A6B5B33C252D8AC0002D7B55 /* LikePaperUITests */,
A6DE5BB82437167C006D3D47 /* Products */,
A66E7515253547440026B9A8 /* Documents */,
A66E7512253531440026B9A8 /* README.md */,
A66E7513253538E00026B9A8 /* LICENSE.md */,
);
Expand Down Expand Up @@ -228,7 +218,7 @@
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 1200;
LastUpgradeCheck = 1140;
LastUpgradeCheck = 1200;
ORGANIZATIONNAME = "Tsuyoshi nakajima";
TargetAttributes = {
A66E825B252D8453007A24D9 = {
Expand Down Expand Up @@ -464,6 +454,7 @@
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
Expand Down Expand Up @@ -524,6 +515,7 @@
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
Expand Down Expand Up @@ -558,14 +550,14 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_ENTITLEMENTS = "LikePaper/Like Paper.entitlements";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 5;
CURRENT_PROJECT_VERSION = 6;
DEVELOPMENT_TEAM = JDTR4Y333X;
INFOPLIST_FILE = LikePaper/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 2.0.0;
MARKETING_VERSION = 2.0.1;
PRODUCT_BUNDLE_IDENTIFIER = Individual.LikeAPaper;
PRODUCT_NAME = "Like Paper";
SWIFT_VERSION = 5.0;
Expand All @@ -579,14 +571,14 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_ENTITLEMENTS = "LikePaper/Like Paper.entitlements";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 5;
CURRENT_PROJECT_VERSION = 6;
DEVELOPMENT_TEAM = JDTR4Y333X;
INFOPLIST_FILE = LikePaper/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 2.0.0;
MARKETING_VERSION = 2.0.1;
PRODUCT_BUNDLE_IDENTIFIER = Individual.LikeAPaper;
PRODUCT_NAME = "Like Paper";
SWIFT_VERSION = 5.0;
Expand Down
20 changes: 19 additions & 1 deletion LikePaper/ThumbnailCollectionViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

import UIKit
import PencilKit
import StoreKit

final class ThumbnailCollectionViewController: UICollectionViewController, DocumentManagerDelegate {
private let reuseIdentifier = "ThumbnailCollectionViewCell"
Expand Down Expand Up @@ -86,10 +87,27 @@ final class ThumbnailCollectionViewController: UICollectionViewController, Docum

override func viewDidAppear(_ animated: Bool) {
super.viewDidAppear(animated)
guard firstLunch else { return }
guard firstLunch else {
requestAppStoreReview()
return
}
performSegue(withIdentifier: "toCanvasView", sender: self)
firstLunch = false
}

private func requestAppStoreReview() {
guard drawings.count >= 5 else { return } // frequently used
guard !UserDefaults.standard.bool(forKey: "DidAppStoreReviewRequested") else { return } // request once
if #available(iOS 14.0, *) {
if let scene = UIApplication.shared.connectedScenes.first as? UIWindowScene {
SKStoreReviewController.requestReview(in: scene)
UserDefaults.standard.set(true, forKey: "DidAppStoreReviewRequested")
}
} else {
SKStoreReviewController.requestReview()
UserDefaults.standard.set(true, forKey: "DidAppStoreReviewRequested")
}
}

@IBAction func newCanvas(_ sender: Any) {
performSegue(withIdentifier: "toCanvasView", sender: self)
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
- I cannot satisfied with (Apple)Notes app or Evernote when I wrote something by Apple Pencil. I felt it too much.
- You could lunch and write by this app. It's very minimalistic and essential.

[![Download_on_the_App_Store_Badge](./Documents/Download_on_the_App_Store_Badge.svg)](https://apps.apple.com/jp/app/like-a-paper/id1511690088#?platform=ipad)
[![Download_on_the_App_Store_Badge](./docs/Download_on_the_App_Store_Badge.svg)](https://apps.apple.com/jp/app/like-a-paper/id1511690088#?platform=ipad)

# Contributing
Like Paper is started as indevidual project, but welcome to contribute!
Expand Down
File renamed without changes

0 comments on commit ab607dc

Please sign in to comment.