@@ -75,25 +75,16 @@ final public class Studyplus {
75
75
see StudyplusLoginDelegate protocol
76
76
*/
77
77
public weak var delegate : StudyplusLoginDelegate ?
78
-
79
- /**
80
- When set to true, if Studyplus is not installed, AppStore starts when auth/login methods are called.
81
-
82
- trueの場合、auth、loginメソッドを呼び出したとき、StudyplusアプリがインストールされていなければAppStoreを起動します。
83
- */
84
- public var openAppStoreIfNotInstalled : Bool = true
85
78
86
79
private let accessTokenStoreKey : String = " accessToken "
87
80
private let usernameStoreKey : String = " username "
88
81
89
82
/// Opens the login screen by invoking the Studyplus application.
90
- /// If Studyplus app is not installed and openAppStoreIfNotInstalled is true, then open the Studyplus page in AppStore.
91
- /// If openAppStoreIfNotInstalled is false, do nothing.
83
+ /// If Studyplus app is not installed, open the Studyplus page in AppStore.
92
84
/// After the process has returned from Studyplus application, delegate method will be called back.
93
85
///
94
86
/// Studyplusアプリを起動してStudyplusログイン画面を開きます。
95
- /// Studyplusアプリがインストールされていない場合、 openAppStoreIfNotInstalled が true であれば、AppStore を起動して Studyplus を開きます。
96
- /// openAppStoreIfNotInstalled が false であれば何もしません。
87
+ /// Studyplusアプリがインストールされていない場合、AppStore を起動して Studyplus を開きます。
97
88
/// Studyplusアプリから操作が戻ってきた後、delegateオブジェクトのコールバックメソッドを呼び出します。
98
89
public func login( ) {
99
90
openStudyplus ( command: " auth " )
@@ -300,11 +291,9 @@ final public class Studyplus {
300
291
private func openStudyplus( command: String ) {
301
292
302
293
guard UIApplication . shared. canOpenURL ( URL ( string: " studyplus:// " ) !) else {
303
- if self . openAppStoreIfNotInstalled {
304
- let appStoreURLString : String = " https://apps.apple.com/jp/app/id505410049?mt=8 "
305
- guard let appStoreURL = URL ( string: appStoreURLString) else { return }
306
- applicationOpen ( appStoreURL)
307
- }
294
+ let appStoreURLString : String = " https://apps.apple.com/jp/app/id505410049?mt=8 "
295
+ guard let appStoreURL = URL ( string: appStoreURLString) else { return }
296
+ applicationOpen ( appStoreURL)
308
297
return
309
298
}
310
299
0 commit comments