CocoaPods / Xcodeproj

Create and modify Xcode projects from Ruby.

Home Page:http://rubygems.org/gems/xcodeproj

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

RuntimeError - Expected target or target_proxy on App Extension

ChurikiTenna opened this issue · comments

I have Podfile like this,

platform :ios, '12.0'

target 'TeacherMatching' do

  use_frameworks!
  pod 'AgoraRtcEngine_iOS', '3.7.0'

end

target 'Agora-ScreenShare-Extension' do

  use_frameworks!
  pod 'AgoraRtcEngine_iOS', '3.7.0'
  
end

But it fails with this error when I run arch -x86_64 pod install.

RuntimeError - Expected target or target_proxy, from which to fetch a uuid for target ''.Find and clear the PBXTargetDependency entry with uuid '2183BDAD285870B50030E64E' in your .xcodeproj.
/Library/Ruby/Gems/2.6.0/gems/xcodeproj-1.21.0/lib/xcodeproj/project/object/target_dependency.rb:62:in `native_target_uuid'
/Library/Ruby/Gems/2.6.0/gems/xcodeproj-1.21.0/lib/xcodeproj/project.rb:610:in `map'
/Library/Ruby/Gems/2.6.0/gems/xcodeproj-1.21.0/lib/xcodeproj/project.rb:610:in `block in host_targets_for_embedded_target'
/Library/Ruby/Gems/2.6.0/gems/xcodeproj-1.21.0/lib/xcodeproj/project.rb:608:in `select'
/Library/Ruby/Gems/2.6.0/gems/xcodeproj-1.21.0/lib/xcodeproj/project.rb:608:in `host_targets_for_embedded_target'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/installer/analyzer.rb:356:in `block (2 levels) in analyze_host_targets_in_podfile'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/installer/analyzer.rb:355:in `each'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/installer/analyzer.rb:355:in `flat_map'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/installer/analyzer.rb:355:in `block in analyze_host_targets_in_podfile'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/installer/analyzer.rb:354:in `each'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/installer/analyzer.rb:354:in `analyze_host_targets_in_podfile'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/installer/analyzer.rb:467:in `generate_targets'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/installer/analyzer.rb:127:in `analyze'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/installer.rb:416:in `analyze'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/installer.rb:241:in `block in resolve_dependencies'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/user_interface.rb:64:in `section'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/installer.rb:240:in `resolve_dependencies'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/installer.rb:161:in `install!'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/command/install.rb:52:in `run'
/Library/Ruby/Gems/2.6.0/gems/claide-1.0.3/lib/claide/command.rb:334:in `run'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/command.rb:52:in `run'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/bin/pod:55:in `<top (required)>'
/usr/local/bin/pod:23:in `load'
/usr/local/bin/pod:23:in `<main>'

Stack

   CocoaPods : 1.11.3
        Ruby : ruby 2.6.8p205 (2021-07-07 revision 67951) [universal.x86_64-darwin21]
    RubyGems : 3.0.3.1
        Host : macOS 12.5 (21G72)
       Xcode : 13.4.1 (13F100)
         Git : git version 2.32.1 (Apple Git-133)
Ruby lib dir : /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib
Repositories : cocoapods - git - https://github.com/CocoaPods/Specs.git @ 286097a510b9c94dcc9a32cdaf1c446e24a466f4

               master - git - https://github.com/CocoaPods/Specs.git @ ac6fcaad7d603be7520b0bc7265d97b0b0f718f0

               sdk-banuba-banuba-sdk-podspecs - git - https://github.com/sdk-banuba/banuba-sdk-podspecs.git @ b8f80c174743a4e21b80461953447689e2a32de2

               trunk - CDN - https://cdn.cocoapods.org/

Plugins

cocoapods-deintegrate : 1.0.4
cocoapods-plugins     : 1.0.0
cocoapods-search      : 1.0.0
cocoapods-stats       : 1.1.0
cocoapods-trunk       : 1.5.0
cocoapods-try         : 1.2.0

I didn't find any PBXTargetDependency in my Xcode project.

When I remove target 'Agora-ScreenShare-Extension' do... part, pod install works, so Agora-ScreenShare-Extension seems to be causing the issue.
It was working fine before though. I haven't touched cocoapod for few months and this happened.

I've been struggling for hours... Any workaround?
If I need to provide more information, I am happy to do so.

I had null dependency in Build Phase > Dependencies.
Deleted the dependency, then it worked.