This repository was archived by the owner on Apr 7, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +13
-9
lines changed
Expand file tree Collapse file tree 2 files changed +13
-9
lines changed Original file line number Diff line number Diff line change 22<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
33<plist version =" 1.0" >
44<dict >
5+ <key >LSApplicationQueriesSchemes </key >
6+ <array >
7+ <string >studyplus </string >
8+ </array >
59 <key >CFBundleDevelopmentRegion </key >
610 <string >en </string >
711 <key >CFBundleExecutable </key >
Original file line number Diff line number Diff line change @@ -299,20 +299,20 @@ final public class Studyplus {
299299
300300 private func openStudyplus( command: String ) {
301301
302- let urlString : String = " studyplus://external_app/ " + command + " / " + consumerKey + " / " + consumerSecret
303-
304- if let url = URL ( string: urlString) {
305-
306- applicationOpen ( url)
307-
308- } else {
309-
302+ guard UIApplication . shared. canOpenURL ( URL ( string: " studyplus:// " ) !) else {
310303 if self . openAppStoreIfNotInstalled {
311-
312304 let appStoreURLString : String = " https://apps.apple.com/jp/app/id505410049?mt=8 "
313305 guard let appStoreURL = URL ( string: appStoreURLString) else { return }
314306 applicationOpen ( appStoreURL)
315307 }
308+ return
309+ }
310+
311+ let urlString : String = " studyplus://external_app/ " + command + " / " + consumerKey + " / " + consumerSecret
312+
313+ if let url = URL ( string: urlString) {
314+
315+ applicationOpen ( url)
316316 }
317317 }
318318
You can’t perform that action at this time.
0 commit comments