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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build errors when Swift class in a Swift target inherits from ObjC class in an an ObjC target, which in turn depends on another target #11672

Open
1 task done
mattwylder opened this issue Nov 30, 2022 · 0 comments

Comments

@mattwylder
Copy link

Report

What did you do?

  • Create a Swift target HouseSwift with a dependency on an Objective C target CatObjC, which in turn has a dependency on another Swift target DogSwift. (The problem also occurs if DogSwift is replaced with an ObjC target)
  • Write an implementation of an Objective C classCat in target CatObjC which uses a Swift class Dog from DogSwift
  • In CatObjC, create a subclass Tabby which inherits Cat
  • Create a Swift class Housewhich inherits Tabby
  • Create a podspec
  • run pod lib lint

What did you expect to happen?

Build without errors. The project builds locally and through Carthage.

What happened instead?

Received build error

 - ERROR | [iOS] [TestingInteroperability/HouseSwift] xcodebuild:  /Users/username/Library/Developer/Xcode/DerivedData/App-gbrkugflhfhqpbhhoaxryivoepsa/Build/Products/Release-iphonesimulator/TestingInteroperability/TestingInteroperability.framework/Headers/TestingInteroperability-Swift.h:267:20: error: cannot find interface declaration for 'Tabby', superclass of 'House'

CocoaPods Environment

Stack

   CocoaPods : 1.11.3
        Ruby : ruby 2.7.6p219 (2022-04-12 revision c9c2245c0a) [arm64-darwin21]
    RubyGems : 3.1.6
        Host : macOS 12.5.1 (21G83)
       Xcode : 14.1 (14B47b)
         Git : git version 2.37.1 (Apple Git-137.1)
Ruby lib dir : /Users/username/.rbenv/versions/2.7.6/lib
Repositories : trunk - CDN - https://cdn.cocoapods.org/

Installation Source

Executable Path: /Users/username/.rbenv/versions/2.7.6/bin/pod

Plugins

cocoapods-deintegrate : 1.0.5
cocoapods-plugins     : 1.0.0
cocoapods-search      : 1.0.1
cocoapods-trunk       : 1.6.0
cocoapods-try         : 1.2.0

Project that demonstrates the issue

https://github.com/jaxdesmarais/TestingInteroperability

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant