[BUG] Problem with class names and NIBs
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Anfängerfreundlichkeit
- 35/100
- Issue-Typ
- Bug
- Klarheit
- Größtenteils klar
- Aktivitätsstatus
- Veraltet
- Tech-Stack
- ios, javascript, swift
- Bereich
- mobile-dev
Rechercherichtung
Reproduziere das JavaScript-Snippet mit dem gepinnten iOSPhotoEditor pod unter JSC und V8, beginnend bei PhotoEditorViewController.class() und initWithNibNameBundle. Vergleiche, wie jede Laufzeit den Klassennamen und das Bundle auflöst; abgeschlossen ist die Aufgabe, wenn PhotoEditorViewController sein vorhandenes NIB unter V8 lädt, ohne ein umbenanntes NIB zu benötigen.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
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'
- Vorherrschende Sprache
- JavaScript
- Sterne
- 150
- Forks
- 43
- Ø Merge
- 3 T. 10 Std.
- Gemergte PRs (30 T.)
- 22
Beitragsleitfaden
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus NativeScript/ios
-
isImplementedInClass leaks the losing sample instance on re-entrant or racing cache population Offen
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 38/100
NativeScript/ios#459 · 1 Kommentar ·
-
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 25/100
NativeScript/ios#445 ·
-
Schwierigkeit 3/5 3-5 Tage Anfängerfreundlichkeit 66/100
NativeScript/ios#414 ·
-
question
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 34/100
NativeScript/ios#364 · 2 Kommentare ·
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 35/100
NativeScript/ios#355 ·
Alle Issues in NativeScript/ios
Ähnliche Issues
-
code-quality refactoring
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 84/100
github/gh-aw-firewall#8816 ·
-
integration:quickjs org:external priority:backlog topic:code-interpreter topic:middleware type:feature
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 74/100
langchain-ai/deepagents#6450 ·
-
optimization optimization:agents-md-curator
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 86/100
githubnext/gh-aw-cao#13143 ·
-
status: needs triage
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 88/100
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 88/100