Adds method passes to retrieve any available passes#9
Open
adambutler wants to merge 2 commits intoerikpoort:masterfrom
Open
Adds method passes to retrieve any available passes#9adambutler wants to merge 2 commits intoerikpoort:masterfrom
adambutler wants to merge 2 commits intoerikpoort:masterfrom
Conversation
erikpoort
requested changes
Aug 23, 2019
| self.passLibrary = [[PKPassLibrary alloc] init]; | ||
| NSArray *passes = [self.passLibrary passes]; | ||
|
|
||
| NSDictionary *dict = [NSDictionary dictionaryWithObjects:passes forKeys:[passes valueForKey:@"serialNumber"]]; |
Owner
There was a problem hiding this comment.
I don't feel this is very readable
| NSDictionary *dict = [NSDictionary dictionaryWithObjects:passes forKeys:[passes valueForKey:@"serialNumber"]]; | ||
| NSArray*serials=[dict allKeys]; | ||
|
|
||
| callback(@[[NSNull null], serials]); |
Owner
There was a problem hiding this comment.
We don't use the Node convention of passing null instead on an error in this project.
Either use a callback for a call that always succeeds or us a promise :)
| _showAddPassControllerFromURL, | ||
| _showAddPassControllerFromFile, | ||
| _passes | ||
| } from './platform-specific' |
| * @return Promise Passing a boolean | ||
| */ | ||
| function showAddPassControllerFromURL(passURL) { | ||
| return _showAddPassControllerFromURL(RNWalletModule, passURL); |
Owner
There was a problem hiding this comment.
🤨
I guess what I want to say is: Don't change someone's code style in a PR?
| NSArray *passes = [self.passLibrary passes]; | ||
|
|
||
| NSDictionary *dict = [NSDictionary dictionaryWithObjects:passes forKeys:[passes valueForKey:@"serialNumber"]]; | ||
| NSArray*serials=[dict allKeys]; |
Owner
There was a problem hiding this comment.
So you're trying to reduce an array of passes to an array of serialnumbers?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds the ability to receive passes by calling
Wallet.passes(callback).