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

How to depend a local lib in a local lib? #12140

Open
XuQK opened this issue Nov 5, 2023 · 0 comments
Open

How to depend a local lib in a local lib? #12140

XuQK opened this issue Nov 5, 2023 · 0 comments

Comments

@XuQK
Copy link

XuQK commented Nov 5, 2023

Report

What did you do?

My workspace have 3 project, They are App, UMPCore, UMPApplovin, I want UMPApplovin to depend on the locally UMPCore, and App depend on UMPApplovin.

My podspec file for UMPApplovin:

Pod::Spec.new do |s|
  s.name             = 'UMPApplovin'
  s.version          = '0.0.1-alpha.1'
  s.swift_version    = '5.0'
  s.summary          = '********'
  s.description      = <<-DESC
**********.
                       DESC
  s.homepage         = 'https://********'
  # s.license          = { :type => 'MIT', :file => 'LICENSE' }
  s.author           = { ***** }
  s.source = { :http => "*********" }
  s.source_files = 'UMPApplovin/**/*.*'
  s.platform = :ios, '14.0'
  s.static_framework = true
  s.dependency 'UMPCore'
end

What did you expect to happen?

Start success.

What happened instead?

I run "pod install", there is no problem, and run "Start the active scheme" in Xcode, It always fails to run, the error:
image

If I comment the "install!" in Podfile, New mistakes will be made:
image

Notice what's in the red box, I can actually find 'Bridge.h' in Debug-iphoneos/UMPCore/UMPCore.framework/Headers/.

CocoaPods Environment

Stack

   CocoaPods : 1.14.2
        Ruby : ruby 3.2.2 (2023-03-30 revision e51014f9c0) [arm64-darwin22]
    RubyGems : 3.4.20
        Host : macOS 13.6 (22G120)
       Xcode : 15.0 (15A240d)
         Git : git version 2.39.3 (Apple Git-145)
Ruby lib dir : /Users/amber/.rbenv/versions/3.2.2/lib
Repositories : amber - git - git@secret.git @ 120c90e92115f428b96c09af84286a650c38fc38

               amberweather-game_libs-cocoapodsspecs - git - http://secret @ 120c90e92115f428b96c09af84286a650c38fc38

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

Installation Source

Executable Path: /Users/amber/.rbenv/versions/3.2.2/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

Podfile

workspace 'App'
project 'App/App.xcodeproj'

platform :ios, '14.0'
supports_swift_versions '5.0'
use_frameworks!

install! 'cocoapods',
         :generate_multiple_pod_projects => true,
         :disable_input_output_paths => true

pod 'UMPCore', :path => './UMPCore/UMPCore.podspec'


target 'MediationIOSPluginsSample' do
  pod 'UMPApplovin', :path => 'UMPApplovin'

  target 'MediationIOSPluginsSampleTests' do
    inherit! :search_paths
  end

  target 'MediationIOSPluginsSampleUITests' do
  end
end

post_install do |installer|
  installer.generated_projects.each do |project|
    project.targets.each do |target|
      target.build_configurations.each do |config|
        config.build_settings['SWIFT_OBJC_INTEROP_MODE'] = 'objcxx'
        config.build_settings['SWIFT_VERSION'] = '5.0'
        config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '14.0'
      end
    end
  end
end

Project that demonstrates the issue

https://github.com/XuQK/CocoaPodsIssueSample.git

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