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

Updated instructions for Swift 2.0 and iOS 9.0? #10

Open
andreyguenov opened this issue Feb 18, 2016 · 1 comment
Open

Updated instructions for Swift 2.0 and iOS 9.0? #10

andreyguenov opened this issue Feb 18, 2016 · 1 comment

Comments

@andreyguenov
Copy link

Hello,

Great product! It would be fantastic if you could update the installation instructions and the demo files (inside ApiAIDemoSwift) for Swift 2.0 and iOS 9.0. Namely, here are a few things which I noticed:

  • It's never mentioned that we should import AVFoundation in order for these two lines to work:
    AVAudioSession.sharedInstance().setCategory(AVAudioSessionCategoryPlayAndRecord, error: nil)
    AVAudioSession.sharedInstance().setActive(true, error: nil)

  • Also in the current version of swift, the two methods above give errors because the parameters are no longer valid.
  • In the other instructions, it is only specified to put the code in AppDelegate.swift, but where in AppDelegate.swift?

let request = self.apiai.requestWithType(AIRequestType.Text) as AITextRequest

  • In the instruction above, requestWithType() is deprecated. What is the new method?
  • The Podfile is with old syntax and assumes iOS 7.0
  • Perhaps you should mention that we have to rename the Bundle Identifier in order to avoid errors with code signing.
  • Finally, an import ApiAI statement is required in many of the classes, as well as an import statement for MBProgressHUD

Thanks! :)

@grantkemp
Copy link

+1 for me

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

No branches or pull requests

2 participants