Can't call init with data
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 20/100
- Issue type
- Bug
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- objective-c
- Domain
- testing
Research direction
Start by reproducing the NSInvalidArgumentException from the viewForData:reuseView:size:context: entry point using StoriesASDetailViewController and its initWithStory: call. Inspect the available initializer and the LayoutTest-iOS testing flow; done should be a confirmed, documented resolution for creating the view controller with StoryRealm data.
Written by the indexing model from the issue text.
Description
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;
}
`
- Dominant language
- Objective-C
- Stars
- 558
- Forks
- 46
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from linkedin/LayoutTest-iOS
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
linkedin/LayoutTest-iOS#42 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
linkedin/LayoutTest-iOS#40 · 3 comments ·
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
linkedin/LayoutTest-iOS#38 · 2 comments ·
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
linkedin/LayoutTest-iOS#36 · 1 comment · 2 reactions ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
linkedin/LayoutTest-iOS#33 · 2 comments · 1 reaction ·
All issues in linkedin/LayoutTest-iOS
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
noah-nuebling/mac-mouse-fix#2054 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 92/100
obsproject/obs-studio#13918 ·