mirror of
https://bitbucket.org/vendoo/vendoo_v1.0.git
synced 2025-12-25 03:37:39 +00:00
trying to integrate ebay api, but getting build/runtime errors
This commit is contained in:
parent
f710ca97ae
commit
09263f8613
@ -23,7 +23,8 @@
|
||||
3E7CF4011CF6366300F486B2 /* EtsyRESTAPIManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3E7CF4001CF6366300F486B2 /* EtsyRESTAPIManager.swift */; };
|
||||
3E7CF4041CF6450D00F486B2 /* ListingObject.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3E7CF4031CF6450D00F486B2 /* ListingObject.swift */; };
|
||||
3EA6689F1D0278E900EE57A8 /* TradingProxy in Resources */ = {isa = PBXBuildFile; fileRef = 3EA6689E1D0278E900EE57A8 /* TradingProxy */; };
|
||||
3EA668A11D02836C00EE57A8 /* EbayWebServiceManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3EA668A01D02836C00EE57A8 /* EbayWebServiceManager.swift */; };
|
||||
3EA668A11D02836C00EE57A8 /* EbayWebServiceManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3EA668A01D02836C00EE57A8 /* EbayWebServiceManager.swift */; settings = {COMPILER_FLAGS = "-fvisibility=default"; }; };
|
||||
3EA668A31D02ECB100EE57A8 /* libicucore.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 3EA668A21D02ECB100EE57A8 /* libicucore.tbd */; };
|
||||
3EB2F5161CF442CF002E6D2C /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3EB2F5151CF442CF002E6D2C /* Security.framework */; };
|
||||
3EC325111CF703A600626C48 /* ItemCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3EC325101CF703A600626C48 /* ItemCell.swift */; };
|
||||
3EC325151CF7104300626C48 /* ItemTableViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3EC325141CF7104300626C48 /* ItemTableViewController.swift */; };
|
||||
@ -83,6 +84,7 @@
|
||||
3EA668961D026E7800EE57A8 /* Vendoo-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Vendoo-Bridging-Header.h"; sourceTree = "<group>"; };
|
||||
3EA6689E1D0278E900EE57A8 /* TradingProxy */ = {isa = PBXFileReference; lastKnownFileType = folder; path = TradingProxy; sourceTree = "<group>"; };
|
||||
3EA668A01D02836C00EE57A8 /* EbayWebServiceManager.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = EbayWebServiceManager.swift; sourceTree = "<group>"; };
|
||||
3EA668A21D02ECB100EE57A8 /* libicucore.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libicucore.tbd; path = usr/lib/libicucore.tbd; sourceTree = SDKROOT; };
|
||||
3EB2F5151CF442CF002E6D2C /* Security.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Security.framework; path = System/Library/Frameworks/Security.framework; sourceTree = SDKROOT; };
|
||||
3EC325101CF703A600626C48 /* ItemCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ItemCell.swift; sourceTree = "<group>"; };
|
||||
3EC325141CF7104300626C48 /* ItemTableViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ItemTableViewController.swift; sourceTree = "<group>"; };
|
||||
@ -107,6 +109,7 @@
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
3EA668A31D02ECB100EE57A8 /* libicucore.tbd in Frameworks */,
|
||||
3EC3252F1CF894E500626C48 /* AVFoundation.framework in Frameworks */,
|
||||
3EB2F5161CF442CF002E6D2C /* Security.framework in Frameworks */,
|
||||
D5995A6D02C7FCA4F561AAB3 /* Pods_Vendoo.framework in Frameworks */,
|
||||
@ -135,6 +138,7 @@
|
||||
3E4897CE1D0062860069F742 /* Services */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
3EA668941D026E2A00EE57A8 /* EbayServices */,
|
||||
3E4897CF1D00629B0069F742 /* FirebaseServices */,
|
||||
3E7CF3FF1CF6363200F486B2 /* EtsyServices */,
|
||||
3EC325241CF7E6B300626C48 /* FacebookServices */,
|
||||
@ -175,7 +179,6 @@
|
||||
3E6CC3551CF2A94B00E00A70 /* Vendoo */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
3EA668941D026E2A00EE57A8 /* EbayServices */,
|
||||
3E4897CE1D0062860069F742 /* Services */,
|
||||
3EC3252B1CF8944800626C48 /* NewItemPostingSession */,
|
||||
3EC325211CF7D91100626C48 /* TabbedScreens */,
|
||||
@ -316,6 +319,7 @@
|
||||
D989DD70699180D9DB9DA709 /* Frameworks */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
3EA668A21D02ECB100EE57A8 /* libicucore.tbd */,
|
||||
3EC3252E1CF894E500626C48 /* AVFoundation.framework */,
|
||||
3EB2F5151CF442CF002E6D2C /* Security.framework */,
|
||||
F8F69918E43DC1276F42551F /* Pods_Vendoo.framework */,
|
||||
@ -757,16 +761,93 @@
|
||||
baseConfigurationReference = C9F6F7897E53ED9583C965E3 /* Pods-Vendoo.debug.xcconfig */;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
ARCHS = "$(ARCHS_STANDARD)";
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
GCC_SYMBOLS_PRIVATE_EXTERN = YES;
|
||||
INCLUDED_RECURSIVE_SEARCH_PATH_SUBDIRECTORIES = "Vendoo/**";
|
||||
INFOPLIST_FILE = Vendoo/Info.plist;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
|
||||
New_Setting = "";
|
||||
OTHER_LDFLAGS = (
|
||||
"$(inherited)",
|
||||
"-ObjC",
|
||||
"-l\"c++\"",
|
||||
"-l\"icucore\"",
|
||||
"-l\"sqlite3\"",
|
||||
"-l\"z\"",
|
||||
"-framework",
|
||||
"\"AFNetworking\"",
|
||||
"-framework",
|
||||
"\"AdSupport\"",
|
||||
"-framework",
|
||||
"\"AddressBook\"",
|
||||
"-framework",
|
||||
"\"AeroGearHttp\"",
|
||||
"-framework",
|
||||
"\"AeroGearOAuth2\"",
|
||||
"-framework",
|
||||
"\"Alamofire\"",
|
||||
"-framework",
|
||||
"\"Alamofire_SwiftyJSON\"",
|
||||
"-framework",
|
||||
"\"Bolts\"",
|
||||
"-framework",
|
||||
"\"CFNetwork\"",
|
||||
"-framework",
|
||||
"\"CoreGraphics\"",
|
||||
"-framework",
|
||||
"\"FBSDKCoreKit\"",
|
||||
"-framework",
|
||||
"\"FBSDKLoginKit\"",
|
||||
"-framework",
|
||||
"\"FBSDKShareKit\"",
|
||||
"-framework",
|
||||
"\"FirebaseAnalytics\"",
|
||||
"-framework",
|
||||
"\"FirebaseAuth\"",
|
||||
"-framework",
|
||||
"\"FirebaseDatabase\"",
|
||||
"-framework",
|
||||
"\"FirebaseInstanceID\"",
|
||||
"-framework",
|
||||
"\"FirebaseStorage\"",
|
||||
"-framework",
|
||||
"\"GDataXML_HTML\"",
|
||||
"-framework",
|
||||
"\"GoogleInterchangeUtilities\"",
|
||||
"-framework",
|
||||
"\"GoogleNetworkingUtilities\"",
|
||||
"-framework",
|
||||
"\"GoogleSymbolUtilities\"",
|
||||
"-framework",
|
||||
"\"GoogleUtilities\"",
|
||||
"-framework",
|
||||
"\"Locksmith\"",
|
||||
"-framework",
|
||||
"\"MobileCoreServices\"",
|
||||
"-framework",
|
||||
"\"OAuthSwift\"",
|
||||
"-framework",
|
||||
"\"PicoKit\"",
|
||||
"-framework",
|
||||
"\"SafariServices\"",
|
||||
"-framework",
|
||||
"\"Security\"",
|
||||
"-framework",
|
||||
"\"StoreKit\"",
|
||||
"-framework",
|
||||
"\"SwiftyJSON\"",
|
||||
"-framework",
|
||||
"\"SystemConfiguration\"",
|
||||
"-framework",
|
||||
"\"TYMActivityIndicatorView\"",
|
||||
);
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.Kroleo.Vendoo;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_INCLUDE_PATHS = "";
|
||||
SWIFT_OBJC_BRIDGING_HEADER = "Vendoo/Vendoo-Bridging-Header.h";
|
||||
USER_HEADER_SEARCH_PATHS = "\"Vendoo/**\" \"Pods/**\"";
|
||||
VALID_ARCHS = "arm64 armv7 armv7s";
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
@ -775,16 +856,94 @@
|
||||
baseConfigurationReference = 6979B7B8AF7AC049C2F23196 /* Pods-Vendoo.release.xcconfig */;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
ARCHS = "$(ARCHS_STANDARD)";
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
GCC_SYMBOLS_PRIVATE_EXTERN = YES;
|
||||
INCLUDED_RECURSIVE_SEARCH_PATH_SUBDIRECTORIES = "Vendoo/**";
|
||||
INFOPLIST_FILE = Vendoo/Info.plist;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
|
||||
New_Setting = "";
|
||||
ONLY_ACTIVE_ARCH = NO;
|
||||
OTHER_LDFLAGS = (
|
||||
"$(inherited)",
|
||||
"-ObjC",
|
||||
"-l\"c++\"",
|
||||
"-l\"icucore\"",
|
||||
"-l\"sqlite3\"",
|
||||
"-l\"z\"",
|
||||
"-framework",
|
||||
"\"AFNetworking\"",
|
||||
"-framework",
|
||||
"\"AdSupport\"",
|
||||
"-framework",
|
||||
"\"AddressBook\"",
|
||||
"-framework",
|
||||
"\"AeroGearHttp\"",
|
||||
"-framework",
|
||||
"\"AeroGearOAuth2\"",
|
||||
"-framework",
|
||||
"\"Alamofire\"",
|
||||
"-framework",
|
||||
"\"Alamofire_SwiftyJSON\"",
|
||||
"-framework",
|
||||
"\"Bolts\"",
|
||||
"-framework",
|
||||
"\"CFNetwork\"",
|
||||
"-framework",
|
||||
"\"CoreGraphics\"",
|
||||
"-framework",
|
||||
"\"FBSDKCoreKit\"",
|
||||
"-framework",
|
||||
"\"FBSDKLoginKit\"",
|
||||
"-framework",
|
||||
"\"FBSDKShareKit\"",
|
||||
"-framework",
|
||||
"\"FirebaseAnalytics\"",
|
||||
"-framework",
|
||||
"\"FirebaseAuth\"",
|
||||
"-framework",
|
||||
"\"FirebaseDatabase\"",
|
||||
"-framework",
|
||||
"\"FirebaseInstanceID\"",
|
||||
"-framework",
|
||||
"\"FirebaseStorage\"",
|
||||
"-framework",
|
||||
"\"GDataXML_HTML\"",
|
||||
"-framework",
|
||||
"\"GoogleInterchangeUtilities\"",
|
||||
"-framework",
|
||||
"\"GoogleNetworkingUtilities\"",
|
||||
"-framework",
|
||||
"\"GoogleSymbolUtilities\"",
|
||||
"-framework",
|
||||
"\"GoogleUtilities\"",
|
||||
"-framework",
|
||||
"\"Locksmith\"",
|
||||
"-framework",
|
||||
"\"MobileCoreServices\"",
|
||||
"-framework",
|
||||
"\"OAuthSwift\"",
|
||||
"-framework",
|
||||
"\"PicoKit\"",
|
||||
"-framework",
|
||||
"\"SafariServices\"",
|
||||
"-framework",
|
||||
"\"Security\"",
|
||||
"-framework",
|
||||
"\"StoreKit\"",
|
||||
"-framework",
|
||||
"\"SwiftyJSON\"",
|
||||
"-framework",
|
||||
"\"SystemConfiguration\"",
|
||||
"-framework",
|
||||
"\"TYMActivityIndicatorView\"",
|
||||
);
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.Kroleo.Vendoo;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_INCLUDE_PATHS = "";
|
||||
SWIFT_OBJC_BRIDGING_HEADER = "Vendoo/Vendoo-Bridging-Header.h";
|
||||
USER_HEADER_SEARCH_PATHS = "\"Vendoo/**\" \"Pods/**\"";
|
||||
VALID_ARCHS = "arm64 armv7 armv7s";
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
|
||||
Binary file not shown.
@ -146,5 +146,21 @@
|
||||
landmarkType = "5">
|
||||
</BreakpointContent>
|
||||
</BreakpointProxy>
|
||||
<BreakpointProxy
|
||||
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
|
||||
<BreakpointContent
|
||||
shouldBeEnabled = "Yes"
|
||||
ignoreCount = "0"
|
||||
continueAfterRunningActions = "No"
|
||||
filePath = "Vendoo/EbayWebServiceManager.swift"
|
||||
timestampString = "486728972.41436"
|
||||
startingColumnNumber = "9223372036854775807"
|
||||
endingColumnNumber = "9223372036854775807"
|
||||
startingLineNumber = "40"
|
||||
endingLineNumber = "40"
|
||||
landmarkName = "authorizeApp()"
|
||||
landmarkType = "5">
|
||||
</BreakpointContent>
|
||||
</BreakpointProxy>
|
||||
</Breakpoints>
|
||||
</Bucket>
|
||||
|
||||
@ -7,15 +7,51 @@
|
||||
//
|
||||
|
||||
import Foundation
|
||||
import PicoKit
|
||||
|
||||
class EbayWebServiceManager: NSObject {
|
||||
|
||||
|
||||
let tradingClient = EBayTradingServiceClient.sharedClient()
|
||||
//API Manager class variables
|
||||
//----------------------------------------------//
|
||||
let baseURL = "https://openapi.etsy.com/v2/private"
|
||||
|
||||
private var apiKey: String!
|
||||
private var apiSecret: String!
|
||||
private var userEmail:String = (NSUserDefaults.standardUserDefaults().objectForKey("email") as? String)!
|
||||
var isAuthorized: Bool = NSUserDefaults.standardUserDefaults().boolForKey("ebayAuthorized")
|
||||
//static let tradingClient = EBayTradingServiceClient.sharedClient()
|
||||
//---------------------------------------------//
|
||||
|
||||
|
||||
|
||||
override init(){
|
||||
super.init()
|
||||
self.tradingClient.debug = true
|
||||
//EbayWebServiceManager.tradingClient.debug = true
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//MARK: - authentication methods
|
||||
extension EbayWebServiceManager {
|
||||
|
||||
func authorizeApp(){
|
||||
/*
|
||||
let sessionRequest = Trading_GetSessionIDRequestType.init()
|
||||
sessionRequest.ruName = "Kroleo-Kroleo-Vendoo-S-ktqeobkk"
|
||||
EbayWebServiceManager.tradingClient.getSessionID(sessionRequest, success: ({
|
||||
(response: Trading_GetSessionIDResponseType!) -> Void in
|
||||
|
||||
}), failure: ({
|
||||
(error: NSError!, bindable: PicoBindable!) -> Void in
|
||||
|
||||
}))
|
||||
*/
|
||||
}
|
||||
|
||||
func deauthorizeApp(){
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -14,6 +14,7 @@ class HomeViewController: UITabBarController {
|
||||
let etsyManager: EtsyRESTAPIManager = EtsyRESTAPIManager()
|
||||
let fbGraphManager = FacebookGraphAPIManager()
|
||||
let firebaseManager = FirebaseManager()
|
||||
let ebayGraphManager = EbayWebServiceManager()
|
||||
var userListings: [Listing] = []
|
||||
|
||||
|
||||
|
||||
@ -29,6 +29,7 @@ class NetworksTableViewController: UIViewController {
|
||||
private var graphManager: FacebookGraphAPIManager! = nil
|
||||
private var firManager: FirebaseManager! = nil
|
||||
private var etsyManager: EtsyRESTAPIManager! = nil
|
||||
private var ebayManager: EbayWebServiceManager!
|
||||
|
||||
|
||||
|
||||
@ -144,6 +145,12 @@ extension NetworksTableViewController: UITableViewDataSource {
|
||||
case 0:
|
||||
//loads network cell for ebay
|
||||
cell = (self.tableView.dequeueReusableCellWithIdentifier("ebay", forIndexPath: indexPath) as! EbayTableViewCell)
|
||||
|
||||
if(((self.tabBarController as? HomeViewController)?.ebayGraphManager.isAuthorized)!){
|
||||
|
||||
(cell as! EbayTableViewCell).networkToggle.setOn(true, animated: false)
|
||||
}
|
||||
|
||||
break
|
||||
case 1:
|
||||
//loads network cell for amazon
|
||||
@ -425,6 +432,10 @@ extension NetworksTableViewController: UITableViewDelegate {
|
||||
cell.networkToggle.on = true
|
||||
|
||||
//code to authorize network
|
||||
let tabBar = self.tabBarController
|
||||
((tabBar as? HomeViewController)?.ebayGraphManager.authorizeApp())!
|
||||
|
||||
cell.networkToggle.on = ((tabBar as? HomeViewController)?.ebayGraphManager.isAuthorized)!
|
||||
}
|
||||
|
||||
break
|
||||
|
||||
@ -2,6 +2,15 @@
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>Ebay</key>
|
||||
<dict>
|
||||
<key>consumerKey</key>
|
||||
<string>Kroleo-Vendoo-SBX-64d8cb02c-937748da</string>
|
||||
<key>devID</key>
|
||||
<string>fbe42cd4-d9dd-4450-9cf1-b43055febe36</string>
|
||||
<key>CertID</key>
|
||||
<string>SBX-4d8cb02c893a-af4f-4e6d-9558-b3a1 </string>
|
||||
</dict>
|
||||
<key>Etsy</key>
|
||||
<dict>
|
||||
<key>accessToken</key>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user