CocoaPods / CocoaPods

The Cocoa Dependency Manager.

Home Page:https://cocoapods.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

XCode 10 Caching Pod builds (New build system)

FreshApps opened this issue · comments

Report

What did you do?

I have created a new project with Xcode 10 beta 5 and initialized pod

What did you expect to happen?

I wanted to change the pod with other content.

What happened instead?

The simulator is not showing the new content. When i clean the build and run again the new content is available

CocoaPods Environment

ℹ Please replace these two lines with the output of pod env.

Stack

   CocoaPods : 1.5.3
        Ruby : ruby 2.3.7p456 (2018-03-28 revision 63024) [universal.x86_64-darwin17]
    RubyGems : 2.5.2.3
        Host : Mac OS X 10.13.6 (17G65)
       Xcode : 9.4.1 (9F2000)
         Git : git version 2.15.2 (Apple Git-101.1)
Ruby lib dir : /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib
Repositories : master - https://github.com/CocoaPods/Specs.git @ 33da041848cce2d1d33c29e32b7f6f734ddab858

Installation Source

Executable Path: /usr/local/bin/pod

Plugins

cocoapods-deintegrate : 1.0.2
cocoapods-plugins     : 1.0.0
cocoapods-search      : 1.0.0
cocoapods-stats       : 1.0.0
cocoapods-trunk       : 1.3.0
cocoapods-try         : 1.1.0

Podfile

# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'

target 'loginkit' do
  # Comment the next line if you're not using Swift and don't want to use dynamic frameworks
  use_frameworks!

  # Pods for loginkit
  pod 'ILLoginKit'

end

Project that demonstrates the issue

https://github.com/FreshApps/LoginKit.git

CocoaPods does not do any caching.

I mean xcodebuild is related to running compilation and cleaning of artifacts.

You are also using a pod not in development mode i.e using :path directive. The sources of that pod will never change so you must be changing the sources of your own app which CocoaPods does not touch.

I am sorry, with this information I have I am unable to see this is a CocoaPods library issue. I am going to close and will re-open this if we can further derive this is a CocoaPods issue.

Im not sure, but I think Im experiencing the similar behaviour. Im using Cocoapods with development pods like this pod 'SwaggerClient', :path => './SwaggerClient'
When I need to change something in that library SwaggerClient and than try to recompile with New Build System without cleaning, the recompiled library isn't correctly copied into the new package. I checked DerivedData build folder and there is new recompiled version but in resulting package, there is the old one (checked by creation time of the files). The only way to incorporate changes to App is the clean build.

Just confirming this is still very much an annoying issue in XCode 10 GM.
@dnkoutso can you please explain your comment when you closed this. This worked fine in XCode 9, but doesn't work in XCode 10: when you use :path to develop a Pod in tandem with an app, as per official documentation, then changes to the Pod files are NOT picked up unless the entire build folder is cleaned, meaning you have to build the whole app again.

EDIT: ah, looks like this is now tracked here -- #8073

@xaphod see this #8073

It is a bug in Xcode that does not re-run the script phase even if the input/output paths have actually changed and hence it requires a clean build.

means everytime I have to deal with clean build -> run -> change -> clean build -> run?

Yes. Or you can just go back to the legacy build system on File -> Workspace Settings...

commented

With New Build System, add to your Podfile

install! 'cocoapods', :disable_input_output_paths => true