Wrong Info.plist generated by disableAppTransportSecurity
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 45/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- typescript
- Lĩnh vực
- cli
Hướng nghiên cứu
Bắt đầu trong packages/@ionic/cli/src/lib/integrations/capacitor/ios.ts, cụ thể là phương thức disableAppTransportSecurity được đề cập trong issue, và tái hiện vấn đề với một từ điển NSAppTransportSecurity hiện có. Xác minh rằng Info.plist được tạo vẫn hợp lệ và ionic capacitor run ios -l có thể build thành công với cấu hình hiện có.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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:
- Create an ionic app with iOS support
- 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>
- 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/>
- Ngôn ngữ chính
- TypeScript
- Star
- 2k
- Fork
- 681
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của ionic-team/ionic-cli
-
triage
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 65/100
ionic-team/ionic-cli#5016 ·
-
ionic-cli development status Đang mởtriage
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 15/100
ionic-team/ionic-cli#5131 ·
-
triage
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 56/100
ionic-team/ionic-cli#5130 ·
-
triage
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 72/100
ionic-team/ionic-cli#5129 ·
-
triage
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 42/100
ionic-team/ionic-cli#5127 · 2 bình luận ·
Tất cả issue của ionic-team/ionic-cli
Issue tương tự
-
Browser Waiting for: Product Owner
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
getsentry/sentry-javascript#24577 · 1 bình luận ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
agilepathway/label-checker#640 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
copse-dev/agent-pane#2953 ·
-
[aw] Upgrade available Đang mởagentic-workflows
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 85/100
githubnext/rig#534 ·
-
automation missing-model model-sync provider:pioneer
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
anomalyco/models.dev#7701 ·