@@ -75,25 +75,16 @@ final public class Studyplus {
7575 see StudyplusLoginDelegate protocol
7676 */
7777 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
8578
8679 private let accessTokenStoreKey : String = " accessToken "
8780 private let usernameStoreKey : String = " username "
8881
8982 /// 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.
9284 /// After the process has returned from Studyplus application, delegate method will be called back.
9385 ///
9486 /// Studyplusアプリを起動してStudyplusログイン画面を開きます。
95- /// Studyplusアプリがインストールされていない場合、 openAppStoreIfNotInstalled が true であれば、AppStore を起動して Studyplus を開きます。
96- /// openAppStoreIfNotInstalled が false であれば何もしません。
87+ /// Studyplusアプリがインストールされていない場合、AppStore を起動して Studyplus を開きます。
9788 /// Studyplusアプリから操作が戻ってきた後、delegateオブジェクトのコールバックメソッドを呼び出します。
9889 public func login( ) {
9990 openStudyplus ( command: " auth " )
@@ -300,11 +291,9 @@ final public class Studyplus {
300291 private func openStudyplus( command: String ) {
301292
302293 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)
308297 return
309298 }
310299
0 commit comments