[BUG] Problem with class names and NIBs
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 35/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- ios, javascript, swift
- 領域
- mobile-dev
調査の方向性
固定された iOSPhotoEditor pod を JSC と V8 の両方で使用して JavaScript スニペットを再現し、PhotoEditorViewController.class() と initWithNibNameBundle から開始します。各 runtime がクラス名と bundle をどのように解決するかを比較します。PhotoEditorViewController が名前を変更した NIB を必要とせずに V8 で既存の NIB を読み込めれば完了です。
索引モデルが issue の本文から書いたものです。
説明
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'
- 主要言語
- JavaScript
- スター
- 150
- フォーク
- 43
- 平均マージ
- 3日 10時間
- マージ済み PR(30日)
- 22
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
NativeScript/ios のほかの issue
-
難易度 5/5 1週間以上 初心者へのやさしさ 38/100
NativeScript/ios#459 · コメント 1 件 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
NativeScript/ios#445 ·
-
難易度 3/5 3〜5日 初心者へのやさしさ 66/100
NativeScript/ios#414 ·
-
question
難易度 4/5 3〜5日 初心者へのやさしさ 34/100
NativeScript/ios#364 · コメント 2 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
NativeScript/ios#355 ·
NativeScript/ios の issue をすべて見る
似ている issue
-
bug customer-eng Durable Agents Inngest status: needs triage
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
-
optimization optimization:agents-md-curator
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
githubnext/gh-aw-cao#13475 ·
-
[BUG]: "Clear All" in Settings doesn't clear the saved analysis, old data comes back after reload オープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
AOSSIE-Org/OrgExplorer#253 · コメント 1 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
oxc-project/oxc#26944 ·
-
ai-observability bug team/ai-observability
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100