forked from OpenBankProject/Hello-OBP-OAuth1.0a-IOS
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Payments demonstration and other improvements...
- add PaymentVC - for gathering payment information and enacting - add ReceiverVC - for choosing a recipient - upgrade endpoints used to get accounts, cater for different data in returned results - encode bank ids and other params - move transaction loading - show account balance in account items - (slightly) safer methods for extracting values from JSON (but still bad - essentially untyped)
- Loading branch information
Showing
16 changed files
with
1,643 additions
and
171 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
// | ||
// JSONUnpackUtils.h | ||
// HelloOBP-iOS | ||
// | ||
// Created by Torsten Louland on 15/10/2017. | ||
// Copyright © 2017 TESOBE. All rights reserved. | ||
// | ||
|
||
#import <Foundation/Foundation.h> | ||
|
||
@interface NSDictionary (JSONUnpack) | ||
- (NSString*)salientStringAtKeyPath:(NSString*)keyPath; // non-empty, and not null | ||
- (NSString*)salientDescriptionAtKeyPath:(NSString*)keyPath; // non-empty description of non-null | ||
@end |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
// | ||
// JSONUnpackUtils.m | ||
// HelloOBP-iOS | ||
// | ||
// Created by Torsten Louland on 15/10/2017. | ||
// Copyright © 2017 TESOBE. All rights reserved. | ||
// | ||
|
||
#import "JSONUnpackUtils.h" | ||
|
||
|
||
|
||
@implementation NSDictionary (JSONUnpack) | ||
- (NSString*)salientStringAtKeyPath:(NSString*)keyPath | ||
{ | ||
NSString* s = [self valueForKeyPath: keyPath]; | ||
if ([s isKindOfClass: [NSString class]]) | ||
if ([s length]) | ||
if (![@[ @"null", @"NULL" ] containsObject: s]) | ||
return s; | ||
return nil; | ||
} | ||
- (NSString*)salientDescriptionAtKeyPath:(NSString*)keyPath | ||
{ | ||
id obj = [self valueForKeyPath: keyPath]; | ||
if ([obj isKindOfClass: [NSNull class]]) | ||
return nil; | ||
NSString* s = [obj description]; | ||
if ([s length]) | ||
if (![@[ @"null", @"NULL" ] containsObject: s]) | ||
return s; | ||
return nil; | ||
} | ||
@end |
This file contains 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
Oops, something went wrong.