iphoneアプリを作るにあたり、簡単にチャットアプリのUIをまずは作成したいと考えており、以下のサイトを参考に作成しております。
https://qiita.com/kinopontas/items/a0c8240a922b971b3580
サイト中に記載されている通り、JSQMessagesViewControllerの導入を完了し、書いてある通りのコードをViewControllerに貼り付けたはずなのですが、なぜかViewControllerの方でエラーが連発しています。
エラー例)
16行目のself.senderId = "user1"では、cannot assign to property: ''is a method (17行目もほぼ同様エラー) 21行目では、'jsq_messageBubbleLightGrayColor()' has been renamed to 'jsq_messageBubbleLightGray' (22行目もほぼ同様エラー) 25行目では、Use of instance member 'avatarImageWithImage' on type 'JSQmessages AvatarImageFactory': did you mean to use a value of type 'JSQmessages AvatarImageFactory' instead (26行めもほぼ同様) 39行めでは、Method does not override any method from its super class などなどその他にも10箇所ほどエラーが出まくっています。
iphoneアプリ開発やswiftに関しては全くの初心者ではありますが、エラー文を見るに継承がうまくいっていない?定義されていない?といったような感じかと思ったので、ライブラリがうまく読み込めていないのかな、とも思ったのですが、import JSQMessagesViewControllerにはエラーが出ておりません。
初歩的な質問かとは思いますが、わかる方いらっしゃいましたらご教示いただけますと幸いです。宜しくお願い致します。
#環境
・OS X EI Captian ver 10.11.6
・Xcode Version 8.2.1 (8C1002)
・ライブラリインストールはCocoapodにより行い、その際のpodfile.txtは以下の通り。
# Uncomment the next line to define a global platform for your project # platform :ios, '9.0' target 'aa' do # Comment the next line if you're not using Swift and don't want to use dynamic frameworks use_frameworks! # Pods for mypremiumcafencmb pod 'JSQMessagesViewController', :git => 'https://github.com/jessesquires/JSQMessagesViewController.git', :branch => 'develop' post_install do |installer| installer.pods_project.targets.each do |target| target.build_configurations.each do |config| config.build_settings['SWIFT_VERSION'] = '3.0' end end end end
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。