Slide 1

Slide 1 text

Chatwork株式会社 モバイルアプリケーション開発部 中山 龍 2024年4月19日 - mobile.stmn #5 効率化に挑戦してみたら モバイル開発が少し快適になった話

Slide 2

Slide 2 text

自己紹介 中山 龍 (なかやま りゅう) ● Chatwork株式会社 ○ 新卒2年目のiOSエンジニア(21) ● フルリモート勤務で愛知県在住 2 @ryu_develop 先週、発熱で寝込んでいたときに茶碗蒸しの美味しさ に目覚めました。 (作るのにも挑戦していますが、美味しくできないので、良い 出汁など知っている方は懇親会で教えてください)

Slide 3

Slide 3 text

モバイル開発をしていると 「この作業めんどくさいな...」 「人力でやらなくてもな...」 という場面があると思います

Slide 4

Slide 4 text

そんな面倒な作業をいろいろ解決してみたら いいことがあったので2つほど紹介します! 先に言っておきますが、最近はPrivacy Manifestsおじさんをやっ ているので、その内容がメインです🙏

Slide 5

Slide 5 text

Appleから届いた警告メールをいい感じにする 1

Slide 6

Slide 6 text

解決したい課題 6 Privacy Manifestsの警告メール = 解決したい課題: Privacy Manifestsの警告メールが見にくい 2024/5/1のPrivacy Manifests審査がAppleによって開始されることに先駆けて、 3中旬から Privacy Manifestsに未対応な場合に配信されているメール Hello, We noticed one or more issues with a recent submission for TestFlight review for the following app: SampleApp Version 1.0.0 Build 1 Although submission for TestFlight review was successful, you may want to correct the following issues in your next submission for TestFlight review. Once you've corrected the issues, upload a new binary to App Store Connect. ITMS-91053: Missing API declaration - Your app’s code in the “Sample App” file references one or more APIs that require reasons, including the following API categories: NSPrivacyAccessedAPICategoryFileTimestamp. While no action is required at this time, starting May 1, 2024, when you upload a new app or app update, you must include a NSPrivacyAccessedAPITypes array in your app’s privacy manifest to provide approved reasons for these APIs used by your app’s code. For more details about this policy, including a list of required reason APIs and approved reasons for usage, visit: https://developer.apple.com/documentation/bundleresources/privacy_manifest_files/describing_use_of_required_reason_api. ITMS-91053: Missing API declaration - Your app’s code in the “Sample App” file references one or more APIs that require reasons, including the following API categories: NSPrivacyAccessedAPICategoryDiskSpace. While no action is required at this time, starting May 1, 2024, when you upload a new app or app update, you must include a NSPrivacyAccessedAPITypes array in your app’s privacy manifest to provide approved reasons for these APIs used by your app’s code. For more details about this policy, including a list of required reason APIs and approved reasons for usage, visit: https://developer.apple.com/documentation/bundleresources/privacy_manifest_files/describing_use_of_required_reason_api. ITMS-91053: Missing API declaration - Your app’s code in the “Sample App” file references one or more APIs that require reasons, including the following API categories: NSPrivacyAccessedAPICategorySystemBootTime. While no action is required at this time, starting May 1, 2024, when you upload a new app or app update, you must include a NSPrivacyAccessedAPITypes array in your app’s privacy manifest to provide approved reasons for these APIs used by your app’s code. For more details about this policy, including a list of required reason APIs and approved reasons for usage, visit: https://developer.apple.com/documentation/bundleresources/privacy_manifest_files/describing_use_of_required_reason_api. ITMS-91053: Missing API declaration - Your app’s code in the “Sample App” file references one or more APIs that require reasons, including the following API categories: NSPrivacyAccessedAPICategoryUserDefaults. While no action is required at this time, starting May 1, 2024, when you upload a new app or app update, you must include a NSPrivacyAccessedAPITypes array in your app’s privacy manifest to provide approved reasons for these APIs used by your app’s code. For more details about this policy, including a list of required reason APIs and approved reasons for usage, visit: https://developer.apple.com/documentation/bundleresources/privacy_manifest_files/describing_use_of_required_reason_api. ITMS-91053: Missing API declaration - Your app’s code in the “PlugIns/Sample App Broadcast Upload Extension.appex/Sample App Broadcast Upload Extension” file references one or more APIs that require reasons, including the following API categories: NSPrivacyAccessedAPICategoryDiskSpace. While no action is required at this time, starting May 1, 2024, when you upload a new app or app update, you must include a NSPrivacyAccessedAPITypes array in your app’s privacy manifest to provide approved reasons for these APIs used by your app’s code. For more details about this policy, including a list of required reason APIs and approved reasons for usage, visit: https://developer.apple.com/documentation/bundleresources/privacy_manifest_files/describing_use_of_required_reason_api. ITMS-91053: Missing API declaration - Your app’s code in the “PlugIns/Sample App Broadcast Upload Extension.appex/Sample App Broadcast Upload Extension” file references one or more APIs that require reasons, including the following API categories: NSPrivacyAccessedAPICategoryFileTimestamp. While no action is required at this time, starting May 1, 2024, when you upload a new app or app update, you must include a NSPrivacyAccessedAPITypes array in your app’s privacy manifest to provide approved reasons for these APIs used by your app’s code. For more details about this policy, including a list of required reason APIs and approved reasons for usage, visit: https://developer.apple.com/documentation/bundleresources/privacy_manifest_files/describing_use_of_required_reason_api. ITMS-91053: Missing API declaration - Your app’s code in the “PlugIns/Sample App Broadcast Upload Extension.appex/Sample App Broadcast Upload Extension” file references one or more APIs that require reasons, including the following API categories: NSPrivacyAccessedAPICategoryUserDefaults. While no action is required at this time, starting May 1, 2024, when you upload a new app or app update, you must include a NSPrivacyAccessedAPITypes array in your app’s privacy manifest to provide approved reasons for these APIs used by your app’s code. For more details about this policy, including a list of required reason APIs and approved reasons for usage, visit: https://developer.apple.com/documentation/bundleresources/privacy_manifest_files/describing_use_of_required_reason_api. ITMS-91053: Missing API declaration - Your app’s code in the “PlugIns/Sample App Notification Service Extension.appex/Sample App Notification Service Extension” file references one or more APIs that require reasons, including the following API categories: NSPrivacyAccessedAPICategoryDiskSpace. While no action is required at this time, starting May 1, 2024, when you upload a new app or app update, you must include a NSPrivacyAccessedAPITypes array in your app’s privacy manifest to provide approved reasons for these APIs used by your app’s code. For more details about this policy, including a list of required reason APIs and approved reasons for usage, visit: https://developer.apple.com/documentation/bundleresources/privacy_manifest_files/describing_use_of_required_reason_api. まだまだ続く... 見ての通りとても長いが、必要な情報は ... 内容は実際のアプリとは関係ありません

Slide 7

Slide 7 text

解決したい課題 7 Privacy Manifestsの警告メール = 2024/5/1のPrivacy Manifests審査がAppleによって開始されることに先駆けて、 3中旬から Privacy Manifestsに未対応な場合に配信されているメール Hello, We noticed one or more issues with a recent submission for TestFlight review for the following app: SampleApp Version 1.0.0 Build 1 Although submission for TestFlight review was successful, you may want to correct the following issues in your next submission for TestFlight review. Once you've corrected the issues, upload a new binary to App Store Connect. ITMS-91053: Missing API declaration - Your app’s code in the “Sample App” file references one or more APIs that require reasons, including the following API categories: NSPrivacyAccessedAPICategoryFileTimestamp. While no action is required at this time, starting May 1, 2024, when you upload a new app or app update, you must include a NSPrivacyAccessedAPITypes array in your app’s privacy manifest to provide approved reasons for these APIs used by your app’s code. For more details about this policy, including a list of required reason APIs and approved reasons for usage, visit: https://developer.apple.com/documentation/bundleresources/privacy_manifest_files/describing_use_of_required_reason_api. ITMS-91053: Missing API declaration - Your app’s code in the “Sample App” file references one or more APIs that require reasons, including the following API categories: NSPrivacyAccessedAPICategoryDiskSpace. While no action is required at this time, starting May 1, 2024, when you upload a new app or app update, you must include a NSPrivacyAccessedAPITypes array in your app’s privacy manifest to provide approved reasons for these APIs used by your app’s code. For more details about this policy, including a list of required reason APIs and approved reasons for usage, visit: https://developer.apple.com/documentation/bundleresources/privacy_manifest_files/describing_use_of_required_reason_api. ITMS-91053: Missing API declaration - Your app’s code in the “Sample App” file references one or more APIs that require reasons, including the following API categories: NSPrivacyAccessedAPICategorySystemBootTime. While no action is required at this time, starting May 1, 2024, when you upload a new app or app update, you must include a NSPrivacyAccessedAPITypes array in your app’s privacy manifest to provide approved reasons for these APIs used by your app’s code. For more details about this policy, including a list of required reason APIs and approved reasons for usage, visit: https://developer.apple.com/documentation/bundleresources/privacy_manifest_files/describing_use_of_required_reason_api. ITMS-91053: Missing API declaration - Your app’s code in the “Sample App” file references one or more APIs that require reasons, including the following API categories: NSPrivacyAccessedAPICategoryUserDefaults. While no action is required at this time, starting May 1, 2024, when you upload a new app or app update, you must include a NSPrivacyAccessedAPITypes array in your app’s privacy manifest to provide approved reasons for these APIs used by your app’s code. For more details about this policy, including a list of required reason APIs and approved reasons for usage, visit: https://developer.apple.com/documentation/bundleresources/privacy_manifest_files/describing_use_of_required_reason_api. ITMS-91053: Missing API declaration - Your app’s code in the “PlugIns/Sample App Broadcast Upload Extension.appex/Sample App Broadcast Upload Extension” file references one or more APIs that require reasons, including the following API categories: NSPrivacyAccessedAPICategoryDiskSpace. While no action is required at this time, starting May 1, 2024, when you upload a new app or app update, you must include a NSPrivacyAccessedAPITypes array in your app’s privacy manifest to provide approved reasons for these APIs used by your app’s code. For more details about this policy, including a list of required reason APIs and approved reasons for usage, visit: https://developer.apple.com/documentation/bundleresources/privacy_manifest_files/describing_use_of_required_reason_api. ITMS-91053: Missing API declaration - Your app’s code in the “PlugIns/Sample App Broadcast Upload Extension.appex/Sample App Broadcast Upload Extension” file references one or more APIs that require reasons, including the following API categories: NSPrivacyAccessedAPICategoryFileTimestamp. While no action is required at this time, starting May 1, 2024, when you upload a new app or app update, you must include a NSPrivacyAccessedAPITypes array in your app’s privacy manifest to provide approved reasons for these APIs used by your app’s code. For more details about this policy, including a list of required reason APIs and approved reasons for usage, visit: https://developer.apple.com/documentation/bundleresources/privacy_manifest_files/describing_use_of_required_reason_api. ITMS-91053: Missing API declaration - Your app’s code in the “PlugIns/Sample App Broadcast Upload Extension.appex/Sample App Broadcast Upload Extension” file references one or more APIs that require reasons, including the following API categories: NSPrivacyAccessedAPICategoryUserDefaults. While no action is required at this time, starting May 1, 2024, when you upload a new app or app update, you must include a NSPrivacyAccessedAPITypes array in your app’s privacy manifest to provide approved reasons for these APIs used by your app’s code. For more details about this policy, including a list of required reason APIs and approved reasons for usage, visit: https://developer.apple.com/documentation/bundleresources/privacy_manifest_files/describing_use_of_required_reason_api. ITMS-91053: Missing API declaration - Your app’s code in the “PlugIns/Sample App Notification Service Extension.appex/Sample App Notification Service Extension” file references one or more APIs that require reasons, including the following API categories: NSPrivacyAccessedAPICategoryDiskSpace. While no action is required at this time, starting May 1, 2024, when you upload a new app or app update, you must include a NSPrivacyAccessedAPITypes array in your app’s privacy manifest to provide approved reasons for these APIs used by your app’s code. For more details about this policy, including a list of required reason APIs and approved reasons for usage, visit: https://developer.apple.com/documentation/bundleresources/privacy_manifest_files/describing_use_of_required_reason_api. まだまだ続く... この部分だけ!!! 必要のない部分がとても多い ...😧 解決したい課題: Privacy Manifestsの警告メールが見にくい 見ての通りとても長いが、必要な情報は ... 警告メールの内容がどのように変化するかを 観測するために繰り返し見る必要がある場 合、とてもつらい 内容は実際のアプリとは関係ありません

Slide 8

Slide 8 text

どのようにした? 8 この課題を解決するために... 警告メールを入力して、必要な情報を出力するMacアプリ を作成しました 内容は実際のアプリとは関係ありません

Slide 9

Slide 9 text

どのようにした? 9 この課題を解決するために... 警告メールを入力して、必要な情報を出力するMacアプリ を作成しました 警告メール 内容は実際のアプリとは関係ありません

Slide 10

Slide 10 text

どのようにした? 10 この課題を解決するために... 警告メールを入力して、必要な情報を出力するMacアプリ を作成しました 必要な情報 内容は実際のアプリとは関係ありません

Slide 11

Slide 11 text

どうやって作ったか 11 SwiftUIで画面を作り、Swiftで正規表現を使って必要な部分だけを抜き出す処 理をして、結果を表示している 🎉iOS開発者におなじみの技術で作られている!🎉 しかも、個人利用想定なので、OSのバージョンも気にせずに最新技 術を使える 💡モバイルエンジニアでも手軽に手を出しやすい

Slide 12

Slide 12 text

参考・注意 GitHub: https://github.com/Ryu-nakay/privacy-manifests-warning-email-formatter 12 ※ プライベートな時間で作成したものであり、所属組織とは一切関係ありません

Slide 13

Slide 13 text

Spreadsheetの設定値からPrivacyInfo.xcprivacyを 生成する 2

Slide 14

Slide 14 text

解決したい課題 14 解決したい課題: Xcode上でのPrivacy Manifestsファイルの編集作業に問題・不満が ある あまり「編集しやすい」とは言えない使い 心地 コメントが書けないので、その設定値を入 れた背景などを残せない (ドキュメント性がない) 別で設定値の背景を記すためのドキュメ ントを用意しても ● 設定値の反映がとても面倒 ● 書き写しのミスが起こるかも ● 別管理なのでそもそも見つからない かも

Slide 15

Slide 15 text

どのようにした? 15 この課題を解決するために... Spreadsheetの設定値からPrivacy Manifestsファイルを生成するプログラム を作成しました GAS 設定画面

Slide 16

Slide 16 text

どのようにした? 16 この課題を解決するために... Spreadsheetの設定値からPrivacy Manifestsファイルを生成するプログラム を作成しました 設定画面 4つの設定シートがあるので各種設定値 を入力する ● 『備考』の列があるのでそこにコメン トを残せる ● セルの編集履歴が見れる

Slide 17

Slide 17 text

どのようにした? 17 この課題を解決するために... Spreadsheetの設定値からPrivacy Manifestsファイルを生成するプログラム を作成しました ダウンロードボタンを クリックする 表示されるウインドウの『ダウンロード』を押す と、ファイルがダウンロードされる

Slide 18

Slide 18 text

どうやって作ったか 18 claspを使ってGoogle App ScriptsのプログラムをローカルのTypeScriptで 書き、連携されたGoogle Spreadsheetsで設定値を入力する 🎉Spreadsheetsとも連携でき、複数人同時にも操作できる🎉 しかし、モバイル開発にはあまり馴染みのない言語 / 技術であり少 し学習は必要 💡ドキュメント性を持たせられる 💡 複数人での使用も手軽に実現できる

Slide 19

Slide 19 text

参考・注意 一般公開するかは検討中 19 ※ プライベートな時間で作成したものであり、所属組織とは一切関係ありません

Slide 20

Slide 20 text

他にもネット記事を参考にしながら ● サードパーティSDKのPrivacy Manifests対応状 況を自動で調査するプログラム ● required reason APIを使用していないかを調査 するプログラム を作成しました

Slide 21

Slide 21 text

実際にこれらを作ってみて... TITLE タイトル

Slide 22

Slide 22 text

実際にこれらを作ってみて... 22 利用者として 「人力だと数分かかるな〜」という作業が一瞬で終わったり、プログラムが自 動でやってくれている間に他の作業を進められたり、嬉しいことがあった 「リソースの余裕的にこれがなかったらできてなかっただろうな」というような 念の為の確認作業を行えたりと、作業を行うハードルが下がる

Slide 23

Slide 23 text

実際にこれらを作ってみて... 23 開発者・導入者として 複数の人が定期的に行う面倒なことを自動化・便利にするツールを作成する と、開発したものの恩恵が大きく、さらにメンバーからの評判が良いと嬉しい 個人として開発したものに関しては、SNSで共有した際に反響があると、同 業者の助けになれたような気がするので自己肯定感が上がる・嬉しい 自分で作ったもので業務の効率化がうまくいくと、さらに作りたいモチベー ションが上がり、効率化のおかげで業務がしやすくなる (まだ便利になったと言えるほど運用はできていないが)

Slide 24

Slide 24 text

24 ということで、より快適に・便利にモバイルアプリを開発するた めに、モバイル以外の開発で効率化にチャレンジしてみたとい うことの共有でした!

Slide 25

Slide 25 text

働くをもっと楽しく、創造的に