iOS package path has changed, ionic run ios throws an error

Đang mở
#5,048 2 bình luận 4 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
35/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
ios, typescript
Lĩnh vực
cli, mobile-dev

Hướng nghiên cứu

Bắt đầu trong packages/@ionic/cli/src/lib/integrations/cordova/project.ts tại đường dẫn được tham chiếu và theo dõi cách đường dẫn của build artifact iOS được truyền đến native-run. Tái hiện bằng Xcode 14.3.1 với ionic cordova run ios --device, sau đó so sánh đường dẫn gây lỗi platforms/ios/build/device với platforms/ios/build/Debug-iphoneos. Được xem là hoàn thành khi lệnh định vị được IPA và khởi chạy nó thông qua native-run mà không gặp lỗi đường dẫn.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

triage

Description:
It appears that the latest version of XCode builds the app to a different folder (my version is 14.3.1). This causes an error when you run ionic cordova run ios because native-run is given the wrong path.

The command executed and error:

> native-run ios --app platforms/ios/build/device/Zimmo.ipa --device
[native-run] ERR_UNKNOWN: Path 'platforms/ios/build/device/Zimmo.ipa' not found
[ERROR] An error occurred while running subprocess native-run.

However, my app is now in platforms/ios/build/Debug-iphoneos folder. This works:

native-run ios --app platforms/ios/build/Debug-iphoneos/Zimmo.ipa --device

Steps to Reproduce:

  • In any Cordova + Ionic project, install the latest version of XCode.
  • Run ionic cordova run ios --device

Output:
[native-run] ERR_UNKNOWN: Path 'platforms/ios/build/device/Zimmo.ipa' not found
[ERROR] An error occurred while running subprocess native-run.

My ionic info:

Ionic:

   Ionic CLI                     : 7.1.1 (/Users/mathieu/.nvm/versions/node/v18.12.1/lib/node_modules/@ionic/cli)
   Ionic Framework               : @ionic/angular 7.1.0
   @angular-devkit/build-angular : 16.2.1
   @angular-devkit/schematics    : 16.2.1
   @angular/cli                  : 16.2.1
   @ionic/angular-toolkit        : 7.0.0

Cordova:

   Cordova CLI       : 12.0.0 (cordova-lib@12.0.1)
   Cordova Platforms : android 12.0.1, ios 7.0.1
   Cordova Plugins   : cordova-plugin-ionic-keyboard 2.2.0, cordova-plugin-ionic-webview 5.0.0, (and 21 other plugins)

Utility:

   cordova-res                          : not installed globally
   native-run (update available: 1.7.3) : 1.7.2

System:

   Android SDK Tools : 26.1.1 (/Users/mathieu/Library/Android/sdk)
   ios-deploy        : 1.12.1
   ios-sim           : 8.0.2
   NodeJS            : v18.12.1 (/Users/mathieu/.nvm/versions/node/v18.12.1/bin/node)
   npm               : 8.19.2
   OS                : macOS Unknown
   Xcode             : Xcode 14.3.1 Build version 14E300c

Other Information:
I guess the problem is caused here:
https://github.com/ionic-team/ionic-cli/blob/develop/packages/%40ionic/cli/src/lib/integrations/cordova/project.ts#L15

I'm not sure if this can just be changed, this may need to become an array for backwards compatibility ? I can create a PR for this if you like.

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

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của ionic-team/ionic-cli

Tất cả issue của ionic-team/ionic-cli

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.