0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

iOS ReactNativeでOpenUrlを使って設定アプリの好きな画面へ遷移させる方法

Posted at

結論:rootが必要ない

OpenUrlで色んなアプリを呼び出せる。

line://
fb://

など

iOSの設定アプリを呼び出す方法でハマったのでメモとして残します。

ReactNativeのLinkingで呼び出す場合

export const openSetting = () => {
  Linking.openURL('App-Prefs:APPLE_ACCOUNT&path=PASSWORD_AND_SECURITY').catch(
    err => Alert.alert('URLを開けませんでした。', err),
  );
};
openSetting()

一度AppleSignInしたらFullNameが取れなくなるのでユーザーに解除してもう一度やって貰いたかったから調べました。

参考URL:
https://blog.thetheorier.com/entry/ios15-settings-urlscheme
https://github.com/FifiTheBulldog/ios-settings-urls/blob/master/settings-urls.md
上記はすべて App-Prefs:root= となっているが App-Prefs: で良い!みたい。ま、OSが上がるたびにかわりそうですはあります。えぇ

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?