Skip to content
Browse files

First public commit

  • Loading branch information...
1 parent 5d0d6d0 commit 79c56076e498fb3aba9ed9aa24188e22cc8d1366 @bjornsallarp committed Apr 10, 2011
Showing with 4,503 additions and 0 deletions.
  1. +6 −0 .gitmodules
  2. +738 −0 BSYahooFinance.xcodeproj/project.pbxproj
  3. +7 −0 BSYahooFinance.xcodeproj/project.xcworkspace/contents.xcworkspacedata
  4. +17 −0 BSYahooFinance/BSYahooFinance.h
  5. +106 −0 BSYahooFinance/Entities/YFStockDetails.h
  6. +285 −0 BSYahooFinance/Entities/YFStockDetails.m
  7. +23 −0 BSYahooFinance/Entities/YFStockSymbol.h
  8. +24 −0 BSYahooFinance/Entities/YFStockSymbol.m
  9. +24 −0 BSYahooFinance/Entities/YFTwoValueObject.h
  10. +36 −0 BSYahooFinance/Entities/YFTwoValueObject.m
  11. +94 −0 BSYahooFinance/StockExchangeCurrency.plist
  12. +46 −0 BSYahooFinance/YFCurrencyConversion.h
  13. +308 −0 BSYahooFinance/YFCurrencyConversion.m
  14. +41 −0 BSYahooFinance/YFStockDetailsLoader.h
  15. +152 −0 BSYahooFinance/YFStockDetailsLoader.m
  16. +38 −0 BSYahooFinance/YFStockSymbolSearch.h
  17. +162 −0 BSYahooFinance/YFStockSymbolSearch.m
  18. +38 −0 BSYahooFinanceDemo/BSYahooFinance-Info.plist
  19. +14 −0 BSYahooFinanceDemo/BSYahooFinance-Prefix.pch
  20. +20 −0 BSYahooFinanceDemo/BSYahooFinanceAppDelegate.h
  21. +34 −0 BSYahooFinanceDemo/BSYahooFinanceAppDelegate.m
  22. +29 −0 BSYahooFinanceDemo/CurrencyConversionViewController.h
  23. +184 −0 BSYahooFinanceDemo/CurrencyConversionViewController.m
  24. +459 −0 BSYahooFinanceDemo/CurrencyConversionViewController.xib
  25. +24 −0 BSYahooFinanceDemo/DetailsViewController.h
  26. +135 −0 BSYahooFinanceDemo/DetailsViewController.m
  27. +219 −0 BSYahooFinanceDemo/DetailsViewController.xib
  28. +24 −0 BSYahooFinanceDemo/RootViewController.h
  29. +166 −0 BSYahooFinanceDemo/RootViewController.m
  30. +2 −0 BSYahooFinanceDemo/en.lproj/InfoPlist.strings
  31. +359 −0 BSYahooFinanceDemo/en.lproj/MainWindow.xib
  32. +286 −0 BSYahooFinanceDemo/en.lproj/RootViewController.xib
  33. +18 −0 BSYahooFinanceDemo/main.m
  34. +20 −0 BSYahooFinanceTests/BSYahooFinanceCurrencyConverter.h
  35. +131 −0 BSYahooFinanceTests/BSYahooFinanceCurrencyConverter.m
  36. +19 −0 BSYahooFinanceTests/BSYahooFinanceLoadDetailsTest.h
  37. +69 −0 BSYahooFinanceTests/BSYahooFinanceLoadDetailsTest.m
  38. +20 −0 BSYahooFinanceTests/BSYahooFinanceSymbolSearchTests.h
  39. +93 −0 BSYahooFinanceTests/BSYahooFinanceSymbolSearchTests.m
  40. +22 −0 BSYahooFinanceTests/BSYahooFinanceTests-Info.plist
  41. +7 −0 BSYahooFinanceTests/BSYahooFinanceTests-Prefix.pch
  42. +2 −0 BSYahooFinanceTests/en.lproj/InfoPlist.strings
  43. +1 −0 External/ASI
  44. +1 −0 External/JSON
View
6 .gitmodules
@@ -0,0 +1,6 @@
+[submodule "External/JSON"]
+ path = External/JSON
+ url = https://github.com/stig/json-framework.git
+[submodule "External/ASI"]
+ path = External/ASI
+ url = https://github.com/pokeb/asi-http-request.git
View
738 BSYahooFinance.xcodeproj/project.pbxproj
@@ -0,0 +1,738 @@
+// !$*UTF8*$!
+{
+ archiveVersion = 1;
+ classes = {
+ };
+ objectVersion = 46;
+ objects = {
+
+/* Begin PBXBuildFile section */
+ F414981313521987008AD497 /* NSObject+JSON.m in Sources */ = {isa = PBXBuildFile; fileRef = F414981213521987008AD497 /* NSObject+JSON.m */; };
+ F414982813521AA4008AD497 /* SBJsonStreamParser.m in Sources */ = {isa = PBXBuildFile; fileRef = F414981D13521AA3008AD497 /* SBJsonStreamParser.m */; };
+ F414982913521AA4008AD497 /* SBJsonStreamParserAdapter.m in Sources */ = {isa = PBXBuildFile; fileRef = F414981F13521AA3008AD497 /* SBJsonStreamParserAdapter.m */; };
+ F414982A13521AA4008AD497 /* SBJsonStreamParserState.m in Sources */ = {isa = PBXBuildFile; fileRef = F414982113521AA3008AD497 /* SBJsonStreamParserState.m */; };
+ F414982B13521AA4008AD497 /* SBJsonStreamWriter.m in Sources */ = {isa = PBXBuildFile; fileRef = F414982313521AA4008AD497 /* SBJsonStreamWriter.m */; };
+ F414982C13521AA4008AD497 /* SBJsonStreamWriterState.m in Sources */ = {isa = PBXBuildFile; fileRef = F414982513521AA4008AD497 /* SBJsonStreamWriterState.m */; };
+ F414983013521C01008AD497 /* SBJsonTokeniser.m in Sources */ = {isa = PBXBuildFile; fileRef = F414982F13521C01008AD497 /* SBJsonTokeniser.m */; };
+ F45C1E00133F4DB500B3D443 /* YFStockSymbolSearch.m in Sources */ = {isa = PBXBuildFile; fileRef = F45C1DFF133F4DB500B3D443 /* YFStockSymbolSearch.m */; };
+ F45C1E05133F4E1200B3D443 /* Reachability.m in Sources */ = {isa = PBXBuildFile; fileRef = F45C1E04133F4E1200B3D443 /* Reachability.m */; };
+ F45C1E2A133F4E1B00B3D443 /* ASIAuthenticationDialog.m in Sources */ = {isa = PBXBuildFile; fileRef = F45C1E08133F4E1B00B3D443 /* ASIAuthenticationDialog.m */; };
+ F45C1E2B133F4E1B00B3D443 /* ASIDataCompressor.m in Sources */ = {isa = PBXBuildFile; fileRef = F45C1E0B133F4E1B00B3D443 /* ASIDataCompressor.m */; };
+ F45C1E2C133F4E1B00B3D443 /* ASIDataDecompressor.m in Sources */ = {isa = PBXBuildFile; fileRef = F45C1E0D133F4E1B00B3D443 /* ASIDataDecompressor.m */; };
+ F45C1E2D133F4E1B00B3D443 /* ASIDownloadCache.m in Sources */ = {isa = PBXBuildFile; fileRef = F45C1E0F133F4E1B00B3D443 /* ASIDownloadCache.m */; };
+ F45C1E2E133F4E1B00B3D443 /* ASIFormDataRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = F45C1E11133F4E1B00B3D443 /* ASIFormDataRequest.m */; };
+ F45C1E2F133F4E1B00B3D443 /* ASIHTTPRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = F45C1E13133F4E1B00B3D443 /* ASIHTTPRequest.m */; };
+ F45C1E30133F4E1B00B3D443 /* ASIInputStream.m in Sources */ = {isa = PBXBuildFile; fileRef = F45C1E17133F4E1B00B3D443 /* ASIInputStream.m */; };
+ F45C1E31133F4E1B00B3D443 /* ASINetworkQueue.m in Sources */ = {isa = PBXBuildFile; fileRef = F45C1E19133F4E1B00B3D443 /* ASINetworkQueue.m */; };
+ F45C1E36133F4E1B00B3D443 /* SBJsonParser.m in Sources */ = {isa = PBXBuildFile; fileRef = F45C1E27133F4E1B00B3D443 /* SBJsonParser.m */; };
+ F45C1E37133F4E1B00B3D443 /* SBJsonWriter.m in Sources */ = {isa = PBXBuildFile; fileRef = F45C1E29133F4E1B00B3D443 /* SBJsonWriter.m */; };
+ F45C1E39133F4E3100B3D443 /* libz.1.2.3.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = F45C1E38133F4E3100B3D443 /* libz.1.2.3.dylib */; };
+ F45C1E41133F4E5500B3D443 /* CFNetwork.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F45C1E40133F4E5500B3D443 /* CFNetwork.framework */; };
+ F45C1E43133F4E6000B3D443 /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F45C1E42133F4E6000B3D443 /* SystemConfiguration.framework */; };
+ F45C1E45133F4E6D00B3D443 /* MobileCoreServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F45C1E44133F4E6D00B3D443 /* MobileCoreServices.framework */; };
+ F45C1E49133F4F1900B3D443 /* YFStockSymbol.m in Sources */ = {isa = PBXBuildFile; fileRef = F45C1E48133F4F1900B3D443 /* YFStockSymbol.m */; };
+ F45C1E4B133F502400B3D443 /* StockExchangeCurrency.plist in Resources */ = {isa = PBXBuildFile; fileRef = F45C1E4A133F502400B3D443 /* StockExchangeCurrency.plist */; };
+ F4A35F0713508C7A003334AE /* YFCurrencyConversion.m in Sources */ = {isa = PBXBuildFile; fileRef = F4A35F0613508C7A003334AE /* YFCurrencyConversion.m */; };
+ F4A35F131351B2F5003334AE /* YFTwoValueObject.m in Sources */ = {isa = PBXBuildFile; fileRef = F4A35F121351B2F5003334AE /* YFTwoValueObject.m */; };
+ F4A35F161351D15C003334AE /* BSYahooFinanceCurrencyConverter.m in Sources */ = {isa = PBXBuildFile; fileRef = F4A35F151351D15C003334AE /* BSYahooFinanceCurrencyConverter.m */; };
+ F4A35F1A1351DBBD003334AE /* CurrencyConversionViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = F4A35F181351DBBD003334AE /* CurrencyConversionViewController.m */; };
+ F4A35F1B1351DBBD003334AE /* CurrencyConversionViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = F4A35F191351DBBD003334AE /* CurrencyConversionViewController.xib */; };
+ F4A766AB133F6C9A00BCC62B /* YFStockDetails.m in Sources */ = {isa = PBXBuildFile; fileRef = F4A766AA133F6C9A00BCC62B /* YFStockDetails.m */; };
+ F4A766AE133F6E3B00BCC62B /* YFStockDetailsLoader.m in Sources */ = {isa = PBXBuildFile; fileRef = F4A766AD133F6E3B00BCC62B /* YFStockDetailsLoader.m */; };
+ F4A766B2133F794E00BCC62B /* BSYahooFinanceLoadDetailsTest.m in Sources */ = {isa = PBXBuildFile; fileRef = F4A766B0133F78FF00BCC62B /* BSYahooFinanceLoadDetailsTest.m */; };
+ F4A766B6133FA76000BCC62B /* DetailsViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = F4A766B4133FA75F00BCC62B /* DetailsViewController.m */; };
+ F4A766B7133FA76000BCC62B /* DetailsViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = F4A766B5133FA75F00BCC62B /* DetailsViewController.xib */; };
+ F4EAE16E133F4CF700A543DB /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F4EAE16D133F4CF700A543DB /* UIKit.framework */; };
+ F4EAE170133F4CF700A543DB /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F4EAE16F133F4CF700A543DB /* Foundation.framework */; };
+ F4EAE172133F4CF700A543DB /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F4EAE171133F4CF700A543DB /* CoreGraphics.framework */; };
+ F4EAE178133F4CF700A543DB /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = F4EAE176133F4CF700A543DB /* InfoPlist.strings */; };
+ F4EAE17B133F4CF700A543DB /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = F4EAE17A133F4CF700A543DB /* main.m */; };
+ F4EAE17E133F4CF700A543DB /* BSYahooFinanceAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = F4EAE17D133F4CF700A543DB /* BSYahooFinanceAppDelegate.m */; };
+ F4EAE181133F4CF700A543DB /* MainWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = F4EAE17F133F4CF700A543DB /* MainWindow.xib */; };
+ F4EAE184133F4CF700A543DB /* RootViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = F4EAE183133F4CF700A543DB /* RootViewController.m */; };
+ F4EAE187133F4CF700A543DB /* RootViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = F4EAE185133F4CF700A543DB /* RootViewController.xib */; };
+ F4EAE18E133F4CF800A543DB /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F4EAE16D133F4CF700A543DB /* UIKit.framework */; };
+ F4EAE18F133F4CF800A543DB /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F4EAE16F133F4CF700A543DB /* Foundation.framework */; };
+ F4EAE190133F4CF800A543DB /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F4EAE171133F4CF700A543DB /* CoreGraphics.framework */; };
+ F4EAE198133F4CF800A543DB /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = F4EAE196133F4CF800A543DB /* InfoPlist.strings */; };
+ F4EAE19B133F4CF800A543DB /* BSYahooFinanceSymbolSearchTests.h in Resources */ = {isa = PBXBuildFile; fileRef = F4EAE19A133F4CF800A543DB /* BSYahooFinanceSymbolSearchTests.h */; };
+ F4EAE19D133F4CF800A543DB /* BSYahooFinanceSymbolSearchTests.m in Sources */ = {isa = PBXBuildFile; fileRef = F4EAE19C133F4CF800A543DB /* BSYahooFinanceSymbolSearchTests.m */; };
+/* End PBXBuildFile section */
+
+/* Begin PBXContainerItemProxy section */
+ F4EAE191133F4CF800A543DB /* PBXContainerItemProxy */ = {
+ isa = PBXContainerItemProxy;
+ containerPortal = F4EAE160133F4CF700A543DB /* Project object */;
+ proxyType = 1;
+ remoteGlobalIDString = F4EAE168133F4CF700A543DB;
+ remoteInfo = BSYahooFinance;
+ };
+/* End PBXContainerItemProxy section */
+
+/* Begin PBXFileReference section */
+ F414981113521987008AD497 /* NSObject+JSON.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSObject+JSON.h"; sourceTree = "<group>"; };
+ F414981213521987008AD497 /* NSObject+JSON.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSObject+JSON.m"; sourceTree = "<group>"; };
+ F414981C13521AA3008AD497 /* SBJsonStreamParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SBJsonStreamParser.h; sourceTree = "<group>"; };
+ F414981D13521AA3008AD497 /* SBJsonStreamParser.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SBJsonStreamParser.m; sourceTree = "<group>"; };
+ F414981E13521AA3008AD497 /* SBJsonStreamParserAdapter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SBJsonStreamParserAdapter.h; sourceTree = "<group>"; };
+ F414981F13521AA3008AD497 /* SBJsonStreamParserAdapter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SBJsonStreamParserAdapter.m; sourceTree = "<group>"; };
+ F414982013521AA3008AD497 /* SBJsonStreamParserState.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SBJsonStreamParserState.h; sourceTree = "<group>"; };
+ F414982113521AA3008AD497 /* SBJsonStreamParserState.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SBJsonStreamParserState.m; sourceTree = "<group>"; };
+ F414982213521AA3008AD497 /* SBJsonStreamWriter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SBJsonStreamWriter.h; sourceTree = "<group>"; };
+ F414982313521AA4008AD497 /* SBJsonStreamWriter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SBJsonStreamWriter.m; sourceTree = "<group>"; };
+ F414982413521AA4008AD497 /* SBJsonStreamWriterState.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SBJsonStreamWriterState.h; sourceTree = "<group>"; };
+ F414982513521AA4008AD497 /* SBJsonStreamWriterState.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SBJsonStreamWriterState.m; sourceTree = "<group>"; };
+ F414982E13521C01008AD497 /* SBJsonTokeniser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SBJsonTokeniser.h; sourceTree = "<group>"; };
+ F414982F13521C01008AD497 /* SBJsonTokeniser.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SBJsonTokeniser.m; sourceTree = "<group>"; };
+ F45C1DFE133F4DB500B3D443 /* YFStockSymbolSearch.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = YFStockSymbolSearch.h; path = BSYahooFinance/YFStockSymbolSearch.h; sourceTree = "<group>"; };
+ F45C1DFF133F4DB500B3D443 /* YFStockSymbolSearch.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = YFStockSymbolSearch.m; path = BSYahooFinance/YFStockSymbolSearch.m; sourceTree = "<group>"; };
+ F45C1E03133F4E1200B3D443 /* Reachability.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Reachability.h; sourceTree = "<group>"; };
+ F45C1E04133F4E1200B3D443 /* Reachability.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Reachability.m; sourceTree = "<group>"; };
+ F45C1E07133F4E1B00B3D443 /* ASIAuthenticationDialog.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ASIAuthenticationDialog.h; sourceTree = "<group>"; };
+ F45C1E08133F4E1B00B3D443 /* ASIAuthenticationDialog.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ASIAuthenticationDialog.m; sourceTree = "<group>"; };
+ F45C1E09133F4E1B00B3D443 /* ASICacheDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ASICacheDelegate.h; sourceTree = "<group>"; };
+ F45C1E0A133F4E1B00B3D443 /* ASIDataCompressor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ASIDataCompressor.h; sourceTree = "<group>"; };
+ F45C1E0B133F4E1B00B3D443 /* ASIDataCompressor.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ASIDataCompressor.m; sourceTree = "<group>"; };
+ F45C1E0C133F4E1B00B3D443 /* ASIDataDecompressor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ASIDataDecompressor.h; sourceTree = "<group>"; };
+ F45C1E0D133F4E1B00B3D443 /* ASIDataDecompressor.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ASIDataDecompressor.m; sourceTree = "<group>"; };
+ F45C1E0E133F4E1B00B3D443 /* ASIDownloadCache.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ASIDownloadCache.h; sourceTree = "<group>"; };
+ F45C1E0F133F4E1B00B3D443 /* ASIDownloadCache.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ASIDownloadCache.m; sourceTree = "<group>"; };
+ F45C1E10133F4E1B00B3D443 /* ASIFormDataRequest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ASIFormDataRequest.h; sourceTree = "<group>"; };
+ F45C1E11133F4E1B00B3D443 /* ASIFormDataRequest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ASIFormDataRequest.m; sourceTree = "<group>"; };
+ F45C1E12133F4E1B00B3D443 /* ASIHTTPRequest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ASIHTTPRequest.h; sourceTree = "<group>"; };
+ F45C1E13133F4E1B00B3D443 /* ASIHTTPRequest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ASIHTTPRequest.m; sourceTree = "<group>"; };
+ F45C1E14133F4E1B00B3D443 /* ASIHTTPRequestConfig.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ASIHTTPRequestConfig.h; sourceTree = "<group>"; };
+ F45C1E15133F4E1B00B3D443 /* ASIHTTPRequestDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ASIHTTPRequestDelegate.h; sourceTree = "<group>"; };
+ F45C1E16133F4E1B00B3D443 /* ASIInputStream.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ASIInputStream.h; sourceTree = "<group>"; };
+ F45C1E17133F4E1B00B3D443 /* ASIInputStream.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ASIInputStream.m; sourceTree = "<group>"; };
+ F45C1E18133F4E1B00B3D443 /* ASINetworkQueue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ASINetworkQueue.h; sourceTree = "<group>"; };
+ F45C1E19133F4E1B00B3D443 /* ASINetworkQueue.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ASINetworkQueue.m; sourceTree = "<group>"; };
+ F45C1E1A133F4E1B00B3D443 /* ASIProgressDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ASIProgressDelegate.h; sourceTree = "<group>"; };
+ F45C1E1F133F4E1B00B3D443 /* JSON.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSON.h; sourceTree = "<group>"; };
+ F45C1E26133F4E1B00B3D443 /* SBJsonParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SBJsonParser.h; sourceTree = "<group>"; };
+ F45C1E27133F4E1B00B3D443 /* SBJsonParser.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SBJsonParser.m; sourceTree = "<group>"; };
+ F45C1E28133F4E1B00B3D443 /* SBJsonWriter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SBJsonWriter.h; sourceTree = "<group>"; };
+ F45C1E29133F4E1B00B3D443 /* SBJsonWriter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SBJsonWriter.m; sourceTree = "<group>"; };
+ F45C1E38133F4E3100B3D443 /* libz.1.2.3.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libz.1.2.3.dylib; path = usr/lib/libz.1.2.3.dylib; sourceTree = SDKROOT; };
+ F45C1E40133F4E5500B3D443 /* CFNetwork.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CFNetwork.framework; path = System/Library/Frameworks/CFNetwork.framework; sourceTree = SDKROOT; };
+ F45C1E42133F4E6000B3D443 /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = System/Library/Frameworks/SystemConfiguration.framework; sourceTree = SDKROOT; };
+ F45C1E44133F4E6D00B3D443 /* MobileCoreServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MobileCoreServices.framework; path = System/Library/Frameworks/MobileCoreServices.framework; sourceTree = SDKROOT; };
+ F45C1E47133F4F1900B3D443 /* YFStockSymbol.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = YFStockSymbol.h; sourceTree = "<group>"; };
+ F45C1E48133F4F1900B3D443 /* YFStockSymbol.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = YFStockSymbol.m; sourceTree = "<group>"; };
+ F45C1E4A133F502400B3D443 /* StockExchangeCurrency.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = StockExchangeCurrency.plist; path = BSYahooFinance/StockExchangeCurrency.plist; sourceTree = "<group>"; };
+ F4A35F0513508C7A003334AE /* YFCurrencyConversion.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = YFCurrencyConversion.h; path = BSYahooFinance/YFCurrencyConversion.h; sourceTree = "<group>"; };
+ F4A35F0613508C7A003334AE /* YFCurrencyConversion.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = YFCurrencyConversion.m; path = BSYahooFinance/YFCurrencyConversion.m; sourceTree = "<group>"; };
+ F4A35F111351B2F5003334AE /* YFTwoValueObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = YFTwoValueObject.h; sourceTree = "<group>"; };
+ F4A35F121351B2F5003334AE /* YFTwoValueObject.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = YFTwoValueObject.m; sourceTree = "<group>"; };
+ F4A35F141351D15C003334AE /* BSYahooFinanceCurrencyConverter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BSYahooFinanceCurrencyConverter.h; sourceTree = "<group>"; };
+ F4A35F151351D15C003334AE /* BSYahooFinanceCurrencyConverter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BSYahooFinanceCurrencyConverter.m; sourceTree = "<group>"; };
+ F4A35F171351DBBD003334AE /* CurrencyConversionViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CurrencyConversionViewController.h; sourceTree = "<group>"; };
+ F4A35F181351DBBD003334AE /* CurrencyConversionViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CurrencyConversionViewController.m; sourceTree = "<group>"; };
+ F4A35F191351DBBD003334AE /* CurrencyConversionViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = CurrencyConversionViewController.xib; sourceTree = "<group>"; };
+ F4A766A6133F5FC000BCC62B /* BSYahooFinance.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = BSYahooFinance.h; path = BSYahooFinance/BSYahooFinance.h; sourceTree = "<group>"; };
+ F4A766A9133F6C9A00BCC62B /* YFStockDetails.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = YFStockDetails.h; sourceTree = "<group>"; };
+ F4A766AA133F6C9A00BCC62B /* YFStockDetails.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = YFStockDetails.m; sourceTree = "<group>"; };
+ F4A766AC133F6E3B00BCC62B /* YFStockDetailsLoader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = YFStockDetailsLoader.h; path = BSYahooFinance/YFStockDetailsLoader.h; sourceTree = "<group>"; };
+ F4A766AD133F6E3B00BCC62B /* YFStockDetailsLoader.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = YFStockDetailsLoader.m; path = BSYahooFinance/YFStockDetailsLoader.m; sourceTree = "<group>"; };
+ F4A766AF133F78FF00BCC62B /* BSYahooFinanceLoadDetailsTest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BSYahooFinanceLoadDetailsTest.h; sourceTree = "<group>"; };
+ F4A766B0133F78FF00BCC62B /* BSYahooFinanceLoadDetailsTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BSYahooFinanceLoadDetailsTest.m; sourceTree = "<group>"; };
+ F4A766B3133FA75F00BCC62B /* DetailsViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DetailsViewController.h; sourceTree = "<group>"; };
+ F4A766B4133FA75F00BCC62B /* DetailsViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DetailsViewController.m; sourceTree = "<group>"; };
+ F4A766B5133FA75F00BCC62B /* DetailsViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = DetailsViewController.xib; sourceTree = "<group>"; };
+ F4EAE169133F4CF700A543DB /* BSYahooFinance.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = BSYahooFinance.app; sourceTree = BUILT_PRODUCTS_DIR; };
+ F4EAE16D133F4CF700A543DB /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
+ F4EAE16F133F4CF700A543DB /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
+ F4EAE171133F4CF700A543DB /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
+ F4EAE175133F4CF700A543DB /* BSYahooFinance-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "BSYahooFinance-Info.plist"; sourceTree = "<group>"; };
+ F4EAE177133F4CF700A543DB /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
+ F4EAE179133F4CF700A543DB /* BSYahooFinance-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "BSYahooFinance-Prefix.pch"; sourceTree = "<group>"; };
+ F4EAE17A133F4CF700A543DB /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
+ F4EAE17C133F4CF700A543DB /* BSYahooFinanceAppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BSYahooFinanceAppDelegate.h; sourceTree = "<group>"; };
+ F4EAE17D133F4CF700A543DB /* BSYahooFinanceAppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BSYahooFinanceAppDelegate.m; sourceTree = "<group>"; };
+ F4EAE180133F4CF700A543DB /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = en.lproj/MainWindow.xib; sourceTree = "<group>"; };
+ F4EAE182133F4CF700A543DB /* RootViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RootViewController.h; sourceTree = "<group>"; };
+ F4EAE183133F4CF700A543DB /* RootViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RootViewController.m; sourceTree = "<group>"; };
+ F4EAE186133F4CF700A543DB /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = en.lproj/RootViewController.xib; sourceTree = "<group>"; };
+ F4EAE18D133F4CF800A543DB /* BSYahooFinanceTests.octest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = BSYahooFinanceTests.octest; sourceTree = BUILT_PRODUCTS_DIR; };
+ F4EAE195133F4CF800A543DB /* BSYahooFinanceTests-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "BSYahooFinanceTests-Info.plist"; sourceTree = "<group>"; };
+ F4EAE197133F4CF800A543DB /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
+ F4EAE199133F4CF800A543DB /* BSYahooFinanceTests-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "BSYahooFinanceTests-Prefix.pch"; sourceTree = "<group>"; };
+ F4EAE19A133F4CF800A543DB /* BSYahooFinanceSymbolSearchTests.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BSYahooFinanceSymbolSearchTests.h; sourceTree = "<group>"; };
+ F4EAE19C133F4CF800A543DB /* BSYahooFinanceSymbolSearchTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BSYahooFinanceSymbolSearchTests.m; sourceTree = "<group>"; };
+/* End PBXFileReference section */
+
+/* Begin PBXFrameworksBuildPhase section */
+ F4EAE166133F4CF700A543DB /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ F45C1E45133F4E6D00B3D443 /* MobileCoreServices.framework in Frameworks */,
+ F45C1E43133F4E6000B3D443 /* SystemConfiguration.framework in Frameworks */,
+ F45C1E41133F4E5500B3D443 /* CFNetwork.framework in Frameworks */,
+ F45C1E39133F4E3100B3D443 /* libz.1.2.3.dylib in Frameworks */,
+ F4EAE16E133F4CF700A543DB /* UIKit.framework in Frameworks */,
+ F4EAE170133F4CF700A543DB /* Foundation.framework in Frameworks */,
+ F4EAE172133F4CF700A543DB /* CoreGraphics.framework in Frameworks */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ F4EAE189133F4CF800A543DB /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ F4EAE18E133F4CF800A543DB /* UIKit.framework in Frameworks */,
+ F4EAE18F133F4CF800A543DB /* Foundation.framework in Frameworks */,
+ F4EAE190133F4CF800A543DB /* CoreGraphics.framework in Frameworks */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXFrameworksBuildPhase section */
+
+/* Begin PBXGroup section */
+ F45C1DFD133F4D9000B3D443 /* BSYahooFinance */ = {
+ isa = PBXGroup;
+ children = (
+ F45C1E46133F4EF400B3D443 /* Entities */,
+ F4A35F0513508C7A003334AE /* YFCurrencyConversion.h */,
+ F4A35F0613508C7A003334AE /* YFCurrencyConversion.m */,
+ F4A766AC133F6E3B00BCC62B /* YFStockDetailsLoader.h */,
+ F4A766AD133F6E3B00BCC62B /* YFStockDetailsLoader.m */,
+ F45C1DFE133F4DB500B3D443 /* YFStockSymbolSearch.h */,
+ F45C1DFF133F4DB500B3D443 /* YFStockSymbolSearch.m */,
+ F45C1E4A133F502400B3D443 /* StockExchangeCurrency.plist */,
+ F4A766A6133F5FC000BCC62B /* BSYahooFinance.h */,
+ );
+ name = BSYahooFinance;
+ sourceTree = "<group>";
+ };
+ F45C1E01133F4DBC00B3D443 /* External */ = {
+ isa = PBXGroup;
+ children = (
+ F45C1E06133F4E1B00B3D443 /* ASI */,
+ F45C1E1E133F4E1B00B3D443 /* JSON */,
+ F45C1E02133F4E1200B3D443 /* Apple */,
+ );
+ path = External;
+ sourceTree = "<group>";
+ };
+ F45C1E02133F4E1200B3D443 /* Apple */ = {
+ isa = PBXGroup;
+ children = (
+ F45C1E03133F4E1200B3D443 /* Reachability.h */,
+ F45C1E04133F4E1200B3D443 /* Reachability.m */,
+ );
+ name = Apple;
+ path = ASI/External/Reachability;
+ sourceTree = "<group>";
+ };
+ F45C1E06133F4E1B00B3D443 /* ASI */ = {
+ isa = PBXGroup;
+ children = (
+ F45C1E07133F4E1B00B3D443 /* ASIAuthenticationDialog.h */,
+ F45C1E08133F4E1B00B3D443 /* ASIAuthenticationDialog.m */,
+ F45C1E09133F4E1B00B3D443 /* ASICacheDelegate.h */,
+ F45C1E0A133F4E1B00B3D443 /* ASIDataCompressor.h */,
+ F45C1E0B133F4E1B00B3D443 /* ASIDataCompressor.m */,
+ F45C1E0C133F4E1B00B3D443 /* ASIDataDecompressor.h */,
+ F45C1E0D133F4E1B00B3D443 /* ASIDataDecompressor.m */,
+ F45C1E0E133F4E1B00B3D443 /* ASIDownloadCache.h */,
+ F45C1E0F133F4E1B00B3D443 /* ASIDownloadCache.m */,
+ F45C1E10133F4E1B00B3D443 /* ASIFormDataRequest.h */,
+ F45C1E11133F4E1B00B3D443 /* ASIFormDataRequest.m */,
+ F45C1E12133F4E1B00B3D443 /* ASIHTTPRequest.h */,
+ F45C1E13133F4E1B00B3D443 /* ASIHTTPRequest.m */,
+ F45C1E14133F4E1B00B3D443 /* ASIHTTPRequestConfig.h */,
+ F45C1E15133F4E1B00B3D443 /* ASIHTTPRequestDelegate.h */,
+ F45C1E16133F4E1B00B3D443 /* ASIInputStream.h */,
+ F45C1E17133F4E1B00B3D443 /* ASIInputStream.m */,
+ F45C1E18133F4E1B00B3D443 /* ASINetworkQueue.h */,
+ F45C1E19133F4E1B00B3D443 /* ASINetworkQueue.m */,
+ F45C1E1A133F4E1B00B3D443 /* ASIProgressDelegate.h */,
+ );
+ name = ASI;
+ path = ASI/Classes;
+ sourceTree = "<group>";
+ };
+ F45C1E1E133F4E1B00B3D443 /* JSON */ = {
+ isa = PBXGroup;
+ children = (
+ F45C1E1F133F4E1B00B3D443 /* JSON.h */,
+ F414981C13521AA3008AD497 /* SBJsonStreamParser.h */,
+ F414981D13521AA3008AD497 /* SBJsonStreamParser.m */,
+ F414981E13521AA3008AD497 /* SBJsonStreamParserAdapter.h */,
+ F414981F13521AA3008AD497 /* SBJsonStreamParserAdapter.m */,
+ F414982013521AA3008AD497 /* SBJsonStreamParserState.h */,
+ F414982113521AA3008AD497 /* SBJsonStreamParserState.m */,
+ F414982213521AA3008AD497 /* SBJsonStreamWriter.h */,
+ F414982313521AA4008AD497 /* SBJsonStreamWriter.m */,
+ F414982413521AA4008AD497 /* SBJsonStreamWriterState.h */,
+ F414982513521AA4008AD497 /* SBJsonStreamWriterState.m */,
+ F414982E13521C01008AD497 /* SBJsonTokeniser.h */,
+ F414982F13521C01008AD497 /* SBJsonTokeniser.m */,
+ F414981113521987008AD497 /* NSObject+JSON.h */,
+ F414981213521987008AD497 /* NSObject+JSON.m */,
+ F45C1E26133F4E1B00B3D443 /* SBJsonParser.h */,
+ F45C1E27133F4E1B00B3D443 /* SBJsonParser.m */,
+ F45C1E28133F4E1B00B3D443 /* SBJsonWriter.h */,
+ F45C1E29133F4E1B00B3D443 /* SBJsonWriter.m */,
+ );
+ name = JSON;
+ path = JSON/Classes;
+ sourceTree = "<group>";
+ };
+ F45C1E46133F4EF400B3D443 /* Entities */ = {
+ isa = PBXGroup;
+ children = (
+ F45C1E47133F4F1900B3D443 /* YFStockSymbol.h */,
+ F45C1E48133F4F1900B3D443 /* YFStockSymbol.m */,
+ F4A766A9133F6C9A00BCC62B /* YFStockDetails.h */,
+ F4A766AA133F6C9A00BCC62B /* YFStockDetails.m */,
+ F4A35F111351B2F5003334AE /* YFTwoValueObject.h */,
+ F4A35F121351B2F5003334AE /* YFTwoValueObject.m */,
+ );
+ name = Entities;
+ path = BSYahooFinance/Entities;
+ sourceTree = "<group>";
+ };
+ F4A766B8133FB14700BCC62B /* XIB */ = {
+ isa = PBXGroup;
+ children = (
+ F4A35F191351DBBD003334AE /* CurrencyConversionViewController.xib */,
+ F4EAE185133F4CF700A543DB /* RootViewController.xib */,
+ F4A766B5133FA75F00BCC62B /* DetailsViewController.xib */,
+ );
+ name = XIB;
+ sourceTree = "<group>";
+ };
+ F4EAE15E133F4CF700A543DB = {
+ isa = PBXGroup;
+ children = (
+ F45C1DFD133F4D9000B3D443 /* BSYahooFinance */,
+ F4EAE173133F4CF700A543DB /* BSYahooFinanceDemo */,
+ F4EAE193133F4CF800A543DB /* BSYahooFinanceTests */,
+ F45C1E01133F4DBC00B3D443 /* External */,
+ F4EAE16C133F4CF700A543DB /* Frameworks */,
+ F4EAE16A133F4CF700A543DB /* Products */,
+ );
+ sourceTree = "<group>";
+ };
+ F4EAE16A133F4CF700A543DB /* Products */ = {
+ isa = PBXGroup;
+ children = (
+ F4EAE169133F4CF700A543DB /* BSYahooFinance.app */,
+ F4EAE18D133F4CF800A543DB /* BSYahooFinanceTests.octest */,
+ );
+ name = Products;
+ sourceTree = "<group>";
+ };
+ F4EAE16C133F4CF700A543DB /* Frameworks */ = {
+ isa = PBXGroup;
+ children = (
+ F45C1E44133F4E6D00B3D443 /* MobileCoreServices.framework */,
+ F45C1E42133F4E6000B3D443 /* SystemConfiguration.framework */,
+ F45C1E40133F4E5500B3D443 /* CFNetwork.framework */,
+ F45C1E38133F4E3100B3D443 /* libz.1.2.3.dylib */,
+ F4EAE16D133F4CF700A543DB /* UIKit.framework */,
+ F4EAE16F133F4CF700A543DB /* Foundation.framework */,
+ F4EAE171133F4CF700A543DB /* CoreGraphics.framework */,
+ );
+ name = Frameworks;
+ sourceTree = "<group>";
+ };
+ F4EAE173133F4CF700A543DB /* BSYahooFinanceDemo */ = {
+ isa = PBXGroup;
+ children = (
+ F4EAE1A6133F4D0300A543DB /* ViewControllers */,
+ F4EAE17C133F4CF700A543DB /* BSYahooFinanceAppDelegate.h */,
+ F4EAE17D133F4CF700A543DB /* BSYahooFinanceAppDelegate.m */,
+ F4EAE17F133F4CF700A543DB /* MainWindow.xib */,
+ F4EAE174133F4CF700A543DB /* Supporting Files */,
+ );
+ path = BSYahooFinanceDemo;
+ sourceTree = "<group>";
+ };
+ F4EAE174133F4CF700A543DB /* Supporting Files */ = {
+ isa = PBXGroup;
+ children = (
+ F4EAE175133F4CF700A543DB /* BSYahooFinance-Info.plist */,
+ F4EAE176133F4CF700A543DB /* InfoPlist.strings */,
+ F4EAE179133F4CF700A543DB /* BSYahooFinance-Prefix.pch */,
+ F4EAE17A133F4CF700A543DB /* main.m */,
+ );
+ name = "Supporting Files";
+ sourceTree = "<group>";
+ };
+ F4EAE193133F4CF800A543DB /* BSYahooFinanceTests */ = {
+ isa = PBXGroup;
+ children = (
+ F4A35F141351D15C003334AE /* BSYahooFinanceCurrencyConverter.h */,
+ F4A35F151351D15C003334AE /* BSYahooFinanceCurrencyConverter.m */,
+ F4EAE19A133F4CF800A543DB /* BSYahooFinanceSymbolSearchTests.h */,
+ F4EAE19C133F4CF800A543DB /* BSYahooFinanceSymbolSearchTests.m */,
+ F4A766AF133F78FF00BCC62B /* BSYahooFinanceLoadDetailsTest.h */,
+ F4A766B0133F78FF00BCC62B /* BSYahooFinanceLoadDetailsTest.m */,
+ F4EAE194133F4CF800A543DB /* Supporting Files */,
+ );
+ path = BSYahooFinanceTests;
+ sourceTree = "<group>";
+ };
+ F4EAE194133F4CF800A543DB /* Supporting Files */ = {
+ isa = PBXGroup;
+ children = (
+ F4EAE195133F4CF800A543DB /* BSYahooFinanceTests-Info.plist */,
+ F4EAE196133F4CF800A543DB /* InfoPlist.strings */,
+ F4EAE199133F4CF800A543DB /* BSYahooFinanceTests-Prefix.pch */,
+ );
+ name = "Supporting Files";
+ sourceTree = "<group>";
+ };
+ F4EAE1A6133F4D0300A543DB /* ViewControllers */ = {
+ isa = PBXGroup;
+ children = (
+ F4A766B8133FB14700BCC62B /* XIB */,
+ F4EAE182133F4CF700A543DB /* RootViewController.h */,
+ F4EAE183133F4CF700A543DB /* RootViewController.m */,
+ F4A766B3133FA75F00BCC62B /* DetailsViewController.h */,
+ F4A766B4133FA75F00BCC62B /* DetailsViewController.m */,
+ F4A35F171351DBBD003334AE /* CurrencyConversionViewController.h */,
+ F4A35F181351DBBD003334AE /* CurrencyConversionViewController.m */,
+ );
+ name = ViewControllers;
+ sourceTree = "<group>";
+ };
+/* End PBXGroup section */
+
+/* Begin PBXNativeTarget section */
+ F4EAE168133F4CF700A543DB /* BSYahooFinance */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = F4EAE1A0133F4CF800A543DB /* Build configuration list for PBXNativeTarget "BSYahooFinance" */;
+ buildPhases = (
+ F4EAE165133F4CF700A543DB /* Sources */,
+ F4EAE166133F4CF700A543DB /* Frameworks */,
+ F4EAE167133F4CF700A543DB /* Resources */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ );
+ name = BSYahooFinance;
+ productName = BSYahooFinance;
+ productReference = F4EAE169133F4CF700A543DB /* BSYahooFinance.app */;
+ productType = "com.apple.product-type.application";
+ };
+ F4EAE18C133F4CF800A543DB /* BSYahooFinanceTests */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = F4EAE1A3133F4CF800A543DB /* Build configuration list for PBXNativeTarget "BSYahooFinanceTests" */;
+ buildPhases = (
+ F4EAE188133F4CF800A543DB /* Sources */,
+ F4EAE189133F4CF800A543DB /* Frameworks */,
+ F4EAE18A133F4CF800A543DB /* Resources */,
+ F4EAE18B133F4CF800A543DB /* ShellScript */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ F4EAE192133F4CF800A543DB /* PBXTargetDependency */,
+ );
+ name = BSYahooFinanceTests;
+ productName = BSYahooFinanceTests;
+ productReference = F4EAE18D133F4CF800A543DB /* BSYahooFinanceTests.octest */;
+ productType = "com.apple.product-type.bundle";
+ };
+/* End PBXNativeTarget section */
+
+/* Begin PBXProject section */
+ F4EAE160133F4CF700A543DB /* Project object */ = {
+ isa = PBXProject;
+ buildConfigurationList = F4EAE163133F4CF700A543DB /* Build configuration list for PBXProject "BSYahooFinance" */;
+ compatibilityVersion = "Xcode 3.2";
+ developmentRegion = English;
+ hasScannedForEncodings = 0;
+ knownRegions = (
+ en,
+ );
+ mainGroup = F4EAE15E133F4CF700A543DB;
+ productRefGroup = F4EAE16A133F4CF700A543DB /* Products */;
+ projectDirPath = "";
+ projectRoot = "";
+ targets = (
+ F4EAE168133F4CF700A543DB /* BSYahooFinance */,
+ F4EAE18C133F4CF800A543DB /* BSYahooFinanceTests */,
+ );
+ };
+/* End PBXProject section */
+
+/* Begin PBXResourcesBuildPhase section */
+ F4EAE167133F4CF700A543DB /* Resources */ = {
+ isa = PBXResourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ F4EAE178133F4CF700A543DB /* InfoPlist.strings in Resources */,
+ F4EAE181133F4CF700A543DB /* MainWindow.xib in Resources */,
+ F4EAE187133F4CF700A543DB /* RootViewController.xib in Resources */,
+ F45C1E4B133F502400B3D443 /* StockExchangeCurrency.plist in Resources */,
+ F4A766B7133FA76000BCC62B /* DetailsViewController.xib in Resources */,
+ F4A35F1B1351DBBD003334AE /* CurrencyConversionViewController.xib in Resources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ F4EAE18A133F4CF800A543DB /* Resources */ = {
+ isa = PBXResourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ F4EAE198133F4CF800A543DB /* InfoPlist.strings in Resources */,
+ F4EAE19B133F4CF800A543DB /* BSYahooFinanceSymbolSearchTests.h in Resources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXResourcesBuildPhase section */
+
+/* Begin PBXShellScriptBuildPhase section */
+ F4EAE18B133F4CF800A543DB /* ShellScript */ = {
+ isa = PBXShellScriptBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ inputPaths = (
+ );
+ outputPaths = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ shellPath = /bin/sh;
+ shellScript = "# Run the unit tests in this test bundle.\n\"${SYSTEM_DEVELOPER_DIR}/Tools/RunUnitTests\"\n";
+ };
+/* End PBXShellScriptBuildPhase section */
+
+/* Begin PBXSourcesBuildPhase section */
+ F4EAE165133F4CF700A543DB /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ F4EAE17B133F4CF700A543DB /* main.m in Sources */,
+ F4EAE17E133F4CF700A543DB /* BSYahooFinanceAppDelegate.m in Sources */,
+ F4EAE184133F4CF700A543DB /* RootViewController.m in Sources */,
+ F45C1E00133F4DB500B3D443 /* YFStockSymbolSearch.m in Sources */,
+ F45C1E05133F4E1200B3D443 /* Reachability.m in Sources */,
+ F45C1E2A133F4E1B00B3D443 /* ASIAuthenticationDialog.m in Sources */,
+ F45C1E2B133F4E1B00B3D443 /* ASIDataCompressor.m in Sources */,
+ F45C1E2C133F4E1B00B3D443 /* ASIDataDecompressor.m in Sources */,
+ F45C1E2D133F4E1B00B3D443 /* ASIDownloadCache.m in Sources */,
+ F45C1E2E133F4E1B00B3D443 /* ASIFormDataRequest.m in Sources */,
+ F45C1E2F133F4E1B00B3D443 /* ASIHTTPRequest.m in Sources */,
+ F45C1E30133F4E1B00B3D443 /* ASIInputStream.m in Sources */,
+ F45C1E31133F4E1B00B3D443 /* ASINetworkQueue.m in Sources */,
+ F45C1E36133F4E1B00B3D443 /* SBJsonParser.m in Sources */,
+ F45C1E37133F4E1B00B3D443 /* SBJsonWriter.m in Sources */,
+ F45C1E49133F4F1900B3D443 /* YFStockSymbol.m in Sources */,
+ F4A766AB133F6C9A00BCC62B /* YFStockDetails.m in Sources */,
+ F4A766AE133F6E3B00BCC62B /* YFStockDetailsLoader.m in Sources */,
+ F4A766B6133FA76000BCC62B /* DetailsViewController.m in Sources */,
+ F4A35F0713508C7A003334AE /* YFCurrencyConversion.m in Sources */,
+ F4A35F131351B2F5003334AE /* YFTwoValueObject.m in Sources */,
+ F4A35F1A1351DBBD003334AE /* CurrencyConversionViewController.m in Sources */,
+ F414981313521987008AD497 /* NSObject+JSON.m in Sources */,
+ F414982813521AA4008AD497 /* SBJsonStreamParser.m in Sources */,
+ F414982913521AA4008AD497 /* SBJsonStreamParserAdapter.m in Sources */,
+ F414982A13521AA4008AD497 /* SBJsonStreamParserState.m in Sources */,
+ F414982B13521AA4008AD497 /* SBJsonStreamWriter.m in Sources */,
+ F414982C13521AA4008AD497 /* SBJsonStreamWriterState.m in Sources */,
+ F414983013521C01008AD497 /* SBJsonTokeniser.m in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ F4EAE188133F4CF800A543DB /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ F4EAE19D133F4CF800A543DB /* BSYahooFinanceSymbolSearchTests.m in Sources */,
+ F4A766B2133F794E00BCC62B /* BSYahooFinanceLoadDetailsTest.m in Sources */,
+ F4A35F161351D15C003334AE /* BSYahooFinanceCurrencyConverter.m in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXSourcesBuildPhase section */
+
+/* Begin PBXTargetDependency section */
+ F4EAE192133F4CF800A543DB /* PBXTargetDependency */ = {
+ isa = PBXTargetDependency;
+ target = F4EAE168133F4CF700A543DB /* BSYahooFinance */;
+ targetProxy = F4EAE191133F4CF800A543DB /* PBXContainerItemProxy */;
+ };
+/* End PBXTargetDependency section */
+
+/* Begin PBXVariantGroup section */
+ F4EAE176133F4CF700A543DB /* InfoPlist.strings */ = {
+ isa = PBXVariantGroup;
+ children = (
+ F4EAE177133F4CF700A543DB /* en */,
+ );
+ name = InfoPlist.strings;
+ sourceTree = "<group>";
+ };
+ F4EAE17F133F4CF700A543DB /* MainWindow.xib */ = {
+ isa = PBXVariantGroup;
+ children = (
+ F4EAE180133F4CF700A543DB /* en */,
+ );
+ name = MainWindow.xib;
+ sourceTree = "<group>";
+ };
+ F4EAE185133F4CF700A543DB /* RootViewController.xib */ = {
+ isa = PBXVariantGroup;
+ children = (
+ F4EAE186133F4CF700A543DB /* en */,
+ );
+ name = RootViewController.xib;
+ sourceTree = "<group>";
+ };
+ F4EAE196133F4CF800A543DB /* InfoPlist.strings */ = {
+ isa = PBXVariantGroup;
+ children = (
+ F4EAE197133F4CF800A543DB /* en */,
+ );
+ name = InfoPlist.strings;
+ sourceTree = "<group>";
+ };
+/* End PBXVariantGroup section */
+
+/* Begin XCBuildConfiguration section */
+ F4EAE19E133F4CF800A543DB /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ARCHS = "$(ARCHS_STANDARD_32_BIT)";
+ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+ GCC_C_LANGUAGE_STANDARD = gnu99;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ GCC_PREPROCESSOR_DEFINITIONS = DEBUG;
+ GCC_SYMBOLS_PRIVATE_EXTERN = NO;
+ GCC_VERSION = com.apple.compilers.llvmgcc42;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ IPHONEOS_DEPLOYMENT_TARGET = 4.3;
+ SDKROOT = iphoneos;
+ };
+ name = Debug;
+ };
+ F4EAE19F133F4CF800A543DB /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ARCHS = "$(ARCHS_STANDARD_32_BIT)";
+ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+ GCC_C_LANGUAGE_STANDARD = gnu99;
+ GCC_VERSION = com.apple.compilers.llvmgcc42;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ IPHONEOS_DEPLOYMENT_TARGET = 4.3;
+ OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1";
+ SDKROOT = iphoneos;
+ };
+ name = Release;
+ };
+ F4EAE1A1133F4CF800A543DB /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ COPY_PHASE_STRIP = NO;
+ GCC_DYNAMIC_NO_PIC = NO;
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = "BSYahooFinanceDemo/BSYahooFinance-Prefix.pch";
+ INFOPLIST_FILE = "BSYahooFinanceDemo/BSYahooFinance-Info.plist";
+ IPHONEOS_DEPLOYMENT_TARGET = 4.2;
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ WRAPPER_EXTENSION = app;
+ };
+ name = Debug;
+ };
+ F4EAE1A2133F4CF800A543DB /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ COPY_PHASE_STRIP = YES;
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = "BSYahooFinanceDemo/BSYahooFinance-Prefix.pch";
+ INFOPLIST_FILE = "BSYahooFinanceDemo/BSYahooFinance-Info.plist";
+ IPHONEOS_DEPLOYMENT_TARGET = 4.2;
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ VALIDATE_PRODUCT = YES;
+ WRAPPER_EXTENSION = app;
+ };
+ name = Release;
+ };
+ F4EAE1A4133F4CF800A543DB /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/BSYahooFinance.app/BSYahooFinance";
+ FRAMEWORK_SEARCH_PATHS = (
+ "$(SDKROOT)/Developer/Library/Frameworks",
+ "$(DEVELOPER_LIBRARY_DIR)/Frameworks",
+ );
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = "BSYahooFinanceTests/BSYahooFinanceTests-Prefix.pch";
+ INFOPLIST_FILE = "BSYahooFinanceTests/BSYahooFinanceTests-Info.plist";
+ OTHER_LDFLAGS = (
+ "-framework",
+ SenTestingKit,
+ );
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ TEST_HOST = "$(BUNDLE_LOADER)";
+ WRAPPER_EXTENSION = octest;
+ };
+ name = Debug;
+ };
+ F4EAE1A5133F4CF800A543DB /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/BSYahooFinance.app/BSYahooFinance";
+ FRAMEWORK_SEARCH_PATHS = (
+ "$(SDKROOT)/Developer/Library/Frameworks",
+ "$(DEVELOPER_LIBRARY_DIR)/Frameworks",
+ );
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = "BSYahooFinanceTests/BSYahooFinanceTests-Prefix.pch";
+ INFOPLIST_FILE = "BSYahooFinanceTests/BSYahooFinanceTests-Info.plist";
+ OTHER_LDFLAGS = (
+ "-framework",
+ SenTestingKit,
+ );
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ TEST_HOST = "$(BUNDLE_LOADER)";
+ WRAPPER_EXTENSION = octest;
+ };
+ name = Release;
+ };
+/* End XCBuildConfiguration section */
+
+/* Begin XCConfigurationList section */
+ F4EAE163133F4CF700A543DB /* Build configuration list for PBXProject "BSYahooFinance" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ F4EAE19E133F4CF800A543DB /* Debug */,
+ F4EAE19F133F4CF800A543DB /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+ F4EAE1A0133F4CF800A543DB /* Build configuration list for PBXNativeTarget "BSYahooFinance" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ F4EAE1A1133F4CF800A543DB /* Debug */,
+ F4EAE1A2133F4CF800A543DB /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+ F4EAE1A3133F4CF800A543DB /* Build configuration list for PBXNativeTarget "BSYahooFinanceTests" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ F4EAE1A4133F4CF800A543DB /* Debug */,
+ F4EAE1A5133F4CF800A543DB /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+/* End XCConfigurationList section */
+ };
+ rootObject = F4EAE160133F4CF700A543DB /* Project object */;
+}
View
7 BSYahooFinance.xcodeproj/project.xcworkspace/contents.xcworkspacedata
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Workspace
+ version = "1.0">
+ <FileRef
+ location = "self:BSYahooFinance.xcodeproj">
+ </FileRef>
+</Workspace>
View
17 BSYahooFinance/BSYahooFinance.h
@@ -0,0 +1,17 @@
+//
+// Created by Björn Sållarp on 2011-03-27.
+// NO Copyright 2010 MightyLittle Industries. NO rights reserved.
+//
+// Use this code any way you like. If you do like it, please
+// link to my blog and/or write a friendly comment. Thank you!
+//
+// Read my blog @ http://blog.sallarp.com
+//
+
+#import <Foundation/Foundation.h>
+#import "YFStockSymbolSearch.h"
+#import "YFStockDetailsLoader.h"
+#import "YFStockSymbol.h"
+#import "YFStockDetails.h"
+#import "YFCurrencyConversion.h"
+
View
106 BSYahooFinance/Entities/YFStockDetails.h
@@ -0,0 +1,106 @@
+//
+// Created by Björn Sållarp on 2011-03-27.
+// NO Copyright 2010 MightyLittle Industries. NO rights reserved.
+//
+// Use this code any way you like. If you do like it, please
+// link to my blog and/or write a friendly comment. Thank you!
+//
+// Read my blog @ http://blog.sallarp.com
+//
+
+#import <Foundation/Foundation.h>
+
+
+@interface YFStockDetails : NSObject {
+ NSDictionary *detailsDictionary;
+}
+
++ (YFStockDetails *)stockDetailsWithDetails:(NSDictionary *)details;
+- (id)initWithDetails:(NSDictionary *)detailsDictionary;
+
+@property (nonatomic, retain) NSDictionary *detailsDictionary;
+
+@property (nonatomic, readonly) NSString *symbol;
+@property (nonatomic, readonly) NSString *ask;
+@property (nonatomic, readonly) NSString *averageDailyVolume;
+@property (nonatomic, readonly) NSString *bid;
+@property (nonatomic, readonly) NSString *askRealtime;
+@property (nonatomic, readonly) NSString *bidRealtime;
+@property (nonatomic, readonly) NSString *bookValue;
+@property (nonatomic, readonly) NSString *changePercentChange;
+@property (nonatomic, readonly) NSString *change;
+@property (nonatomic, readonly) NSString *commission;
+@property (nonatomic, readonly) NSString *changeRealtime;
+@property (nonatomic, readonly) NSString *afterHoursChangeRealtime;
+@property (nonatomic, readonly) NSString *dividendShare;
+@property (nonatomic, readonly) NSString *lastTradeDate;
+@property (nonatomic, readonly) NSString *tradeDate;
+@property (nonatomic, readonly) NSString *earningsShare;
+@property (nonatomic, readonly) NSString *errorIndicationreturnedforsymbolchangedinvalid;
+@property (nonatomic, readonly) NSString *EPSEstimateCurrentYear;
+@property (nonatomic, readonly) NSString *EPSEstimateNextYear;
+@property (nonatomic, readonly) NSString *EPSEstimateNextQuarter;
+@property (nonatomic, readonly) NSString *daysLow;
+@property (nonatomic, readonly) NSString *daysHigh;
+@property (nonatomic, readonly) NSString *yearLow;
+@property (nonatomic, readonly) NSString *yearHigh;
+@property (nonatomic, readonly) NSString *holdingsGainPercent;
+@property (nonatomic, readonly) NSString *annualizedGain;
+@property (nonatomic, readonly) NSString *holdingsGain;
+@property (nonatomic, readonly) NSString *holdingsGainPercentRealtime;
+@property (nonatomic, readonly) NSString *holdingsGainRealtime;
+@property (nonatomic, readonly) NSString *moreInfo;
+@property (nonatomic, readonly) NSString *orderBookRealtime;
+@property (nonatomic, readonly) NSString *marketCapitalization;
+@property (nonatomic, readonly) NSString *marketCapRealtime;
+@property (nonatomic, readonly) NSString *EBITDA;
+@property (nonatomic, readonly) NSString *changeFromYearLow;
+@property (nonatomic, readonly) NSString *percentChangeFromYearLow;
+@property (nonatomic, readonly) NSString *lastTradeRealtimeWithTime;
+@property (nonatomic, readonly) NSString *changePercentRealtime;
+@property (nonatomic, readonly) NSString *changeFromYearHigh;
+@property (nonatomic, readonly) NSString *percentChangeFromYearHigh;
+@property (nonatomic, readonly) NSString *lastTradeWithTime;
+@property (nonatomic, readonly) NSString *lastTradePriceOnly;
+@property (nonatomic, readonly) NSString *highLimit;
+@property (nonatomic, readonly) NSString *lowLimit;
+@property (nonatomic, readonly) NSString *daysRange;
+@property (nonatomic, readonly) NSString *daysRangeRealtime;
+@property (nonatomic, readonly) NSString *fiftydayMovingAverage;
+@property (nonatomic, readonly) NSString *twoHundreddayMovingAverage;
+@property (nonatomic, readonly) NSString *changeFromTwoHundreddayMovingAverage;
+@property (nonatomic, readonly) NSString *percentChangeFromTwoHundreddayMovingAverage;
+@property (nonatomic, readonly) NSString *changeFromFiftydayMovingAverage;
+@property (nonatomic, readonly) NSString *percentChangeFromFiftydayMovingAverage;
+@property (nonatomic, readonly) NSString *name;
+@property (nonatomic, readonly) NSString *notes;
+@property (nonatomic, readonly) NSString *open;
+@property (nonatomic, readonly) NSString *previousClose;
+@property (nonatomic, readonly) NSString *pricePaid;
+@property (nonatomic, readonly) NSString *changeinPercent;
+@property (nonatomic, readonly) NSString *priceSales;
+@property (nonatomic, readonly) NSString *priceBook;
+@property (nonatomic, readonly) NSString *exDividendDate;
+@property (nonatomic, readonly) NSString *PERatio;
+@property (nonatomic, readonly) NSString *dividendPayDate;
+@property (nonatomic, readonly) NSString *PERatioRealtime;
+@property (nonatomic, readonly) NSString *PEGRatio;
+@property (nonatomic, readonly) NSString *priceEPSEstimateCurrentYear;
+@property (nonatomic, readonly) NSString *priceEPSEstimateNextYear;
+@property (nonatomic, readonly) NSString *sharesOwned;
+@property (nonatomic, readonly) NSString *shortRatio;
+@property (nonatomic, readonly) NSString *lastTradeTime;
+@property (nonatomic, readonly) NSString *tickerTrend;
+@property (nonatomic, readonly) NSString *oneyrTargetPrice;
+@property (nonatomic, readonly) NSString *volume;
+@property (nonatomic, readonly) NSString *holdingsValue;
+@property (nonatomic, readonly) NSString *holdingsValueRealtime;
+@property (nonatomic, readonly) NSString *yearRange;
+@property (nonatomic, readonly) NSString *daysValueChange;
+@property (nonatomic, readonly) NSString *daysValueChangeRealtime;
+@property (nonatomic, readonly) NSString *stockExchange;
+@property (nonatomic, readonly) NSString *dividendYield;
+@property (nonatomic, readonly) NSString *percentChange;
+
+
+@end
View
285 BSYahooFinance/Entities/YFStockDetails.m
@@ -0,0 +1,285 @@
+//
+// Created by Björn Sållarp on 2011-03-27.
+// NO Copyright 2010 MightyLittle Industries. NO rights reserved.
+//
+// Use this code any way you like. If you do like it, please
+// link to my blog and/or write a friendly comment. Thank you!
+//
+// Read my blog @ http://blog.sallarp.com
+//
+
+#import "YFStockDetails.h"
+
+@implementation YFStockDetails
+@synthesize detailsDictionary;
+
+#pragma mark - Initializers
+
++ (YFStockDetails *)stockDetailsWithDetails:(NSDictionary *)details
+{
+ return [[[self alloc] initWithDetails:details] autorelease];
+}
+
+- (id)initWithDetails:(NSDictionary *)detailsDictionary_
+{
+ if ((self = [super init])) {
+ self.detailsDictionary = detailsDictionary_;
+ }
+
+ return self;
+}
+
+#pragma mark - Accessors
+
+- (NSString *)symbol {
+ return [self.detailsDictionary valueForKey:@"symbol"];
+}
+- (NSString *)ask {
+ return [self.detailsDictionary valueForKey:@"Ask"];
+}
+- (NSString *)averageDailyVolume {
+ return [self.detailsDictionary valueForKey:@"AverageDailyVolume"];
+}
+- (NSString *)bid {
+ return [self.detailsDictionary valueForKey:@"Bid"];
+}
+- (NSString *)askRealtime {
+ return [self.detailsDictionary valueForKey:@"AskRealtime"];
+}
+- (NSString *)bidRealtime {
+ return [self.detailsDictionary valueForKey:@"BidRealtime"];
+}
+- (NSString *)bookValue {
+ return [self.detailsDictionary valueForKey:@"BookValue"];
+}
+- (NSString *)changePercentChange {
+ return [self.detailsDictionary valueForKey:@"Change_PercentChange"];
+}
+- (NSString *)change {
+ return [self.detailsDictionary valueForKey:@"Change"];
+}
+- (NSString *)commission {
+ return [self.detailsDictionary valueForKey:@"Commission"];
+}
+- (NSString *)changeRealtime {
+ return [self.detailsDictionary valueForKey:@"ChangeRealtime"];
+}
+- (NSString *)afterHoursChangeRealtime {
+ return [self.detailsDictionary valueForKey:@"AfterHoursChangeRealtime"];
+}
+- (NSString *)dividendShare {
+ return [self.detailsDictionary valueForKey:@"DividendShare"];
+}
+- (NSString *)lastTradeDate {
+ return [self.detailsDictionary valueForKey:@"LastTradeDate"];
+}
+- (NSString *)tradeDate {
+ return [self.detailsDictionary valueForKey:@"TradeDate"];
+}
+- (NSString *)earningsShare {
+ return [self.detailsDictionary valueForKey:@"EarningsShare"];
+}
+- (NSString *)errorIndicationreturnedforsymbolchangedinvalid{
+ return [self.detailsDictionary valueForKey:@"ErrorIndicationreturnedforsymbolchangedinvalid"];
+}
+- (NSString *)EPSEstimateCurrentYear{
+ return [self.detailsDictionary valueForKey:@"EPSEstimateCurrentYear"];
+}
+- (NSString *)EPSEstimateNextYear{
+ return [self.detailsDictionary valueForKey:@"EPSEstimateNextYear"];
+}
+- (NSString *)EPSEstimateNextQuarter{
+ return [self.detailsDictionary valueForKey:@"EPSEstimateNextQuarter"];
+}
+- (NSString *)daysLow{
+ return [self.detailsDictionary valueForKey:@"DaysLow"];
+}
+- (NSString *)daysHigh{
+ return [self.detailsDictionary valueForKey:@"DaysHigh"];
+}
+- (NSString *)yearLow{
+ return [self.detailsDictionary valueForKey:@"YearLow"];
+}
+- (NSString *)yearHigh{
+ return [self.detailsDictionary valueForKey:@"YearHigh"];
+}
+- (NSString *)holdingsGainPercent{
+ return [self.detailsDictionary valueForKey:@"HoldingsGainPercent"];
+}
+- (NSString *)annualizedGain{
+ return [self.detailsDictionary valueForKey:@"AnnualizedGain"];
+}
+- (NSString *)holdingsGain{
+ return [self.detailsDictionary valueForKey:@"HoldingsGain"];
+}
+- (NSString *)holdingsGainPercentRealtime{
+ return [self.detailsDictionary valueForKey:@"HoldingsGainPercentRealtime"];
+}
+- (NSString *)holdingsGainRealtime {
+ return [self.detailsDictionary valueForKey:@"HoldingsGainRealtime"];
+}
+- (NSString *)moreInfo {
+ return [self.detailsDictionary valueForKey:@"MoreInfo"];
+}
+- (NSString *)orderBookRealtime {
+ return [self.detailsDictionary valueForKey:@"OrderBookRealtime"];
+}
+- (NSString *)marketCapitalization {
+ return [self.detailsDictionary valueForKey:@"MarketCapitalization"];
+}
+- (NSString *)marketCapRealtime {
+ return [self.detailsDictionary valueForKey:@"MarketCapRealtime"];
+}
+- (NSString *)EBITDA {
+ return [self.detailsDictionary valueForKey:@"EBITDA"];
+}
+- (NSString *)changeFromYearLow {
+ return [self.detailsDictionary valueForKey:@"ChangeFromYearLow"];
+}
+- (NSString *)percentChangeFromYearLow {
+ return [self.detailsDictionary valueForKey:@"PercentChangeFromYearLow"];
+}
+- (NSString *)lastTradeRealtimeWithTime {
+ return [self.detailsDictionary valueForKey:@"LastTradeRealtimeWithTime"];
+}
+- (NSString *)changePercentRealtime {
+ return [self.detailsDictionary valueForKey:@"ChangePercentRealtime"];
+}
+- (NSString *)changeFromYearHigh {
+ return [self.detailsDictionary valueForKey:@"ChangeFromYearHigh"];
+}
+- (NSString *)percentChangeFromYearHigh {
+ // NOTE: Misspelled from source
+ return [self.detailsDictionary valueForKey:@"PercebtChangeFromYearHigh"];
+}
+- (NSString *)lastTradeWithTime {
+ return [self.detailsDictionary valueForKey:@"LastTradeWithTime"];
+}
+- (NSString *)lastTradePriceOnly {
+ return [self.detailsDictionary valueForKey:@"LastTradePriceOnly"];
+}
+- (NSString *)highLimit {
+ return [self.detailsDictionary valueForKey:@"HighLimit"];
+}
+- (NSString *)lowLimit {
+ return [self.detailsDictionary valueForKey:@"LowLimit"];
+}
+- (NSString *)daysRange {
+ return [self.detailsDictionary valueForKey:@"DaysRange"];
+}
+- (NSString *)daysRangeRealtime {
+ return [self.detailsDictionary valueForKey:@"DaysRangeRealtime"];
+}
+- (NSString *)fiftydayMovingAverage {
+ return [self.detailsDictionary valueForKey:@"FiftydayMovingAverage"];
+}
+- (NSString *)twoHundreddayMovingAverage {
+ return [self.detailsDictionary valueForKey:@"TwoHundreddayMovingAverage"];
+}
+- (NSString *)changeFromTwoHundreddayMovingAverage {
+ return [self.detailsDictionary valueForKey:@"ChangeFromTwoHundreddayMovingAverage"];
+}
+- (NSString *)percentChangeFromTwoHundreddayMovingAverage {
+ return [self.detailsDictionary valueForKey:@"PercentChangeFromTwoHundreddayMovingAverage"];
+}
+- (NSString *)changeFromFiftydayMovingAverage {
+ return [self.detailsDictionary valueForKey:@"ChangeFromFiftydayMovingAverage"];
+}
+- (NSString *)percentChangeFromFiftydayMovingAverage {
+ return [self.detailsDictionary valueForKey:@"PercentChangeFromFiftydayMovingAverage"];
+}
+- (NSString *)name {
+ return [self.detailsDictionary valueForKey:@"Name"];
+}
+- (NSString *)notes {
+ return [self.detailsDictionary valueForKey:@"Notes"];
+}
+- (NSString *)open {
+ return [self.detailsDictionary valueForKey:@"Open"];
+}
+- (NSString *)previousClose {
+ return [self.detailsDictionary valueForKey:@"PreviousClose"];
+}
+- (NSString *)pricePaid {
+ return [self.detailsDictionary valueForKey:@"PricePaid"];
+}
+- (NSString *)changeinPercent {
+ return [self.detailsDictionary valueForKey:@"ChangeinPercent"];
+}
+- (NSString *)priceSales {
+ return [self.detailsDictionary valueForKey:@"PriceSales"];
+}
+- (NSString *)priceBook {
+ return [self.detailsDictionary valueForKey:@"PriceBook"];
+}
+- (NSString *)exDividendDate {
+ return [self.detailsDictionary valueForKey:@"ExDividendDate"];
+}
+- (NSString *)PERatio {
+ return [self.detailsDictionary valueForKey:@"PERatio"];
+}
+- (NSString *)dividendPayDate {
+ return [self.detailsDictionary valueForKey:@"DividendPayDate"];
+}
+- (NSString *)PERatioRealtime {
+ return [self.detailsDictionary valueForKey:@"PERatioRealtime"];
+}
+- (NSString *)PEGRatio {
+ return [self.detailsDictionary valueForKey:@"PEGRatio"];
+}
+- (NSString *)priceEPSEstimateCurrentYear {
+ return [self.detailsDictionary valueForKey:@"PriceEPSEstimateCurrentYear"];
+}
+- (NSString *)priceEPSEstimateNextYear {
+ return [self.detailsDictionary valueForKey:@"PriceEPSEstimateNextYear"];
+}
+- (NSString *)sharesOwned {
+ return [self.detailsDictionary valueForKey:@"SharesOwned"];
+}
+- (NSString *)shortRatio {
+ return [self.detailsDictionary valueForKey:@"ShortRatio"];
+}
+- (NSString *)lastTradeTime {
+ return [self.detailsDictionary valueForKey:@"LastTradeTime"];
+}
+- (NSString *)tickerTrend {
+ return [self.detailsDictionary valueForKey:@"TickerTrend"];
+}
+- (NSString *)oneyrTargetPrice {
+ return [self.detailsDictionary valueForKey:@"OneyrTargetPrice"];
+}
+- (NSString *)volume {
+ return [self.detailsDictionary valueForKey:@"Volume"];
+}
+- (NSString *)holdingsValue {
+ return [self.detailsDictionary valueForKey:@"HoldingsValue"];
+}
+- (NSString *)holdingsValueRealtime {
+ return [self.detailsDictionary valueForKey:@"HoldingsValueRealtime"];
+}
+- (NSString *)yearRange {
+ return [self.detailsDictionary valueForKey:@"YearRange"];
+}
+- (NSString *)daysValueChange {
+ return [self.detailsDictionary valueForKey:@"DaysValueChange"];
+}
+- (NSString *)daysValueChangeRealtime {
+ return [self.detailsDictionary valueForKey:@"DaysValueChangeRealtime"];
+}
+- (NSString *)stockExchange {
+ return [self.detailsDictionary valueForKey:@"StockExchange"];
+}
+- (NSString *)dividendYield {
+ return [self.detailsDictionary valueForKey:@"DividendYield"];
+}
+- (NSString *)percentChange {
+ return [self.detailsDictionary valueForKey:@"PercentChange"];
+}
+
+#pragma mark - Memory management
+- (void)dealloc
+{
+ self.detailsDictionary = nil;
+ [super dealloc];
+}
+@end
View
23 BSYahooFinance/Entities/YFStockSymbol.h
@@ -0,0 +1,23 @@
+//
+// Created by Björn Sållarp on 2011-03-27.
+// NO Copyright 2010 MightyLittle Industries. NO rights reserved.
+//
+// Use this code any way you like. If you do like it, please
+// link to my blog and/or write a friendly comment. Thank you!
+//
+// Read my blog @ http://blog.sallarp.com
+//
+
+#import <Foundation/Foundation.h>
+
+
+@interface YFStockSymbol : NSObject {
+ NSString *symbol;
+ NSString *name;
+ NSString *currency;
+}
+@property (nonatomic, retain) NSString *symbol;
+@property (nonatomic, retain) NSString *name;
+@property (nonatomic, retain) NSString *currency;
+
+@end
View
24 BSYahooFinance/Entities/YFStockSymbol.m
@@ -0,0 +1,24 @@
+//
+// Created by Björn Sållarp on 2011-03-27.
+// NO Copyright 2010 MightyLittle Industries. NO rights reserved.
+//
+// Use this code any way you like. If you do like it, please
+// link to my blog and/or write a friendly comment. Thank you!
+//
+// Read my blog @ http://blog.sallarp.com
+//
+
+#import "YFStockSymbol.h"
+
+
+@implementation YFStockSymbol
+@synthesize symbol, name, currency;
+
+-(void)dealloc
+{
+ self.symbol = nil;
+ self.name = nil;
+ self.currency = nil;
+ [super dealloc];
+}
+@end
View
24 BSYahooFinance/Entities/YFTwoValueObject.h
@@ -0,0 +1,24 @@
+//
+// Created by Björn Sållarp on 2011-04-10.
+// NO Copyright 2010 MightyLittle Industries. NO rights reserved.
+//
+// Use this code any way you like. If you do like it, please
+// link to my blog and/or write a friendly comment. Thank you!
+//
+// Read my blog @ http://blog.sallarp.com
+//
+
+#import <Foundation/Foundation.h>
+
+
+@interface YFTwoValueObject : NSObject {
+ NSObject *firstValue;
+ NSObject *secondValue;
+}
+@property (nonatomic, retain) NSObject *firstValue;
+@property (nonatomic, retain) NSObject *secondValue;
+
++ (id)objectWithValues:(NSObject *)first second:(NSObject *)second;
+- (id)initWithValues:(NSObject *)first second:(NSObject *)second;
+
+@end
View
36 BSYahooFinance/Entities/YFTwoValueObject.m
@@ -0,0 +1,36 @@
+//
+// Created by Björn Sållarp on 2011-04-10.
+// NO Copyright 2010 MightyLittle Industries. NO rights reserved.
+//
+// Use this code any way you like. If you do like it, please
+// link to my blog and/or write a friendly comment. Thank you!
+//
+// Read my blog @ http://blog.sallarp.com
+//
+
+#import "YFTwoValueObject.h"
+
+@implementation YFTwoValueObject
+@synthesize firstValue, secondValue;
+
++ (id)objectWithValues:(NSObject *)first second:(NSObject *)second
+{
+ return [[[self alloc] initWithValues:first second:second] autorelease];
+}
+
+- (id)initWithValues:(NSObject *)first second:(NSObject *)second
+{
+ if((self = [super init])) {
+ self.firstValue = first;
+ self.secondValue = second;
+ }
+ return self;
+}
+
+- (void)dealloc
+{
+ self.firstValue = nil;
+ self.secondValue = nil;
+ [super dealloc];
+}
+@end
View
94 BSYahooFinance/StockExchangeCurrency.plist
@@ -0,0 +1,94 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>.BA</key>
+ <string>ARS</string>
+ <key>.VI</key>
+ <string>EUR</string>
+ <key>.AX</key>
+ <string>AUD</string>
+ <key>.SA</key>
+ <string>BRL</string>
+ <key>.TO</key>
+ <string>CAD</string>
+ <key>.V</key>
+ <string>CAD</string>
+ <key>.SN</key>
+ <string>CLP</string>
+ <key>.SS</key>
+ <string>CLP</string>
+ <key>.SZ</key>
+ <string>CLP</string>
+ <key>.CO</key>
+ <string>DKK</string>
+ <key>.NX</key>
+ <string>EUR</string>
+ <key>.PA</key>
+ <string>EUR</string>
+ <key>.BE</key>
+ <string>EUR</string>
+ <key>.BM</key>
+ <string>EUR</string>
+ <key>.DU</key>
+ <string>EUR</string>
+ <key>.F</key>
+ <string>EUR</string>
+ <key>.HM</key>
+ <string>EUR</string>
+ <key>.HA</key>
+ <string>EUR</string>
+ <key>.MU</key>
+ <string>EUR</string>
+ <key>.SG</key>
+ <string>EUR</string>
+ <key>.DE</key>
+ <string>EUR</string>
+ <key>.HK</key>
+ <string>HKD</string>
+ <key>.BO</key>
+ <string>INR</string>
+ <key>.NS</key>
+ <string>INR</string>
+ <key>..JK</key>
+ <string>IDR</string>
+ <key>.TA</key>
+ <string>ILS</string>
+ <key>.MI</key>
+ <string>EUR</string>
+ <key>.MX</key>
+ <string>MXN</string>
+ <key>.AS</key>
+ <string>EUR</string>
+ <key>.NZ</key>
+ <string>NZD</string>
+ <key>.OL</key>
+ <string>NOK</string>
+ <key>.SI</key>
+ <string>SGD</string>
+ <key>.KS</key>
+ <string>KRW</string>
+ <key>.KQ</key>
+ <string>KRW</string>
+ <key>.BC</key>
+ <string>EUR</string>
+ <key>.BI</key>
+ <string>EUR</string>
+ <key>.MF</key>
+ <string>EUR</string>
+ <key>.MC</key>
+ <string>EUR</string>
+ <key>.MA</key>
+ <string>EUR</string>
+ <key>.ST</key>
+ <string>SEK</string>
+ <key>.SW</key>
+ <string>CHF</string>
+ <key>.TWO</key>
+ <string>TWD</string>
+ <key>.TW</key>
+ <string>TWD</string>
+ <key>.L</key>
+ <string>GBP</string>
+</dict>
+</plist>
View
46 BSYahooFinance/YFCurrencyConversion.h
@@ -0,0 +1,46 @@
+//
+// Created by Björn Sållarp on 2011-04-09.
+// NO Copyright 2010 MightyLittle Industries. NO rights reserved.
+//
+// Use this code any way you like. If you do like it, please
+// link to my blog and/or write a friendly comment. Thank you!
+//
+// Read my blog @ http://blog.sallarp.com
+//
+
+#import <Foundation/Foundation.h>
+#import "ASIHTTPRequest.h"
+#import "ASINetworkQueue.h"
+
+@class YFCurrencyConverter;
+
+@interface YFCurrencyConverter : NSObject {
+ NSMutableDictionary *internalBatchConversionQueue;
+ NSMutableDictionary *internalBatchConversionResult;
+ ASINetworkQueue *batchRequestQueue;
+ ASIHTTPRequest *internalConversionRequest;
+ NSError *internalError;
+ float internalConversionRate;
+ NSString *internalFromCurrency;
+ NSString *internalToCurrency;
+
+ SEL didFinishSelector;
+ SEL didFailSelector;
+}
+
+@property (nonatomic, assign) id<NSObject> delegate;
+@property (nonatomic, readonly) NSError *error;
+@property (nonatomic, readonly) NSString *fromCurrency;
+@property (nonatomic, readonly) NSString *toCurrency;
+@property (nonatomic, readonly) float conversionRate;
+@property (nonatomic, readonly) NSDictionary *batchConversionRates;
+@property (assign) SEL didFinishSelector;
+@property (assign) SEL didFailSelector;
+
++ (YFCurrencyConverter *)currencyConverterWithDelegate:(id<NSObject>)delegate;
+- (id)initWithDelegate:(id<NSObject>)delegate;
+- (void)convertFromCurrency:(NSString *)fromCurrency toCurrency:(NSString *)toCurrency asynchronous:(BOOL)asyncronous;
+- (void)convertFromCurrencies:(NSArray *)fromCurrencies toCurrencies:(NSArray *)toCurrencies asychronous:(BOOL)asynchronous;
+- (void)cancel;
+
+@end
View
308 BSYahooFinance/YFCurrencyConversion.m
@@ -0,0 +1,308 @@
+//
+// Created by Björn Sållarp on 2011-04-09.
+// NO Copyright 2010 MightyLittle Industries. NO rights reserved.
+//
+// Use this code any way you like. If you do like it, please
+// link to my blog and/or write a friendly comment. Thank you!
+//
+// Read my blog @ http://blog.sallarp.com
+//
+#import "YFCurrencyConversion.h"
+#import "YFTwoValueObject.h"
+
+@interface YFCurrencyConverter()
+@property (nonatomic, retain) NSMutableDictionary *internalBatchConversionResult;
+@property (nonatomic, retain) NSMutableDictionary *internalBatchConversionQueue;
+@property (nonatomic, retain) ASINetworkQueue *batchRequestQueue;
+@property (nonatomic, retain) ASIHTTPRequest *internalConversionRequest;
+@property (nonatomic, retain) NSError *internalError;
+@property (nonatomic, retain) NSString *internalFromCurrency;
+@property (nonatomic, retain) NSString *internalToCurrency;
+
+- (ASIHTTPRequest *)createRequestWithParameters:(NSArray *)parameters isBatchRequest:(BOOL)isBatchRequest isAsynchronous:(BOOL)isAsynchronous;
+- (void)updateBatchResult:(NSString *)yahooResponse forCurrencies:(NSArray *)currencies;
+@end
+
+@implementation YFCurrencyConverter
+@synthesize delegate;
+@synthesize internalError;
+@synthesize internalConversionRequest;
+@synthesize internalBatchConversionResult;
+@synthesize internalFromCurrency;
+@synthesize internalToCurrency;
+@synthesize batchRequestQueue;
+@synthesize internalBatchConversionQueue;
+@synthesize didFailSelector;
+@synthesize didFinishSelector;
+@dynamic error;
+@dynamic conversionRate;
+@dynamic fromCurrency;
+@dynamic toCurrency;
+@dynamic batchConversionRates;
+
+
+#pragma mark - Initializers
+
++ (YFCurrencyConverter *)currencyConverterWithDelegate:(id<NSObject>)delegate
+{
+ return [[[self alloc] initWithDelegate:delegate] autorelease];
+}
+
+- (id)initWithDelegate:(id<NSObject>)aDelegate
+{
+ if((self = [super init])) {
+ self.delegate = aDelegate;
+
+ if (delegate != nil) {
+ didFinishSelector = @selector(currencyConversionDidFinish:);
+ didFailSelector = @selector(currencyConversionDidFail:);
+ }
+ }
+ return self;
+}
+
+#pragma mark - Private methods
+
+- (ASIHTTPRequest *)createRequestWithParameters:(NSArray *)parameters isBatchRequest:(BOOL)isBatchRequest isAsynchronous:(BOOL)isAsynchronous
+{
+ NSString *requestParameter = @"";
+
+ int paramCount = [parameters count];
+ for (int i = 0; i < paramCount; i++) {
+ requestParameter = [requestParameter stringByAppendingFormat:@"&s=%@%@=X", [[parameters objectAtIndex:i] firstValue], [[parameters objectAtIndex:i] secondValue]];
+ }
+
+ ASIHTTPRequest *request = [ASIHTTPRequest requestWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"http://quote.yahoo.com/d/quotes.csv?f=l1%@",requestParameter]]];
+ request.cachePolicy = ASIDoNotReadFromCacheCachePolicy;
+
+ if (!isBatchRequest) {
+ request.delegate = self;
+ [request setDidFailSelector:@selector(conversionDidFail:)];
+ [request setDidFinishSelector:@selector(conversionDidFinish:)];
+ }
+ else if (isBatchRequest && !isAsynchronous) {
+ request.delegate = self;
+ [request setDidFailSelector:@selector(batchRequestDidFail:)];
+ }
+
+ return request;
+}
+
+
+- (void)updateBatchResult:(NSString *)yahooResponse forCurrencies:(NSArray *)currencies
+{
+ NSArray *results = [yahooResponse componentsSeparatedByString: @"\n"];
+
+ int resultCount = [results count];
+ int currencyCount = [currencies count];
+ for (int i = 0; i < resultCount && i < currencyCount; i++) {
+ YFTwoValueObject *fromto = [currencies objectAtIndex:i];
+ NSNumber *rate = [NSNumber numberWithFloat:[[results objectAtIndex:i] floatValue]];
+
+ if ([self.internalBatchConversionResult valueForKey:(NSString *)fromto.firstValue] == nil) {
+ NSMutableDictionary *dict = [NSMutableDictionary dictionaryWithObject:rate forKey:(NSString*)fromto.secondValue];
+ [self.internalBatchConversionResult setObject:dict forKey:(NSString *)fromto.firstValue];
+ }
+ else {
+ [[self.internalBatchConversionResult objectForKey:(NSString*)fromto.firstValue] setObject:rate forKey:(NSString*)fromto.secondValue];
+ }
+ }
+}
+
+#pragma mark - Public methods
+
+- (void)convertFromCurrency:(NSString *)fromCurrency_ toCurrency:(NSString *)toCurrency_ asynchronous:(BOOL)asyncronous
+{
+ [self cancel];
+
+ self.internalFromCurrency = fromCurrency_;
+ self.internalToCurrency = toCurrency_;
+
+ self.internalConversionRequest = [self createRequestWithParameters:[NSArray arrayWithObject:[YFTwoValueObject objectWithValues:self.internalFromCurrency second:self.internalToCurrency]] isBatchRequest:NO isAsynchronous:asyncronous];
+
+ if (asyncronous) {
+ [self.internalConversionRequest startAsynchronous];
+ }
+ else {
+ [self.internalConversionRequest startSynchronous];
+ }
+}
+
+
+- (void)convertFromCurrencies:(NSArray *)fromCurrencies toCurrencies:(NSArray *)toCurrencies asychronous:(BOOL)asynchronous
+{
+ [self cancel];
+
+ if (asynchronous) {
+ self.batchRequestQueue = [ASINetworkQueue queue];
+ self.internalBatchConversionQueue = [NSMutableDictionary dictionary];
+ }
+
+ self.internalBatchConversionResult = [NSMutableDictionary dictionary];
+
+ NSMutableArray *currencyChunk = [NSMutableArray array];
+ int chunkCounter = 0;
+
+ for (NSString *from in fromCurrencies) {
+ for (NSString *to in toCurrencies) {
+
+ YFTwoValueObject *fromto = [YFTwoValueObject objectWithValues:from second:to];
+ [currencyChunk addObject:fromto];
+ chunkCounter++;
+
+ // The service can only take an URL of ~2000 chars. If we're at 170 conversions in one go we're getting
+ // close to 2000 chars and need to run multiple requests.
+ if (chunkCounter >= 170) {
+ ASIHTTPRequest *request = [self createRequestWithParameters:currencyChunk isBatchRequest:YES isAsynchronous:asynchronous];
+ if (asynchronous) {
+ [self.batchRequestQueue addOperation:request];
+ [self.internalBatchConversionQueue setValue:currencyChunk forKey:[[request url] absoluteString]];
+ }
+ else {
+ [request startSynchronous];
+ if (request.error != nil) {
+ return;
+ }
+ else {
+ [self updateBatchResult:[request responseString] forCurrencies:currencyChunk];
+ }
+ }
+
+ currencyChunk = [NSMutableArray array];
+ chunkCounter = 0;
+ }
+ }
+ }
+
+ if (chunkCounter > 0) {
+ ASIHTTPRequest *request = [self createRequestWithParameters:currencyChunk isBatchRequest:YES isAsynchronous:asynchronous];
+ if (asynchronous) {
+ [self.batchRequestQueue addOperation:request];
+ [self.internalBatchConversionQueue setValue:currencyChunk forKey:[[request url] absoluteString]];
+ }
+ else {
+ [request startSynchronous];
+ if (request.error != nil) {
+ return;
+ }
+ else {
+ [self updateBatchResult:[request responseString] forCurrencies:currencyChunk];
+ }
+ }
+ }
+
+ if (asynchronous) {
+ self.batchRequestQueue.delegate = self;
+ self.batchRequestQueue.shouldCancelAllRequestsOnFailure = YES;
+ self.batchRequestQueue.queueDidFinishSelector = @selector(batchQueueDidFinish:);
+ self.batchRequestQueue.requestDidFinishSelector = @selector(batchRequestDidFinish:);
+ [self.batchRequestQueue go];
+ }
+
+}
+
+- (void)cancel
+{
+ [self.batchRequestQueue reset];
+ self.batchRequestQueue = nil;
+ self.internalBatchConversionQueue = nil;
+ self.internalBatchConversionResult = nil;
+
+ [self.internalConversionRequest clearDelegatesAndCancel];
+ self.internalConversionRequest = nil;
+ self.internalFromCurrency = nil;
+ self.internalToCurrency = nil;
+ self.internalError = nil;
+}
+
+#pragma mark - ASIHttpRequest delegate methods
+
+- (void)conversionDidFinish:(ASIHTTPRequest *)request
+{
+ internalConversionRate = [[self.internalConversionRequest responseString] floatValue];
+ self.internalConversionRequest = nil;
+
+ if (self.didFinishSelector && [self.delegate respondsToSelector:self.didFinishSelector]) {
+ [self.delegate performSelector:self.didFinishSelector withObject:self];
+ }
+}
+
+- (void)conversionDidFail:(ASIHTTPRequest *)request
+{
+ self.internalError = request.error;
+ self.internalConversionRequest = nil;
+
+ if (self.didFailSelector && [self.delegate respondsToSelector:self.didFailSelector]) {
+ [self.delegate performSelector:self.didFailSelector withObject:self];
+ }
+}
+
+- (void)batchQueueDidFinish:(ASINetworkQueue *)queue
+{
+ [self.batchRequestQueue reset];
+ self.batchRequestQueue = nil;
+
+ if (self.didFinishSelector && [self.delegate respondsToSelector:self.didFinishSelector]) {
+ [self.delegate performSelector:self.didFinishSelector withObject:self];
+ }
+}
+
+- (void)batchRequestDidFinish:(ASIHTTPRequest *)request
+{
+ NSArray *currencies = [self.internalBatchConversionQueue valueForKey:[request.originalURL absoluteString]];
+ [self updateBatchResult:[request responseString] forCurrencies:currencies];
+}
+
+- (void)batchRequestDidFail:(ASIHTTPRequest *)request
+{
+ NSError *error = request.error;
+
+ // cancel cleans things up
+ [self cancel];
+ self.internalError = error;
+
+ if (self.didFailSelector && [self.delegate respondsToSelector:self.didFailSelector]) {
+ [self.delegate performSelector:self.didFailSelector withObject:self];
+ }
+}
+
+#pragma mark - Accessors
+
+- (NSError *)error
+{
+ return self.internalError;
+}
+
+- (float)conversionRate
+{
+ return internalConversionRate;
+}
+
+- (NSString *)fromCurrency
+{
+ return self.internalFromCurrency;
+}
+
+- (NSString *)toCurrency
+{
+ return self.internalToCurrency;
+}
+
+- (NSDictionary *)batchConversionRates
+{
+ // We return nil until all requests have completed
+ if (self.batchRequestQueue != nil) {
+ return nil;
+ }
+ else {
+ return self.internalBatchConversionResult;
+ }
+}
+
+#pragma mark - Memory management
+- (void)dealloc
+{
+ [self cancel];
+ [super dealloc];
+}
+@end
View
41 BSYahooFinance/YFStockDetailsLoader.h
@@ -0,0 +1,41 @@
+//
+// Created by Björn Sållarp on 2011-03-27.
+// NO Copyright 2010 MightyLittle Industries. NO rights reserved.
+//
+// Use this code any way you like. If you do like it, please
+// link to my blog and/or write a friendly comment. Thank you!
+//
+// Read my blog @ http://blog.sallarp.com
+//
+
+#import <Foundation/Foundation.h>
+@class ASIHTTPRequest;
+@class YFStockDetailsLoader;
+@class YFStockDetails;
+
+@protocol YFStockDetailsLoaderDelegate <NSObject>
+@optional
+- (void)stockDetailsDidLoad:(YFStockDetailsLoader *)detailsLoader;
+- (void)stockDetailsDidFail:(YFStockDetailsLoader *)detailsLoader;
+@end
+
+@interface YFStockDetailsLoader : NSObject {
+ id<YFStockDetailsLoaderDelegate> delegate;
+ ASIHTTPRequest *internalStockRequest;
+ NSError *internalError;
+ YFStockDetails *internalStockDetails;
+ NSString *internalSymbolToLoad;
+ BOOL synchronousLoad;
+}
+
+@property (nonatomic, assign) id<YFStockDetailsLoaderDelegate> delegate;
+@property (nonatomic, readonly) NSError *error;
+@property (nonatomic, readonly) YFStockDetails *stockDetails;
+@property (nonatomic, assign) BOOL synchronousLoad;
+
++ (YFStockDetailsLoader *)loaderWithDelegate:(id<YFStockDetailsLoaderDelegate>)delegate;
+- (id)initWithDelegate:(id<YFStockDetailsLoaderDelegate>)delegate;
+- (void)loadDetails:(NSString *)stockSymbol;
+- (void)cancel;
+
+@end
View
152 BSYahooFinance/YFStockDetailsLoader.m
@@ -0,0 +1,152 @@
+//
+// Created by Björn Sållarp on 2011-03-27.
+// NO Copyright 2010 MightyLittle Industries. NO rights reserved.
+//
+// Use this code any way you like. If you do like it, please
+// link to my blog and/or write a friendly comment. Thank you!
+//
+// Read my blog @ http://blog.sallarp.com
+//
+
+#import "YFStockDetailsLoader.h"
+#import "ASIHTTPRequest.h"
+#import "JSON.h"
+#import "YFStockDetails.h"
+
+@interface YFStockDetailsLoader()
+@property (nonatomic, retain) ASIHTTPRequest *internalStockRequest;
+@property (nonatomic, retain) NSError *internalError;
+@property (nonatomic, retain) YFStockDetails *internalStockDetails;
+@property (nonatomic, retain) NSString *internalSymbolToLoad;
+@end
+
+@implementation YFStockDetailsLoader
+@synthesize delegate;
+@synthesize synchronousLoad;
+@synthesize internalStockRequest;
+@synthesize internalError;
+@synthesize internalStockDetails;
+@synthesize internalSymbolToLoad;
+@dynamic error;
+@dynamic stockDetails;
+
+static NSString *yahooLoadStockDetailsURLString = @"http://query.yahooapis.com/v1/public/yql?q=select%%20*%%20from%%20yahoo.finance.quotes%%20where%%20symbol%%20%%3D%%20%%22%@%%22&format=json&env=store%%3A%%2F%%2Fdatatables.org%%2Falltableswithkeys&callback=cbfunc";
+
+
+#pragma mark - Initializers
+
++ (YFStockDetailsLoader *)loaderWithDelegate:(id<YFStockDetailsLoaderDelegate>)delegate
+{
+ return [[[self alloc] initWithDelegate:delegate] autorelease];
+}
+
+- (id)initWithDelegate:(id<YFStockDetailsLoaderDelegate>)aDelegate
+{
+ if ((self = [super init])) {
+ self.delegate = aDelegate;
+ }
+
+ return self;
+}
+
+#pragma mark - Implementation
+
+- (void)loadDetails:(NSString *)stockSymbol
+{
+ [self cancel];
+ self.internalSymbolToLoad = stockSymbol;
+
+ NSURL *requestUrl = [NSURL URLWithString:[NSString stringWithFormat:yahooLoadStockDetailsURLString, [stockSymbol stringByAddingPercentEscapesUsingEncoding:NSASCIIStringEncoding]]];
+
+ self.internalStockRequest = [ASIHTTPRequest requestWithURL:requestUrl];
+ [self.internalStockRequest setCachePolicy:ASIDoNotReadFromCacheCachePolicy];
+ self.internalStockRequest.delegate = self;
+ [self.internalStockRequest setDidFinishSelector:@selector(requestDidFinish:)];
+ [self.internalStockRequest setDidFailSelector:@selector(requestDidFail:)];
+
+ if (self.synchronousLoad) {
+ [self.internalStockRequest startSynchronous];
+ }
+ else {
+ [self.internalStockRequest startAsynchronous];
+ }
+}
+
+- (void)cancel
+{
+ if (self.internalStockRequest) {
+ [self.internalStockRequest clearDelegatesAndCancel];
+ self.internalStockRequest = nil;
+ }
+
+ self.internalSymbolToLoad = nil;
+ self.internalStockDetails = nil;
+ self.internalError = nil;
+}
+
+#pragma mark - ASIHttpRequest delegate methods
+
+- (void)requestDidFinish:(ASIHTTPRequest *)request
+{
+ // Remove the jsonp callback
+ NSString *cleanJson = [[request responseString] substringFromIndex:7];
+ cleanJson = [cleanJson substringToIndex:[cleanJson length]-2];
+
+ SBJsonParser *parser = [SBJsonParser new];
+ NSDictionary *parsedDictionary = [parser objectWithString:cleanJson];
+ if (!parsedDictionary) {
+ self.internalError = [NSError errorWithDomain:@"YFStockDetailsLoader" code:0 userInfo:
+ [NSDictionary dictionaryWithObject:parser.error forKey:NSLocalizedDescriptionKey]];
+ }
+ else {
+ int resultCount = [[[parsedDictionary objectForKey:@"query"] objectForKey:@"count"] intValue];
+
+ if (resultCount == 1) {
+ NSDictionary *stockInfo = [[[parsedDictionary objectForKey:@"query"] objectForKey:@"results"] objectForKey:@"quote"];
+ if(stockInfo != nil) {
+ self.internalStockDetails = [YFStockDetails stockDetailsWithDetails:stockInfo];
+ }
+ }
+
+ if (self.internalStockDetails == nil) {
+ self.internalError = [NSError errorWithDomain:@"YFStockDetailsLoader" code:0 userInfo:
+ [NSDictionary dictionaryWithObject:@"Could not parse JSON result" forKey:NSLocalizedDescriptionKey]];
+ }
+ }
+
+ [parser release];
+
+ if (self.internalStockDetails != nil && self.internalError == nil) {
+ [self.delegate stockDetailsDidLoad:self];
+ }
+ else {
+ [self.delegate stockDetailsDidFail:self];
+ }
+}
+
+- (void)requestDidFail:(ASIHTTPRequest *)request
+{
+ self.internalError = request.error;
+ [self.delegate stockDetailsDidFail:self];
+}
+
+#pragma mark - Accessors
+
+- (NSError *)error
+{
+ return self.internalError;
+}
+
+- (YFStockDetails *)stockDetails
+{
+ return self.internalStockDetails;
+}
+
+#pragma mark - Memory management
+- (void)dealloc
+{
+ [self cancel];
+ [super dealloc];
+}
+
+@end
View
38 BSYahooFinance/YFStockSymbolSearch.h
@@ -0,0 +1,38 @@
+//
+// Created by Björn Sållarp on 2011-03-27.
+// NO Copyright 2010 MightyLittle Industries. NO rights reserved.
+//
+// Use this code any way you like. If you do like it, please
+// link to my blog and/or write a friendly comment. Thank you!
+//
+// Read my blog @ http://blog.sallarp.com
+//
+
+#import <Foundation/Foundation.h>
+@class ASIHTTPRequest;
+@class YFStockSymbolSearch;
+
+@protocol YFStockSymbolSearchDelegate <NSObject>
+@optional
+- (void)symbolSearchDidFinish:(YFStockSymbolSearch *)symbolFinder;
+- (void)symbolSearchDidFail:(YFStockSymbolSearch *)symbolFinder;
+@end
+
+@interface YFStockSymbolSearch : NSObject {
+ id<YFStockSymbolSearchDelegate> delegate;
+ ASIHTTPRequest *symbolRequest;
+ NSMutableArray *foundSymbols;
+ NSError *internalError;
+ BOOL synchronousSearch;
+}
+@property (nonatomic, assign) id<YFStockSymbolSearchDelegate> delegate;
+@property (nonatomic, readonly) NSArray *symbols;
+@property (nonatomic, readonly) NSError *error;
+@property (nonatomic, assign) BOOL synchronousSearch;
+
++ (YFStockSymbolSearch *)symbolSearchWithDelegate:(id<YFStockSymbolSearchDelegate>)delegate;
+- (id)initWithDelegate:(id<YFStockSymbolSearchDelegate>)delegate;
+- (void)findSymbols:(NSString *)searchString;
+- (void)cancel;
+
+@end
View
162 BSYahooFinance/YFStockSymbolSearch.m
@@ -0,0 +1,162 @@
+//
+// Created by Björn Sållarp on 2011-03-27.
+// NO Copyright 2010 MightyLittle Industries. NO rights reserved.
+//
+// Use this code any way you like. If you do like it, please
+// link to my blog and/or write a friendly comment. Thank you!
+//
+// Read my blog @ http://blog.sallarp.com
+//
+
+#import "YFStockSymbolSearch.h"
+#import "ASIHTTPRequest.h"
+#import "JSON.h"
+#import "YFStockSymbol.h"
+
+@interface YFStockSymbolSearch()
+@property (nonatomic, retain) ASIHTTPRequest *symbolRequest;
+@property (nonatomic, retain) NSMutableArray *foundSymbols;
+@property (nonatomic, retain) NSError *internalError;
+@end
+
+@implementation YFStockSymbolSearch
+@synthesize delegate;
+@synthesize symbolRequest;
+@synthesize internalError;
+@synthesize foundSymbols;
+@synthesize synchronousSearch;
+@dynamic error;
+@dynamic symbols;
+
+static NSString *yahooSymbolSearchURLString = @"http://d.yimg.com/autoc.finance.yahoo.com/autoc?query=%@&callback=YAHOO.Finance.SymbolSuggest.ssCallback";
+
+#pragma mark - Initializers
+
++ (YFStockSymbolSearch *)symbolSearchWithDelegate:(id<YFStockSymbolSearchDelegate>)delegate
+{
+ return [[[self alloc] initWithDelegate:delegate] autorelease];
+}
+
+- (id)initWithDelegate:(id<YFStockSymbolSearchDelegate>)aDelegate
+{
+ if((self = [super init])) {
+ self.delegate = aDelegate;
+ }
+
+ return self;
+}
+
+#pragma mark - Implementation
+
+- (void)findSymbols:(NSString *)searchString
+{
+ // Cancel any running request
+ [self cancel];
+
+ NSURL *requestUrl = [NSURL URLWithString:[NSString stringWithFormat:yahooSymbolSearchURLString, [searchString stringByAddingPercentEscapesUsingEncoding:NSASCIIStringEncoding]]];
+
+ self.symbolRequest = [ASIHTTPRequest requestWithURL:requestUrl];
+ self.symbolRequest.delegate = self;
+ [self.symbolRequest setDidFinishSelector:@selector(requestDidFinish:)];
+ [self.symbolRequest setDidFailSelector:@selector(requestDidFail:)];
+
+ if (self.synchronousSearch) {
+ [self.symbolRequest startSynchronous];
+ }
+ else {
+ [self.symbolRequest startAsynchronous];
+ }
+}
+
+- (void)cancel
+{
+ if (self.symbolRequest) {
+ [self.symbolRequest clearDelegatesAndCancel];
+ self.symbolRequest = nil;
+ }
+
+ self.foundSymbols = nil;
+ self.internalError = nil;
+}
+
+#pragma mark - ASIHttpRequest delegate methods
+
+- (void)requestDidFinish:(ASIHTTPRequest *)request
+{
+ // Remove the jsonp callback
+ NSString *cleanJson = [[request responseString] substringFromIndex:39];
+ cleanJson = [cleanJson substringToIndex:[cleanJson length]-1];
+
+ SBJsonParser *parser = [SBJsonParser new];
+ NSDictionary *parsedDictionary = [parser objectWithString:cleanJson];
+ if (!parsedDictionary) {
+ self.internalError = [NSError errorWithDomain:@"YFStockSymbolSearch" code:0 userInfo:
+ [NSDictionary dictionaryWithObject:parser.error forKey:NSLocalizedDescriptionKey]];
+ }
+ else {
+ NSDictionary *stockCurrency = [NSDictionary dictionaryWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"StockExchangeCurrency" ofType:@"plist"]];
+
+ NSArray *symbols = [[parsedDictionary objectForKey:@"ResultSet"] objectForKey:@"Result"];
+ int len = [symbols count];
+ NSMutableArray *result = [NSMutableArray arrayWithCapacity:len];
+
+ for (int i = 0; i < len; i++) {
+ YFStockSymbol *symbol = [[YFStockSymbol alloc] init];
+ symbol.symbol = [[symbols objectAtIndex:i] objectForKey:@"symbol"];
+ symbol.name = [[symbols objectAtIndex:i] objectForKey:@"name"];
+ symbol.currency = @"USD";
+
+ // Try to look up the currency using the prefix of the stock symbol at Yahoo
+ for (NSString *key in stockCurrency) {
+ if ([symbol.symbol hasSuffix:key]) {
+ symbol.currency = [stockCurrency valueForKey:key];
+ break;
+ }
+ }
+
+ [result addObject:symbol];
+ [symbol release];
+ }
+
+ self.foundSymbols = result;
+ }
+
+ [parser release];
+
+ if (self.foundSymbols != nil && self.internalError == nil) {
+ [self.delegate symbolSearchDidFinish:self];
+ }
+ else {
+ [self.delegate symbolSearchDidFail:self];
+ }
+}
+
+- (void)requestDidFail:(ASIHTTPRequest *)request
+{
+ self.internalError = request.error;
+ [self.delegate symbolSearchDidFail:self];
+}
+
+#pragma mark - Accessors
+
+- (NSArray *)symbols
+{
+ if (self.foundSymbols == nil) {
+ return nil;
+ }
+
+ return [NSArray arrayWithArray:self.foundSymbols];
+}
+
+- (NSError *)error
+{
+ return self.internalError;
+}
+
+#pragma mark - Memory management
+- (void)dealloc
+{
+ [self cancel];
+ [super dealloc];
+}
+@end
View
38 BSYahooFinanceDemo/BSYahooFinance-Info.plist
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>CFBundleDevelopmentRegion</key>
+ <string>en</string>
+ <key>CFBundleDisplayName</key>
+ <string>${PRODUCT_NAME}</string>
+ <key>CFBundleExecutable</key>
+ <string>${EXECUTABLE_NAME}</string>
+ <key>CFBundleIconFile</key>
+ <string></string>
+ <key>CFBundleIdentifier</key>
+ <string>com.sallarp.blog.${PRODUCT_NAME:rfc1034identifier}</string>
+ <key>CFBundleInfoDictionaryVersion</key>
+ <string>6.0</string>
+ <key>CFBundleName</key>
+ <string>${PRODUCT_NAME}</string>
+ <key>CFBundlePackageType</key>
+ <string>APPL</string>
+ <key>CFBundleShortVersionString</key>
+ <string>1.0</string>
+ <key>CFBundleSignature</key>
+ <string>????</string>
+ <key>CFBundleVersion</key>
+ <string>1.0</string>
+ <key>LSRequiresIPhoneOS</key>
+ <true/>
+ <key>NSMainNibFile</key>
+ <string>MainWindow</string>
+ <key>UISupportedInterfaceOrientations</key>
+ <array>
+ <string>UIInterfaceOrientationPortrait</string>
+ <string>UIInterfaceOrientationLandscapeLeft</string>
+ <string>UIInterfaceOrientationLandscapeRight</string>
+ </array>
+</dict>
+</plist>
View
14 BSYahooFinanceDemo/BSYahooFinance-Prefix.pch
@@ -0,0 +1,14 @@
+//
+// Prefix header for all source files of the 'BSYahooFinance' target in the 'BSYahooFinance' project
+//
+
+#import <Availability.h>
+
+#ifndef __IPHONE_3_0
+#warning "This project uses features only available in iPhone SDK 3.0 and later."
+#endif
+
+#ifdef __OBJC__
+ #import <UIKit/UIKit.h>
+ #import <Foundation/Foundation.h>
+#endif
View
20 BSYahooFinanceDemo/BSYahooFinanceAppDelegate.h
@@ -0,0 +1,20 @@
+//
+// Created by Björn Sållarp on 2011-03-27.
+// NO Copyright 2010 MightyLittle Industries. NO rights reserved.
+//
+// Use this code any way you like. If you do like it, please
+// link to my blog and/or write a friendly comment. Thank you!
+//
+// Read my blog @ http://blog.sallarp.com
+//
+
+#import <UIKit/UIKit.h>
+
+@interface BSYahooFinanceAppDelegate : NSObject <UIApplicationDelegate> {
+
+}
+
+@property (nonatomic, retain) IBOutlet UIWindow *window;
+@property (nonatomic, retain) IBOutlet UINavigationController *navigationController;
+@property (nonatomic, retain) IBOutlet UITabBarController *tabBarController;
+@end
View
34 BSYahooFinanceDemo/BSYahooFinanceAppDelegate.m
@@ -0,0 +1,34 @@
+//
+// Created by Björn Sållarp on 2011-03-27.
+// NO Copyright 2010 MightyLittle Industries. NO rights reserved.
+//
+// Use this code any way you like. If you do like it, please
+// link to my blog and/or write a friendly comment. Thank you!
+//
+// Read my blog @ http://blog.sallarp.com
+//
+#import "BSYahooFinanceAppDelegate.h"
+
+@implementation BSYahooFinanceAppDelegate
+
+
+@synthesize window=_window;
+@synthesize navigationController=_navigationController;
+@synthesize tabBarController;
+
+- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
+{
+ [self.window addSubview:[self.tabBarController view]];
+ [self.window makeKeyAndVisible];
+ return YES;
+}
+
+- (void)dealloc
+{
+ self.tabBarController = nil;
+ [_window release];
+ [_navigationController release];
+ [super dealloc];
+}
+
+@end
View
29 BSYahooFinanceDemo/CurrencyConversionViewController.h
@@ -0,0 +1,29 @@
+//
+// Created by Björn Sållarp on 2011-04-10.
+// NO Copyright 2010 MightyLittle Industries. NO rights reserved.
+//
+// Use this code any way you like. If you do like it, please
+// link to my blog and/or write a friendly comment. Thank you!
+//
+// Read my blog @ http://blog.sallarp.com
+//
+
+#import <UIKit/UIKit.h>
+
+@class YFCurrencyConverter;
+
+@interface CurrencyConversionViewController : UIViewController<UIPickerViewDelegate, UIPickerViewDataSource, UITextFieldDelegate> {
+ UILabel *conversionResult;
+ UITextField *amount;
+ UIPickerView *fromCurrency;
+ UIPickerView *toCurrency;
+ NSArray *currencyList;
+ NSDictionary *currencyRateMatrix;
+ YFCurrencyConverter *currencyConversion;
+}
+
+@property (nonatomic, retain) IBOutlet UILabel *conversionResult;
+@property (nonatomic, retain) IBOutlet UITextField *amount;
+@property (nonatomic, retain) IBOutlet UIPickerView *fromCurrency;
+@property (nonatomic, retain) IBOutlet UIPickerView *toCurrency;
+@end
View
184 BSYahooFinanceDemo/CurrencyConversionViewController.m
@@ -0,0 +1,184 @@
+//
+// Created by Björn Sållarp on 2011-04-10.
+// NO Copyright 2010 MightyLittle Industries. NO rights reserved.
+//
+// Use this code any way you like. If you do like it, please
+// link to my blog and/or write a friendly comment. Thank you!
+//
+// Read my blog @ http://blog.sallarp.com
+//
+
+#import "CurrencyConversionViewController.h"
+#import "BSYahooFinance.h"
+
+@interface CurrencyConversionViewController()
+@property (nonatomic, retain) NSArray *currencyList;
+@property (nonatomic, retain) NSDictionary *currencyRateMatrix;
+@property (nonatomic, retain) YFCurrencyConverter *currencyConversion;
+
+- (NSArray *)loadCurrencies;
+- (void)updateResult;
+@end
+
+@implementation CurrencyConversionViewController
+@synthesize conversionResult, amount, currencyList, currencyConversion;
+@synthesize fromCurrency, toCurrency, currencyRateMatrix;
+
+
+#pragma mark - View lifecycle
+
+- (void)viewDidLoad
+{
+ [super viewDidLoad];
+
+ NSArray *allCurrencies = [self loadCurrencies];
+ self.currencyConversion = [YFCurrencyConverter currencyConverterWithDelegate:self];
+ self.currencyConversion.didFailSelector = @selector(currencyConversionDidFail:);
+ self.currencyConversion.didFinishSelector = @selector(currencyConversionDidFinish:);
+ [self.currencyConversion convertFromCurrencies:allCurrencies toCurrencies:allCurrencies asychronous:YES];
+
+ self.amount.text = @"100";
+ self.conversionResult.text = @"Retrieving conversion rates..";
+}
+
+- (void)viewDidUnload
+{
+ [super viewDidUnload];
+ // Release any retained subviews of the main view.
+ // e.g. self.myOutlet = nil;
+}
+
+- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
+{
+ // Return YES for supported orientations
+ return (interfaceOrientation == UIInterfaceOrientationPortrait);
+}
+
+- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
+{
+ // Close the text input keyboard if the user touch the view
+ UITouch *touch = [touches anyObject];
+ if(touch.tapCount == 1 && [self.amount isFirstResponder]) {
+ [self.amount resignFirstResponder];
+ }
+}
+
+#pragma mark - YFCurrencyConverter delegate methods
+
+- (void)currencyConversionDidFinish:(YFCurrencyConverter *)converter
+{
+ self.currencyRateMatrix = converter.batchConversionRates;
+ self.currencyList = [self loadCurrencies];
+ [self.fromCurrency reloadAllComponents];
+ [self.toCurrency reloadAllComponents];
+