Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Wrong Info.plist generated by disableAppTransportSecurity

オープン
#5,090 コメント 1 件 リアクション 2 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
45/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
停滞
技術スタック
typescript
領域
cli

調査の方向性

packages/@ionic/cli/src/lib/integrations/capacitor/ios.ts から始め、特に issue で参照されている disableAppTransportSecurity メソッドを確認し、既存の NSAppTransportSecurity 辞書を使って問題を再現してください。生成された Info.plist が有効なままであること、および既存の設定で ionic capacitor run ios -l を正常にビルドできることを確認してください。

索引モデルが issue の本文から書いたものです。

説明

triage

Description:
The Info.plist generated by the command ionic capacitor run ios -l is incorrect and prevents Xcode from building the app if the key NSAppTransportSecurity is already defined.
The issue started after updating to Xcode 15.2. Previous versions like 14 work as expected.

Steps to Reproduce:

  1. Create an ionic app with iOS support
  2. Add the following configurations to the Info.plist file:
<key>NSAppTransportSecurity</key>
	<dict>
		<key>NSExceptionDomains</key>
		<dict>
			<key>facebook.com</key>
			<dict>
				<key>NSIncludesSubdomains</key>
				<true/>
				<key>NSThirdPartyExceptionRequiresForwardSecrecy</key>
				<false/>
			</dict>
		</dict>
	</dict>
  1. Run the app with the command ionic capacitor run ios -l.

Output:
The Xcode build fails with the following error:

[capacitor]         error: unable to read property list from file: /Volumes/Projects/xxx/ios/App/App/Info.plist: The operation couldn’t be completed. (XCBUtil.PropertyListConversionError error 2.) (in target 'App' from project 'App')

My ionic info:

Ionic:

   Ionic CLI       : 6.20.9
   Ionic Framework : @ionic/react 6.7.5

Capacitor:

   Capacitor CLI      : 6.0.0
   @capacitor/android : 6.0.0
   @capacitor/core    : 6.0.0
   @capacitor/ios     : 6.0.0

Utility:

   cordova-res : not installed globally
   native-run  : 2.0.1

System:

   NodeJS : v20.13.1 (/Users/xxxx/.nvm/versions/node/v20.13.1/bin/node)
   npm    : 10.5.2
   OS     : macOS Unknown

Other Information:
The problem is in the disableAppTransportSecurity method in https://github.com/ionic-team/ionic-cli/blob/%40ionic/cli%407.2.0/packages/%40ionic/cli/src/lib/integrations/capacitor/ios.ts

Line 45 adds the true value without adding NSAllowsArbitraryLoads key.

As a workaround I added the default values to the Info.plist in the NSAppTransportSecurity dict:

    <key>NSAllowsArbitraryLoads</key>
    <false/>
主要言語
TypeScript
スター
2k
フォーク
681
PR マージ指標
30日以内にマージされた PR はありません

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

ionic-team/ionic-cli のほかの issue

ionic-team/ionic-cli の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。