{"action":"created","issue":{"url":"https://api.github.com/repos/ResearchKit/ResearchKit/issues/656","repository_url":"https://api.github.com/repos/ResearchKit/ResearchKit","labels_url":"https://api.github.com/repos/ResearchKit/ResearchKit/issues/656/labels{/name}","comments_url":"https://api.github.com/repos/ResearchKit/ResearchKit/issues/656/comments","events_url":"https://api.github.com/repos/ResearchKit/ResearchKit/issues/656/events","html_url":"https://github.com/ResearchKit/ResearchKit/issues/656","id":147501943,"number":656,"title":"Initializing ORKPredicateStepNavigationRule","user":{"login":"kothapas","id":17889409,"avatar_url":"https://avatars.githubusercontent.com/u/17889409?v=3","gravatar_id":"","url":"https://api.github.com/users/kothapas","html_url":"https://github.com/kothapas","followers_url":"https://api.github.com/users/kothapas/followers","following_url":"https://api.github.com/users/kothapas/following{/other_user}","gists_url":"https://api.github.com/users/kothapas/gists{/gist_id}","starred_url":"https://api.github.com/users/kothapas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kothapas/subscriptions","organizations_url":"https://api.github.com/users/kothapas/orgs","repos_url":"https://api.github.com/users/kothapas/repos","events_url":"https://api.github.com/users/kothapas/events{/privacy}","received_events_url":"https://api.github.com/users/kothapas/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-04-11T17:45:31Z","updated_at":"2016-04-11T18:18:01Z","closed_at":null,"body":"Is there a reason xcode doesn't give me an option to initialize this with anything other than a coder?"},"comment":{"url":"https://api.github.com/repos/ResearchKit/ResearchKit/issues/comments/208484552","html_url":"https://github.com/ResearchKit/ResearchKit/issues/656#issuecomment-208484552","issue_url":"https://api.github.com/repos/ResearchKit/ResearchKit/issues/656","id":208484552,"user":{"login":"rsanchezsaez","id":444313,"avatar_url":"https://avatars.githubusercontent.com/u/444313?v=3","gravatar_id":"","url":"https://api.github.com/users/rsanchezsaez","html_url":"https://github.com/rsanchezsaez","followers_url":"https://api.github.com/users/rsanchezsaez/followers","following_url":"https://api.github.com/users/rsanchezsaez/following{/other_user}","gists_url":"https://api.github.com/users/rsanchezsaez/gists{/gist_id}","starred_url":"https://api.github.com/users/rsanchezsaez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rsanchezsaez/subscriptions","organizations_url":"https://api.github.com/users/rsanchezsaez/orgs","repos_url":"https://api.github.com/users/rsanchezsaez/repos","events_url":"https://api.github.com/users/rsanchezsaez/events{/privacy}","received_events_url":"https://api.github.com/users/rsanchezsaez/received_events","type":"User","site_admin":false},"created_at":"2016-04-11T18:18:01Z","updated_at":"2016-04-11T18:18:01Z","body":"From *Objective-C*, you can use:\r\n\r\n    - (instancetype)initWithResultPredicates:(NSArray<NSPredicate *> *)resultPredicates\r\n                  destinationStepIdentifiers:(NSArray<NSString *> *)destinationStepIdentifiers\r\n                       defaultStepIdentifier:(nullable NSString *)defaultStepIdentifier;\r\n    - (instancetype)initWithResultPredicates:(NSArray<NSPredicate *> *)resultPredicates\r\n                  destinationStepIdentifiers:(NSArray<NSString *> *)destinationStepIdentifiers\r\n\r\nFrom *Swift* those are not available, and you should instead use the safer:\r\n\r\n   init(resultPredicatesAndDestinationStepIdentifiers tuples: [ (resultPredicate: NSPredicate, destinationStepIdentifier: String) ], defaultStepIdentifierOrNil: String? )\r\n\r\nThere's a bug if you import *ResearchKit* through *Cocoapods* which doesn't provide the needed file for the Swift initializer. If that's your case, a workaround is to copy the [ORKStepNavigationRule.swift file](https://github.com/ResearchKit/ResearchKit/blob/master/ResearchKit/Common/ORKStepNavigationRule.swift) from the main repo to your local project."}}