-1

I am building an CocoaPods with making Touch Framework.

The name of it is Elias for just trying and I am starting with a simple tutorial but I've not forwarding my process because of bunch of lint errors. The file scheme is like in below and I would love to describe what's inside in Service.swift.

enter image description here

It's a dump class.

class Service{

    private init() {

    }


    public static func doSomething() -> String {
        return "***"
    }


}

And I tagged my project as 1.0.0

So here is the .podspec file

Pod::Spec.new do |s|

  s.name         = "Elias"
  s.version      = "1.0.0"
  s.summary      = "The little description"

  s.description  = "Simple description string it is bla bla"
  s.homepage     = "https://gitlab.com/mycurrentaddress/elias"

  s.license      = "MIT"

  s.author             = { "mycurrentaddress" => "mymail@address" }
  s.platform     = :ios, "12.0"

  s.source       = { :git => "https://gitlab.com/currentaddress/elias.git", :tag => "1.0.0" }

  s.source_files  = "Elias/**/*"

end

When I make pod spec lint to check it the error has generated like below.

-> Elias (1.0.0)
    - WARN  | summary: The summary is not meaningful.
    - WARN  | description: The description is shorter than the summary.
    - WARN  | [iOS] license: Unable to find a license file
    - WARN  | [iOS] swift: The validator used Swift `4.0` by default because no Swift version was specified. To specify a Swift version during validation, add the `swift_versions` attribute in your podspec. Note that usage of a `.swift-version` file is now deprecated.
    - ERROR | [iOS] xcodebuild: Returned an unsuccessful exit code. You can use `--verbose` for more information.
    - NOTE  | xcodebuild:  note: Using new build system
    - NOTE  | [iOS] xcodebuild:  note: Planning build
    - NOTE  | [iOS] xcodebuild:  note: Constructing build description
    - NOTE  | [iOS] xcodebuild:  error: Multiple commands produce 'mypath/Xcode/DerivedData/App-ddfwkgthjshbdqdbsavzaymtdyeo/Build/Products/Release-iphonesimulator/Elias/Elias.framework/Info.plist':
    - NOTE  | [iOS] xcodebuild:  warning: Skipping code signing because the target does not have an Info.plist file and one is not being generated automatically. (in target 'App' from project 'App')
    - NOTE  | [iOS] xcodebuild:  warning: duplicate output file 'mypath/Xcode/DerivedData/App-ddfwkgthjshbdqdbsavzaymtdyeo/Build/Products/Release-iphonesimulator/Elias/Elias.framework/Info.plist' on task: ProcessInfoPlistFile mypath/Xcode/DerivedData/App-ddfwkgthjshbdqdbsavzaymtdyeo/Build/Products/Release-iphonesimulator/Elias/Elias.framework/Info.plist Target Support Files/Elias/Elias-Info.plist (in target 'Elias' from project 'Pods')

And when I do with --verbose it generated this output.

** CLEAN SUCCEEDED **

    note: Using new build system
    note: Planning build
    note: Constructing build description
    Build system information
    error: Multiple commands produce 'mypath/Xcode/DerivedData/App-hdkgocdtxpbmjvejebpnjgvfydfi/Build/Products/Release-iphonesimulator/Elias/Elias.framework/Info.plist':
    1) Target 'Elias' (project 'Pods') has copy command from '/var/folders/x6/0rn_y5_d1fj3dp4zc99csdb00000gq/T/CocoaPods-Lint-20191024-93856-9tjcsz-Elias/Pods/Elias/Elias/Info.plist' to 'mypath/Xcode/DerivedData/App-hdkgocdtxpbmjvejebpnjgvfydfi/Build/Products/Release-iphonesimulator/Elias/Elias.framework/Info.plist'
    2) Target 'Elias' (project 'Pods') has process command with output 'mypath/Xcode/DerivedData/App-hdkgocdtxpbmjvejebpnjgvfydfi/Build/Products/Release-iphonesimulator/Elias/Elias.framework/Info.plist'

    warning: Skipping code signing because the target does not have an Info.plist file and one is not being generated automatically. (in target 'App' from project 'App')
    warning: duplicate output file 'mypath/Xcode/DerivedData/App-hdkgocdtxpbmjvejebpnjgvfydfi/Build/Products/Release-iphonesimulator/Elias/Elias.framework/Info.plist' on task: ProcessInfoPlistFile mypath/Xcode/DerivedData/App-hdkgocdtxpbmjvejebpnjgvfydfi/Build/Products/Release-iphonesimulator/Elias/Elias.framework/Info.plist /var/folders/x6/0rn_y5_d1fj3dp4zc99csdb00000gq/T/CocoaPods-Lint-20191024-93856-9tjcsz-Elias/Pods/Target Support Files/Elias/Elias-Info.plist (in target 'Elias' from project 'Pods')
    ** BUILD FAILED **

   Testing with `xcodebuild`. 
 -> Elias (1.0.0)
    - WARN  | summary: The summary is not meaningful.
    - WARN  | description: The description is shorter than the summary.
    - WARN  | [iOS] license: Unable to find a license file
    - WARN  | [iOS] swift: The validator used Swift `4.0` by default because no Swift version was specified. To specify a Swift version during validation, add the `swift_versions` attribute in your podspec. Note that usage of a `.swift-version` file is now deprecated.
    - ERROR | [iOS] xcodebuild: Returned an unsuccessful exit code.
    - NOTE  | xcodebuild:  note: Using new build system
    - NOTE  | [iOS] xcodebuild:  note: Planning build
    - NOTE  | [iOS] xcodebuild:  note: Constructing build description
    - NOTE  | [iOS] xcodebuild:  error: Multiple commands produce 'mypath/Xcode/DerivedData/App-hdkgocdtxpbmjvejebpnjgvfydfi/Build/Products/Release-iphonesimulator/Elias/Elias.framework/Info.plist':
    - NOTE  | [iOS] xcodebuild:  warning: Skipping code signing because the target does not have an Info.plist file and one is not being generated automatically. (in target 'App' from project 'App')
    - NOTE  | [iOS] xcodebuild:  warning: duplicate output file 'mypath/Xcode/DerivedData/App-hdkgocdtxpbmjvejebpnjgvfydfi/Build/Products/Release-iphonesimulator/Elias/Elias.framework/Info.plist' on task: ProcessInfoPlistFile mypath/Xcode/DerivedData/App-hdkgocdtxpbmjvejebpnjgvfydfi/Build/Products/Release-iphonesimulator/Elias/Elias.framework/Info.plist Target Support Files/Elias/Elias-Info.plist (in target 'Elias' from project 'Pods')

Error commonly start in this line.

error: Multiple commands produce 'mypath/Xcode/DerivedData/App-hdkgocdtxpbmjvejebpnjgvfydfi/Build/Products/Release-iphonesimulator/Elias/Elias.framework/Info.plist'

Is there any idea about this situation to solve?

Thanks in advance.

Edit: (useful links)

Create CocoaPod

Why your podspec is failing

The solutions in here not worked for me

Edit:

[![Ignoring unf_ext-0.0.7.5 because its extensions are not built.  Try: gem pristine unf_ext --version 0.0.7.5

 -> BlinkingLabel (0.1.0)
    - ERROR | \[iOS\] file patterns: The `source_files` pattern did not match any file.
    - NOTE  | xcodebuild:  note: Using new build system
    - NOTE  | \[iOS\] xcodebuild:  note: Planning build
    - NOTE  | \[iOS\] xcodebuild:  note: Constructing build description
    - NOTE  | \[iOS\] xcodebuild:  warning: Skipping code signing because the target does not have an Info.plist file and one is not being generated automatically. (in target 'App' from project 'App')

\[!\] BlinkingLabel did not pass validation, due to 1 error.
You can use the `--no-clean` option to inspect any issue.][5]][5]

I am getting an error via pod lib lint because of - ERROR | [iOS] file patterns: Thesource_filespattern did not match any file.

enter image description here

And source files prop is that

s.source_files = 'BlinkingLabel/Classes/**/*'

Is there any suggession?

eemrah
  • 1,603
  • 3
  • 19
  • 37
  • Have you see [Xcode 10 Error: Multiple commands produce](https://stackoverflow.com/questions/50718018/xcode-10-error-multiple-commands-produce)? Can you mention which answers you've tried? – mfaani Oct 23 '19 at 21:41
  • not worked because my `info.plist` file is haven't membership for `Elias` so there's no file, but I've deleted my derived data before, can it occur problem? – eemrah Oct 23 '19 at 21:48
  • Did you run `pod lib create MyLibrary` inside a directory where you have a written Xcode project? Or you ran it inside a completely empty directory? – mfaani Oct 23 '19 at 22:06
  • Run it in Desktop then move a sub directory, will it occur a problem? – eemrah Oct 23 '19 at 22:08
  • Can you specifically answer my question? Did you do the first way or the 2nd? – mfaani Oct 23 '19 at 22:09
  • @Honey first one – eemrah Oct 23 '19 at 22:11
  • You should not switch tutorials in a single question. But if you decided to do such, then you should link the tutorial. The BlinkingLabel tutorial is not an **official** tutorial, so we wouldn't what tutorial you're talking about unless you link to it... – mfaani Oct 24 '19 at 14:02
  • `We recommend letting CocoaPods do the hard work here. Running pod lib create [pod name] will set you up with a well thought out library structure allowing you to easily include your files and get started quickly, we have a guide for this. If you'd like an up-to-date walkthrough of the whole process through to pushing to trunk, check out this 3rd party tutorial from tutsplus.` Cocoapods recommend it but its not working so thanks for all help. I'll handle myself. – eemrah Oct 24 '19 at 14:09

1 Answers1

1

You shouldn't create an Xcode project and then run pod lib create MyLibrary.

Specifically referencing your first link, it says:

The template will generate an Xcode project for your library

That command will do it all for you. It will create two projects in a single workspace fo you! Referencing from the same link:

Pod - This is where you place your library's classes

Example - This is the generated Demo & Testing bundle

You would then open the project from The /Example directory and run it.

Since this was for learning purposes I suggest you just start over

Community
  • 1
  • 1
mfaani
  • 33,269
  • 19
  • 164
  • 293
  • I am trying right now but there is a question. In this link https://www.youtube.com/watch?v=oZSZ8mievUU the guy create firstly Xcode Cocoa Touch framework then run pod lib create is it wrong? – eemrah Oct 24 '19 at 09:04
  • He’s doing it manual and somewhat unconventional. I didn’t watch it till the end, but got the idea of what he’s doing. It’s very different from how cocoapods tutorial is itself. Just follow the official tutorial. Don’t mix it with another tutorial because you can create a cocoapods framework from different ways, but mixing those ways is not a good idea. And believe me the official tutorial is not that hard. After you go through it, then edit your question with new issues you’ve faced – mfaani Oct 24 '19 at 09:17
  • Hey again, I am following official tutorial of `Blinking label` but I stuck at source_files any suggestion for that. By the way thank you for your responses, I will close the question but there's another `source_files` problem – eemrah Oct 24 '19 at 10:54
  • Thank you for your help @Honey, I must be open new question for new problem – eemrah Oct 24 '19 at 11:10
  • I dont follow. Where you able to create your own pod? What is the blinking label tutorial? Isnt that just a sample pod? – mfaani Oct 24 '19 at 13:07
  • The link for BlinkingLabel is https://code.tutsplus.com/tutorials/creating-your-first-cocoapod--cms-24332 . I've tagged my .git file but there's an error with `source_files` – eemrah Oct 24 '19 at 13:09
  • Can you explain why you tried a different tutorial? – mfaani Oct 24 '19 at 13:50
  • Yes please open a new question. Because your initial problem which was due to having a project and following the `pod lib create mylib` Is solved. Now you have a different problem. – mfaani Oct 24 '19 at 14:20
  • actually I did it before you comment – eemrah Oct 24 '19 at 14:52
  • 1
    I respect you and your time, just the problem is struggled to me so my mind is not this branch, you’re right it must be more clearly but for now when I realize what happens in the problem I might edit for further users problem, you’ve solved my problems a specific part and it helped me through to problem and I upvoted it. – eemrah Oct 24 '19 at 15:08