linkedin / linkedin/LayoutTest-iOS

Can't call init with data

オープン
#46 コメント 4 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

主要言語
Objective-C
スター
558
フォーク
46
PR マージ指標
30日以内にマージされた PR はありません

説明

Hey! Really excited to get this project working for me.

I have a number of views and view controllers I would like to test. I am using Realm in-memory to create Realm Objects to pass into my inits to instantiate my views and view controllers.

failed: caught "NSInvalidArgumentException", "-[StoriesASDetailViewController initWithStory:]: unrecognized selector sent to instance 0x7fa5fbe07ce0"

No matter what I try, be it a cell or tableviewcontroller, I just keep getting the error above.

Any advice?

`
+(UIView *)viewForData:(NSDictionary *)data reuseView:(UIView *)reuseView size:(LYTViewSize *)size context:(id _Nullable __autoreleasing *)context {

        StoryModel *story = [[StoryModel alloc] initWithDictionary:data error:nil];

        StoryRealm *local = [[StoryRealm alloc] initWithStoryModel:story];

        StoriesASDetailViewController *footer = [[StoriesASDetailViewController alloc] initWithStory:local];

        StoryDetailCell *cell = [footer.collectionNode cellForItemAtIndexPath:0];

        *context = footer;

        return cell;

}
`

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

まず、StoriesASDetailViewController とその initWithStory: 呼び出しを使って、エントリポイント viewForData:reuseView:size:context: から NSInvalidArgumentException を再現します。利用可能な initializer と LayoutTest-iOS のテストフローを調査します。完了条件は、StoryRealm データを使って view controller を作成するための、確認済みで文書化された解決策が得られていることです。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
objective-c
領域
testing
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
説明が足りない
初心者へのやさしさ
20/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。