Simple iOS client white label for nfscan
1) Download the repository
$ git clone https://github.com/nfscan/ios-receipt-scan-example.git
$ cd ios-receipt-scan-example
2) Run CocoaPods
$ pod install
3) Open the project in Xcode
$ open ios-receipt-scan-example.xcworkspace
4) Change nfscan service address on Constants.m
+(NSString*) HOST{
static NSString* baseUrl;
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
NSDictionary *env = [[NSProcessInfo processInfo] environment];
NSString *overrideBaseUrl = [env valueForKey:@"BASE_URL"];
if(overrideBaseUrl && ![overrideBaseUrl isEqualToString:@""]){
baseUrl = overrideBaseUrl;
}else{
#ifdef DEBUG
NSLog(@"%s BASE_URL ENVIRONMENTAL VARIABLES ISN'T SET",__PRETTY_FUNCTION__);
#endif
baseUrl = @"http://youripaddress:8080/nfscan-server/";
}
});
return baseUrl;
}
5) Compile and run the app in your simulator
- Xcode 6.3
- iOS 8
You're encouraged to contribute to nfscan. Fork the code from https://github.com/nfscan/ios-receipt-scan-example and submit pull requests.
Make sure you're following the contributing guidelines for this project.
- AFNetworking for network request
- MBProgressHUD for progress indicator