├── Pods ├── Headers │ ├── Public │ │ ├── Spark-SDK │ │ │ ├── Spark-SDK.h │ │ │ ├── SparkCloud.h │ │ │ ├── SparkDevice.h │ │ │ ├── SparkEvent.h │ │ │ ├── SparkSession.h │ │ │ ├── EventSource.h │ │ │ ├── KeychainItemWrapper.h │ │ │ └── Spark-SDK-Bridging-Header.h │ │ ├── AFNetworking │ │ │ ├── AFNetworking.h │ │ │ ├── AFSecurityPolicy.h │ │ │ ├── AFHTTPSessionManager.h │ │ │ ├── AFImageDownloader.h │ │ │ ├── AFURLSessionManager.h │ │ │ ├── UIImage+AFNetworking.h │ │ │ ├── UIKit+AFNetworking.h │ │ │ ├── AFURLRequestSerialization.h │ │ │ ├── UIButton+AFNetworking.h │ │ │ ├── UIWebView+AFNetworking.h │ │ │ ├── AFAutoPurgingImageCache.h │ │ │ ├── AFNetworkReachabilityManager.h │ │ │ ├── AFURLResponseSerialization.h │ │ │ ├── UIImageView+AFNetworking.h │ │ │ ├── UIProgressView+AFNetworking.h │ │ │ ├── UIRefreshControl+AFNetworking.h │ │ │ ├── AFNetworkActivityIndicatorManager.h │ │ │ └── UIActivityIndicatorView+AFNetworking.h │ │ └── 1PasswordExtension │ │ │ └── OnePasswordExtension.h │ └── Private │ │ ├── Spark-SDK │ │ ├── Spark-SDK.h │ │ ├── SparkCloud.h │ │ ├── SparkDevice.h │ │ ├── SparkEvent.h │ │ ├── EventSource.h │ │ ├── SparkSession.h │ │ ├── KeychainItemWrapper.h │ │ └── Spark-SDK-Bridging-Header.h │ │ ├── AFNetworking │ │ ├── AFNetworking.h │ │ ├── AFSecurityPolicy.h │ │ ├── AFHTTPSessionManager.h │ │ ├── AFImageDownloader.h │ │ ├── AFURLSessionManager.h │ │ ├── UIKit+AFNetworking.h │ │ ├── AFURLRequestSerialization.h │ │ ├── UIButton+AFNetworking.h │ │ ├── UIImage+AFNetworking.h │ │ ├── UIWebView+AFNetworking.h │ │ ├── AFAutoPurgingImageCache.h │ │ ├── AFURLResponseSerialization.h │ │ ├── UIImageView+AFNetworking.h │ │ ├── AFNetworkReachabilityManager.h │ │ ├── UIProgressView+AFNetworking.h │ │ ├── UIRefreshControl+AFNetworking.h │ │ ├── AFNetworkActivityIndicatorManager.h │ │ └── UIActivityIndicatorView+AFNetworking.h │ │ └── 1PasswordExtension │ │ └── OnePasswordExtension.h ├── 1PasswordExtension │ ├── 1Password.xcassets │ │ ├── onepassword-button.pdf │ │ ├── onepassword-navbar.pdf │ │ ├── onepassword-toolbar.pdf │ │ ├── onepassword-button-light.pdf │ │ ├── onepassword-navbar-light.pdf │ │ ├── onepassword-toolbar-light.pdf │ │ ├── onepassword-extension~compact.pdf │ │ ├── onepassword-extension~regular.pdf │ │ ├── onepassword-extension-light~compact.pdf │ │ ├── onepassword-extension-light~regular.pdf │ │ ├── onepassword-button.imageset │ │ │ ├── onepassword-button.png │ │ │ ├── onepassword-button@2x.png │ │ │ ├── onepassword-button@3x.png │ │ │ └── Contents.json │ │ ├── onepassword-navbar.imageset │ │ │ ├── onepassword-navbar.png │ │ │ ├── onepassword-navbar@2x.png │ │ │ ├── onepassword-navbar@3x.png │ │ │ └── Contents.json │ │ ├── onepassword-toolbar.imageset │ │ │ ├── onepassword-toolbar.png │ │ │ ├── onepassword-toolbar@2x.png │ │ │ ├── onepassword-toolbar@3x.png │ │ │ └── Contents.json │ │ ├── onepassword-button-light.imageset │ │ │ ├── onepassword-button-light.png │ │ │ ├── onepassword-button-light@2x.png │ │ │ ├── onepassword-button-light@3x.png │ │ │ └── Contents.json │ │ ├── onepassword-extension.imageset │ │ │ ├── onepassword-extension~compact.png │ │ │ ├── onepassword-extension~regular.png │ │ │ ├── onepassword-extension@2x~compact.png │ │ │ ├── onepassword-extension@2x~regular.png │ │ │ ├── onepassword-extension@3x~compact.png │ │ │ └── Contents.json │ │ ├── onepassword-navbar-light.imageset │ │ │ ├── onepassword-navbar-light.png │ │ │ ├── onepassword-navbar-light@2x.png │ │ │ ├── onepassword-navbar-light@3x.png │ │ │ └── Contents.json │ │ ├── onepassword-toolbar-light.imageset │ │ │ ├── onepassword-toolbar-light.png │ │ │ ├── onepassword-toolbar-light@2x.png │ │ │ ├── onepassword-toolbar-light@3x.png │ │ │ └── Contents.json │ │ └── onepassword-extension-light.imageset │ │ │ ├── onepassword-extension-light~compact.png │ │ │ ├── onepassword-extension-light~regular.png │ │ │ ├── onepassword-extension-light@2x~compact.png │ │ │ ├── onepassword-extension-light@2x~regular.png │ │ │ ├── onepassword-extension-light@3x~compact.png │ │ │ └── Contents.json │ └── LICENSE.txt ├── Target Support Files │ ├── Spark-SDK │ │ ├── Spark-SDK-dummy.m │ │ ├── Spark-SDK-prefix.pch │ │ └── Spark-SDK.xcconfig │ ├── AFNetworking │ │ ├── AFNetworking-dummy.m │ │ ├── AFNetworking-prefix.pch │ │ └── AFNetworking.xcconfig │ ├── Pods-SparkSetup │ │ ├── Pods-SparkSetup-dummy.m │ │ ├── Pods-SparkSetup.debug.xcconfig │ │ ├── Pods-SparkSetup.release.xcconfig │ │ └── Pods-SparkSetup-frameworks.sh │ └── 1PasswordExtension │ │ ├── 1PasswordExtension-dummy.m │ │ ├── 1PasswordExtension-prefix.pch │ │ ├── 1PasswordExtension.xcconfig │ │ └── ResourceBundle-OnePasswordExtensionResources-Info.plist ├── Spark-SDK │ └── Pod │ │ └── Classes │ │ ├── Spark-SDK-Bridging-Header.h │ │ ├── Spark-SDK.h │ │ ├── SDK │ │ ├── SparkEvent.h │ │ ├── SparkEvent.m │ │ └── SparkSession.h │ │ └── Helpers │ │ ├── KeychainItemWrapper.h │ │ └── EventSource.h ├── AFNetworking │ ├── LICENSE │ ├── UIKit+AFNetworking │ │ ├── UIImage+AFNetworking.h │ │ ├── UIKit+AFNetworking.h │ │ ├── UIActivityIndicatorView+AFNetworking.h │ │ ├── UIRefreshControl+AFNetworking.h │ │ ├── UIProgressView+AFNetworking.h │ │ ├── UIWebView+AFNetworking.h │ │ ├── UIRefreshControl+AFNetworking.m │ │ └── UIActivityIndicatorView+AFNetworking.m │ └── AFNetworking │ │ └── AFNetworking.h ├── Manifest.lock ├── Local Podspecs │ └── Spark-SDK.podspec.json └── Pods.xcodeproj │ └── xcshareddata │ └── xcschemes │ └── Spark-SDK.xcscheme ├── particle-mark.png ├── Resources ├── setup.xcassets │ ├── Contents.json │ ├── 1.imageset │ │ ├── 1.png │ │ └── Contents.json │ ├── 2.imageset │ │ ├── 2.png │ │ └── Contents.json │ ├── 3.imageset │ │ ├── 3.png │ │ └── Contents.json │ ├── x.imageset │ │ ├── x.png │ │ └── Contents.json │ ├── lock.imageset │ │ ├── lock.png │ │ └── Contents.json │ ├── wifi1.imageset │ │ ├── wifi1.png │ │ └── Contents.json │ ├── wifi2.imageset │ │ ├── wifi2.png │ │ └── Contents.json │ ├── wifi3.imageset │ │ ├── wifi3.png │ │ └── Contents.json │ ├── photon.imageset │ │ ├── photon.png │ │ └── Contents.json │ ├── spacer.imageset │ │ ├── spacer.png │ │ └── Contents.json │ ├── failure.imageset │ │ ├── failure.png │ │ └── Contents.json │ ├── spinner.imageset │ │ ├── spinner.png │ │ └── Contents.json │ ├── success.imageset │ │ ├── success.png │ │ └── Contents.json │ ├── warning.imageset │ │ ├── warning.png │ │ └── Contents.json │ ├── checkmark.imageset │ │ ├── checkmark.png │ │ └── Contents.json │ ├── spark-logo.imageset │ │ ├── spark-logo.png │ │ └── Contents.json │ ├── AppIcon.appiconset │ │ ├── AppIcon29x29.png │ │ ├── AppIcon40x40.png │ │ ├── AppIcon76x76-1.png │ │ ├── AppIcon29x29@2x.png │ │ ├── AppIcon40x40@2x.png │ │ ├── AppIcon60x60@2x.png │ │ ├── AppIcon76x76@2x.png │ │ ├── AppIcon29x29@2x-1.png │ │ ├── AppIcon40x40@2x-1.png │ │ └── Contents.json │ ├── background.imageset │ │ ├── background-1.png │ │ ├── background-1-1.png │ │ └── Contents.json │ ├── leftChevron.imageset │ │ ├── leftChevron.png │ │ └── Contents.json │ ├── spinner_big.imageset │ │ ├── spinner_big.png │ │ └── Contents.json │ ├── LaunchImage.launchimage │ │ ├── Default@2x.png │ │ ├── Default-568h@2x.png │ │ ├── Default-667h@2x.png │ │ ├── Default-Portrait-736h@3x.png │ │ └── Contents.json │ ├── imgBackArrow.imageset │ │ ├── imgBackArrow.png │ │ └── Contents.json │ ├── iosCheckmark.imageset │ │ ├── iosCheckmark.png │ │ └── Contents.json │ ├── iosSettingWifi.imageset │ │ ├── iosSettingWifi.png │ │ └── Contents.json │ ├── connect-to-wifi.imageset │ │ ├── connect-to-wifi.png │ │ └── Contents.json │ ├── spark-logo-head.imageset │ │ ├── spark-logo-head.png │ │ └── Contents.json │ ├── connect-to-power.imageset │ │ ├── connect-to-power.png │ │ └── Contents.json │ ├── onepassword-button.imageset │ │ ├── onepassword-button.png │ │ ├── onepassword-button@2x.png │ │ ├── onepassword-button@3x.png │ │ └── Contents.json │ └── onepassword-button-light.imageset │ │ ├── onepassword-button-light.png │ │ ├── onepassword-button-light@2x.png │ │ ├── onepassword-button-light@3x.png │ │ └── Contents.json └── Info.plist ├── Cartfile ├── ParticleDeviceSetupLibrary ├── ParticleSDK.framework │ ├── Info.plist │ ├── ParticleSDK │ ├── Modules │ │ └── module.modulemap │ └── Headers │ │ ├── ParticleSDK.h │ │ └── SparkEvent.h ├── AFNetworking.framework │ ├── AFNetworking │ ├── Info.plist │ ├── Modules │ │ └── module.modulemap │ └── Headers │ │ ├── UIImage+AFNetworking.h │ │ ├── UIActivityIndicatorView+AFNetworking.h │ │ ├── UIRefreshControl+AFNetworking.h │ │ ├── UIProgressView+AFNetworking.h │ │ ├── AFNetworking.h │ │ └── UIWebView+AFNetworking.h ├── OnePasswordExtension.framework │ ├── Assets.car │ ├── Info.plist │ ├── OnePasswordExtension │ └── Modules │ │ └── module.modulemap ├── .gitmodules ├── ParticleDeviceSetupLibrary │ ├── ParticleDeviceSetupLibrary.h │ └── Info.plist └── ParticleDeviceSetupLibrary.xcodeproj │ └── xcshareddata │ └── xcschemes │ └── ParticleDeviceSetupLibrary.xcscheme ├── Cartfile.resolved ├── Classes ├── SparkSetup-Bridging-Header.h ├── UI │ ├── UI Elements │ │ ├── SparkSetupUIElements.h │ │ ├── SparkSetupUILabel.h │ │ ├── SparkSetupUIButton.h │ │ ├── SparkSetupWifiTableViewCell.h │ │ ├── SparkSetupUISpinner.h │ │ ├── SparkSetupWifiTableViewCell.m │ │ ├── SparkSetupUIViewController.h │ │ ├── SparkSetupUISpinner.m │ │ └── SparkSetupUILabel.m │ ├── SparkGetReadyViewController.h │ ├── SparkSetupVideoViewController.h │ ├── SparkManualNetworkViewController.h │ ├── SparkUserForgotPasswordViewController.h │ ├── SparkUserLoginViewController.h │ ├── SparkDiscoverDeviceViewController.h │ ├── SparkSetupWebViewController.h │ ├── SparkSetupPasswordEntryViewController.h │ ├── SparkSetupResultViewController.h │ ├── SparkConnectingProgressViewController.h │ ├── SparkSelectNetworkViewController.h │ ├── SparkUserSignupViewController.h │ ├── SparkSetupWebViewController.m │ └── SparkSetupVideoViewController.m ├── SparkSetup.h ├── Comm │ ├── SparkSetupSecurityManager.h │ ├── SparkSetupConnection.h │ ├── SparkSetupCommManager.h │ └── Reachability.h └── User │ ├── SparkSetupCustomization.m │ └── SparkSetupCustomization.h ├── SparkSetup.xcodeproj └── project.xcworkspace │ └── contents.xcworkspacedata ├── Podfile ├── bin └── setup ├── SparkSetup.xcworkspace ├── contents.xcworkspacedata └── xcshareddata │ └── SparkSetup.xcscmblueprint ├── .gitmodules ├── .travis.yml ├── .gitignore ├── README.md ├── Podfile.lock └── SparkSetup.podspec /Pods/Headers/Public/Spark-SDK/Spark-SDK.h: -------------------------------------------------------------------------------- 1 | ../../../Spark-SDK/Pod/Classes/Spark-SDK.h -------------------------------------------------------------------------------- /Pods/Headers/Private/Spark-SDK/Spark-SDK.h: -------------------------------------------------------------------------------- 1 | ../../../Spark-SDK/Pod/Classes/Spark-SDK.h -------------------------------------------------------------------------------- /Pods/Headers/Private/Spark-SDK/SparkCloud.h: -------------------------------------------------------------------------------- 1 | ../../../Spark-SDK/Pod/Classes/SDK/SparkCloud.h -------------------------------------------------------------------------------- /Pods/Headers/Private/Spark-SDK/SparkDevice.h: -------------------------------------------------------------------------------- 1 | ../../../Spark-SDK/Pod/Classes/SDK/SparkDevice.h -------------------------------------------------------------------------------- /Pods/Headers/Private/Spark-SDK/SparkEvent.h: -------------------------------------------------------------------------------- 1 | ../../../Spark-SDK/Pod/Classes/SDK/SparkEvent.h -------------------------------------------------------------------------------- /Pods/Headers/Public/Spark-SDK/SparkCloud.h: -------------------------------------------------------------------------------- 1 | ../../../Spark-SDK/Pod/Classes/SDK/SparkCloud.h -------------------------------------------------------------------------------- /Pods/Headers/Public/Spark-SDK/SparkDevice.h: -------------------------------------------------------------------------------- 1 | ../../../Spark-SDK/Pod/Classes/SDK/SparkDevice.h -------------------------------------------------------------------------------- /Pods/Headers/Public/Spark-SDK/SparkEvent.h: -------------------------------------------------------------------------------- 1 | ../../../Spark-SDK/Pod/Classes/SDK/SparkEvent.h -------------------------------------------------------------------------------- /Pods/Headers/Public/Spark-SDK/SparkSession.h: -------------------------------------------------------------------------------- 1 | ../../../Spark-SDK/Pod/Classes/SDK/SparkSession.h -------------------------------------------------------------------------------- /Pods/Headers/Private/AFNetworking/AFNetworking.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/AFNetworking/AFNetworking.h -------------------------------------------------------------------------------- /Pods/Headers/Private/Spark-SDK/EventSource.h: -------------------------------------------------------------------------------- 1 | ../../../Spark-SDK/Pod/Classes/Helpers/EventSource.h -------------------------------------------------------------------------------- /Pods/Headers/Private/Spark-SDK/SparkSession.h: -------------------------------------------------------------------------------- 1 | ../../../Spark-SDK/Pod/Classes/SDK/SparkSession.h -------------------------------------------------------------------------------- /Pods/Headers/Public/AFNetworking/AFNetworking.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/AFNetworking/AFNetworking.h -------------------------------------------------------------------------------- /Pods/Headers/Public/Spark-SDK/EventSource.h: -------------------------------------------------------------------------------- 1 | ../../../Spark-SDK/Pod/Classes/Helpers/EventSource.h -------------------------------------------------------------------------------- /particle-mark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/particle-iot/spark-setup-ios/HEAD/particle-mark.png -------------------------------------------------------------------------------- /Pods/Headers/Private/AFNetworking/AFSecurityPolicy.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/AFNetworking/AFSecurityPolicy.h -------------------------------------------------------------------------------- /Pods/Headers/Public/AFNetworking/AFSecurityPolicy.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/AFNetworking/AFSecurityPolicy.h -------------------------------------------------------------------------------- /Pods/Headers/Private/1PasswordExtension/OnePasswordExtension.h: -------------------------------------------------------------------------------- 1 | ../../../1PasswordExtension/OnePasswordExtension.h -------------------------------------------------------------------------------- /Pods/Headers/Private/AFNetworking/AFHTTPSessionManager.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/AFNetworking/AFHTTPSessionManager.h -------------------------------------------------------------------------------- /Pods/Headers/Private/AFNetworking/AFImageDownloader.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/UIKit+AFNetworking/AFImageDownloader.h -------------------------------------------------------------------------------- /Pods/Headers/Private/AFNetworking/AFURLSessionManager.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/AFNetworking/AFURLSessionManager.h -------------------------------------------------------------------------------- /Pods/Headers/Private/Spark-SDK/KeychainItemWrapper.h: -------------------------------------------------------------------------------- 1 | ../../../Spark-SDK/Pod/Classes/Helpers/KeychainItemWrapper.h -------------------------------------------------------------------------------- /Pods/Headers/Public/1PasswordExtension/OnePasswordExtension.h: -------------------------------------------------------------------------------- 1 | ../../../1PasswordExtension/OnePasswordExtension.h -------------------------------------------------------------------------------- /Pods/Headers/Public/AFNetworking/AFHTTPSessionManager.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/AFNetworking/AFHTTPSessionManager.h -------------------------------------------------------------------------------- /Pods/Headers/Public/AFNetworking/AFImageDownloader.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/UIKit+AFNetworking/AFImageDownloader.h -------------------------------------------------------------------------------- /Pods/Headers/Public/AFNetworking/AFURLSessionManager.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/AFNetworking/AFURLSessionManager.h -------------------------------------------------------------------------------- /Pods/Headers/Public/Spark-SDK/KeychainItemWrapper.h: -------------------------------------------------------------------------------- 1 | ../../../Spark-SDK/Pod/Classes/Helpers/KeychainItemWrapper.h -------------------------------------------------------------------------------- /Pods/Headers/Private/AFNetworking/UIKit+AFNetworking.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/UIKit+AFNetworking/UIKit+AFNetworking.h -------------------------------------------------------------------------------- /Pods/Headers/Private/Spark-SDK/Spark-SDK-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | ../../../Spark-SDK/Pod/Classes/Spark-SDK-Bridging-Header.h -------------------------------------------------------------------------------- /Pods/Headers/Public/AFNetworking/UIImage+AFNetworking.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/UIKit+AFNetworking/UIImage+AFNetworking.h -------------------------------------------------------------------------------- /Pods/Headers/Public/AFNetworking/UIKit+AFNetworking.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/UIKit+AFNetworking/UIKit+AFNetworking.h -------------------------------------------------------------------------------- /Pods/Headers/Public/Spark-SDK/Spark-SDK-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | ../../../Spark-SDK/Pod/Classes/Spark-SDK-Bridging-Header.h -------------------------------------------------------------------------------- /Pods/Headers/Private/AFNetworking/AFURLRequestSerialization.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/AFNetworking/AFURLRequestSerialization.h -------------------------------------------------------------------------------- /Pods/Headers/Private/AFNetworking/UIButton+AFNetworking.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/UIKit+AFNetworking/UIButton+AFNetworking.h -------------------------------------------------------------------------------- /Pods/Headers/Private/AFNetworking/UIImage+AFNetworking.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/UIKit+AFNetworking/UIImage+AFNetworking.h -------------------------------------------------------------------------------- /Pods/Headers/Private/AFNetworking/UIWebView+AFNetworking.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/UIKit+AFNetworking/UIWebView+AFNetworking.h -------------------------------------------------------------------------------- /Pods/Headers/Public/AFNetworking/AFURLRequestSerialization.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/AFNetworking/AFURLRequestSerialization.h -------------------------------------------------------------------------------- /Pods/Headers/Public/AFNetworking/UIButton+AFNetworking.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/UIKit+AFNetworking/UIButton+AFNetworking.h -------------------------------------------------------------------------------- /Pods/Headers/Public/AFNetworking/UIWebView+AFNetworking.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/UIKit+AFNetworking/UIWebView+AFNetworking.h -------------------------------------------------------------------------------- /Resources/setup.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /Pods/Headers/Private/AFNetworking/AFAutoPurgingImageCache.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/UIKit+AFNetworking/AFAutoPurgingImageCache.h -------------------------------------------------------------------------------- /Pods/Headers/Private/AFNetworking/AFURLResponseSerialization.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/AFNetworking/AFURLResponseSerialization.h -------------------------------------------------------------------------------- /Pods/Headers/Private/AFNetworking/UIImageView+AFNetworking.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/UIKit+AFNetworking/UIImageView+AFNetworking.h -------------------------------------------------------------------------------- /Pods/Headers/Public/AFNetworking/AFAutoPurgingImageCache.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/UIKit+AFNetworking/AFAutoPurgingImageCache.h -------------------------------------------------------------------------------- /Pods/Headers/Public/AFNetworking/AFNetworkReachabilityManager.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/AFNetworking/AFNetworkReachabilityManager.h -------------------------------------------------------------------------------- /Pods/Headers/Public/AFNetworking/AFURLResponseSerialization.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/AFNetworking/AFURLResponseSerialization.h -------------------------------------------------------------------------------- /Pods/Headers/Public/AFNetworking/UIImageView+AFNetworking.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/UIKit+AFNetworking/UIImageView+AFNetworking.h -------------------------------------------------------------------------------- /Pods/Headers/Private/AFNetworking/AFNetworkReachabilityManager.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/AFNetworking/AFNetworkReachabilityManager.h -------------------------------------------------------------------------------- /Pods/Headers/Private/AFNetworking/UIProgressView+AFNetworking.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/UIKit+AFNetworking/UIProgressView+AFNetworking.h -------------------------------------------------------------------------------- /Pods/Headers/Public/AFNetworking/UIProgressView+AFNetworking.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/UIKit+AFNetworking/UIProgressView+AFNetworking.h -------------------------------------------------------------------------------- /Pods/Headers/Private/AFNetworking/UIRefreshControl+AFNetworking.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/UIKit+AFNetworking/UIRefreshControl+AFNetworking.h -------------------------------------------------------------------------------- /Pods/Headers/Public/AFNetworking/UIRefreshControl+AFNetworking.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/UIKit+AFNetworking/UIRefreshControl+AFNetworking.h -------------------------------------------------------------------------------- /Pods/Headers/Private/AFNetworking/AFNetworkActivityIndicatorManager.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/UIKit+AFNetworking/AFNetworkActivityIndicatorManager.h -------------------------------------------------------------------------------- /Pods/Headers/Public/AFNetworking/AFNetworkActivityIndicatorManager.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/UIKit+AFNetworking/AFNetworkActivityIndicatorManager.h -------------------------------------------------------------------------------- /Resources/setup.xcassets/1.imageset/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/particle-iot/spark-setup-ios/HEAD/Resources/setup.xcassets/1.imageset/1.png -------------------------------------------------------------------------------- /Resources/setup.xcassets/2.imageset/2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/particle-iot/spark-setup-ios/HEAD/Resources/setup.xcassets/2.imageset/2.png -------------------------------------------------------------------------------- /Resources/setup.xcassets/3.imageset/3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/particle-iot/spark-setup-ios/HEAD/Resources/setup.xcassets/3.imageset/3.png -------------------------------------------------------------------------------- /Resources/setup.xcassets/x.imageset/x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/particle-iot/spark-setup-ios/HEAD/Resources/setup.xcassets/x.imageset/x.png -------------------------------------------------------------------------------- /Pods/Headers/Private/AFNetworking/UIActivityIndicatorView+AFNetworking.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/UIKit+AFNetworking/UIActivityIndicatorView+AFNetworking.h -------------------------------------------------------------------------------- /Pods/Headers/Public/AFNetworking/UIActivityIndicatorView+AFNetworking.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/UIKit+AFNetworking/UIActivityIndicatorView+AFNetworking.h -------------------------------------------------------------------------------- /Resources/setup.xcassets/lock.imageset/lock.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/particle-iot/spark-setup-ios/HEAD/Resources/setup.xcassets/lock.imageset/lock.png -------------------------------------------------------------------------------- /Resources/setup.xcassets/wifi1.imageset/wifi1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/particle-iot/spark-setup-ios/HEAD/Resources/setup.xcassets/wifi1.imageset/wifi1.png -------------------------------------------------------------------------------- /Resources/setup.xcassets/wifi2.imageset/wifi2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/particle-iot/spark-setup-ios/HEAD/Resources/setup.xcassets/wifi2.imageset/wifi2.png -------------------------------------------------------------------------------- /Resources/setup.xcassets/wifi3.imageset/wifi3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/particle-iot/spark-setup-ios/HEAD/Resources/setup.xcassets/wifi3.imageset/wifi3.png -------------------------------------------------------------------------------- /Cartfile: -------------------------------------------------------------------------------- 1 | github "AFNetworking/AFNetworking" ~> 3.0.0 2 | github "spark/spark-sdk-ios" ~> 0.6.0 3 | github "AgileBits/onepassword-extension" "add-framework-support" 4 | -------------------------------------------------------------------------------- /Resources/setup.xcassets/photon.imageset/photon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/particle-iot/spark-setup-ios/HEAD/Resources/setup.xcassets/photon.imageset/photon.png -------------------------------------------------------------------------------- /Resources/setup.xcassets/spacer.imageset/spacer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/particle-iot/spark-setup-ios/HEAD/Resources/setup.xcassets/spacer.imageset/spacer.png -------------------------------------------------------------------------------- /Resources/setup.xcassets/failure.imageset/failure.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/particle-iot/spark-setup-ios/HEAD/Resources/setup.xcassets/failure.imageset/failure.png -------------------------------------------------------------------------------- /Resources/setup.xcassets/spinner.imageset/spinner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/particle-iot/spark-setup-ios/HEAD/Resources/setup.xcassets/spinner.imageset/spinner.png -------------------------------------------------------------------------------- /Resources/setup.xcassets/success.imageset/success.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/particle-iot/spark-setup-ios/HEAD/Resources/setup.xcassets/success.imageset/success.png -------------------------------------------------------------------------------- /Resources/setup.xcassets/warning.imageset/warning.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/particle-iot/spark-setup-ios/HEAD/Resources/setup.xcassets/warning.imageset/warning.png -------------------------------------------------------------------------------- /Resources/setup.xcassets/checkmark.imageset/checkmark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/particle-iot/spark-setup-ios/HEAD/Resources/setup.xcassets/checkmark.imageset/checkmark.png -------------------------------------------------------------------------------- /ParticleDeviceSetupLibrary/ParticleSDK.framework/Info.plist: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/particle-iot/spark-setup-ios/HEAD/ParticleDeviceSetupLibrary/ParticleSDK.framework/Info.plist -------------------------------------------------------------------------------- /Resources/setup.xcassets/spark-logo.imageset/spark-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/particle-iot/spark-setup-ios/HEAD/Resources/setup.xcassets/spark-logo.imageset/spark-logo.png -------------------------------------------------------------------------------- /ParticleDeviceSetupLibrary/AFNetworking.framework/AFNetworking: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/particle-iot/spark-setup-ios/HEAD/ParticleDeviceSetupLibrary/AFNetworking.framework/AFNetworking -------------------------------------------------------------------------------- /ParticleDeviceSetupLibrary/AFNetworking.framework/Info.plist: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/particle-iot/spark-setup-ios/HEAD/ParticleDeviceSetupLibrary/AFNetworking.framework/Info.plist -------------------------------------------------------------------------------- /ParticleDeviceSetupLibrary/ParticleSDK.framework/ParticleSDK: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/particle-iot/spark-setup-ios/HEAD/ParticleDeviceSetupLibrary/ParticleSDK.framework/ParticleSDK -------------------------------------------------------------------------------- /Resources/setup.xcassets/AppIcon.appiconset/AppIcon29x29.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/particle-iot/spark-setup-ios/HEAD/Resources/setup.xcassets/AppIcon.appiconset/AppIcon29x29.png -------------------------------------------------------------------------------- /Resources/setup.xcassets/AppIcon.appiconset/AppIcon40x40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/particle-iot/spark-setup-ios/HEAD/Resources/setup.xcassets/AppIcon.appiconset/AppIcon40x40.png -------------------------------------------------------------------------------- /Resources/setup.xcassets/AppIcon.appiconset/AppIcon76x76-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/particle-iot/spark-setup-ios/HEAD/Resources/setup.xcassets/AppIcon.appiconset/AppIcon76x76-1.png -------------------------------------------------------------------------------- /Resources/setup.xcassets/background.imageset/background-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/particle-iot/spark-setup-ios/HEAD/Resources/setup.xcassets/background.imageset/background-1.png -------------------------------------------------------------------------------- /Resources/setup.xcassets/leftChevron.imageset/leftChevron.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/particle-iot/spark-setup-ios/HEAD/Resources/setup.xcassets/leftChevron.imageset/leftChevron.png -------------------------------------------------------------------------------- /Resources/setup.xcassets/spinner_big.imageset/spinner_big.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/particle-iot/spark-setup-ios/HEAD/Resources/setup.xcassets/spinner_big.imageset/spinner_big.png -------------------------------------------------------------------------------- /Cartfile.resolved: -------------------------------------------------------------------------------- 1 | github "AFNetworking/AFNetworking" "3.1.0" 2 | github "AgileBits/onepassword-extension" "d99f5d7a4c7328f8e3a8d1e7aff455d1072e0c19" 3 | github "spark/spark-sdk-ios" "0.6.0" 4 | -------------------------------------------------------------------------------- /Resources/setup.xcassets/AppIcon.appiconset/AppIcon29x29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/particle-iot/spark-setup-ios/HEAD/Resources/setup.xcassets/AppIcon.appiconset/AppIcon29x29@2x.png -------------------------------------------------------------------------------- /Resources/setup.xcassets/AppIcon.appiconset/AppIcon40x40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/particle-iot/spark-setup-ios/HEAD/Resources/setup.xcassets/AppIcon.appiconset/AppIcon40x40@2x.png -------------------------------------------------------------------------------- /Resources/setup.xcassets/AppIcon.appiconset/AppIcon60x60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/particle-iot/spark-setup-ios/HEAD/Resources/setup.xcassets/AppIcon.appiconset/AppIcon60x60@2x.png -------------------------------------------------------------------------------- /Resources/setup.xcassets/AppIcon.appiconset/AppIcon76x76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/particle-iot/spark-setup-ios/HEAD/Resources/setup.xcassets/AppIcon.appiconset/AppIcon76x76@2x.png -------------------------------------------------------------------------------- /Resources/setup.xcassets/LaunchImage.launchimage/Default@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/particle-iot/spark-setup-ios/HEAD/Resources/setup.xcassets/LaunchImage.launchimage/Default@2x.png -------------------------------------------------------------------------------- /Resources/setup.xcassets/background.imageset/background-1-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/particle-iot/spark-setup-ios/HEAD/Resources/setup.xcassets/background.imageset/background-1-1.png -------------------------------------------------------------------------------- /Resources/setup.xcassets/imgBackArrow.imageset/imgBackArrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/particle-iot/spark-setup-ios/HEAD/Resources/setup.xcassets/imgBackArrow.imageset/imgBackArrow.png -------------------------------------------------------------------------------- /Resources/setup.xcassets/iosCheckmark.imageset/iosCheckmark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/particle-iot/spark-setup-ios/HEAD/Resources/setup.xcassets/iosCheckmark.imageset/iosCheckmark.png -------------------------------------------------------------------------------- /Pods/1PasswordExtension/1Password.xcassets/onepassword-button.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/particle-iot/spark-setup-ios/HEAD/Pods/1PasswordExtension/1Password.xcassets/onepassword-button.pdf -------------------------------------------------------------------------------- /Pods/1PasswordExtension/1Password.xcassets/onepassword-navbar.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/particle-iot/spark-setup-ios/HEAD/Pods/1PasswordExtension/1Password.xcassets/onepassword-navbar.pdf -------------------------------------------------------------------------------- /Pods/1PasswordExtension/1Password.xcassets/onepassword-toolbar.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/particle-iot/spark-setup-ios/HEAD/Pods/1PasswordExtension/1Password.xcassets/onepassword-toolbar.pdf -------------------------------------------------------------------------------- /Pods/Target Support Files/Spark-SDK/Spark-SDK-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Spark_SDK : NSObject 3 | @end 4 | @implementation PodsDummy_Spark_SDK 5 | @end 6 | -------------------------------------------------------------------------------- /Resources/setup.xcassets/AppIcon.appiconset/AppIcon29x29@2x-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/particle-iot/spark-setup-ios/HEAD/Resources/setup.xcassets/AppIcon.appiconset/AppIcon29x29@2x-1.png -------------------------------------------------------------------------------- /Resources/setup.xcassets/AppIcon.appiconset/AppIcon40x40@2x-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/particle-iot/spark-setup-ios/HEAD/Resources/setup.xcassets/AppIcon.appiconset/AppIcon40x40@2x-1.png -------------------------------------------------------------------------------- /Resources/setup.xcassets/iosSettingWifi.imageset/iosSettingWifi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/particle-iot/spark-setup-ios/HEAD/Resources/setup.xcassets/iosSettingWifi.imageset/iosSettingWifi.png -------------------------------------------------------------------------------- /ParticleDeviceSetupLibrary/AFNetworking.framework/Modules/module.modulemap: -------------------------------------------------------------------------------- 1 | framework module AFNetworking { 2 | umbrella header "AFNetworking.h" 3 | export * 4 | module * { export * } 5 | } -------------------------------------------------------------------------------- /ParticleDeviceSetupLibrary/OnePasswordExtension.framework/Assets.car: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/particle-iot/spark-setup-ios/HEAD/ParticleDeviceSetupLibrary/OnePasswordExtension.framework/Assets.car -------------------------------------------------------------------------------- /ParticleDeviceSetupLibrary/OnePasswordExtension.framework/Info.plist: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/particle-iot/spark-setup-ios/HEAD/ParticleDeviceSetupLibrary/OnePasswordExtension.framework/Info.plist -------------------------------------------------------------------------------- /ParticleDeviceSetupLibrary/ParticleSDK.framework/Modules/module.modulemap: -------------------------------------------------------------------------------- 1 | framework module ParticleSDK { 2 | umbrella header "ParticleSDK.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Resources/setup.xcassets/LaunchImage.launchimage/Default-568h@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/particle-iot/spark-setup-ios/HEAD/Resources/setup.xcassets/LaunchImage.launchimage/Default-568h@2x.png -------------------------------------------------------------------------------- /Resources/setup.xcassets/LaunchImage.launchimage/Default-667h@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/particle-iot/spark-setup-ios/HEAD/Resources/setup.xcassets/LaunchImage.launchimage/Default-667h@2x.png -------------------------------------------------------------------------------- /Resources/setup.xcassets/connect-to-wifi.imageset/connect-to-wifi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/particle-iot/spark-setup-ios/HEAD/Resources/setup.xcassets/connect-to-wifi.imageset/connect-to-wifi.png -------------------------------------------------------------------------------- /Resources/setup.xcassets/spark-logo-head.imageset/spark-logo-head.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/particle-iot/spark-setup-ios/HEAD/Resources/setup.xcassets/spark-logo-head.imageset/spark-logo-head.png -------------------------------------------------------------------------------- /Pods/1PasswordExtension/1Password.xcassets/onepassword-button-light.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/particle-iot/spark-setup-ios/HEAD/Pods/1PasswordExtension/1Password.xcassets/onepassword-button-light.pdf -------------------------------------------------------------------------------- /Pods/1PasswordExtension/1Password.xcassets/onepassword-navbar-light.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/particle-iot/spark-setup-ios/HEAD/Pods/1PasswordExtension/1Password.xcassets/onepassword-navbar-light.pdf -------------------------------------------------------------------------------- /Pods/1PasswordExtension/1Password.xcassets/onepassword-toolbar-light.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/particle-iot/spark-setup-ios/HEAD/Pods/1PasswordExtension/1Password.xcassets/onepassword-toolbar-light.pdf -------------------------------------------------------------------------------- /Pods/Target Support Files/AFNetworking/AFNetworking-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_AFNetworking : NSObject 3 | @end 4 | @implementation PodsDummy_AFNetworking 5 | @end 6 | -------------------------------------------------------------------------------- /Resources/setup.xcassets/connect-to-power.imageset/connect-to-power.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/particle-iot/spark-setup-ios/HEAD/Resources/setup.xcassets/connect-to-power.imageset/connect-to-power.png -------------------------------------------------------------------------------- /Pods/1PasswordExtension/1Password.xcassets/onepassword-extension~compact.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/particle-iot/spark-setup-ios/HEAD/Pods/1PasswordExtension/1Password.xcassets/onepassword-extension~compact.pdf -------------------------------------------------------------------------------- /Pods/1PasswordExtension/1Password.xcassets/onepassword-extension~regular.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/particle-iot/spark-setup-ios/HEAD/Pods/1PasswordExtension/1Password.xcassets/onepassword-extension~regular.pdf -------------------------------------------------------------------------------- /Resources/setup.xcassets/LaunchImage.launchimage/Default-Portrait-736h@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/particle-iot/spark-setup-ios/HEAD/Resources/setup.xcassets/LaunchImage.launchimage/Default-Portrait-736h@3x.png -------------------------------------------------------------------------------- /Resources/setup.xcassets/onepassword-button.imageset/onepassword-button.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/particle-iot/spark-setup-ios/HEAD/Resources/setup.xcassets/onepassword-button.imageset/onepassword-button.png -------------------------------------------------------------------------------- /ParticleDeviceSetupLibrary/OnePasswordExtension.framework/OnePasswordExtension: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/particle-iot/spark-setup-ios/HEAD/ParticleDeviceSetupLibrary/OnePasswordExtension.framework/OnePasswordExtension -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-SparkSetup/Pods-SparkSetup-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods_SparkSetup : NSObject 3 | @end 4 | @implementation PodsDummy_Pods_SparkSetup 5 | @end 6 | -------------------------------------------------------------------------------- /Resources/setup.xcassets/onepassword-button.imageset/onepassword-button@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/particle-iot/spark-setup-ios/HEAD/Resources/setup.xcassets/onepassword-button.imageset/onepassword-button@2x.png -------------------------------------------------------------------------------- /Resources/setup.xcassets/onepassword-button.imageset/onepassword-button@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/particle-iot/spark-setup-ios/HEAD/Resources/setup.xcassets/onepassword-button.imageset/onepassword-button@3x.png -------------------------------------------------------------------------------- /ParticleDeviceSetupLibrary/OnePasswordExtension.framework/Modules/module.modulemap: -------------------------------------------------------------------------------- 1 | framework module OnePasswordExtension { 2 | umbrella header "OnePasswordExtension.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Pods/1PasswordExtension/1Password.xcassets/onepassword-extension-light~compact.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/particle-iot/spark-setup-ios/HEAD/Pods/1PasswordExtension/1Password.xcassets/onepassword-extension-light~compact.pdf -------------------------------------------------------------------------------- /Pods/1PasswordExtension/1Password.xcassets/onepassword-extension-light~regular.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/particle-iot/spark-setup-ios/HEAD/Pods/1PasswordExtension/1Password.xcassets/onepassword-extension-light~regular.pdf -------------------------------------------------------------------------------- /Pods/Target Support Files/1PasswordExtension/1PasswordExtension-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_1PasswordExtension : NSObject 3 | @end 4 | @implementation PodsDummy_1PasswordExtension 5 | @end 6 | -------------------------------------------------------------------------------- /Classes/SparkSetup-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | // 2 | // SparkSetup-Bridging-Header.h 3 | // 4 | 5 | #ifndef _SparkSetup_Bridging_Header_h 6 | #define _SparkSetup_Bridging_Header_h 7 | 8 | #include "SparkSetup.h" 9 | 10 | #endif 11 | -------------------------------------------------------------------------------- /Resources/setup.xcassets/onepassword-button-light.imageset/onepassword-button-light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/particle-iot/spark-setup-ios/HEAD/Resources/setup.xcassets/onepassword-button-light.imageset/onepassword-button-light.png -------------------------------------------------------------------------------- /Resources/setup.xcassets/onepassword-button-light.imageset/onepassword-button-light@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/particle-iot/spark-setup-ios/HEAD/Resources/setup.xcassets/onepassword-button-light.imageset/onepassword-button-light@2x.png -------------------------------------------------------------------------------- /Resources/setup.xcassets/onepassword-button-light.imageset/onepassword-button-light@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/particle-iot/spark-setup-ios/HEAD/Resources/setup.xcassets/onepassword-button-light.imageset/onepassword-button-light@3x.png -------------------------------------------------------------------------------- /ParticleDeviceSetupLibrary/.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "Carthage/Checkouts/AFNetworking"] 2 | url = https://github.com/AFNetworking/AFNetworking.git 3 | [submodule "Carthage/Checkouts/spark-sdk-ios"] 4 | url = https://github.com/spark/spark-sdk-ios.git 5 | -------------------------------------------------------------------------------- /Pods/1PasswordExtension/1Password.xcassets/onepassword-button.imageset/onepassword-button.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/particle-iot/spark-setup-ios/HEAD/Pods/1PasswordExtension/1Password.xcassets/onepassword-button.imageset/onepassword-button.png -------------------------------------------------------------------------------- /Pods/1PasswordExtension/1Password.xcassets/onepassword-navbar.imageset/onepassword-navbar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/particle-iot/spark-setup-ios/HEAD/Pods/1PasswordExtension/1Password.xcassets/onepassword-navbar.imageset/onepassword-navbar.png -------------------------------------------------------------------------------- /SparkSetup.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Pods/1PasswordExtension/1Password.xcassets/onepassword-button.imageset/onepassword-button@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/particle-iot/spark-setup-ios/HEAD/Pods/1PasswordExtension/1Password.xcassets/onepassword-button.imageset/onepassword-button@2x.png -------------------------------------------------------------------------------- /Pods/1PasswordExtension/1Password.xcassets/onepassword-button.imageset/onepassword-button@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/particle-iot/spark-setup-ios/HEAD/Pods/1PasswordExtension/1Password.xcassets/onepassword-button.imageset/onepassword-button@3x.png -------------------------------------------------------------------------------- /Pods/1PasswordExtension/1Password.xcassets/onepassword-navbar.imageset/onepassword-navbar@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/particle-iot/spark-setup-ios/HEAD/Pods/1PasswordExtension/1Password.xcassets/onepassword-navbar.imageset/onepassword-navbar@2x.png -------------------------------------------------------------------------------- /Pods/1PasswordExtension/1Password.xcassets/onepassword-navbar.imageset/onepassword-navbar@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/particle-iot/spark-setup-ios/HEAD/Pods/1PasswordExtension/1Password.xcassets/onepassword-navbar.imageset/onepassword-navbar@3x.png -------------------------------------------------------------------------------- /Pods/1PasswordExtension/1Password.xcassets/onepassword-toolbar.imageset/onepassword-toolbar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/particle-iot/spark-setup-ios/HEAD/Pods/1PasswordExtension/1Password.xcassets/onepassword-toolbar.imageset/onepassword-toolbar.png -------------------------------------------------------------------------------- /Pods/1PasswordExtension/1Password.xcassets/onepassword-toolbar.imageset/onepassword-toolbar@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/particle-iot/spark-setup-ios/HEAD/Pods/1PasswordExtension/1Password.xcassets/onepassword-toolbar.imageset/onepassword-toolbar@2x.png -------------------------------------------------------------------------------- /Pods/1PasswordExtension/1Password.xcassets/onepassword-toolbar.imageset/onepassword-toolbar@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/particle-iot/spark-setup-ios/HEAD/Pods/1PasswordExtension/1Password.xcassets/onepassword-toolbar.imageset/onepassword-toolbar@3x.png -------------------------------------------------------------------------------- /Podfile: -------------------------------------------------------------------------------- 1 | source 'https://github.com/CocoaPods/Specs.git' 2 | 3 | platform :ios, '9.0' 4 | 5 | target 'SparkSetup' do 6 | 7 | project 'SparkSetup' 8 | pod 'Spark-SDK' 9 | pod 'AFNetworking' 10 | pod '1PasswordExtension' 11 | 12 | end 13 | -------------------------------------------------------------------------------- /Pods/1PasswordExtension/1Password.xcassets/onepassword-button-light.imageset/onepassword-button-light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/particle-iot/spark-setup-ios/HEAD/Pods/1PasswordExtension/1Password.xcassets/onepassword-button-light.imageset/onepassword-button-light.png -------------------------------------------------------------------------------- /Pods/1PasswordExtension/1Password.xcassets/onepassword-extension.imageset/onepassword-extension~compact.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/particle-iot/spark-setup-ios/HEAD/Pods/1PasswordExtension/1Password.xcassets/onepassword-extension.imageset/onepassword-extension~compact.png -------------------------------------------------------------------------------- /Pods/1PasswordExtension/1Password.xcassets/onepassword-extension.imageset/onepassword-extension~regular.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/particle-iot/spark-setup-ios/HEAD/Pods/1PasswordExtension/1Password.xcassets/onepassword-extension.imageset/onepassword-extension~regular.png -------------------------------------------------------------------------------- /Pods/1PasswordExtension/1Password.xcassets/onepassword-navbar-light.imageset/onepassword-navbar-light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/particle-iot/spark-setup-ios/HEAD/Pods/1PasswordExtension/1Password.xcassets/onepassword-navbar-light.imageset/onepassword-navbar-light.png -------------------------------------------------------------------------------- /Pods/1PasswordExtension/1Password.xcassets/onepassword-toolbar-light.imageset/onepassword-toolbar-light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/particle-iot/spark-setup-ios/HEAD/Pods/1PasswordExtension/1Password.xcassets/onepassword-toolbar-light.imageset/onepassword-toolbar-light.png -------------------------------------------------------------------------------- /Pods/1PasswordExtension/1Password.xcassets/onepassword-button-light.imageset/onepassword-button-light@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/particle-iot/spark-setup-ios/HEAD/Pods/1PasswordExtension/1Password.xcassets/onepassword-button-light.imageset/onepassword-button-light@2x.png -------------------------------------------------------------------------------- /Pods/1PasswordExtension/1Password.xcassets/onepassword-button-light.imageset/onepassword-button-light@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/particle-iot/spark-setup-ios/HEAD/Pods/1PasswordExtension/1Password.xcassets/onepassword-button-light.imageset/onepassword-button-light@3x.png -------------------------------------------------------------------------------- /Pods/1PasswordExtension/1Password.xcassets/onepassword-navbar-light.imageset/onepassword-navbar-light@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/particle-iot/spark-setup-ios/HEAD/Pods/1PasswordExtension/1Password.xcassets/onepassword-navbar-light.imageset/onepassword-navbar-light@2x.png -------------------------------------------------------------------------------- /Pods/1PasswordExtension/1Password.xcassets/onepassword-navbar-light.imageset/onepassword-navbar-light@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/particle-iot/spark-setup-ios/HEAD/Pods/1PasswordExtension/1Password.xcassets/onepassword-navbar-light.imageset/onepassword-navbar-light@3x.png -------------------------------------------------------------------------------- /Pods/1PasswordExtension/1Password.xcassets/onepassword-extension.imageset/onepassword-extension@2x~compact.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/particle-iot/spark-setup-ios/HEAD/Pods/1PasswordExtension/1Password.xcassets/onepassword-extension.imageset/onepassword-extension@2x~compact.png -------------------------------------------------------------------------------- /Pods/1PasswordExtension/1Password.xcassets/onepassword-extension.imageset/onepassword-extension@2x~regular.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/particle-iot/spark-setup-ios/HEAD/Pods/1PasswordExtension/1Password.xcassets/onepassword-extension.imageset/onepassword-extension@2x~regular.png -------------------------------------------------------------------------------- /Pods/1PasswordExtension/1Password.xcassets/onepassword-extension.imageset/onepassword-extension@3x~compact.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/particle-iot/spark-setup-ios/HEAD/Pods/1PasswordExtension/1Password.xcassets/onepassword-extension.imageset/onepassword-extension@3x~compact.png -------------------------------------------------------------------------------- /Pods/1PasswordExtension/1Password.xcassets/onepassword-toolbar-light.imageset/onepassword-toolbar-light@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/particle-iot/spark-setup-ios/HEAD/Pods/1PasswordExtension/1Password.xcassets/onepassword-toolbar-light.imageset/onepassword-toolbar-light@2x.png -------------------------------------------------------------------------------- /Pods/1PasswordExtension/1Password.xcassets/onepassword-toolbar-light.imageset/onepassword-toolbar-light@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/particle-iot/spark-setup-ios/HEAD/Pods/1PasswordExtension/1Password.xcassets/onepassword-toolbar-light.imageset/onepassword-toolbar-light@3x.png -------------------------------------------------------------------------------- /Pods/1PasswordExtension/1Password.xcassets/onepassword-extension-light.imageset/onepassword-extension-light~compact.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/particle-iot/spark-setup-ios/HEAD/Pods/1PasswordExtension/1Password.xcassets/onepassword-extension-light.imageset/onepassword-extension-light~compact.png -------------------------------------------------------------------------------- /Pods/1PasswordExtension/1Password.xcassets/onepassword-extension-light.imageset/onepassword-extension-light~regular.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/particle-iot/spark-setup-ios/HEAD/Pods/1PasswordExtension/1Password.xcassets/onepassword-extension-light.imageset/onepassword-extension-light~regular.png -------------------------------------------------------------------------------- /Pods/1PasswordExtension/1Password.xcassets/onepassword-extension-light.imageset/onepassword-extension-light@2x~compact.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/particle-iot/spark-setup-ios/HEAD/Pods/1PasswordExtension/1Password.xcassets/onepassword-extension-light.imageset/onepassword-extension-light@2x~compact.png -------------------------------------------------------------------------------- /Pods/1PasswordExtension/1Password.xcassets/onepassword-extension-light.imageset/onepassword-extension-light@2x~regular.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/particle-iot/spark-setup-ios/HEAD/Pods/1PasswordExtension/1Password.xcassets/onepassword-extension-light.imageset/onepassword-extension-light@2x~regular.png -------------------------------------------------------------------------------- /Pods/1PasswordExtension/1Password.xcassets/onepassword-extension-light.imageset/onepassword-extension-light@3x~compact.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/particle-iot/spark-setup-ios/HEAD/Pods/1PasswordExtension/1Password.xcassets/onepassword-extension-light.imageset/onepassword-extension-light@3x~compact.png -------------------------------------------------------------------------------- /Pods/Target Support Files/Spark-SDK/Spark-SDK-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | -------------------------------------------------------------------------------- /bin/setup: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | 3 | if ! command -v carthage > /dev/null; then 4 | printf 'Carthage is not installed.\n' 5 | printf 'See https://github.com/Carthage/Carthage for install instructions.\n' 6 | exit 1 7 | fi 8 | 9 | carthage update --platform iOS --use-submodules --no-use-binaries 10 | -------------------------------------------------------------------------------- /Pods/Target Support Files/1PasswordExtension/1PasswordExtension-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | -------------------------------------------------------------------------------- /Classes/UI/UI Elements/SparkSetupUIElements.h: -------------------------------------------------------------------------------- 1 | // 2 | // Header.h 3 | // teacup-ios-app 4 | // 5 | // Created by Ido on 1/30/15. 6 | // Copyright (c) 2015 spark. All rights reserved. 7 | // 8 | #import "SparkSetupUILabel.h" 9 | #import "SparkSetupUIButton.h" 10 | #import "SparkSetupUISpinner.h" 11 | #import "SparkSetupUIViewController.h" 12 | -------------------------------------------------------------------------------- /Classes/SparkSetup.h: -------------------------------------------------------------------------------- 1 | // 2 | // SparkSetup.h 3 | // SparkSetup 4 | // 5 | // Created by Ido on 4/8/15. 6 | // Copyright (c) 2015 spark. All rights reserved. 7 | // 8 | 9 | #ifndef SparkSetup_SparkSetup_h 10 | #define SparkSetup_SparkSetup_h 11 | 12 | #import "SparkSetupCustomization.h" 13 | #import "SparkSetupMainController.h" 14 | 15 | #endif 16 | -------------------------------------------------------------------------------- /Classes/UI/SparkGetReadyViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // SparkGetReadyViewController.h 3 | // teacup-ios-app 4 | // 5 | // Created by Ido on 1/15/15. 6 | // Copyright (c) 2015 spark. All rights reserved. 7 | // 8 | 9 | #import "SparkSetupUIViewController.h" 10 | 11 | @interface SparkGetReadyViewController : SparkSetupUIViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /Classes/UI/UI Elements/SparkSetupUILabel.h: -------------------------------------------------------------------------------- 1 | // 2 | // SparkSetupUILabel.h 3 | // teacup-ios-app 4 | // 5 | // Created by Ido on 1/16/15. 6 | // Copyright (c) 2015 spark. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface SparkSetupUILabel : UILabel 12 | @property (nonatomic, strong) NSString *type;// "bold" or nothing 13 | @end 14 | -------------------------------------------------------------------------------- /Classes/UI/UI Elements/SparkSetupUIButton.h: -------------------------------------------------------------------------------- 1 | // 2 | // SparkSetupUIButton.h 3 | // teacup-ios-app 4 | // 5 | // Created by Ido on 1/16/15. 6 | // Copyright (c) 2015 spark. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface SparkSetupUIButton : UIButton 12 | @property (nonatomic, strong) NSString *type; // "action", "link" 13 | @end 14 | -------------------------------------------------------------------------------- /Classes/UI/SparkSetupVideoViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // SparkSetupVideoViewController.h 3 | // Pods 4 | // 5 | // Created by Ido on 6/15/15. 6 | // 7 | // 8 | 9 | #import 10 | #import "SparkSetupUIViewController.h" 11 | 12 | @interface SparkSetupVideoViewController : SparkSetupUIViewController 13 | @property (nonatomic, strong) NSString *videoFilePath; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /Resources/setup.xcassets/1.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "1.png", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Resources/setup.xcassets/2.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "2.png", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Resources/setup.xcassets/3.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "3.png", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Resources/setup.xcassets/lock.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "lock.png", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Resources/setup.xcassets/photon.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "photon.png", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Resources/setup.xcassets/spacer.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "spacer.png", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Resources/setup.xcassets/x.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "x.png", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /SparkSetup.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /Resources/setup.xcassets/failure.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "failure.png", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Resources/setup.xcassets/warning.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "warning.png", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Resources/setup.xcassets/wifi1.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "wifi1.png", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Resources/setup.xcassets/wifi2.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "wifi2.png", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Resources/setup.xcassets/wifi3.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "wifi3.png", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Resources/setup.xcassets/checkmark.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "checkmark.png", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Resources/setup.xcassets/spinner.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "spinner.png", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Resources/setup.xcassets/success.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "success.png", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Resources/setup.xcassets/imgBackArrow.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "imgBackArrow.png", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Resources/setup.xcassets/iosCheckmark.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "iosCheckmark.png", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Resources/setup.xcassets/spark-logo.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "spark-logo.png", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Resources/setup.xcassets/connect-to-power.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "connect-to-power.png", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Resources/setup.xcassets/connect-to-wifi.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "connect-to-wifi.png", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Resources/setup.xcassets/iosSettingWifi.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "iosSettingWifi.png", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Resources/setup.xcassets/leftChevron.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "leftChevron.png", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Resources/setup.xcassets/spinner_big.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "spinner_big.png", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Classes/UI/SparkManualNetworkViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // SparkManualNetworkViewController.h 3 | // teacup-ios-app 4 | // 5 | // Created by Ido on 2/22/15. 6 | // Copyright (c) 2015 spark. All rights reserved. 7 | // 8 | 9 | #import "SparkSetupUIViewController.h" 10 | 11 | @interface SparkManualNetworkViewController : SparkSetupUIViewController 12 | @property (nonatomic, strong) NSString *deviceID; 13 | @property (nonatomic) BOOL needToClaimDevice; 14 | @end 15 | -------------------------------------------------------------------------------- /Resources/setup.xcassets/spark-logo-head.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "spark-logo-head.png", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "Carthage/Checkouts/AFNetworking"] 2 | path = Carthage/Checkouts/AFNetworking 3 | url = https://github.com/AFNetworking/AFNetworking.git 4 | [submodule "Carthage/Checkouts/spark-sdk-ios"] 5 | path = Carthage/Checkouts/spark-sdk-ios 6 | url = https://github.com/spark/spark-sdk-ios.git 7 | [submodule "Carthage/Checkouts/onepassword-extension"] 8 | path = Carthage/Checkouts/onepassword-extension 9 | url = https://github.com/AgileBits/onepassword-extension.git 10 | -------------------------------------------------------------------------------- /Classes/UI/SparkUserForgotPasswordViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // SparkUserForgotPasswordViewController.h 3 | // teacup-ios-app 4 | // 5 | // Created by Ido on 2/13/15. 6 | // Copyright (c) 2015 spark. All rights reserved. 7 | // 8 | 9 | #import "SparkSetupUIViewController.h" 10 | #import "SparkUserLoginViewController.h" 11 | 12 | @interface SparkUserForgotPasswordViewController : SparkSetupUIViewController 13 | @property (nonatomic, strong) id delegate; 14 | @end 15 | -------------------------------------------------------------------------------- /Classes/UI/UI Elements/SparkSetupWifiTableViewCell.h: -------------------------------------------------------------------------------- 1 | // 2 | // SparkSetupWifiTableViewCell.h 3 | // 4 | // 5 | // Created by Ido on 9/10/15. 6 | // 7 | // 8 | 9 | #import 10 | 11 | @interface SparkSetupWifiTableViewCell : UITableViewCell 12 | @property (weak, nonatomic) IBOutlet UILabel *ssidLabel; 13 | @property (weak, nonatomic) IBOutlet UIImageView *wifiStrengthImageView; 14 | @property (weak, nonatomic) IBOutlet UIImageView *securedNetworkIconImageView; 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /Resources/setup.xcassets/background.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "background-1.png", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "filename" : "background-1-1.png", 15 | "scale" : "3x" 16 | } 17 | ], 18 | "info" : { 19 | "version" : 1, 20 | "author" : "xcode" 21 | } 22 | } -------------------------------------------------------------------------------- /Classes/UI/SparkUserLoginViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // SparkUserLoginViewController.h 3 | // mobile-sdk-ios 4 | // 5 | // Created by Ido Kleinman on 11/26/14. 6 | // Copyright (c) 2014-2015 Spark. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "SparkSetupUIViewController.h" 11 | #import "SparkUserSignupViewController.h" 12 | 13 | @interface SparkUserLoginViewController : SparkSetupUIViewController 14 | @property (nonatomic, strong) id delegate; 15 | @end 16 | -------------------------------------------------------------------------------- /Classes/UI/UI Elements/SparkSetupUISpinner.h: -------------------------------------------------------------------------------- 1 | // 2 | // SparkSetupUISpinner.h 3 | // teacup-ios-app 4 | // 5 | // Created by Ido on 1/27/15. 6 | // Copyright (c) 2015 spark. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface SparkSetupUISpinner : UIImageView 12 | @property (nonatomic, strong) NSString *type; // "foreground" (colored on a view) or "background" (white on a button) 13 | 14 | -(void)startAnimating; 15 | -(void)stopAnimating; 16 | -(instancetype)initWithType:(NSString *)type; 17 | 18 | @end 19 | -------------------------------------------------------------------------------- /Pods/Target Support Files/AFNetworking/AFNetworking-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | #ifndef TARGET_OS_IOS 14 | #define TARGET_OS_IOS TARGET_OS_IPHONE 15 | #endif 16 | 17 | #ifndef TARGET_OS_WATCH 18 | #define TARGET_OS_WATCH 0 19 | #endif 20 | 21 | #ifndef TARGET_OS_TV 22 | #define TARGET_OS_TV 0 23 | #endif 24 | -------------------------------------------------------------------------------- /Classes/UI/SparkDiscoverDeviceViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // SparkDiscoverDeviceViewController.h 3 | // mobile-sdk-ios 4 | // 5 | // Created by Ido Kleinman on 11/16/14. 6 | // Copyright (c) 2014-2015 Spark. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "SparkSetupUIViewController.h" 11 | #import "SparkSetupMainController.h" 12 | 13 | @interface SparkDiscoverDeviceViewController : SparkSetupUIViewController 14 | @property (nonatomic, strong) NSString *claimCode; 15 | @property (nonatomic, strong) NSArray *claimedDevices; 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /Classes/UI/SparkSetupWebViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // SparkSetupWebViewController.h 3 | // mobile-sdk-ios 4 | // 5 | // Created by Ido Kleinman on 12/12/14. 6 | // Copyright (c) 2014-2015 Spark. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "SparkSetupUIViewController.h" 11 | 12 | @interface SparkSetupWebViewController : SparkSetupUIViewController 13 | @property (nonatomic, strong) NSURL *link; 14 | @property (nonatomic, strong) NSString *htmlFilename; 15 | @property (nonatomic, strong) NSString *htmlFileDirectory; 16 | @end 17 | 18 | 19 | -------------------------------------------------------------------------------- /Resources/setup.xcassets/onepassword-button.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "onepassword-button.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "onepassword-button@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "onepassword-button@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /Classes/UI/UI Elements/SparkSetupWifiTableViewCell.m: -------------------------------------------------------------------------------- 1 | // 2 | // SparkSetupWifiTableViewCell.m 3 | // 4 | // 5 | // Created by Ido on 9/10/15. 6 | // 7 | // 8 | 9 | #import "SparkSetupWifiTableViewCell.h" 10 | 11 | @implementation SparkSetupWifiTableViewCell 12 | 13 | - (void)awakeFromNib { 14 | // Initialization code 15 | [super awakeFromNib]; 16 | } 17 | 18 | - (void)setSelected:(BOOL)selected animated:(BOOL)animated { 19 | [super setSelected:selected animated:animated]; 20 | 21 | // Configure the view for the selected state 22 | } 23 | 24 | @end 25 | -------------------------------------------------------------------------------- /Pods/1PasswordExtension/1Password.xcassets/onepassword-button.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x", 6 | "filename" : "onepassword-button.png" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x", 11 | "filename" : "onepassword-button@2x.png" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "scale" : "3x", 16 | "filename" : "onepassword-button@3x.png" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /Pods/1PasswordExtension/1Password.xcassets/onepassword-navbar.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x", 6 | "filename" : "onepassword-navbar.png" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x", 11 | "filename" : "onepassword-navbar@2x.png" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "scale" : "3x", 16 | "filename" : "onepassword-navbar@3x.png" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /Pods/1PasswordExtension/1Password.xcassets/onepassword-toolbar.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x", 6 | "filename" : "onepassword-toolbar.png" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x", 11 | "filename" : "onepassword-toolbar@2x.png" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "scale" : "3x", 16 | "filename" : "onepassword-toolbar@3x.png" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /Resources/setup.xcassets/onepassword-button-light.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "onepassword-button-light.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "onepassword-button-light@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "onepassword-button-light@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /Pods/1PasswordExtension/1Password.xcassets/onepassword-button-light.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x", 6 | "filename" : "onepassword-button-light.png" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x", 11 | "filename" : "onepassword-button-light@2x.png" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "scale" : "3x", 16 | "filename" : "onepassword-button-light@3x.png" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /Pods/1PasswordExtension/1Password.xcassets/onepassword-navbar-light.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x", 6 | "filename" : "onepassword-navbar-light.png" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x", 11 | "filename" : "onepassword-navbar-light@2x.png" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "scale" : "3x", 16 | "filename" : "onepassword-navbar-light@3x.png" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /Pods/1PasswordExtension/1Password.xcassets/onepassword-toolbar-light.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x", 6 | "filename" : "onepassword-toolbar-light.png" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x", 11 | "filename" : "onepassword-toolbar-light@2x.png" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "scale" : "3x", 16 | "filename" : "onepassword-toolbar-light@3x.png" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /Classes/Comm/SparkSetupSecurityManager.h: -------------------------------------------------------------------------------- 1 | // 2 | // SparkSetupSecurity.h 3 | // teacup-ios-app 4 | // 5 | // Created by Ido Kleinman on 1/8/15. 6 | // Copyright (c) 2015 spark. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface SparkSetupSecurityManager : NSObject 12 | 13 | +(SecKeyRef)getPublicKey; 14 | +(BOOL)setPublicKey:(NSData *)rawASN1FormattedKey; 15 | +(NSData *)encryptWithPublicKey:(SecKeyRef)pubKey plainText:(NSData *)plainText; 16 | +(NSData *)decodeDataFromHexString:(NSString *)hexEncodedString; 17 | +(NSString *)encodeDataToHexString:(NSData *)buffer; 18 | 19 | @end 20 | -------------------------------------------------------------------------------- /Classes/UI/SparkSetupPasswordEntryViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // SparkSetupPasswordEntryViewController.h 3 | // teacup-ios-app 4 | // 5 | // Created by Ido on 1/20/15. 6 | // Copyright (c) 2015 spark. All rights reserved. 7 | // 8 | 9 | #import "SparkSetupUIViewController.h" 10 | 11 | @interface SparkSetupPasswordEntryViewController : SparkSetupUIViewController 12 | @property (nonatomic, strong) NSString *networkName; 13 | @property (nonatomic, strong) NSString *deviceID; 14 | @property (nonatomic, strong) NSNumber *channel; 15 | @property (nonatomic, strong) NSNumber *security; 16 | @property (nonatomic) BOOL needToClaimDevice; 17 | @end 18 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | # references: 2 | # * http://www.objc.io/issue-6/travis-ci.html 3 | # * https://github.com/supermarin/xcpretty#usage 4 | 5 | language: objective-c 6 | # cache: cocoapods 7 | # podfile: Example/Podfile 8 | # before_install: 9 | # - gem install cocoapods # Since Travis is not always on latest version 10 | # - pod install --project-directory=Example 11 | install: 12 | - gem install xcpretty --no-rdoc --no-ri --no-document --quiet 13 | script: 14 | - set -o pipefail && xcodebuild test -workspace Example/Spark-Setup.xcworkspace -scheme Spark-Setup-Example -sdk iphonesimulator ONLY_ACTIVE_ARCH=NO | xcpretty -c 15 | - pod lib lint --quick 16 | -------------------------------------------------------------------------------- /Classes/UI/SparkSetupResultViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // SparkSetupSuccessFailureViewController.h 3 | // teacup-ios-app 4 | // 5 | // Created by Ido on 2/3/15. 6 | // Copyright (c) 2015 spark. All rights reserved. 7 | // 8 | 9 | #import "SparkSetupUIViewController.h" 10 | #import "SparkSetupMainController.h" 11 | 12 | 13 | @class SparkDevice; 14 | 15 | @interface SparkSetupResultViewController : SparkSetupUIViewController 16 | @property (nonatomic, strong) SparkDevice *device; // device instance for successful setup 17 | @property (nonatomic, strong) NSString *deviceID; // device ID reporting for failed setup 18 | @property (nonatomic) SparkSetupMainControllerResult setupResult; 19 | 20 | @end 21 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Xcode 2 | # 3 | build/ 4 | *.pbxuser 5 | !default.pbxuser 6 | *.mode1v3 7 | !default.mode1v3 8 | *.mode2v3 9 | !default.mode2v3 10 | *.perspectivev3 11 | !default.perspectivev3 12 | xcuserdata 13 | *.xccheckout 14 | *.moved-aside 15 | DerivedData 16 | *.hmap 17 | *.ipa 18 | *.xcuserstate 19 | 20 | # Carthage 21 | # Avoids `dirty` git flags when Carthage is ran with `--use-submodules` 22 | Carthage/Build 23 | 24 | # CocoaPods 25 | # 26 | # We recommend against adding the Pods directory to your .gitignore. However 27 | # you should judge for yourself, the pros and cons are mentioned at: 28 | # http://guides.cocoapods.org/using/using-cocoapods.html#should-i-ignore-the-pods-directory-in-source-control 29 | # 30 | # Pods/ 31 | -------------------------------------------------------------------------------- /Classes/UI/SparkConnectingProgressViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // SparkConnectiProgressViewController.h 3 | // mobile-sdk-ios 4 | // 5 | // Created by Ido Kleinman on 11/25/14. 6 | // Copyright (c) 2014-2015 Spark. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "SparkSetupUIViewController.h" 11 | 12 | @interface SparkConnectingProgressViewController : SparkSetupUIViewController 13 | @property (nonatomic, strong) NSString *networkName; 14 | @property (nonatomic, strong) NSString *deviceID; 15 | @property (nonatomic, strong) NSString *password; 16 | @property (nonatomic, strong) NSNumber *channel; 17 | @property (nonatomic, strong) NSNumber *security; 18 | @property (nonatomic) BOOL needToClaimDevice; 19 | @end 20 | -------------------------------------------------------------------------------- /ParticleDeviceSetupLibrary/ParticleSDK.framework/Headers/ParticleSDK.h: -------------------------------------------------------------------------------- 1 | // ParticleSDK.h 2 | // ParticleSDK 3 | // 4 | // Created by Ido Kleinman on 2/29/16. 5 | // Copyright © 2016 Particle. All rights reserved. 6 | // 7 | 8 | #import 9 | 10 | //! Project version number for ParticleSDK. 11 | FOUNDATION_EXPORT double ParticleSDKVersionNumber; 12 | 13 | //! Project version string for ParticleSDK. 14 | FOUNDATION_EXPORT const unsigned char ParticleSDKVersionString[]; 15 | 16 | // In this header, you should import all the public headers of your framework using statements like #import 17 | #import 18 | #import 19 | #import 20 | 21 | 22 | -------------------------------------------------------------------------------- /Classes/UI/SparkSelectNetworkViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // SparkSelectNetworkViewController.h 3 | // mobile-sdk-ios 4 | // 5 | // Created by Ido Kleinman on 11/19/14. 6 | // Copyright (c) 2014-2015 Spark. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "SparkSetupUIViewController.h" 11 | 12 | @protocol SparkSelectNetworkViewControllerDelegate 13 | 14 | -(void)willPopBackToDeviceDiscovery; 15 | 16 | @end 17 | 18 | @interface SparkSelectNetworkViewController : SparkSetupUIViewController 19 | @property (nonatomic, strong) NSArray *wifiList; 20 | @property (nonatomic, strong) NSString *deviceID; 21 | @property (nonatomic) BOOL needToClaimDevice; 22 | @property (nonatomic, weak) id delegate; 23 | @end 24 | 25 | 26 | -------------------------------------------------------------------------------- /Classes/UI/SparkUserSignupViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // SparkUserSignupViewController.h 3 | // mobile-sdk-ios 4 | // 5 | // Created by Ido Kleinman on 11/15/14. 6 | // Copyright (c) 2014-2015 Spark. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "SparkSetupUIViewController.h" 11 | 12 | @protocol SparkUserLoginDelegate 13 | @required 14 | -(void)didFinishUserAuthentication:(id)sender loggedIn:(BOOL)loggedIn; 15 | -(void)didRequestUserSignup:(id)sender; 16 | -(void)didRequestUserLogin:(id)sender; 17 | -(void)didRequestPasswordReset:(id)sender; 18 | @end 19 | 20 | 21 | @interface SparkUserSignupViewController : SparkSetupUIViewController 22 | @property (nonatomic, strong) id delegate; 23 | @property (nonatomic, strong) NSString *predefinedActivationCode; 24 | 25 | @end 26 | -------------------------------------------------------------------------------- /Classes/UI/UI Elements/SparkSetupUIViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // SparkSetupViewController.h 3 | // mobile-sdk-ios 4 | // 5 | // Created by Ido Kleinman on 12/13/14. 6 | // Copyright (c) 2014-2015 Spark. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #define SPARK_SETUP_RESOURCE_BUNDLE_IDENTIFIER @"io.spark.SparkSetup" 12 | 13 | #define IS_IPHONE (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone) 14 | #define isiPhone4 ([[UIScreen mainScreen] bounds].size.height == 480) ? YES : NO 15 | #define isiPhone5 (IS_IPHONE && [[UIScreen mainScreen] bounds].size.height == 568.0) 16 | 17 | @interface SparkSetupUIViewController : UIViewController 18 | 19 | -(BOOL)isValidEmail:(NSString *)checkString; // should be in NSString category 20 | -(void)disableKeyboardMovesViewUp; // might not be needed when we remove all popups 21 | 22 | @end 23 | -------------------------------------------------------------------------------- /Pods/Target Support Files/AFNetworking/AFNetworking.xcconfig: -------------------------------------------------------------------------------- 1 | CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/AFNetworking 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/AFNetworking" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/1PasswordExtension" "${PODS_ROOT}/Headers/Public/AFNetworking" "${PODS_ROOT}/Headers/Public/Spark-SDK" 4 | OTHER_LDFLAGS = -framework "CoreGraphics" -framework "MobileCoreServices" -framework "Security" -framework "SystemConfiguration" 5 | PODS_BUILD_DIR = $BUILD_DIR 6 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 7 | PODS_ROOT = ${SRCROOT} 8 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/AFNetworking 9 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 10 | SKIP_INSTALL = YES 11 | -------------------------------------------------------------------------------- /Pods/1PasswordExtension/1Password.xcassets/onepassword-extension.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "scale" : "1x", 6 | "filename" : "onepassword-extension~compact.png" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "scale" : "2x", 11 | "filename" : "onepassword-extension@2x~compact.png" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "scale" : "3x", 16 | "filename" : "onepassword-extension@3x~compact.png" 17 | }, 18 | { 19 | "idiom" : "ipad", 20 | "scale" : "1x", 21 | "filename" : "onepassword-extension~regular.png" 22 | }, 23 | { 24 | "idiom" : "ipad", 25 | "scale" : "2x", 26 | "filename" : "onepassword-extension@2x~regular.png" 27 | } 28 | ], 29 | "info" : { 30 | "version" : 1, 31 | "author" : "xcode" 32 | } 33 | } -------------------------------------------------------------------------------- /ParticleDeviceSetupLibrary/ParticleDeviceSetupLibrary/ParticleDeviceSetupLibrary.h: -------------------------------------------------------------------------------- 1 | // 2 | // ParticleDeviceSetupLibrary.h 3 | // ParticleDeviceSetupLibrary 4 | // 5 | // Created by Ido Kleinman on 3/22/16. 6 | // Copyright © 2016 Particle. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | //! Project version number for ParticleDeviceSetupLibrary. 12 | FOUNDATION_EXPORT double ParticleDeviceSetupLibraryVersionNumber; 13 | 14 | //! Project version string for ParticleDeviceSetupLibrary. 15 | FOUNDATION_EXPORT const unsigned char ParticleDeviceSetupLibraryVersionString[]; 16 | 17 | // In this header, you should import all the public headers of your framework using statements like #import 18 | #import 19 | #import 20 | 21 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Spark-SDK/Spark-SDK.xcconfig: -------------------------------------------------------------------------------- 1 | CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/Spark-SDK 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/Spark-SDK" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/1PasswordExtension" "${PODS_ROOT}/Headers/Public/AFNetworking" "${PODS_ROOT}/Headers/Public/Spark-SDK" 4 | LIBRARY_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/AFNetworking" 5 | OTHER_LDFLAGS = -framework "Security" -framework "SystemConfiguration" 6 | PODS_BUILD_DIR = $BUILD_DIR 7 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 8 | PODS_ROOT = ${SRCROOT} 9 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/Spark-SDK 10 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 11 | SKIP_INSTALL = YES 12 | -------------------------------------------------------------------------------- /Pods/Target Support Files/1PasswordExtension/1PasswordExtension.xcconfig: -------------------------------------------------------------------------------- 1 | CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/1PasswordExtension 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/1PasswordExtension" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/1PasswordExtension" "${PODS_ROOT}/Headers/Public/AFNetworking" "${PODS_ROOT}/Headers/Public/Spark-SDK" 4 | OTHER_LDFLAGS = -framework "Foundation" -framework "MobileCoreServices" -framework "UIKit" -weak_framework "WebKit" 5 | PODS_BUILD_DIR = $BUILD_DIR 6 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 7 | PODS_ROOT = ${SRCROOT} 8 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/1PasswordExtension 9 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 10 | SKIP_INSTALL = YES 11 | -------------------------------------------------------------------------------- /Pods/1PasswordExtension/1Password.xcassets/onepassword-extension-light.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "scale" : "1x", 6 | "filename" : "onepassword-extension-light~compact.png" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "scale" : "2x", 11 | "filename" : "onepassword-extension-light@2x~compact.png" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "scale" : "3x", 16 | "filename" : "onepassword-extension-light@3x~compact.png" 17 | }, 18 | { 19 | "idiom" : "ipad", 20 | "scale" : "1x", 21 | "filename" : "onepassword-extension-light~regular.png" 22 | }, 23 | { 24 | "idiom" : "ipad", 25 | "scale" : "2x", 26 | "filename" : "onepassword-extension-light@2x~regular.png" 27 | } 28 | ], 29 | "info" : { 30 | "version" : 1, 31 | "author" : "xcode" 32 | } 33 | } -------------------------------------------------------------------------------- /Pods/Target Support Files/1PasswordExtension/ResourceBundle-OnePasswordExtensionResources-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleIdentifier 8 | ${PRODUCT_BUNDLE_IDENTIFIER} 9 | CFBundleInfoDictionaryVersion 10 | 6.0 11 | CFBundleName 12 | ${PRODUCT_NAME} 13 | CFBundlePackageType 14 | BNDL 15 | CFBundleShortVersionString 16 | 1.8.4 17 | CFBundleSignature 18 | ???? 19 | CFBundleVersion 20 | 1 21 | NSPrincipalClass 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /Pods/Spark-SDK/Pod/Classes/Spark-SDK-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | // 2 | // Spark-SDK-Bridging-Header.h 3 | // Particle iOS Cloud SDK 4 | // 5 | // Created by Ido Kleinman 6 | // Copyright 2015 Particle 7 | // 8 | // Licensed under the Apache License, Version 2.0 (the "License"); 9 | // you may not use this file except in compliance with the License. 10 | // You may obtain a copy of the License at 11 | // 12 | // http://www.apache.org/licenses/LICENSE-2.0 13 | // 14 | // Unless required by applicable law or agreed to in writing, software 15 | // distributed under the License is distributed on an "AS IS" BASIS, 16 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | // See the License for the specific language governing permissions and 18 | // limitations under the License. 19 | 20 | #ifndef Pods_Spark_SDK_Bridging_Header_h 21 | #define Pods_Spark_SDK_Bridging_Header_h 22 | 23 | #import "Spark-SDK.h" 24 | 25 | #endif 26 | -------------------------------------------------------------------------------- /ParticleDeviceSetupLibrary/ParticleDeviceSetupLibrary/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | $(CURRENT_PROJECT_VERSION) 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Pods/Spark-SDK/Pod/Classes/Spark-SDK.h: -------------------------------------------------------------------------------- 1 | // 2 | // Spark-SDK.h 3 | // Particle iOS Cloud SDK 4 | // 5 | // Created by Ido Kleinman 6 | // Copyright 2015 Particle 7 | // 8 | // Licensed under the Apache License, Version 2.0 (the "License"); 9 | // you may not use this file except in compliance with the License. 10 | // You may obtain a copy of the License at 11 | // 12 | // http://www.apache.org/licenses/LICENSE-2.0 13 | // 14 | // Unless required by applicable law or agreed to in writing, software 15 | // distributed under the License is distributed on an "AS IS" BASIS, 16 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | // See the License for the specific language governing permissions and 18 | // limitations under the License. 19 | 20 | #import 21 | 22 | #ifndef Pods_Spark_SDK_h 23 | #define Pods_Spark_SDK_h 24 | 25 | #import "SparkCloud.h" 26 | #import "SparkDevice.h" 27 | 28 | #endif 29 | 30 | 31 | -------------------------------------------------------------------------------- /Resources/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | NSHumanReadableCopyright 24 | Copyright © 2016 Particle. All rights reserved. 25 | NSPrincipalClass 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |

2 | Particle 3 |

4 | 5 | # Particle Device Setup library (beta) 6 | 7 | [![Platform](https://img.shields.io/badge/platform-iOS-10a4fa.svg)]() [![license](https://img.shields.io/hexpm/l/plug.svg)]() [![version](https://img.shields.io/badge/pod-0.7.2-green.svg)]() [![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage) 8 | 9 |

10 | Deprecated 11 |

12 | 13 | ### Deprecation notice 14 | This repository and the underlying Cocoapod/Carthage iOS libraries has been deprecated in favor of a renamed library (`particle-setup-ios`) which can be found [here](https://github.com/spark/particle-sdk-ios). 15 | You can also follow the [Cocoapod link](https://cocoapods.org/pods/ParticleSetup). 16 | Or use Carthage by following instructions found [here](https://github.com/spark/particle-setup-ios#carthage) 17 | 18 | --- 19 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-SparkSetup/Pods-SparkSetup.debug.xcconfig: -------------------------------------------------------------------------------- 1 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 2 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/1PasswordExtension" "${PODS_ROOT}/Headers/Public/AFNetworking" "${PODS_ROOT}/Headers/Public/Spark-SDK" 3 | LIBRARY_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/1PasswordExtension" "$PODS_CONFIGURATION_BUILD_DIR/AFNetworking" "$PODS_CONFIGURATION_BUILD_DIR/Spark-SDK" 4 | OTHER_CFLAGS = $(inherited) -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/1PasswordExtension" -isystem "${PODS_ROOT}/Headers/Public/AFNetworking" -isystem "${PODS_ROOT}/Headers/Public/Spark-SDK" 5 | OTHER_LDFLAGS = $(inherited) -ObjC -l"1PasswordExtension" -l"AFNetworking" -l"Spark-SDK" -framework "CoreGraphics" -framework "Foundation" -framework "MobileCoreServices" -framework "Security" -framework "SystemConfiguration" -framework "UIKit" -weak_framework "WebKit" 6 | PODS_BUILD_DIR = $BUILD_DIR 7 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 8 | PODS_ROOT = ${SRCROOT}/Pods 9 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-SparkSetup/Pods-SparkSetup.release.xcconfig: -------------------------------------------------------------------------------- 1 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 2 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/1PasswordExtension" "${PODS_ROOT}/Headers/Public/AFNetworking" "${PODS_ROOT}/Headers/Public/Spark-SDK" 3 | LIBRARY_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/1PasswordExtension" "$PODS_CONFIGURATION_BUILD_DIR/AFNetworking" "$PODS_CONFIGURATION_BUILD_DIR/Spark-SDK" 4 | OTHER_CFLAGS = $(inherited) -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/1PasswordExtension" -isystem "${PODS_ROOT}/Headers/Public/AFNetworking" -isystem "${PODS_ROOT}/Headers/Public/Spark-SDK" 5 | OTHER_LDFLAGS = $(inherited) -ObjC -l"1PasswordExtension" -l"AFNetworking" -l"Spark-SDK" -framework "CoreGraphics" -framework "Foundation" -framework "MobileCoreServices" -framework "Security" -framework "SystemConfiguration" -framework "UIKit" -weak_framework "WebKit" 6 | PODS_BUILD_DIR = $BUILD_DIR 7 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 8 | PODS_ROOT = ${SRCROOT}/Pods 9 | -------------------------------------------------------------------------------- /Pods/1PasswordExtension/LICENSE.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) 2014 AgileBits Inc. 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in all 11 | copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 19 | SOFTWARE. -------------------------------------------------------------------------------- /Pods/AFNetworking/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2011–2016 Alamofire Software Foundation (http://alamofire.org/) 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /Resources/setup.xcassets/LaunchImage.launchimage/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "extent" : "full-screen", 5 | "idiom" : "iphone", 6 | "subtype" : "736h", 7 | "filename" : "Default-Portrait-736h@3x.png", 8 | "minimum-system-version" : "8.0", 9 | "orientation" : "portrait", 10 | "scale" : "3x" 11 | }, 12 | { 13 | "extent" : "full-screen", 14 | "idiom" : "iphone", 15 | "subtype" : "667h", 16 | "filename" : "Default-667h@2x.png", 17 | "minimum-system-version" : "8.0", 18 | "orientation" : "portrait", 19 | "scale" : "2x" 20 | }, 21 | { 22 | "orientation" : "portrait", 23 | "idiom" : "iphone", 24 | "filename" : "Default@2x.png", 25 | "extent" : "full-screen", 26 | "minimum-system-version" : "7.0", 27 | "scale" : "2x" 28 | }, 29 | { 30 | "extent" : "full-screen", 31 | "idiom" : "iphone", 32 | "subtype" : "retina4", 33 | "filename" : "Default-568h@2x.png", 34 | "minimum-system-version" : "7.0", 35 | "orientation" : "portrait", 36 | "scale" : "2x" 37 | } 38 | ], 39 | "info" : { 40 | "version" : 1, 41 | "author" : "xcode" 42 | } 43 | } -------------------------------------------------------------------------------- /Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - 1PasswordExtension (1.8.4) 3 | - AFNetworking (3.1.0): 4 | - AFNetworking/NSURLSession (= 3.1.0) 5 | - AFNetworking/Reachability (= 3.1.0) 6 | - AFNetworking/Security (= 3.1.0) 7 | - AFNetworking/Serialization (= 3.1.0) 8 | - AFNetworking/UIKit (= 3.1.0) 9 | - AFNetworking/NSURLSession (3.1.0): 10 | - AFNetworking/Reachability 11 | - AFNetworking/Security 12 | - AFNetworking/Serialization 13 | - AFNetworking/Reachability (3.1.0) 14 | - AFNetworking/Security (3.1.0) 15 | - AFNetworking/Serialization (3.1.0) 16 | - AFNetworking/UIKit (3.1.0): 17 | - AFNetworking/NSURLSession 18 | - Spark-SDK (0.6.0): 19 | - Spark-SDK/Helpers (= 0.6.0) 20 | - Spark-SDK/SDK (= 0.6.0) 21 | - Spark-SDK/Helpers (0.6.0) 22 | - Spark-SDK/SDK (0.6.0): 23 | - AFNetworking (~> 3.0) 24 | - Spark-SDK/Helpers 25 | 26 | DEPENDENCIES: 27 | - 1PasswordExtension 28 | - AFNetworking 29 | - Spark-SDK 30 | 31 | SPEC CHECKSUMS: 32 | 1PasswordExtension: e775a29310c65851e5a6cec1afc349ab4e334e47 33 | AFNetworking: 5e0e199f73d8626b11e79750991f5d173d1f8b67 34 | Spark-SDK: abb1436245a3e43cbc00cfdaddcad66e047666ef 35 | 36 | PODFILE CHECKSUM: 8ddc45cc6134cee37e26fa4accb6c53eb059019a 37 | 38 | COCOAPODS: 1.2.0 39 | -------------------------------------------------------------------------------- /Pods/Manifest.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - 1PasswordExtension (1.8.4) 3 | - AFNetworking (3.1.0): 4 | - AFNetworking/NSURLSession (= 3.1.0) 5 | - AFNetworking/Reachability (= 3.1.0) 6 | - AFNetworking/Security (= 3.1.0) 7 | - AFNetworking/Serialization (= 3.1.0) 8 | - AFNetworking/UIKit (= 3.1.0) 9 | - AFNetworking/NSURLSession (3.1.0): 10 | - AFNetworking/Reachability 11 | - AFNetworking/Security 12 | - AFNetworking/Serialization 13 | - AFNetworking/Reachability (3.1.0) 14 | - AFNetworking/Security (3.1.0) 15 | - AFNetworking/Serialization (3.1.0) 16 | - AFNetworking/UIKit (3.1.0): 17 | - AFNetworking/NSURLSession 18 | - Spark-SDK (0.6.0): 19 | - Spark-SDK/Helpers (= 0.6.0) 20 | - Spark-SDK/SDK (= 0.6.0) 21 | - Spark-SDK/Helpers (0.6.0) 22 | - Spark-SDK/SDK (0.6.0): 23 | - AFNetworking (~> 3.0) 24 | - Spark-SDK/Helpers 25 | 26 | DEPENDENCIES: 27 | - 1PasswordExtension 28 | - AFNetworking 29 | - Spark-SDK 30 | 31 | SPEC CHECKSUMS: 32 | 1PasswordExtension: e775a29310c65851e5a6cec1afc349ab4e334e47 33 | AFNetworking: 5e0e199f73d8626b11e79750991f5d173d1f8b67 34 | Spark-SDK: abb1436245a3e43cbc00cfdaddcad66e047666ef 35 | 36 | PODFILE CHECKSUM: 8ddc45cc6134cee37e26fa4accb6c53eb059019a 37 | 38 | COCOAPODS: 1.2.0 39 | -------------------------------------------------------------------------------- /Pods/Spark-SDK/Pod/Classes/SDK/SparkEvent.h: -------------------------------------------------------------------------------- 1 | // 2 | // SparkEvent.h 3 | // Pods 4 | // 5 | // Created by Ido on 7/14/15. 6 | // 7 | // 8 | 9 | #import 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | /** 14 | * Spark event handler function which receives two arguements 15 | * 16 | * @param eventDict NSDictionary argument which contains the event payload keys: event (name), data (payload), ttl (time to live), published_at (date/time published), coreid (publishiing device ID). 17 | * @param error NSError object in case an error occured in parsing the event payload or receiving it 18 | */ 19 | @class SparkEvent; 20 | 21 | typedef void (^SparkEventHandler)(SparkEvent * _Nullable event, NSError * _Nullable error); 22 | 23 | @interface SparkEvent : NSObject 24 | 25 | @property (nonatomic, strong) NSString *deviceID; // Event published by this device ID 26 | @property (nonatomic, nullable, strong) NSString *data; // Event payload in string format 27 | @property (nonatomic, strong) NSString *event; // Event name 28 | @property (nonatomic, strong) NSDate *time; // Event "published at" time/date UTC 29 | @property (nonatomic) NSInteger ttl; // Event time to live (currently unused) 30 | 31 | -(instancetype)initWithEventDict:(NSDictionary *)eventDict; 32 | 33 | @end 34 | 35 | NS_ASSUME_NONNULL_END 36 | -------------------------------------------------------------------------------- /Pods/Spark-SDK/Pod/Classes/SDK/SparkEvent.m: -------------------------------------------------------------------------------- 1 | // 2 | // SparkEvent.m 3 | // Pods 4 | // 5 | // Created by Ido on 7/14/15. 6 | // 7 | // 8 | 9 | #import "SparkEvent.h" 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | @implementation SparkEvent 14 | 15 | -(instancetype)initWithEventDict:(NSDictionary *)eventDict 16 | { 17 | if (self = [super init]) 18 | { 19 | self.deviceID = eventDict[@"coreid"]; 20 | self.data = eventDict[@"data"]; 21 | self.event = eventDict[@"event"]; 22 | NSString *ttl = eventDict[@"ttl"]; 23 | self.ttl = [ttl integerValue]; 24 | 25 | NSString *dateString = eventDict[@"published_at"];// "2015-04-18T08:42:22.127Z" 26 | NSDateFormatter *formatter = [[NSDateFormatter alloc] init]; 27 | [formatter setDateFormat:@"yyyy-MM-dd'T'HH:mm:ss.SSSZ"]; 28 | NSLocale *posix = [[NSLocale alloc] initWithLocaleIdentifier:@"en_US_POSIX"]; 29 | [formatter setLocale:posix]; 30 | self.time = [formatter dateFromString:dateString]; 31 | } 32 | 33 | return self; 34 | } 35 | 36 | -(NSString *)description 37 | { 38 | return [NSString stringWithFormat:@"", 39 | self.event, self.deviceID, self.data, self.time, (long)self.ttl]; 40 | } 41 | 42 | @end 43 | 44 | NS_ASSUME_NONNULL_END 45 | -------------------------------------------------------------------------------- /ParticleDeviceSetupLibrary/ParticleSDK.framework/Headers/SparkEvent.h: -------------------------------------------------------------------------------- 1 | // 2 | // SparkEvent.h 3 | // Pods 4 | // 5 | // Created by Ido on 7/14/15. 6 | // 7 | // 8 | 9 | #import 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | /** 14 | * Spark event handler function which receives two arguements 15 | * 16 | * @param eventDict NSDictionary argument which contains the event payload keys: event (name), data (payload), ttl (time to live), published_at (date/time published), coreid (publishiing device ID). 17 | * @param error NSError object in case an error occured in parsing the event payload or receiving it 18 | */ 19 | @class SparkEvent; 20 | 21 | typedef void (^SparkEventHandler)(SparkEvent * _Nullable event, NSError * _Nullable error); 22 | 23 | @interface SparkEvent : NSObject 24 | 25 | @property (nonatomic, strong) NSString *deviceID; // Event published by this device ID 26 | @property (nonatomic, nullable, strong) NSString *data; // Event payload in string format 27 | @property (nonatomic, strong) NSString *event; // Event name 28 | @property (nonatomic, strong) NSDate *time; // Event "published at" time/date UTC 29 | @property (nonatomic) NSInteger ttl; // Event time to live (currently unused) 30 | 31 | -(instancetype)initWithEventDict:(NSDictionary *)eventDict; 32 | 33 | @end 34 | 35 | NS_ASSUME_NONNULL_END 36 | -------------------------------------------------------------------------------- /Pods/AFNetworking/UIKit+AFNetworking/UIImage+AFNetworking.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIImage+AFNetworking.h 3 | // 4 | // 5 | // Created by Paulo Ferreira on 08/07/15. 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | 25 | #if TARGET_OS_IOS || TARGET_OS_TV 26 | 27 | #import 28 | 29 | @interface UIImage (AFNetworking) 30 | 31 | + (UIImage*) safeImageWithData:(NSData*)data; 32 | 33 | @end 34 | 35 | #endif 36 | -------------------------------------------------------------------------------- /ParticleDeviceSetupLibrary/AFNetworking.framework/Headers/UIImage+AFNetworking.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIImage+AFNetworking.h 3 | // 4 | // 5 | // Created by Paulo Ferreira on 08/07/15. 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | 25 | #if TARGET_OS_IOS || TARGET_OS_TV 26 | 27 | #import 28 | 29 | @interface UIImage (AFNetworking) 30 | 31 | + (UIImage*) safeImageWithData:(NSData*)data; 32 | 33 | @end 34 | 35 | #endif 36 | -------------------------------------------------------------------------------- /Classes/Comm/SparkSetupConnection.h: -------------------------------------------------------------------------------- 1 | // 2 | // SparkSetupConnection.h 3 | // mobile-sdk-ios 4 | // 5 | // Created by Ido Kleinman on 11/20/14. 6 | // Copyright (c) 2014-2015 Spark. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @class SparkSetupConnection; 12 | 13 | typedef NS_ENUM(NSInteger, SparkSetupConnectionState) { 14 | SparkSetupConnectionStateOpened, 15 | // SparkSetupConnectionStateSentCommand, 16 | // SparkSetupConnectionStateReceivedResponse, 17 | SparkSetupConnectionStateClosed, 18 | SparkSetupConnectionOpenTimeout, 19 | SparkSetupConnectionStateError, 20 | SparkSetupConnectionStateUnknown 21 | }; 22 | 23 | 24 | @protocol SparkSetupConnectionDelegate 25 | 26 | @required 27 | -(void)SparkSetupConnection:(SparkSetupConnection *)connection didReceiveData:(NSString *)data; 28 | 29 | @optional 30 | -(void)SparkSetupConnection:(SparkSetupConnection *)connection didUpdateState:(SparkSetupConnectionState)state error:(NSError *)error; 31 | 32 | @end 33 | 34 | @interface SparkSetupConnection : NSObject 35 | -(instancetype)initWithIPAddress:(NSString *)IPAddr port:(int)port NS_DESIGNATED_INITIALIZER; 36 | -(id)init __attribute__((unavailable("Must use -initWithIPAddress:port:"))); 37 | -(void)close; 38 | 39 | @property (nonatomic, strong) iddelegate; 40 | @property (nonatomic, readonly) SparkSetupConnectionState state; 41 | 42 | -(void)writeString:(NSString *)string completion:(void(^)(NSError *error))completion; 43 | 44 | @end 45 | -------------------------------------------------------------------------------- /Pods/AFNetworking/AFNetworking/AFNetworking.h: -------------------------------------------------------------------------------- 1 | // AFNetworking.h 2 | // 3 | // Copyright (c) 2013 AFNetworking (http://afnetworking.com/) 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy 6 | // of this software and associated documentation files (the "Software"), to deal 7 | // in the Software without restriction, including without limitation the rights 8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | // copies of the Software, and to permit persons to whom the Software is 10 | // furnished to do so, subject to the following conditions: 11 | // 12 | // The above copyright notice and this permission notice shall be included in 13 | // all copies or substantial portions of the Software. 14 | // 15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | // THE SOFTWARE. 22 | 23 | #import 24 | #import 25 | #import 26 | 27 | #ifndef _AFNETWORKING_ 28 | #define _AFNETWORKING_ 29 | 30 | #import "AFURLRequestSerialization.h" 31 | #import "AFURLResponseSerialization.h" 32 | #import "AFSecurityPolicy.h" 33 | 34 | #if !TARGET_OS_WATCH 35 | #import "AFNetworkReachabilityManager.h" 36 | #endif 37 | 38 | #import "AFURLSessionManager.h" 39 | #import "AFHTTPSessionManager.h" 40 | 41 | #endif /* _AFNETWORKING_ */ 42 | -------------------------------------------------------------------------------- /Pods/Local Podspecs/Spark-SDK.podspec.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Spark-SDK", 3 | "version": "0.6.0", 4 | "summary": "Particle iOS Cloud SDK for interacting with Particle powered devices (Core/Photon/Electron)", 5 | "description": "Particle (formerly Spark) iOS Cloud SDK Cocoapod library\nThe Particle iOS Cloud SDK enables iOS apps to interact with Particle-powered connected products via the Particle Cloud.\nLibrary will enable your app to easily manage active user sessions to the Particle cloud, query for device's type, info, read and write data to and from the Core, Photon and Electron devices (via exposed firmware variables and functions) as well as publish/subscribe device and cloud events.", 6 | "homepage": "https://github.com/spark/spark-sdk-ios", 7 | "screenshots": "http://i59.tinypic.com/mrthqc.jpg", 8 | "license": "Apache 2.0", 9 | "authors": { 10 | "Particle": "ido@particle.io" 11 | }, 12 | "source": { 13 | "git": "https://github.com/spark/Spark-SDK-ios.git", 14 | "tag": "0.6.0" 15 | }, 16 | "social_media_url": "https://twitter.com/particle", 17 | "platforms": { 18 | "ios": "8.0" 19 | }, 20 | "requires_arc": true, 21 | "public_header_files": "Pod/Classes/*.h", 22 | "source_files": "Pod/Classes/*.h", 23 | "subspecs": [ 24 | { 25 | "name": "Helpers", 26 | "source_files": "Pod/Classes/Helpers/*.{h,m}", 27 | "ios": { 28 | "frameworks": [ 29 | "SystemConfiguration", 30 | "Security" 31 | ] 32 | } 33 | }, 34 | { 35 | "name": "SDK", 36 | "source_files": "Pod/Classes/SDK/Spark*.{h,m}", 37 | "dependencies": { 38 | "AFNetworking": [ 39 | "~> 3.0" 40 | ], 41 | "Spark-SDK/Helpers": [ 42 | 43 | ] 44 | } 45 | } 46 | ] 47 | } 48 | -------------------------------------------------------------------------------- /SparkSetup.xcworkspace/xcshareddata/SparkSetup.xcscmblueprint: -------------------------------------------------------------------------------- 1 | { 2 | "DVTSourceControlWorkspaceBlueprintPrimaryRemoteRepositoryKey" : "4F6AF957846CE2D6AA716E4578638F181BC5B887", 3 | "DVTSourceControlWorkspaceBlueprintWorkingCopyRepositoryLocationsKey" : { 4 | 5 | }, 6 | "DVTSourceControlWorkspaceBlueprintWorkingCopyStatesKey" : { 7 | "4F6AF957846CE2D6AA716E4578638F181BC5B887" : 0, 8 | "50E2A12528FDBE3D8A2B4575487E8A6E0DEFCEB0" : 0 9 | }, 10 | "DVTSourceControlWorkspaceBlueprintIdentifierKey" : "143CB6D6-99C6-4856-ADB5-F65231FA0304", 11 | "DVTSourceControlWorkspaceBlueprintWorkingCopyPathsKey" : { 12 | "4F6AF957846CE2D6AA716E4578638F181BC5B887" : "spark-setup-ios\/", 13 | "50E2A12528FDBE3D8A2B4575487E8A6E0DEFCEB0" : "spark-sdk-ios\/" 14 | }, 15 | "DVTSourceControlWorkspaceBlueprintNameKey" : "SparkSetup", 16 | "DVTSourceControlWorkspaceBlueprintVersion" : 204, 17 | "DVTSourceControlWorkspaceBlueprintRelativePathToProjectKey" : "SparkSetup.xcworkspace", 18 | "DVTSourceControlWorkspaceBlueprintRemoteRepositoriesKey" : [ 19 | { 20 | "DVTSourceControlWorkspaceBlueprintRemoteRepositoryURLKey" : "https:\/\/github.com\/spark\/spark-setup-ios.git", 21 | "DVTSourceControlWorkspaceBlueprintRemoteRepositorySystemKey" : "com.apple.dt.Xcode.sourcecontrol.Git", 22 | "DVTSourceControlWorkspaceBlueprintRemoteRepositoryIdentifierKey" : "4F6AF957846CE2D6AA716E4578638F181BC5B887" 23 | }, 24 | { 25 | "DVTSourceControlWorkspaceBlueprintRemoteRepositoryURLKey" : "https:\/\/github.com\/spark\/spark-sdk-ios.git", 26 | "DVTSourceControlWorkspaceBlueprintRemoteRepositorySystemKey" : "com.apple.dt.Xcode.sourcecontrol.Git", 27 | "DVTSourceControlWorkspaceBlueprintRemoteRepositoryIdentifierKey" : "50E2A12528FDBE3D8A2B4575487E8A6E0DEFCEB0" 28 | } 29 | ] 30 | } -------------------------------------------------------------------------------- /Pods/AFNetworking/UIKit+AFNetworking/UIKit+AFNetworking.h: -------------------------------------------------------------------------------- 1 | // UIKit+AFNetworking.h 2 | // 3 | // Copyright (c) 2011–2016 Alamofire Software Foundation ( http://alamofire.org/ ) 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy 6 | // of this software and associated documentation files (the "Software"), to deal 7 | // in the Software without restriction, including without limitation the rights 8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | // copies of the Software, and to permit persons to whom the Software is 10 | // furnished to do so, subject to the following conditions: 11 | // 12 | // The above copyright notice and this permission notice shall be included in 13 | // all copies or substantial portions of the Software. 14 | // 15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | // THE SOFTWARE. 22 | 23 | #if TARGET_OS_IOS || TARGET_OS_TV 24 | #import 25 | 26 | #ifndef _UIKIT_AFNETWORKING_ 27 | #define _UIKIT_AFNETWORKING_ 28 | 29 | #if TARGET_OS_IOS 30 | #import "AFAutoPurgingImageCache.h" 31 | #import "AFImageDownloader.h" 32 | #import "AFNetworkActivityIndicatorManager.h" 33 | #import "UIRefreshControl+AFNetworking.h" 34 | #import "UIWebView+AFNetworking.h" 35 | #endif 36 | 37 | #import "UIActivityIndicatorView+AFNetworking.h" 38 | #import "UIButton+AFNetworking.h" 39 | #import "UIImageView+AFNetworking.h" 40 | #import "UIProgressView+AFNetworking.h" 41 | #endif /* _UIKIT_AFNETWORKING_ */ 42 | #endif 43 | -------------------------------------------------------------------------------- /SparkSetup.podspec: -------------------------------------------------------------------------------- 1 | Pod::Spec.new do |s| 2 | s.name = "SparkSetup" 3 | s.version = "0.7.2" 4 | s.summary = "Particle iOS Device Setup library for easy integration of setup process for Particle devices in your app" 5 | s.description = <<-DESC 6 | Particle (formerly Spark) Device Setup library for integrating setup process of Particle devices in your app 7 | This library will allow you to easily invoke a standalone setup wizard UI for setting up 8 | Particle devices (photon) from within your app. Setup UI look & feel can be easily customized with custom brand 9 | logos/colors/fonts/texts and instructional video. 10 | DEPRECATED 11 | DESC 12 | s.homepage = "https://github.com/spark/spark-setup-ios" 13 | s.screenshots = "http://i58.tinypic.com/15yhdeb.jpg" 14 | s.license = 'Apache 2.0' 15 | s.author = { "Particle" => "ido@particle.io" } 16 | s.source = { :git => "https://github.com/spark/spark-setup-ios.git", :tag => s.version.to_s } 17 | s.social_media_url = 'https://twitter.com/particle' 18 | 19 | s.platform = :ios, '8.0' 20 | s.requires_arc = true 21 | 22 | s.public_header_files = 'Classes/*.h' 23 | s.source_files = 'Classes/*.h' 24 | 25 | s.resource_bundle = {'SparkSetup' => 'Resources/**/*.{xcassets,storyboard}'} 26 | 27 | s.deprecated = true 28 | s.deprecated_in_favor_of = 'ParticleSetup' 29 | 30 | s.subspec 'Core' do |core| 31 | core.source_files = 'Classes/User/**/*.{h,m}', 'Classes/UI/**/*' 32 | core.dependency 'Spark-SDK' 33 | core.dependency '1PasswordExtension' 34 | core.dependency 'SparkSetup/Comm' 35 | core.ios.frameworks = 'UIKit' 36 | end 37 | 38 | s.subspec 'Comm' do |comm| 39 | comm.source_files = 'Classes/Comm/**/*' 40 | comm.ios.frameworks = 'SystemConfiguration', 'Security' 41 | end 42 | 43 | 44 | 45 | end 46 | -------------------------------------------------------------------------------- /Pods/AFNetworking/UIKit+AFNetworking/UIActivityIndicatorView+AFNetworking.h: -------------------------------------------------------------------------------- 1 | // UIActivityIndicatorView+AFNetworking.h 2 | // Copyright (c) 2011–2016 Alamofire Software Foundation ( http://alamofire.org/ ) 3 | // 4 | // Permission is hereby granted, free of charge, to any person obtaining a copy 5 | // of this software and associated documentation files (the "Software"), to deal 6 | // in the Software without restriction, including without limitation the rights 7 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | // copies of the Software, and to permit persons to whom the Software is 9 | // furnished to do so, subject to the following conditions: 10 | // 11 | // The above copyright notice and this permission notice shall be included in 12 | // all copies or substantial portions of the Software. 13 | // 14 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | // THE SOFTWARE. 21 | 22 | #import 23 | 24 | #import 25 | 26 | #if TARGET_OS_IOS || TARGET_OS_TV 27 | 28 | #import 29 | 30 | /** 31 | This category adds methods to the UIKit framework's `UIActivityIndicatorView` class. The methods in this category provide support for automatically starting and stopping animation depending on the loading state of a session task. 32 | */ 33 | @interface UIActivityIndicatorView (AFNetworking) 34 | 35 | ///---------------------------------- 36 | /// @name Animating for Session Tasks 37 | ///---------------------------------- 38 | 39 | /** 40 | Binds the animating state to the state of the specified task. 41 | 42 | @param task The task. If `nil`, automatic updating from any previously specified operation will be disabled. 43 | */ 44 | - (void)setAnimatingWithStateOfTask:(nullable NSURLSessionTask *)task; 45 | 46 | @end 47 | 48 | #endif 49 | -------------------------------------------------------------------------------- /ParticleDeviceSetupLibrary/AFNetworking.framework/Headers/UIActivityIndicatorView+AFNetworking.h: -------------------------------------------------------------------------------- 1 | // UIActivityIndicatorView+AFNetworking.h 2 | // Copyright (c) 2011–2016 Alamofire Software Foundation ( http://alamofire.org/ ) 3 | // 4 | // Permission is hereby granted, free of charge, to any person obtaining a copy 5 | // of this software and associated documentation files (the "Software"), to deal 6 | // in the Software without restriction, including without limitation the rights 7 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | // copies of the Software, and to permit persons to whom the Software is 9 | // furnished to do so, subject to the following conditions: 10 | // 11 | // The above copyright notice and this permission notice shall be included in 12 | // all copies or substantial portions of the Software. 13 | // 14 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | // THE SOFTWARE. 21 | 22 | #import 23 | 24 | #import 25 | 26 | #if TARGET_OS_IOS || TARGET_OS_TV 27 | 28 | #import 29 | 30 | /** 31 | This category adds methods to the UIKit framework's `UIActivityIndicatorView` class. The methods in this category provide support for automatically starting and stopping animation depending on the loading state of a session task. 32 | */ 33 | @interface UIActivityIndicatorView (AFNetworking) 34 | 35 | ///---------------------------------- 36 | /// @name Animating for Session Tasks 37 | ///---------------------------------- 38 | 39 | /** 40 | Binds the animating state to the state of the specified task. 41 | 42 | @param task The task. If `nil`, automatic updating from any previously specified operation will be disabled. 43 | */ 44 | - (void)setAnimatingWithStateOfTask:(nullable NSURLSessionTask *)task; 45 | 46 | @end 47 | 48 | #endif 49 | -------------------------------------------------------------------------------- /Pods/AFNetworking/UIKit+AFNetworking/UIRefreshControl+AFNetworking.h: -------------------------------------------------------------------------------- 1 | // UIRefreshControl+AFNetworking.m 2 | // 3 | // Copyright (c) 2011–2016 Alamofire Software Foundation ( http://alamofire.org/ ) 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy 6 | // of this software and associated documentation files (the "Software"), to deal 7 | // in the Software without restriction, including without limitation the rights 8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | // copies of the Software, and to permit persons to whom the Software is 10 | // furnished to do so, subject to the following conditions: 11 | // 12 | // The above copyright notice and this permission notice shall be included in 13 | // all copies or substantial portions of the Software. 14 | // 15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | // THE SOFTWARE. 22 | 23 | #import 24 | 25 | #import 26 | 27 | #if TARGET_OS_IOS 28 | 29 | #import 30 | 31 | NS_ASSUME_NONNULL_BEGIN 32 | 33 | /** 34 | This category adds methods to the UIKit framework's `UIRefreshControl` class. The methods in this category provide support for automatically beginning and ending refreshing depending on the loading state of a session task. 35 | */ 36 | @interface UIRefreshControl (AFNetworking) 37 | 38 | ///----------------------------------- 39 | /// @name Refreshing for Session Tasks 40 | ///----------------------------------- 41 | 42 | /** 43 | Binds the refreshing state to the state of the specified task. 44 | 45 | @param task The task. If `nil`, automatic updating from any previously specified operation will be disabled. 46 | */ 47 | - (void)setRefreshingWithStateOfTask:(NSURLSessionTask *)task; 48 | 49 | @end 50 | 51 | NS_ASSUME_NONNULL_END 52 | 53 | #endif 54 | -------------------------------------------------------------------------------- /ParticleDeviceSetupLibrary/AFNetworking.framework/Headers/UIRefreshControl+AFNetworking.h: -------------------------------------------------------------------------------- 1 | // UIRefreshControl+AFNetworking.m 2 | // 3 | // Copyright (c) 2011–2016 Alamofire Software Foundation ( http://alamofire.org/ ) 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy 6 | // of this software and associated documentation files (the "Software"), to deal 7 | // in the Software without restriction, including without limitation the rights 8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | // copies of the Software, and to permit persons to whom the Software is 10 | // furnished to do so, subject to the following conditions: 11 | // 12 | // The above copyright notice and this permission notice shall be included in 13 | // all copies or substantial portions of the Software. 14 | // 15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | // THE SOFTWARE. 22 | 23 | #import 24 | 25 | #import 26 | 27 | #if TARGET_OS_IOS 28 | 29 | #import 30 | 31 | NS_ASSUME_NONNULL_BEGIN 32 | 33 | /** 34 | This category adds methods to the UIKit framework's `UIRefreshControl` class. The methods in this category provide support for automatically beginning and ending refreshing depending on the loading state of a session task. 35 | */ 36 | @interface UIRefreshControl (AFNetworking) 37 | 38 | ///----------------------------------- 39 | /// @name Refreshing for Session Tasks 40 | ///----------------------------------- 41 | 42 | /** 43 | Binds the refreshing state to the state of the specified task. 44 | 45 | @param task The task. If `nil`, automatic updating from any previously specified operation will be disabled. 46 | */ 47 | - (void)setRefreshingWithStateOfTask:(NSURLSessionTask *)task; 48 | 49 | @end 50 | 51 | NS_ASSUME_NONNULL_END 52 | 53 | #endif 54 | -------------------------------------------------------------------------------- /Resources/setup.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "20x20", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "20x20", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "size" : "29x29", 15 | "idiom" : "iphone", 16 | "filename" : "AppIcon29x29@2x.png", 17 | "scale" : "2x" 18 | }, 19 | { 20 | "idiom" : "iphone", 21 | "size" : "29x29", 22 | "scale" : "3x" 23 | }, 24 | { 25 | "size" : "40x40", 26 | "idiom" : "iphone", 27 | "filename" : "AppIcon40x40@2x.png", 28 | "scale" : "2x" 29 | }, 30 | { 31 | "idiom" : "iphone", 32 | "size" : "40x40", 33 | "scale" : "3x" 34 | }, 35 | { 36 | "size" : "60x60", 37 | "idiom" : "iphone", 38 | "filename" : "AppIcon60x60@2x.png", 39 | "scale" : "2x" 40 | }, 41 | { 42 | "idiom" : "iphone", 43 | "size" : "60x60", 44 | "scale" : "3x" 45 | }, 46 | { 47 | "idiom" : "ipad", 48 | "size" : "20x20", 49 | "scale" : "1x" 50 | }, 51 | { 52 | "idiom" : "ipad", 53 | "size" : "20x20", 54 | "scale" : "2x" 55 | }, 56 | { 57 | "size" : "29x29", 58 | "idiom" : "ipad", 59 | "filename" : "AppIcon29x29.png", 60 | "scale" : "1x" 61 | }, 62 | { 63 | "size" : "29x29", 64 | "idiom" : "ipad", 65 | "filename" : "AppIcon29x29@2x-1.png", 66 | "scale" : "2x" 67 | }, 68 | { 69 | "size" : "40x40", 70 | "idiom" : "ipad", 71 | "filename" : "AppIcon40x40.png", 72 | "scale" : "1x" 73 | }, 74 | { 75 | "size" : "40x40", 76 | "idiom" : "ipad", 77 | "filename" : "AppIcon40x40@2x-1.png", 78 | "scale" : "2x" 79 | }, 80 | { 81 | "size" : "76x76", 82 | "idiom" : "ipad", 83 | "filename" : "AppIcon76x76-1.png", 84 | "scale" : "1x" 85 | }, 86 | { 87 | "size" : "76x76", 88 | "idiom" : "ipad", 89 | "filename" : "AppIcon76x76@2x.png", 90 | "scale" : "2x" 91 | }, 92 | { 93 | "idiom" : "ipad", 94 | "size" : "83.5x83.5", 95 | "scale" : "2x" 96 | } 97 | ], 98 | "info" : { 99 | "version" : 1, 100 | "author" : "xcode" 101 | } 102 | } -------------------------------------------------------------------------------- /Classes/UI/UI Elements/SparkSetupUISpinner.m: -------------------------------------------------------------------------------- 1 | // 2 | // SparkSetupUISpinner.m 3 | // teacup-ios-app 4 | // 5 | // Created by Ido on 1/27/15. 6 | // Copyright (c) 2015 spark. All rights reserved. 7 | // 8 | 9 | #import "SparkSetupUISpinner.h" 10 | #import "SparkSetupCustomization.h" 11 | #import "SparkSetupMainController.h" 12 | 13 | @implementation SparkSetupUISpinner 14 | 15 | /* 16 | // Only override drawRect: if you perform custom drawing. 17 | // An empty implementation adversely affects performance during animation. 18 | - (void)drawRect:(CGRect)rect { 19 | // Drawing code 20 | } 21 | */ 22 | -(void)setType:(NSString *)type 23 | { 24 | if ((type) && ([type isEqualToString:@"foreground"])) 25 | { 26 | // self.image = [UIImage imageNamed:@"spinner_big" inBundle:[SparkSetupMainController getResourcesBundle] compatibleWithTraitCollection:nil]; // TODO: make iOS7 compatible 27 | self.image = [SparkSetupMainController loadImageFromResourceBundle:@"spinner_big"]; 28 | self.image = [self.image imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate]; 29 | self.tintColor = [SparkSetupCustomization sharedInstance].elementBackgroundColor; 30 | } 31 | else 32 | { 33 | // self.image = [UIImage imageNamed:@"spinner" inBundle:[SparkSetupMainController getResourcesBundle] compatibleWithTraitCollection:nil]; // TODO: make iOS7 compatible 34 | self.image = [SparkSetupMainController loadImageFromResourceBundle:@"spinner"]; 35 | // NSLog(@"spinner: %@",self.image); 36 | } 37 | 38 | [self setNeedsDisplay]; 39 | [self layoutIfNeeded]; 40 | } 41 | 42 | 43 | -(void)startAnimating 44 | { 45 | self.hidden = NO; 46 | CABasicAnimation *rotation; 47 | rotation = [CABasicAnimation animationWithKeyPath:@"transform.rotation"]; 48 | rotation.fromValue = [NSNumber numberWithFloat:0]; 49 | rotation.toValue = [NSNumber numberWithFloat:(2*M_PI)]; 50 | rotation.duration = 1.11; // Speed 51 | rotation.repeatCount = HUGE_VALF; // Repeat forever. Can be a finite number. 52 | [self.layer addAnimation:rotation forKey:@"Spin"]; 53 | } 54 | 55 | 56 | 57 | 58 | -(void)stopAnimating 59 | { 60 | self.hidden = YES; 61 | [self.layer removeAllAnimations]; 62 | } 63 | 64 | 65 | -(instancetype)initWithType:(NSString *)type 66 | { 67 | if (self = [super init]) 68 | { 69 | [self setType:type]; 70 | 71 | return self; 72 | } 73 | return nil; 74 | } 75 | 76 | 77 | @end 78 | -------------------------------------------------------------------------------- /Pods/AFNetworking/UIKit+AFNetworking/UIProgressView+AFNetworking.h: -------------------------------------------------------------------------------- 1 | // UIProgressView+AFNetworking.h 2 | // Copyright (c) 2011–2016 Alamofire Software Foundation ( http://alamofire.org/ ) 3 | // 4 | // Permission is hereby granted, free of charge, to any person obtaining a copy 5 | // of this software and associated documentation files (the "Software"), to deal 6 | // in the Software without restriction, including without limitation the rights 7 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | // copies of the Software, and to permit persons to whom the Software is 9 | // furnished to do so, subject to the following conditions: 10 | // 11 | // The above copyright notice and this permission notice shall be included in 12 | // all copies or substantial portions of the Software. 13 | // 14 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | // THE SOFTWARE. 21 | 22 | #import 23 | 24 | #import 25 | 26 | #if TARGET_OS_IOS || TARGET_OS_TV 27 | 28 | #import 29 | 30 | NS_ASSUME_NONNULL_BEGIN 31 | 32 | 33 | /** 34 | This category adds methods to the UIKit framework's `UIProgressView` class. The methods in this category provide support for binding the progress to the upload and download progress of a session task. 35 | */ 36 | @interface UIProgressView (AFNetworking) 37 | 38 | ///------------------------------------ 39 | /// @name Setting Session Task Progress 40 | ///------------------------------------ 41 | 42 | /** 43 | Binds the progress to the upload progress of the specified session task. 44 | 45 | @param task The session task. 46 | @param animated `YES` if the change should be animated, `NO` if the change should happen immediately. 47 | */ 48 | - (void)setProgressWithUploadProgressOfTask:(NSURLSessionUploadTask *)task 49 | animated:(BOOL)animated; 50 | 51 | /** 52 | Binds the progress to the download progress of the specified session task. 53 | 54 | @param task The session task. 55 | @param animated `YES` if the change should be animated, `NO` if the change should happen immediately. 56 | */ 57 | - (void)setProgressWithDownloadProgressOfTask:(NSURLSessionDownloadTask *)task 58 | animated:(BOOL)animated; 59 | 60 | @end 61 | 62 | NS_ASSUME_NONNULL_END 63 | 64 | #endif 65 | -------------------------------------------------------------------------------- /ParticleDeviceSetupLibrary/AFNetworking.framework/Headers/UIProgressView+AFNetworking.h: -------------------------------------------------------------------------------- 1 | // UIProgressView+AFNetworking.h 2 | // Copyright (c) 2011–2016 Alamofire Software Foundation ( http://alamofire.org/ ) 3 | // 4 | // Permission is hereby granted, free of charge, to any person obtaining a copy 5 | // of this software and associated documentation files (the "Software"), to deal 6 | // in the Software without restriction, including without limitation the rights 7 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | // copies of the Software, and to permit persons to whom the Software is 9 | // furnished to do so, subject to the following conditions: 10 | // 11 | // The above copyright notice and this permission notice shall be included in 12 | // all copies or substantial portions of the Software. 13 | // 14 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | // THE SOFTWARE. 21 | 22 | #import 23 | 24 | #import 25 | 26 | #if TARGET_OS_IOS || TARGET_OS_TV 27 | 28 | #import 29 | 30 | NS_ASSUME_NONNULL_BEGIN 31 | 32 | 33 | /** 34 | This category adds methods to the UIKit framework's `UIProgressView` class. The methods in this category provide support for binding the progress to the upload and download progress of a session task. 35 | */ 36 | @interface UIProgressView (AFNetworking) 37 | 38 | ///------------------------------------ 39 | /// @name Setting Session Task Progress 40 | ///------------------------------------ 41 | 42 | /** 43 | Binds the progress to the upload progress of the specified session task. 44 | 45 | @param task The session task. 46 | @param animated `YES` if the change should be animated, `NO` if the change should happen immediately. 47 | */ 48 | - (void)setProgressWithUploadProgressOfTask:(NSURLSessionUploadTask *)task 49 | animated:(BOOL)animated; 50 | 51 | /** 52 | Binds the progress to the download progress of the specified session task. 53 | 54 | @param task The session task. 55 | @param animated `YES` if the change should be animated, `NO` if the change should happen immediately. 56 | */ 57 | - (void)setProgressWithDownloadProgressOfTask:(NSURLSessionDownloadTask *)task 58 | animated:(BOOL)animated; 59 | 60 | @end 61 | 62 | NS_ASSUME_NONNULL_END 63 | 64 | #endif 65 | -------------------------------------------------------------------------------- /Pods/Pods.xcodeproj/xcshareddata/xcschemes/Spark-SDK.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 34 | 35 | 45 | 46 | 52 | 53 | 54 | 55 | 56 | 57 | 63 | 64 | 66 | 67 | 70 | 71 | 72 | -------------------------------------------------------------------------------- /Classes/Comm/SparkSetupCommManager.h: -------------------------------------------------------------------------------- 1 | // 2 | // SparkSetupManager.h 3 | // mobile-sdk-ios 4 | // 5 | // Created by Ido Kleinman on 11/20/14. 6 | // Copyright (c) 2014-2015 Spark. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "SparkSetupConnection.h" 11 | 12 | 13 | #define SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] != NSOrderedAscending) 14 | 15 | extern NSString *const kSparkSetupConnectionEndpointAddress; 16 | extern int const kSparkSetupConnectionEndpointPort; 17 | 18 | typedef NS_ENUM(NSInteger, SparkSetupWifiSecurityType) { 19 | SparkSetupWifiSecurityTypeOpen = 0, /**< Unsecured */ 20 | SparkSetupWifiSecurityTypeWEP_PSK = 1, /**< WEP Security with open authentication */ 21 | SparkSetupWifiSecurityTypeWEP_SHARED = 0x8001, /**< WEP Security with shared authentication */ 22 | SparkSetupWifiSecurityTypeWPA_TKIP_PSK = 0x00200002, /**< WPA Security with TKIP */ 23 | SparkSetupWifiSecurityTypeWPA_AES_PSK = 0x00200004, /**< WPA Security with AES */ 24 | SparkSetupWifiSecurityTypeWPA2_AES_PSK = 0x00400004, /**< WPA2 Security with AES */ 25 | SparkSetupWifiSecurityTypeWPA2_TKIP_PSK = 0x00400002, /**< WPA2 Security with TKIP */ 26 | SparkSetupWifiSecurityTypeWPA2_MIXED_PSK = 0x00400006, /**< WPA2 Security with AES & TKIP */ 27 | }; 28 | 29 | 30 | @interface SparkSetupCommManager : NSObject 31 | 32 | /** 33 | * Check if currently connected wifi is the Soft AP device wi-fi network 34 | * 35 | * @param networkPrefix Device Soft AP SSID prefix 36 | * 37 | * @return YES if connected, NO otherwise 38 | */ 39 | +(BOOL)checkSparkDeviceWifiConnection:(NSString *)networkPrefix; 40 | 41 | /** 42 | * Use to initialize comm manager 43 | * 44 | * @param networkPrefix Device Soft AP SSID prefix 45 | * 46 | * @return Initialized comm manager or bil if error 47 | */ 48 | -(instancetype)initWithNetworkPrefix:(NSString *)networkPrefix; 49 | 50 | 51 | -(void)version:(void(^)(id version, NSError *error))completion; 52 | -(void)deviceID:(void(^)(id responseDict, NSError *error))completion; 53 | -(void)scanAP:(void(^)(id scanResponse, NSError *error))completion; 54 | -(void)configureAP:(NSString *)ssid passcode:(NSString *)passcode security:(NSNumber *)securityType channel:(NSNumber *)channel completion:(void(^)(id responseCode, NSError *error))completion; 55 | -(void)connectAP:(void(^)(id responseCode, NSError *error))completion; 56 | -(void)publicKey:(void(^)(id responseCode, NSError *error))completion; // retrieve the device public key and store it in keychain 57 | -(void)setClaimCode:(NSString *)claimCode completion:(void(^)(id responseCode, NSError *error))completion; 58 | @end 59 | -------------------------------------------------------------------------------- /ParticleDeviceSetupLibrary/AFNetworking.framework/Headers/AFNetworking.h: -------------------------------------------------------------------------------- 1 | // AFNetworking.h 2 | // Copyright (c) 2011–2016 Alamofire Software Foundation ( http://alamofire.org/ ) 3 | // 4 | // Permission is hereby granted, free of charge, to any person obtaining a copy 5 | // of this software and associated documentation files (the "Software"), to deal 6 | // in the Software without restriction, including without limitation the rights 7 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | // copies of the Software, and to permit persons to whom the Software is 9 | // furnished to do so, subject to the following conditions: 10 | // 11 | // The above copyright notice and this permission notice shall be included in 12 | // all copies or substantial portions of the Software. 13 | // 14 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | // THE SOFTWARE. 21 | 22 | #import 23 | 24 | //! Project version number for AFNetworking. 25 | FOUNDATION_EXPORT double AFNetworkingVersionNumber; 26 | 27 | //! Project version string for AFNetworking. 28 | FOUNDATION_EXPORT const unsigned char AFNetworkingVersionString[]; 29 | 30 | // In this header, you should import all the public headers of your framework using statements like #import 31 | 32 | #import 33 | #import 34 | 35 | #ifndef _AFNETWORKING_ 36 | #define _AFNETWORKING_ 37 | 38 | #import 39 | #import 40 | #import 41 | 42 | #if !TARGET_OS_WATCH 43 | #import 44 | #endif 45 | 46 | #import 47 | #import 48 | 49 | #if TARGET_OS_IOS || TARGET_OS_TV 50 | #import 51 | #import 52 | #import 53 | #import 54 | #import 55 | #import 56 | #import 57 | #endif 58 | 59 | #if TARGET_OS_IOS 60 | #import 61 | #import 62 | #import 63 | #endif 64 | 65 | 66 | #endif /* _AFNETWORKING_ */ 67 | -------------------------------------------------------------------------------- /Pods/Spark-SDK/Pod/Classes/SDK/SparkSession.h: -------------------------------------------------------------------------------- 1 | // 2 | // SparkSession.h 3 | // Particle iOS Cloud SDK 4 | // 5 | // Created by Ido Kleinman 6 | // Copyright 2015 Particle 7 | // 8 | // Licensed under the Apache License, Version 2.0 (the "License"); 9 | // you may not use this file except in compliance with the License. 10 | // You may obtain a copy of the License at 11 | // 12 | // http://www.apache.org/licenses/LICENSE-2.0 13 | // 14 | // Unless required by applicable law or agreed to in writing, software 15 | // distributed under the License is distributed on an "AS IS" BASIS, 16 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | // See the License for the specific language governing permissions and 18 | // limitations under the License. 19 | 20 | #import 21 | 22 | NS_ASSUME_NONNULL_BEGIN 23 | 24 | @class SparkSession; 25 | 26 | @protocol SparkSessionDelegate 27 | 28 | @required 29 | -(void)SparkSession:(SparkSession *)session didExpireAt:(NSDate *)date; 30 | 31 | @end 32 | 33 | @interface SparkSession : NSObject 34 | 35 | /** 36 | * Access token string to be used when calling cloud API 37 | */ 38 | @property (nonatomic, strong, nullable, readonly) NSString *accessToken; 39 | 40 | /** 41 | * Access token string to be used when calling cloud API 42 | */ 43 | @property (nonatomic, strong, nullable, readonly) NSString *username; 44 | 45 | /** 46 | * Refresh token string to be used when refreshing an expired token 47 | */ 48 | @property (nonatomic, strong, nullable, readonly) NSString *refreshToken; 49 | 50 | /** 51 | * Delegate to receive didExpireAt method call whenever a token is detected as expired 52 | */ 53 | @property (nonatomic, nullable, weak) id delegate; 54 | 55 | /** 56 | * Initialze SparkSession class with new session 57 | * 58 | * @param loginResponseDict response object from Spark cloud login deserialized as NSDictionary 59 | * 60 | * @return New SparkSession instance 61 | */ 62 | -(nullable instancetype)initWithNewSession:(NSDictionary *)loginResponseDict; 63 | 64 | // For two Legged Auth you can init SparkSession with access token only/with exact expiry date/with refresh token: 65 | -(nullable instancetype)initWithToken:(NSString *)token; 66 | -(nullable instancetype)initWithToken:(NSString *)token andExpiryDate:(NSDate *)expiryDate; 67 | -(nullable instancetype)initWithToken:(NSString *)token withExpiryDate:(NSDate *)expiryDate withRefreshToken:(NSString *)refreshToken; 68 | 69 | /** 70 | * Initialize SparkSession from existing session stored in keychain 71 | * 72 | * @return A SparkSession instance in case session is stored in keychain and token has not expired, nil if not 73 | */ 74 | -(nullable instancetype)initWithSavedSession; 75 | 76 | -(instancetype)init __attribute__((unavailable("Must use initWithNewSession: / initWithSavedSession: or one of the initWithToken initializers"))); 77 | 78 | /** 79 | * Remove access token session data from keychain 80 | */ 81 | -(void)removeSession; 82 | 83 | @end 84 | 85 | NS_ASSUME_NONNULL_END 86 | -------------------------------------------------------------------------------- /Classes/UI/UI Elements/SparkSetupUILabel.m: -------------------------------------------------------------------------------- 1 | // 2 | // SparkSetupUILabel.m 3 | // teacup-ios-app 4 | // 5 | // Created by Ido on 1/16/15. 6 | // Copyright (c) 2015 spark. All rights reserved. 7 | // 8 | 9 | #import "SparkSetupUILabel.h" 10 | #import "SparkSetupCustomization.h" 11 | @implementation SparkSetupUILabel 12 | 13 | /* 14 | // Only override drawRect: if you perform custom drawing. 15 | // An empty implementation adversely affects performance during animation. 16 | - (void)drawRect:(CGRect)rect { 17 | // Drawing code 18 | } 19 | */ 20 | 21 | -(void)replacePredefinedText 22 | { 23 | self.text = [self.text stringByReplacingOccurrencesOfString:@"{device}" withString:[SparkSetupCustomization sharedInstance].deviceName]; 24 | self.text = [self.text stringByReplacingOccurrencesOfString:@"{brand}" withString:[SparkSetupCustomization sharedInstance].brandName]; 25 | self.text = [self.text stringByReplacingOccurrencesOfString:@"{color}" withString:[SparkSetupCustomization sharedInstance].listenModeLEDColorName]; 26 | self.text = [self.text stringByReplacingOccurrencesOfString:@"{mode button}" withString:[SparkSetupCustomization sharedInstance].modeButtonName]; 27 | self.text = [self.text stringByReplacingOccurrencesOfString:@"{network prefix}" withString:[SparkSetupCustomization sharedInstance].networkNamePrefix]; 28 | self.text = [self.text stringByReplacingOccurrencesOfString:@"{product}" withString:[SparkSetupCustomization sharedInstance].productName]; 29 | 30 | // self.text = [self.text stringByReplacingOccurrencesOfString:@"{app name}" withString:[SparkSetupCustomization sharedInstance].appName]; 31 | } 32 | 33 | -(id)initWithCoder:(NSCoder *)aDecoder 34 | { 35 | if (self = [super initWithCoder:aDecoder]) 36 | { 37 | // [self replacePredefinedText]; 38 | [self setType:self.type]; 39 | return self; 40 | } 41 | return nil; 42 | 43 | } 44 | 45 | -(void)setType:(NSString *)type 46 | { 47 | if ((type) && ([type isEqualToString:@"bold"])) 48 | { 49 | self.font = [UIFont fontWithName:[SparkSetupCustomization sharedInstance].boldTextFontName size:self.font.pointSize+[SparkSetupCustomization sharedInstance].fontSizeOffset]; 50 | self.textColor = [SparkSetupCustomization sharedInstance].normalTextColor; 51 | } 52 | else if ((type) && ([type isEqualToString:@"header"])) 53 | { 54 | self.font = [UIFont fontWithName:[SparkSetupCustomization sharedInstance].headerTextFontName size:self.font.pointSize+[SparkSetupCustomization sharedInstance].fontSizeOffset]; 55 | self.textColor = [SparkSetupCustomization sharedInstance].normalTextColor; 56 | } 57 | else 58 | { 59 | self.font = [UIFont fontWithName:[SparkSetupCustomization sharedInstance].normalTextFontName size:self.font.pointSize+[SparkSetupCustomization sharedInstance].fontSizeOffset]; 60 | self.textColor = [SparkSetupCustomization sharedInstance].normalTextColor; 61 | 62 | } 63 | [self replacePredefinedText]; 64 | 65 | [self setNeedsDisplay]; 66 | [self layoutIfNeeded]; 67 | 68 | } 69 | 70 | @end 71 | -------------------------------------------------------------------------------- /Pods/Spark-SDK/Pod/Classes/Helpers/KeychainItemWrapper.h: -------------------------------------------------------------------------------- 1 | /* 2 | File: KeychainItemWrapper.h 3 | Abstract: 4 | Objective-C wrapper for accessing a single keychain item. 5 | 6 | Version: 1.2 - ARCified 7 | 8 | Disclaimer: IMPORTANT: This Apple software is supplied to you by Apple 9 | Inc. ("Apple") in consideration of your agreement to the following 10 | terms, and your use, installation, modification or redistribution of 11 | this Apple software constitutes acceptance of these terms. If you do 12 | not agree with these terms, please do not use, install, modify or 13 | redistribute this Apple software. 14 | 15 | In consideration of your agreement to abide by the following terms, and 16 | subject to these terms, Apple grants you a personal, non-exclusive 17 | license, under Apple's copyrights in this original Apple software (the 18 | "Apple Software"), to use, reproduce, modify and redistribute the Apple 19 | Software, with or without modifications, in source and/or binary forms; 20 | provided that if you redistribute the Apple Software in its entirety and 21 | without modifications, you must retain this notice and the following 22 | text and disclaimers in all such redistributions of the Apple Software. 23 | Neither the name, trademarks, service marks or logos of Apple Inc. may 24 | be used to endorse or promote products derived from the Apple Software 25 | without specific prior written permission from Apple. Except as 26 | expressly stated in this notice, no other rights or licenses, express or 27 | implied, are granted by Apple herein, including but not limited to any 28 | patent rights that may be infringed by your derivative works or by other 29 | works in which the Apple Software may be incorporated. 30 | 31 | The Apple Software is provided by Apple on an "AS IS" basis. APPLE 32 | MAKES NO WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION 33 | THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS 34 | FOR A PARTICULAR PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND 35 | OPERATION ALONE OR IN COMBINATION WITH YOUR PRODUCTS. 36 | 37 | IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL 38 | OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 39 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 40 | INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, 41 | MODIFICATION AND/OR DISTRIBUTION OF THE APPLE SOFTWARE, HOWEVER CAUSED 42 | AND WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING NEGLIGENCE), 43 | STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN ADVISED OF THE 44 | POSSIBILITY OF SUCH DAMAGE. 45 | 46 | Copyright (C) 2010 Apple Inc. All Rights Reserved. 47 | 48 | */ 49 | 50 | #import 51 | 52 | /* 53 | The KeychainItemWrapper class is an abstraction layer for the iPhone Keychain communication. It is merely a 54 | simple wrapper to provide a distinct barrier between all the idiosyncracies involved with the Keychain 55 | CF/NS container objects. 56 | */ 57 | @interface KeychainItemWrapper : NSObject 58 | 59 | // Designated initializer. 60 | - (id)initWithIdentifier: (NSString *)identifier accessGroup:(NSString *)accessGroup; 61 | - (void)setObject:(id)inObject forKey:(id)key; 62 | - (id)objectForKey:(id)key; 63 | 64 | // Initializes and resets the default generic keychain item data. 65 | - (void)resetKeychainItem; 66 | 67 | @end -------------------------------------------------------------------------------- /ParticleDeviceSetupLibrary/ParticleDeviceSetupLibrary.xcodeproj/xcshareddata/xcschemes/ParticleDeviceSetupLibrary.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 34 | 35 | 45 | 46 | 52 | 53 | 54 | 55 | 56 | 57 | 63 | 64 | 70 | 71 | 72 | 73 | 75 | 76 | 79 | 80 | 81 | -------------------------------------------------------------------------------- /Classes/UI/SparkSetupWebViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // SparkSetupWebViewController.m 3 | // mobile-sdk-ios 4 | // 5 | // Created by Ido Kleinman on 12/12/14. 6 | // Copyright (c) 2014-2015 Spark. All rights reserved. 7 | // 8 | 9 | #import "SparkSetupWebViewController.h" 10 | #import "SparkSetupCustomization.h" 11 | #import 12 | #import "SparkSetupUIElements.h" 13 | #ifdef ANALYTICS 14 | #import 15 | #endif 16 | 17 | //#import "UIViewController+SparkSetupMainController.h" 18 | 19 | @interface SparkSetupWebViewController () 20 | @property (weak, nonatomic) IBOutlet UIWebView *webView; 21 | @property (weak, nonatomic) IBOutlet SparkSetupUISpinner *spinner; 22 | 23 | @end 24 | 25 | @implementation SparkSetupWebViewController 26 | 27 | 28 | 29 | - (UIStatusBarStyle)preferredStatusBarStyle 30 | { 31 | return ([SparkSetupCustomization sharedInstance].lightStatusAndNavBar) ? UIStatusBarStyleLightContent : UIStatusBarStyleDefault; 32 | } 33 | 34 | - (void)viewDidLoad { 35 | [super viewDidLoad]; 36 | 37 | 38 | if (self.link) 39 | { 40 | [self.webView loadRequest:[NSURLRequest requestWithURL:self.link cachePolicy:NSURLRequestReturnCacheDataElseLoad timeoutInterval:10.0f]]; 41 | } 42 | else 43 | { 44 | if (self.htmlFilename) 45 | { 46 | NSString *path = [[NSBundle mainBundle] pathForResource:self.htmlFilename ofType:@"html" inDirectory:self.htmlFileDirectory]; 47 | NSURL *baseURL = [NSURL fileURLWithPath:path]; 48 | NSString* htmlString = [NSString stringWithContentsOfFile:path encoding:NSUTF8StringEncoding error:nil]; 49 | [self.webView loadHTMLString:htmlString baseURL:baseURL]; 50 | } 51 | } 52 | 53 | 54 | self.webView.scalesPageToFit = YES; 55 | self.navigationController.navigationBarHidden = NO; 56 | self.webView.delegate = self; 57 | 58 | } 59 | 60 | - (void)didReceiveMemoryWarning { 61 | [super didReceiveMemoryWarning]; 62 | // Dispose of any resources that can be recreated. 63 | } 64 | 65 | - (IBAction)closeButtonTouched:(id)sender 66 | { 67 | [self dismissViewControllerAnimated:YES completion:nil]; 68 | } 69 | 70 | 71 | 72 | -(void)webView:(UIWebView *)webView didFailLoadWithError:(NSError *)error 73 | { 74 | 75 | [self.spinner stopAnimating]; 76 | // TODO: show a nice error static HTML 77 | } 78 | 79 | -(void)webViewDidStartLoad:(UIWebView *)webView 80 | { 81 | [self.spinner startAnimating]; 82 | } 83 | 84 | -(void)webViewDidFinishLoad:(UIWebView *)webView 85 | { 86 | [self.spinner stopAnimating]; 87 | 88 | CGSize contentSize = self.webView.scrollView.contentSize; 89 | CGSize viewSize = self.view.bounds.size; 90 | 91 | float rw = viewSize.width / contentSize.width; 92 | 93 | self.webView.scrollView.minimumZoomScale = rw; 94 | self.webView.scrollView.maximumZoomScale = rw; 95 | self.webView.scrollView.zoomScale = rw; 96 | 97 | 98 | // experimenting 99 | // NSString *injectSrc = @"var i = document.createElement('div'); i.innerHTML = '%@';document.documentElement.appendChild(i);"; 100 | // NSString *runToInject = [NSString stringWithFormat:injectSrc, @""]; 101 | // [self.webView stringByEvaluatingJavascriptFromString:runToInject]; 102 | 103 | 104 | } 105 | 106 | -(void)viewWillAppear:(BOOL)animated 107 | { 108 | #ifdef ANALYTICS 109 | [[SEGAnalytics sharedAnalytics] track:@"Device Setup: Webview Screen"]; 110 | #endif 111 | } 112 | 113 | 114 | @end 115 | -------------------------------------------------------------------------------- /Pods/Spark-SDK/Pod/Classes/Helpers/EventSource.h: -------------------------------------------------------------------------------- 1 | // 2 | // EventSource 3 | // Server-Sent Events for iOS and Mac 4 | // 5 | // Created by Neil on 25/07/2013. 6 | // Copyright (c) 2013 Neil Cowburn. MIT license. 7 | // Modified by Ido Kleinman, Particle inc. 2015 8 | // 9 | // Original codebase: 10 | // https://github.com/neilco/EventSource 11 | 12 | #import 13 | 14 | typedef enum { 15 | kEventStateConnecting = 0, 16 | kEventStateOpen = 1, 17 | kEventStateClosed = 2, 18 | } EventState; 19 | 20 | // --------------------------------------------------------------------------------------------------------------------- 21 | 22 | /// Describes an Event received from an EventSource 23 | @interface Event : NSObject 24 | 25 | /// The name of the Event 26 | @property (nonatomic, strong) NSString *name; 27 | /// The data received from the EventSource 28 | @property (nonatomic, strong) NSData *data; 29 | 30 | /// The current state of the connection to the EventSource 31 | @property (nonatomic, assign) EventState readyState; 32 | /// Provides details of any errors with the connection to the EventSource 33 | @property (nonatomic, strong) NSError *error; // unused 34 | 35 | @end 36 | 37 | // --------------------------------------------------------------------------------------------------------------------- 38 | 39 | typedef void (^EventSourceEventHandler)(Event *event); 40 | 41 | // --------------------------------------------------------------------------------------------------------------------- 42 | 43 | /// Connect to and receive Server-Sent Events (SSEs). 44 | @interface EventSource : NSObject 45 | 46 | /// Returns a new instance of EventSource with the specified URL. 47 | /// 48 | /// @param URL The URL of the EventSource. 49 | /// @param timeoutInterval The request timeout interval in seconds. See NSURLRequest for more details. Default: 5 minutes. 50 | + (instancetype)eventSourceWithURL:(NSURL *)URL timeoutInterval:(NSTimeInterval)timeoutInterval queue:(dispatch_queue_t)queue; 51 | 52 | 53 | /// Creates a new instance of EventSource with the specified URL. 54 | /// 55 | /// @param URL The URL of the EventSource. 56 | /// @param timeoutInterval The request timeout interval in seconds. See NSURLRequest for more details. Default: 5 minutes. 57 | - (instancetype)initWithURL:(NSURL *)URL timeoutInterval:(NSTimeInterval)timeoutInterval queue:(dispatch_queue_t)queue; 58 | 59 | 60 | 61 | /// Registers an event handler for the Message event. 62 | /// 63 | /// @param handler The handler for the Message event. 64 | - (void)onMessage:(EventSourceEventHandler)handler; 65 | 66 | /// Registers an event handler for the Error event. 67 | /// 68 | /// @param handler The handler for the Error event. 69 | - (void)onError:(EventSourceEventHandler)handler; 70 | 71 | /// Registers an event handler for the Open event. 72 | /// 73 | /// @param handler The handler for the Open event. 74 | - (void)onOpen:(EventSourceEventHandler)handler; 75 | 76 | /// Registers an event handler for a named event. 77 | /// 78 | /// @param eventName The name of the event you registered. 79 | /// @param handler The handler for the Message event. 80 | - (void)addEventListener:(NSString *)eventName handler:(EventSourceEventHandler)handler; 81 | - (void)removeEventListener:(NSString *)eventName handler:(EventSourceEventHandler)handler; 82 | 83 | /// Closes the connection to the EventSource. 84 | - (void)close; 85 | 86 | @end 87 | 88 | // --------------------------------------------------------------------------------------------------------------------- 89 | 90 | extern NSString *const MessageEvent; 91 | extern NSString *const ErrorEvent; 92 | extern NSString *const OpenEvent; -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-SparkSetup/Pods-SparkSetup-frameworks.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 5 | mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 6 | 7 | SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" 8 | 9 | install_framework() 10 | { 11 | if [ -r "${BUILT_PRODUCTS_DIR}/$1" ]; then 12 | local source="${BUILT_PRODUCTS_DIR}/$1" 13 | elif [ -r "${BUILT_PRODUCTS_DIR}/$(basename "$1")" ]; then 14 | local source="${BUILT_PRODUCTS_DIR}/$(basename "$1")" 15 | elif [ -r "$1" ]; then 16 | local source="$1" 17 | fi 18 | 19 | local destination="${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 20 | 21 | if [ -L "${source}" ]; then 22 | echo "Symlinked..." 23 | source="$(readlink "${source}")" 24 | fi 25 | 26 | # use filter instead of exclude so missing patterns dont' throw errors 27 | echo "rsync -av --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\"" 28 | rsync -av --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}" 29 | 30 | local basename 31 | basename="$(basename -s .framework "$1")" 32 | binary="${destination}/${basename}.framework/${basename}" 33 | if ! [ -r "$binary" ]; then 34 | binary="${destination}/${basename}" 35 | fi 36 | 37 | # Strip invalid architectures so "fat" simulator / device frameworks work on device 38 | if [[ "$(file "$binary")" == *"dynamically linked shared library"* ]]; then 39 | strip_invalid_archs "$binary" 40 | fi 41 | 42 | # Resign the code if required by the build settings to avoid unstable apps 43 | code_sign_if_enabled "${destination}/$(basename "$1")" 44 | 45 | # Embed linked Swift runtime libraries. No longer necessary as of Xcode 7. 46 | if [ "${XCODE_VERSION_MAJOR}" -lt 7 ]; then 47 | local swift_runtime_libs 48 | swift_runtime_libs=$(xcrun otool -LX "$binary" | grep --color=never @rpath/libswift | sed -E s/@rpath\\/\(.+dylib\).*/\\1/g | uniq -u && exit ${PIPESTATUS[0]}) 49 | for lib in $swift_runtime_libs; do 50 | echo "rsync -auv \"${SWIFT_STDLIB_PATH}/${lib}\" \"${destination}\"" 51 | rsync -auv "${SWIFT_STDLIB_PATH}/${lib}" "${destination}" 52 | code_sign_if_enabled "${destination}/${lib}" 53 | done 54 | fi 55 | } 56 | 57 | # Signs a framework with the provided identity 58 | code_sign_if_enabled() { 59 | if [ -n "${EXPANDED_CODE_SIGN_IDENTITY}" -a "${CODE_SIGNING_REQUIRED}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then 60 | # Use the current code_sign_identitiy 61 | echo "Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}" 62 | local code_sign_cmd="/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS} --preserve-metadata=identifier,entitlements '$1'" 63 | 64 | if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then 65 | code_sign_cmd="$code_sign_cmd &" 66 | fi 67 | echo "$code_sign_cmd" 68 | eval "$code_sign_cmd" 69 | fi 70 | } 71 | 72 | # Strip invalid architectures 73 | strip_invalid_archs() { 74 | binary="$1" 75 | # Get architectures for current file 76 | archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | rev)" 77 | stripped="" 78 | for arch in $archs; do 79 | if ! [[ "${VALID_ARCHS}" == *"$arch"* ]]; then 80 | # Strip non-valid architectures in-place 81 | lipo -remove "$arch" -output "$binary" "$binary" || exit 1 82 | stripped="$stripped $arch" 83 | fi 84 | done 85 | if [[ "$stripped" ]]; then 86 | echo "Stripped $binary of architectures:$stripped" 87 | fi 88 | } 89 | 90 | if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then 91 | wait 92 | fi 93 | -------------------------------------------------------------------------------- /Classes/Comm/Reachability.h: -------------------------------------------------------------------------------- 1 | /* 2 | File: Reachability.h 3 | Abstract: Basic demonstration of how to use the SystemConfiguration Reachablity APIs. 4 | Version: 3.5 5 | 6 | Disclaimer: IMPORTANT: This Apple software is supplied to you by Apple 7 | Inc. ("Apple") in consideration of your agreement to the following 8 | terms, and your use, installation, modification or redistribution of 9 | this Apple software constitutes acceptance of these terms. If you do 10 | not agree with these terms, please do not use, install, modify or 11 | redistribute this Apple software. 12 | 13 | In consideration of your agreement to abide by the following terms, and 14 | subject to these terms, Apple grants you a personal, non-exclusive 15 | license, under Apple's copyrights in this original Apple software (the 16 | "Apple Software"), to use, reproduce, modify and redistribute the Apple 17 | Software, with or without modifications, in source and/or binary forms; 18 | provided that if you redistribute the Apple Software in its entirety and 19 | without modifications, you must retain this notice and the following 20 | text and disclaimers in all such redistributions of the Apple Software. 21 | Neither the name, trademarks, service marks or logos of Apple Inc. may 22 | be used to endorse or promote products derived from the Apple Software 23 | without specific prior written permission from Apple. Except as 24 | expressly stated in this notice, no other rights or licenses, express or 25 | implied, are granted by Apple herein, including but not limited to any 26 | patent rights that may be infringed by your derivative works or by other 27 | works in which the Apple Software may be incorporated. 28 | 29 | The Apple Software is provided by Apple on an "AS IS" basis. APPLE 30 | MAKES NO WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION 31 | THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS 32 | FOR A PARTICULAR PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND 33 | OPERATION ALONE OR IN COMBINATION WITH YOUR PRODUCTS. 34 | 35 | IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL 36 | OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 37 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 38 | INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, 39 | MODIFICATION AND/OR DISTRIBUTION OF THE APPLE SOFTWARE, HOWEVER CAUSED 40 | AND WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING NEGLIGENCE), 41 | STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN ADVISED OF THE 42 | POSSIBILITY OF SUCH DAMAGE. 43 | 44 | Copyright (C) 2014-2015 Apple Inc. All Rights Reserved. 45 | 46 | */ 47 | 48 | #import 49 | #import 50 | #import 51 | 52 | 53 | typedef enum : NSInteger { 54 | NotReachable = 0, 55 | ReachableViaWiFi, 56 | ReachableViaWWAN 57 | } NetworkStatus; 58 | 59 | 60 | extern NSString *kReachabilityChangedNotification; 61 | 62 | 63 | @interface Reachability : NSObject 64 | 65 | /*! 66 | * Use to check the reachability of a given host name. 67 | */ 68 | + (instancetype)reachabilityWithHostName:(NSString *)hostName; 69 | 70 | /*! 71 | * Use to check the reachability of a given IP address. 72 | */ 73 | + (instancetype)reachabilityWithAddress:(const struct sockaddr_in *)hostAddress; 74 | 75 | /*! 76 | * Checks whether the default route is available. Should be used by applications that do not connect to a particular host. 77 | */ 78 | + (instancetype)reachabilityForInternetConnection; 79 | 80 | /*! 81 | * Checks whether a local WiFi connection is available. 82 | */ 83 | + (instancetype)reachabilityForLocalWiFi; 84 | 85 | /*! 86 | * Start listening for reachability notifications on the current run loop. 87 | */ 88 | - (BOOL)startNotifier; 89 | - (void)stopNotifier; 90 | 91 | - (NetworkStatus)currentReachabilityStatus; 92 | 93 | /*! 94 | * WWAN may be available, but not active until a connection has been established. WiFi may require a connection for VPN on Demand. 95 | */ 96 | - (BOOL)connectionRequired; 97 | 98 | @end 99 | 100 | 101 | -------------------------------------------------------------------------------- /Classes/User/SparkSetupCustomization.m: -------------------------------------------------------------------------------- 1 | // 2 | // SparkSetupCustomization.m 3 | // mobile-sdk-ios 4 | // 5 | // Created by Ido Kleinman on 12/12/14. 6 | // Copyright (c) 2014-2015 Spark. All rights reserved. 7 | // 8 | 9 | #import "SparkSetupCustomization.h" 10 | #import "SparkSetupMainController.h" 11 | 12 | 13 | 14 | @interface UIColor(withDecimalRGB) // TODO: move to category in helpers 15 | +(UIColor *)colorWithRed:(NSInteger)r green:(NSInteger)g blue:(NSInteger)b; 16 | @end 17 | 18 | @implementation UIColor(withDecimalRGB) // TODO: move to category in helpers 19 | +(UIColor *)colorWithRed:(NSInteger)r green:(NSInteger)g blue:(NSInteger)b 20 | { 21 | return [UIColor colorWithRed:((float)r/255.0f) green:((float)g/255.0f) blue:((float)b/255.0f) alpha:1.0f]; 22 | } 23 | @end 24 | 25 | @implementation SparkSetupCustomization 26 | 27 | 28 | +(instancetype)sharedInstance 29 | { 30 | static SparkSetupCustomization *sharedInstance = nil; 31 | @synchronized(self) { 32 | if (sharedInstance == nil) 33 | { 34 | sharedInstance = [[self alloc] init]; 35 | } 36 | } 37 | return sharedInstance; 38 | 39 | } 40 | 41 | 42 | 43 | -(instancetype)init 44 | { 45 | if (self = [super init]) 46 | { 47 | // Defaults 48 | self.deviceName = @"Particle device"; 49 | // self.deviceImage = [UIImage imageNamed:@"photon" inBundle:[SparkSetupMainController getResourcesBundle] compatibleWithTraitCollection:nil]; // TODO: make iOS7 compatible 50 | self.brandName = @"Particle"; 51 | // self.brandImage = [UIImage imageNamed:@"spark-logo-head" inBundle:[SparkSetupMainController getResourcesBundle] compatibleWithTraitCollection:nil]; // TODO: make iOS7 compatible 52 | self.brandImage = [SparkSetupMainController loadImageFromResourceBundle:@"spark-logo-head"]; 53 | // self.brandImageBackgroundColor = [UIColor colorWithRed:0.79f green:0.79f blue:0.79f alpha:1.0f]; 54 | self.brandImageBackgroundColor = [UIColor colorWithRed:229 green:229 blue:237]; 55 | 56 | self.modeButtonName = @"Setup button"; 57 | self.networkNamePrefix = @"Photon"; 58 | self.listenModeLEDColorName = @"blue"; 59 | // self.appName = self.brandName;// @"SparkSetup"; 60 | self.fontSizeOffset = 0; 61 | 62 | self.privacyPolicyLinkURL = [NSURL URLWithString:@"https://www.particle.io/legal/privacy"]; 63 | self.termsOfServiceLinkURL = [NSURL URLWithString:@"https://www.particle.io/legal/terms-of-service"]; 64 | self.forgotPasswordLinkURL = [NSURL URLWithString:@"https://login.particle.io/forgot"]; 65 | self.troubleshootingLinkURL = [NSURL URLWithString:@"https://community.spark.io/t/spark-core-troubleshooting-guide-spark-team/696"]; 66 | // TODO: add default HTMLs 67 | 68 | // self.normalTextColor = [UIColor blackColor]; 69 | self.normalTextColor = [UIColor colorWithRed:28 green:26 blue:25]; 70 | self.pageBackgroundColor = [UIColor colorWithWhite:0.94 alpha:1.0f]; 71 | // self.pageBackgroundColor = [UIColor colorWithRed:250 green:250 blue:250]; 72 | self.linkTextColor = [UIColor blueColor]; 73 | // self.linkTextColor = [UIColor colorWithRed:6 green:165 blue:226]; 74 | // self.errorTextColor = [UIColor redColor]; 75 | // self.errorTextColor = [UIColor colorWithRed:254 green:71 blue:71]; 76 | // self.elementBackgroundColor = [UIColor colorWithRed:0.84f green:0.32f blue:0.07f alpha:1.0f]; 77 | self.elementBackgroundColor = [UIColor colorWithRed:0 green:165 blue:231]; 78 | self.elementTextColor = [UIColor whiteColor]; 79 | 80 | self.normalTextFontName = @"HelveticaNeue"; 81 | self.boldTextFontName = @"HelveticaNeue-Bold"; 82 | self.headerTextFontName = @"HelveticaNeue-Light"; 83 | 84 | self.tintSetupImages = NO; 85 | self.lightStatusAndNavBar = YES; 86 | 87 | // self.organization = NO; 88 | self.productId = 0; 89 | self.productMode = NO; 90 | // self.organizationSlug = @"particle"; 91 | // self.organizationName = @"Particle"; 92 | // self.productSlug = @"photon"; 93 | self.productName = @"Photon"; 94 | self.allowPasswordManager = YES; 95 | 96 | self.allowSkipAuthentication = NO; 97 | self.skipAuthenticationMessage = @"Skipping authentication will allow you to configure Wi-Fi credentials to your device but it will not be claimed to your account. Are you sure you want to skip authentication?"; 98 | self.disableLogOutOption = NO; 99 | return self; 100 | } 101 | 102 | return nil; 103 | } 104 | 105 | @end 106 | -------------------------------------------------------------------------------- /Pods/AFNetworking/UIKit+AFNetworking/UIWebView+AFNetworking.h: -------------------------------------------------------------------------------- 1 | // UIWebView+AFNetworking.h 2 | // Copyright (c) 2011–2016 Alamofire Software Foundation ( http://alamofire.org/ ) 3 | // 4 | // Permission is hereby granted, free of charge, to any person obtaining a copy 5 | // of this software and associated documentation files (the "Software"), to deal 6 | // in the Software without restriction, including without limitation the rights 7 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | // copies of the Software, and to permit persons to whom the Software is 9 | // furnished to do so, subject to the following conditions: 10 | // 11 | // The above copyright notice and this permission notice shall be included in 12 | // all copies or substantial portions of the Software. 13 | // 14 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | // THE SOFTWARE. 21 | 22 | #import 23 | 24 | #import 25 | 26 | #if TARGET_OS_IOS 27 | 28 | #import 29 | 30 | NS_ASSUME_NONNULL_BEGIN 31 | 32 | @class AFHTTPSessionManager; 33 | 34 | /** 35 | This category adds methods to the UIKit framework's `UIWebView` class. The methods in this category provide increased control over the request cycle, including progress monitoring and success / failure handling. 36 | 37 | @discussion When using these category methods, make sure to assign `delegate` for the web view, which implements `–webView:shouldStartLoadWithRequest:navigationType:` appropriately. This allows for tapped links to be loaded through AFNetworking, and can ensure that `canGoBack` & `canGoForward` update their values correctly. 38 | */ 39 | @interface UIWebView (AFNetworking) 40 | 41 | /** 42 | The session manager used to download all requests. 43 | */ 44 | @property (nonatomic, strong) AFHTTPSessionManager *sessionManager; 45 | 46 | /** 47 | Asynchronously loads the specified request. 48 | 49 | @param request A URL request identifying the location of the content to load. This must not be `nil`. 50 | @param progress A progress object monitoring the current download progress. 51 | @param success A block object to be executed when the request finishes loading successfully. This block returns the HTML string to be loaded by the web view, and takes two arguments: the response, and the response string. 52 | @param failure A block object to be executed when the data task finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the response data. This block has no return value and takes a single argument: the error that occurred. 53 | */ 54 | - (void)loadRequest:(NSURLRequest *)request 55 | progress:(NSProgress * _Nullable __autoreleasing * _Nullable)progress 56 | success:(nullable NSString * (^)(NSHTTPURLResponse *response, NSString *HTML))success 57 | failure:(nullable void (^)(NSError *error))failure; 58 | 59 | /** 60 | Asynchronously loads the data associated with a particular request with a specified MIME type and text encoding. 61 | 62 | @param request A URL request identifying the location of the content to load. This must not be `nil`. 63 | @param MIMEType The MIME type of the content. Defaults to the content type of the response if not specified. 64 | @param textEncodingName The IANA encoding name, as in `utf-8` or `utf-16`. Defaults to the response text encoding if not specified. 65 | @param progress A progress object monitoring the current download progress. 66 | @param success A block object to be executed when the request finishes loading successfully. This block returns the data to be loaded by the web view and takes two arguments: the response, and the downloaded data. 67 | @param failure A block object to be executed when the data task finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the response data. This block has no return value and takes a single argument: the error that occurred. 68 | */ 69 | - (void)loadRequest:(NSURLRequest *)request 70 | MIMEType:(nullable NSString *)MIMEType 71 | textEncodingName:(nullable NSString *)textEncodingName 72 | progress:(NSProgress * _Nullable __autoreleasing * _Nullable)progress 73 | success:(nullable NSData * (^)(NSHTTPURLResponse *response, NSData *data))success 74 | failure:(nullable void (^)(NSError *error))failure; 75 | 76 | @end 77 | 78 | NS_ASSUME_NONNULL_END 79 | 80 | #endif 81 | -------------------------------------------------------------------------------- /Classes/User/SparkSetupCustomization.h: -------------------------------------------------------------------------------- 1 | // 2 | // SparkSetupCustomization.h 3 | // mobile-sdk-ios 4 | // 5 | // Created by Ido Kleinman on 12/12/14. 6 | // Copyright (c) 2014-2015 Spark. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | //#define ANALYTICS 1 // comment out to disable Analytics 13 | 14 | @interface SparkSetupCustomization : NSObject 15 | 16 | /** 17 | * Spark soft AP setup wizard apperance customization proxy class 18 | * 19 | * @return Singleton instance of the customization class 20 | */ 21 | + (instancetype)sharedInstance; 22 | 23 | @property (nonatomic, strong) NSString *deviceName; 24 | @property (nonatomic, strong) UIImage *productImage; 25 | 26 | @property (nonatomic, strong) NSString *brandName; 27 | @property (nonatomic, strong) UIImage *brandImage; 28 | @property (nonatomic, strong) UIColor *brandImageBackgroundColor; 29 | @property (nonatomic, strong) NSString *instructionalVideoFilename; 30 | 31 | @property (nonatomic, strong) NSString *modeButtonName; 32 | @property (nonatomic, strong) NSString *listenModeLEDColorName; 33 | @property (nonatomic, strong) NSString *networkNamePrefix; 34 | 35 | // TODO: kill forgot password links 36 | @property (nonatomic, strong) NSURL *termsOfServiceLinkURL; // URL for terms of service of the app/device usage 37 | @property (nonatomic, strong) NSURL *privacyPolicyLinkURL; // URL for privacy policy of the app/device usage 38 | @property (nonatomic, strong) NSURL *forgotPasswordLinkURL; // URL for user password reset (non-organization setup app only) 39 | @property (nonatomic, strong) NSURL *troubleshootingLinkURL; // URL for troubleshooting text of the app/device usage 40 | 41 | @property (nonatomic, strong) NSString *termsOfServiceHTMLFile; // Static HTML for terms of service of the app/device usage 42 | @property (nonatomic, strong) NSString *privacyPolicyHTMLFile; // Static HTML for privacy policy of the app/device usage 43 | @property (nonatomic, strong) NSString *forgotPasswordHTMLFile; // Static HTML for user password reset (non-organization setup app only) 44 | @property (nonatomic, strong) NSString *troubleshootingHTMLFile; // Static HTML for troubleshooting text of the app/device usage 45 | 46 | @property (nonatomic, strong) UIColor *pageBackgroundColor; 47 | @property (nonatomic, strong) UIImage *pageBackgroundImage; 48 | @property (nonatomic, strong) UIColor *normalTextColor; 49 | @property (nonatomic, strong) UIColor *linkTextColor; 50 | 51 | @property (nonatomic, strong) UIColor *elementBackgroundColor; // Buttons/spinners background color 52 | @property (nonatomic) BOOL lightStatusAndNavBar; 53 | 54 | // TODO: change to: 55 | //@property (nonatomic, strong) UIColor *buttonBackgroundColor; // new 56 | 57 | @property (nonatomic, strong) UIColor *elementTextColor; // Buttons text color 58 | // TODO: change to: 59 | //@property (nonatomic, strong) UIColor *buttonTextColor; // new 60 | @property (nonatomic) BOOL tintSetupImages; // new // this will tint the checkmark/warning/ wifi symbols 61 | 62 | 63 | @property (nonatomic, strong) NSString *normalTextFontName; // Customize setup font - include OTF/TTF file in project 64 | 65 | @property (nonatomic, strong) NSString *headerTextFontName; //new 66 | 67 | @property (nonatomic, strong) NSString *boldTextFontName; // Customize setup font - include OTF/TTF file in project 68 | 69 | 70 | @property (nonatomic) CGFloat fontSizeOffset; // Set offset of font size so small/big fonts can be fine-adjusted 71 | 72 | @property (nonatomic, assign) BOOL organization __deprecated_msg("Use productMode instead"); // enable organizational mode 73 | @property (nonatomic, assign) BOOL productMode; // Set YES for product mode 74 | @property (nonatomic, strong) NSString *organizationName __deprecated_msg("Organization settings have been deprecated - set product name and ID only"); 75 | @property (nonatomic, strong) NSString *organizationSlug __deprecated_msg("Organization settings have been deprecated - set product name and ID only"); 76 | @property (nonatomic, strong) NSString *productName; // product display name 77 | @property (nonatomic, strong) NSString *productSlug __deprecated_msg("Set productId number instead"); //; // product string for API endpoint URL - must specify for orgMode 78 | @property (nonatomic) NSUInteger productId; 79 | 80 | @property (nonatomic, assign) BOOL allowSkipAuthentication; // allow user to skip authentication 81 | @property (nonatomic, assign) BOOL allowPasswordManager; // Display 1Password button next to password entry fields in login/signup 82 | @property (nonatomic, strong) NSString *skipAuthenticationMessage; // Prompt to display to user when he's requesting to skip authentication 83 | @property (nonatomic) BOOL disableLogOutOption; // Do not allow the user to log out from the GetReady page. 84 | 85 | @end 86 | -------------------------------------------------------------------------------- /ParticleDeviceSetupLibrary/AFNetworking.framework/Headers/UIWebView+AFNetworking.h: -------------------------------------------------------------------------------- 1 | // UIWebView+AFNetworking.h 2 | // Copyright (c) 2011–2016 Alamofire Software Foundation ( http://alamofire.org/ ) 3 | // 4 | // Permission is hereby granted, free of charge, to any person obtaining a copy 5 | // of this software and associated documentation files (the "Software"), to deal 6 | // in the Software without restriction, including without limitation the rights 7 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | // copies of the Software, and to permit persons to whom the Software is 9 | // furnished to do so, subject to the following conditions: 10 | // 11 | // The above copyright notice and this permission notice shall be included in 12 | // all copies or substantial portions of the Software. 13 | // 14 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | // THE SOFTWARE. 21 | 22 | #import 23 | 24 | #import 25 | 26 | #if TARGET_OS_IOS 27 | 28 | #import 29 | 30 | NS_ASSUME_NONNULL_BEGIN 31 | 32 | @class AFHTTPSessionManager; 33 | 34 | /** 35 | This category adds methods to the UIKit framework's `UIWebView` class. The methods in this category provide increased control over the request cycle, including progress monitoring and success / failure handling. 36 | 37 | @discussion When using these category methods, make sure to assign `delegate` for the web view, which implements `–webView:shouldStartLoadWithRequest:navigationType:` appropriately. This allows for tapped links to be loaded through AFNetworking, and can ensure that `canGoBack` & `canGoForward` update their values correctly. 38 | */ 39 | @interface UIWebView (AFNetworking) 40 | 41 | /** 42 | The session manager used to download all requests. 43 | */ 44 | @property (nonatomic, strong) AFHTTPSessionManager *sessionManager; 45 | 46 | /** 47 | Asynchronously loads the specified request. 48 | 49 | @param request A URL request identifying the location of the content to load. This must not be `nil`. 50 | @param progress A progress object monitoring the current download progress. 51 | @param success A block object to be executed when the request finishes loading successfully. This block returns the HTML string to be loaded by the web view, and takes two arguments: the response, and the response string. 52 | @param failure A block object to be executed when the data task finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the response data. This block has no return value and takes a single argument: the error that occurred. 53 | */ 54 | - (void)loadRequest:(NSURLRequest *)request 55 | progress:(NSProgress * _Nullable __autoreleasing * _Nullable)progress 56 | success:(nullable NSString * (^)(NSHTTPURLResponse *response, NSString *HTML))success 57 | failure:(nullable void (^)(NSError *error))failure; 58 | 59 | /** 60 | Asynchronously loads the data associated with a particular request with a specified MIME type and text encoding. 61 | 62 | @param request A URL request identifying the location of the content to load. This must not be `nil`. 63 | @param MIMEType The MIME type of the content. Defaults to the content type of the response if not specified. 64 | @param textEncodingName The IANA encoding name, as in `utf-8` or `utf-16`. Defaults to the response text encoding if not specified. 65 | @param progress A progress object monitoring the current download progress. 66 | @param success A block object to be executed when the request finishes loading successfully. This block returns the data to be loaded by the web view and takes two arguments: the response, and the downloaded data. 67 | @param failure A block object to be executed when the data task finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the response data. This block has no return value and takes a single argument: the error that occurred. 68 | */ 69 | - (void)loadRequest:(NSURLRequest *)request 70 | MIMEType:(nullable NSString *)MIMEType 71 | textEncodingName:(nullable NSString *)textEncodingName 72 | progress:(NSProgress * _Nullable __autoreleasing * _Nullable)progress 73 | success:(nullable NSData * (^)(NSHTTPURLResponse *response, NSData *data))success 74 | failure:(nullable void (^)(NSError *error))failure; 75 | 76 | @end 77 | 78 | NS_ASSUME_NONNULL_END 79 | 80 | #endif 81 | -------------------------------------------------------------------------------- /Pods/AFNetworking/UIKit+AFNetworking/UIRefreshControl+AFNetworking.m: -------------------------------------------------------------------------------- 1 | // UIRefreshControl+AFNetworking.m 2 | // 3 | // Copyright (c) 2011–2016 Alamofire Software Foundation ( http://alamofire.org/ ) 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy 6 | // of this software and associated documentation files (the "Software"), to deal 7 | // in the Software without restriction, including without limitation the rights 8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | // copies of the Software, and to permit persons to whom the Software is 10 | // furnished to do so, subject to the following conditions: 11 | // 12 | // The above copyright notice and this permission notice shall be included in 13 | // all copies or substantial portions of the Software. 14 | // 15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | // THE SOFTWARE. 22 | 23 | #import "UIRefreshControl+AFNetworking.h" 24 | #import 25 | 26 | #if TARGET_OS_IOS 27 | 28 | #import "AFURLSessionManager.h" 29 | 30 | @interface AFRefreshControlNotificationObserver : NSObject 31 | @property (readonly, nonatomic, weak) UIRefreshControl *refreshControl; 32 | - (instancetype)initWithActivityRefreshControl:(UIRefreshControl *)refreshControl; 33 | 34 | - (void)setRefreshingWithStateOfTask:(NSURLSessionTask *)task; 35 | 36 | @end 37 | 38 | @implementation UIRefreshControl (AFNetworking) 39 | 40 | - (AFRefreshControlNotificationObserver *)af_notificationObserver { 41 | AFRefreshControlNotificationObserver *notificationObserver = objc_getAssociatedObject(self, @selector(af_notificationObserver)); 42 | if (notificationObserver == nil) { 43 | notificationObserver = [[AFRefreshControlNotificationObserver alloc] initWithActivityRefreshControl:self]; 44 | objc_setAssociatedObject(self, @selector(af_notificationObserver), notificationObserver, OBJC_ASSOCIATION_RETAIN_NONATOMIC); 45 | } 46 | return notificationObserver; 47 | } 48 | 49 | - (void)setRefreshingWithStateOfTask:(NSURLSessionTask *)task { 50 | [[self af_notificationObserver] setRefreshingWithStateOfTask:task]; 51 | } 52 | 53 | @end 54 | 55 | @implementation AFRefreshControlNotificationObserver 56 | 57 | - (instancetype)initWithActivityRefreshControl:(UIRefreshControl *)refreshControl 58 | { 59 | self = [super init]; 60 | if (self) { 61 | _refreshControl = refreshControl; 62 | } 63 | return self; 64 | } 65 | 66 | - (void)setRefreshingWithStateOfTask:(NSURLSessionTask *)task { 67 | NSNotificationCenter *notificationCenter = [NSNotificationCenter defaultCenter]; 68 | 69 | [notificationCenter removeObserver:self name:AFNetworkingTaskDidResumeNotification object:nil]; 70 | [notificationCenter removeObserver:self name:AFNetworkingTaskDidSuspendNotification object:nil]; 71 | [notificationCenter removeObserver:self name:AFNetworkingTaskDidCompleteNotification object:nil]; 72 | 73 | if (task) { 74 | #pragma clang diagnostic push 75 | #pragma clang diagnostic ignored "-Wreceiver-is-weak" 76 | #pragma clang diagnostic ignored "-Warc-repeated-use-of-weak" 77 | if (task.state == NSURLSessionTaskStateRunning) { 78 | [self.refreshControl beginRefreshing]; 79 | 80 | [notificationCenter addObserver:self selector:@selector(af_beginRefreshing) name:AFNetworkingTaskDidResumeNotification object:task]; 81 | [notificationCenter addObserver:self selector:@selector(af_endRefreshing) name:AFNetworkingTaskDidCompleteNotification object:task]; 82 | [notificationCenter addObserver:self selector:@selector(af_endRefreshing) name:AFNetworkingTaskDidSuspendNotification object:task]; 83 | } else { 84 | [self.refreshControl endRefreshing]; 85 | } 86 | #pragma clang diagnostic pop 87 | } 88 | } 89 | 90 | #pragma mark - 91 | 92 | - (void)af_beginRefreshing { 93 | dispatch_async(dispatch_get_main_queue(), ^{ 94 | #pragma clang diagnostic push 95 | #pragma clang diagnostic ignored "-Wreceiver-is-weak" 96 | [self.refreshControl beginRefreshing]; 97 | #pragma clang diagnostic pop 98 | }); 99 | } 100 | 101 | - (void)af_endRefreshing { 102 | dispatch_async(dispatch_get_main_queue(), ^{ 103 | #pragma clang diagnostic push 104 | #pragma clang diagnostic ignored "-Wreceiver-is-weak" 105 | [self.refreshControl endRefreshing]; 106 | #pragma clang diagnostic pop 107 | }); 108 | } 109 | 110 | #pragma mark - 111 | 112 | - (void)dealloc { 113 | NSNotificationCenter *notificationCenter = [NSNotificationCenter defaultCenter]; 114 | 115 | [notificationCenter removeObserver:self name:AFNetworkingTaskDidCompleteNotification object:nil]; 116 | [notificationCenter removeObserver:self name:AFNetworkingTaskDidResumeNotification object:nil]; 117 | [notificationCenter removeObserver:self name:AFNetworkingTaskDidSuspendNotification object:nil]; 118 | } 119 | 120 | @end 121 | 122 | #endif 123 | -------------------------------------------------------------------------------- /Classes/UI/SparkSetupVideoViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // SparkSetupVideoViewController.m 3 | // Pods 4 | // 5 | // Created by Ido on 6/15/15. 6 | // 7 | // 8 | 9 | #import "SparkSetupVideoViewController.h" 10 | #import "SparkSetupCustomization.h" 11 | #import 12 | #if ANALYTICS 13 | #import 14 | #endif 15 | 16 | @interface SparkSetupVideoViewController () 17 | @property (strong, nonatomic) MPMoviePlayerController *videoPlayer; 18 | 19 | @property (weak, nonatomic) IBOutlet UIButton *closeButton; 20 | 21 | @end 22 | 23 | @implementation SparkSetupVideoViewController 24 | 25 | /* 26 | - (NSUInteger)supportedInterfaceOrientations { 27 | if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPad) { 28 | // iPad: Allow all orientations 29 | return UIInterfaceOrientationMaskAll; 30 | } else { 31 | // iPhone: Allow only landscape 32 | return UIInterfaceOrientationMaskLandscape; 33 | } 34 | } 35 | 36 | 37 | 38 | - (UIInterfaceOrientation)preferredInterfaceOrientationForPresentation { 39 | return UIInterfaceOrientationLandscapeLeft; 40 | } 41 | 42 | 43 | -(BOOL)shouldAutorotate { 44 | return NO; 45 | } 46 | */ 47 | 48 | 49 | - (void)viewDidLoad { 50 | [super viewDidLoad]; 51 | // move to super viewdidload? 52 | } 53 | 54 | - (void)didReceiveMemoryWarning { 55 | [super didReceiveMemoryWarning]; 56 | // Dispose of any resources that can be recreated. 57 | } 58 | 59 | /* 60 | #pragma mark - Navigation 61 | 62 | // In a storyboard-based application, you will often want to do a little preparation before navigation 63 | - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { 64 | // Get the new view controller using [segue destinationViewController]. 65 | // Pass the selected object to the new view controller. 66 | } 67 | */ 68 | 69 | 70 | 71 | -(void)viewWillDisappear:(BOOL)animated 72 | { 73 | #ifdef ANALYTICS 74 | [[Mixpanel sharedInstance] track:@"Device Setup: How-To video screen activity"]; 75 | #endif 76 | 77 | } 78 | 79 | - (IBAction)closeButtonTapped:(id)sender { 80 | [self dismissPlayer]; 81 | } 82 | 83 | 84 | - (BOOL)prefersStatusBarHidden { 85 | return YES; 86 | } 87 | 88 | //-(void)viewDidAppear:(BOOL)animated 89 | -(void)viewWillAppear:(BOOL)animated 90 | { 91 | 92 | [super viewDidAppear:animated]; 93 | [self setNeedsStatusBarAppearanceUpdate]; 94 | 95 | // self.videoViewWidth.constant = ((self.videoView.frame.size.height * 9.0)/16.0); 96 | #ifdef ANALYTICS 97 | [[Mixpanel sharedInstance] timeEvent:@"Device Setup: How-To video screen activity"]; 98 | #endif 99 | 100 | 101 | if (self.videoFilePath) 102 | { 103 | NSArray *videoFilenameArr = [self.videoFilePath componentsSeparatedByString:@"."]; 104 | NSString *path = [[NSBundle mainBundle] pathForResource:videoFilenameArr[0] ofType:videoFilenameArr[1]]; 105 | 106 | if (path) 107 | self.videoPlayer = [[MPMoviePlayerController alloc] initWithContentURL:[NSURL fileURLWithPath:path]]; 108 | if (self.videoPlayer) 109 | { 110 | [[NSNotificationCenter defaultCenter] addObserver:self 111 | selector:@selector(moviePlayBackDidFinish:) 112 | name:MPMoviePlayerPlaybackDidFinishNotification 113 | object:self.videoPlayer]; 114 | 115 | self.videoPlayer.shouldAutoplay = YES; 116 | // self.videoPlayer.view.frame = self.view.frame;//self.videoView.bounds; 117 | [self.videoPlayer setFullscreen:YES animated:YES]; 118 | 119 | self.videoPlayer.repeatMode = MPMovieRepeatModeNone; 120 | // self.videoPlayer.fullscreen = NO; 121 | self.videoPlayer.movieSourceType = MPMovieSourceTypeFile; 122 | // self.videoPlayer.scalingMode = MPMovieScalingModeAspectFit; 123 | self.videoPlayer.controlStyle = MPMovieControlStyleNone;//Fullscreen;// None; 124 | self.videoPlayer.view.transform = CGAffineTransformConcat(self.videoPlayer.view.transform, CGAffineTransformMakeRotation(M_PI_2)); 125 | [self.videoPlayer.view setFrame: self.view.bounds]; 126 | [self.view addSubview: self.videoPlayer.view]; 127 | 128 | [self.view bringSubviewToFront:self.closeButton]; 129 | // [self.videoView addSubview:self.videoPlayer.view]; //videoView 130 | 131 | [self.videoPlayer play]; 132 | // self.videoView.layer.borderColor = [UIColor lightGrayColor].CGColor; 133 | // self.videoView.layer.borderWidth = 0.5; 134 | 135 | 136 | } 137 | } 138 | } 139 | 140 | -(void)dismissPlayer { 141 | [self.videoPlayer stop]; 142 | [self.videoPlayer.view removeFromSuperview]; 143 | 144 | [self dismissViewControllerAnimated:YES completion:nil]; 145 | 146 | } 147 | 148 | - (void)moviePlayBackDidFinish:(NSNotification*)notification { 149 | MPMoviePlayerController *player = [notification object]; 150 | [[NSNotificationCenter defaultCenter] 151 | removeObserver:self 152 | name:MPMoviePlayerPlaybackDidFinishNotification 153 | object:player]; 154 | 155 | [self dismissPlayer]; 156 | 157 | } 158 | 159 | 160 | 161 | 162 | @end 163 | -------------------------------------------------------------------------------- /Pods/AFNetworking/UIKit+AFNetworking/UIActivityIndicatorView+AFNetworking.m: -------------------------------------------------------------------------------- 1 | // UIActivityIndicatorView+AFNetworking.m 2 | // Copyright (c) 2011–2016 Alamofire Software Foundation ( http://alamofire.org/ ) 3 | // 4 | // Permission is hereby granted, free of charge, to any person obtaining a copy 5 | // of this software and associated documentation files (the "Software"), to deal 6 | // in the Software without restriction, including without limitation the rights 7 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | // copies of the Software, and to permit persons to whom the Software is 9 | // furnished to do so, subject to the following conditions: 10 | // 11 | // The above copyright notice and this permission notice shall be included in 12 | // all copies or substantial portions of the Software. 13 | // 14 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | // THE SOFTWARE. 21 | 22 | #import "UIActivityIndicatorView+AFNetworking.h" 23 | #import 24 | 25 | #if TARGET_OS_IOS || TARGET_OS_TV 26 | 27 | #import "AFURLSessionManager.h" 28 | 29 | @interface AFActivityIndicatorViewNotificationObserver : NSObject 30 | @property (readonly, nonatomic, weak) UIActivityIndicatorView *activityIndicatorView; 31 | - (instancetype)initWithActivityIndicatorView:(UIActivityIndicatorView *)activityIndicatorView; 32 | 33 | - (void)setAnimatingWithStateOfTask:(NSURLSessionTask *)task; 34 | 35 | @end 36 | 37 | @implementation UIActivityIndicatorView (AFNetworking) 38 | 39 | - (AFActivityIndicatorViewNotificationObserver *)af_notificationObserver { 40 | AFActivityIndicatorViewNotificationObserver *notificationObserver = objc_getAssociatedObject(self, @selector(af_notificationObserver)); 41 | if (notificationObserver == nil) { 42 | notificationObserver = [[AFActivityIndicatorViewNotificationObserver alloc] initWithActivityIndicatorView:self]; 43 | objc_setAssociatedObject(self, @selector(af_notificationObserver), notificationObserver, OBJC_ASSOCIATION_RETAIN_NONATOMIC); 44 | } 45 | return notificationObserver; 46 | } 47 | 48 | - (void)setAnimatingWithStateOfTask:(NSURLSessionTask *)task { 49 | [[self af_notificationObserver] setAnimatingWithStateOfTask:task]; 50 | } 51 | 52 | @end 53 | 54 | @implementation AFActivityIndicatorViewNotificationObserver 55 | 56 | - (instancetype)initWithActivityIndicatorView:(UIActivityIndicatorView *)activityIndicatorView 57 | { 58 | self = [super init]; 59 | if (self) { 60 | _activityIndicatorView = activityIndicatorView; 61 | } 62 | return self; 63 | } 64 | 65 | - (void)setAnimatingWithStateOfTask:(NSURLSessionTask *)task { 66 | NSNotificationCenter *notificationCenter = [NSNotificationCenter defaultCenter]; 67 | 68 | [notificationCenter removeObserver:self name:AFNetworkingTaskDidResumeNotification object:nil]; 69 | [notificationCenter removeObserver:self name:AFNetworkingTaskDidSuspendNotification object:nil]; 70 | [notificationCenter removeObserver:self name:AFNetworkingTaskDidCompleteNotification object:nil]; 71 | 72 | if (task) { 73 | if (task.state != NSURLSessionTaskStateCompleted) { 74 | 75 | #pragma clang diagnostic push 76 | #pragma clang diagnostic ignored "-Wreceiver-is-weak" 77 | #pragma clang diagnostic ignored "-Warc-repeated-use-of-weak" 78 | if (task.state == NSURLSessionTaskStateRunning) { 79 | [self.activityIndicatorView startAnimating]; 80 | } else { 81 | [self.activityIndicatorView stopAnimating]; 82 | } 83 | #pragma clang diagnostic pop 84 | 85 | [notificationCenter addObserver:self selector:@selector(af_startAnimating) name:AFNetworkingTaskDidResumeNotification object:task]; 86 | [notificationCenter addObserver:self selector:@selector(af_stopAnimating) name:AFNetworkingTaskDidCompleteNotification object:task]; 87 | [notificationCenter addObserver:self selector:@selector(af_stopAnimating) name:AFNetworkingTaskDidSuspendNotification object:task]; 88 | } 89 | } 90 | } 91 | 92 | #pragma mark - 93 | 94 | - (void)af_startAnimating { 95 | dispatch_async(dispatch_get_main_queue(), ^{ 96 | #pragma clang diagnostic push 97 | #pragma clang diagnostic ignored "-Wreceiver-is-weak" 98 | [self.activityIndicatorView startAnimating]; 99 | #pragma clang diagnostic pop 100 | }); 101 | } 102 | 103 | - (void)af_stopAnimating { 104 | dispatch_async(dispatch_get_main_queue(), ^{ 105 | #pragma clang diagnostic push 106 | #pragma clang diagnostic ignored "-Wreceiver-is-weak" 107 | [self.activityIndicatorView stopAnimating]; 108 | #pragma clang diagnostic pop 109 | }); 110 | } 111 | 112 | #pragma mark - 113 | 114 | - (void)dealloc { 115 | NSNotificationCenter *notificationCenter = [NSNotificationCenter defaultCenter]; 116 | 117 | [notificationCenter removeObserver:self name:AFNetworkingTaskDidCompleteNotification object:nil]; 118 | [notificationCenter removeObserver:self name:AFNetworkingTaskDidResumeNotification object:nil]; 119 | [notificationCenter removeObserver:self name:AFNetworkingTaskDidSuspendNotification object:nil]; 120 | } 121 | 122 | @end 123 | 124 | #endif 125 | --------------------------------------------------------------------------------