MeetYouDevs / cocoapods-imy-bin

1.05k stars 245 forks source link

RUN Swift-OC-Demo Failure #112

Open CQXfly opened 3 years ago

CQXfly commented 3 years ago

i can run oc demo success, but when i try use swift , it seems isn't simple.

Swift-OC-Demo

use pod bin auto --all-make command run in the Swift-OC-Demo project. get this error .

/Users/user/foxProject/mmbintest/Swift-OC-Demo/Swift_OC-Swift.h
/Users/user/foxProject/mmbintest/Swift-OC-Demo/Swift-OCTests
/Users/user/foxProject/mmbintest/Swift-OC-Demo/Swift-OC.xcworkspace
/Users/user/foxProject/mmbintest/Swift-OC-Demo/Swift-OC.xcodeproj
/Users/user/foxProject/mmbintest/Swift-OC-Demo/Swift-OCUITests
/Users/user/foxProject/mmbintest/Swift-OC-Demo/README.md
/Users/user/foxProject/mmbintest/Swift-OC-Demo/Pods
/Users/user/foxProject/mmbintest/Swift-OC-Demo/Swift-OC
/Users/user/foxProject/mmbintest/Swift-OC-Demo/Podfile
/Users/user/foxProject/mmbintest/Swift-OC-Demo/.git
/Users/user/foxProject/mmbintest/Swift-OC-Demo/Swift-OC.podspec
====== cocoapods-imy-bin 0.3.1.2 版本 ========

======  dev 环境 ========

======  dev 环境 ========

Generating Swift-OC in `../Swift-OC-Demo-build-temp/bin-archive/Swift-OC`
[!] The 'Pods-App-iOS' target has transitive dependencies that include statically linked binaries: (/Users/user/foxProject/mmbintest/Swift-OC-Demo-build-temp/bin-archive/Swift-OC/Pods/Alamofire/Alamofire.framework)

[!] ====== cocoapods-imy-bin 0.3.1.2 版本 ========

[!] ======  dev 环境 ========

[!] Automatically assigning platform `iOS` with version `9.0` on target `App-iOS` because no platform was specified. Please specify a platform for this target in your Podfile. See `https://guides.cocoapods.org/syntax/podfile.html#platform`.

I‘m looking forward for your answer. thnx.

CQXfly commented 3 years ago

i remove this line use_frameworks! in podfile. now a new error

    The following build commands failed:
        CompileSwift normal arm64 /Users/user/foxProject/mmbintest/Swift-OC-Demo-build-temp/bin-archive/Swift-OC/Pods/Moya/Sources/Moya/Plugins/AccessTokenPlugin.swift
        CompileSwift normal arm64 /Users/user/foxProject/mmbintest/Swift-OC-Demo-build-temp/bin-archive/Swift-OC/Pods/Moya/Sources/Moya/AnyEncodable.swift
        CompileSwift normal arm64 /Users/user/foxProject/mmbintest/Swift-OC-Demo-build-temp/bin-archive/Swift-OC/Pods/Moya/Sources/Moya/Cancellable.swift
        CompileSwift normal arm64 /Users/user/foxProject/mmbintest/Swift-OC-Demo-build-temp/bin-archive/Swift-OC/Pods/Moya/Sources/Moya/Plugins/CredentialsPlugin.swift
        CompileSwift normal arm64 /Users/user/foxProject/mmbintest/Swift-OC-Demo-build-temp/bin-archive/Swift-OC/Pods/Moya/Sources/Moya/Endpoint.swift
        CompileSwift normal arm64 /Users/user/foxProject/mmbintest/Swift-OC-Demo-build-temp/bin-archive/Swift-OC/Pods/Moya/Sources/Moya/Image.swift
        CompileSwift normal arm64 /Users/user/foxProject/mmbintest/Swift-OC-Demo-build-temp/bin-archive/Swift-OC/Pods/Moya/Sources/Moya/Moya+Alamofire.swift
        CompileSwift normal arm64 /Users/user/foxProject/mmbintest/Swift-OC-Demo-build-temp/bin-archive/Swift-OC/Pods/Moya/Sources/Moya/MoyaError.swift
        CompileSwift normal arm64 /Users/user/foxProject/mmbintest/Swift-OC-Demo-build-temp/bin-archive/Swift-OC/Pods/Moya/Sources/Moya/MoyaProvider+Defaults.swift
        CompileSwift normal arm64 /Users/user/foxProject/mmbintest/Swift-OC-Demo-build-temp/bin-archive/Swift-OC/Pods/Moya/Sources/Moya/MoyaProvider+Internal.swift
        CompileSwift normal arm64 /Users/user/foxProject/mmbintest/Swift-OC-Demo-build-temp/bin-archive/Swift-OC/Pods/Moya/Sources/Moya/MoyaProvider.swift
        CompileSwift normal arm64 /Users/user/foxProject/mmbintest/Swift-OC-Demo-build-temp/bin-archive/Swift-OC/Pods/Moya/Sources/Moya/MultipartFormData.swift
        CompileSwift normal arm64 /Users/user/foxProject/mmbintest/Swift-OC-Demo-build-temp/bin-archive/Swift-OC/Pods/Moya/Sources/Moya/MultiTarget.swift
        CompileSwift normal arm64 /Users/user/foxProject/mmbintest/Swift-OC-Demo-build-temp/bin-archive/Swift-OC/Pods/Moya/Sources/Moya/Plugins/NetworkActivityPlugin.swift
        CompileSwift normal arm64 /Users/user/foxProject/mmbintest/Swift-OC-Demo-build-temp/bin-archive/Swift-OC/Pods/Moya/Sources/Moya/Plugins/NetworkLoggerPlugin.swift
        CompileSwift normal arm64 /Users/user/foxProject/mmbintest/Swift-OC-Demo-build-temp/bin-archive/Swift-OC/Pods/Moya/Sources/Moya/Plugin.swift
        CompileSwift normal arm64 /Users/user/foxProject/mmbintest/Swift-OC-Demo-build-temp/bin-archive/Swift-OC/Pods/Moya/Sources/Moya/Response.swift
        CompileSwift normal arm64 /Users/user/foxProject/mmbintest/Swift-OC-Demo-build-temp/bin-archive/Swift-OC/Pods/Moya/Sources/Moya/TargetType.swift
        CompileSwift normal arm64 /Users/user/foxProject/mmbintest/Swift-OC-Demo-build-temp/bin-archive/Swift-OC/Pods/Moya/Sources/Moya/Task.swift
        CompileSwift normal arm64 /Users/user/foxProject/mmbintest/Swift-OC-Demo-build-temp/bin-archive/Swift-OC/Pods/Moya/Sources/Moya/URL+Moya.swift
        CompileSwift normal arm64 /Users/user/foxProject/mmbintest/Swift-OC-Demo-build-temp/bin-archive/Swift-OC/Pods/Moya/Sources/Moya/URLRequest+Encoding.swift
        CompileSwift normal arm64 /Users/user/foxProject/mmbintest/Swift-OC-Demo-build-temp/bin-archive/Swift-OC/Pods/Moya/Sources/Moya/ValidationType.swift
        CompileSwiftSources normal arm64 com.apple.xcode.tools.swift.compiler
    (23 failures)

I think should not remove this use_frameworks. can anyone help me?

CQXfly commented 3 years ago
cocoapods (1.9.1)
cocoapods-binance-extension (0.0.1)
cocoapods-core (1.9.1)
cocoapods-deintegrate (1.0.4)
cocoapods-disable-podfile-validations (0.1.1)
cocoapods-downloader (1.4.0)
cocoapods-generate (2.0.1)
cocoapods-imy-bin (0.3.1.2)
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)
cocoapods-xcode-patch (0.2.2)
CQXfly commented 3 years ago

remove local mogodb's lib and old static spec. retry the steps.

    The following build commands failed:
        CompileC /Users/user/foxProject/mmbintest/Swift-OC-Demo-build-temp/bin-archive/Swift-OC/build/Pods.build/Debug-iphoneos/Swift-OC.build/Objects-normal/arm64/HomeViewController.o /Users/user/foxProject/mmbintest/Swift-OC-Demo/Swift-OC/HomeViewController.m normal arm64 objective-c com.apple.compilers.llvm.clang.1_0.compiler
    (1 failure)
dabing1022 commented 3 years ago

Please list your Podfile、Podspec configs.

CQXfly commented 3 years ago

just Swift-OC-Demo project

CQXfly commented 3 years ago

@dabing1022 can you run the demo project local?

CQXfly commented 3 years ago

find the error

Swift-OC-Demo/Swift-OC/HomeViewController.m:12:9: fatal error: 'Lottie-Swift.h' file not found
    #import "Lottie-Swift.h"
            ^~~~~~~~~~~~~~~~
    52 warnings and 1 error generated.

Remove code related to Lottie, still can't work.

====== cocoapods-imy-bin 0.3.1.3 版本 ========

======  dev 环境 ========

======  dev 环境 ========
[pod gen] Running with `pod gen` configuration {
  podfile_path: /Users/user/foxProject/mmbintest/Swift-OC-Demo/Podfile,
  podfile: Podfile,
  use_podfile: true,
  use_podfile_plugins: true,
  podfile_plugins: {"cocoapods-imy-bin"=>{}},
  lockfile: #<Pod::Lockfile>,
  use_lockfile: true,
  use_lockfile_versions: true,
  use_libraries: false,
  generate_multiple_pod_projects: false,
  incremental_installation: false,
  gen_directory: /Users/user/foxProject/mmbintest/Swift-OC-Demo-build-temp/bin-archive,
  auto_open: false,
  clean: true,
  podspec_paths: [#<Pathname:/Users/user/foxProject/mmbintest/Swift-OC-Demo/Swift-OC.podspec>, #<Pathname:/Users/user/foxProject/mmbintest/Swift-OC-Demo/Swift-OC.podspec>],
  podspecs: [#<Pod::Specification name="Swift-OC">, #<Pod::Specification name="Swift-OC">],
  sources: ["git@github.com:CQXfly/example_pod_spec_bin.git", "https://git.toolsfdg.net/fe/BNCSpecs.git", "git@github.com:CQXfly/example_pod_spec_bin.git", "https://git.toolsfdg.net/fe/BNCSpecs.git", "https://cdn.cocoapods.org"],
  local_sources: [],
  repo_update: false,
  use_default_plugins: false,
  deterministic_uuids: false,
  share_schemes_for_development_pods: true,
  warn_for_multiple_pod_sources: false,
  use_modular_headers: false }

Generating Swift-OC in `../Swift-OC-Demo-build-temp/bin-archive/Swift-OC`
    Cleaning gen install directory
    Creating stub application
    Writing Podfile

Installing...

Installing Alamofire (4.9.1)
Installing HandyJSON (5.0.2)
Installing Kingfisher (4.10.1)
Installing MYLCommonUI (0.0.11)
Installing Masonry (1.1.0)
Installing Moya (13.0.1)
Installing Result (4.1.0)
Installing RxCocoa (5.1.1)
Installing RxRelay (5.1.1)
Installing RxSwift (5.1.1)
Installing SnapKit (4.2.0)
Installing Swift-OC (1.0.2.2)
Installing Toast (4.0.0)
Installing lottie-ios (3.1.9)

[!] Please close any current Xcode sessions and use `Swift-OC.xcworkspace` for this project from now on.
Pod installation complete! There are 10 dependencies from the Podfile and 14 total pods installed.

Performing post-installation steps
    Open `../Swift-OC-Demo-build-temp/bin-archive/Swift-OC/Swift-OC.xcworkspace` to work on Swift-OC

Building static framework Swift-OC (1.0.2.2)
  command = xcodebuild GCC_PREPROCESSOR_DEFINITIONS='$(inherited)'  ARCHS='arm64' OTHER_CFLAGS='-fembed-bitcode -Qunused-arguments'
  CONFIGURATION_BUILD_DIR=/Users/user/foxProject/mmbintest/Swift-OC-Demo-build-temp/bin-archive/Swift-OC/build-arm64 clean build -configuration Debug -target
  Swift-OC -project ./Pods/Pods.xcodeproj 2>&1
  command = xcodebuild GCC_PREPROCESSOR_DEFINITIONS='$(inherited)'  ARCHS='armv7' OTHER_CFLAGS='-fembed-bitcode -Qunused-arguments'
  CONFIGURATION_BUILD_DIR=/Users/user/foxProject/mmbintest/Swift-OC-Demo-build-temp/bin-archive/Swift-OC/build-armv7 clean build -configuration Debug -target
  Swift-OC -project ./Pods/Pods.xcodeproj 2>&1
  Building simulator libraries
  command = xcodebuild GCC_PREPROCESSOR_DEFINITIONS='$(inherited)'  -sdk iphonesimulator ARCHS='x86_64'
  CONFIGURATION_BUILD_DIR=/Users/user/foxProject/mmbintest/Swift-OC-Demo-build-temp/bin-archive/Swift-OC/build-x86_64 clean build -configuration Debug -target
  Swift-OC -project ./Pods/Pods.xcodeproj 2>&1

Building framework  Swift-OC (1.0.2.2)

Updating Spec Repositories

更新私有源仓库 example_spec_bin_dev
更新私有源仓库 BNCSpecs
  $ /usr/bin/git -C /Users/user/.cocoapods/repos/BNCSpecs fetch origin --progress
  $ /usr/bin/git -C /Users/user/.cocoapods/repos/example_spec_bin_dev fetch origin --progress
  $ /usr/bin/git -C /Users/user/.cocoapods/repos/BNCSpecs rev-parse --abbrev-ref HEAD
  master
  $ /usr/bin/git -C /Users/user/.cocoapods/repos/BNCSpecs reset --hard origin/master
  HEAD is now at 6d54418 [Add] Bugfly (0.1.0)
  $ /usr/bin/git -C /Users/user/.cocoapods/repos/example_spec_bin_dev rev-parse --abbrev-ref HEAD
  main
  $ /usr/bin/git -C /Users/user/.cocoapods/repos/example_spec_bin_dev reset --hard origin/main
  HEAD is now at 7b93820 [Add] MJRefresh (3.5.0)

[!] ====== cocoapods-imy-bin 0.3.1.3 版本 ========

[!] ======  dev 环境 ========

[!] 【Swift-OC | 1.0.2.2】组件spec push失败 .

check the dir in Swift-OC-Demo-build-temp, there's no zip file in the bin-zip. but have build-arm64 build-armv7 build-x86_64

CQXfly commented 3 years ago

sry, we use the command pod bin auto, it will not make depency pods to be static library. we use the pod bin auto --all-make instead , it's ok now. but the Lottie problems seems should be fixed

dabing1022 commented 3 years ago

I recommend you to use the master branch, because the author has not released the latest tag, the current tag has a bug

linkhui commented 3 years ago

sry, we use the command pod bin auto, it will not make depency pods to be static library. we use the pod bin auto --all-make instead , it's ok now. but the Lottie problems seems should be fixed

pod bin auto or pod bin auto --all-make , I still got error if I remove the use_framework!,

<unknown>:0: error: module map file '/Users/code/binary/Swift-OC-Demo-build-temp/bin-archive/Swift-OC/build/Debug-iphoneos/Alamofire/Alamofire.modulemap' not found
<unknown>:0: error: module map file '/Users/code/binary/Swift-OC-Demo-build-temp/bin-archive/Swift-OC/build/Debug-iphoneos/Alamofire/Alamofire.modulemap' not found
<unknown>:0: error: underlying Objective-C module 'Moya' not found