Skip to content
New issue

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

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Update][WIP] ReactiveCocoa 0.9.0 (Help request) #804

Merged
merged 3 commits into from
Nov 29, 2012

Conversation

jwilling
Copy link
Contributor

There are some problems here. I keep getting:

- ERROR | [OS X] XCODEBUILD >  BuildHeaders/ReactiveCocoa/ReactiveCocoa/ReactiveCocoa.h:50:9: fatal error: 'ReactiveCocoa/EXTKeyPathCoding.h' file not found

or similar. I don't know why this would be happening. From what I can tell I've included the required files from libextobjc. Any ideas?

@fabiopelosin
Copy link
Member

I think that the issue is related to the following code:

#ifdef __IPHONE_OS_VERSION_MIN_REQUIRED
#import <ReactiveCocoa/libextobjc/extobjc/EXTKeyPathCoding.h>
[...]
#elif TARGET_OS_MAC
#import <ReactiveCocoa/EXTKeyPathCoding.h>
[...]
#endif

On OS X they are referencing the ReactiveCocoa/EXTKeyPathCoding.h file, however I could not find any file with that name on the repo. I guess that they are copying or referencing it from libextobjc (However I'm not sure on why they are doing it). If you could confirm this we could work out a solution which could involve a pre-install hook or something similar.

@jwilling
Copy link
Contributor Author

Yeah, I don't know why I didn't catch that before. That's what happens when coding late at night. 😉

I'll go make an issue on the repo.

@jwilling
Copy link
Contributor Author

@irrationalfab:

Our CI server builds ReactiveCocoa.framework without issue on its own, in all the demos, and in our app, so this seems like a CocoaPods problem.

Pre-install hooks, we meet again.

@fabiopelosin
Copy link
Member

Pre-install hooks, we meet again.

😄

Unfortunately #import <ReactiveCocoa/EXTKeyPathCoding.h> namespaces EXTKeyPathCoding.h under ReactiveCocoa which is not the case being an external library. I'm not sure why the iOS alternative works, it might be because Xcode only takes into account the last folder if it doesn't find the header.

At the moment I think that the best solution is to patch ReactiveCocoa.h as I've tested that #import <EXTKeyPathCoding.h> works. However, I'm not sure if this could be done in ReactiveCocoa itself.

I any case a pre install hook should look like:

Pod::Spec.new do |s|
  s.pre_install do |pod, _|
    header = pod.root + 'ReactiveCocoaFramework/ReactiveCocoa/ReactiveCocoa.h'
    File.open(header, 'w') { |file| file.puts(header.read.gsub('ReactiveCocoa/EXTKeyPathCoding.h', 'EXTKeyPathCoding.h')) }
  end
end

@jwilling
Copy link
Contributor Author

@irrationalfab You sure that's the right syntax? Seems to be moaning about "wrong number of arguments". My lack of Ruby knowledge is really killing me right now. 😉

@fabiopelosin
Copy link
Member

What a BS I wrote :-)

With this hook it will lint on OS X.

def s.pre_install (pod, _)
  header = pod.root + 'ReactiveCocoaFramework/ReactiveCocoa/ReactiveCocoa.h'
  modified_contents = header.read.gsub('ReactiveCocoa/EXTKeyPathCoding.h', 'EXTKeyPathCoding.h')
  File.open(header, 'w') { |file| file.puts(modified_contents) }
end

However there are still some issue in iOS, likely related to the deployment target and to a missing ReactiveCocoa/RACAsyncCommand.h.

 -> ReactiveCocoa (0.9.0)
    - ERROR | [iOS] XCODEBUILD >  ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACSignal.m:152:2: error: the current deployment target does not support automated __weak references
    - ERROR | [iOS] XCODEBUILD >  ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACSignal.m:153:2: error: the current deployment target does not support automated __weak references
    - ERROR | [iOS] XCODEBUILD >  BuildHeaders/ReactiveCocoa/ReactiveCocoa/ReactiveCocoa.h:20:9: fatal error: 'ReactiveCocoa/RACAsyncCommand.h' file not found
    - ERROR | [iOS] XCODEBUILD >  BuildHeaders/ReactiveCocoa/ReactiveCocoa/ReactiveCocoa.h:20:9: fatal error: 'ReactiveCocoa/RACAsyncCommand.h' file not found
    - ERROR | [iOS] XCODEBUILD >  BuildHeaders/ReactiveCocoa/ReactiveCocoa/ReactiveCocoa.h:20:9: fatal error: 'ReactiveCocoa/RACAsyncCommand.h' file not found
    - ERROR | [iOS] XCODEBUILD >  BuildHeaders/ReactiveCocoa/ReactiveCocoa/ReactiveCocoa.h:20:9: fatal error: 'ReactiveCocoa/RACAsyncCommand.h' file not found
    - ERROR | [iOS] XCODEBUILD >  BuildHeaders/ReactiveCocoa/ReactiveCocoa/ReactiveCocoa.h:20:9: fatal error: 'ReactiveCocoa/RACAsyncCommand.h' file not found
    - ERROR | [iOS] XCODEBUILD >  ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACSignal.m:152:2: error: the current deployment target does not support automated __weak references
    - ERROR | [iOS] XCODEBUILD >  ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACSignal.m:153:2: error: the current deployment target does not support automated __weak references
    - ERROR | [iOS] XCODEBUILD >  BuildHeaders/ReactiveCocoa/ReactiveCocoa/ReactiveCocoa.h:20:9: fatal error: 'ReactiveCocoa/RACAsyncCommand.h' file not found
    - ERROR | [iOS] XCODEBUILD >  BuildHeaders/ReactiveCocoa/ReactiveCocoa/ReactiveCocoa.h:20:9: fatal error: 'ReactiveCocoa/RACAsyncCommand.h' file not found
    - ERROR | [iOS] XCODEBUILD >  BuildHeaders/ReactiveCocoa/ReactiveCocoa/ReactiveCocoa.h:20:9: fatal error: 'ReactiveCocoa/RACAsyncCommand.h' file not found
    - ERROR | [iOS] XCODEBUILD >  BuildHeaders/ReactiveCocoa/ReactiveCocoa/ReactiveCocoa.h:20:9: fatal error: 'ReactiveCocoa/RACAsyncCommand.h' file not found
    - ERROR | [iOS] XCODEBUILD >  BuildHeaders/ReactiveCocoa/ReactiveCocoa/ReactiveCocoa.h:20:9: fatal error: 'ReactiveCocoa/RACAsyncCommand.h' file not found

Analyzed 1 podspec.

[!] The spec did not pass validation.

@jwilling
Copy link
Contributor Author

Haha.

Well it seems like this version really doesn't like CocoaPods, does it? The library itself builds just fine on their CI server. 😩

* master: (55 commits)
  Warning fixes
  Updating KIF to the latest version
  OHHTTPStubs need ARC enabled in order for responseWithError to work
  Adding spec for MGBox2 2.0.0
  [Update] FamilySearchCocoa (0.8.0)
  [Add] FatSecretKit (0.0.1)
  [Add] SESpringBoard (0.0.1)
  Add ADBIndexedTableView spec
  Add RHPreferences.
  Add RHAddressBook.
  Removed untagged version of Inflections
  [Update] Inflections (1.0.0)
  Add socket.io 0.2.4
  update DLStarRating spec
  update commit number for PSTCollectionView
  [Update] LastFm (1.2.0)
  [Update] WorkflowSchema (0.4.0)
  [Update] MTPocket (0.6.2)
  [Update] GRMustache 6.1.2, 6.1.3
  specs for Tesseract lib and wrapper added
  ...
@fabiopelosin fabiopelosin merged commit 1adf90a into master Nov 29, 2012
@fabiopelosin
Copy link
Member

Now with 0.10!

@jwilling
Copy link
Contributor Author

😍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants