@ashfurrow I was trying to update to CocoaPods 1.0.0 and it seems to result in a metamacros.h file not found error for RAC 4.0.1. I noticed the 4.0.1 pod spec doesn't have the same prepare command as the 2.3 pod spec does.
"prepare_command": " find . \\( -regex '.*EXT.*\\.[mh]$' -o -regex '.*metamacros\\.[mh]$' \\) -execdir mv {} RAC{} \\;\n find . -regex '.*\\.[hm]' -exec sed -i '' -E 's@\"(EXT.*|metamacros)\\.h\"@\"RAC\\1.h\"@' {} \\;\n find . -regex '.*\\.[hm]' -exec sed -i '' -E 's@<ReactiveCocoa/(EXT.*)\\.h>@<ReactiveCocoa/RAC\\1.h>@' {} \\;\n",
"
I'm not sure this is what's needed to fix the issue but it looks like it might be. When I upgrade to CocoaPods 1.0.0 the metamacros.h issue shows up unless I drop down to RAC 2.3
Thanks for any help you can provide.
+1
There is a solution that use cocoa pods 1.0?
Maybe someone has custom podspec that could fix this for cocoapods 1.0.0?
pod 'ReactiveCocoa', :podspec => 'https://gist.githubusercontent.com/PaulTaykalo/04f8e2ee25b9d57f03455ccafd541b34/raw/e94f3bec7a9450ecd0f0cdc9b4899deb0b91d758/ReactiveCocoa.podspec.json'
Simply changed "prepare_command"
// "prepare_command": "sed -i '' 's@<ReactiveCocoa/\\(.*\\)>@\"\\1\"@g' ReactiveCocoa/ReactiveCocoa.h",
"prepare_command": " find . \\( -regex '.*EXT.*\\.[mh]$' -o -regex '.*metamacros\\.[mh]$' \\) -execdir mv {} RAC{} \\;\n find . -regex '.*\\.[hm]' -exec sed -i '' -E 's@\"
Thanks to @szweier @zigdanis @scinfu
This is a gist itself, if someone will decide to update it https://gist.github.com/PaulTaykalo/04f8e2ee25b9d57f03455ccafd541b34
@PaulTaykalo not work for me...
Ok I found solution to install ReactiveCocoa without problems. So issue is related to new version of sed
tool. All you need to do is uninstall sed
probably installed through brew
. So jus run command:
brew uninstall sed
Then perpare_command
will use right version of sed
. To make sure that you have old version of sed
run command: $ sed --version
And the output should be like this:
sed: illegal option -- -
usage: sed script [-Ealn] [-i extension] [file ...]
sed [-Ealn] [-i extension] [-e script] ... [-f script_file] ... [file ...]
I've extended Paul Takyalo's answer to RAC 4.2.2 for Swift 2.3. Put this in your podfile:
pod 'ReactiveCocoa', :podspec => 'https://gist.githubusercontent.com/andrewschreiber/4fd444c08e8c8e876f06bb3a8ae45f2e/raw/72798f6fd81a124b0eaac52c6484725fbe9f5330/ReactiveCocoa.podspec.json'
This issue apearred again for me with ReactiveObjc:
'metamacros.' file not found
I've tried all the options above here, even tried to create an own fork with a custom podspec, but without success. Anyone else with the same problem and a solution here?
pod 'Mantle'
pod 'ReactiveCocoa'
The have the same file with name "metamacros.h"
Yea using Mantle + ReactiveCocoa seems to be the issue here. When using both I moved to using ReactiveCocoa as a submodule. We've since moved away from Mantle which allowed us to bring ReactiveCocoa back in using CocoaPods. Not that this is a great answer but it should explain why anyone is seeing this issue.
Most helpful comment
pod 'ReactiveCocoa', :podspec => 'https://gist.githubusercontent.com/PaulTaykalo/04f8e2ee25b9d57f03455ccafd541b34/raw/e94f3bec7a9450ecd0f0cdc9b4899deb0b91d758/ReactiveCocoa.podspec.json'
Simply changed "prepare_command"
Thanks to @szweier @zigdanis @scinfu