Describe the bug
When following this guide to create a custom ViewController and then trying to use Swift in Objective-C, this error happens.
To reproduce
Steps to reproduce the behavior:
Create a new ionic project with this command ionic start SimpleSample tabs --type vue
Then open project folder in VS Code, add iOS Project then Build & Sync
Open in Xcode and follow guide to create a custom MyViewController.swift and set in Main.storyboard as Bridge View Controller, change its parent class to CAPBridgeViewController
Then create new Objective-C source files SampleOC.h & SampleOC.m under App, add #import "App-Swift.h" in SampleOC.m then compile and error occurs
If I delete this line #import "App-Swift.h" or change parent class back to UIViewController, error disappears
Expected behavior
Add #import "App-Swift.h" in SampleOC.m then compile and no error occurs and call swift code from oc has no error.
Screenshots
Browser and OS (please complete the following information)
Describe the bug When following this guide to create a custom ViewController and then trying to use Swift in Objective-C, this error happens.
To reproduce Steps to reproduce the behavior:
ionic start SimpleSample tabs --type vue
Main.storyboard
as Bridge View Controller, change its parent class toCAPBridgeViewController
SampleOC.h
&SampleOC.m
under App, add#import "App-Swift.h"
inSampleOC.m
then compile and error occurs#import "App-Swift.h"
or change parent class back toUIViewController
, error disappearsExpected behavior Add
#import "App-Swift.h"
inSampleOC.m
then compile and no error occurs and call swift code from oc has no error.Screenshots![WX20240516-160445@2x](https://github.com/ionic-team/capacitor-docs/assets/11442631/504345d5-a721-464a-b42a-bd4700975fda)
Browser and OS (please complete the following information)
Additional context No additional descriptions.