Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Pods project details crash Xcode - multiple configurations - 0.17.0 RC3 #854

Closed
Zyphrax opened this Issue Mar 13, 2013 · 7 comments

Comments

Projects
None yet
3 participants

Zyphrax commented Mar 13, 2013

In my project I have four configurations:

  • debug AdHoc
  • debug AppStore
  • release AdHoc
  • release AppStore

The configurations with AdHoc have a preprocessor macro ADHOC.
I deploy the AdHoc builds to TestFlight.

When cocoapods 0.17.0 RC3 updates the Pods project something seems to go wrong. Xcode is able to display the project contents, however when I click on Project -> Info or Build Settings Xcode will crash. I've tried it multiple times, each time reverting with svn and tried it on another machine to make sure that my Xcode wasn't acting up.

My main reason to try out the new cocoapods 0.17.0 RC3 was that I noticed that since I changed my configurations from debug and release to the four above that MagicalRecord logging no longer showed up in my console during debugging. I thought that the 0.16 version perhaps didn't handle configurations correctly.

Owner

alloy commented Mar 13, 2013

Could you provide a new standalone project that shows the problem?

My main reason to try out the new cocoapods 0.17.0 RC3 was that I noticed that since I changed my configurations from debug and release to the four above that MagicalRecord logging no longer showed up in my console during debugging. I thought that the 0.16 version perhaps didn't handle configurations correctly.

Extra configurations are added to the project on each pod install. This should work the same with 0.16.

Owner

fabiopelosin commented Mar 13, 2013

Could you please post the relevant part of the output of:

$ xcodeproj show NAME.project

Even better would be if you could post the diff between the project created by 0.16 and the one created by 0.17. It this way we can detect if there is something borked in the project. Do you know that it is possible to specify whether the build settings of your custom build configurations should be modeled after the Release or the Debug build configuration.

# Podfile
xcodeproj `TestProject`, 'Mac App Store' => :release, 'Test' => :debug

Maybe this is related to the issue that you saw on 0.16. The crash appear to be an unrelated issue.

Owner

alloy commented Mar 13, 2013

@irrationalfab Ah, thanks for adding an example of how to specify the configs.

Zyphrax commented Mar 14, 2013

I've created three zip files:

  • Test.zip: test project without CocoaPods integration
  • TestCP16.zip: same test project now with CocoaPods 0.16.4 integration
  • TestCP17.zip: same test project now with CocoaPods 0.17.0 RC3 integration

The project has 4 build configurations matching the ones I listed in my first post.
The TestCP16 project works fine, the TestCP17 project will crash when you click on some of the Project details.

Unfortunately GitHub doesn't allow me to add zips to this post, but here they are:
http://codegazer.com/git/Test.zip
http://codegazer.com/git/TestCP16.zip
http://codegazer.com/git/TestCP17.zip

@irrationalfab I'll have a look at the xcodeproj command

Zyphrax commented Mar 14, 2013

@irrationalfab I can't seem to be able to specify the xcodeproj command correctly in the podfile

Here's my podfile:

platform :ios, '5.0'

pod 'NSData+Base64'

xcodeproj 'release AdHoc', 'release AppStore' => :release, 'debug AdHoc', 'debug Appstore' => :debug

This results in a syntax error, unexpected ',', expecting tASSOC when I run pod install


I've ran the xcodeproj show command (version 0.5.2) on both the 0.16.4 and 0.17RC3 project and there were no differences. Took me a while to find out though, because the lines within the file were in mixed order :)

Owner

fabiopelosin commented Mar 14, 2013

Some keys are not associated with a value resulting in an error. Moreover the path of the project is missing. TestProject was the name of the file of the project not a build configuration and I see why the above example can be confusing. Anyway the following syntax should be more clear:

xcodeproj "NAME.xcodeproj", { 
 'release AdHoc'      => :release,
  'release AppStore'  => :release, 
  'debug AdHoc'       => :debug, 
  'debug Appstore'    => :debug
}

I've ran the xcodeproj show command (version 0.5.2) on both the 0.16.4 and 0.17RC3 project and there were no differences. Took me a while to find out though, because the lines within the file were in mixed order :)

Ah that can be a very tedious process. There is also another command that I forgot about and which should work™:

xcodeproj project-diff TestCP17/Pods/Pods.xcodeproj TestCP16/Pods/Pods.xcodeproj

Anyway the issue should be solved.

Zyphrax commented Mar 17, 2013

@irrationalfab

I've added the xcodeproj command to my Podfile and it works perfectly!
I noticed that the original debug and release configurations are always generated in the Pods project, is that really necessary, they no longer exist in my project?

I saw that 0.17RC5 was released, but there is no changelog?

Thanks for all of your help!

@jzapater jzapater pushed a commit to jzapater/CocoaPods that referenced this issue Sep 17, 2013

@orta orta Merge pull request #854 from SlaunchaMan/master
GData: add quotes around libxml header search path declaration.
77e66ae
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment