dialogflow / dialogflow-apple-client

iOS SDK for Dialogflow
http://api.ai
Apache License 2.0
244 stars 65 forks source link

Can't build ApiAIDemo #2

Closed OlexandrStepanov closed 8 years ago

OlexandrStepanov commented 8 years ago

Hello.

I have followed to instructions in README, and have run "pod update"In the folder, but XCode fails to compile with error "unknown type name 'AIResponse'". I see that the reason is, that AIResponse.h file simply is not included in ApiAI.h, namely it's wrapped with _#if __hasinclude("AIResponse.h") , which is false, for some reason. Could you, please, clarify this situation, and why import of this header is wrapped with this if, what is the purpose?

sstepashka commented 8 years ago

@OlexandrStepanov Hi,

Required

XCode version Cocoapods version

https://github.com/api-ai/api-ai-ios-sdk/tree/master/ApiAIDemo

This is Demo, isn't it? Do you make any changes of project or Podfile?

OlexandrStepanov commented 8 years ago

@sstepashka , XCode: 7.0.1 Cocoapods: 0.39.0.beta.3 Yes, we are talking about ApiAIDemo on Objective-C. The only changes I've made to project:

No changes to the Podfile.

sstepashka commented 8 years ago

Thanks for Your message. Library was updated in cocoapods.

OlexandrStepanov commented 8 years ago

@sstepashka , Thanks for fix. Problem with AIResponse is gone after your commit, however I still had some compiler errors: _'ApiAI/UIKit/AIVoiceRequestButton.h' file not found

import < ApiAI/UIKit/AIVoiceRequestButton.h >_

I fixed that by changing to #import < AIVoiceRequestButton.h >

Also, I was forced to disable bitcode due to linker error: _ld: -weak_library and -bitcode_bundle (Xcode setting ENABLEBITCODE=YES) cannot be used together clang: error: linker command failed with exit code 1 (use -v to see invocation)

After these changes, app was built fine.