Skip to content
This repository has been archived by the owner on Feb 19, 2021. It is now read-only.

[iOS] Remove unused font resources #560

Merged

Conversation

iseebi
Copy link
Contributor

@iseebi iseebi commented Jun 21, 2020

Purpose

  • Remove Unused font resource

Xamarin.Forms の ExportFont を使用したフォント埋め込みでは、Shared Projectにのみ追加すれば効果があるとのことです(関連リファレンス)。

iOS のプロジェクトには、既に共有プロジェクト側にフォントがあるにも関わらず、同一のフォントが存在しており、これらがアプリファイルサイズを押し上げていました。

また、Info.plistへのUIAppFont指定も、この機能を使った場合は不要になるとのことでした(関連記事)。

この変更では、iOSプロジェクト側からフォントを削除することで、ダウンロードサイズ・インストールサイズの削減を図ります。

この変更により、以下の通りファイルサイズが削減されていることを確認しています(Debug構成, macOSのFinderの表示)。

構成 アーカイブサイズ(.ipa) インストールサイズ(.app)
変更前 92.2MB 140MB
変更後 64MB 105.8MB

Does this introduce a breaking change?

[ ] Yes
[x] No

Pull Request Type

What kind of change does this Pull Request introduce?

[x] Bugfix
[ ] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Documentation content changes
[ ] Other... Please describe:

What to Check

  • Run the app in master branch and check the fonts on screens
  • Run your app on this branch and make sure it's the same as above

Other Information

シミュレータで確認しましたが、もし何かしらのワークアラウンドでiOS側にもフォントを追加しておく必要があったようであればご教示いただければと思います。

@iseebi iseebi force-pushed the feature/remove_unused_fonts branch from 382a6c7 to f00191f Compare June 23, 2020 02:50
@laiso
Copy link
Contributor

laiso commented Jun 24, 2020

アプリのサイズはインストールやアンインストールの指標に最も大きく影響する要素の 1 つ https://support.google.com/googleplay/android-developer/answer/9302563?hl=ja

と記載されているとうりCovid19Radarにとって有益な変更だと思います +1

@kazumihirose
Copy link
Member

こちらは厚生労働省によって運用されているCOCOAのコードではありません。
大変恐縮なのですが、厚生労働省(COCOA)に再度Issue/PRなど頂ければ幸いです。
何卒宜しくお願い致します。
ただ、非常にありがたいご提案でして、Covid19Radarでもマージいたしました。

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants