Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Duplicate interface definition for class 'AppDelegate' #312

Open
vancentvan opened this issue May 16, 2024 · 0 comments
Open

Duplicate interface definition for class 'AppDelegate' #312

vancentvan opened this issue May 16, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@vancentvan
Copy link

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:

  1. Create a new ionic project with this command ionic start SimpleSample tabs --type vue
  2. Then open project folder in VS Code, add iOS Project then Build & Sync
  3. 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
  4. 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
  5. 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
WX20240516-160445@2x

Browser and OS (please complete the following information)

  • OS: macOS Sonoma
  • Browser: safari
  • Node: v20.12.2
  • Npm: 10.5.0
  • Ionic: 7.2.0
  • Xcode: Version 15.3 (15E204a)
  • Visual Studio Code: 1.89.1 (Universal)

Additional context
No additional descriptions.

@vancentvan vancentvan added the bug Something isn't working label May 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant