[BUG] Problem with class names and NIBs
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 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, javascript, swift
- Lĩnh vực
- mobile-dev
Hướng nghiên cứu
Tái hiện đoạn mã JavaScript với pod iOSPhotoEditor được cố định trên cả JSC và V8, bắt đầu từ PhotoEditorViewController.class() và initWithNibNameBundle. So sánh cách mỗi runtime phân giải tên lớp và bundle; hoàn thành khi PhotoEditorViewController tải NIB hiện có của nó trên V8 mà không yêu cầu một NIB được đổi tên.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
I'm using a POD that has Swift code and XIBs for controllers. This is the pod that I'm using:
pod 'iOSPhotoEditor', :git => 'https://github.com/PeterStaev/photo-editor.git', :commit => '5f90ae8f937e1bf4ef3c46d0fda5fef715c7a5de'
When running with JSC (iOS runtime 6.5.2) When I do:
console.log(PhotoEditorViewController);
I get
function iOSPhotoEditor.PhotoEditorViewController() {
[native code]
}
Which is correct and name so when I try to load the controller with the NIB it works. Here is the code that creates the view controller with the NIB:
const bundle = NSBundle.bundleForClass(PhotoEditorViewController.class());
const viewController = PhotoEditorViewController.alloc().initWithNibNameBundle("PhotoEditorViewController", bundle);
With the v8 runtime seems all the classes are renamed. When I try the same log with the new runtime i get:
function _TtC14iOSPhotoEditor25PhotoEditorViewController() { [native code] }
Since the class is renamed the creation of the viewcontroller fails, as the XIB isn't named accordingly. The exact error is:
CONSOLE ERROR: Error: Could not load NIB in bundle: 'NSBundle </Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/PrivateFrameworks/UIKitCore.framework> (loaded)' with name 'PhotoEditorViewController'
- Ngôn ngữ chính
- JavaScript
- Star
- 150
- Fork
- 43
- Merge trung bình
- 3 ngày 10 giờ
- Pull request đã merge (30 ngày)
- 22
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 NativeScript/ios
-
isImplementedInClass leaks the losing sample instance on re-entrant or racing cache population Đang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 38/100
NativeScript/ios#459 · 1 bình luận ·
-
worker.terminate() is a no-op during entry evaluation, and terminating there wedges teardown Đang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
NativeScript/ios#445 ·
-
Độ khó 3/5 3-5 ngày Mức phù hợp với người mới 66/100
NativeScript/ios#414 ·
-
question
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 34/100
NativeScript/ios#364 · 2 bình luận ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
NativeScript/ios#355 ·
Tất cả issue của NativeScript/ios
Issue tương tự
-
code-quality refactoring
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
github/gh-aw-firewall#8816 ·
-
integration:quickjs org:external priority:backlog topic:code-interpreter topic:middleware type:feature
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
langchain-ai/deepagents#6450 ·
-
optimization optimization:agents-md-curator
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
githubnext/gh-aw-cao#13143 ·
-
status: needs triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100